Email clients will not connect after moving domains to Cloudflare

Hi all
I completed transferring 11 domains from a domain registrar three days ago. Three of the domains have a website and email account each, all hosted on a HostMonster VPS. Now, only their websites work, not their email; everything worked before the transfer. Another domain has its website hosted on the VPS but email with Microsoft, its website and email work. HostMonster DNS entries for those three domains with problem email are the same as those in Cloudflare. During the move to Cloudflare, most of the DNS entries were copied from the domain registrar which had the active name servers; some had to be copied manually.

I have an Outlook email client with errors for each of the three problem domains with message “…reported error (0x800CCC0E): 'Outlook cannot synchronize subscribed folders…” and “Error: Cannot connect to the server”. Outlook connects using imap/smtp.

I also have an Android email client ‘Spark’ that fails to send or receive for the three problem domains but does not give any error messages.

Neither email client configuration has been changed. Email sent from other accounts arrives at all three problem email accounts, I have checked this using webmail.

Each domain has among others, these DNS records:

Type=MX name=DomainName content=mail.DomainName

or

Type=MX name=DomainName content=DomainName

Type=A Name=mail Content=IPaddressOfVPS

or

Type=CNAME Name=mail Content=DomainName

Type=A Name=DomainName Content=IPaddressOfVPS

Type=A Name=webmail Content=IPaddressOfVPS

Type=A Name=autoconfig Content=IPaddressOfVPS

Type=A Name=autodiscover Content=IPaddressOfVPS

In addition, one domain has two more entries:

Type=CNAME Name=imap Content=mail.DomainName

Type=CNAME Name=smtp Content=mail.DomainName

The diagnostic centre reports no DNSSEC or DS records, but I don’t understand them and so if they are pertinent to my problem. It also reports that HTTP is not redirected to HTTPS, but I don’t think that will make any difference to email.

Any thoughts on what may be wrong would be much appreciated, thanks.

May I suggest looking a the below article and re-checking if your e-mail related hostnames (DNS records) are set to unproxied :grey: (DNS-only) and your MX record is pointed to the correct one (unproxied hostname)?

Can you share the screenshot of your DNS records from the DNS tab of Cloudflare dashboard of your domain name? Kindly, mask/hide the IP addresses if doing so.

I remember there were few topics with some long timeout duration when sending to or receiving from Microsoft domains, if it could be related to your issue.

UPDATE 1:
The CNAME mail (be it :grey: or :orange:) → if it points to yourdomain.com (which is :orange:), here could be the issue.
You might want to remove CNAME mail.
Add new A mail pointed to your email hosting IP (if using this kind of a setup on a VPS?) and set to :grey: (DNS-only).

Furthermore, CNAME imap and CNAME smtp should be :grey: (DNS-only).
Otherwise, I would remove them both.
And add A imap and A smtp both :grey:(DNS-only) and pointed to your email hosting IP.

Again, if using 3rd-party email provider, you might not know the IP or it could change, so it should stay as a CNAME but unproxied :grey: (DNS-only).

This could be the issue as DomainName hostname is proxied and set to :orange:

UPDATE 2:
Nevertheless, if your yourdomain.com hostname is proxied and set to :orange:, may I suggest you to re-check your e-mail client settings for “incoming/outgoing” server if it’s set to yourdomain.com (proxied :orange:) or rather you are using mail.yourdomain.com (unproxied one, :grey: DNS-only)?

POP3/IMAP/SMTP server in your e-mail client should be set to the mail.yourdomain.com or even imap.yourdomain.com or even smtp.yourdomain.com → all three must be unproxied :grey: (DNS-only).

Thank you fritex
Everything that could be proxied is.
It would make sense that making a difference, given that everything was copied over.
I will look at the article.
Will redact a screen grab a little later, new to this site

Thanks again fritex, however the MS email works.
I did experiment a little removing some proxy, but it did not help.
I will try removing more/all of the proxy.

Thank you for feedback information.

Kindly, re-check my updated post for further troubleshooting (your e-mail client configuration and possible (un)proxied hostname usage).

