From 93d270baf41cee7b071302a59cd2df74e2824a73 Mon Sep 17 00:00:00 2001 From: Carlos Quintana Date: Mon, 2 Jun 2025 13:18:58 +0200 Subject: [PATCH] chore: change log messages for email_handler --- email_handler.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/email_handler.py b/email_handler.py index 12306204..097f9025 100644 --- a/email_handler.py +++ b/email_handler.py @@ -632,7 +632,15 @@ def handle_forward(envelope, msg: Message, rcpt_to: str) -> List[Tuple[bool, str return [(True, status.E502)] if not alias.enabled or alias.is_trashed() or contact.block_forward: - LOG.d("%s is disabled, do not forward", alias) + if not alias.enabled: + LOG.d("%s is disabled, do not forward", alias) + + if alias.is_trashed(): + LOG.d("%s is trashed, do not forward", alias) + + if contact.block_forward: + LOG.d("Contact %s of alias %s is blocked, do not forward", contact, alias) + EmailLog.create( contact_id=contact.id, user_id=contact.user_id,