"The "recipient" attribute is available in the "RCPT TO" stage. It is
also available in the "DATA" and "END-OF-MESSAGE" stages if Postfix
accepted only one recipient for the current message."

You can use the instance attribute to collect the list of recipients at RCPT TO stage. That information can be used within a 2nd call of the policy service at data or end_of_data stage. Means:

 - if stage==rcptto then collect recipients{instance}

- if stage==data then process recipients{instance}

Or what the limitations are.

Note that you can not return different results for different recipients at data or end_of_data stage. You can only pass or reject the whole mail at all.

Reply via email to