* Michael Alan Dorman <mdor...@ironicdesign.com>: > Ralf Hildebrandt <ralf.hildebra...@charite.de> writes: > > When using a policy daemon in smtpd_data_restrictions: > > > > Is the policy daemon called ONCE for every > > sender - recipient tuple? > > > > My goal is: I want to impose a limit on the number of mails an > > envelope sender can send per time unit. If the policy daemon is called > > ONCE for every sender - recipient tuple, a multi recipient mail would > > count as multiple messages. > > When you're using a policy daemon, Postfix is just out-sourcing the > response for each particular SMTP step. The DATA step only occurs once > per SMTP transaction, so the policy daemon only gets called once if you > put it in smtpd_data_restrictions. > > Only smtpd_recipient_restrictions is going to get called repeatedly.
Thought so. > Given your stated aims (restricting based on # of message-sending > attempts, rather than # of recpients), ISTM you want to do a > smtpd_sender_restriction, since that would provide the earliest moment > you could disconnect, and thus the greatest savings in resources. Furthermore "# of recpients" (which I also happen to use) is only available in data or end_of_data. So I put the check_policy stuff there and it seems to be working now. -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebra...@charite.de | http://www.charite.de