Entry
How to set up a backup (secondary) mail server
Dec 10th, 2004 03:34
Sam Snow,
Step 1 -- Set up a working qmail server at the secondary location.
Alternativly, find someone who also has a working main server and serve
as seconday email servers for each other.
Step 2 -- Now all you have to do is to setup the configfiles:
rcpthosts: a list of all your domains you wich to collect mail for
locals: the domains that should be delivered to the hard drive of your
backup server. If the server is existing only to provide a backup for
another mail server this file will be blank.
smtproutes: Correctly formatted entry telling the server how to deliver
the mail that you have received on the server but not delivered
locally.
Example smtproutes entries:
domain_you_want_to_route:primary-server.domain.com
another_domain_you_want_to_route:another-server.domain.com
If you want to route all mail and then you should have the line
like:
:primary-server.domain.com
Further notes:
> Say the primary goes down for a day. How do you get your mail? do
> you have to log into the secondary to get it, or does it "hold" it
> somehow until it is able to forward it to the primary?
>
>
The secondary will hold the mail for the length of the queue life,
during which time it will try to deliver the email to the primary email
server.
If it does not get delivered before the queue life is up the email will
be bounced back to the sender.
I suggest using an smtproutes file to steer the email for the secondary
domain to the primary server. Here is one scenario on using one could be
helpful. Pretend that your primary server's internet goes down, but you
are able to get the server back up via dial-up for a short period every
little while. Once you get the server online and know the temp IP
address, you set up the smtproute file on the secondary server and then
send it the alarm signal. All the email that has accumulated on the
secondary will get pushed to the primary (at which point you can check
the email via your normal methods).
Another scenario would be to use a smtproutes file to route to a
nonstandard (firewalled) email port that would not be subject to a
filtering gateway that you might have. Then if your filtering gateway
has problems you will still have a way to get email to your main mail
server.
Does that help? Note that:
A. Many spam bots will try the secondary and not even try the primary.
B. Not all mail servers will readily try a secondary server for
delivering mail. Hence, be warned that if your primary goes down you
may not receive everything via the secondary.