On Mon, Nov 09, 2015 at 03:09:39PM +1100, Robert Mueller wrote: > > Alternatively, I guess you could add something like a > > smtpd_end_of_session_restrictions that runs after the cleanup commit is > > complete?
At that point is already either queued or rejected by cleanup. So such a "callback" can only do bookeeping, it cannot accept, reject or modify the message. Not sure whether it would be sufficiently broadly useful to warrant inclusion in official Postfix release. > This actually seems the easiest. Having a new smtpd_check_eoc > (end-of-cleanup) that's run after mail_stream_finish() in data_cmd > should be fairly straight forward I think. > > Out of curiosity, would a patch like that be accepted upstream at all? > Or would you just say "use a milter" still? You'd certainly not be fighting the system if you used a milter. Just don't combine milter processing with "milter_header_checks" that reject messages. -- Viktor.