From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57280 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?q?Bj=F8rn_Mork?= Newsgroups: gmane.emacs.gnus.general Subject: Re: imap spam reporting Date: Thu, 13 May 2004 18:38:08 +0200 Organization: Doom of Despatchers Sender: ding-owner@lists.math.uh.edu Message-ID: References: <87pt9tx3wn.fsf@dod.no> <87d65rl0zl.fsf@dod.no> <87pt9rhy2s.fsf@dod.no> <87brlbhv0u.fsf@dod.no> <87y8of9doe.fsf@dod.no> <873c6lsx69.fsf@dod.no> <87n04iacoj.fsf_-_@dod.no> <4nr7tpd296.fsf@lifelogs.com> <87ekppo3wl.fsf@dod.no> <4nu0yla26u.fsf@lifelogs.com> <87oeosvjoc.fsf@dod.no> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1084469250 8524 80.91.224.253 (13 May 2004 17:27:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 May 2004 17:27:30 +0000 (UTC) Original-X-From: ding-owner+M5820@lists.math.uh.edu Thu May 13 19:27:23 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOJzO-0000Oi-00 for ; Thu, 13 May 2004 19:27:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BOJyP-0007wI-00; Thu, 13 May 2004 12:26:21 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BOJDt-0007so-00 for ding@lists.math.uh.edu; Thu, 13 May 2004 11:38:17 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BOJDr-0002Gf-9D for ding@lists.math.uh.edu; Thu, 13 May 2004 11:38:15 -0500 Original-Received: from quimby.gnus.org (quimby.gnus.org [80.91.224.244]) by justine.libertine.org (Postfix) with ESMTP id 6C6973A0035 for ; Thu, 13 May 2004 11:38:13 -0500 (CDT) Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1BOJDo-0001qU-00 for ; Thu, 13 May 2004 18:38:12 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 88 Original-NNTP-Posting-Host: ti521110a080-0866.bb.online.no Original-X-Trace: quimby.gnus.org 1084466292 6363 80.213.51.98 (13 May 2004 16:38:12 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Thu, 13 May 2004 16:38:12 +0000 (UTC) User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:/FsTzNpmykGmY8e3lo5x2h/hd5c= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57280 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57280 --=-=-= Steinar Bang writes: >>>>>> Ted Zlatanov : >> 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?): --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nnimap.patch 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))) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable It solves the problem for me. May have bad side effects like static electricity in cats or whatever. Bj=F8rn --=20 You're probably feminist yourself.=20=20 --=-=-=--