procmail
[Top] [All Lists]

Re: need to sort mail by string found in address

2000-01-16 20:11:06
"it'sme" <hostmaster(_at_)dsp(_dot_)net> writes:
mail processing trouble
i'm using redhat Linux 6.0.
having trouble processing incoming mail.
I know how to auto forward incoming mail, that's simple enough.
But I don't know how to do this:
all incoming mail that contains the string "fax=" in header,
should autoforward to "x" mailbox/spool.

Seems pretty easy to me:

        :0
        * fax=
        x

"If any header field, ignoring case, matches the string 'fax=', the save the
 message in the mailbox/file x"

If "x" is an e-mail address, then change that to

        :0
        * fax=
        ! x

If you want to match only those messages for which "fax=" occurs in a
particular header or set of headers, you'll need to change the condition:

        :0
        * ^Subject:.*fax=
        x

For more examples, please read the procmailex(5) manpage.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>