Backup Mail Server Questions

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Sep 26 11:45:19 PDT 2004


On Sun, Sep 26, 2004 at 12:19:56PM -0500, Eric Crist wrote:

> I was wondering if anyone has any insight as to having a remote backup 
> mail server and the setup of such.  I'm currently using sendmail, and I 
> don't want to change that, so please don't recommend any of the other 
> servers out there. ;)
> 
> One of my friends needs backup DNS/Mail in the even their connection 
> goes down.  How do I go about setting it up so that his user base 
> (about 80 users) will not see any problems in mail transmission and 
> reception if their primary servers go offline.  I would like mine to 
> automatically pickup the slack.
> 
> Thanks for your replies!

Actually, it's pretty simple.  Starting with the more fundamental
things: to provide a backup DNS, configure a server to secondary for
your friends domains.  Under Bind9 that means something like this in
named.conf:

        zone "yourfriend.com" {
            type slave;
            masters {
                dns0.yourfriend.com;
            };
            file "s/yourfriend.com";
            allow-query {
                any;
            };
            allow-transfer {
                none;
            };
        };

If you want that to be available to the world in general (which you
usually do, for a mail server) then you need to get your friend to do
two things: add a NS record for your server to the "yourfriend.com"
zone file and alter the registration of the domain so that your server
is listed as one of the registered name servers for the domain.  Your
friend should also check and make sure that his nameserver has
appropriate 'allow-transfer' statements so that your server can AXFR a
copy of the zone from it.

That's the hard part.  The Secondary MX'ing part is fairly easy.  All
you do is get your friend to add an MX record to the DNS
'yourfriend.com' zone listing your server as a high numbered MXer:

    $ORIGIN yourfriend.com.

    @       IN    MX   0 smtp.yourfriend.com.
                      10 smtp2.yourfriend.com.
                      30 smtp.you.com.

And then add:

    yourfriend.com    RELAY

to /etc/mail/access and rebuild access.db.  That means your machine
will accept e-mails addressed to users @yourfriend.com and queue them
up for relaying onto to his servers as soon as they come back up
again.  If his site has to go down for an extended length of time, you
can make special arrangements to store incoming mail for longer than
the usual 5 days and then flush it over to him when he comes back up.

Recommended reading:

    The Bat Book:  Sendmail, Bryan Costales and Eric Allman, O'Reilly & Assoc. 
        3rd Ed. 2002. http://www.oreilly.com/catalog/sendmail3/index.html

    The Cricket Book: DNS and BIND, Paul Ablitz and Cricket Liu,
        O'Reilly & Assoc. 4th Ed. 2001. http://www.oreilly.com/catalog/dns4/

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040926/85bc6a6d/attachment.bin


More information about the freebsd-questions mailing list