Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Anti-censorship
BridgeDB
Commits
d0320176
Commit
d0320176
authored
Jan 07, 2008
by
Nick Mathewson
🐻
Browse files
r17513@catbus: nickm | 2008-01-07 15:58:01 -0500
Make from addresses in emails configurable. svn:r13064
parent
b4235456
Changes
4
Hide whitespace changes
Inline
Side-by-side
TODO
View file @
d0320176
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.
...
...
bridgedb.conf
View file @
d0320176
...
...
@@ -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.
...
...
lib/bridgedb/Main.py
View file @
d0320176
...
...
@@ -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"
,
},
...
...
lib/bridgedb/Server.py
View file @
d0320176
...
...
@@ -231,7 +231,7 @@ def replyToMail(lines, ctx):
response
.
seek
(
0
)
d
=
Deferred
()
factory
=
twisted
.
mail
.
smtp
.
SMTPSenderFactory
(
ctx
.
f
romAddr
,
ctx
.
smtpF
romAddr
,
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment