BenV's notes

Trac notifications

by on Dec.06, 2011, under Software

After setting up a new trac installation (v0.12 stable) I tried to get notifications up and running.
I’ve done this plenty times already so you’d think this should be easy.
Edit the trac/conf/trac.ini, set smtp_enabled=true and make sure the smtp settings and always_cc address make sense.

However, this time it just wouldn’t work for some reason. No errors, nothing in the trac log, but no emails on ticket changes.
After putting the loglevel to debug it was clear that trac DID try to send the mail. So where did it go?
Some digging through some qmail logs later I found this:

delivery 30122: success: Precedence:_junk_-_message_ignored/did_0+0+1/

Aha! Finally something we can work with.
For a change, I had decided to make the notification address an ezmlm mailing list instead of just a bunch of email addresses or an alias.
And apparently ezmlm filters out these messages because of this stupid header issue.
Hopefully they’ll put that patch into production soon.

The patch just for quick reference:

Index: trac/notification.py
===================================================================
--- trac/notification.py (revision 10363)
+++ trac/notification.py (working copy)
@@ -409,7 +409,7 @@
headers['X-Trac-Version'] = __version__
headers['X-Trac-Project'] = projname
headers['X-URL'] = self.env.project_url
- headers['Precedence'] = 'bulk'
+ headers['Precedence'] = 'list'
headers['Auto-Submitted'] = 'auto-generated'
headers['Subject'] = self.subject
headers['From'] = (self.from_name or projname, self.from_email)




:

Leave a Reply

You must be logged in to post a comment.