Skip to content

Several messages in one connection: Adding manipulations after End of Message callback is not allowed #21

Description

@atatarn

Here I'm sending several messages in one single connection to Postfix.
Despite warning saying that AppendHeader was ignored for 2 and 3 message, all 3 of them had the header set.
But at the same time, if using dynamic/different-per-message header value - "new" values will be indeed ignored and all messages will receive only the first value of the header.

Could anything be done to fix that behaviour?

INFO:purepythonmilter.server.milterserver:Purepythonmilter version 0.0.1 starting...
INFO:purepythonmilter.server.milterserver:Server started, awaiting connections on 0.0.0.0:9000...

INFO:debug_log_all:566f5380: On connect: args=ConnectionInfoArgsIPv4(hostname='[172.21.0.1]', addr=IPv4Address('172.21.0.1'), port=45616), macros={'j': 'relay.localhost', '{daemon_name}': 'relay.localhost', '{daemon_addr}': '172.21.0.2', 'v': 'Postfix 3.7.11', '_': 'unknown [172.21.0.1]'}
INFO:debug_log_all:566f5380: On MAIL FROM: address=no-reply@first.local, esmtp_args={'size': '585'}, macros={'{auth_type}': 'CRAM-MD5', '{auth_authen}': 'first@relay', '{mail_addr}': 'no-reply@first.local', '{mail_host}': 'first.local', '{mail_mailer}': 'smtp'}
INFO:debug_log_all:566f5380: On RCPT TO: address=sandra34@example.org, esmtp_args={}, macros={'{rcpt_addr}': 'sandra34@example.org', '{rcpt_host}': 'example.org', '{rcpt_mailer}': 'smtp'}
INFO:debug_log_all:566f5380: On end of message: macros={'i': 'BFC21E0FD9'}

INFO:debug_log_all:566f5380: On MAIL FROM: address=no-reply@first.local, esmtp_args={'size': '594'}, macros={'{auth_type}': 'CRAM-MD5', '{auth_authen}': 'first@relay', '{mail_addr}': 'no-reply@first.local', '{mail_host}': 'first.local', '{mail_mailer}': 'smtp'}
INFO:debug_log_all:566f5380: On RCPT TO: address=michellefriedman@example.com, esmtp_args={}, macros={'{rcpt_addr}': 'michellefriedman@example.com', '{rcpt_host}': 'example.com', '{rcpt_mailer}': 'smtp'}
INFO:debug_log_all:566f5380: On end of message: macros={'i': 'CEE43E0FE1'}

WARNING:purepythonmilter.server.session:566f5380: Adding manipulations after End of Message callback is not allowed; ignoring: [AppendHeader(headername='X-Fooo', headertext='BAR')].

INFO:debug_log_all:566f5380: On MAIL FROM: address=no-reply@first.local, esmtp_args={'size': '601'}, macros={'{auth_type}': 'CRAM-MD5', '{auth_authen}': 'first@relay', '{mail_addr}': 'no-reply@first.local', '{mail_host}': 'first.local', '{mail_mailer}': 'smtp'}
INFO:debug_log_all:566f5380: On RCPT TO: address=victoriaday@example.org, esmtp_args={}, macros={'{rcpt_addr}': 'victoriaday@example.org', '{rcpt_host}': 'example.org', '{rcpt_mailer}': 'smtp'}
INFO:debug_log_all:566f5380: On end of message: macros={'i': 'DC15FE1084'}

WARNING:purepythonmilter.server.session:566f5380: Adding manipulations after End of Message callback is not allowed; ignoring: [AppendHeader(headername='X-Fooo', headertext='BAR')].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions