[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Add a real docstring to EmailServer.replyToMail().



commit 1e330cb61bce46f49b29474f8a031d46726ac213
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Mon Mar 17 02:59:08 2014 +0000

    Add a real docstring to EmailServer.replyToMail().
---
 lib/bridgedb/EmailServer.py |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/EmailServer.py b/lib/bridgedb/EmailServer.py
index f301eb8..d442ccd 100644
--- a/lib/bridgedb/EmailServer.py
+++ b/lib/bridgedb/EmailServer.py
@@ -236,8 +236,18 @@ def buildSpamWarningTemplate(t):
     return msg_template 
 
 def replyToMail(lines, ctx):
-    """Given a list of lines from an incoming email message, and a
-       MailContext object, possibly send a reply.
+    """Reply to an incoming email. Maybe.
+
+    If no `response` is returned from :func:`getMailResponse`, then the
+    incoming email will not be responded to at all. This can happen for
+    several reasons, for example: if the DKIM signature was invalid or
+    missing, or if the incoming email came from an unacceptable domain, or if
+    there have been too many emails from this client in the allotted time
+    period.
+
+    :param list lines: A list of lines from an incoming email message.
+    :type ctx: :class:`MailContext`
+    :param ctx: The configured context for the email server.
     """
     logging.info("Got a completed email; deciding whether to reply.")
     sendToUser, response = getMailResponse(lines, ctx)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits