Hello, I'm trying reject messages for recipients which are over quota or will be over quota when the current message would be accepted and delivered. That works fine as long as there is only one recipient.
Now I have the following idea: smtpd_recipient_restrictions = … reject_unauth_destination check_policy_service inet:127.0.0.1:12345 smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:12345 In the "RCPT TO" stage the policy_service will create a list with all recipients of the current message. Then in the "END-OF-MESSAGE" stage the policy_service will return: if recipient_count == 1 && recipient_has_quota_reached: action=552 5.2.2 Quota exceeded (mailbox for recipient is full) if recipient_count > 1 && any_recipient_has_quota_reached: (do not deliver to recipients which are still under quota) action=552 5.2.2 Quota … (mailbox for one or recipients is full) else: action=dunno Would this be correct? Are there any other/better (recommended) procedures? Regards, Pascal -- The trapper recommends today: cafefeed.1106...@localdomain.org