Changes between Version 2 and Version 3 of 1.1/TracNotification
- Timestamp:
- Mar 29, 2015, 12:59:30 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
1.1/TracNotification
v2 v3 1 = Email Notification of Ticket Changes =1 = Email Notification of Ticket Changes 2 2 [[TracGuideToc]] 3 3 [[TranslatedPages]] … … 9 9 Disabled by default, notification can be activated and configured in [wiki:TracIni trac.ini]. 10 10 11 == Receiving Notification Mails ==11 == Receiving Notification Mails 12 12 When reporting a new ticket or adding a comment, enter a valid email address or your Trac username in the ''reporter'', ''assigned to/owner'' or ''cc'' field. Trac will automatically send you an email when changes are made to the ticket, depending on how notification is configured. 13 13 14 === How to use your username to receive notification mails ===14 === How to use your username to receive notification mails 15 15 16 16 To receive notification mails, you can either enter a full email address or your Trac username. To get notified with a simple username or login, you need to specify a valid email address in the ''Preferences'' page. … … 28 28 }}} 29 29 30 == Configuring SMTP Notification ==30 == Configuring SMTP Notification 31 31 32 32 '''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini]. 33 33 34 === Configuration Options ===34 === Configuration Options 35 35 These are the available options for the `[notification]` section in trac.ini: 36 36 37 37 [[TracIni(notification)]] 38 38 39 === Example Configuration (SMTP) ===40 {{{ 39 === Example Configuration (SMTP) 40 {{{#!ini 41 41 [notification] 42 42 smtp_enabled = true … … 47 47 }}} 48 48 49 === Example Configuration (`sendmail`) ===50 {{{ 49 === Example Configuration (`sendmail`) 50 {{{#!ini 51 51 [notification] 52 52 smtp_enabled = true … … 58 58 }}} 59 59 60 === Subscriber Configuration ===60 === Subscriber Configuration 61 61 The default subscriptions are configured in the `[notification-subscriber]` section in trac.ini: 62 62 … … 67 67 For example to unsubscribe from notifications for one's own changes and comments, the rule "Never notify: I update a ticket" should be added above other subscription rules. 68 68 69 === Customizing the e-mail subject ===69 === Customizing the e-mail subject 70 70 The e-mail subject can be customized with the `ticket_subject_template` option, which contains a [http://genshi.edgewall.org/wiki/Documentation/text-templates.html Genshi text template] snippet. The default value is: 71 {{{ 71 {{{#!genshi 72 72 $prefix #$ticket.id: $summary 73 73 }}} … … 79 79 * `ticket`: The ticket model object (see [trac:source:/trunk/trac/ticket/model.py model.py]). Individual ticket fields can be addressed by appending the field name separated by a dot, eg `$ticket.milestone`. 80 80 81 === Customizing the e-mail content ===81 === Customizing the e-mail content 82 82 83 83 The notification e-mail content is generated based on `ticket_notify_email.txt` in `trac/ticket/templates`. You can add your own version of this template by adding a `ticket_notify_email.txt` to the templates directory of your environment. The default looks like this: 84 84 85 {{{ 85 {{{#!genshi 86 86 $ticket_body_hdr 87 87 $ticket_props … … 118 118 }}} 119 119 120 == Sample Email ==120 == Sample Email 121 121 {{{ 122 122 #42: testing … … 144 144 }}} 145 145 146 == Customizing e-mail content for MS Outlook ==146 == Customizing e-mail content for MS Outlook 147 147 148 148 MS Outlook normally presents plain text e-mails with a variable-width font, and as a result the ticket properties table will most certainly look like a mess in MS Outlook. This can be fixed with some customization of the [#Customizingthee-mailcontent e-mail template]. … … 210 210 However, the solution is still a workaround to an automatically HTML-formatted e-mail. 211 211 212 == Using GMail as the SMTP relay host ==212 == Using GMail as the SMTP relay host 213 213 214 214 Use the following configuration snippet: 215 {{{ 215 {{{#!ini 216 216 [notification] 217 217 smtp_enabled = true … … 229 229 You should not use `smtp_port = 465`. Doing so may deadlock your ticket submission. Port 465 is reserved for the SMTPS protocol, which is not supported by Trac. See [trac:comment:2:ticket:7107 #7107] for details. 230 230 231 == Troubleshooting ==231 == Troubleshooting 232 232 233 233 If you cannot get the notification working, first make sure the log is activated and have a look at the log to find if an error message has been logged. See TracLogging for help about the log feature. … … 235 235 Notification errors are not reported through the web interface, so the user who submits a change or a new ticket never gets notified about a notification failure. The Trac administrator needs to look at the log to find the error trace. 236 236 237 === ''Permission denied'' error ===237 === ''Permission denied'' error 238 238 239 239 Typical error message: 240 {{{ 240 {{{#!sh 241 241 ... 242 242 File ".../smtplib.py", line 303, in connect … … 248 248 249 249 Many users get confused when their manual attempts to contact the SMTP server succeed: 250 {{{ 250 {{{#!sh 251 251 telnet localhost 25 252 252 }}} 253 253 This is because a regular user may connect to the SMTP server, but the web server cannot: 254 {{{ 254 {{{#!sh 255 255 sudo -u www-data telnet localhost 25 256 256 }}} … … 262 262 263 263 For SELinux in Fedora 10: 264 {{{ 264 {{{#!sh 265 265 $ setsebool -P httpd_can_sendmail 1 266 266 }}} 267 267 268 === ''Suspected spam'' error ===268 === ''Suspected spam'' error 269 269 270 270 Some SMTP servers may reject the notification email sent by Trac.