Solved

linux mirroring

Posted on 2000-03-31
7
314 Views
Last Modified: 2013-11-15
Currently we are running Sendmail/Redhat 6.0 as our primary email server. Is it possible to have our primary email server backup/mirror to a secondary email server on a daily or hourly bases so that in the event of a failure of our primary email server  the secondary can be brought online by a change of its ip.
detail/steps would be much appreciated
If I have two linux boxes and need to copy email users from one to the other, what files need to be copied.
0
Comment
Question by:n_athen
7 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2673176
You could use rdist to replicate the mail spool to another machine, but if the mail server is very busy the spool area will get pretty out of date in the intervals between "syncs". If you are really worried about loosing email service and can spend the bucks, having all of the mail stuff on a separate disk (SCSI is best), or better yet a small standalone RAID system that can be moved from the failed server to it's backup might make more sense. You'd want to be careful in configuring the system so that everything other than program binaries needed for email services are located on the "movable drive". What would need to be there in addition to the user mailboxes depends on what email services you provide (POP, IMAP, etc) and which implementation is being used.
0
 
LVL 4

Expert Comment

by:kiffney
ID: 2673288
There are plenty of >$10,000 solutions from vinca and others.  If you're talking about rolling your own standby server system, this is not at all simple, it depends very much on many details of your individual system, and you would not be able to maintain it if you just followed a cookbook without understanding what is going on.  The simplest way would be to check out www.turbolinux.com who offers a prebuilt clustering package - buy it,  install it, spend time learning how it works.  RedHat may offer one, too.  

That said, if you really want to do this yourself (and I don't recommend it!), surf on over to linux-ha.org, where the developers of high-availability linux have put up their work.  

I think the simplest and cheapest way to do this yourself is to have two servers that update each others spool files with rsync, preferably linked to each other with a separate set of network cards connected with a crossover Ethernet cable on a separate mini-network.  You will need to take particular care that both servers agree on the time, and that their CMOS clocks also agree on the time, since rsync depends on that.  There's a utility called netdate (search on www.google.com) that can handle that.  

You have one primary server that sends and receives mail: when it goes down, the other takes over its IP address and starts handling the load.  Resynchronizing once you have the primary server back up is a bit of a problem and you probably don't want to do that automatically.  

One big question is, how does the backup server decide that the primary is down?  You could use a ping script - but I've seen servers that were responding to ping but were otherwise hung and not completing processes.  You probably can't design an absolutely foolproof system yourself.  An interesting step-by-step overall guide is at

http://noframes.linuxjournal.com/lj-issues/issue64/3247.html
0
 

Author Comment

by:n_athen
ID: 2674291
Edited text of question.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Expert Comment

by:matt_hook
ID: 2674615
I think this might be what you're are
really after.  It doesn't solve the problem of, if mail is on the server
and the server goes then it's not mirrored to the other server, however
mail will still be processed.
There is another technical issue with
a complete mirror.. mail might be sent twice if it's stuck in the output queue.
on the down server when it is finally
restarted.

I personally believe this way I'll explain here is the easiest... it's also the most widely used.

Basically its all handled by the DNS
server configuation.  I'm going to assume you have configured DNS before..
if not, ask a friend or go to
http://www.isc.org/products/BIND and look up the docs on configuring it.

Set up 2 or more mail servers as normal.
Give them seperate IP addresses.

In your zone configuration file DNS add an MX record for each mail exchanger (server).

e.g. with this type of format...

a.b.c.d IN MX 20 smtp1.domain.com
a.b.c.e IN MX 30 smtp2.domain.com

(I think thats the right format it's all
from my memory).

basically where you see the numbers 20
and 30 they are the order of preference
given to the server.  So all mail should
generally be sent to the primary exchanger first... if that is unsuccessful then it will try smtp2
You could make both the 20 and 30 the same number so that no preference is given to either server.. in effect this is like very cheap load balancing... it's not really but the results are similar.

i.e.

a.b.c.d IN MX 20 smtp1.domain.com
a.b.c.e IN MX 20 smtp2.domain.com

you can even add a 3rd if you wish...

a.b.c.f IN MX 20 smtp3.domain.com

If you plan to use these servers for
outgoing mail as well. you might want
to configure them to ensure the mail
appears from the same host etc...

For sendmail have a look here.
http://www.sendmail.org/m4/masquerading.html

Unlike swapping in a new mail server you
will find that this system is automatic.
Now if you combine this with a monitoring program like "son of pong" or netmonitor? then you can be notified if one of you mail servers karks it.

Thats about it.

Matt.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2674622
What does your email system look like?

Pure sendmail with user mailboxes in mbox format in /var/spool/mail? Are you running a POP or IMAP server? Does the system provide LDAP directory services? Are you using only local password files or do you use NIS with the master being some other system? Are there any virtual email accounts? What about aliases or mailing lists? Do you allow .forwards and, if so, where are the user home dirs? As you can see there are a number of considerations. They are all solvable for the existing system, but you might want to consider something of a re-design to make the whole process simpler.

Now if you'd like a write up of what my production email system looks like (and it has essentially the characterics you are looking for), how it was designed and why, I can pull all the notes, etc together into one document this weekend.
0
 
LVL 1

Accepted Solution

by:
matt_hook earned 500 total points
ID: 2674632
Woops I did get the MX records wrong.
Sorry my brain was not quite fully
functioning this morning.

here's what it should look like

MX Records:
client.domain. IN MX 10 mailserver.client.domain.
client.domain. IN MX 20 mailserver.client.domain.

Matt

0
 

Expert Comment

by:hotbot
ID: 2685092
hello
first i want to tell you i'm a network dummy so be patient if what a say is a stupidity , but i'm a not so dummy unix user . for mirroring your email take a look at fetchmail  http://www.tuxedo.org/~esr/fetchmail
i use it for one user (me) and he do the job perfectly , i don't know if he can work on your case .
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now