• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Mail server name for DNS MX record?

calu

Basic Pleskian
Hi there, setting up DNS records for mail in this case in CloudFlare requires a mail server name for the MX record.
I can see that the installed mail server is Postfix, but that is not a name I can put into a MX record.

I have changed to a new server, and my old mail server name was server18.chosting.dk.

What domain name should I put into the MX record as mail server at CloudFlare?

Regards
Carsten
 
A common setup is to point your MX record to a 'mail' record from the same domain. So you would have a MX record that points to mail.example.com and an A record (and perhaps also an AAAA record for IPv6) that for 'mail' that points to your servers IP address.

But you can use the servers hostname in an MX record as well. So if your servers hostname is server2023.chosting.dk than you could use that als value also.

More information on MX records can be read here: https://www.cloudflare.com/learning/dns/dns-records/dns-mx-record/
 
Last edited:
Thanks for the reply, I'm running a Contabo VPS, but I don't know the servers host name, there is nothing under Server information in Plesk.
Can I find my server host name in Plesk?
 
Thank you very much for the clarification.
I can see that Plesk have settings for SMTP,
Do I still need to add a SMTP plugin like Easy WP SMTP to send over SMTP for outgoing mail in Wordpress?
 
Yes, you do need a SMTP plugin to send emails via SMTP in Wordpress. Regardless of you're using Plesk or not.
 
So you would have a MX record that points to mail.example.com
In that case, should I then first create a mail server in Plesk with the domain mail.example.com, the server has to be defined first in some way I guess?
 
Sorry for not understanding this correctly, but in the CloudFlare example the MX record has the value mailhost1.example.com, so I guess this is derivated from
the domain example.com added a mailhost1 in front of the domain. Can I just add mail to either the domain name or server name, just like that?

my domain is muii.dk, and since a MX record can not be the domain, can I then just add mail in front, so it would be
mail.muii.dk
or if I use my server name, I add mail to that?

mail.vmixxxxx.contaboserver.net
So either one would work?
 
Sorry for the misunderstanding, it is not a mail server which is created in Cyber Panel but a mail domain.
 

Attachments

  • Skærmbillede 2022-12-22 kl. 16.38.16.png
    Skærmbillede 2022-12-22 kl. 16.38.16.png
    278.5 KB · Views: 7
Sorry for not understanding this correctly, but in the CloudFlare example the MX record has the value mailhost1.example.com, so I guess this is derivated from
the domain example.com added a mailhost1 in front of the domain. Can I just add mail to either the domain name or server name, just like that?
You can use any value you like in your MX record, as long as the following conditions are met:
a) the value points to an existing DNS type A and/or AAAA record.
Which in turn can have any name you like. For example mailhost1, hyggelig or calu, but mail is more commonly used as it descriptive of it's usage.
b) the type A and/or AAAA record points to the IP of your mail server. (In this case your Plesk server).

Only one MX record is needed. (Multiple MX records are used for fallback purposes).

So, for example, when you create a MX record in CloudFlare you can use mail.muii.dk as it's value. Then, after creating the MX record, you also have to create an A type record with the name mail and add the IP address of your server as it's value. If you are also using IPv6 then you can create an AAAA type record, also with the name mail and your servers IPv6 address as it's value.
 
Hi there, I followed your advise here
when you create a MX record in CloudFlare you can use mail.muii.dk as it's value. Then, after creating the MX record, you also have to create an A type record with the name mail and add the IP address of your server as it's value.

Then I get this red warning sign next to my MX record:

This record exposes the IP address used in the A record on mail.muii.dk, which you have proxied through Cloudflare.
Does this mean anything, or should anything be changed?
 

Attachments

  • Skærmbillede 2022-12-22 kl. 19.26.30.png
    Skærmbillede 2022-12-22 kl. 19.26.30.png
    65.6 KB · Views: 7
Then I get this red warning sign next to my MX record:
Does this mean anything, or should anything be changed?
Yes, you should disable proxy for mail.muii.dk DNS record. Otherwise you won't be able to receive email on that domain. Because CloudFlare proxy blocks mail traffic.
 
Thanks, turning off proxy I receive the error for the mail A record instead.

This record exposes the IP address used in the A record on muii.dk. Enable the proxy status to protect your origin server.
 
Thats not an error but a warning. However you have not other option. Enabling the proxy will block receiving email.
 
Back
Top