Merge branch 'master' into multiple-mailboxes

This commit is contained in:
Son NK 2020-05-11 10:21:59 +02:00
commit 36a8e311ea
2 changed files with 5 additions and 1 deletions

3
.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
# https://github.com/github/linguist#overrides
static/* linguist-vendored
docs/* linguist-documentation

View File

@ -499,7 +499,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)