webmin and MX records (bind-dns)

5 posts / 0 new
Last post
#1 Sun, 06/10/2012 - 21:28

webmin and MX records (bind-dns)

hello - i am posting this question again since i may have more information and won't sound like such an irritating newbie.

i wish to be able to manipulate my domain MX records. from my research, it appears i go to:

webmin-->servers--->BIND_DNS_Server, and select the domain i wish to associate MX records with. then click "Edit Records File" and then manually insert MX records into this file:

$ttl 38400 @ IN SOA ns1.dumbnewbie.com. root.ns1.dumbnewbie.com. ( 1338932982 10800 3600 604800 38400 ) @ IN NS ns1.edwardsmarkf.com. stupidnewbie.info. IN A www.stupidnewbie.info. IN A ftp.stupidnewbie.info. IN A m.stupidnewbie.info. IN A localhost.stupidnewbie.info. IN A webmail.stupidnewbie.info. IN A admin.stupidnewbie.info. IN A stupidnewbie.info. IN TXT "v=spf1 a mx a:stupidnewbie.info ip4: ?all"

i am really just guessing, but this looks pretty promising.

can anybody tell me if i am on the right track here? i would like to think there is a better way, like the way cPanel approaches it.

also, can i make it global for all domains, or do i have to do it individually?

ALSO - i see here:


there is an option to install either a "BIND 4 DNS Server" or a "BIND DNS Server" module plug-in. is this the way i should do it?

thank you!

Mon, 06/11/2012 - 11:16

Hi Edward

It isn't necessary to manually edit the records file, instead you have 2 choices:

Via Virtualmin

Choose the virtual server you wish to edit, then go to Server Configuration > DNS Records. At the bottom of the page, choose MX - Mail Server from the select box and then click on 'Create Record of Type'.

Enter the record name, which will be your domain name, leave the cache as default, set the priority according to your mail server requirements (if there is just one mx record then just use 5), in Mail Server Hostname, enter your MX record and then hit Save.

Via Webmin

Go to Webmin > Servers > BIND DNS Server, select your domain and then click on Mail Server at the top of the page.

From here the process is the same as described for the via Virtualmin option.

Either way, be sure to click on Apply Configuration in the top right hand corner of the Webmin > Servers > BIND DNS Server page. This will stop and restart bind so that your DNS changes are applied. Alternatively run

/etc/init.d/named restart


service named restart

Out of interest, what are your MX records that you'd like to use?

Mon, 06/11/2012 - 13:32

thank you virtual-noob! i feel silly now that i didn't see that option. you are right, that one does look much easier than manually editing zone-file records!

i have become something of a fan of using the google-apps mail. its really just a matter of pointing mx records like so:

1&1 Header Mail Server Priority MX 1 / Prio ASPMX.L.GOOGLE.COM 1 MX 2 / Prio ALT1.ASPMX.L.GOOGLE.COM 5 Further backups My mail exchanger [N/A] MX 3 / Prio ALT2.ASPMX.L.GOOGLE.COM 5 MX 4 / Prio ASPMX2.GOOGLEMAIL.COM 10

that way, when/if i ever need to change servers again, i dont need to worry about where the mail is being stored.

Mon, 01/07/2013 - 07:41


I don't see the "DNS Records" option in VirtualMin 3.97.gpl GPL. Do I need to enable it somewhere?

Mon, 01/07/2013 - 09:44


There should indeed be a "DNS Records" option within the "Server Configuration" menu.

If you don't see that, make sure that in Edit Virtual Server -> Enabled Features, that the "BIND DNS Domain"feature is enabled.

Also, you may also want to try logging into Virtualmin as root, just to rule out a permissions issue.


Topic locked