PR comments

This commit is contained in:
Adrià Casajús 2022-03-30 09:53:35 +02:00
parent ac9b88f87d
commit 83fc8964a8
No known key found for this signature in database
GPG Key ID: F0033226A5AFC9B9
2 changed files with 1 additions and 1 deletions

View File

@ -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

View File

@ -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 (