Creating a backup email server on RHEL 4

Q I've got a dedicated server running Red Hat Enterprise Linux 4, which is used to host my company's website and email. When I first got the server I decided to use Sendmail as I only host a single domain, and the Sendmail configuration worked straight out of the box. All I had to do was add my domain to /etc/mail/local-host-names and restart Sendmail. My business is growing quickly and I am becoming more and more reliant on the mail that gets sent through the server - so if my server ever dropped offline unnoticed I would lose significant business. I have a DSL line at home and a PC running Fedora - can you outline how I can use that machine as a backup mail server in the event that my dedicated server cannot accept mail?

A Let's say your domain is In DNS, add the following two MX lists which hosts will accept mail for a given domain): MX             10 MX              20

As has a lower priority (10), it will take precedence over secondary. However, if becomes unavailable, mail servers will attempt to contact Once the DNS record has been saved and the name service reloaded, try to dig the domain to see if both MX records are visible. As you are already receiving mail for on the dedicated server, there is no need to adjust the Sendmail configuration there. On your Fedora PC, all you need to do is create /etc/mail/relay-domains containing your domain Once you save the file, restart Sendmail. Ensure the domain is not added to /etc/local-host-names on, as this will cause mail to get delivered locally. Now, I suggest testing your configuration by stopping Sendmail on the dedicated server and sending records (Mail Exchanger: yourself a message from a third-party mail server. If DNS is set up correctly, you should see the message hitting the Fedora box by running tail on /var/log/maillog. Don't be alarmed by the deferred message - that's actually Sendmail trying to get the message back out to The Sendmail instance on your Fedora PC should try to resend the mail every hour, so it might take a while after comes back online before it receives the mail queued by

Follow us on or Twitter

Username:   Password:
Create Account | About TuxRadar