procmail
[Top] [All Lists]

Re: Rule for matching mails from my organization

2002-02-20 08:02:50
On Wed, 20 Feb 2002, Kevin Ring wrote:

[...]
I'm trying to set up a rule that will match e-mails that come from my
organization and deliver them without any further processing. any mail that
matches this rule should be sent straight to /var/spool/mail/$USER without
being touched by the other rules that I have set up.

from reading the procmail FAQ at
http://www.ling.helsinki.fi/users/reriksso/procmail/mini-faq.html I'm pretty
sure that

FROM="^(From[         ]|(Old-|X-)?(Resent-)?(From|Reply-To|Sender):)(.*\<)?"

      :0
      * $ ${FROM}.*aeroglide\.com


would match any e-mails coming from aeroglide.com (my domain), but I'm not
sure what the next line should be to deposit it in the right folder and then
stop processing the message (if any further processing would take place
after this action anyway).


        Try this:

:0
{
F=`formail -rtx To:`
        :0
        * $ ! F ?? ()\/aeroglide\.com
        NOT_HERE
}


        () The "formail -rt" catchs the ``return address'' instead of the
           "From", it is short and more accurate.
        () I do not like to use variables with names like "FROM", "TO"
           or "SUBJECT".. but, it is a personal bug.
        () If $F doesn't match "aeroglide\.com" the message will be sent
           to the folder NOT_HERE, the default is what you want.

Bye,
 Udi

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail