|EMAIL| placeholder in named.conf

paulo

Verified User
Joined
Nov 8, 2021
Messages
17
Hello all,

This is my first question here; I'm trying to migrate from cPanel to DA and I'm still in the "learning phase" -- apologies if this is a banal question.

When a new account is created, the SOA part of the DNS record includes what appears to be a hardcoded email address (in the form of '[email protected]'). We have a dedicated email address for this purpose and would like to continue to use the same. The template in
/usr/local/directadmin/data/templates/named.db
shows a placeholder
|EMAIL|
but I don't know where this can set so that all new accounts will use our preferred email address.

Can someone kindly point me in the right direction?

Many thanks in advance,

Paulo
 
You might try to customize this. Normally custom templates are made here:
/usr/local/directadmin/data/templates/custom
You can copy /usr/local/directadmin/data/templates/named.db to the custom directory and adjust it do your needs. Maybe put a hardcoded email in there if it's always the same.

After the change, run this command so it will work and put into the named files:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
 
Thanks for the feedback, Richard. Your suggestion seems logical, yes.
I was just wondering whether it's really necessary since other placeholders (for example, |NS1| and |NS2| ) appear to be defined in
/usr/local/directadmin/conf/directadmin.conf
Perhaps the same could not be done also for |EMAIL| ?... I could, of course, try it -- but being new to DA I didn't want to risk breaking something... :)

Sorry if the question is naive: the command that you indicated will rewrite all existing files (for all the domains in the server)?

Thanks again.
 
I was just wondering whether it's really necessary since other placeholders (for example, |NS1| and |NS2| ) appear to be defined in
/usr/local/directadmin/conf/directadmin.conf
Perhaps the same could not be done also for |EMAIL| ?
Hmmz..... you've got a good one there. I don't know. I checked the page for the "all directadmin.conf values" but as far as I can see, the hostmaster email is not taken from there (but I could be wrong), so I don't know where that is specified. Maybe someone else can tip us about that?

the command that you indicated will rewrite all existing files (for all the domains in the server)?
Yes as far as I know it will because you will rewrite all named values. However I would still check after using this command if it's indeed replaced or that it's added. It should replace the current one.

Also because you would use the /custom directory in the template directory and the changed named.db template, it will be used for all domains which will be created newly.
 
I just found a post from Zeiter. You might want to use this command after the rewrite command:
/usr/local/directadmin/dataskq d800
not sure if it's really required, but it can't harm either. :)
 
Many thanks, Richard. :)
Sorry for the late acknowledgement -- busy days... ?
 
You're welcome. :)

No need to be sorry, it wasn't that late, not even 2 full days. And better late then never anyway. ;)
 
Back
Top