> Well, this is not a "real" summary. No one replied back
> with any comments on the topic. I was hoping someone
> out there has implemented this thru rule 0 with clever
> tricks around the normal rewriting.
> Given that one can not specify 2 deliveries with sendmail.
> We will define and write a custom mailer that will
> log the email and call sendmail again to deliver it
> normally. However, to prevent an email loop we will
> need to have another sendmail.cf without the auditing
> logic to send out email normally.
A few people replied back to my summary, suggesting procmail.
Procmail would be fine, if the user's mailbox is local. Otherwise
it still needs sendmail to resend email out to user's real
mailbox. Also rule 0 customization is still needed, if you
wanted filter email originated internally from this set
Frank Smith <firstname.lastname@example.org> suggested I queue
the mail only and use cron to filter the mqueue files. Then
preriodically process the queue. This would not filter the
emails came in between the times of filtering and processing
the mqueue files. So the proper way is to use two spool dirs.
Start sendmail in queue only mode, "/usr/lib/sendmail -odq -bd"
A crontab that moves /var/spool/incoming to /var/spool/outgoing
and logs wanted emails. Then periodicaly call "/usr/lib/sendmail
-oQ/var/spool/outgoing -q" to flush outgoing queue.
This requires no tweaking of sendmail rules, which is a big
plus. Due to inter-departmental politics, this can not be
implemented, because of delay introduced by the 2-stage spooling.
This is much more easier to maintain in my opinion.
> Haohui Wang
> Law Journal EXTRA! http://www.ljextra.com
> email@example.com firstname.lastname@example.org
> UNIX, the hackers' pornography -- Donald A. Norman
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: 2.6.2
> -----END PGP PUBLIC KEY BLOCK-----
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:48 CDT