[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The nnmail-split-methods
variable says how the incoming mail is
to be split into groups.
(setq nnmail-split-methods '(("mail.junk" "^From:.*Lars Ingebrigtsen") ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby") ("mail.other" ""))) |
This variable is a list of lists, where the first element of each of
these lists is the name of the mail group (they do not have to be called
something beginning with `mail', by the way), and the second
element is a regular expression used on the header of each mail to
determine if it belongs in this mail group. The first string may
contain `\\1' forms, like the ones used by replace-match
to
insert sub-expressions from the matched text. For instance:
("list.\\1" "From:.* \\(.*\\)-list@majordomo.com") |
The second element can also be a function. In that case, it will be
called narrowed to the headers with the first element of the rule as the
argument. It should return a non-nil
value if it thinks that the
mail belongs in that group.
The last of these groups should always be a general one, and the regular expression should always be `*' so that it matches any mails that haven't been matched by any of the other regexps. (These rules are processed from the beginning of the alist toward the end. The first rule to make a match will "win", unless you have crossposting enabled. In that case, all matching rules will "win".)
If you like to tinker with this yourself, you can set this variable to a function of your choice. This function will be called without any arguments in a buffer narrowed to the headers of an incoming mail message. The function should return a list of group names that it thinks should carry this mail message.
Note that the mail back ends are free to maul the poor, innocent,
incoming headers all they want to. They all add Lines
headers;
some add X-Gnus-Group
headers; most rename the Unix mbox
From<SPACE>
line to something else.
The mail back ends all support cross-posting. If several regexps match,
the mail will be "cross-posted" to all those groups.
nnmail-crosspost
says whether to use this mechanism or not. Note
that no articles are crossposted to the general (`*') group.
nnmh
and nnml
makes crossposts by creating hard links to
the crossposted articles. However, not all file systems support hard
links. If that's the case for you, set
nnmail-crosspost-link-function
to copy-file
. (This
variable is add-name-to-file
by default.)
If you wish to see where the previous mail split put the messages, you
can use the M-x nnmail-split-history command. If you wish to see
where re-spooling messages would put the messages, you can use
gnus-summary-respool-trace
and related commands (see section 3.25 Mail Group Commands).
Header lines longer than the value of
nnmail-split-header-length-limit
are excluded from the split
function.
By default the splitting codes MIME decodes headers so you
can match on non-ASCII strings. The
nnmail-mail-splitting-charset
variable specifies the default
charset for decoding. The behaviour can be turned off completely by
binding nnmail-mail-splitting-decodes
to nil
, which is
useful if you want to match articles based on the raw header data.
By default, splitting is performed on all incoming messages. If you
specify a directory
entry for the variable mail-sources
(see section 6.3.4.1 Mail Source Specifiers), however, then splitting does
not happen by default. You can set the variable
nnmail-resplit-incoming
to a non-nil
value to make
splitting happen even in this case. (This variable has no effect on
other kinds of entries.)
Gnus gives you all the opportunity you could possibly want for shooting yourself in the foot. Let's say you create a group that will contain all the mail you get from your boss. And then you accidentally unsubscribe from the group. Gnus will still put all the mail from your boss in the unsubscribed group, and so, when your boss mails you "Have that report ready by Monday or you're fired!", you'll never see it and, come Tuesday, you'll still believe that you're gainfully employed while you really should be out collecting empty bottles to save up for next month's rent money.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |