We are using Exim on CPANEL server with CENTOS 5. We have only one mail server hosted on US databasecenter contains all user mailboxes.

Problem is that our users are in two different data centers in US and China. And China datacenter users having difficulties for sending emails along with attachments most of the time because of slow connectivity between US and China datacenters. Because China users have to connect to US DC SMTP server and because of slow connectivity issues users suffers a lot.

At this point, I am trying to achieve functionality like China users will connect to China DC for sending emails I am looking to configure secondary SMTP server on china DC. China SMTP server will then send relay emails to main SMTP server in US DC which will responsible to send emails finally.

Please let me know this will improve email sending from China? How to accomplish this or is there any better solution to resolve this issue?

Currently main mail server which hosts all users mailboxes and I don't want to separate domain name between two datacenters. I still think separate SMTP server on both datacenters can solve email sending issues but how to accomplish this without changing any user email domain e.g. abc@example.com or any other idea ? enter image description here

  • Are the users in China inside your network or on the public internet? If they're inside your network, then yes you can have a slave Exim server in China to which they send. But they'll still have to wait until it's transmitted from there to the US before it appears in the recipient's inbox. It might fix issues caused by SMTP connections dropped. – pjc50 Feb 2 '12 at 16:25
  • china users are on public internet. I also had this in mind to setup slave of main mail server but i thought email relay from china to US is more appropriate via SMTP authentication. Through this whenever anyone sends an email to our main mail server from china it connects to China DC which will relay email to US DC mail mail server as we have better connectivity between China & US DC. Hopefully this will improve email sending issue. I am freak out about email recieving how to improve it do i need to configure mailboxes on china DC also. – user608676 Feb 3 '12 at 7:39
  • I updated visual attachment to clear the existing problem. I believe i need to configure EXIM on china DC server and through this to relay all outgoing emails from china to US DC. But confused how to accomplish this. Is there any better way to resolve. – user608676 Feb 3 '12 at 12:44
  • wiki.exim.org/AuthenticatedSmtpUsing - use one of the authentication methods on the Exim, and relay all mail to US straight, and you can enable SELinux. – Andrew Smith Jun 20 '12 at 2:50

I did this the following way: I have setup a machine in London and China. I have setup mirror GlusterFS for /home were accounts are using Maildir (1 file per email) and it's configured with standard Virtualmin. This way, each email message is replicating from London to China upon delivery or deletion. LDAP is also replicated between sites (the user database). With GeoIP DNS, if I am in China, I download or send to my mail from China server and vice-versa by having the same settings. So this is a working way of doing this for 10.000+ mailboxes. This is not that difficult to setup and works well. With your configuration, you could setup a plain postfix server with virtualmin, which gives you all sort of virus and anti-spam scanning, and then you simply relay all mail to US. The authentication you can make yourself via https query to your CPANEL server, but I never did something like this.

  • And you need to enable SELinux per user and certificates and DoveCot, Spamassasin, Clamav. – Andrew Smith Jun 20 '12 at 2:02
  • ps2. bind-sdb with ldap, postgresql, sqllite3 and geoip patch – Andrew Smith Jun 20 '12 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.