nnmail-split-fancy

nnmail-split-fancy is a variable defined in `nnmail.el'.
Its value is
"mail.misc"


Documentation:
Incoming mail can be split according to this fancy variable.
To enable this, set `nnmail-split-methods' to `nnmail-split-fancy'.

The format of this variable is SPLIT, where SPLIT can be one of
the following:

GROUP: Mail will be stored in GROUP (a string).

(FIELD VALUE [- RESTRICT [- RESTRICT [...]]] SPLIT): If the message
field FIELD (a regexp) contains VALUE (a regexp), store the messages
as specified by SPLIT. If RESTRICT (a regexp) matches some string
after FIELD and before the end of the matched VALUE, return nil,
otherwise process SPLIT. Multiple RESTRICTs add up, further
restricting the possibility of processing SPLIT.

(| SPLIT...): Process each SPLIT expression until one of them matches.
A SPLIT expression is said to match if it will cause the mail
message to be stored in one or more groups.

(& SPLIT...): Process each SPLIT expression.

(: FUNCTION optional args): Call FUNCTION with the optional args, in
the buffer containing the message headers. The return value FUNCTION
should be a split, which is then recursively processed.

(! FUNCTION SPLIT): Call FUNCTION with the result of SPLIT. The
return value FUNCTION should be a split, which is then recursively
processed.

junk: Mail will be deleted. Use with care! Do not submerge in water!
Example:
(setq nnmail-split-fancy
'(| ("Subject" "MAKE MONEY FAST" junk)
...other.rules.omitted...))

FIELD must match a complete field name. VALUE must match a complete
word according to the `nnmail-split-fancy-syntax-table' syntax table.
You can use ".*" in the regexps to match partial field names or words.

FIELD and VALUE can also be Lisp symbols, in that case they are expanded
as specified in `nnmail-split-abbrev-alist'.

GROUP can contain \& and \N which will substitute from matching
\(\) patterns in the previous VALUE.

Example:

(setq nnmail-split-methods 'nnmail-split-fancy
nnmail-split-fancy
;; Messages from the mailer daemon are not crossposted to any of
;; the ordinary groups. Warnings are put in a separate group
;; from real errors.
'(| ("from" mail (| ("subject" "warn.*" "mail.warning")
"mail.misc"))
;; Non-error messages are crossposted to all relevant
;; groups, but we don't crosspost between the group for the
;; (ding) list and the group for other (ding) related mail.
(& (| (any "ding@ifi\\.uio\\.no" "ding.list")
("subject" "ding" "ding.misc"))
;; Other mailing lists...
(any "procmail@informatik\\.rwth-aachen\\.de" "procmail.list")
(any "SmartList@informatik\\.rwth-aachen\\.de" "SmartList.list")
;; Both lists below have the same suffix, so prevent
;; cross-posting to mkpkg.list of messages posted only to
;; the bugs- list, but allow cross-posting when the
;; message was really cross-posted.
(any "bugs-mypackage@somewhere" "mypkg.bugs")
(any "mypackage@somewhere" - "bugs-mypackage" "mypkg.list")
;;
;; People...
(any "larsi@ifi\\.uio\\.no" "people.Lars Magne Ingebrigtsen"))
;; Unmatched mail goes to the catch all group.
"misc.misc"))

You can customize this variable.