From: "Bjørn Mork" <bmork@dod.no>
Subject: Re: imap spam reporting
Date: Thu, 13 May 2004 18:38:08 +0200 [thread overview]
Message-ID: <hvoeosuvtb.fsf@rasputin.ws.nextra.no> (raw)
In-Reply-To: <87oeosvjoc.fsf@dod.no>
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
Steinar Bang <sb@dod.no> writes:
>>>>>> Ted Zlatanov <tzz@lifelogs.com>:
>> On Wed, 12 May 2004, sb@dod.no wrote:
>
>>> A command like the one I'm suggesting means that spam can be
>>> reported by moving it to a different folder on an IMAP server,
>>> without first transferring it to Gnus, and then pushing it back to
>>> the IMAP server.
>
>> Shouldn't the nnimap backend do this?
>
> It should. But it doesn't.
>
> According to this message from Simon
> http://article.gmane.org/gmane.emacs.gnus.general/54020
> nntp://news.gmane.org/gmane.emacs.gnus.general/54020
> it's because the Gnus backend interface doesn't have a move command.
>
>> If it doesn't do it already, it seems like an awfully nice feature
>> to move articles without retrieving them.
>
> Oh, I completely agree.
I've been using this patch since that discussion (thought I posted it
too, but maybe I forgot?):
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnimap.patch --]
[-- Type: text/x-patch, Size: 1757 bytes --]
Index: lisp/nnimap.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnimap.el,v
retrieving revision 7.3
diff -u -r7.3 nnimap.el
--- lisp/nnimap.el 25 Apr 2004 18:01:33 -0000 7.3
+++ lisp/nnimap.el 13 May 2004 16:35:04 -0000
@@ -1418,14 +1418,23 @@
(defun nnimap-expiry-target (arts group server)
(unless (eq nnmail-expiry-target 'delete)
- (with-temp-buffer
- (dolist (art arts)
- (nnimap-request-article art group server (current-buffer))
- ;; hints for optimization in `nnimap-request-accept-article'
- (let ((nnimap-current-move-article art)
- (nnimap-current-move-group group)
- (nnimap-current-move-server server))
- (nnmail-expiry-target-group nnmail-expiry-target group))))
+ (if (and (not (functionp nnmail-expiry-target))
+ (gnus-server-equal (gnus-group-method nnmail-expiry-target)
+ (gnus-server-to-method
+ (format "nnimap:%s" server))))
+ ;; moving article within same server, speed it up...
+ (and (nnimap-possibly-change-group group)
+ (imap-message-copy (imap-range-to-message-set arts)
+ (gnus-group-short-name nnmail-expiry-target)
+ 'dontcreate nil nnimap-server-buffer))
+ (with-temp-buffer
+ (dolist (art arts)
+ (nnimap-request-article art group server (current-buffer))
+ ;; hints for optimization in `nnimap-request-accept-article'
+ (let ((nnimap-current-move-article art)
+ (nnimap-current-move-group group)
+ (nnimap-current-move-server server))
+ (nnmail-expiry-target-group nnmail-expiry-target group)))))
;; It is not clear if `nnmail-expiry-target' somehow cause the
;; current group to be changed or not, so we make sure here.
(nnimap-possibly-change-group group server)))
[-- Attachment #3: Type: text/plain, Size: 162 bytes --]
It solves the problem for me. May have bad side effects like static
electricity in cats or whatever.
Bjørn
--
You're probably feminist yourself.
next prev parent reply other threads:[~2004-05-13 16:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-27 7:42 Moving messages to unreadable nnimap group? (spam reporting) Steinar Bang
2004-04-27 8:02 ` Simon Josefsson
2004-04-29 7:03 ` Steinar Bang
2004-04-29 10:01 ` Simon Josefsson
2004-04-29 10:34 ` Steinar Bang
2004-04-29 10:44 ` Simon Josefsson
2004-04-29 11:40 ` Steinar Bang
2004-04-29 12:06 ` Simon Josefsson
2004-04-29 12:22 ` Steinar Bang
2004-04-29 13:54 ` Simon Josefsson
2004-04-30 8:10 ` Steinar Bang
2004-05-08 20:25 ` imap spam reporting (Was: Moving messages to unreadable nnimap group...) Steinar Bang
2004-05-12 16:44 ` imap spam reporting Ted Zlatanov
2004-05-12 19:12 ` Steinar Bang
2004-05-12 19:13 ` Ted Zlatanov
2004-05-12 20:04 ` Zack Weinberg
2004-05-13 8:09 ` Steinar Bang
2004-05-13 8:02 ` Steinar Bang
2004-05-13 12:32 ` Ted Zlatanov
2004-05-13 16:38 ` Bjørn Mork [this message]
2004-05-14 5:22 ` Steinar Bang
2004-05-14 14:45 ` Bjørn Mork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=hvoeosuvtb.fsf@rasputin.ws.nextra.no \
--to=bmork@dod.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).