I'm running postfix 2.11.3 under Debian.
I have installed a homegrown milter which runs in conjunction with CONNECTION, HELO, MAIL FROM, RCPT TO, HEADERS, and EOM, and it's been working well for years. It uses the standard milter API.
When the sender specifies a syntactically incorrect address, I see errors like the following coming from postfix (where xxx.xxx.xxx.xxx represents the IP address of the sender):
postfix/smtpd[29109]: warning: Illegal address syntax from example.com[xxx.xxx.xxx.xxx] in MAIL command: <unparseable-item@example.com>
postfix/smtpd[29109]: disconnect from example.com[xxx.xxx.xxx.xxx]
At this point, postfix terminates the connection, but I'm wondering whether there might be a way for the milter to know about this warning and respond to it.
Can the connection be maintained after such an error, perhaps? If so, I could then have the milter trigger the disconnection after processing the error.
Thank you in advance for any ideas and suggestions.