syntax error in MX record

Here's one that worked in NSD 1 but breaks in NSD 2:

@ 12h IN MX 0 @

It seems that the check on valid characters for the target host name for
the MX doesn't include the "@". I wonder if it works for ".". I worked
around this for now.

[On 16 Aug, @20:35, Phil wrote in "syntax error in MX record ..."]

Here's one that worked in NSD 1 but breaks in NSD 2:

@ 12h IN MX 0 @

It seems that the check on valid characters for the target host name for
the MX doesn't include the "@". I wonder if it works for ".". I worked
around this for now.

yep, that doesn't work...

Currently the zone compiler only matches ^@. Matching a lonely @
isn't too hard though (I think). I will post a patch tomorrow (CEST),

grtz Miek

[On 16 Aug, @20:35, Phil wrote in "syntax error in MX record ..."]

Here's one that worked in NSD 1 but breaks in NSD 2:

@ 12h IN MX 0 @

It seems that the check on valid characters for the target host name for
the MX doesn't include the "@". I wonder if it works for ".". I worked
around this for now.

here is a patch against 2.1.2. This should add the usage of @ in the
rdata of any type. I only tested it MX and NS,

grtz Miek

--- begin patch ----
Index: RELNOTES

It worked in my test for MX. Thanks. This makes it easy for a single
common zone file to be used for many zones, without having to add an
extra name for the MX host.

$TTL 12h
@ 12h IN SOA @ hostmaster 272965334 3h 30m 10d 12h
@ 12h IN NS @
@ 12h IN A 10.1.2.3
@ 12h IN MX 0 @
www 12h IN A 10.1.2.3

It also worked in PTR (which I expected from reading the patch). Useless
there, but at least it's universal.

@ 12h IN PTR @

[On 18 Aug, @10:49, Phil wrote in "Re: syntax error in MX record ..."]

> here is a patch against 2.1.2. This should add the usage of @ in the
> rdata of any type. I only tested it MX and NS,

It worked in my test for MX. Thanks. This makes it easy for a single
common zone file to be used for many zones, without having to add an
extra name for the MX host.

nice to hear. I will commit the patch.

$TTL 12h
@ 12h IN SOA @ hostmaster 272965334 3h 30m 10d 12h
@ 12h IN NS @
@ 12h IN A 10.1.2.3
@ 12h IN MX 0 @
www 12h IN A 10.1.2.3

It also worked in PTR (which I expected from reading the patch). Useless
there, but at least it's universal.

@ 12h IN PTR @

the @ is handled in the lexer, which doesn't know anything about RR
types. And of course NSD works under the principle of garbage in,
garbage out :slight_smile:

grtz Miek

Which is also called "administrator responsibility".