albertito / chasquid

SMTP (email) server with a focus on simplicity, security, and ease of operation [mirror]
https://blitiri.com.ar/p/chasquid/
Other
866 stars 56 forks source link

FR: add pre-DATA (post-RCPT-TO) hooks #53

Open mikhirev opened 5 months ago

mikhirev commented 5 months ago

Receiving DATA is not necessary for some checks such as greylisting or DNSBL lookup. Please consider adding pre-DATA hooks to avoid wasting traffic for messages that will be discarded anyway.

albertito commented 5 months ago

Hi! Thanks for filing this!

It's a very reasonable request, and you're completely right that doing the checks post-DATA wastes the DATA traffic.

However, for chasquid's main use cases (low to medium volume of mails per day), that overhead should be negligible.

And having fewer hook points makes the code simpler, easier to maintain, and harder for bugs to sneak in (both in chasquid's code, and in the hooks themselves).

For those reasons, I'm inclined not to implement this for now.

I don't rule out implementing in the future, though, maybe if more reasons in favour of doing it pile up.

But please let me know if you think there's some information I'm missing, or something else I might not be considering!

Thank you!