Postfix Configuration – Route All Dev Box Emails to Developer Group

postfix

I have a development server, and at the moment email is disabled on it, so we can do whatever we need to with the system without worrying about accidentally emailing clients' customers.

I'd like to set up Postfix (or something similar) to route all email from that machine to a specific, single address, no matter who it is addressed to or which domain name they are using.

I've tried this, with no success (the BCC works, but the email still goes to the original recipient):

local_recipient_maps =
luser_relay = development@domain.com
always_bcc = development@domain.com

I'm using Ubuntu server 10.04, pretty standard LAMP setup.

Best Answer

You will need to do address mapping in the canonical table. Add the following to /etc/postfix/canonical:

/^.*$/   your@address.com

and run postmap afterwards

postmap canonical

This should do it.