procmail
[Top] [All Lists]

Re: Using procmail for filtering outbound mails

2005-02-24 09:48:26
At 21:25 2005-02-23 -0800, ads nat did say:
Hi,
I am using procmail on Redhat 9 with sendmail for
filtering incoming emails to mail server. It is
working fine.
My requirement is to filter out going email from
particular LAN user to particular outside email id.
Procmail docs says procmail is only for filtering
incoming emails to mail server. I feel emails from LAN
users are also incoming to sendmail therefore procmail
can be used.

It may be 'incoming' to sendmail, but is is still not for _local_ delivery.

If the destination address was a local address, then sendmail could easily be configured to invoke procmail (either via an alias, or via a user ~/.procmailrc file). For a remote delivery, sendmail never invokes an LDA.

This generally holds true for any MTA, though my personal experiences with other MTAs is a bit limited.

If you're _really_ dedicated, it is possible to invoke procmail on messages being SENT by the server (such as to add one of those obnoxious disclaimer footers), but that involves complicated hacking of the sendmail.cf file, and is way beyond the scope of this list. Try the comp.mail.sendmail newsgroup.

I have a set of old filter mods for sendmail at my site, but they're for an older distribution of sendmail, and with the split MTA/MSA personalities of sendmail now, I rather doubt they'd function as expected. You might want to read up on it anyway. Note that invoking procmail from within sendmail during SMTP processing can introduce an unnecessarily harsh processor load.

Producing a sendmail 'milter' may be a more appropriate method, either to do the filtering directly, or to selectively invoke procmail for a specific sender.

---
 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>