Add dns-config module for Mail-in-a-Box DNS management and Azure integration

This commit is contained in:
2026-04-12 22:06:24 +02:00
parent d9b1b5f869
commit c5170e67b0
6 changed files with 205 additions and 0 deletions

29
dns-config/README.md Normal file
View File

@@ -0,0 +1,29 @@
# Mail-in-a-Box DNS Configuration Module
The `dns-config` module provides a command-line interface and a module to configure Mail-in-a-Box's server to delegate a DNS zone to Azure DNS. It retrieves the nameservers for a given Azure DNS zone and sets up the necessary DNS records in Mail-in-a-Box to delegate the zone to Azure DNS.
The module also contains additional commands to list Azure or Mail-in-a-Box DNS records. It can also be used to set, update, add or delete DNS records in Mail-in-a-Box.
## Usage
The following commands are available in the `dns-config` module:
- `list-azure`: List Azure DNS records for a given resource group and zone name.
- `list-miab`: List Mail-in-a-Box DNS records of a given type (A, CNAME, MX, etc.).
- `set`: Set a DNS record in Mail-in-a-Box.
- `add`: Add a DNS record in Mail-in-a-Box.
- `delete`: Delete a DNS record in Mail-in-a-Box.
Each command has its own `--help` option that provides more information on how to use it.
To automatically configure an Azure DNS zone in Mail-in-a-Box, you can use the following command:
```bash
python -m dns-config configure-miab --resource-group <RESOURCE_GROUP> --zone-name <ZONE_NAME>
```
Then list the Mail-in-a-Box DNS records to verify that the delegation records have been added:
```bash
python -m dns-config list-miab --type NS
```