mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 09:13:45 +08:00
return 250 instead of 451 when SPF fails
This commit is contained in:
parent
f9daaf9bd2
commit
7c55c5c44a
1 changed files with 2 additions and 1 deletions
|
@ -483,7 +483,8 @@ def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, str
|
|||
if ENFORCE_SPF and mailbox.force_spf:
|
||||
ip = msg[_IP_HEADER]
|
||||
if not spf_pass(ip, envelope, mailbox, user, alias, contact.website_email, msg):
|
||||
return False, "451 SL E11"
|
||||
# cannot use 4** here as sender will retry. 5** because that generates bounce report
|
||||
return True, "250 SL E11"
|
||||
|
||||
delete_header(msg, _IP_HEADER)
|
||||
|
||||
|
|
Loading…
Reference in a new issue