Commit d0320176 authored by Nick Mathewson's avatar Nick Mathewson 🐻
Browse files

r17513@catbus: nickm | 2008-01-07 15:58:01 -0500

 Make from addresses in emails configurable.


svn:r13064
parent b4235456
Soon:
o Send back an email even if there are no bridges
- Check dkim headers for sanity.
o Check dkim headers for sanity.
- Make the 'magic word' for the email configurable, case-tolerant,
html-tolerant, and punctuation-tolerant
- make all the rest of the email options configurable.
- bug: the email handler gets really upset when the email doesn't have
a message-id header in it.
- When we hit the end of a period, forget email address history.
- When sending bridges to an email address in the history, check for
liveness.
. Make bounces go to the right address.
o Make address sent in "mail from" command configurable.
- Actually configure it.
Not now:
- check that incoming IP of email is sane.
......
......@@ -64,6 +64,13 @@ EMAIL_DIST = True
# What proportion of bridges do we allocate to Email distribution? See
# HTTPS_SHARE and RESERVED_SHARE.
EMAIL_SHARE=10
# What email addresses to we use for outgoing email? EMAIL_FROM_ADDR goes
# in the From: line in outgoing headers, and EMAIL_SMTP_FROM_ADDR goes in
# the MAIL FROM header in outgoing SMTP.
EMAIL_FROM_ADDR = "bridges@torproject.org"
EMAIL_SMTP_FROM_ADDR = "bridges@torproject.org"
# Canonical versions of domains that we will reply to.
EMAIL_DOMAINS = [ "gmail.com", "yahoo.com" ]
# Map from unofficial domain to canonical domain.
......
......@@ -55,6 +55,8 @@ CONFIG = Conf(
EMAIL_DIST = True,
EMAIL_SHARE=10,
EMAIL_FROM_ADDR = "bridges@torproject.org",
EMAIL_SMTP_FROM_ADDR = "bridges@torproject.org",
EMAIL_DOMAINS = [ "gmail.com", "yahoo.com", "catbus.wangafu.net" ],
EMAIL_DOMAIN_MAP = { "mail.google.com" : "gmail.com",
"googlemail.com" : "gmail.com", },
......
......@@ -231,7 +231,7 @@ def replyToMail(lines, ctx):
response.seek(0)
d = Deferred()
factory = twisted.mail.smtp.SMTPSenderFactory(
ctx.fromAddr,
ctx.smtpFromAddr,
sendToUser,
response,
d)
......@@ -249,8 +249,12 @@ class MailContext:
# Use this server for outgoing mail.
self.smtpServer = "127.0.0.1"
self.smtpPort = 25
# Use this address as the from line for outgoing mail.
self.fromAddr = "bridges@torproject.org"
# Use this address in the MAIL FROM line for outgoing mail.
self.smtpFromAddr = (cfg.EMAIL_SMTP_FROM_ADDR or
"bridges@torproject.org")
# Use this address in the "From:" header for outgoing mail.
self.fromAddr = (cfg.EMAIL_FROM_ADDR or
"bridges@torproject.org")
# An EmailBasedDistributor object
self.distributor = dist
# An IntervalSchedule object
......
Supports Markdown
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