Session cannot handle multiple transactions
duobradovic opened this issue · 1 comments
duobradovic commented
Smtp supports multiple transactions per single connection, consider following example:
C: helo
C: mail from
C: rcpt to
C: data
C: rset
C: mail from
...
Purepythonmilter does not reset session state after end-of-data. After 'Continue' response to End of Data Postfix sends SMFIC_ABORT, this is meant to signal milter to reset session to a clean state.
SMFIC_ABORT is also sent after Smtp transaction RSET:
C: helo
C: mail from
C: rcpt to
C: rset
C: mail from
...
Since the milters' session is not reset, any existing session header 'manipulations' remains.
duobradovic commented
'MtaMilterSession' should at the very least reset, '_pending_manipulations' and '_manipulations_sent'.