From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/32943 Path: main.gmane.org!not-for-mail From: Didier Verna Newsgroups: gmane.emacs.gnus.general Subject: Re: mail split with multiple backends Date: 23 Oct 2000 11:46:48 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035169140 22559 80.91.224.250 (21 Oct 2002 02:59:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:59:00 +0000 (UTC) Cc: joules@writeme.com, ding@gnus.org Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id C354AD051F for ; Mon, 23 Oct 2000 05:47:58 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id EAB29011; Mon, 23 Oct 2000 04:44:18 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 23 Oct 2000 04:43:38 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id EAA14992 for ; Mon, 23 Oct 2000 04:43:20 -0500 (CDT) Original-Received: from hermes.epita.fr (unknown [194.98.116.10]) by mailhost.sclp.com (Postfix) with ESMTP id 1E9CAD051F for ; Mon, 23 Oct 2000 05:43:45 -0400 (EDT) Original-Received: from goa.lrde.epita.fr (mail@goa.lrde.epita.fr [10.223.13.2]) by hermes.epita.fr id LAA02183 Mon, 23 Oct 2000 11:44:11 GMT Original-Received: from debian.lrde.epita.fr ([10.223.13.53] helo=uzeb.lrde.epita.fr) by goa.lrde.epita.fr with esmtp (Exim 3.12 #1 (Debian)) id 13ngBv-0004JY-00; Mon, 23 Oct 2000 11:54:59 +0000 Original-Received: from didier by uzeb.lrde.epita.fr with local (Exim 3.16 #1 (Debian)) id 13neBs-0000IZ-00; Mon, 23 Oct 2000 11:46:48 +0200 Original-To: Kai.Grossjohann@cs.uni-dortmund.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) X-Attribution: drv X-Url: http://www.infres.enst.fr/~verna X-Web: http://www.infres.enst.fr/~verna X-Home-Page: http://www.infres.enst.fr/~verna In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "20 Oct 2000 23:16:38 +0200" X-Face: |j}\)O|k##MrRz#VK$Jy=0r=3Qc,,a/Tr6*JQbE73dy17]2YcmW$9Z&H21e}#~#pgc>dn(is5Bv1l!{1re+Q9suKIOUmOqZs2>QMxHlR;;}kaGYA@HR3D C6 X-Face: 6o|eiKqaHN.ANh8HXDzntcWUOCg\]RsOd.ctvm~*y}Y^R&*a+Co,\s#=HWsw3x$b_n2kJ#g (7u?J^@^xP)f,jUF|0Z'J:|G/bMA5O12*b,7`-Q`=pKsCRIpso07.Y>YB2H{7`?u&yh;C_ZtLHfj There are a number of ways to do it. One possibility is this: suppose > you have nnml and nnfolder backends. Then you set up > nnmail-split-methods for nnml and include a rule which puts all > nnfolder messages into a special group; nnml:nnfolder, say. >=20 > Then you enter that group, `M P a' to process-mark all articles, > temporarily change nnmail-split-methods to a value which is good for > nnfolder, then `B r' to resplit the messages using the new > nnmail-split-methods. Specify nnfolder as the backend to use. >=20 > The second alternative is to have some program outside of Gnus which > splits the mail (such as procmail). Then you set mail-sources such > that it only picks up the nnml part, get new mail, then set > mail-sources such that it only picks up the nnfolder part, and get new > mail again. You also have to arrange that the first time you get new > mail, the nnml backend gets it, and the second time you do it, the > nnfolder backend gets it. There's a thrid possibility that I use in a backend I wrote (I'll t= ell you what it is soon on this list, as it might be of some interest): the idea is that you tell *both* backends to retreive mail, but in one of them, you override the mail-source and split-methods variable. So you can do this for instance: - As in Kai's second option, you split your mails in two different "source" files (with procmail for instance) - You set *both* -get-new-mail variables to t - You define the variables nnml-mail-sources and nnml-split-methods (if you decide that nnml is the secondary backend - And finally, you rewrite the nnml functions that get mails, in order to w= rap their code in a 'let statement that will allow you to temporarily assign different values to mail-sources and split-methods. For instance, all calls to nnmail-get-new-mail should be wrapped in something like: (let ((mail-sources nnml-mail-sources) (nnml-split-methods nnml-split-methods)) (nnml-get-new-mail 'nnml nil nnml-directory group))) This method is very nice because all you have to do is type 'g' in order to get mails from/for multiple mail backends at once, each one with its own mail-sources and split-methods. There is one drawback however: you can't use the respooling facilities across different backends. --=20 / / _ _ Didier Verna http://www.inf.enst.fr/~verna/ - / / - / / /_/ / EPITA / LRDE mailto:didier@lrde.epita.fr /_/ / /_/ / /__ / 14-16 rue Voltaire Tel. +33 (1) 53 14 59 47 94276 Kremlin-Bic=EAtre cedex Fax. +33 (1) 44 08 01 99