procmail
[Top] [All Lists]

Re: local procmail filtering before using sendmail smarthost

2004-07-14 10:42:08
At 11:15 2004-07-14 -0500, Todd Jamison wrote:
I am currently facing the following dilemma:

Your problem relates to your MTA, not to procmail. A suitable place to look for sendmail assistance is on usenet: comp.mail.sendmail

I currently have Sendmail configured to relay all mail from the Linux
server in question to our main Linux mail server. This was just fine
until yesterday. Now, I need to have one account that autoreplies (via
procmail), and then relay all other email to the main server.

Uhm, one must wonder why you can't simply autoreply from the main (endpoint) server?

I am not sure how to do this.

You need to rewrite that individual recipient within sendmail, so that it becomes a LOCAL address not subject to the relay.

It looks like Sendmail is bypassing Procmail for all email delivery.

As it should - it's relaying mail for AN ENTIRE DOMAIN.  Addresses

The /etc/procmail.rc file is as follows:

:0 HBc
* ^TO.*test-account.*
|/usr/bin/perl /tmp/test-reply.pl

My question is, how do I configure Procmail to match the test account
recipe above, and then relay all other messages to the main email
server? Has anyone ever done this before?

You *REALLY* don't want to try to ALL your messages through to procmail as if they were local deliveries and then have procmail redeliver the ones it isn't supposed to autoreply to.

There is a procmail mantra.  Please recite it with me:

        PROCMAIL IS NOT AN MTA.

You will encounter an unbelieveable number of problems trying to repurpose procmail as an MTA. You will experience unnatural hair loss and a high blood pressure. Your medical insurance carrier will try to deny your coverage, citing that you didn't disclose that you tried to use procmail as an MTA.


I'd consider using the "genericstable" feature of sendmail. This way, you could rewrite the ONE address you want to autoreply for into another hostname (say, an alias on the relay host, rather than the same domain as the endpoint host), and from there a regular alias could invoke procmail:

autoreply:      |/usr/local/bin/procmail -m /etc/procmailrcs/autoreply.rc

(FTR, the rcfile wouldn't really need to check ^TO for a given recipient, since mere invocation would indicate that the message was destined for that user, and no other).

If you have inquiries about genericstable, you should post them to the aforementioned sendmail usenet group, or engage the services of a qualified sendmail administration expert.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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