Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I did add a new slow transport to my Postfix configuration but this doesn't looks to work. Messages pass correctly in the slow transport but they aren't rate-limited.

Currently, I've been setting this up in my master.cf:

slow unix - - n - 1 smtp -o default_destination_concurrency_limit=1 -o initial_destination_concurrency=1 -o smtp_destination_concurrency_limit=1 -o in_flow_delay=2s -o syslog_name=slow

Any idea why my messages aren't rate-limited?

share|improve this question
    
Are you trying to throttle inbound or outbound messages? Also the output of postconf -n and your Postfix version would be helpful. –  Insyte Mar 2 '11 at 16:43
    
Also, how many messages are you attempting to deliver? And how are they injected? Different limits kick in depending on various concurrency issues. –  Insyte Mar 2 '11 at 16:45
    
I'm trying to limit outbound messages that might be created either by mail command or by the perl mime lite (script) library. The number of messages shouldn't be much that something like 10 per sec, under heavy usage. But this isn't normal situation, normal is 0 per second.I'm running Postfix 2.5.5 and postconf -n is: pastebin.com/isJtT0fM Thanks for your help! –  Tourneur Henry-Nicolas Mar 2 '11 at 18:45
    
And what is in /etc/postfix/transport? –  Insyte Mar 2 '11 at 19:13
    
destination.net slow: And it pass correctly in the slow transport but not rate limited (I can see in the logs postfix/slow). –  Tourneur Henry-Nicolas Mar 2 '11 at 19:15

1 Answer 1

up vote 4 down vote accepted

The config you have now is only going to make sure you only have a single simultaneous delivery to each destination. It's not going to actually throttle anything. I think adding this line to main.cf may accomplish what you want:

slow_destination_rate_delay=2s

That will tell the queue manager to insert the specified delay between each individual delivery to the same destination. Since you haven't modified default_destination_recipient_limit from its default, it should apply the delay to each recipient domain. So this should mandate a 2 second delay between each delivery to the domain listed in the transport map.

When I've had to do this in the past, I didn't go with the alternate transport mechanism. Since I was only concerned with delivery speed to each unique domain, I just added these lines to main.cf:

smtp_destination_concurrency_limit = 1
smtp_destination_rate_delay = 1s

So if there is mail being injected for 30 different domains, it may try to deliver a message to all 30 of them at once, but never more than one at a time to example.com and never faster than 1 per second to example.com.

share|improve this answer
    
Thanks for your help, it works now :) –  Tourneur Henry-Nicolas Mar 2 '11 at 20:32
    
Can I also put everything under the master.cf like this? slow unix - - n - 1 smtp -o smtp_destination_concurrency_limit=1 -o smtp_destination_rate_delay=2s -o slow_destination_rate_delay=2s -o default_destination_concurrency_limit=1 -o initial_destination_concurrency=1 -o in_flow_delay=2s -o syslog_name=slow –  Tourneur Henry-Nicolas Mar 2 '11 at 20:39
    
I think that should work; I haven't used that technique though, so I can't say for sure. –  Insyte Mar 2 '11 at 23:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.