Use mail server for many domain

Is it possible use domain1.com mail server to serve domain2.com, domain3.com etc… by setting mail server DNS records pointing domain1.com?
So it work similar style like SMTP mail providers. Now when I set every domain separate mail domain, I get complain on tester about reverse dns not matching with domain.

You should maintain 1 domain/subdomain for mailserver
for example mail.domain.com

Now make sure you add this mail.domain.com in your reverse DNS section (mostly handled by your server provider).

Then issue mailserver SSL for this mail.domain.com

Thats it.

Now all other domains where you need mail access, can either use mail.domain.com or mail.anydomain.com as smtp mail server address.

How I set DNS in cloudflare for other domains?

just mail.domain1.com as your subdomain with A record pointing to your server IP
MX record to mail.domain1.com
Issue SSL for this mail.domain1.com from "Websites > List domains > select “issue SSL” option for mail.domain1.com
Thats it.

Are I’m doing something wrong here? I can receive but not send with domain2.com. Domain1.com what I used set mail server works fine.

Seems wrong to me.

Let me explain once again. Keep one subdomain reserved for your mailserver. Lets take mail.domain.com as example.
So, first of all go to the DNS of domain.com and then add an A record for mail.domain.com

Add this mail.domain.com in the reverse DNS field of your server. (hosting side option and not cyberpanel related)

Issue mailserver SSL by going to "SSL > Mailserver SSL and select mail.domain.com (confirm whether a valid ssl was issued)

Then any domain you add in cyberpanel, just select mail subdomain option while creating it. and in its DNS records, just add its own DNS values and not mail.domain.com

For example, the domain you added is domain1.com
then its DNS records should have MX record with name domain1.com and value as mail.domain1.com
And add A record for mail.domain1.com
Issue SSL for mail.domain1.com

Thats all you need to do.

1 Like

This what I tried very first time but when check mail score it’s complaining reverse DNS not matching. Because rDNS point to mail.domain.com not mail.domain1.com. For domain.com I get 10/10 score but domain1.com not because rDNS.

This part if not created mail subdomain while creation can I just make one manually or it need to made while creating site? I have now bunch of site what I made with out creating mail subdomain and try get mail working.

I was keep adding mail server SSL on all domains…

Is this solved? Mails working fine now?

Somewhat working fine just have some issues connect to account to yahoo and MX toolbox complaining DKIM even mail-tester give 10/10

1 Like

Cyberpanel generated DKIM not passing all test. So I used online DKIM generator and replaced private key on /etc/opendkim/keys/domain.com and add new DKIM on DNS, now all DKIM test where ever try 100% authenticated.

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