[tor-commits] [bridgedb/master] Update b.e.server.validateTo() docstring.

isis at torproject.org isis at torproject.org
Fri Jun 6 23:39:14 UTC 2014


commit 5827bc9136d66bc5a97dc80995b6079cc5787890
Author: Isis Lovecruft <isis at torproject.org>
Date:   Wed May 28 18:18:13 2014 +0000

    Update b.e.server.validateTo() docstring.
---
 lib/bridgedb/email/server.py |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/lib/bridgedb/email/server.py b/lib/bridgedb/email/server.py
index cdc1721..b7e90ef 100644
--- a/lib/bridgedb/email/server.py
+++ b/lib/bridgedb/email/server.py
@@ -736,9 +736,21 @@ class MailDelivery(object):
         return origin  # This method *cannot* return None, or it'll cause a 503.
 
     def validateTo(self, user):
-        """If the local user that was addressed isn't our configured local user
-        or doesn't contain a '+' with a prefix matching the local configured
-        user: Yell.
+        """Validate the SMTP ``RCPT TO:`` address for the incoming connection.
+
+        The local username and domain name to which this SMTP message is
+        addressed, after being stripped of any ``'+'`` aliases, **must** be
+        identical to those in the email address set our
+        ``EMAIL_SMTP_FROM_ADDR`` configuration file option.
+
+        :type user: :api:`twisted.mail.smtp.User`
+        :param user: Information about the user this SMTP message was
+            addressed to.
+        :raises: A :api:`twisted.mail.smtp.SMTPBadRcpt` if any of the above
+            conditions weren't met.
+        :rtype: callable
+        :returns: A parameterless function which returns an instance of
+            :class:`SMTPMessage`.
         """
         u = user.dest.local
         # Hasplus? If yes, strip '+foo'





More information about the tor-commits mailing list