Explorar o código

Merge branch 'master' into multiple-mailboxes

Son NK %!s(int64=5) %!d(string=hai) anos
pai
achega
36a8e311ea
Modificáronse 2 ficheiros con 5 adicións e 1 borrados
  1. 3 0
      .gitattributes
  2. 2 1
      email_handler.py

+ 3 - 0
.gitattributes

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

+ 2 - 1
email_handler.py

@@ -499,7 +499,8 @@ def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, str
     if ENFORCE_SPF and mailbox.force_spf:
     if ENFORCE_SPF and mailbox.force_spf:
         ip = msg[_IP_HEADER]
         ip = msg[_IP_HEADER]
         if not spf_pass(ip, envelope, mailbox, user, alias, contact.website_email, msg):
         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)
     delete_header(msg, _IP_HEADER)