SOLVED [CPANEL-20535] Adding MX records to subdomains

rinkleton

Well-Known Member
Jul 16, 2015
116
6
68
Cleveland
cPanel Access Level
Root Administrator
It's now possible to browse to "cPanel >> Zone Editor >> Manage >> Add Record >> Add MX Record" and replace the "name" field with the subdomain name instead of the parent domain name.
This this still work in V70? I've enabled both Zone options in Feature Manager. When filling in "Name", it autocompletes to the full domain name and fails with the error: adminbin Cpanel/mx/ADD: exit 29. Using UAPI Email::add_mx it fails with adminbin Cpanel/mx/ADD: exit 255. I haven't tried it with the zone editor API. But using the WHM zone editor interface, it does accept it.

Also, when on the Email Routing page, and you select a subdomain entry, it never will show you any email routing selected. If you run the cpanel2 api call to get routing, it will return the correct value. If you are lucky enough to have WHM access, and you can set an MX record for the subdomain, it will properly show you the value.

I do have to voice my displeasure with this change. At the very least it is confusing and inconsistent. But it certainly looks like their is some funkiness with it.
 

rinkleton

Well-Known Member
Jul 16, 2015
116
6
68
Cleveland
cPanel Access Level
Root Administrator
Also, I get the same errors when it's setup as an addon domain. I'm assuming this is because the subdomain part of addons shares functionality with the regular "subdomains."

I know in the past creating a domain that is really a subdomain of the primary domain as the "Domain" field of an Addon domain had issues. I think it was relating to SPF or DKIM records not being written to the correct zone file. Hopefully all that has been corrected. If it has, I'd say the rule is: Never use aliases or subdomains or the the subdomain field of addon domains. ALWAYS just use the domain field of Addons. It solves a lot of problems. The only annoyance is it forces a subdomain which is not needed.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @rinkleton,

I moved these posts to a separate thread.

The following case is included in cPanel & WHM version 70.0.47 and should solve the issue you have reported:

Fixed case CPANEL-20535: Fix adding MX records to subdomains.

Thank you.