Gnus development mailing list
 help / color / mirror / Atom feed
From: Didier Verna <didier@lrde.epita.fr>
Cc: joules@writeme.com, ding@gnus.org
Subject: Re: mail split with multiple backends
Date: 23 Oct 2000 11:46:48 +0200	[thread overview]
Message-ID: <muxbswb3n5j.fsf@uzeb.lrde.epita.fr> (raw)
In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "20 Oct 2000 23:16:38 +0200"

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:

> 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.
> 
> 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.
> 
> 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 tell
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* <backend>-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 wrap
  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.

-- 
    /     /   _   _       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être cedex   Fax. +33 (1) 44 08 01 99



  parent reply	other threads:[~2000-10-23  9:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-20 19:38 joules
2000-10-20 21:16 ` Kai Großjohann
2000-10-20 21:41   ` Rob Browning
2000-10-21  0:51     ` Harry Putnam
2000-10-21  4:45       ` Rob Browning
2000-10-21 11:09         ` Harry Putnam
2000-10-21 14:58           ` Rob Browning
2000-10-21 16:39         ` Kai Großjohann
2000-10-21 17:27           ` Rob Browning
2000-10-21 18:18             ` Kai Großjohann
2000-10-23  9:46   ` Didier Verna [this message]
2000-10-23 10:54     ` Kai Großjohann
2000-10-23 12:03       ` Didier Verna
2000-10-23 12:25         ` Kai Großjohann
2000-10-26 17:34           ` Toby Speight
2000-10-26 21:19             ` Kai Großjohann
2000-10-26 21:57               ` Simon Josefsson
2000-10-21  1:01 ` Harry Putnam

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=muxbswb3n5j.fsf@uzeb.lrde.epita.fr \
    --to=didier@lrde.epita.fr \
    --cc=ding@gnus.org \
    --cc=joules@writeme.com \
    /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).