14 lines
451 B
Python
Executable File
14 lines
451 B
Python
Executable File
#!/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))
|