1

My question is similar to this question. I checked other questions on Webmasters, but found none referring specifically to implicit MX records.

I'm helping someone move a site hosted on Bluehost to Vercel. But, I want to keep the email of the site hosted on Bluehost. We are using Bluehost name servers, and I don't want to change name servers.

I can't find any MX records for the site, not through Bluehost's UI, through dig, or through DNSchecker.org. Sites such as the FAQ on open-spf.org and elsewhere say that SMTP will deliver mail to the IP of the A record if no MX record is present. They call this implicit MX, and every site I read says it's not recommended because it means an extra DNS lookup for anyone trying to deliver mail to this address. Here's a summary of the DNS records:

  • The mail subdomain has an A record pointing to Bluehost's server.
  • smtp and imap are CNAMEs pointing to mail.
  • www is a CNAME to the apex domain.
  • There is an SPF record for the apex domain with settings v=spf1 a mx include:someexternalwebsite.com ~all.

With this DNS configuration, when I change my A record for the apex domain to point to Vercel's servers, will the site's email break?

The question I linked to at the top of my post says that if the MX record points to the apex domain, then the email will break because the MX will resolve to the wrong server. Is that also true for my implicit MX record? What do I need to change to make point to the new server while keeping email up and running?

I want to avoid any downtime for the email as it's critical for business operation.

3 Answers 3

1

Rather a lot of confusion here.

I don't know what you mean by "break". If you change the address where mail is sent, then the place where mail is sent will change. There will be a period where some MTAs think they should send email to the old address, some to the new address - this is controlled by the TTL on your DNS records. You didn't say if you expect the mail service to move around the same time.

it's not recommended because it means an extra DNS lookup

Then this is bad advice. If you configure your MX record to use a IP address rather than a name, yes, you avoid a second lookup (not counting the SPK/DKIM lookups) but that is a very, VERY small cost in the transaction. Indeed I would recommend not only that you use a MX record, but that you set the value to a DNS name (which in turn could be a A, CNAME or multiple records). It just makes managing your DNS much MUCH easier.

The mail subdomain has an A record pointing to Bluehost's server

Currently that's not doing anything - nor is the mail CNAME (but as per previous paragraph, it probably should).

If you want to do migrate the email service with a clean switch over, then the way to achieve this would be to setup your DNS in advance, for the sake of argument lets say your domain is called example.com, your old address is 192.168.1.0/24 and your new is 10.0.1.0/24....

. MX 10 oldmail.example.com. . MX 20 newmail.example.com. . A 192.168.1.1 www A 192.168.1.1 mail A 192.168.1.1 smtp CNAME mail.example.com. imap CNAME mail.example.com. oldmail CNAME mail.example.com. newmail A 10.0.1.1 

You should also update the mailname on your smtp servers to match.

Apply this at least 2 x TTL before go live. At go live, disable the SMTP server on your old server - subsquent emails will be sent to the new server. Then, when you're happy everything is working, revert to a single MX / subnet zone, e.g.

. MX 10 mail.example.com. . A 10.0.1.1 www A 10.0.1.1 mail A 10.0.1.1 smtp CNAME mail.example.com. imap CNAME mail.example.com. 

Note that if you are using NAME based SPF records, then these will need to be updated to temporarily add old and new.

Alternateivle just switch off your SMTP server 2 x TTL before go live - email should back up at the sending side.

0

Yes, mail will break. It will break in multiple ways - your email will not be routed to Bluehosts servers, and even if it were, SPF would soft fail because the A record is not relevant to the mail server and there is no MX record.

That you are relying on A records for delivery is extremely dodgy - I've not seen this done as a correct setup on any server since I started working with POP and SMTP 30 odd years ago. The correct solution is to set up MX records

That said, fixing this should be easy. Double check with Bluehost - but all you need to do is set up an MX record to the Bluehost mail server. Then you can repurpose your A record. Just don't use CNAMES.

  • Leave the left hand side (subdomain) blank.
  • Set a record type of MX.
  • Pick a priority - as you only have 1 MX server it doesn't matter - a priority of 10 is a reasonable choice.
  • Set the data / target to mail.yourdomain.com (or better the target of the cname that mail.yourdomain.com converts to. this needs to be a domain name, not an IP address.
  • If you can set a TTL, choose a low value like 60 seconds. You can always increase it later, but having a low value allows you to be responsive if you stuff something up.

Done.

0

when I change my A record for the apex domain to point to Vercel's servers

Provision an MX record for stmp.example.com / don't use implicit MX. Update the SPF record and SMTP server HELO name to match.

Don't cut corners unless you know EXACTLY what you are doing / why you are doing it / what implications this has for current and future.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.