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(