Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redundant Mail Servers

Status
Not open for further replies.

bobcat

IS-IT--Management
May 15, 2001
53
US
We currently have two mail servers with our largest domain on one and a few smaller domains on the other. One is running Red Hat 7.3, the other 7.0. What I am wanting to do is kind of combine both those into one server, but still have some redundancy in case that one goes down. So, like if server#1 went down, the users can still log into server#2 and get their mail, and as soon as server#1 came back up it'd be synchronized to the changes. Sorta like a RAID config for whole servers.

Any helpful programs, links, info would nice.

Thanks,
Todd
 
You can do that from the domain's "MX" record. You can list secondary mail servers so if the first one fails, dns will point to the second.
 
that's alright for incoming mail, and we do that currently, but what I'm looking for is a complete backup so users can check (via pop3) their mail on the backup server as well.
 
I did something similar once with qmail.

The trick is to have two entry points to every mailbox on the filesystem. The main (fred@mydomain.com) which stuffs and forwards a copy, and the secondary (fred@[left|right].mydomain.com) which just stuffs.

Configure both mail servers to receive mail for mydomain.com. Configure one to receive mail for left.domain.com, the other for right.domain.com.

When mail for fred@mydomain.com arrives the lefthand server, it puts a copy in the users mailbox then forwards a copy to fred@right.mydomain.com. The righthand server tucks it away into the user's mailbox.
______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
I like this idea.. but one problem... wouldn't the messages pile up on whichever server isn't checked all of the time? Eventually, when the user checks that server they'll get a ton of messages they've already received from the other server. How do you keep them in sync?
 
SPECULATION

i see that sleipnir214 has not responded to the Oct 25, 2002 reply by bobcat -- i was wondering if he could since this redundency sounds attractive.

Could it be that the right hand server is responsible for deleting the mailboxes on the left hand server?

So if the right hand server dies, then it naturally allows the left hand server to take over.

If this speculation is correct, then I ask:

1. what is your experience on how often right deletes from left.

2. are users aware when right fails?
are users aware when left fails?
(the intention of this question is to wonder if
all this can be done transparent to end user
where we achieve a high availability server)

3. how highly avaible is it really?

4. does anyone out there periodically test for this
failure by shutting down one of the servers?

5. does someone out there have a much nicer solution
for a Redundant Mail Servers (UNIX).

Thank You Kindly
 
whitetail:

Sorry gentles, I didn't see bobcat's later post.

The solution I proposed was for an automated system of reporting. Due to client security constraints, only SMTP was available for collection. The data in the emails in this system was time-sensitive, and missing data could be overlooked. Also, the format of the mail subject lines allowed our application to ignore redundant data.

My solution to the problem of old messages piling up was simple -- a cron job that deleted maildir files older than a certain threshold.


y successor running that system ramped it up for general-purpose users. As I recall, his solution was to do away with the "gateway" SMTP server and set up both of the other servers to receive for the primary domain.

Mail was stored on a third server -- both SMTP servers wrote to that store via NFS-mount.

In DNS, MX record for the domain was listed as "mail.domain.com", and both machines' IP addresses were possible resolutions for that name. He set up a heartbeat system that would edit his DNS zones, dropping the appropriate IP address should one of the systems fail.

I don't have any more information about what else he did. I'm sure that he set up a single-signon system for the machines in question, but I don't know the particulars. I'd ask, but his company went out of business and I've lost touch with him. Want the best answers? Ask the best questions: TANSTAAFL!
 
> In DNS, MX record for the domain was listed
> as "mail.domain.com", and both machines' IP addresses
> were possible resolutions for that name. He set up a
> heartbeat system that would edit his DNS zones, dropping
> the appropriate IP address should one of the systems fail.

I like the DNS solution and am interested in trying it.

The NFS portion bothers me. (the NFS server can become
the bottleneck, not to mention having to debug nfs problems
should they happen, or possible NFS security problems)

My thought is to split SMTP and POP3/IMAP across
independent servers using the username as the hashing
function.

This cannot be an original idea on my part does anyone know of a step by step guide to distribute SMTP, POP3/IMAP across multiple servers that split the load nicer.

I already have a nice RAID solution using Micro Star MS6398
motherboard with built-in promise.com hardware IDE RAID.

Solution should scale when SMTP or POP3/IMAP loads increase simply adding another server to split the load.

I guess the hashing function integrated with DNS MX
would do the trick. Allocating multiple static IP address
to one system that runs the hash function might do the trick.

A hacked up version of the redir command sounds like a starting point.

Again, this can't be an original idea.

Anyone know of a solution (thanks sleipnir214 for your guidance)?

 
This PDF White Paper from intel defines what I am looking for as a "linux cluster" -- very cheap workstations networked together are trivial to replace compared to repairing a single failed SMP workstation.


But do open source linux clusters exist?

If so, I have to image that an email cluster would be the most valuable.

Thank You Kindly
 
whitetail:

I know of two possibilities.

The first is a home-brewed solution Texas Instruments was using at one time. They may still be for all I know.

They had a master LDAP server to maintain the user database. Each mail server ran sendmail and an ldap slave which had replicated the data from the master. Each SMTP server would receive an email and use LDAP to route that mail to the user's mailbox on a particular server. A single SMTP server might go down, but the rest would handle the load. A single user mailbox store server might go down, but only those users whose mailboxes were on the crashed server would be affected.


The other solution is the Linux Virtual Server Project (these are the clusters you seem to be so interested in). They've been around for a while, but I haven't looked at their software for some time. As I recall, their solution is a set of patches to the kernels of the machines to be clustered. Want the best answers? Ask the best questions: TANSTAAFL!
 
We've done something like what you're asking...but I think if you want full redundancy (a server or disk goes down, absolutely no one notices), you have to do it this way.

We took two Redhat 7.2 machines, used either NIS or LDAP, sendmail, etc.

Key is to use external disk arrays that are themselves RAID-1 or RAID-5. You'll need to connect each server in question to the disk array. We connected ours via fibre-channel. You'll need to mount the disk array on each machine as the folder where all your mail is stored when received by either machine. We just kept the default for Redhat 7.2: /var/spool/mail and make sure the proper permissions are set.

To load balance, simply use MX records with the same mail priority, or if you want a primary server with one to use in case the primary goes dowm, use MX records with differing priority. That way, first server goes down, 2nd one takes over with no stoppage in delivery of mail.

SMTP traffic doesn't take much load at all...nor does POP3. I used to run a 2000 user site on one Pentium III-class PC and there was never any network bottleneck. Your main concern is keeping users' mailboxes intact and in one place. Only way to do that in my opinion is an external disk array with it's own built-in hot-swap RAID-1 or RAID-5. I used RAID-1 because generally it's faster and more fool-proof.

I recommended Dell equipment for the disk array. If you have the right SCSI controller in each server, you can use whatever hardware you want for those.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top