Re-check if you are connected, autnenthicated and using SSL for it.

Thanks for all that prompt help fritex
It is late here, so I will go through all your comments and the tutorial tomorrow.
Then I will post back with results and redacted screen grab if I have no success.

1 Like

Hi fritex
I started by changing all the DNS entries to not proxied on one account hosted on the HostMonster VPS. Outlook and Spark worked with it again to send and receive. However, the account hosted by MS does not recognise any (tried two) email address from the now unproxied VPS account. Even before I send it says at the top of the email “We won’t be able to deliver this message to EMAIL ADDRESS because the email address is no longer valid.” Where EMAIL ADDRESS is a VPS account email address. If I send it anyway it bounces back quickly. I removed all the proxies from the other two VPS hosted accounts. Outlook can now use all three accounts. Strangely, the MS hosted account can send to the other two VPS accounts, with some delay. I am going look at the tutorial you now, as this is probably a small configuration error. Then I propose to gradually reintroduce the proxies until I find those that upset Outlook. I will post them back here when I have worked out the good and bad set so that others can benefit from it.

1 Like

Findings, so far
Two DNS records when proxied stop Outlook from working with one of my email accounts, other accounts are yet to be checked:
Type=CNAME Name=mail Content=DomainName
Type=CNAME Name=imap Content=mail.DomainName
All other DNS entries that I could proxy on that email account work.
However, the Android ‘Spark’ email client requires an additional entry to not be proxied:
Type=CNAME Name=pop Content=mail.DomainName

The issue with Outlook sending to that email account from one hosted by MS, according to other sources, seems to be a caching issue in Outlook, although I have not yet managed to resolve it with the address book cleaning recommended.

1 Like

May I ask mobile or desktop? :thinking:

I remember I had to remove my e-mail account from mobile phone Outlook app, therefore re-add it over again to make it work → was using IMAP/SMTP.

Short answer is Outlook on Android and Windows 10 works the same way, implying the caching issue, if that is what it is, is server side.
Turns out that the entry
Type=CNAME Name=imap Content=mail.DomainName
is not necessary.
In addition, when I removed and added an account in Spark on Android it was happy that the entry
Type=CNAME Name=pop Content=mail.DomainName
was proxied too.

1 Like

Working conclusion:
Of those DNS entries that can be proxied, only the “Type=CNAME Name=mail Content=DomainName” must not be proxied.
In fact, in the video tutorial that fritex linked it says Cloudflare do not proxy email.
So, if you need “Type=CNAME Name=pop” or “Type=CNAME Name=imap” entries, they too must not be proxied, probably any other email related entries too.
I have also discovered that if ‘addon’ domains are used, the ‘primary’ domain the “Type=A Name=DomainName Content=IPADDRESS” entry must not be proxied, although that entry for the addon domains can be proxied. I have more entries to test on this arrangement of primary and addon domains.
The issue with Outlook seems to be unrelated to Cloudflare or even the Outlook client, rather, I suspect it was triggered by the change of DNS host and effects only my MS hosting of an email account. Currently, my MS hosted email account cannot send to one of my VPS hosted accounts. The MS hosted email account can receive from that VPS hosted account, but also cannot reply to such an email. I have tested this with Windows 10 Outlook, Android Outlook, and latterly the Spark email client on Android. This Spark test has the same result as Outlook, so it is very unlikely to be an email client issue. This is a rare enough use case for me that I can workaround it, so I am no rush to solve it. From my investigations, it seem many people have come across this or a similar problem over years, and there are multiple approaches to solving it, some are quite complex. I should say that no DNS entries provided by MS are proxied. Tomorrow, I will try removing all the other proxies on that domain as the final test of DNS as a possible cause.

As I thought, when I removed the proxies on the domain with MS hosted email it made no difference to the email problem.
I still have many entries to check regarding primary and addon domains, which is another matter that created some confusion for me.
In conclusion: this was a combination of adding proxies to email DNS entries, which I did not not know should not be done, MS software not liking the switch between domain registrars and getting into some state it seems difficult to recover from, and special cases with primary and addon domains.
Thanks for the help fritex.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.