2

So I bought a new domain name from GoDaddy and pointed the domain to my VPS IP Address which works fine.

[Please note, the VPS is not hosted with GoDaddy, just the domain name.]

However, I noticed that all incoming mails from external servers (gmail, yahoomail, other domains, etc) keep bouncing back even though outcoming emails (from my domain to other mail servers work fine).

After googling the issue out, it seems that I need to make changes to my domain's MX Records in order to be able to send/receive mail.

In GoDaddy, the mx records are as follows:

10  @   mailstore1.secureserver.net 1 Hour  
0   @   smtp.secureserver.net   1 Hour

What I have tried so far:

  1. So as instructed by online tutorials and forums, I created an A Record mail.abcd.com and pointed it to my VPS IP Address.

  2. After that, I added this line to the list of MX Records:

    1 @ mail.abcd.com 1 hour

So now it looks like this:

10  @   mailstore1.secureserver.net 1 Hour  
0   @   smtp.secureserver.net   1 Hour
1   @   mail.abcd.com   1 Hour

[I have replaced my domain with abcd.com in the above snippet]

However, I still can't send anything to any email hosted in my server.

What am I doing wrong?

15
  • what's the output of dig MX abcd.com ? and are there A records for mail.abcd.com and other MX records ? – Lazy404 Jun 2 '16 at 22:07
  • @Lazy404 Should I run that on SSH or somewhere else? – AndrewL64 Jun 2 '16 at 22:08
  • any linux box with dig installed will do – Lazy404 Jun 2 '16 at 22:09
  • I get this: abcd.com. 3599 IN MX 10 mailstore1.secureserver.net. abcd.com. 3599 IN MX 0 smtp.secureserver.net. abcd.com. 3599 IN MX 1 mail.abcd.com. – AndrewL64 Jun 2 '16 at 22:11
  • 2
    Thanks, that confirms my theory that mail's being handed off to smtp.secureserver.net, which doesn't know what to do with it. – MadHatter Jun 2 '16 at 22:35
6

The problem seems to be that you have other servers than your mail server listed in your MX record, one of which has a lower priority. MX records work on a lowest-priority-first basis, which means the internet is first of all trying to send mail for your domain to smtp.secureserver.net., which doesn't seem to know anything about your domain. At this point, delivery fails fatally, and there's an end of it; your server, being listed at second priority, will never get tried.

The only mail servers you should list in your MX records are those that either (a) are prepared to accept email for your domain, for final delivery, or (b) are prepared to accept email for your domain with a view to delivering it on to a final delivery server, and are specifically configured to do so.

If you overhaul the MX record for shillong.work to something like

shillong.work.          3600    IN      MX      10 mail.shillong.work.

and remove all other MX records, then wait an hour (for the 3600s TTL to expire), the internet should start delivering your inbound mail to your server.

0

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.