500 Internal Server Error Editing DNS

Ok I discovered what my problem was in case anyone else runs into this issue.

The problem wasn’t on line 14 but the line after. Somehow I had an MX record without a priority, so it was

IN MX DOMAIN.

instead of something like:

IN MX 10 DOMAIN.

Once I deleted that line the ldns-signzone command worked.

However you can’t just delete it with vi, cause I did that and it got overwritten again, you have to delete the invalid record with the mailinabox web interface and then all DNS will update.

So the moral is be very careful when adding your MX records that they have a valid PRIORITY because mailinabox won’t sanity check them.