On Aug 13, 2013, at 17:34, Noel Jones <[email protected]> wrote:

> On 8/13/2013 10:26 AM, Philippe Bloix wrote:
>> What i would like is :
>> 
>> For example, my postfix relay accepts about 1000 emails (1 shot)
>> from a SMTP client, then the postfix server relays them with the
>> rate of 5 emails per domain per second without REJECT.
> 
> As documented, the minimum delay is 1 second.
> 
>> Do you know if postfwd permits to have this behaviour ?
> 
> Not possible; postfwd limits input, not output.

Depends on your setup; we run postfwd on our relay servers, with a very simple 
ruleset;

==
id=LIMITSEND
        action=rate(sender/150/3600/DEFER '$$sender' exceeding rate limits)
==

In other words, if a sender sends more than 150 messages in one hour, defer the 
next attempt. This allows people to mail merge in Outlook via their local 
Exchange server and whatnot, it will just take a number of hours that is 
roughly equal to the number of messages divided by 150.

As said, this requires that you have a setup where the submission servers relay 
via the server that runs postfwd, and the retry interval etc. comes into play 
here. But one could use the multi-instance postfix option for example to set up 
a submission instance specifically for this type of client, which accepts 
everything and then relays it through the actual sending server to the outside, 
with custom retry intervals and such.

Another option may be to put the whole batch on hold, and then run some custom 
scripting that requeues messages based on limits you specify.

It all depends on what you are trying to achieve, though. Is one per second 
really a problem in terms of delays? A thousand e-mails take less than 20 
minutes to deliver to a single destination that way.

HTH,
Joni

Reply via email to