Add imap. and smtp. to all newly created WHM domains

eugenevdm.host

Well-Known Member
Oct 21, 2019
53
6
8
Cape Town
cPanel Access Level
DataCenter Provider
WHM, by default, create a mail. DOT domain record for all new domains.

Hurah! Seems like the industry is liking this idea and I see it working in some autoconfig / autodisover wizards.

However, Samsung phone email clients and a bunch of other email clients do not support autoconfig / autodiscover and are stuck on these prefixes:

imap. DOT domain
smtp. DOT domain

So my question is how to update the universal template for all new domains?

For extra bonus points, how to add a record for all existing domains?

I recon I'll take around 5% less calls every month by doing this.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,810
895
313
cPanel Access Level
Root Administrator
Hey there! The best way to do this would be to use the WHM >> Edit Zone Templates and edit the standard and standardvirtualftp templates to include those records. That would make sure they are automatically applied to all new domains that are created on the server in the future.

There isn't a great way to add a record to all existing zones. You would need a custom script to do that work, such as the one outlined here: