Whitelist hostingserver IP to e-mail on behalf of domain


We’re having troubles with sending e-mail on behalf of a domain, from a wordpress application, while using Cloudflare.


WordPress is hosted on server A with it’s own IP-adress
Domain is hosted on server B with it’s own smtp settings, but rerouted by Cloudflare

Wordpress (with Easy smtp WP plugin) is trying to send e-mails (i.e when signing up), but we can’t manage to get the application sending the mails.

The domainregistrar is saying we need to whitelist the wordpress hosting domain on Cloudlfare to send the mails on behalf of the domain.

I’ve tried to set up a Firewall rule to allow the hosting IP - but this did not help.

Can anyone help me out?

Kind regards,

Hi Rob,

It sounds like your Wordpress server is trying to connect via SMTP to a domain using Cloudflare. Note that Cloudflare IPs as default are only going to allow HTTP/HTTPS ports:


The simplest solution would be to modify the SMTP settings in the plugin to ensure it connects either directly to your SMTP server’s IP or to a DNS record on your Cloudflare domain that is “grey-clouded”.

You should firewall off your SMTP server so that only trusted IPs can connect to it - but also you could if you wanted to, use Cloudflare Spectrum to provide some protection too - which will allow you to protect and proxy non-HTTP traffic, like SMTP.

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