Commit 7a09a682 authored by Steven Murdoch's avatar Steven Murdoch
Browse files

Add EMAIL_USERNAME config option to set acceptable RCPT username

svn:r13116
parent 50232b70
......@@ -71,6 +71,9 @@ EMAIL_SHARE=10
EMAIL_FROM_ADDR = "bridges@torproject.org"
EMAIL_SMTP_FROM_ADDR = "bridges@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.
......
......@@ -57,6 +57,7 @@ CONFIG = Conf(
EMAIL_SHARE=10,
EMAIL_FROM_ADDR = "bridges@torproject.org",
EMAIL_SMTP_FROM_ADDR = "bridges@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", },
......
......@@ -243,7 +243,8 @@ class MailContext:
"""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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment