Bulk updating (or even just editing) Custom DNS records

Hey all,
I have been using Mail In a Box for about a year now and I am very happy with it. One annoying snag I bump into from time to time involves DNS records. My MiaB hosts email for five different domains, and and on two of them I have about a dozen subdomains for a number of other services hosted elsewhere.

Periodically I need to change the IP addresses for a dozen records, and right now I have to delete every single one and then manually re-add every single one. It is maddening. It would be incredibly helpful to be able to select a group of records and update them all at the same time, or at the very least put and [edit] button next to [delete] for each record so I don’t have to delete them and re-add them.

I have looked into scripting this via the API but that is not a tenable solution for me. This should be able to be achieved entirely though the WebUI.

If there is a bug bounty for this project I will gladly contribute towards this particular enhancement. It would make a world of difference for me.


Hi @millerjs

By chance, are the ‘dozen’ records you have to periodically change all located on the same IP address before and after? If so, CNAME’s are your friend.

Unfortunately not, they are spread across a few different servers/IPs.

Maybe you could update /home/user-data/dns/custom.yaml as a text file and then run a DNS update?


Did this work for you @millerjs?

I still have some Custom DNS entries for damains that have long been removed,
and [delete] button throws an error:
domain.name is not a domain name or a subdomain of a domain name managed by this box.

So if this works for you, it could solve my problem as well :slight_smile:

I haven’t tried it yet, but will late this afternoon. Will the changes to the yaml file be picked up automatically or does something need to be restarted or reloaded?

I assume you will need to run the dns_update.py script (but don’t actually know). After making the update to custom.yaml, I would try going through the web interface and making another DNS change to have it run the DNS update.

This worked - I manually edited the custom.yaml file, then I added one record manually through the UI, and all the records updated.

I’m not comfortable with this as a day-to-day operation but for special cases… I suppose it’s acceptable.

This topic was automatically closed after 61 days. New replies are no longer allowed.