On 6/14/2012 10:12 AM, Adrian Gibanel wrote:

> 
> Thank you Noel but there's a little problem on your solution I think. I mean. 
> What I want is:
> 
>  Throttle emails:
>     * Sending to any domain: Wait 15 seconds between sending an email and 
> another email

Why in the world would you do that?  It's customary to only
implement artificial delays for those destinations that require it.


>     * Sending to gmail : Wait 15 seconds between sending an email and another 
> email
>     * Sending to yahoo: Wait 15 seconds...
>     * Sending to local domain: Don't throttle at all.
> 
> There's a "Sending to gmail" and a "Sending to yahoo" just in case their send 
> delay is changed independently of the others as you might imagine.
> 
> Setting the session limit to 1 and mx address limit to 1 is to ensure that 
> given a domain only a one email each 15 seconds is sent to it. I don't know 
> if there's a better way to achieve that.

No, those settings tell postfix to try one MX only. If the single
attempt fails, defer the mail rather than try another MX.  This can
*severely* delay mail to destinations that tend to have
non-functional MXs, such as hotmail and yahoo.  This delay will be
further aggravated by your short smtp_helo_timeout (normally a short
helo timeout for "freemail" destinations is good, since it lets you
skip slow/dead servers quickly and move to the next one.  but you
create a bigger problem when you disable the next one)

> 
> And using default_destination_rate_delay is what I think I need to setup the 
> "Going to any domain" rule.
> 
>   So... How to throttle to 0 seconds my own domain so that it does not affect 
> the "Going to any domain" rule? And, of course, avoiding that error about  
> "warning: do not list domain in BOTH virtual_mailbox_domains and 
> relay_domains".
> 
> Or maybe an alternative way to implement this?

If you insist on a default delay, you can create a "zerodelay"
transport for your local domain that resets the delay to zero.




  -- Noel Jones

Reply via email to