From 44c77439c157bf8d1296f56210ebf84914d95829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Wed, 6 Apr 2022 17:44:05 +0200 Subject: [PATCH] PR comments --- email_handler.py | 4 ++-- tests/test_email_handler.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/email_handler.py b/email_handler.py index 12e71137..3734ffd6 100644 --- a/email_handler.py +++ b/email_handler.py @@ -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) diff --git a/tests/test_email_handler.py b/tests/test_email_handler.py index f16faa8c..805c7524 100644 --- a/tests/test_email_handler.py +++ b/tests/test_email_handler.py @@ -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(