From 00e0b69c763ec08d69172da17d32d85377f1d419 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Fri, 4 Jun 2021 17:45:51 +0200 Subject: [PATCH] accept email sent to an alias from its mailbox --- email_handler.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/email_handler.py b/email_handler.py index 04c059f6..bdc1e531 100644 --- a/email_handler.py +++ b/email_handler.py @@ -492,13 +492,13 @@ def handle_forward(envelope, msg: Message, rcpt_to: str) -> List[Tuple[bool, str LOG.w("User %s disabled, disable forwarding emails for %s", user, alias) return [(False, "550 SL E20 Account disabled")] - mail_from = envelope.mail_from - for mb in alias.mailboxes: - # email send from a mailbox to alias - if mb.email == mail_from: - LOG.w("cycle email sent from %s to %s", mb, alias) - handle_email_sent_to_ourself(alias, mb, msg, user) - return [(True, "250 Message accepted for delivery")] + # mail_from = envelope.mail_from + # for mb in alias.mailboxes: + # # email send from a mailbox to alias + # if mb.email == mail_from: + # LOG.w("cycle email sent from %s to %s", mb, alias) + # handle_email_sent_to_ourself(alias, mb, msg, user) + # return [(True, "250 Message accepted for delivery")] LOG.d("Create or get contact for from:%s reply-to:%s", msg["From"], msg["Reply-To"]) # prefer using Reply-To when creating contact