Configuring SMTP through Cloudflare

6,716

Solution 1

There are a few things that don't make sense. First:

CNAME    mail                  prismapixel.studio    Auto         Proxied

This means that mail.prismapixel.studio is a CNAME to prismapixel.studio. However, prismapixel.studio returns three A records, all hosted at Cloudflare. You've stated that Cloudflare does not host your email (naturally, since they're not a mail host). You mention:

My mail is hosted with a2hosting.com.

If you want to use the hostname mail.prismapixel.studio as a means of accessing your mail, you need to point that DNS record to whatever server at a2hosting is hosting your mail.

Furthermore, your MX record is pointing to prismapixel.studio. However, as we now already know, prismapixel.studio returns three A records, all hosted at Cloudflare.

Thus you must find the hostname of the mail server that you've been assigned at a2hosting.com for receiving email (it could be the same as the server that you use to retrieve mail), and then make that hostname the answer for your prismapixel.studio's MX record.

These two things are the causes of the problems you're seeing with your mail client (as well as receiving mail).

Solution 2

To create a service for SMTP, IMAP or POP, if you are using ssl, you must add SRV @ _smtps _tcp automatic automatic 0 0 587 mail.prismapixel.studio and SRV @ _imaps _tcp automatic automatic 0 0 993 mail.prismapixel.studio or SRV _pop3s _tcp automatic automatic 0 0 995 mail.prismapixel.studio These 2 services are from cloudflare could redirect the TCP packets to right port.

Share:
6,716
Angeliss44
Author by

Angeliss44

I have utilized my professional and life experiences to advance and be challenged while continuously expanding my knowledge and skills. I've faced adversity many times during my career and I've used it to my advantage by keeping a calm, level headed approach to each new challenge that I face. I have been able to successfully partner with various business professionals to launch PrismaPixel Studios and plan to deploy some new projects in the coming year. I have also created, implemented and managed several brand strategies that have recharged several businesses.

Updated on September 18, 2022

Comments

  • Angeliss44
    Angeliss44 almost 2 years

    My domain registrar is Cloudflare and my site is hosted through A2 Hosting. My problem is that my email worked fine when A2 Hosting was my domain registrar and web host. Now, neither Thunderbird or Outlook can connect to my server.

    My current DNS records for email are:

    CNAME    mail         my.domain    Auto         Proxied
    MX       my.domain    my.domain    120     0    DNS only
    

    When attempting to set up my email in Thunderbird I get the following message after entering my email and password:

    Configuration found for a Microsoft Exchange server

    Incoming: IMAP mail.my.domain SSL
    Outgoing: SMTP mail.my.domain SSL
    Username: [email protected]

    When I click on Done, it sits there spinning on Checking password... and then says Unable to log in at server. Probably wrong configuration, username or password.

    When I check my domain at hardenize.com and click on Mail servers on the left side under Email it shows Test failed under TLS. It also shows that the mail server is operational, STARTTLS is configured as well as DNSSEC. Upon clicking on TLS on the left side it displays this network error for the analysis of the problem:

    A network error occurred while we were trying to communicate with a server.
    Hostname: dc-2236d9e77805.my.domain
    Error message: java.net.SocketTimeoutException: Read timed out
    IP address: 44.164.145.200

    Furthermore, it shows that Email Certificates are not implemented or disabled. I do indeed have a certificate installed and verified through my cPanel.

    I tried another tool, checktls.com and the results display the following message for my certificate:

    Cert Hostname DOES NOT VERIFY (dc-2236d9e77805.my.domain != *.supercp.com | DNS:*.supercp.com | DNS:supercp.com)
    (see RFC-2818 section 3.1 paragraph 4 for info on wildcard ("*") matching)
    So email is encrypted but the host is not verified
    

    I am at a loss and have been trying to fix this for the past 3 days to no avail. Any help would be much appreciated.

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    

    I am now receiving and sending mail. I made the following changes to my DNS records:

    1. Removed the CNAME record.
    2. Changed the MX record to:
      MX my.domain mail.my.domain 120 0 DNS only
    3. Copied the URL from the PTR record.
    4. Found the IP of the URL.
    5. Created an A record with the IP of that URL:
      A mail 44.164.145.200 Auto DNS only

    hardenize.com is still showing a java.net.SocketTimeoutException but I believe that is on their end as checktls.com shows everything as good.

    • Michael Hampton
      Michael Hampton almost 4 years
      Where exactly is your mail hosted?
    • Tim
      Tim almost 4 years
      What is the server IP? Or, if you don't want to share it, can you please check using a couple of online services that DNS resolves IP4 and IP6 to your server rather than to a CloudFlare IP.
    • Angeliss44
      Angeliss44 almost 4 years
      My mail is hosted with a2hosting.com. That being said, I think I've just solved my problem using the PTR record. I'll update my question to reflect what I did to solve it.
  • Javier Marconi
    Javier Marconi over 2 years
    verified the ssl and tls if you are ussing let's encript