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.

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.

Mike.

Reply via email to