On 9/23/2013 7:17 AM, Matt - Opem Solutions wrote:
> Hi,
> 
>  
> 
> Ive a postfix server which is used to relay emails to an external
> smtp server, this was done to prevent the receiving smtp server from
> being flooeded by to many messages per hour which i did by using the
> debug command and a sleep 6, in addition to this i added a transport
> map to slow down delivery even more for certain hosts/recipient domains:
> 
>  
> 
> [MAIN.CF FILE]
> 
> transport_maps = hash:/etc/postfix/transport
> 
> smtpslow_destination_rate_delay = 310s
> 
> smtpslow_destination_concurrency_limit = 1
> 
> smtpslow_destination_recipient_limit = 1
> 

When you set the recipient limit to 1, the delay is applied to
deliveries to the SAME RECIPIENT rather than deliveries to the SAME
DOMAIN.  This is probably not what you intend.  See:
http://www.postfix.org/postconf.5.html#default_destination_rate_delay

>  
> 
> debugger_command = /bin/sleep 6

This shouldn't be necessary after you increase the recipient limit.

>         -o max_use=1

This shouldn't be necessary either.



  -- Noel Jones



> 
>  
> 
> [TRANSPORT FILE]
> 
> yahoo.com smtpslow:[external.server.com]:25
> 
> yahoo.co.uk smtpslow:[external.server.com]:25
> 
> googlemail.com smtpslow:[external.server.com]:25
> 
> gmail.com smtpslow:[external.server.com]:25
> 
> hotmail.com smtpslow:[external.server.com]:25
> 
> hotmail.co.uk smtpslow:[external.server.com]:25
> 
> outlook.com smtpslow:[external.server.com]:25
> 
> outlook.co.uk smtpslow:[external.server.com]:25
> 
> aol.co.uk smtpslow:[external.server.com]:25
> 
> aol.com smtpslow:[external.server.com]:25
> 
> comcast.com smtpslow:[external.server.com]:25
> 
> live.com smtpslow:[external.server.com]:25
> 
> live.co.uk smtpslow:[external.server.com]:25
> 
> msn.com smtpslow:[external.server.com]:25
> 
> msn.co.uk smtpslow:[external.server.com]:25
> 
> sbcglobal.net smtpslow:[external.server.com]:25
> 
> verizon.net smtpslow:[external.server.com]:25
> 
> bellsouth.net smtpslow:[external.server.com]:25
> 
> yahoo.ca smtpslow:[external.server.com]:25
> 
> cox.net smtpslow:[external.server.com]:25
> 
> ymail.com smtpslow:[external.server.com]:25
> 
> btinternet.com smtpslow:[external.server.com]:25
> 
> btinternet.co.uk smtpslow:[external.server.com]:25
> 
> btopenworld.co.uk smtpslow:[external.server.com]:25
> 
> btopenworld.com smtpslow:[external.server.com]:25
> 
> mail.com smtpslow:[external.server.com]:25
> 
>  
> 
> The smtpslow is set to use one thread only in master.cf
> 
>  
> 
> [MASTER.CF FILE]
> 
> smtpslow  unix  -       -       n       -       1       smtp -D
> 
>         -o syslog_name=postfix-smtp-slow
> 
>         -o max_use=1
> 
>  
> 
> The –D (debug) is a bit of a dirty hack as it basically calls a
> sleep for 6 seconds between messages to ensure it doesn’t hit the
> external hosts message per hour limit.
> 
>  
> 
> This all works fine, however ive noticed a big problem
> 
>  
> 
> If i send 3 emails to my hotmail.com address they all rightly have a
> 5 minute (310s) delay between them, however if i send an email to 2
> different hotmail.com address and send 3 messages per recipient it
> does correctly insert the 310s delay between the recipients
> messages. However the issue is its trying to deliver to both
> recipients at the same time, ie
> 
>  
> 
> Emails spooled
> 
> Email 1 to both reclipents sent (with the 6 second debug gap)
> 
> Wait 310s
> 
> Email 2 to both recipients sent (with the 6 second debug gap)
> 
> Wait 310s
> 
> Email 3 to both recipients sent (with the 6 second debug gap)
> 
>  
> 
> Where as i expected it to instead work like:
> 
>  
> 
> Emails spooled
> 
> Email 1 to recipient 1 sent
> 
> Wait 310s
> 
> Email 1 to recipient 2 sent
> 
> Wait 310s
> 
> Email 2 to recipient 1 sent
> 
> Etc
> 
>  
> 
> How can i adjust the config so that instead of matching the
> recipients its matching the domains as if 50 emails go out to
> hotmail.com at the same time to different recipients it doesn’t try
> and delvier them all at the same time.
> 
>  
> 
> Best Regards
> 
>  
> 
> Matt.
> 

Reply via email to