diff --git a/cmdeploy/src/cmdeploy/dns.py b/cmdeploy/src/cmdeploy/dns.py index 4f2af9b..60d78f5 100644 --- a/cmdeploy/src/cmdeploy/dns.py +++ b/cmdeploy/src/cmdeploy/dns.py @@ -183,13 +183,10 @@ def check_necessary_dns(out, mail_domain): ipv4 = dns.get("A", mail_domain) ipv6 = dns.get("AAAA", mail_domain) mta_entry = dns.get("CNAME", "mta-sts." + mail_domain) - mta_ip = dns.get("A", mta_entry) - if not mta_ip: - mta_ip = dns.get("AAAA", mta_entry) to_print = [] if not (ipv4 or ipv6): to_print.append(f"\t{mail_domain}.\t\t\tA") - if not mta_ip or not (mta_ip == ipv4 or mta_ip == ipv6): + if mta_entry != mail_domain + ".": to_print.append(f"\tmta-sts.{mail_domain}.\tCNAME\t{mail_domain}.") if to_print: to_print.insert(