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 have a Postfix box setup that receives a copy of all emails sent and received on our domain. A postfix filter is setup which then passes all the emails to a script and stores the email in a database.

How should I setup Postfix so that no outbound messages are sent? There are some rare cases where a bounce back get generated from the Postfix box confusing the users even though their message was actually delivered.

Ideally it would be nice to have all outbound emails generated on the Postfix box sent to one specific email address.

share|improve this question
    
It sounds like your issue is actually with Postfix generating bounces when it's behaving correctly, and my take is that you should fix this issue rather than obscuring it behind some other mailer policy. –  jgoldschrafe Oct 24 '11 at 18:57
    
@jgoldschrafe: that is correct. I would rather know about the issue myself though instead of the users. Ideally having all the messages sent to an email address I could monitor would be good. I think I can accomplish that with transport maps. –  mrbnetworks Oct 24 '11 at 19:04

1 Answer 1

up vote 1 down vote accepted

This is just an example and should guide you in the right direction. I haven't actually tried it before posting.

In master.cf comment out the line containing bounce in the first column. Then create new lines with something like

bounce   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/local/bin/deliver -f ${sender} -d ${recipient}

This will pipe all bounced mails to the script /var/local/bin/deliver with some parameters. The script is executed as user "vmail" and group "vmail" (change accordingly). This script then needs to dump stdin to a (random) file and location. Probably you can use already existent scripts like procmail.

It will not disallow outgoing mails but "catch" the bounces you are after.

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.