Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 recently did some work for somebody, and as a side, he asked me if it was possible to have postfix forward mail from one server to another for the same domain. For example, let's say his domain is and he has an MX record that points to He has some mailboxes hosted on and other ones hosted on He wants any undeliverable mail that reaches to be forwarded to, still, of course.

Example scenario:

  • hosts
  • hosts
  • MX records point to
  • A user sends an e-mail to Postfix (on the GNU/Linux machine) sees that it doesn't have a user named tom and registers an undeliverable. Rather than responding to the requestor with an undeliverable message, the user wants the data to be forwarded on to

He is willing to create a record for every e-mail that resides on the Windows machine if necessary, but he would prefer that it always just forward undeliverables to the Windows machine so that he doesn't have to create a record every time he makes a new mailbox on the Windows server.

share|improve this question
up vote 3 down vote accepted

If I understood your problem correctly I think you can do it configuring luser_relay on

Set in

luser_relay = = $

If you don't have an MX record for domain and you don't want to create one you can use transport on for it to know where to deliver emails for * By default in postfix you have included $myhostname in $mydestination so will accept it.

share|improve this answer
The domain will be the exact same for mailboxes on both servers though. It will always be So if resides on, postfix needs to forward it on to the machine. But it can't be It needs to be Does that make sense? – Kasius Apr 5 '13 at 13:45
The email will be delivered to But recipient will not be changed. So it will appear as in your email client. Using this subdomain its just a trick to be sure that the email is sent to server. And as I said, if you don't want to define a subdomain in your DNS server you can use transport on for this. – Laurentiu Roescu Apr 5 '13 at 14:07
Fantastic! Creating an MX record should not be a problem for him. Thanks a bunch. – Kasius Apr 5 '13 at 14:09

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.