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

I know, I know, I should switch to Postfix. But in the meantime, how do I throttle outbound email (especially email to a single domain) in Sendmail?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

What version of Sendmail?

The short answer is you can't... at least not with the control and granularity most people would require/desire.

The more expanded answer is... you can... by limiting the daemon's children (confMAX_DAEMON_CHILDREN in sendmail.mc), but keep in mind that those children are used for both INCOMING and outgoing traffic.

You can also limit the number of queued messages processed every time the queue is run (confMAX_QUEUE_RUN... I think) but once again... its not a very granular/precise method.

I know I was able to successfully throttle sendmail in the past but I believe I had the luxury of doing it on a two-server system... one for inbound (left untouched) and one for outbound (configured the total connection rate).

One other thing you might try is to ignore sendmail completely and throttle the bandwidth at the server level. I know of a few sysadmins who have taken that approach.

Hope this helps.

share|improve this answer
    
Thank you. This is exactly what I needed to know. –  Mike B Jul 13 '10 at 20:29
    
+1 for the answer –  Mike Jul 16 at 9:42

Not sure how to do it in sendmail.

But I'd say you could do it on a host(MX) by host(MX) basis using iptables rate limiting. I've never used rate limiting in iptables, but I think it would do the trick. All the examples I've seen were for incoming connections, but I can't see why it should not work for outgoing.

This should work as long as the domain you want to throttle on does not share an MX host with a domain you care about.

share|improve this answer
    
-1 : more an open thinking than an aswer, it's bettre to put it in comment of the first answer and give a link of a simimlar iptable case. –  Mike Jul 16 at 9:45

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.