[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] MX Records in DNS



webmaster@xxxxxxxxxx wrote:

> Hello all,
>
> Does anyone got an idea of how to set MX Records in a DNS server?
>
> All email of one of my domain names must be forwarded to 3 other email servers.
>
> When I create 3 MX records in the DNS and do a "dig mx domain.nl" command
> through Telnet, then you'll get such results:
>
> -----
> ;; ANSWER SECTION:
> domain.nl.               5h42m19s IN MX  30 mx.wirehub.net.
> domain.nl.               5h42m19s IN MX  30 mail.deabv.nl.
> domain.nl.               5h42m19s IN MX  30 mailme.wirehub.nl.
> -----
>
> What it needs to be is:
>
> -----
> ;; ANSWER SECTION:
> domain.nl.               5h42m19s IN MX  110 mx.wirehub.net.
> domain.nl.               5h42m19s IN MX  100 mail.deabv.nl.
> domain.nl.               5h42m19s IN MX  105 mailme.wirehub.nl.
> -----
>
> If you change "Delivery Precedence" in your Server Admin, you can get different
> values (between 20 and 50), but not the 100, 105 and 110...
>
> Second, if you open the file /etc/named/pri.domain.nl, there you can see these
> values, but you can't change them.
>
> If anyone got an idea of how to do this, please contact me.
>
> Thank you,
>
> Martin Waltmans

Hi Martin,

1)
Why are you wanting 100,105 and 110?  Any numbers will do really, its their relative values to each other that are important.

Heres one solution:
If you really want them, you can probably do this manually with an ".include" zone file !

create a file called "/etc/named/pri.domain.nl.include", and add the 3 MX entries you prefer:
    domain.nl.               5h42m19s IN MX  110 mx.wirehub.net.
    domain.nl.               5h42m19s IN MX  100 mail.deabv.nl.
    domain.nl.               5h42m19s IN MX  105 mailme.wirehub.nl.

(I would recommend copying the existing ones from the main zone, and then changing the numerical values, so the formatting etc is maintained)

Now, remove the 3 MX entries from the GUI interface, and save it.
Then when you do a
    cat /etc/named/pri.domain.nl

you should see something like this come up at the end:
    $INCLUDE pri.domain.nl.include

Done...
That will then be ALWAYS included, and you will have to edit the MX stuff manually next time you want to change them.

NOTE: I have not tested this with MX records, but it works just fine with "A records" and "Wildcard DNS entries" on my raq3.

2)
You can edit the DNS Zone files, but I would STRONGLY advise against it, (unless you never use the GUI).  As the GUI will overwrite them next time you make and changes in the dns section.  I am guessing that the Zones are held in the postgres database or similar, and are just written out to the zone files so that BIND can do its thing with them.   So editing them is a NO NO if you ever intend to use the GUI in the future :)

Have Fun!
--
Regards,
Kul
Kul's Free Scripts/Recipies: http://freebies.omega-isp.com/