From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51605 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: mail splitting to another backend Date: Fri, 18 Apr 2003 13:12:45 -0400 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nr87zivaq.fsf@lockgroove.bwh.harvard.edu> References: <4nadepf4bp.fsf@lockgroove.bwh.harvard.edu> <4n8yu8euvx.fsf@lockgroove.bwh.harvard.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1050705602 32124 80.91.224.249 (18 Apr 2003 22:40:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 18 Apr 2003 22:40:02 +0000 (UTC) Original-X-From: ding-owner+M149@lists.math.uh.edu Sat Apr 19 00:40:00 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 196eWW-0008Lb-00 for ; Sat, 19 Apr 2003 00:40:00 +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 196eX7-00054m-00; Fri, 18 Apr 2003 17:40:37 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 196eX0-00054g-00 for ding@lists.math.uh.edu; Fri, 18 Apr 2003 17:40:30 -0500 Original-Received: (qmail 22126 invoked by alias); 18 Apr 2003 17:13:49 -0000 Original-Received: (qmail 22121 invoked from network); 18 Apr 2003 17:13:49 -0000 Original-Received: from clifford.bwh.harvard.edu (134.174.9.41) by 64.157.176.121 with SMTP; 18 Apr 2003 17:13:49 -0000 Original-Received: from lockgroove.bwh.harvard.edu (lockgroove [134.174.9.133]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id h3IHCjI04092 for ; Fri, 18 Apr 2003 13:12:46 -0400 (EDT) Original-Received: (from tzz@localhost) by lockgroove.bwh.harvard.edu (8.11.6+Sun/8.11.0) id h3IHCjp26084; Fri, 18 Apr 2003 13:12:45 -0400 (EDT) Original-To: Ding Mailing List X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Ding Mailing List In-Reply-To: (Simon Josefsson's message of "Fri, 18 Apr 2003 10:56:15 +0200") User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3 (usg-unix-v) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:51605 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51605 On Fri, 18 Apr 2003, jas@extundo.com wrote: > I take back my idea -- nnimap cannot split mail from mail-sources, > only from a IMAP mailbox. This is probably not very difficult to > fix, though. Just replace the part that fetches mail from the > INBOX, before it is splitted, with some code that gets mail from a > mail-source. But to not interfer with normal mail-sources, I think > this would mean adding a nnimap-mail-sources. While your idea has its uses, I'm not sure it helps here. What I want is very simple, and can't be achieved for the general case with the one-time cross-splitting you demonstrate. I just want users to say "split to destination nnxyz+abc:mail" in nn{mail|imap}-split-fancy and have it work, like users would reasonably expect since the rest of Gnus works with this convention. What's below is generic enough that any backend can use it when splitting, not just nnmail/nnimap - I only looked at nnmail.el though so please correct any inaccuracies. 1) if nnmail-article-group returns a normal (non-prefixed) group name do normal splitting (incidentally, should the ":" character be allowed in group names?) 2) if nnmail-article-group returns a prefixed group name outside the current server, put the message in a "split-queue" group and remember the article number and the destination, perhaps with an extra header inside the article body to make the destination persistent even if the queue redistribution fails. Once mail splitting is done, the queue group is redistributed by moving the articles to their destination; this is fairly easy and any failed moves will simply remain in the queue group until the user creates the destination or deletes the articles. 3) if nnmail-article-group returns a prefixed group name that refers to our own server (I have not yet figured out how to detect this), either strip off the prefix and proceed as in (1) or just do (2), it shouldn't make a difference. I'd be happy to help implement the above, but I doubt I can do the whole thing on my own. Thanks Ted