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:
[email protected] :
[email protected] :
dom1.example.org smtp:primarymx.example.org
dom2.example.org :
virtual:
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
The problem is that mail to [email protected] gets rejected:
Remote host said: 550 5.1.1 <[email protected]>: 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?
I figured it out.
The transport table should be like so: