I've set up an email service, for a domain, abc.com I have tested an confirmed.

Using dig it returns abc.com. 299 IN MX 1 cencor.

Now, I'm trying to run a second domain via the same service: def.com. Ive set the mx on def.com to point to abc.com.

Using dig, it returns: def.com. 299 IN MX 1 abc.com.

However, no emails seems to hit the inbox, and gmail is not reporting any failiure to deliver.

The server is running iredmail, and can't find any documentation about settings that should be changed for multiple domains, and since it works for abc.com i cant see why def.com does not work.

  • 1
    What is cencor supposed to represent? May 4 '19 at 23:29

MX records provide the address of the SMTP servers that handle incoming email for a domain. You don't have an incoming SMTP server available at abc.com:25 (it is at cencor:25), and MX records can not be daisy-chained in the way mentioned.

You should set-up both MX records to return the same response e.g

abc.com. 300 IN MX 1 cencor.
def.com. 300 IN MX 1 cencor.

... and you also need to ensure the receiving server cencor is configured to recognise email sent to both abc.com and def.com

Usually, a source email server will retry, as it has no way to know if it can not deliver is because of misconfiguration or just because your email service is temporarily unavailable. Typically, the sender would get a "delivery delayed" notification email at 48 or 72 hours, and then a delivery failed notification at 7 days, when the source email server abandons the email.


The MX record tells the email sender which domain to do an A record lookup on to find the IP address to send their mail to. (Details in section 3.3.8 of RFC 1035).

Your record abc.com. 299 IN MX 1 mailserver.com. tells the sender to do an A record query on mailserver.com, therefore the email gets sent to the server at mailserver.com which receives the email on behalf of abc.com. Everything works as expected.

The issue comes with your record def.com. 299 IN MX 1 abc.com.. This tells the sender to do an A record query on abc.com, therefore the email gets sent to your server at abc.com which is a web server, not an email server.

I'm not sure why it isn't bouncing, because it should be bouncing. Chalk it up to Google's opaque and non-standard policies, maybe.

Anyways, you need to change your record to def.com. 299 IN MX 1 mailserver.com., assuming that mailserver.com is set up to accept email addressed to @def.com. If mailserver.com is only set up to receive email addressed to @abc.com (i.e. if you are only paying your email provider for one custom domain), then you will need to point def.com's MX record at an email forwarding service that can re-address and pass your emails along to a mailbox at abc.com.

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.