PR comments

This commit is contained in:
Adrià Casajús 2022-04-06 17:44:05 +02:00
parent 33e83fc153
commit 44c77439c1
No known key found for this signature in database
GPG Key ID: F0033226A5AFC9B9
2 changed files with 2 additions and 3 deletions

View File

@ -1119,14 +1119,14 @@ def handle_reply(envelope, msg: Message, rcpt_to: str) -> (bool, str):
alias,
contact,
)
return (False, status.E504)
return False, status.E504
# Check if we need to reject or quarantine based on dmarc
dmarc_delivery_status = apply_dmarc_policy_for_reply_phase(
alias, contact, envelope, msg
)
if dmarc_delivery_status is not None:
return (False, dmarc_delivery_status)
return False, dmarc_delivery_status
# Anti-spoofing
mailbox = get_mailbox_from_mail_from(mail_from, alias)

View File

@ -182,7 +182,6 @@ def test_dmarc_reply_quarantine(flask_client, dmarc_result):
website_email="random-{}@nowhere.net".format(int(random.random())),
name="Name {}".format(int(random.random())),
reply_email="random-{}@{}".format(random.random(), EMAIL_DOMAIN),
automatic_created=True,
)
Session.commit()
msg = load_eml_file(