How can I set up Postfix so that all email sent on my dev box gets routed to the developer email group?

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 = [email protected]
always_bcc = [email protected]

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


Solution 1:

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

/^.*$/   [email protected]

and run postmap afterwards

postmap canonical

This should do it.