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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ServerA and ServerB - I'm moving accounts from A to B but I want ServerA to relay any mail it receives to ServerB to make sure no mail gets lost after I have copied mailboxes over while DNS propagates

On ServerA I have in

transport_maps = hash:/etc/postfix/transport

and in that file I've tried: smtp:[IP of serverB]:25

And running postmap /etc/postfix/transport, and restarting postfix

This doesn't seem to do anything. If I dont have a virtual alias created for the email it says the email doesn't exist in the virtual alias table (seemingly ignoring the mail transport config). If I do have an alias that works as normal but the transport is still ignored.

The only transport I can get working is a wildcard for all mail on the server - which isn't ideal..:

* smtp:[IP of serverB]:25

Which brings me on to my second problem - when that transport is triggered ServerB is rejecting the mail:

 Relay access denied (in reply to RCPT TO command)

On ServerB I've added the IP address to the mynetworks option. Am I missing more options somewhere?

Does ServerA need to authenticate on ServerB or is the mynetworks option enough?

ServerB is an ISPConfig install if that has any influence.

Any help greatly appreciated I've googled several tutorials and they all seem to just mention the options above so I don't know what's causing the issues

share|improve this question
Please provide the output of postconf -n and the exact logs of your attempt. – adaptr Jan 14 '13 at 9:47

On server A, I'd try putting this into /etc/postfix/transport: smtp:[IP of server B]

(run postmap on that file, etc). Assuming that server B is already set up to receive email for, that should be all you need.

If that's not working, here's what you should include to help with troubleshooting:

  • The output of postconf -n (replace your domain with if you like) from servers A and B
  • The logs of an email received by server A for a user at
  • Logs from server B, if appropriate
  • The output of postmap -q hash:/etc/postfix/transport on server A
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.