I tried to ad a TXT record with an underscore in the name, example: _something.mydomain.tld
However I get this error: Failed to save record : '_something.mydomain.tld' is not a valid record name
If I remove the underscore from it, I can add the record.
Underscore should afaik be legal i several record types, the very least TXT, SRV and CNAME.
Tested with CNAME and got the same result.
Oh, wait, I’m assuming you’re talking about the BIND module, but you haven’t actually specified that. Where are you adding these records? Local BIND or a cloud provider or something else?
Maybe I am doing this the wrong way around but it makes sense for me it should work both ways?
So editing the zone from Virtualmin (realising this is a virtualmin thread, I should really be in bed by now…) works, Virtualmin > DNS > DNS Recordsand adding a TXT record with a _ inthe beginning of the name worked.
Doing the same from Webmin > Servers > Bind DNS Server > [zone] > Text and adding a TXT record with _ in the beginning fails. Suppose it could be done from the Edit Zone Records File though.
I’m able to do it directly in the BIND module, as well. So, this is confusing. You absolutely should be able to create a record with an underscore via any path in Virtualmin or Webmin, and I can’t reproduce not being able to, thus far.
see pictures below.
I have tried on two different webmin servers now, on four different zones, one newly created mydomain.tld
All attempts end up with the same thing, as soon as a _ is in the beginning of the name it fails.
Removing the _ succeeds.
That ticket indicates the option was disabled by default in new installs (it’s configurable in the BIND module configuration, click the icon) due to BIND no longer allowing _ in many record types, but that was overzealous. It should still be allowed in TXT, CNAME, SRV, PTR, TLSA, CAA, NAPTR records, regardless of that config option.
So, it’s a bug, but not a super simple one. Working on it.