How to configure mail on multiple subdomains and servers?


I think my Cloudflare setting are a mess. I would greatly appreciate ANY help I could get to clean up my settings and make my mail work.

I have 3 servers hosting my website. They are all the same domain name, but different subdomains:

server 1 =
server 1 =

server 2 =
server 2 =
server 2 =

server 3 =

Currently my mail system seems to work fine on server 1 (

But I am totally lost when it comes to configuring the mail system on server 2 (

I would be immensely grateful if someone could take a look at my settings and let me know:

  1. What do I need to do to get the mail working on server 2 (forum)
  2. Is there anything else that is obviously a mess that I should fix?

Thank you all so much.

You’ll need an additional MX record for which points to the designated mail server.

1 Like

So what would I use in the NAME section?

“forum”, as it is “@forum.mywebsite” where you want to receive emails, right? The mail server should be the address of the mail server however, not the domain part of the email.

1 Like

Unless you want the forum host to be the mail server.

Overall, I’d recommend to check out configuring mx records - Google Search and MX record - Wikipedia

1 Like

Okay, so I have this now:

However, I am still receiving this message on my Hetzner account:

Does it take time to propagate?

What exactly do you want to achieve? Explain it step by step.

1 Like

My website is hosted on Server 1. And everything works, including the mail delivery.

I purchased another server, Server 2. On it I created a sub-domain

On that subdomain I installed my new Xenforo forum software. It is up and running and everything is fine.

However, the forum software has an email notification feature that I would like to utilize.

So I am trying to configure the email service on my new Server 2 along with Cloudflare, so that my new forum software can send messages.

And I would like to do this without messing up what I have working on my website on Server 1.

According to the mail system settings on server 2, it says :

The mail system is activated. However, the MX record is pointing to an external IP. This may lead to some problems, for example, if you want to send an email in PHP script.

So that’s where I’m at…

In that case you do not need another MX record but you simply need to point your software to wherever the SMTP service is running. You best don’t use hostnames here as they’ll be proxied and it wouldn’t work. Use the IP address instead.

However that topic is not really Cloudflare related and better covered in a forum for system administration, e.g. StackExchange or Reddit.

1 Like

Okay. So basically:

  1. Delete the MX record for ‘forum’ i just created.
  2. Point my software to the SMTP service is I’m running.
  3. Don’t use hostnames as they’ll be proxied and it wouldn’t work.
  4. Use the IP address instead.
  5. And if I have any questions, ask StackExchange.

Okay! Thanks for all your time! I’m very grateful to be pointed the right direction. Thanks!

Essentially that, yes. If you point it to the right SMTP service you probably won’t need #5 but that depends on whether everything will work.

Cloudflare itself is not really involved here as you just need to configure your software to send mails via the right channel, which most likely will be either an SMTP port or the sendmail binary, but that’s really application specific and you won’t need DNS records.

Just make sure that you don’t use any proxied records if you use hostnames, as email won’t go over the proxies.

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