Bulk MX record adding to all domains.

ozgurerdogan

Verified User
Joined
Apr 20, 2008
Messages
343
Hello great people :)
Question is simple, I need to add second mx record to all domains. Can you guide me. Thanks in advance.
 
create /usr/local/directadmin/data/templates/custom
copy from /usr/local/directadmin/data/templates/
dns_mx.conf dns_a.conf and if needed dns_aaaa.conf
edit them as you want, run named conf rewrite:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d400
last string check zones
 
not sure, i don't have free server to test it now.
you can try to modify directly /var/named/dnszonefile.db's by perl script
you can google a lot of ready console commands to replace/add strings to files and modify it for Your purposes
 
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
This does not seem to be doing/updating anything.
 
Probably I miss something. But custom files are only affected on new account not existing one.
 
Yes following command added mx records to all domains. In case someone needs. domlist must contain all domains in server.
for x in `cat /bulk-dns-add/domlist` ; do echo "$x. 900 IN MX 0 mx.record.com." >> /var/named/$x.db ; done
 
Back
Top