Feature Request: Multiple DNS templates

mmgenius

Verified User
Joined
Jan 20, 2004
Messages
178
On reseller level:

Possibility to create multiple DNS templates that you can connect to a user and/or (even beter) to a package.
If the user creates a new extra domain it should also remember which dns template was connected to this user.

Maybe also (if not yet possible) make it possible to change the default DNS template, or set a DNS template as default.

(All of this only possible if the reseller has DNS Control)
 
Hello,

At this time, it is possible, but it's only accessible via root.
We can leave the request open, but as a solution for now, you can set different values in your dns_*.conf templates using the if-then-else system.

The tokenized value you can play with are:
Code:
IP
DOMAIN
IS_IPV6   (yes or no)
USERNAME
SERVER_IP
so you can set the IP or the values based on any of these tokens.

John
 
Can you make a tokenized value for the package?
Or can we check the package with the user_*_pre.sh scripts?

Because we need this script at user-creation to change 2 A-records.
If we need to login to the server using SSH, open the dns_a.conf file, add the if structure for the new user. It is faster to change the 2 A-records within DA after user creation :)

Thx

EDIT:
Asked to early :)
There is a 'package' tokenized value available in the user_*_pre.sh scripts. I do some tests with this. Thx for your answer.
 
Last edited:
I personaly can see the use of this, when you create a domain with Google Apps, it will save a lot of time. so +1 from me
 
Hello,

At this time, it is possible, but it's only accessible via root.
We can leave the request open, but as a solution for now, you can set different values in your dns_*.conf templates using the if-then-else system.

The tokenized value you can play with are:
Code:
IP
DOMAIN
IS_IPV6   (yes or no)
USERNAME
SERVER_IP
so you can set the IP or the values based on any of these tokens.

John

Hi,

Could you give example of working code for package?

best regards,
Thomas
 
Hello,

I've just added a PACKAGE token to all dns_*.conf files for the next release:
http://www.directadmin.com/features.php?id=1375

The pre-release binaries should be available later today with this new token.

eg for the dns_mx.conf:
Code:
|*if PACKAGE="remotemail"|
mail.remoteserver.com.=10
|*else|
mail=10
|*endif|
which can be used after you grab the pre-release binaries today (Sept 20th) or newer. (output from './directadmin o')

John
 
It would be even better if this could work on a per custom feature level. Different plans could share the same features and it would be less messy than doing
Code:
|*if PACKAGE="planA"||"planB"||"planC"|
which is probably not supported anyway.

Also if custom variables are made available to resellers, it would require zero work to make it work whereas with the current proposed solution, each reseller plan would have to be added to the template.
 
The somewhat longer template version of that *if, would be:
Code:
|?HAVE_IT=0|
|*if PACKAGE="planA"|
|?HAVE_IT=1|
|*endif|
|*if PACKAGE="planB"|
|?HAVE_IT=1|
|*endif|
|*if PACKAGE="planC"|
|?HAVE_IT=1|
|*endif|
|*if HAVE_IT="1"|
google_dns=8.8.8.8
|*endif|
for a random example of google_dns.domain.com.

I do think there is pull to the custom options in the templates, so will starting thinking about good ways to add it in.

John
 
Hi,

I added this code to my dns_a.conf file in /usr/local/directadmin/data/templates/custom.

|*if PACKAGE="remotemail"|
mail=86.111.247.23
smtp=86.111.247.23
pop=86.111.247.23
|*else|
smtp=|IP|
mail=|IP|
pop=|IP|
|*endif|

In reseller account, I added a "remotemail" package.
However, when I create a new user based on "remotemail" package,
Only values ​​from "else" are taken

Regards,
Thomas
 
Back
Top