procmail
[Top] [All Lists]

Re: FROM_MAILER Problems I think

1999-03-13 02:37:57
On Fri, 12 Mar 1999 10:50:00 -0800, "Gerald E. Boyd"
<gboyd(_at_)netcom(_dot_)com> wrote:
Is their someway I can change the recipes such that the FROM_MAILER
doesn't pickup on UUCP addresses? How do I let the Saudi Arabian
<...>
I gather the UUCP addresses and "root" are being picked up because If
the regular expression contains `^FROM_MAILER' it will be
substituted by `(^(((Resent-)?(From|Sender)|X-Envelope-From):
|>?From )([^>]*[^((_dot_)%(_at_)a-z0-9])?(Post(ma(st(er)?|n)|office)
|(send)?Mail(er)?|daemon|mmdf|n?uucp|r(esponse|oot)
[snip] -------------------------------------->
I sure would hate to rewrite the FROM_MAILER syntax...

You only have to do it once to get it to behave the way you want. If
you really like what you come up with, submit it as a patch :-)

For simple cases, it should be enough to just list the exceptions:

    :0
    * ^FROM_MAILER
    * ! ^From:(.*\<)?(root|uucp)@
    ... your action here

If you decide you'd rather use your own tweaked variant of
^FROM_MAILER, a pretty good explanation of 3.11pre7's ^FROM_MAILER
regular expression was posted to this list by Eli the Bearded around
the time 3.11pre7 was released. (I don't think it has changed in 3.12
but I'm on a slow PPP connection and/or too lazy to find out, or to
locate an exact pointer to Eli's message.)

I would almost consider it a bug that it will pick up
foo!bar!uucp(_at_)domain as a "mailer" address. (Comments?)

On the other hand, if you have people regularly sending mail from
their root accounts (in which case you should properly respond with
"log out now, moron" but I digress) you should probably be rolling
your own regex anyway. The assumption that mail from root is of a
"mailer" nature (Buddhism, anyone? :-) is IMHO not something you want
to remove, generally.

/* era */

And that old (.*\<)? approximation is probably not good enough here,
in the "simple case" recipe above. Any nice standard tweaks?

-- 
.obBotBait: It shouldn't even matter whether    <http://www.iki.fi/~era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>

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