Ver código fonte

add strip() to rcpt_to just in case

Son NK 5 anos atrás
pai
commit
7f6ba313fd
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      email_handler.py

+ 1 - 1
email_handler.py

@@ -314,7 +314,7 @@ def handle_forward(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, s
     """return whether an email has been delivered and
     the smtp status ("250 Message accepted", "550 Non-existent email address", etc)
     """
-    address = rcpt_to.lower()  # alias@SL
+    address = rcpt_to.lower().strip()  # alias@SL
 
     alias = Alias.get_by(email=address)
     if not alias: