Postfix v.3.0.0 MILTER_README says:

        Sendmail macro emulation

Postfix emulates a limited number of Sendmail macros, as shown in the table.
        Some macro values depend on whether a recipient is rejected (rejected
recipients are available on request by the Milter application). Different macros are available at different Milter protocol stages (EOH = end-of-header, EOM = end-of-message); their availability is not always the same as in
        Sendmail. See the workarounds section below for solutions.

        
|Sendmail macro |Milter protocol stage |Description | | | | | |i |DATA, EOH, EOM |Queue ID, also Postfix | | | |queue file name | | | | |

And in the "Workarounds" section


The problem is that Milter applications expect that the queue ID is known before the MTA accepts the MAIL FROM (sender) command. Postfix does not choose a queue ID, which is used as the queue file name, until after it
  accepts the first valid RCPT TO (recipient) command.


However:

        # postconf -d milter_rcpt_macros
        milter_rcpt_macros = i {rcpt_addr} {rcpt_host} {rcpt_mailer}


Also, the setting "smtpd_delay_open_until_valid_rcpt = no" assures that the queue ID is known at RCPT time, making it possible for Postfix to provide it to milters as the default setting says it will.

( Complicating matters, the only milter I use, MIMEDefang, seems to have internalized the principle that Postfix will never tell it an ID at RCPT time. Hurrah for implementation-agnostic standard APIs... )

Reply via email to