> I see that there are smtp_header_checks that must run during the smtp
> sending phase, would it be worth adding smtpd_header_checks (with some
> restrictions likes the smtp_* ones) that run in smtpd during the message
> reading phase?

Having a look at the code, this appears annoying. It appears to need a
mime_state, which isn't present in smtpd currently at all.

> Alternatively, would it be possible to add a "run_cleanup" action that
> could be put in smtpd_end_of_data_restrictions to explicitly run cleanup
> and wait for the response? So you could have:

This also appears to be annoying, the call to cleanup is implicit in the
data_cmd handler code.

> Alternatively, I guess you could add something like a
> smtpd_end_of_session_restrictions that runs after the cleanup commit is
> complete?

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?

-- 
Rob Mueller
r...@fastmail.fm

Reply via email to