Add DNS record management module for Mail-in-a-Box
This commit is contained in:
13
list-records.py
Executable file
13
list-records.py
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import miab.dns as miab_dns
|
||||
import json
|
||||
import argparse
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="List DNS records in Mail-in-a-Box")
|
||||
parser.add_argument("--type", type=str, help="Filter records by type (e.g., A, CNAME, MX)")
|
||||
args = parser.parse_args()
|
||||
records = miab_dns.list_records(record_type=args.type)
|
||||
for record in records:
|
||||
print(json.dumps(record, indent=2))
|
||||
Reference in New Issue
Block a user