At 18:46 2007-01-25 +0800, DR. Lee - NS1 wrote:
Can Procmail be used to trap the outgoing mail before it is sent?
Generally speaking, only with a lot of MTA hacking.
1) set up sendmail to queueonly mode
What about messages which are submitted from the network? What about
messages which are sent from the local host to another SMTP server?
2) get procmail to examine all outgoing e-mail in queue? How?
You should examine the messages in the queue sometime. If you do, you'll
find that there are TWO files for each message. One is strictly the body
of the message, and the other contains status information plus the headers
(whether locally originated, or relayed, or whatever) in an MTA-specific
format.
You may want to investigate MILTERs, and you might consider filtering when
the message is SUBMITTED, not when it is being sent (modern sendmail
installations have two sendmail daemons - an SMTP one and a local MSA).
I'd recommend that you determine just what it is you want to accomplish by
examining the outbound mail of your users.
Personally, I appreciate that the developers of Sendmail have resisted
attempts to make it easier for outfits to programmatically snoop on the
communications of their users.
---
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