MX record added but emails sent are not received

I have added a MX record to my cloudflare account but I am not able to receive messages from the server. I made a contact to my hosting company and I was asked to contact cloudflare for my
MX A record to be added to cloudflare’s Nameservers. How do I go about this?
Thank you for the help

The DNS record(s) used for e-mail service (usually the A mail record) should be :grey: cloud at DNS tab on Cloudflare dashboard for your domain and the MX record should point to a hostname that is set to that unproxied (usually the A mail ) with DNS only record, otherwise your e-mails will not work as it seems to be the case.

The A mail record should contain the value of an IP address of your hosting provider/email server.

  • the hostname (DNS record) used for e-mail send/receive should be :grey: cloud (usually it’s the A mail), while the MX record should point to a hostname (usually the A mail) that is set to :grey:

Kindly, if you need more assistance, please post the actual domain name here and check the instructions from below article:

Cloudflare’s default configuration only allows proxying of HTTP traffic and will break mail traffic.

Just in case, sharing here a list of some websites/tools I usually use to check, test or even generate something in case I forgot how does it go regarding an e-mail setup:

Kindly, check to which port are you actually connecting, if so (25, 110, 465, 995, etc.)

Furthermore, are you using an SSL certificate for your e-mails too?

Moreover, there are situations where people point their MX record to a CNAME or use some external e-mail service like G Suite and other.

1 Like

Yeah thanks. My hosting company confirmed that the MX records I added are correct but my core problem now is how to get cloudflare specialists to add the A record to their servers

Kindly, may I ask what is your domain name, to re-check?

I am not sure if I correctly nderstood this one.

Let me tell about few things first, Cloudflare does not offer neither hosting services, neither is an email provider.

If you are the owner of the domain and Cloudflare account, you manage your DNS records for your domain.

Meaning, you would have to edit/modify or add a new A type DNS record (if needed), or some other if so via the DNS tab at Cloudflare dashboard.

Any DNS changes are applied immediatley.
This is usually done in a few minutes, or less.

Here is a way how to do it:

1 Like

The MX record is pointing to mail.codepoachers.com with priority set as 0, there seem to be no issues with MX record. However, the issue is caused as the MX record mail.codepoachers.com is not resolving to any servers. You can fix this issue by adding an A record for mail.codepoachers.com by contacting the Nameservers service provider Cloudflare and request them to add the following DNS record:

DNS type: A record
Host: mail
Points to: SITE IP ADDRESS

Once the records are added there will be propagation time, it can vary depending on the geographical location. Normally, the domain DNS takes 0-8 hours and is known to take up to 48 hours maximum to completely propagate.

THIS IS THE EMAIL EXPLAINING WHAT MY HOSTING COMPANY SENT TO ME.

0 mail.codepoachers.com No A Record (no glue either)

Obviously, this is what is needed to be fixed.
You would need to point your A mail record from Cloudflare DNS tab it to your hosting provider IP address and it should work.

Great. Kindly, ask your hosting provider for the server IP address to which you have to point your A mail record. They know it.

1 Like

I have this already and it has been added. What my hosting company is proposing is that I contact cloudlfare for them to point my mail server to SITE IP ADDRESS which I know and can give out

It appeared that you are not actually getting my concern.
To make things clear to you, hopefully, I have added all the necessary records needed for the mailing services to work and those have been confirmed to be correct as well by my hosting company. And now, for me to finally receive an email through my email account, my hosting company is asking that I contact cloudflare(maybe if they have a support team) for them to add the A record for the mail servers at their end.

So my SIMPLE concern now is how to get to cloudflare(the PLATFORM to reach out to cloudflare) to add the A records as directed by my hosting company

Okay, then so, you would need to have DNS records look like on the below example:

Just, instead of 1.2.3.4 add your hosting/server IP address and that’s all I suppose from the stated.

From my previous posts, if that is your domain, and if you manage it, you have to manually add or change it.
I am afraid nobody else can do it except you in that case.

Otherwise, if the hosting company manages your domain on Cloudflare and is some kind of a Cloudflare Hosting Partner or Cloudflare integrator, or if you are using some service like SiteGround, eZoic, etc. just as an examples?

Or you want Cloudflare Support to do it for you? I am afraid they will point you to the same articles as me or here at Cloudflare Community forums for help.

Steps:

  1. Login to Cloudflare dashboard
  2. Select your domain
  3. Go to DNS tab
  4. Check if you have an A mail record
  • if yes, click on “Edit”
    4.1. Add the IP address unter “content” column
    4.2. Click on Save button to apply the changes
  • if no, click on button “Add record”
    4.3. Under “name” column write mail and under “content” column put the IP address.
    4.4. Save to apply changes

Okay thank you @fritex I will give your solution a try to see if that works.

1 Like

I just found out that I did that earlier and was told that the setup is exposing my IP address. I not too comfortable with that though not a problem for me now as to the project I am working on. But who knows I might have a change of plans in the future to come:)

1 Like

Well, most people who have or ar at the shared web server, have got both web and email on the same IP address due to costs, etc.

To provide external security over your worry about being DDoSed or some other attacks because your MX record would also expose your web server IP address, that issue should the hosting provider cover and take care of, if so.

Otherwise, you are free to use services like DDoS IP protection from some providers like WorldStream, JavaPipe, Voxility, etc.

  • but there is the price too for them …

Or just use a separate hosting/server for an e-mail, or another static IP address (at least) if possible :wink:

Do not orange-cloud DNS records used to receive mail: Cloudflare does not proxy mail traffic by default.
If your mail server resides on the same IP as your web server, your MX record will expose your origin IP address.

From article above:

Follow these guidelines to ensure successful delivery of your mail traffic

“Grey-cloud” your mail-related DNS records so mail traffic isn’t proxied through Cloudflare.

Use separate IP addresses for mail traffic and HTTP/HTTPS traffic. Cloudflare recommends using non-contiguous IPs from different IP ranges.

Since mail traffic cannot be proxied through Cloudflare by default, you will expose your origin web server’s IP address. Information on your origin IP address would allow attackers to bypass Cloudflare security features and attack your web server directly.

Don’t configure MX records for a root domain that is proxied through Cloudflare.

Many hosting companies specify the root domain name in the content of the MX record. When using Cloudflare’s DNS, specify a subdomain such as “mail.example.com” in the content of the MX record and create a separate A record in Cloudflare for “mail.example.com” to point to the IP address of your mail server.

1 Like

Alright I think I will have to stick to the current settings becuase it is working. I will just have to put in some of the measures proposed by your shared articles to see if they help enhance the security of my ip address. Thank you so much for your time and knowledge

1 Like

I am happy to assist you :wink:

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