Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to achieve the following with postfix:

Almost all outgoing emails shall be sent via a relayhost, configured in with

relayhost = my.mailserver

There's one specific email address ( for which I want the email to be delivered locally. I set up a local account on the machine to match the email address and added "" to the mydestination property in Then of course postfix tries to deliver every email to locally and bounces them because the respective user doesn't exist.

Question seems to be somewhat related (though more complicated).

share|improve this question

2 Answers 2

I finally figured out the correct syntax in the transport configuration file:

Add the following to /etc/posfix/transport: :
*    relay:[my.mailserver]

and run

postmap transport
postfix reload
share|improve this answer
hmm this does not work for me - still relays ''. – rynop Jan 23 '13 at 22:13

The correct way to do this is add the following to /etc/posfix/transport local:
*     relay:[my.mailserver]

Then add the following to /etc/postfix/

transport_maps = hash:/etc/postfix/transport

Then run:

sudo postmap hash:/etc/postfix/transport
sudo /etc/init.d/postfix restart
share|improve this answer

Your Answer


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.