> Hello !
> I met an issue with milter when multiple messages pushed within single 
> smtp session (using pipelining indeed):
> warning: milter unix:/run/t.socket: unexpected filter response 
> It looks similar for 

This was caused by a bug in Sendmail::PMilter. 

Background: the SMTP protocol supports multiple MAIL transactions
per SMTP connection. After each successful or unsuccessful MAIL
transaction, Postfix sends an SMFIC_ABORT command to all Milters,
to ensure that they are in a knwn state for the next MAIL transaction.

The Sendmail::PMilter code comes with a description of the Milter
protocol that says:

    'A'     SMFIC_ABORT     Abort current filter checks
                            Expected response:  NONE

Yet, when the Sendmail::PMilter receives SMFIC_ABORT, it sends a
response (SMFIR_CONTINUE). Evidence from PMilter logging:

Fri Dec  9 20:14:15 2022 PID=13886 main(eval): got command=[A]
Fri Dec  9 20:14:15 2022 PID=13886 call_hooks: (non-existent 
write =>c<= ><

The command=[A] is SMFIC_ABORT, and the =>c<= response is SMFIR_CONTINUE.

Because of this "extra" response, Postfix and Sendmail::PMilter are
now out of step, and eventually Postfix complains about a protocol error.


Reply via email to