Add a Sender header to weekly-updates because it may help the Mozilla spamfilter feel better about the messages coming from @mozilla.com addresses.
authorbsmedberg@pistons.dreamhost.com
Tue, 31 Jan 2012 09:12:37 -0800
changeset 32 11f31b62f654
parent 31 aebc38b082a3
child 33 4ca7bd8e545c
push id27
push userbsmedberg@mozilla.com
push date2012-01-31 17:15 +0000
Add a Sender header to weekly-updates because it may help the Mozilla spamfilter feel better about the messages coming from @mozilla.com addresses.
.hgignore
dbschema.sql
start.py
weeklyupdates.config.sample
weeklyupdates/__init__.py
weeklyupdates/auth.py
weeklyupdates/mail.py
weeklyupdates/main.py
weeklyupdates/model.py
weeklyupdates/static/ui.css
weeklyupdates/templates/common.xhtml
weeklyupdates/templates/error.xhtml
weeklyupdates/templates/feed.xml
weeklyupdates/templates/index.xhtml
weeklyupdates/templates/login.xhtml
weeklyupdates/templates/me.xhtml
weeklyupdates/templates/message.xhtml
weeklyupdates/templates/messagedigest.xhtml
weeklyupdates/templates/posts.xhtml
weeklyupdates/templates/project.xhtml
weeklyupdates/templates/signup.xhtml
weeklyupdates/templates/teamposts.xhtml
weeklyupdates/templates/user.xhtml
weeklyupdates/templates/userposts.xhtml
weeklyupdates/util.py
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
--- a/weeklyupdates/mail.py
+++ b/weeklyupdates/mail.py
@@ -44,29 +44,31 @@ def sendmails(messages, fromaddress=None
     session.quit()
 
 def sendpost(fromaddress, tolist, recipientlist, post):
     subject = "Status Update: %s on %s" % (post.username, post.postdate.isoformat())
 
     message = email.mime.multipart.MIMEMultipart('alternative')
     message['To'] = ', '.join(tolist)
     message['From'] = fromaddress
+    message['Sender'] = 'weekly-updates@smedbergs.us'
     message['Subject'] = subject
     message['List-Id'] = '<weekly-updates.mozilla.com>'
 
     html, text = rendermail('message.xhtml', subject, post=post)
     message.attach(email.mime.text.MIMEText(text, 'plain', 'UTF-8'))
     message.attach(email.mime.text.MIMEText(html, 'html', 'UTF-8'))
 
     sendmails([message], fromaddress, recipientlist)
 
 def getdigest(to, subject, posts):
     message = email.mime.multipart.MIMEMultipart('alternative')
     message['To'] = to
     message['From'] = _genericfrom
+    message['Sender'] = 'weekly-updates@smedbergs.us'
     message['Subject'] = subject
     message['List-Id'] = '<weekly-updates.mozilla.com>'
 
     html, text = rendermail('messagedigest.xhtml', subject, posts=posts)
     message.attach(email.mime.text.MIMEText(text, 'plain', 'UTF-8'))
     message.attach(email.mime.text.MIMEText(html, 'html', 'UTF-8'))
 
     return message
@@ -83,16 +85,17 @@ def getnags(cur):
 
         nag += "\n\nhttp://benjamin.smedbergs.us/weekly-updates.fcgi/"
 
         print "Sending nag to %s <%s>" % (username, usermail)
 
         message = email.mime.text.MIMEText(nag, 'plain', 'UTF-8')
         message['To'] = usermail
         message['From'] = _genericfrom
+        message['Sender'] = 'weekly-updates@smedbergs.us'
         message['Subject'] = "Please post a status report"
         message['List-Id'] = '<weekly-updates.mozilla.com>'
         yield message
 
 def getdaily(cur):
     yesterday = util.today() - datetime.timedelta(1)
 
     for username, email, posts in model.iter_daily(cur, yesterday):
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755