rmail-automatic-folder-directives
rmail-automatic-folder-directives is a variable defined in `
rmail.el
'.
Its value is
nil
Documentation:
List of directives specifying how to automatically file messages.
Whenever Rmail shows a message in the folder that `rmail-file-name'
specifies, it calls `rmail-auto-file' to maybe file the message in
another folder according to this list. Messages that are already
marked as `filed', or are in different folders, are left alone.
Each element of the list is of the form:
(FOLDERNAME FIELD REGEXP [ FIELD REGEXP ] ... )
FOLDERNAME is the name of a folder in which to put the message.
If FOLDERNAME is nil then Rmail deletes the message, and moves on to
the next. If FOLDERNAME is "/dev/null", Rmail deletes the message,
but does not move to the next.
FIELD is the name of a header field in the message, such as
"subject" or "from". A FIELD of "to" includes all text
from both the "to" and "cc" headers.
REGEXP is a regular expression to match (case-sensitively) against
the preceding specified FIELD.
There may be any number of FIELD/REGEXP pairs.
All pairs must match for a directive to apply to a message.
For a given message, Rmail applies only the first matching directive.
Examples:
("/dev/null" "from" "@spam.com") ; delete all mail from spam.com
("RMS" "from" "rms@") ; save all mail from RMS.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 21.1 of Emacs.