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 have blocked emails to some addresses by using line like

To:a@b.com                  ERROR:"550 Mailbox disabled for this recipient"

But I am getting lot of messages from "Mail Delivery Subsystem MAILER-DAEMON@domain.com". How do I disable getting MAILER-DAEMON notifications only for this user? I can do this in my email client but I was hoping for more efficient method to stop server from sending such emails.

I do not want the other mails from "Mail Delivery Subsystem MAILER-DAEMON@domain.com" to be stopped. The error message should not be sent for the addresses which I have manually blocked in access map.

share|improve this question

2 Answers 2

At first glance, warren's answer seems to suggest that you dump all messages, but of course you could set up procmail to only dump the ones from MAILER-DAEMON which actually refer to a@b.com. This is done with something like

# Postmaster notifications: Move to doublebounces if refering to a@b.com
:0 H
* ^From: .*MAILER-DAEMON@domain.com
* ^Subject: (Postmaster notify|Returned mail): .*
{ :0 B
  * a@b.com
  doublebounces
}

Your questions does not clearly state which type of bounces you get. I assume it is so-called double bounces. You might want to have a look at a more sophisticaed solution which I posted at Sysadmin'ish Blog: Selective Sendmail Postmaster

Note: Above procmail recipes are meant for large servers and try to minimize the load. The 2 recipes could be converted to 1, however slightly more expensive.

share|improve this answer

You could setup a procmail recipe to just dump the messages to /dev/null from that address/domain.

share|improve this answer

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.