mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 09:13:45 +08:00
take into account mailbox authorized address when check for spoofing
This commit is contained in:
parent
063885ccf7
commit
0a7643b367
1 changed files with 3 additions and 2 deletions
|
@ -732,8 +732,9 @@ async def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (boo
|
||||||
handle_bounce(contact, alias, msg, user)
|
handle_bounce(contact, alias, msg, user)
|
||||||
return False, "550 SL E6"
|
return False, "550 SL E6"
|
||||||
|
|
||||||
mailbox = Mailbox.get_by(email=mail_from, user_id=user.id)
|
# Anti-spoofing
|
||||||
if not mailbox or mailbox not in alias.mailboxes:
|
mailbox = get_mailbox_from_mail_from(mail_from, alias)
|
||||||
|
if not mailbox:
|
||||||
if alias.disable_email_spoofing_check:
|
if alias.disable_email_spoofing_check:
|
||||||
# ignore this error, use default alias mailbox
|
# ignore this error, use default alias mailbox
|
||||||
LOG.warning(
|
LOG.warning(
|
||||||
|
|
Loading…
Reference in a new issue