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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load balancing on qmail 1

Status
Not open for further replies.

Trekkie

Technical User
Apr 29, 2000
150
CA
Hi,

I'm able to configure & setup qmail server without any problems. I like to know if anyone knows if there is any documentations for setting up load-balanced email server.

There is nothing for load balancing in "The Qmail Handbook" by David Sill.

Thank you in advance!

T.k.
 
What sort of load balancing are you trying to attain? Often ISPs will deploy one or more gateway servers to handle incoming traffic/filtering before the mail is delivered to a mail server.

Also, with tools like vpopmail and mysql, the mail server can be virtualized into a farm that talks to an NFS server for file storage.

So what did you want to do!?

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
I got a qmail with vpopmail, squirrelmail & courier-imap. I have not mastered mysql with vpopmail, yet.

1st (very important)
I want two email servers to mirror each other so I don't have to panic if one of them goes down.

2nd (not very important)
If possible, I like to have load balanced so that not only one email server is doing all the work.

In both cases, it must done cheaply (my company is very cheap)...no big bucks involved.

Thank you for any advance!!

T.k.
 
Put two qmail servers at the same lower MX DNS entry. In practice, every DNS and Mail server inquiry should effectively balance the tasks between them. If one is unavailable, the other will pick up the task. If you'd care to have the burden shared with another server out of your network, please let me know.

sales@surfinbox.com

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
what do you recommend in order to synchronize two qmail servers? Is rsync a good choice??

thanks thedaver :)

T.k.
 
The only synchronization that I'm aware of is the need to keep the /var/qmail/control files in sync to reflect changes in the networks and domains that you serve.

What did you mean?

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
I'm using courier-imap (w/ vpopmail) to store all the emails on the server, so I can quickly bring in alternative qmail server without any downtime. Basically, I want to cover my ass just in case something goes wrong with the primary email server.

I understand that I need to transfer everything in /var/qmail/control & /home/vpopmail/domains folders. If I built an identical server, do I need to transfer any other folders? I don't want to recover from tape backup...it will take too long.

Thanx,

T.k.
 
I didn't read you earlier posts closely enough. I was talking about building two or more gateway servers to intake the email from the 'net. I was NOT talking about building a pair of email servers to handle the same task... you cannot do that per se.


So let's be specific.. You can build all the gateways you want to build and let them all run at the same MX level. Well-behaved MTA's elsewhere will pick on via random DNS responses and inject mail to your environment for delivery to your email server.

Your email server can be build one of two ways: The maildirs on the email server or the maildirs on an NFS server. You have build the maildirs on the local email server... very common.

The NFS option would allow you to have multiple, mysql-based IMAP/POP3 servers running which would read into the NFS mailstore for the data that they need. This rather a bit of overkill for your needs.

To answer your question, let's assume that you want to build a hot-standby email server with vpopmail built in...

1) If you are using Mysql for any portion of the system, make sure you find your redudancies with another db server.
2) rsync the /home/vpopmail dir
3) rsync the /var/qmail dir EXCEPT /var/qmail/queue DO NOT backup /var/qmail/queue

Keep in mind that the rsync on the Maildirs may interfere with your primary email server's operating efficiencies... You could cron a cp of the /home/vpopmail dir to another local dir and rsync from that... that might avoid some file/folder contention...






Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
Thanks thedaver,

You being very helpful! I'll try your advice and see how it will go thru.

Very appreciated,

T.k.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top