[or-cvs] r13116: Add EMAIL_USERNAME config option to set acceptable RCPT user (in bridgedb/trunk: . lib/bridgedb)

sjm217 at seul.org sjm217 at seul.org
Sat Jan 12 18:07:10 UTC 2008


Author: sjm217
Date: 2008-01-12 13:07:10 -0500 (Sat, 12 Jan 2008)
New Revision: 13116

Modified:
   bridgedb/trunk/bridgedb.conf
   bridgedb/trunk/lib/bridgedb/Main.py
   bridgedb/trunk/lib/bridgedb/Server.py
Log:
Add EMAIL_USERNAME config option to set acceptable RCPT username

Modified: bridgedb/trunk/bridgedb.conf
===================================================================
--- bridgedb/trunk/bridgedb.conf	2008-01-12 15:05:07 UTC (rev 13115)
+++ bridgedb/trunk/bridgedb.conf	2008-01-12 18:07:10 UTC (rev 13116)
@@ -71,6 +71,9 @@
 EMAIL_FROM_ADDR = "bridges at torproject.org"
 EMAIL_SMTP_FROM_ADDR = "bridges at torproject.org"
 
+# Reject any RCPT TO lines that aren't to this user.
+EMAIL_USERNAME = "bridges"
+
 # Canonical versions of domains that we will reply to.
 EMAIL_DOMAINS = [ "gmail.com", "yahoo.com" ]
 # Map from unofficial domain to canonical domain.

Modified: bridgedb/trunk/lib/bridgedb/Main.py
===================================================================
--- bridgedb/trunk/lib/bridgedb/Main.py	2008-01-12 15:05:07 UTC (rev 13115)
+++ bridgedb/trunk/lib/bridgedb/Main.py	2008-01-12 18:07:10 UTC (rev 13116)
@@ -57,6 +57,7 @@
     EMAIL_SHARE=10,
     EMAIL_FROM_ADDR = "bridges at torproject.org",
     EMAIL_SMTP_FROM_ADDR = "bridges at torproject.org",
+    EMAIL_USERNAME = "bridges",
     EMAIL_DOMAINS = [ "gmail.com", "yahoo.com", "catbus.wangafu.net" ],
     EMAIL_DOMAIN_MAP = { "mail.google.com" : "gmail.com",
                          "googlemail.com" : "gmail.com", },

Modified: bridgedb/trunk/lib/bridgedb/Server.py
===================================================================
--- bridgedb/trunk/lib/bridgedb/Server.py	2008-01-12 15:05:07 UTC (rev 13115)
+++ bridgedb/trunk/lib/bridgedb/Server.py	2008-01-12 18:07:10 UTC (rev 13116)
@@ -243,7 +243,8 @@
     """Helper object that holds information used by email subsystem."""
     def __init__(self, cfg, dist, sched):
         # Reject any RCPT TO lines that aren't to this user.
-        self.username = "bridges"
+        self.username = (cfg.EMAIL_USERNAME or
+                         "bridges")
         # Reject any mail longer than this.
         self.maximumSize = 32*1024
         # Use this server for outgoing mail.



More information about the tor-commits mailing list