combro2k combro2k:
> Hi there,
> 
> I've been looking for some days for a solution I need to create for a
> customer.
> What we want to achieve is throttling the delivery of mails in the queue.
> Right now we are using 'default_destination_rate_delay = 1s' which allows
> us to send approx. 3600 to each destination maximum in 1 hour timeframe.
> But we want to be more specific like 5000 mails globally,or 16000 globally,
> whatever we want to do.
> I've looked into PolicyD to achieve this, but I am stuck at the
> implementation of it at the queue system of Postfix;
> Right now I can only see it work with the smtpd_recipient_restrictions and
> smtpd_end_of_data_restrictions configuration option but not with the queue
> service.
> Am I missing something or I am overthinking it?

You can implement sub-second rate delays with parallel deliveries.
Below is an example from an last-year's email.

        Wietse

In /etc/postfix/master.cf:

smtp1      unix  -       -       n       -       -       smtp
smtp2      unix  -       -       n       -       -       smtp
...
smtpN      unix  -       -       n       -       -       smtp

In /etc/postfix/main.cf:

smtp1_destination_rate_delay = 1
smtp2_destination_rate_delay = 1
...
smtpN_destination_rate_delay = 1

transport_maps = 
    inline:{
            { $myhostname = $local_transport }
            { localhost = $local_transport }
            { localhost.$mydomain = $local_transport }
            # Other domains that don't deliver over SMTP...
    }
    randmap:{ smtp1:, smtp2:, ..., smtpN: }

This syntax requires Postfix 3.0 or later.

Reply via email to