Error with custom DNS MX records

Hi everyone

We use our MIAB to send and receive mails for a part of our company. As we already use Barracuda Cloud Control to filter incoming Mails for the other part of the company we also want to use it with MIAB.
To start and test some things we have set up an external DNS-Server. Almost everything works fine with it. Except it doesn’t allows us to set TLSA records. So we decided to use the integrated DNS server. But to use Barracuda we have to set the MX records to point to the Barracuda Mailservers.
If i try to add a Custom MX records i get an Error:

Custom DNS (Error)

500 Internal Server Error

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.


The custom MX record is in the Custom DNS records overview but it doesn’t work. It still answers with the original MX record. Is there anything i hae to change that it will work? Or is it not possible at all?


Placing a lot of custom records today I noticed that the Record Type MX was causing a problem.

I experienced the error within the normal custom DNS updated dialog box today after also reviewing why I could not get a sendgrid sender authentication record to verify Both TXT and MX newer entries and went hunting in /home/user-data/dns/custom.yaml.

Any (TXT or CNAME) custom entries after the MX record was entered seem to no longer be verifiable yet prior custom entries still work.

Thought maybe it related to my large number of custom dns entries and cleanup I had to do here for the v .53

After Submit for a MX type custom DNS record:

Dialog box:

<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

If Custom DNS entry submit button pressed again, the record will take with OK and shows just like all other working entries:

Seems to corrupt the DNS after the bad entry and even when accepted in MiAB after submit again, the MX doesn’t register when tested externally DIG or other verify but does still show as custom dns and external dns from the application.

I’ve removed the MX custom records and have other CNAME and TXT custom records entered after that now working.

In this troubleshooting process ran ./mailinabox/tools/dns_update --force
and received a message with some dns entries (something like returned non zero values) and thus I took the 2-3 domains listed when that occurred and deleted all my custom DNS entries (after copying) and then manually re-entered and then discovered the error triggered on the MX type custom dns entry.

After removing the MX and re-adding the other CNAME and TXT entries I confirmed that Sendgrid now verified my records with the exception of the now omited MX record.