cPanel with external DNS server and mail

tuxexpert

Registered
Sep 10, 2019
3
0
1
Slovakia
cPanel Access Level
Root Administrator
Dear Members,

If I want to use external DNS service
how to set different url for
mail services? (In cPanel)

Using mail01.mydomain.com
instead of using mail.mydomain.com
for example.

Also having issue with the certs if
the domain's main webpage is on
another server.

The last question in connection
with the above:
Where can be found the default urls?

Many Thanks!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,425
2,259
363
cPanel Access Level
Root Administrator
Hey there! AutoSSL would not be able to issue certificates if the domain is located on a separate system. You'd need to look to a purchased SSL solution for that configuration.

I'm not completely sure what you mean by "default URLs" - can you get me more details on that?

As far as the mail subdomain, you shouldn't need to do any customization in order to get that working. If you did want to do that, it wouldn't be any different than editing a DNS record like normal.
 

tuxexpert

Registered
Sep 10, 2019
3
0
1
Slovakia
cPanel Access Level
Root Administrator
Thank you for your answer.

About the URLs:

There are numerous domains what the system accepts without any setting like webmail.example.com cpanel.exampe.com or whm.example.com.
I mean these when asked a list about in my previous post.

There are numerous cases when you are not able to use the "default" because there is another machine using already in the network.
When I want to set up a second mail server with cPanel and with external DNS need to let the system know that I want to use another.
If we just set a new mail name like newmail.example.com and upload the cert, the system drops back to the cert what we use at whm and
not the required (What the server using itself... and the mail client drops error because the url mismatch). Tried with asterisk cert on cPanel.
 

tuxexpert

Registered
Sep 10, 2019
3
0
1
Slovakia
cPanel Access Level
Root Administrator
I try to explain below whit examples:

- I have a server on server.hosting.lan domain with a valid asterisk cert upoaded.

- I have a customer cPanel account on cpanel.customer.lan with a valid asterisk cert uploaded.

- The whm.hosting.lan works properly and the cpanel.customer.lan too.

- No DNS on the server (external)

- Want to reach the customers email through mailtwo.customer.lan domain (custom). The system gives back the *.hosting.lan cert. It is not valid here!

Need the solution for that, if it is possible.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,425
2,259
363
cPanel Access Level
Root Administrator
Thanks for that - that's exactly what I needed to know.

When the wildcard SSL is set up, it likely was only installed for cpane.customer.lan. However, when cPanel AutoSSL certificates are created, those cover every domain in the Apache configuration. For example, I would expect a standard vhost to have the following entries:

Code:
<VirtualHost 1.2.3.4:81>
  ServerName vhost.com
    ServerAlias mail.vhost.com www.vhost.com
What you likely will need to do is install your wildcard certificate multiple times, once each for each domain you want it to cover. You can do that through WHM >> Install an SSL Certificate on a Domain.

This will get you a secured vhost in the Apache config, but it will also apply the SSL to other services on the machine, such as the mailserver.

Can you try that and see if that gets things working how you expect?