/dev/rob0: > On Tue, Feb 23, 2010 at 01:23:08PM +0100, Borja Marcos wrote: > > I'm enhancing a program I use to follow Postfix logs in sort of > > real-time. It does a couple of things, and the most important is to > > record a single-line summaries for each message, storing source IP > > address, from, to, timestamp, size, final delivery destination > > (mail relay or mailbox) and status. > > You can trivially have smtpd(8) help you substantially. smtpd will > log everything it has regarding a message (everything before final > delivery) with one simple restriction: > smtpd_end_of_data_restrictions = > check_recipient_access static:warn > > End of data was chosen because at that time the actual message size > is known. Recipient access was chosen because it gives a separate > entry per recipient of a multiple-recipient message. Salt to taste, > enjoy.
smtpd_data/end_of_data_restrictions has no information about recipients of multi-recipient mail. Acting on only one recipient would be misleading, because any decision will affect all recipients equally. Acting on all recipients would also require a possibly very large amount of memory, and would also be misleading for the reasons mentioned before. Yes, the documentation could be improved. Wietse