Cloudflare & Plesk email issues

Hi

I am using Plesk and running all my DNS through CF. I have disabled DNS in Plesk.
I have created an email address (first time doing so in Plesk). I have added all the DNS records that are needed, MX, Mail, Webmail, DKIM etc.
The email address can receive emails but any emails sent out never arrive.

I don’t know if this is a CF issue or something in Plex. I have looked for all the info I can find but cant find a solution.

Under the DNS area of the website I am getting a warning of ‘The website’s domain name does not resolve or resolves to a different IP address.’ Not sure if this is related as upon investigating the warning it seems a common one you get when running DNS proxied through CF.

First: Cloudflare does not have anything to do with Mail traffic and also “Sent traffic” is not getting altered/stopped by Cloudflare.

If you can receive emails, your Cloudflare setup is fine.
If you can not send emails, something must be wrong on your server side.

Can you post a screenshot of this error, so we know where exactly you got this error? But this error is well known if your Website gets proxied as it then does have a different public IP.

If you can not send any mails, please make sure you have all needed Ports opened on your server/server firewall and also the firewall of your server-vendor. For example, IONOS does have additional Firewalls you can configure in the Dashboard at IONOS.

Upon even further digging it seems the issue maybe with vultr blocking TCP port 25 (SMTP).
I have contacted them and will see if unblocking this resolves my issue.

Please make sure these ports are not blocked:

  • 25
  • 465
  • 587
  • 2525

Just to add a note here, the DNS records 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 MX should point to a hostname that is set to that unproxied A mail (DNS only) record.

Maybe you need to use SSL/TLS connection and a valid SSL certificate and a different port for outgoing mail?
Does the error or info log file for the mail service have anything logged?
Nevertheless, re-check out your configuration if you are actually trying to sent out from your hostname (DNS record) which is the main domain and which is being proxied (:orange: cloud) instead from the hostname which is being unproxied :grey: cloud.

  • if you are having like pop.yourdomain.com for receiving, while smtp.yourdomain.com for sending, or using mail.yourdomain.com for both, or in your e-mail client the main domain yourdomain.com

I am not 100% sure for Plesk, but I assume you still need to keep DNS at server side due to internal e-mail routing, spam services like amavis etc., at least I do keep it in ISPConfig for domains that use e-mail, or for example domains using cPanel, I leave them there too, and just export them (if possible) so I can easily import them to Cloudflare and setup as needed.

If the mail record is :orange:, then it’s 100% that the hostname does not resolve to IP address and vice versa as it sees Cloudflare as the “sending one”, which is not correct way (stated above, :grey: cloud should be).

Furthermore, maybe you need to setup the reverse DNS for your IP address and a correct hostname at your VPS or dedicated server?

Regarding Firewall, it could depend, you can have the needed ports open, but maybe it is “stateless” rather than “statefull” where the difference could be as the Firewall could not know which connection is related to other due to not looking deep into received/sent network pakets, etc. just like for example Hetzner has got it.

Some of the useful tools for testing e-mail functionallity:

Hi

Thanks for the great info. Upon checking the maillog from Plesk and with some help from Plesk support it seems that its SMTP port 25 blocking the out going e-mails. I have asked Vultr support to unblock this port to see if it resolves the issue. Hopefully they can do it Monday as their support doesn’t work weekends.

I will go through your advice and links and see if there is anything I have missed. Thank you so much!

Kind regards

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