From cd25ce53024bcfdb310444942aab27e539f57284 Mon Sep 17 00:00:00 2001 From: Sean Whalen Date: Tue, 16 Jul 2024 14:38:23 -0400 Subject: [PATCH] 5.4.0 - Fix TLS/STARTTLS check (Fixes issue #138) - Consider `tls: true` if `starttls: true` - Handle records not existing if ignoring unrelated records (PR #131 fixes #130) - Query the base domain if a DMARC record is not found at the subdomain (PR #132) - Do not accept `include=` in the SPF record (PR #134 fixes issue #134) - Fix DNSSEC cache (PR #136 Fixes issue #137) - Fixed checking whether there is some text after `all` SPF directive (PR #139) --- CHANGELOG.md | 11 +++++++++++ checkdmarc/_constants.py | 2 +- checkdmarc/smtp.py | 9 +++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0bf25c..0346b58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ Changelog ========= +5.4.0 +----- + +- Fix TLS/STARTTLS check (Fixes issue #138) +- Consider `tls: true` if `starttls: true` +- Handle records not existing if ignoring unrelated records (PR #131 fixes #130) +- Query the base domain if a DMARC record is not found at the subdomain (PR #132) +- Do not accept `include=` in the SPF record (PR #134 fixes issue #134) +- Fix DNSSEC cache (PR #136 Fixes issue #137) +- Fixed checking whether there is some text after `all` SPF directive (PR #139) + 5.3.1 ----- diff --git a/checkdmarc/_constants.py b/checkdmarc/_constants.py index e6a0223..2566622 100644 --- a/checkdmarc/_constants.py +++ b/checkdmarc/_constants.py @@ -18,7 +18,7 @@ See the License for the specific language governing permissions and limitations under the License.""" -__version__ = "5.3.1" +__version__ = "5.4.0" OS = platform.system() OS_RELEASE = platform.release() diff --git a/checkdmarc/smtp.py b/checkdmarc/smtp.py index d395167..e98e95f 100644 --- a/checkdmarc/smtp.py +++ b/checkdmarc/smtp.py @@ -9,10 +9,6 @@ import smtplib from collections import OrderedDict import ssl -if not getattr(ssl, "HAS_SNI", False): - from urllib3.contrib import pyopenssl - - pyopenssl.inject_into_urllib3() import dns import timeout_decorator @@ -389,7 +385,8 @@ def get_mx_hosts(domain: str, skip_tls: bool = False, "records") for reverse_hostname in reverse_hostnames: try: - _addresses = get_a_records(reverse_hostname, resolver=resolver) + _addresses = get_a_records(reverse_hostname, + resolver=resolver) except DNSException as warning: warnings.append(str(warning)) _addresses = [] @@ -415,7 +412,7 @@ def get_mx_hosts(domain: str, skip_tls: bool = False, if not tls: warnings.append(f"SSL/TLS is not supported on " - "{hostname}") + f"{hostname}") host["tls"] = tls host["starttls"] = starttls except DNSException as warning: