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.
Best Answer
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 containingbounce
in the first column. Then create new lines with something likeThis 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.