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 want to setup a second smtp server to receive emails when the primary server is down. The primary server is a configured by OS X Server, the secondary is a Postfix setup on Debian. The secondary is able to accept emails, but how to I push to the primary server?

I need a little hint where I have to look at the configuration (I do the most stuff with webmin (o: )

Thank you...


share|improve this question

Create an MX record your DNS server with a higher number than your primary MX server entry.

In bind this looks something like

                MX      10 <your primary server>
                MX      20 <your secondary server>

Your secondary server also needs to have the domain it's relaying for defined in relay_domains in postfix's (not in mydestination)

share|improve this answer
Oh, the problem is not the mx config. I can receive mails with the server, but how do I send them to the primary server? Maybe there is an misunderstanding from my side. The primary server is where the users get their mails via POP/IMAP and I want to send the received mails from the secondary to this server. – plucked Mar 1 '10 at 14:11
In postfix on the secondary: relay_domains = $mydestination, Will relay mail for to any lower-numbered MX servers. – quadruplebucky Mar 1 '10 at 14:22
Okay, I try my best and give response. Thank you so far – plucked Mar 1 '10 at 14:25

You can setup a transport in postfix and direct emails for the domain to primary Server

Your transport file (/etc/postfix/transport) will be like smtp:[IP of Primary Server]

And in "/etc/postfix/", add

transport_maps = hash:/etc/postfix/transport

This would push all emails for the domain to primary server.

share|improve this answer
This shouldn't be necessary if the backup MX server is configured as a relayhost - a plain vanilla queue flush will deliver what's there. – quadruplebucky Mar 1 '10 at 20:31

Have you looked at the documentation on the official Postfix site? The section "Configuring Postfix as primary or backup MX host for a remote site" on the "Standard Configuration Examples" page might be interesting.

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.