On Mon, 21 May 2007 00:52:10 +0200, Pascal Bourguignon wrote:
> I customized nnmail split as indicated in info for gnu, but it doesn't
> work, no splitting occurs either when I fetch new mail nor when I
> respool the bogus mail group where all mails land eventually...
>
> (custom-set-variables
> '(nnmail-split-fancy
> (quote (| (: nnmail-split-fancy-with-parent)
> ("From:" ".*Cron Daemon.*" "mail.cron")
> (To: "[EMAIL PROTECTED]" "mail.voynich")
> (From: ".*gentoo.*" "mail.gentoo")
> (From: "[EMAIL PROTECTED]" "mail.zenith")
> (To: ".*\\(lisp.it\\|[EMAIL PROTECTED]).*" "mail.lisp")
> (From: ".*\\(@freelance.com\\|@dice.com\\).*" "mail.jobs"))))
> '(nnmail-split-methods (quote nnmail-split-fancy))
> '(gnus-secondary-select-methods (quote ((nnml "")))))
>
> What should I do to have my emails split into the right groups?
Hi Pascal,
As Katsumi Yamaoka-san has written, you have to use either a string in
the first element of each `split', or one of the supported keywords
(extending the keyword list is easy too, but it's not necessary here).
The above split could be written as:
'(| (: nnmail-split-fancy-with-parent)
(from ".*cron daemon.*" "mail.cron")
(to "[EMAIL PROTECTED]" "mail.voynich")
(from ".*gentoo.*" "mail.gentoo")
(from "[EMAIL PROTECTED]" "mail.zenith")
(to ".*\\(lisp.it\\|[EMAIL PROTECTED]).*" "mail.lisp")
(from ".*\\(@freelance.com\\|@dice.com\\).*"
"mail.jobs"))))
The nice thing about keywords is that they match more than one type of
email header:
,----[ Gnus manual. Node: Fancy Mail Splitting ]-----------------------
|
| Predefined entries in `nnmail-split-abbrev-alist' include:
|
| `from'
| Matches the `From', `Sender' and `Resent-From' fields.
|
| `to'
| Matches the `To', `Cc', `Apparently-To', `Resent-To' and
| `Resent-Cc' fields.
|
| `any'
| Is the union of the `from' and `to' entries.
|
`-----------------------------------------------------------------------
The `from' keyword is probably less useful if you only want to split on
the "From:" header, but the `to' keyword is my all times favorite :-)
Cheers,
Giorgos
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english