Possible Duplicate:
Send all outgoing mail to /dev/null

I need to reconfigure sendmail (preferably through .mc file) so all outgoing emails would never leave my server, but instead either go to /dev/null or to a user that can be redirected through alias to go to /dev/null.

marked as duplicate by Ben Pilbrow, Scott Pack, Chopper3 Mar 11 '11 at 14:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I don't know of a way to do exactly what you're trying to do (all users, yes; all domains, not a clue), but you might try adjusting confQUEUE_LA low enough so that it'll queue all mail. (it's for telling sendmail to queue the mail if the load average goes too high).

Once your test is done, clear the queue and set the limit to a more reasonable level.

  • not what i need – alexus Nov 2 '09 at 22:45

I did something similar with Exim a while back Redirect all incoming mail to another user Been working pretty well. All our dev machines have the dns entry for our mail host overwritten in the hosts file so mail goes to this other box, it then redirects all the mail back to the developers. Saves them from having to worry about change mail servers everytime they sync from live to dev.

  • i dont use exim, so this answer is going work for me. – alexus Nov 3 '09 at 15:50

I can't think of any legitimate reason for configuring a mailserver to accept a message going to whitehouse.gov (or whatever), and then to silently discard it. Instead, you should reject any INCOMING mail for domains you don't deliver to, which is something that just every internet-facing mailserver does anyway. Just configure it to only accept mail going to your own domain, and so that it knows that your own domain is local (has local mailboxes). That should be fine.

  • 1
    you don't see any legitimate reasons? umm.. not that i feel i need to explain myself to you, but i'll give you one good legitimate reason... TESTING? I'm testing mailing lists, and without sending to my subscribers I'd like to know if it works... how about that for a legitimate reason? – alexus Nov 3 '09 at 15:52
  • Jeez. Don't ask a question if you can't take the answers man. – Lee B Nov 3 '09 at 20:33

Have you checked out this site?


  • The domain seems to be parked now – adamo Mar 11 '11 at 7:54

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