Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What I have

I have a number of Linux (Ubuntu) servers (20 as of now but may grow over time to hundreds) connected to each other via private VPN (OpenVPN) which serve intranet web application (Apache and PHP) in their respective local network. Users in these local networks do not have internet and they use these servers for few services. A lot of such servers can be behind NAT, or dial up internet. Users of the servers are not connected to VPN or Internet. Their only access within the local network is that server. There is one central server in the VPN which also have a public static IP and a domain name pointed to it. The same application is also served by the central server for those users (road warriors) who wish to connect from public internet. In case of my web application I sync the changes between a local server and the central server, whenever possible. I am using MongoDB for data storage. I have a unique name for every server which can be used for making FQDN, but I don't have a DNS system in place as of now.

What I need

I also wish to add an email service [collaborative suite if possible] to these servers, in such a way that a local server can facilitate email communication within the local network and also sync with the central server [current VPN host] so that a user of a local server connecting via internet (road warrior) is still able to exchange emails. some amount of delay will be acceptable for sync to complete across servers. The service should be transparent. I do not wish my users to use different email addresses or have different IMAP inbox.


I have user's credentials in MongoDB databases in local servers and synced to central server. These credentials can be accessed via a PHP REST API. If required I can put hooks on the API create/update events to update the credentials in any required format (LDAP, MySQL, Memcache or something else), But I don't know about replicating in reverse direction.

Answers I seek

  1. Such a system possible with email replication along with IMAP inbox? [Yes/No]
  2. will I need a DNS setup? [Yes/No -- Details if possible]
  3. is there a suite/software (which integrates, mail transfer agent, mail delivery agent and webmail) for such multi tier scenario, which I can use for such a setup? such as Zimbra? [Which suite/software]
  4. or i have to use a stack of Mail Transfer Agent (Postfix/sendmail/Exim), Mail Delivery Agent (sendmail/Dovecot/Cyrus/Courier) and Webmail (Squirrel/OpenWebMail)? [Yes/No and which combination will work for such a system - details if possible]

*Note - I am not asking how to setup. I am just asking what's possible and which tools to use.

A different but Related question

Right now i have users in every server in MongoDB. At central server I keep a database for every server (I have unique names for every server which can be used to make FQDN). I identify users at central server like this


can i have a multi tier LDAP setup where i can keep the users in both local and central server and keep both in sync? is yes which software/stack will work best?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.