commit 09e333d6c0406e164e62779737ccc475507d73c3 Author: Isis Lovecruft isis@torproject.org Date: Mon Jun 9 19:36:54 2014 +0000
Fix bug with weird '550 Sender not permitted' SMTP responses.
When raising a `twisted.mail.smtp.SMTPBadSender`, we were giving it the origin's domain name as argument, which ended up with weird messages like '550 Cannot receive from specified address example.com@localhost: Sender not acceptable' being sent out. Apparently, SMTPBadSender want the whole origin object, not just the domain.
* CHANGE raising of SMTPBadSender in b.e.server.SMTPIncomingDelivery.validateFrom() to use the whole origin object, not just the domain, as its argument. --- lib/bridgedb/email/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bridgedb/email/server.py b/lib/bridgedb/email/server.py index 62d3bff..aa3e08c 100644 --- a/lib/bridgedb/email/server.py +++ b/lib/bridgedb/email/server.py @@ -296,7 +296,7 @@ class SMTPIncomingDelivery(smtp.SMTP): self.fromCanonicalSMTP = canonical except UnsupportedDomain as error: logging.info(error) - raise smtp.SMTPBadSender(origin.domain) + raise smtp.SMTPBadSender(origin) except Exception as error: logging.exception(error)