procmail
[Top] [All Lists]

Re: Suggest FROM_MAILER "r(esponse|oot)" changed to "response"

1996-09-03 09:07:59
    > May I suggest to change the "r(esponse|oot)" part into plain
    > "response", to avoid getting mail from people mailing from root
    > accounts sorted into the postmaster folder?

If you wish to avoid having "root" mail in your "postmaster" folder,
just change your recipe.  Don't change procmail!    It is very easy to
change your recipe from:

    :0
    * ^FROM_MAILER
    postmaster

to 
    :0
    * ^FROM_MAILER
    * !^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From 
)([^>]*[^((_dot_)%(_at_)a-z0-9])?root
    postmaster

If you don't like the ugly regexp, make it variable:

    FROM="^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From 
)([^>]*[^((_dot_)%(_at_)a-z0-9])?"

and use it instead:

    :0
    * ^FROM_MAILER
    * $!$FROM(root)
    postmaster

If you find that you used "$FROM" frequently enough, you'll put it, and
others like it, into a handy library file, like "headers.rc".   It just
so happens that I've already done this, and this file is part of my
procmail library.  To get it, send me an e-mail with the subject of
"send procmail library", or browse my home page.

    > Please explain, if anyone has a different opinion, why I'm wrong!

root is one of the many addresses used by logins which perform
system-wide mail handling.  It is entirely appropriate that "root" be
part of "FROM_MAILER".

_____________________________________________________________________
Alan Stebbens <stebbens(_at_)sgi(_dot_)com>      http://reality.sgi.com/stebbens

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