Last updated

Enabling Trac Email notifications

If you’ve ever reported a but to Ruby on Rails, you’ll have noticed that their Trac has nice email notification feature. And I bet you want that in your Trac as well!

Now, email notification are nothing exotic. You don’t need any plugins, just an outgoing SMTP server and access to your trac.ini file.

In your trac directory open up conf/trac.ini and look for the [notification] header. Make sure you have at least the following settings. Of course, make sure you enter valid values for your situation.

 1always_notify_owner = true
 2always_notify_reporter = true
 3always_notify_updater = true
 4smtp_always_cc = trac-updates@mailinglist # Optional if you want to archive outgoing emails
 5smtp_enabled = true
 6smtp_from = trac@ariejan.net
 7smtp_from_name = Ariejan.net Trac
 8smtp_replyto = noreply@ariejan.net
 9smtp_user =
10smtp_password =
11smtp_server = localhost
12smtp_port = 25

There are a few more options like ‘ignore_domains’ if you don’t want to send emails to certain domains.

Update: good news for you GMail users! There is a ‘use_tls’ attribute. I think that if you set it to true, you can then specify GMail’s SMTP server to send out mails. Of course, a better solution would be to setup Postfix to relay mail to GMail, and just leave Trac to it’s default ’localhost’ settings.