procmail
[Top] [All Lists]

Re: Header Macros

1997-03-28 14:34:42
Michael Ghens <michael(_at_)spconnect(_dot_)com> writes:
Been seeing

TO_
FROM_

Been trying to look them up in the man pages, but have not found them.
Could someone explain what they are??

Take a look at the MISCELLANEOUS section of the procmailrc(5) manpage.
The actual tokens are "^TO", "^TO_", "^FROM_MAILER", and
"^FROM_DAEMON".  "^TO_" was introduced in procmail version 3.11pre4, so
your procmail (and procmailrc(5) manpage) might not have it.  These
tokens are expanded internally by procmail into certain large regular
expressions that provide a shorthand for certain commmon operations.
"^TO" matches destination headers (e.g., To:) that contain the
following _word_ (i.e., "^TOfoo" matches "To: baz, foo, quux" and "To:
bar-foo"), while "^TO_" matches destinations headers that contain the
following _address_ (i.e., "^TO_baz" matches "To: foo, baz, quux" but
*not* "To: foo-baz").  "^FROM_DAEMON" and "^FROM_MAILER" match messages
from daemons and mailer-daemons respectively.  Note that some mailing
lists may send out messages that match one or both of these.


Philip Guenther