From 83fc8964a8e6b116ca6ddce34efe36742bfc2902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Wed, 30 Mar 2022 09:53:35 +0200 Subject: [PATCH] PR comments --- app/models.py | 1 - email_handler.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index a756e1de..b40ca741 100644 --- a/app/models.py +++ b/app/models.py @@ -283,7 +283,6 @@ class SpamdResult: def __init__(self): self.dmarc: DmarcCheckResult = DmarcCheckResult.not_available self.spf: SPFCheckResult = SPFCheckResult.not_available - self.domain = "unknown" def set_dmarc_result(self, dmarc_result: DmarcCheckResult): self.dmarc = dmarc_result diff --git a/email_handler.py b/email_handler.py index e932893e..1eb37147 100644 --- a/email_handler.py +++ b/email_handler.py @@ -2594,6 +2594,7 @@ class MailHandler: with create_light_app().app_context(): return_status = handle(envelope, msg) elapsed = time.time() - start + # Only bounce messages if the return-path passes the spf check. Otherwise black-hole it. if return_status[0] == "5": spamd_result = get_spamd_result(msg) if spamd_result and get_spamd_result(msg).spf in (