These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for mass insertion of MX records for all virtual-servers on the new forum.
hello all -
if i wanted to make each and every one of my virtual-servers have the same identical MX records, is there some fast "batch" way to do it?
an earlier post mentioned doing it command-line style... would this be using some dns/bind command-line options, bypassing virtualmin? that sounded to me as if i would be doing them one at a time.
i have become something of a google-mail fan, so i wish all of my MX records to point to google.
THANK YOU ALL !
If it's just about manipulating MX records and having them all point to the same target, you can use Webmin's BIND module. There's a "Update/Add/Delete Records in selected" button which applies to all zones you select in the list.
Locutus - its difficult for me to express my full gratitude over a public forum, but please understand i am grateful to you!
sorry to be such a bother...
i am trying to enter these google MX records for all my domains (please see 00-google-mx attachment).
each MX record has a priority associated with it.
i go into the DNS-Bind server section (please see 01-bind attachment) - i check all the names,
then when i click "Add record to selected" i get the "Add record to zone" page (please see 02-add-record-to-zone attachment).
i don't see a place there for the priority number.
am i missing something? am i even in the right place?
You are right, there indeed is no dedicated field to enter the priority value.
But it should work just fine when you simply enter the priority number before the hostname in the "New record value" field, like so:
10 aspmx2.googlemail.com.
Don't forget to end the hostname with a dot, otherwise BIND will automatically append the current zone name to the address!
hmmm well it did the first record, but the subsequent ones i got an "already exists" warning.
here is an example of the only one it created:
and here are the results: (picture also attached)
i manually did one in its entirety and this was the result:
Are you sure you entered "5 alt1.aspmx.l.google.com" when you tried the second record?
Your post (especially the error message) looks to me like you tried the first record twice.
good morning -
here is how the zone records look now (as an example):
then i attempted to add in "5 ALT1.ASPMX.L.GOOGLE.COM." as a mail record - please see attached zone-record-creation.png
but i got an error complaining about duplicate records. please see attached result.png or look below.
i could select "Create even if record already exists?" but that makes me a little nervous.
we are getting VERY CLOSE....!
Okay, I'll try to reproduce that in a bit. What you're observing looks a lot like a Webmin bug to me.
I was able to reproduce this behavior; it is clearly a bug in Webmin. I'll write a bug report shortly.
A quick workaround would be, as you already mentioned, to use the "Create record even if it already exists" function. The second record gets created correctly, even though the error message talks about a different one.
You can try it with just one or two zones checked first to make sure it works.
if it helps:
Webmin version 1.590
Virtualmin version 3.94.gpl GPL
and please see attached
THANK YOU FOR HELPING ME!
Don't worry, the bug was already confirmed and will be fixed in the next Webmin version. :)
hmmm well then.....
getting back to the original question: can you think of any current way to mass-update all the mx records?
i am starting to think about some sort of custom php solutions to read the zone files manually.
note - usually the guy who finds the bug is awarded a gold star.
Well, what do you need to mass update them with? There is a "modify records in selected zones" function.
hi locutus -
suppose i have hundreds of virtual-servers and all are going to have identical MX records.
so, i want every virtual-server to have something like the following in the zone record:
so every virtual-server on my account will have these results (for example):
also, may i ask about your forum name? it sounds suspiciously like the same name Jean-Luke Picard was issued by the Borg. is there something you are not telling us?
Mh, is there anything wrong with using the "Add record to selected zones" to add all those? :)
The bug you discovered applies - like I mentioned - only the check if the record already exists:
A quick workaround would be, as you already mentioned, to use the "Create record even if it already exists" function. The second record gets created correctly, even though the error message talks about a different one. You can try it with just one or two zones checked first to make sure it works.
As for my nickname -- you'll know where it actually comes from as soon as you've been properly assimilated! ;D
(Kudos for actually knowing about Jean-Luc Picard as a Borg... Most people who ask me about the name rather have associations of large ugly bugs. ;) )
no, if it worked. i can add the first one:
1 ASPMX.L.GOOGLE.COM
but cant seem to add the subsequent ones, because of the bug you mentioned.
i will give the create-record option without checking for duplicates a try and see what happens. i am playing with it now, but strangely, "dig" is not seeing my changes. maybe i have to wait a couple of days......
and for the record, those Borg critters used to give me nightmares. that is, until i learned the queen borg was sorta cute.
i am thinking now to use some hybrid unix find-sed command to make global changes until virtualmin gets that bug fixed.
however, since all my virtual-servers are new, it appears i can use the very cool feature Server Template feature (attached)
i moved five domains over and all five appear to have the correct A and MX records.