Summary 2: Sendmail rule 0 -- 2 deliveries

From: Haohui Wang (haohui@ljextra.com)
Date: Thu Sep 03 1998 - 14:47:14 CDT


> 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
of users.

Frank Smith <franks@tradeonemktg-aus.com> 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
> haohui@ljx.com haohui@zosma.com
> UNIX, the hackers' pornography -- Donald A. Norman
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: 2.6.2
>
> mQCNAzU7anoAAAEEAK6A7OFSkB0P8nsKvI45VzWs7VVIRwirjcpt43p10+ZPHgUV
> nP+yzuSdCI7mSC32XsVfBCXXnAAXlKc1Gr3/Wa/5GNibUgWd3x79jEyyURTS8acm
> 6s1t8EbXigIrEzaMm7BFCBSH4gJTNyPoLyjts0h/1hHDOv6LxMDZuqAtfBZFAAUR
> tA5oYW9odWlAbGp4LmNvbQ==
> =wZb5
> -----END PGP PUBLIC KEY BLOCK-----
>



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:48 CDT