On 06-05-2025 18:58, Mike Teplynin via Postfix-users wrote:
After my previous question about mail archiving, I tried to write a
milter that will save copies of emails in a way convenient for me.
And now my question is about how Postfix sends headers and message
body to milter. Everything that is sent after the DATA command is
buffer somewhere and passed to milter only after <CRLF>.<CRLF>?

Maybe I'm doing something wrong, or using a bad language/library
(python/pymilter), but in my application I can work with headers and
body only after <CRLF>.<CRLF>, while I can process information about
connect/helo/mail_from/rcpt_tо immediately.

For example, if connection is interrupted during the message transfer,
I can save info about helo, the sender and recipient addresses, but
not the part of the message that the client managed to send (because
the milter did not receive it?)


In the past, I've used the test tools (milter-test-server, milter-test-client) from https://github.com/milter-manager/milter-manager with some success to mimic weird behaviors in mail transactions while developing milters. I also developed using pymilter. It might be of use to you too?

Kind regards,
Tom
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to