Duplicate emails received

September 10, 2014 1.3k views


We are new to DigitalOcean and this may have been asked and answered in the past. My search back through previous questions so far doesn't show that though.

Some emails for one of our domains have been lost on a number of occasions in the past 12 months or so due to the intermittent poor reputation of the email server of our hosting provider. Therefore we have setup a droplet here on DO to use as our mail server to avoid this problem occurring again.

However, we are receiving two copies of all our emails for all email addresses on that domain. I have just had a look at the DNS entries for the domain in question and there are two A Records. One points to the new DO droplet and one is to our local ISP.

Will the existence of the two A Records likely to be causing the duplicated emails? Does this mean that our emails are being routed through both email servers? Can I simply delete the non-DigitalOcean one without causing any other email issues?

I am very new to all this, and was not involved in setting up our DO droplet so am wary of doing anything that could further disrupt our emails.

Thanks in advance for any enlightenment on this.

1 Answer


In your case, it looks like if you had configured round robin dns on the A records for your domain. A round robin will alternate queries coming to DNS, to respond with each IP available in your DNS zonefile configured that way.

So, this configuration should not perturbate the mail service, unless you had misconfigured your MX records. Here is a short DNS resume on how to set MX records for a domain.

First of all, in a DNS zone file, the '@' symbol represents your domain, in its "domain.com" form. So, to point your webserver with domain and 'www' subdomain, you need records of that type :


Next, a MX record for mail exchange need to configure a FQDN hostname. So, to register your mx record, you need a record of that kind :

@ IN MX 10 mail.domain.com
@ IN MX 20 mail2.domain.com

To be sure you don't make any mistake configuring those mail servers, you need to add a required A record to point the 'mail' and 'mail2' subdomains in your DNS zone file :


If you have that kind of settings, you can be sure that your mail delivery will be done using first your primary MX, and then your secondary MX as a fallback when primary is not reachable. So, in your case, I would check that all MX records points well to your new mail service, and that you don't have any duplicate record for 'mail' pointing to different IP addresses providing an unwanted DNS round robin for mail delivery.

Feel free to tell what is your domain so that I can provide you the proper answer.

Hope this could help. Have a good day !


  • Hello.

    The domain in question is mail.chem.com.au

    Happy for you to add to your answer, I really don't know enough to diagnose/fix this myself so any assistance is appreciated.


  • Hi,

    I made a basic check on the domain configuration, and everything seems to be fine for MX records,

    dig chem.com.au mx +short
    25 mail.chem.com.au.

    This means the SMTP server that has to used for the domain "chem.com.au" is "mail.chem.com.au".

    The mail.chem.com.au subdomains points well to your IP droplet :

    dig mail.chem.com.au +short

    So, it seems that you don't have any misconfiguration on your MX records : the SMTP to use for your domain was declared well in the DNS zone file. The only thing that should update to have a proper MX setup would be to add a PTR record in DO admin panel to match IP with the domain mail.chem.com.au on reverse DNS resolution :

    dig -x +short
    --> empty response !

    Once you will have added your reverse DNS record (PTR), then your mail server should be recognized by other mail servers as a FQDN host, and your mails will be accepted in most cases for delivery.

    But for now, if you still receives your email twice, you will have to look at your mail client configuration, to check what is the IMAP server you query to retrieve your email. Looking at the services available on your mail.chem.com.au show there is no IMAP or POP service listening to allow you retrieve your emails.

    nmap -PN
    Starting Nmap 6.47 ( http://nmap.org ) at 2014-09-11 11:39 CEST
    Nmap scan report for
    Host is up (0.021s latency).
    Not shown: 998 filtered ports
    22/tcp open  ssh
    25/tcp open  smtp
    Nmap done: 1 IP address (1 host up) scanned in 4.70 seconds

    I would advise you to check your mail client configuration (thunderbird, outlook) to see on which server you are trying to get the emails for your domain. If you want to be able to consult your mails from this mail server, then you will have to configure a Dovecot service on your VPS to allow people retrieving emails via IMAP.

    Feel free to tell me if this could help you to solve your mail problem. Don't hesitate to gimme more information if you need more help for your mail setup.



Have another answer? Share your knowledge.