Mail not working after switching to Cloudlfare




I used to have a domain,, pointing to a server which handled the DNS, web server, and mail server. It worked fine. Then, I switched the dns manager to Cloudflare. I now have the site at a different server than the mail server.

Now, my emails don’t go through. The mail server is at and mail is served by

This is the line I get from my sending mail server (not the receiving) when I send an email to [email protected]:

Jan 10 16:46:52 localdomain postfix/smtp[12536]: D78E3208C1: to=<[email protected]>,[]:25, delay=300, delays=0/0/300/0, dsn=4.4.2, status=deferred (conversation with[] timed out while receiving the initial server greeting)

So my mail server, the sending mail server, is trying to connect to, which is not the location of the mail server.

My DNS records are below.

;; SOA Record	3600	IN	SOA 2029882677 7200 3600 86400 3600

;; A Records	1	IN	A	1	IN	A	1	IN	A

;; CNAME Records	1	IN	CNAME

;; MX Records	1	IN	MX	1	1	IN	MX	10

;; TXT Records	1	IN	TXT	"ca3-6e2632f6738c43bfacf92fa840872844"


Here are the dig results:

dig mx

; <<>> DiG 9.10.3-P4-Ubuntu <<>> mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30266
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 512
;			IN	MX


;; Query time: 20 msec
;; WHEN: Thu Jan 10 17:01:27 CST 2019
;; MSG SIZE  rcvd: 74


OK, a couple updates:

  • I am able to send mail from [email protected].
  • I am able to receive mail at [email protected], when I send from my gmail account. My mail mail server will not deliver to the mail server.


I just sent you an email and it worked, maybe it’s just a DNS cache, when did you change the MX record?


Thanks for your help, Francesco. I was changing the MX records around until just a few minutes ago. Maybe this is a propagation or caching issue.

I just tried sending again and got:

Jan 10 17:11:42 slumberland postfix/smtp[13139]: connect to[]:25: Connection timed out

So now, it’s trying to resolve to Cloudflare’s IP, not the mail server’s and not the one it was trying to point to before. And yet, you could email me, and I could email myself, from gmail. And I’m not having trouble emailing anyone else from my main mail server.