PR comments
This commit is contained in:
parent
ac9b88f87d
commit
83fc8964a8
|
@ -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
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue