mailing lists:
[ Charset ISO-8859-1 unsupported, converting... ]
>  On 06/21/2014 06:00 PM, Wietse Venema wrote:
>  > Each recipient can be reported with the Milter RCPT? event handler.
>  > This combined with the queue ID, allows the Milter to? maintain a
>  > counter that can be queried at End-Of-Message time.
>  >
>  > The Milter can also be notified of "abort" events. This? allows it
>  > to can discard a counter when its mail transaction is? aborted.
> 
> Thank you, I would like to avoid Milter and take advantage of the current 
> solution with smtpd policy.
> 
>  > The same is possible with SMTPD policy daemons. Each? Postfix SMTP
>  > daemon maintains a persistent connection to a policy? daemon, and
>  > when the queue ID in the requests over that connection? changes, or
>  > when that connection is closed, the counter can be? discarded.
> 
> I was thinking about logging recipient info in the RCPT phase and
> match it later in the EOM phase, but queue ID attribute seems a
> bad election because for multiple recipient mails queue ID is empty
> in the first smtpd recipient, at least with postfix 2.7.1. you can
> see:

I forgot that for performance reasons Postfix does not open the
mail queue before it has accepted one recipient. Creating files is
expensive, hence the default "smtpd_delay_open_until_valid_rcpt = yes".

The "instance" policy attribute should also be unique.

  * The "instance" attribute value can be used to correlate different requests
    regarding the same message delivery. These requests are sent over the same
    policy connection (unless the policy daemon terminates the connection).
    Once Postfix sends a query with a different instance attribute over that
    same policy connection, the previous message delivery is either completed
    or aborted.

It is a combination of process ID, time, and an in-process counter.

        Wietse

Reply via email to