[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

Sync between two mailserver

Hello Expert,
how to do a sync (with schedule time) between 2 mailserver with root password? what software i must installed and how to configure it?

regards
M0b1us
0
M0b1us
Asked:
M0b1us
  • 3
  • 3
  • 2
  • +1
3 Solutions
 
ahoffmannCommented:
what do you mean by "sync"?
that both have always the same mailboxes so that they can be load balanced/hot failover?
0
 
M0b1usAuthor Commented:
yup.. same username same inbox

my situation is like this.
company mailserver : host in america

in my province internet here goes very slow. our users are using email account with protocol : Pop3 & imap. the pop3 will download all entire message from company mailserver so it takes time to download it. but imap looks very slow when retrieve the message directly from mailserver.
so we decided to make another 2 new mailserver 1 is in here (province) and another one host in metropolis area which internet is more high speed than in province.

all i know is to send/get an email between 2 server we need to make same users account province and metropolis so the mailserver can get/send the message
after that the mailserver at metropolis will directly send/receive  to company mailserver (america)
0
 
ppfoongCommented:

You can make use of rsync to synchronize directories between the servers.

It is included in most Linux distro. It's website is http://samba.anu.edu.au/rsync

In your case, I would suggest you to install a webmail interface for the users. Squirrelmail is a free and popular one.


0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
ahoffmannCommented:
I also have rsync in mind, but when syncing mailboxes you have to stop the MTA first, otherwise you risk to sync incomplete files (it's a pain with most MTAs).
Also what happens if the users on the provnce server remove mails in their mailbox, the next rsync will bring them back (same applies to the message flags like new|read etc.).

I guess you first need to think about your requirements, and how often you need the sync, and how many traffic you expect in the mailboxes.
I'd say that rsync is a quick&dirty solution if you have little traffice (lets say less than 20 mails between rsync).
0
 
cjl7Commented:
Hi,

If you are using Maildir/ rsync will work very well. In that config you can sync very often (since only the changed (added) files will be synced). If you are using mailbox (std for sendmail) you will have a bigger problem since all the email is stored in one (big?) file per user. (I know it might not be true, if you are using an imap server it might have a storage system of its own.)

In the mailbox case you would be syncing all of your mail every time... (not very fun...)

The other alternative is to setup procmail to forward incoming mail to your US server to your "slave" servers. (i.e. mail is sent to both servers)


Cheers

Jonas

0
 
ahoffmannCommented:
"stored in one (big?) file per user" that's what I had in mind,
thanks for giving a description cjl7
0
 
cjl7Commented:
btw,

It might be best to setup a real mailserver for the non-us people and store all email there instead.

Just put forwarders in your mailconfig (it might be aliases or virtual users depending on your config) and point thoose to your slave server.

That would probably be the cleanest implementation. (at least one that sticks to the standards)


//jonas
0
 
M0b1usAuthor Commented:
yups.. i agree with forwarders rather than rsync must stop my mailserver until finished sync all entire message.
want to ask more about forwarders
if i put the forwarders. is there any mail message leave at this server? or i must clean the message itself?
how to do that. can u give me a sample instructions?

regards

Agus
0
 
cjl7Commented:
Hi,

A procmail .forward file is possible (if you haven't got a load of users)

I don't know which mailserver you are running but here are some docs for you to dive into...

Procmail: http://userpages.umbc.edu/~ian/procmail.html

Postfix: (I prefer this...) http://www.postfix.org/VIRTUAL_README.html


//jonas
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now