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.

link|improve this question

71% accept rate
feedback

2 Answers

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.

link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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