I am running into a problem which is as follows:
I have two domain names with different IPs;
The first is EXAMPLE.COM
to host my website. Say the IP for EXAMPLE.COM
is 111.111.11.11
.
The second domain is an FQDN to host my email, say that it is MAIL.EXAMPLE2.io
.
The DNS Console currently supports these record types on the graphical interface: A
, AAAA
, CNAME
, MX
, NS
, SRV
, TXT
.
I want to add A
record for MAIL.EXAMPLE2.io
on the DNS of my website EXAMPLE.COM
. But the website DNS has EXAMPLE.com
by default with each A record I add.
For example, if I want to add the below:
# Name Type Value
mail IN A 1.2.3.4
It will become like this:
# Name Type Value
MAIL.EXAMPLE.IO.example.com A 222.222.22.22
Or, I can add MAIL
alone, and it will become MAIL.Example.COM
.
How can I solve this problem where I enter the A record to become:
# Name Type Value
MAIL.EXAMPLE.IO A 222.222.22.22
Cloudflare has a better DNS configuration, and it will resolve my problem, but I don't want to use it on this website.
To better illustrate what I see, please look at this image:
When I run sudo docker-compose logs --tail=200 -f acme-mailcow
, I get these errors:
- Cannot match your IP
222.222.22.22
against hostnameautodiscover.EXAMPLE.COM
(DNS returned111.111.11.11
)- Cannot match your IP
222.222.22.22
against hostnameautoconfig.EXAMPLE.COM
(DNS returned111.111.11.11
)
Update:
The purpose of this update is to answer questions I received in the comments and make them visible to everyone.
- example2.io
The DNS configuration for example2.io where I host my mailserver is below. This is inline with mailcow documentation:Note that the root directory of this website points to a different IP other than the mailserver (i.e.,
333.333.33.33
) - example.com
The DNS configuration for the domain example.com where I want to host a website in the root directory is below. I want the emails of example.com to be handled through a mailserver hosted on mail.example2.io.To properly configure the mail on this domain, I want to remove .example.com from the configuration. That was possible on cloudflare DNS configuration.
- example3.com
example3.com is a domain name that I have its DNS record configured through Cloudflare and its email is handled through the mailserver example2.io. The DNS record configuration of this domain is below and this is how I am trying to configure example.com.
example2.io
? Where do theNS
records point? Is it configured with the same DNS servers asexample.com
?