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...

Rainer

link|improve this question

50% accept rate
feedback

3 Answers

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 main.cf (not in mydestination)

link|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
3  
In postfix main.cf on the secondary: relay_domains = $mydestination, example.com Will relay mail for example.com 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
feedback

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

domain.com smtp:[IP of Primary Server]

And in "/etc/postfix/main.cf", add

transport_maps = hash:/etc/postfix/transport

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

link|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
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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