The primary mx server for my domain is down, and is likely to be down for a day or so. Meanwhile pressure is on to get sme high priority mail to people who need it.

What I want to do is set up a secondary MX, which will act as a relay for some specific email addresses, and relay the rest for one domain, while another domain should only use the policy in the virtual alias maps table.

What I've currently got looks like so:


virtual_alias_domains = dom1.example.org, dom2.example.org
virtual_alias_maps = hash:/etc/postfix/virtual
transport_maps = hash:/etc/postfix/transport


 user1@dom1.example.org       :
 user2@dom1.example.org       :
 dom1.example.org             smtp:primarymx.example.org
 dom2.example.org             :


 user1@dom1.example.org  user1@otherdomain1.example.org
 user2@dom1.example.org  user2@otherdomain2.example.org
 user3@dom2.example.org  user3@otherdomain3.example.org

The problem is that mail to otheruser@dom1.example.org gets rejected:

Remote host said: 550 5.1.1 <bogus-test@vic.greens.org.au>: Recipient address rejected: 
User unknown in virtual mailbox table

What I want to happen is that that mail gets directed to smtp:primarymx.example.org and queued until that server is available.

What is going wrong? How can I get this to work?

  • When you say otheruser, do you mean otherdomain?
    – NickW
    Jul 25, 2013 at 11:47
  • No, I mean otheruser. All the redirection of the configured users works, but with dom1, if a user is not known (ie not in the transport table), then instead of trying to deliver with the virtual transport, and failing if the user does not exist, I want to fall back on the smtp:primarymx.example.org transport. What's happening is as if the transport table, or the transport table entry for dom1.example.org were not present.
    – mc0e
    Jul 26, 2013 at 1:23

1 Answer 1


I figured it out.

The transport table should be like so:

user1@dom1.example.org       :
user2@dom1.example.org       :
dom1.example.org             relay:[primarymx.example.org]
dom2.example.org             :

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.