procmail
[Top] [All Lists]

Re: Issues with formail autoresponder and Sendmail 8.12.2..

2002-02-12 21:47:28
Howard Leadmon <howardl(_at_)abs(_dot_)net> writes:
For quite some time I have used procmail/formail to respond to incoming
mail to like abuse(_at_)abs(_dot_)net or noc(_at_)abs(_dot_)net and it worked 
wonderful.  Well
I just realized the other day that it's no longer responding to mail
with the autoresponse since updating from sendmail 8.11 to the 8.12
release, or that seems the only real change I made that I think would
affect it.  I am running the current procmail (3.22), and the current
sendmail (8.12.2) using the smmsp security/user for sendmail.
...
:0 c
* ^TO(_dot_)*abuse(_at_)*abs(_dot_)net
* !^X-Loop: abuse(_at_)abs(_dot_)net
| ( /usr/local/bin/formail -r -k \
-A"X-Loop: abuse(_at_)abs(_dot_)net" ; \
/bin/cat /home/noc/abuse.txt ) | $SENDMAIL -t

Don't put .* right after ^TO or ^TO_, they both include the wildcarding
you need.  On a related note, something seems wrong with the "@*abs.net"
part of that regexp: why would you want to match zero-or-more '@'s there?
I suspect you're trying to match optional host components, such that,
for example
        To: abuse(_at_)foo(_dot_)abs(_dot_)net
would be matched.  In that case you should use something like
        @([-a-z0-9]+\.)*abs\.net

It's generally considered a Bad Idea to use full paths to invoke normal
programs like formail or cat.  That's what PATH is for.  sendmail itself
is an exception because it has historically been installed in locations
not in the normal search path, such as /usr/lib.

Putting it together:
        :0 c
        * ^TO_abuse@([-a-z0-9]+\.)*abs.net
        * !^X-Loop: abuse(_at_)abs(_dot_)net
        | ( formail -r -k -A"X-Loop: abuse(_at_)abs(_dot_)net" ; \
            cat /home/noc/abuse.txt ) | $SENDMAIL -t

None of the above should be causing your particular problem, but they
may cause others in the future.

As for the primary problem, is /usr/sbin/sendmail the new sendmail binary?

Does putting SHELL=/bin/sh at the top of the rcfile help?  (If so,
you changed more than sendmail since it last worked...)


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

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