Durga Prasad Malyala: > On Mon, 25 Jul 2022 at 00:41, Wietse Venema <wie...@porcupine.org> wrote: > > > > Durga Prasad Malyala: > > > Hello all, > > > I am using https://gitlab.com/openstrike/ratelimit-policyd to do > > > ratelimting of high volume senders. The software is good but I want to > > > ratelimit/quota sending only to external domains whereas mails to same > > > domain need to be unlimited/unrestricted. > > > When receiving the mail the software gets recipient attribute/value - > > > only if there is single recipient. If there is more than one recipient > > > > You will have to move your check_policy_service call to the > > smtpd_recipient_restrictions. Then, Postfix will send one recipient > > per RCPT TO command. > > > > Postfix canot send multiple recipients per policy query. > > Thank you Wietse. > Does it go below or above permit_sasl_authenticated ?
permit_sasl_authenticated terminates the test, so check_policy_service should be earlier. As noted by Viktor you can accumulate recipients with smtpd_recipient_restructions (reply with DUNNO) and make the policy decision in smtpd_data_restrictions (reply with DUNNO, REJECT, etc., as appropriate). Wietse