MX record for hosts

Miky

Verified User
Joined
Jun 22, 2004
Messages
34
Location
Australia
I just came across a little DNS issue and although I found the solution to it, I'm wondering why DA doesn't allow it to be done the way I was initially trying to do it ... it easily could, is there a reason ? .


I would think that the purpose of the DNS management tool is to be able to add/modify/delete pretty much anything you want in a zone file.

Say a User wants to add an A record for his home computer/office server on static IP , he just has to add an A record.

Say he now wants this same computer to also be it's own MX for this 'subdomain'. In theory , he'd just have to add an MX record in the domain zone file for the concerned host , pointing to the host itself (added above).

The way the DA DNS tool handles MX records does not allow this to be done. The template only takes the destination for the MX record, and automatically assumes that it is an MX record for 'domain' , not for the remote host.

The way it displays Name/Type/Value for an MX record is also a bit weird (To my eyes anyway)

Name: mail , Type MX, Value: 10

Why not

Name: domain.com Type: MX, Value: 10 mail (or 10 mail.domain.com)

Wouldn't it be more logic if the template could just take a hostname, an MX priority value and a destination host ?

If I wanted to be fussy i'd even say that the hostname can be a pulldown box with the domain name as the first option followed by any other hosts listed with an A record in the zone. But that would only be cosmetic really.

Anyway my logic was , to just have to add an A record for a host, add an MX record for it ( source MX XX destination)

This was not be possible, instead the host(subdomain) has to be added as a domain so it has it's own zone file, A records changed, MX changed, and local email processing disabled.

Not winging ... just wondering, might be a valid update to think about :)

Miky
 
Last edited:
Miky said:
This was not be possible, instead the host(subdomain) has to be added as a domain so it has it's own zone file
Yes, and to make it a legal (RFC-compliant) zone file you then need to add ns record for it to the parent domain's zone file.

Which DA DNS management doesn't let you do, either.
Not winging ... just wondering, might be a valid update to think about :)

I believe you meant "not whining" :) .

Anyway, I agree with you that DA needs to make some heavyduty changes to DNS management at some time in the future.

In the meantime, if you've got admin/root access to the server you can go back to your first way, but make the entries manually, and DA will accept them and not change them.

Jeff
 
Yes i meant 'not whining' ... no doubt I can't write, but the spell checker is even worse than I am hehe

Yes, I couldn't add the proper NS records neither ...

I haven’t edited the zone manually but do you know what would happen if the zone is then modified via DA ... does it only change modified records or rewrites the whole lot and breaks what's been added manually ?

We've only recently started to setup servers with DA and I'm in the middle of transferring sites, mission impossible !!
I can see that there is defiantly room for improvement with DA, but those little problems don't change my mind, it is comparing Heaven(DA) VS Ensim(hell). Or am I being nasty here :)

Miky
 
Re: Re: MX record for hosts

jlasman said:
Yes, and to make it a legal (RFC-compliant) zone file you then need to add ns record for it to the parent domain's zone file.

Which DA DNS management doesn't let you do, either.

Anyway, I agree with you that DA needs to make some heavyduty changes to DNS management at some time in the future.

In the meantime, if you've got admin/root access to the server you can go back to your first way, but make the entries manually, and DA will accept them and not change them.

Hi - I'm wondering if we're in the "future" yet?

to set MX records for subdominas / add ns records for subdomains it appears that I still need to be making these changes as root.

If I do modify the files in /var/named/ ... then what will happen if I / my users try to make changes to the DNS using directadmin?

also if I modify /etc/named.conf to add records for other domains not managed by DA will these be left alone?

I am hoping that they will be able to modify any records that DA understands, and that DA will not touch any records that it does not understand...

am I being too hopeful here? :)

- Dan.
 
Hello,

DA itself doesn't know what a subdomain's MX record would be.. it doesn't do subdomain mail, persay. You can create a subdomain as a full domain, thus giving that subdomains it's own dns zone allowing you to edit anything you want for that subdomain. You will end up with 2 zones, one for the subdomain, one for the domain, but named can handle that just fine.

Currently NS records can be setup for actual subdomains in a domains zone, but MX's still cannot.

You can add anything to the named.conf you'd like.. DA only does line by line adding/removing, so if the line you add isn't what DA's looking for, it wil be left alone. For the zone file itself, if you edit through DA, any rewrite by DA will use the template so has to be "DA readable" if you want actual subdomain MX records (have to have it's own zone as mentioned above).. so just don't edit in DA if you have special records like that.

Note that if you call a full dns rewrite, then your custom zones will end up being overwritten, so just avoid doing that ;) (it's not done unless you tell it to with:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

John
 
Back
Top