Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Best practice redundant offsite mail server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Sun Mar 10, 2013 11:25 pm    Post subject: Best practice redundant offsite mail server Reply with quote

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
View user's profile Send private message
jpc22
Apprentice
Apprentice


Joined: 29 Jan 2012
Posts: 195

PostPosted: Mon Mar 11, 2013 1:27 am    Post subject: Reply with quote

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
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Mon Mar 11, 2013 11:01 am    Post subject: Reply with quote

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
View user's profile Send private message
jpc22
Apprentice
Apprentice


Joined: 29 Jan 2012
Posts: 195

PostPosted: Tue Mar 12, 2013 8:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Wed Mar 13, 2013 12:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Wed Mar 13, 2013 5:45 pm    Post subject: Reply with quote

Perhaps Unison FS could suit your needs
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Thu Mar 14, 2013 9:00 am    Post subject: Reply with quote

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
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sat Mar 16, 2013 9:02 am    Post subject: Reply with quote

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
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Sat Mar 16, 2013 7:03 pm    Post subject: Reply with quote

Thanks for that tip! I'll have a look at it
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum