mirror of
https://github.com/simple-login/app.git
synced 2024-09-27 20:31:30 +02:00
fix alias != address
This commit is contained in:
parent
edcdbabc93
commit
ca4f02426c
@ -295,14 +295,14 @@ def prepare_pgp_message(orig_msg: Message, pgp_fingerprint: str):
|
||||
|
||||
def handle_forward(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> str:
|
||||
"""return *status_code message*"""
|
||||
alias = rcpt_to.lower() # alias@SL
|
||||
address = rcpt_to.lower() # alias@SL
|
||||
|
||||
alias = Alias.get_by(email=alias)
|
||||
alias = Alias.get_by(email=address)
|
||||
if not alias:
|
||||
LOG.d("alias %s not exist. Try to see if it can be created on the fly", alias)
|
||||
alias = try_auto_create(alias)
|
||||
alias = try_auto_create(address)
|
||||
if not alias:
|
||||
LOG.d("alias %s cannot be created on-the-fly, return 510", alias)
|
||||
LOG.d("alias %s cannot be created on-the-fly, return 510", address)
|
||||
return "510 Email not exist"
|
||||
|
||||
mailbox = alias.mailbox
|
||||
|
Loading…
Reference in New Issue
Block a user