Change Mail Server Default for subdomain

qunted

Registered
Mar 7, 2021
2
0
1
Indonesia
cPanel Access Level
Root Administrator
Hi, straight forward, I have some questions.

I have a cpanel account, example named example.com
and i have subdomain named subdom.example.com

then I made an email account named [email protected]

I turned on the Auto Discovery.

And when I register my email address to Thunderbird Mail Client using IMAP,
the default setting for Incoming Mail Server and Outgoing Mail Server are subdom.example.com

I still can received email but I cannot send email from thunderbird.

But when I change the smtp server in Thunderbird to mail.example.com I can send email

I want to set default Incoming & Outgoing Mail Server set to mail.example.com

Can I? and How?
Is this best practice to implement?

Thank You
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,425
696
313
cPanel Access Level
Root Administrator
Hey there! If there is not a proper SSL in place, the Autodiscover tools will use the hostname certificate. Is it possible that the hostname of the server is also the subdomain you are seeing?

You can check this by running the following command from any workstation or server:

Code:
curl http://autoconfig.yourdomain.com
and that will show the configuration options present. Here is an example of the output you should see:

Code:
# curl http://autoconfig.domain.com
<?xml version="1.0"?>
<clientConfig version="1.1">
    <emailProvider id="domain.com">
        <domain>domain.com</domain>
        <displayName>domain.com</displayName>
        <displayShortName>domain.com</displayShortName>
        <incomingServer type="imap">
            <hostname>mail.domain.com</hostname>
            <port>993</port>
            <socketType>SSL</socketType>
            <authentication>password-cleartext</authentication>
            <username>%EMAILADDRESS%</username>
        </incomingServer>
        <outgoingServer type="smtp">
            <hostname>mail.domain.com</hostname>
            <port>465</port>
            <socketType>SSL</socketType>
            <authentication>password-cleartext</authentication>
            <username>%EMAILADDRESS%</username>
        </outgoingServer>
    </emailProvider>
</clientConfig>