Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

main.cf:

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

transport:

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

virtual:

 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?

share|improve this question
    
When you say otheruser, do you mean otherdomain? –  NickW Jul 25 '13 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 '13 at 1:23

1 Answer 1

up vote 0 down vote accepted

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             :
share|improve this answer

Your Answer

 
discard

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.