Can't get my e-mail to work

I have browsed the forum and tried all sorts of things but can’t get it to work.

I have my own url (example) mysite.nl and recently switched hosting providers. Cloudflare works fine only I can no longer receive or send email, only if I pause cloudfare.

Anyone an idea what is going wrong.

Connie

That’s most likely because you’ve no MX record set (as far as I see from the shot).

I have one type MX record (mailserver) the one with priority 10

Your MX points to a :orange: proxied hostname. Those will only pass HTTP and HTTPS traffic. Your MX must point to a :grey: DNS Only hostname. If you are using the same server for your web and email, you will want to create an additional A record such as mail.example.com to use in your MX record. You will point out to the same IP as you use in the A record for example.com, but set it to :grey: DNS Only. You can then use that hostname as the target in your MX record.

The following Community #tutorial covers this in more detail.

1 Like

Thanks for the link, email now works but I am slightly unsure if the settings are safe now. If anyone wants to check or advise on this I would greatly appreciate it.

The SMPT and IMAP settings at my provider are the same as the name of my site mysite.nl (so no mail.mysite.nl)

You cannot use CNAMEs. You have to use an A record as I described in my previous reply. You cannot use the apex name example.com in your email client server names if you plan on using the Cloudflare proxy :orange: to protect your web traffic to that hostname.

1 Like

Thanks again for the explanation, unfortunately it is less easy to follow for my minimal technical knowledge, besides, my English is via google translate.

I have been struggling a bit and got the mail working and hope it is set up correctly this way.

I only want the site through Cloudflare my e-mail just goes through my own site / provider and doesn’t need to go through Cloudflare.

Your Google English is better than my Nederlands. :wink:

Your mail hostnames look good.

If you will be using the ftp hostname for FTP or SFTP, you want it :grey: too. You may not need it at all.

Your DKIM record at default._domainkey doesn’t have anything you need to hide.

You should not need the _domainkey_ policy record with o=-. That was part of the long dead DomainKeys proposed standard. It was not adopted as part of DKIM.

1 Like

A MX record must be pointed to a hostname, and that hostname must go directly to A/AAAA records (e.g. CNAME’s are NOT allowed here).

So the latest screenshot pointing the MX directly to the “naked” IPv4 address 11.11.11.11 does NOT look good.

Adjust that MX record to point to the “mail.mysite.nl” hostname instead.

1 Like

Thank you very much @epic.network and @DarkDeviL for your help and patience, it is appreciated.

The MX record now points to mysite.nl and everything is working properly.

Thanks again!

While your email will work this way, you are no longer using the Cloudflare proxy :orange: on your apex name example.com. This means you will not have any of the Cloudflare performance or security features available on visitors to that name.

The purpose of creating the :grey: A record for mail.example.com was to use it in yor MX record. That way you can keep the apex name :orange:.

@ epic.network

My apologies for responding so late, it will be my English but I don’t quite understand what you mean.

Do you mean I can set all A records proxied to keep it safe ??

Only need to accelerate my site safe - mail may go thru my server…

You cannot set any records to proxied if you need to access them for services other than HTTP and HTTPS. Email FTP, SFTP, SSH, etc do not work on :orange: hostnames.

In your original edited screenshot, you had your MX pointed to your apex domain which was also proxied. That combination will not work for email. In your second edited screenshot you had your MX pointed to an IP. That also does not work. MX records must point to A or AAAA records which are hostnames, not IP addresses. Perhaps that was an error in the edit of your screenshot.

Is everything working for your domain now?

Hi @epic.network

I guess everything is working now as should. See screenshot.

Your web traffic to your apex domain is not protected by Cloudflare since it is set to :grey: DNS Only.

If you update your MX record to point to the mail hostname instead of your apex domain, you can enable :orange: Proxied mode to protect web traffic to your apex domain. The reason behind adding a dedicated name of mail is to allow it to be :grey: so email works and you can use :orange on the domain by itself.

1 Like

OK, I think I understand it now. However, the ‘problem’ is that mysite.nl is also the mail hostname for IMAP and smtp. No idea how to make it mail.mysite.nl

It doesn’t have to be. Don’t use the apex name in the server settings of your email applications. Use mail in its place.

You mean in Outlook (smtp and IMAP) “mail” instead of “mysite.nl” ?

1 Like

Exactly. Use the fully qualified domain name (FQDN) mail.example.com and not just mail, of course.

OK, and after that I can proxy the A record mysite.nl ?