Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Easiest Mail Cluster?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Easiest Mail Cluster?

gibstergibster Member

Hi all,
I'm pretty new to this, however I think that it'll be good to learn. I have quite a few spare domain names that I don't use for anything and quite a few spare VPS', on which I would like to set up some sort of mail server cluster. I can't find any good tutorials, but form what I gathered is that the best way to go about doing this would be using a HA cluster? Many thanks in advance,
Ben

Comments

  • tommytommy Member

    why do you need mail server cluster in first place?

  • Need more information here... what is your goal?

    If its reliability, you could setup a second server, then give it a higher MX value than your primary one for failover.. then in postfix add it to relay_domains

  • jarjar Patron Provider, Top Host, Veteran
    edited June 2015

    For low volume e-mail something like GlusterFS for storage with webmail/IMAP/SMTP redundancy by failover at the DNS level. The key is that you HAVE to keep mail storage in perfect sync. You can't just rsync this, at least not without a complex script that treats rsync differently based on time stamps.

    To put it simply, there is no easy way to have high availability e-mail unless cost isn't a factor. There are surely licensed mail server appliances out there that can handle this. This is why I'm still confused by VestaCP's "mail cluster" feature they claim is in development.

    What you can absolutely have, very easily, is a mail server and a backup relay to hold incoming e-mail.

  • @Jar - I do respect you, and the service you provide, but I disagree. With a proper HA NFS storage, your MX servers can and will share writing to various mailbox folders/files, and IMAP and POP3 can easily share reading from those same files/folders. At the local ISP I was employed by, we had over 22,000 mailboxes ran in this fashion, on 2.8GHZ P4 servers... They utilized a pair of rackmount NAS boxes to provide central storage, two qmail MX servers, and two Dovecot IMAP/POP3 servers. Somewhere in the mix was a IMAP cache, so that the two webmail boxes weren't constantly hammering the disks in the NAS. Squirrelmail is quite horrible in that respect, as at the time, required touching the entire inbox to sort the inbox in the webmail client. Once they switched to roundcube, things got a bit easier to manage. If you want to talk email, let's chat via PM.

    @gibster - There is not many tutorials available, but my advice to you is to look into how to get postfix writing email to a network based storage, and dovecot reading from network based storage. Once that is working, duplicate your postfix config, add a higher priority MX entry for the second server, and duplicate your dovecot config, adding it to your DNS entries for your IMAP/POP3 server. This is it in a very small nutshell.

    Thanked by 2jar aglodek
  • jarjar Patron Provider, Top Host, Veteran
    edited June 2015

    cncking2000 said: but I disagree

    I disagree that you disagree. It seems to me that we're on the same page :)

    Notice that in the context of the OP stating:

    gibster said: quite a few spare VPS', on which I would like to set up some sort of mail server cluster

    I stated:

    Jar said: For low volume e-mail something like GlusterFS for storage with webmail/IMAP/SMTP redundancy by failover at the DNS level.

    Jar said: To put it simply, there is no easy way to have high availability e-mail

    To which you responded:

    cncking2000 said: At the local ISP I was employed by, we had over 22,000 mailboxes ran in this fashion, on 2.8GHZ P4 servers... They utilized a pair of rackmount NAS boxes to provide central storage, two qmail MX servers, and two Dovecot IMAP/POP3 servers

    Rackmount solutions sitting next to each other is a bit different than random VPS in random locations that we can usually assume, due to the context of the location of our conversation, are simple OpenVZ containers or, at best, low resource KVM boxes. I'm glossing over the fact that the setup you described sounds more about local load balancing than high availability. That said, notice that I opened with the same theory you're talking about..network storage and distributed front-end. I attempted SSHFS once over local private network between two VPS and had several issues at about 800+ email per hour in both directions. Local NFS on dedicated direct line is way better I'm sure, but this guy won't have that and even then having everything in one place isn't going to satisfy the high availability requirement.

    I doubt that you disagree with my statement that it is not "easy" in this particular context so I can only assume you misunderstood me. So, you see, I think you and I agree :)

    Conceptually, in initial theory, e-mail failover across a couple of random VPS sounds easy because we all know how easy web failover can be and it's just another service usually found right next to it. However, there are many variables that make it much more difficult. I didn't say impossible, but I also didn't say inexpensive.

    My recommendation to anyone that approaches this topic (like the OP) is that they first make sure they are 100% comfortable running a mail server and understand it's inner workings before venturing into this topic.

  • TACServersTACServers Member
    edited June 2015

    @ Jar - I was blinded by

    gibster said: I would like to set up some sort of mail server cluster. I can't find any good tutorials, but form what I gathered is that the best way to go about doing this would be using a HA cluster?

    Forgot the rest of what he posted, when I was reading your response. It is "easy" enough, just not with the situation OP has at hand. I took his question as if he were asking if an HA cluster is the solution to his problem, and I was merely presenting another solution, which in the end, doesn't solve anything at all. With google's issues with email in the last year, I am not sure HA email is possible, but one can insure that it will get there, eventually.. :)

    Thanked by 1jar
Sign In or Register to comment.