Can you "split" the {DOM} variable to {NAME} and {TLD}?

Guys,

We have a spam filtering service that requires domain name in the "abc-com" format rather than "abc.com" (e.g. {DOM}) format - hyphen rather than period. Can you "split" the {DOM} variable to {NAME} and {TLD}?

We can't create a hosting template (Bind) that will accommodate this requirement with the current "DOM" only variable.

Second, can you make those variables available as a pop-up/help screen inside virtualmin? Would be very handy to have those close at hand.

Thanks! -- Craig

Status: 
Active

Comments

Sure, this could be done. But what about domain names that have multiple parts, like abc.com.au ?

In that case it would be abc-com-au, so we would need ability to handle the county tld too...

This gets tricky, because a domain name can have arbitrary number of parts.

However, I just noticed that variables for the split parts already exist - they are $DOMPART0 , $DOMPART1, etc..

Good lord, is there a place where all the variables are documented? This is format is standard for anyone using MS Office 365 mail (domain-tld). As in:
@ IN MX      0 abcxyz123-com.mail.protection.outlook.com.

So what is $DOMPART0?
$DOMPART1?

Are those the only 2 or is there a 3rd to handle .com.au domains (for example)?

Thanks!

In this case, $DOMPART0 would be abcxyz123 and $DOMPART1 would be com