Email not working on Centos CWP

I spent several days to setup the email on Centos CWP. I went through all the manuals and available videos, but nothing works. I use Cloudflare as my name server, after setting up the DNS records here on Cloudlare and configuring CWP, simply cannot send emails.
After sending the emails from roundcube, they will never be actually delivered. In the logfile there are entries like …. status=deferred … Network is unreachable.

Is there a detailed manual how to do it? Nothing helps what I found on CWP forums.


May I ask what is your domain name?

May I ask, did you create an A mail record (pointed to your origin host / server IP) on the DNS tab of your Cloudflare dashboard for your domain name?

  • or rather you are using a CNAME approach, if so ?

If yes, may I ask was it :orange: proxied or rather :grey: (DNS-only)?

Usually, the MX record should point to a hostname such as mail, and the A type record for that hostname should be set to :grey: (DNS Only).

What error do you get?

In terms of how to make sure your e-mail works properly while using Cloudflare for your domain name, yes there is.

Kindly, consider reading the article from belove under the section “ Best practices for MX records on Cloudflare → Follow these guidelines to ensure successful delivery of your mail traffic: ”.

I would suggest looking into below articles how to propperly setup e-mail configuration to make sure it works while your domain is using Cloudflare and is being proxied (:orange: cloud).

Sharing here a post of a useful tools for online functionality testing of your e-mail server:

If not above, I am afraid you should have to troubleshoot it at your origin host / server or trying with some different setup (postfix, dovecot …), or looking into firewall (in case if ports are closed, something else being blocked, service not running, etc.)

I am not familiar with CWP (neither CentOS) so I am sorry to say, but I cannot provide some helpful feedback.

Maybe you could find something helpful at the below:

Kindly and patiently wait for some other reply.

Thanks for your reply. I did that a month ago, since then reinstalled the OS without mail. This weekend I will reproduce the whole process, and post here everything step by step.
Thanks again

1 Like

Just finished reinstalling the mail server and set Cloudflare records just like in one of the referred videos:
A mail myserverIP DNS only
MX DNS only priority 0

Now it is slightly better, but not working entirely.
I can receive mail, I can send mail BUT the sent mail
either ends up in the recepient’s spam folder ([email protected] addresses)
will not be delivered at at (hosgator server email addresses)

Am I missing something?

Thank you

1 Like



Kindly, edit the MX record and make sure it is pointed to instead of just :wink:

In your e-mail client (MS Outlook, Mozilla Thunderbird, Apple mail, etc.), for the receiving/sending (POP/IMAP/SMTP) server do not forget to set to

Nevertheless, after applied changes, wait for some time.
I would also like to suggest you to test online using below tool (or some other similar):

p.s As far as you host your own e-mail server, maybe you could miss a thing like a PTR record (set for a VPS) or some other parameter in your configuration file (dovecot/postfix or some other combination), but that I believe could be troubleshooted later after testing.

The MX record was just did not typy here in the forum correctl
I did the same way everything as this guy

The emails sent (tested on round cube) to my own email addresses hosted ad Hostagtor bounce back with this error
Diagnostic-Code: smtp; 550-Verification failed for
<> 550-No Such User Here 550 Sender verify

What is wronG


do I need to add any SPF records here on Cloudflare panel?
Does CWP hadle SPF or Cloudflare does?


SPF records are handled by your authoritative DNS. In this case, it should be at Cloudflare. But make sure you’re using TXT records (not the deprecated SPF record type).

The only mail-related records here on Cloudflare panel I have are
A mail DNS only
MX DNS only priority 0

What else do I need to avoid landing my emails in the recepients spam folder?

I have Centos CWP. DKIM & SPF Manager are enabled, I have all the green checkmarks.


Cloudflare doesn’t process email. You just need the proper DNS records here. I suggest you try to check mail, or for DNS record suggestions.

mail-tester result is “Your DKIM signature is not valid”

Do I need to add any othere records on the Cloudflare panel in addition to these
A mail DNS only
MX DNS only priority 0


As I said, Cloudflare is not involved in email delivery beyond basic DNS. Cloudflare will host whatever DNS records you add. If you’re having mail issues, I suggest you ask your mail host for assistance, or an email administration forum.

1 Like

Hm, well I have to admit, it’s not an easy job to setup a private self-hosted e-mail :roll_eyes: :grimacing:

If you’ve done all we suggested, I can only say good job! :+1:

Therefore, you could troubleshoot and test further on the functionality of it.

In order to accomplish the DKIM, you would have to install something like opendkim and generate it and configure e-mail (dovecot, postfix) to use it while sending e-mails out from your server, also add the needed DNS record to the DNS tab of Cloudflare dashboard for your domain name. (for the SPF, already stated resources, yes you would have to add a TXT record to the DNS tab of Cloudflare under your domain)

On CWP all the configurations look fine, but mail-tester result is “Your DKIM signature is not valid”.
Is there a tutorial, how to setup txt records on Cloudflare DNS?
the only mail-related records I have are
A mail DNS only
MX DNS only priority 0
How do I find out exactly what other records I need to add?

Thank you

We’ve already addressed this. Cloudflare is is not your mail provider and does not have the information you need. I’ve already suggested two resources, but you may want to consider as well.

1 Like

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