Score:0

Migrate webserver without affecting mailserver

iq flag

Currently I have a website example.com that's hosted on some old service provider. I'm moving it to a different service provider I use.

I need the mail to be accessible via Outlook using the existing configurations itself.

Users of example.com access their @example.com email via Outlook

I cannot move the mailserver so I thought of exposing mail.example.com for it instead with an MX record for the old one pointing to the it. My DNS records look similar to below

example.com        14000   MX    10 mail.example.com
example.com        14000   A     123.456.789.100      (new IP)
mail.example.com   14000   A     241.123.151.900      (old IP)
mail.example.com   14000   MX    10 mail.example.com  (new record)

Users can connect via Outlook using mail.example.com; but they don't want to do that change. Is there a way I can continue to allow example.com to be used to access the email and the website.

I expected the MX record to be the only thing needed but trying to connect using example.com (no mail prefix) results in a timeout.

I've gone through a bunch of related questions and all make me feel like setting the MX record should be enough. I should add that the mail server is on a crappy system and is quite slow. MXToolbox complained about it taking over 15 seconds, so some timeouts could be attributed to that, but if I do change the MX to example.com & old IP it manages to connect via Outlook in a few seconds (i.e. no timeout)

Edit:

The user base: The mail server is used by the staff of a resort, while the website is used by potential visitors wanting to know more about the place. Environment: I'm not sure where the old stuff is hosted but there is a CPanel that allows me to alter the DNS records. The new stuff is on GoDaddy with a similar setup.

I was tasked with moving just the webserver to the new host, which was simply a change in the A record. I did not know there was a mail server running on the old host as well. After the move the users started complaining so I looked into the other records and realized the MX was pointing to the same domain (i.e. example.com) There was also a CNAME for mail.example.com to example.com I changed the CNAME to an A pointing to the old IP address, and the MX to point to mail.example.com. Gave it about 5 hours (the old TTL was 4 hours) and tried it out as explained above. Eventually, I had to revert everything as the users kept complaining that it wasn't working.

Every other email configuration I've done in the past has been to simply add an MX record for server -> mail-server and have people configure access via the mail-server directly... (Example: mysite.com using Gmail as the webserver, the users connect via imap.gmail.com and smtp.gmail.com) Which is why I'm having doubts if this can be done.

djdomi avatar
za flag
please describe the user base, the environment etc and what affed on research did you? Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers.
Resley Rodrigues avatar
iq flag
@djdomi Edited the question to add the details
Score:0
fr flag

MX records control only one thing: incoming delivery from other domains (i.e. mail exchange). They do not affect where client apps such as Outlook will connect to SMTP servers, and even more so they have absolutely no effect on where apps will look for IMAP or POP servers.

So if someone has "example.com" entered as their IMAP server in Outlook, then Outlook will keep trying to connect to "example.com" until they go and manually change it. There's nothing you can do about it except inform your users that they have to use "imap.example.com" from now on.

(SRV would be the "client SMTP/IMAP/POP" equivalent of MX records, but very few apps query SRV records, and even those which do, typically only do it once during setup. Outlook does not support SRV records at all.)

Short-term you could set up a TCP relay/proxy from old server to the new one, but it's not really something you want to keep for a longer time.

Resley Rodrigues avatar
iq flag
Thank you! This is really helpful! Fingers cross I can get them to switch
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.