Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have sendmail, and i am sending mailshot every week. how can i tell my sendmail to limit the number of outgoing emails to a specific domain per hour (to avoid getting blocked by mail servers) for example: to send 500 email/hour at most to and the same for and so on

Thanks for your help

share|improve this question
up vote 2 down vote accepted

The best way to solve the problem is to use something like milter-limit which is desgined specifically to throttle messages and can do this on a per-domain limit

share|improve this answer

Use two separate instances of sendmail, one to acceppt your messages and queue them. It must not be configured to deliver these mails.

The Second instance in fact will be set to deliver the mails to the corresponding recipients - but wont have something to do intially.

Set the queue processing on Instance 2 to


Now using an external CRONned script run through the queue of Instance 1 and copy 500 Messages that match your other criteria over to Instance 2's queue. Most likely it would be a good idea to make sure the Cron-Script runs before the Queue is processed.

share|improve this answer
This is a scary bad way to solve the problem. – symcbean Nov 4 '10 at 16:28
I think that's a trifle harsh. Systems running two sendmails, one of which only queues, the other of which only processes the queue, and a third process moves mails from one queue to the other, aren't unknown. MailScanner comes to mind, and that's hardly belt-and-braces software. But I agree with you that milter-limit is much more elegant. – MadHatter Nov 4 '10 at 16:33
milter-limit is a way more elegant solution than my proposal. Learned something new - yay – pacey Nov 4 '10 at 16:50

Your Answer


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.