Does Maradns have support for RFC 7505 "Null MX" No Service records (i.e. can we use "." for non-existant MX and SRV records)? #132
-
Hi gang, I've been a happy Maradns user for a couple of decades now, and have recently had occasion to set up some new domains on my server. Given that these are specific purpose domains, it seemed reasonable to implement RFC 7505 Null MX to reduce spam traffic to the site. RFC 7505 says that domains which do not receive email should return MX RDATA with
However, it seems like Maradns does not like lines of the form
giving an error of
Is there another format to write null mx records in? Or is this scenario simply not supported? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Finally had a chance to look at the code to try and see what might be behind this. It looks like the My first instinct was the minimal fix was to change from I suspect the correct fix is to introduce a new function (maybe called
and then modify
(The above are manually constructed pseudo-diffs for human consumption, because I'm not at my dev machine. I will test the fix out later today when I get chance.) @samboy - if this tests out correct, would you like me to create a pull request for this, or would you just apply the changes as described above? If you want a pull request, do you have a preference for what to name the new function, or is After writing this all up, I decided to check where else As noted in my original post, RFC 7505 requires that For
So we should probably also update
I don't know enough about |
Beta Was this translation helpful? Give feedback.
-
Having been digging through the inner workings of it all, I just realised that there might be a way to get the right outcome without modifying the code, using
is an answer section consisting of a record type of
Similarly, a non-existant service would have an
I will test these out later as well and confirm if they work - for folk who don't want to or can't update the code, this method could be a suitable alternative. Despite not being as easy to read, they're relatively straightforward as most of the "magic numbers" are zero... |
Beta Was this translation helpful? Give feedback.
Having been digging through the inner workings of it all, I just realised that there might be a way to get the right outcome without modifying the code, using
RAW
records. This is untested at the moment, but if I understand the format correctly, the expected outcome of a record like:is an answer section consisting of a record type of
15
forMX
, with rdata consisting of a 16-bit integer of0
(so 2 octets of0
) followed by a "zero-length" label, which would be represented by a single octet of0
. That should mean that the following raw record should be correct encoding of a null MX record.Similarly, a non-existant service would have an
SRV
rec…