View previous topic :: View next topic |
Author |
Message |
petterg Guru
Joined: 25 Mar 2004 Posts: 500 Location: Oslo, Norway
|
Posted: Sun Mar 10, 2013 11:25 pm Post subject: Best practice redundant offsite mail server |
|
|
What's the best practice for setting up an redundant mailserver offsite?
My earlier experience is singlehost qmail/courier and postfix/dovecot on single gentoo host. Now I'd like to setup two new servers so that one will be available even if network on one site goes down. What's the recommended way to do this? |
|
Back to top |
|
|
jpc22 Apprentice
Joined: 29 Jan 2012 Posts: 195
|
Posted: Mon Mar 11, 2013 1:27 am Post subject: |
|
|
Clustering your machines could allow you to acheive redundancy with the right configuration, one node could take over if the other one fails or lose internet.
The only problem i see could be internet traffic cost. |
|
Back to top |
|
|
petterg Guru
Joined: 25 Mar 2004 Posts: 500 Location: Oslo, Norway
|
Posted: Mon Mar 11, 2013 11:01 am Post subject: |
|
|
If clustering can stick to just transfer changes written to disk, that would be ok. I imagine that would make one send out the same amount of data as it receives. (Receive 1MB mail = send 1MB of mail data to the other server.) If clustering makes significantly more data transfer, it will be a problem. Has anyone experience with offsite clustering?
Another way (as this will be mailserver only) I guess will be make sure the maildir directory is in sync between the machines. Or will that make some unexpected behavior? |
|
Back to top |
|
|
jpc22 Apprentice
Joined: 29 Jan 2012 Posts: 195
|
Posted: Tue Mar 12, 2013 8:07 pm Post subject: |
|
|
If you just want changes written to disk a clustered file system could do the trick and wont require going through all the clustering documentation. |
|
Back to top |
|
|
petterg Guru
Joined: 25 Mar 2004 Posts: 500 Location: Oslo, Norway
|
Posted: Wed Mar 13, 2013 12:50 pm Post subject: |
|
|
I think changes to disk (data partition) should be good enough. Am I wrong?
What filesystem would be suited for this task? A requirement is that both servers should keep working as normal, even if the network between them goes down. And filesystem needs to sync once the network connection returns. |
|
Back to top |
|
|
smartass Apprentice
Joined: 04 Jul 2011 Posts: 189 Location: right behind you ... (you did turn around, didn't you?)
|
Posted: Wed Mar 13, 2013 5:45 pm Post subject: |
|
|
Perhaps Unison FS could suit your needs |
|
Back to top |
|
|
petterg Guru
Joined: 25 Mar 2004 Posts: 500 Location: Oslo, Norway
|
Posted: Thu Mar 14, 2013 9:00 am Post subject: |
|
|
Unison would be my last try. It's good at synchronizing directories once pr night, but it's not suited for discovering changes to a directory on the fly. The way it works is to make a checksum of every file. For every run it checks if any file is different from the last checksum. In a maildir there will be millions of files. Hence Unison will consume too much cpu to run in daytime.
Also maildir does a lot of mv-commands. Every time a imap connects, all files in folder new are moved to folder cur. Unison will see this as all files in new are deleted and the same files are created in cur, hence it will transfer them again. Then, when a file is marked as read, maildir marks with renaming the file, once again unison will see this as delete/create.
Unison is a great program. I use it a lot for backup, keeping laptop documents in sync with server. It made my life a lot easier. But it's not suited for maildir, outlook .pst files and database files. |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sat Mar 16, 2013 9:02 am Post subject: |
|
|
cyrus-imapd already has clustering support in and of itself
it's a bit of a hurdle to set up, but removes the need to worry about fs synchronization
this is probably the best route for seamless failover - too drunk to find links, but you should have an idea as to what to google _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
petterg Guru
Joined: 25 Mar 2004 Posts: 500 Location: Oslo, Norway
|
Posted: Sat Mar 16, 2013 7:03 pm Post subject: |
|
|
Thanks for that tip! I'll have a look at it |
|
Back to top |
|
|
|