Changes between Version 8 and Version 9 of TracNotification
- Timestamp:
- 11/04/19 11:01:00 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracNotification
v8 v9 9 9 10 10 == Receiving Notification Mails 11 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. 11 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 may send you an email when changes are made to the ticket, depending on how your notification preferences are configured. 12 13 Permission groups can also be entered in the CC field, 14 to notify all members of the group. 13 15 14 16 === How to use your username to receive notification mails … … 33 35 34 36 === Configuration Options 35 36 These are the available options for the `[notification]` section in `trac.ini`: 37 38 [[TracIni(notification)]] 37 These are the available options for the `[notification]` section in trac.ini: 38 39 [[TracIni(section=notification)]] 39 40 40 41 === Example Configuration (SMTP) 41 42 42 {{{#!ini 43 43 [notification] … … 50 50 51 51 === Example Configuration (`sendmail`) 52 53 52 {{{#!ini 54 53 [notification] … … 61 60 }}} 62 61 62 === Subscriber Configuration 63 The default subscriptions are configured in the `[notification-subscriber]` section in trac.ini: 64 65 [[TracIni(section=notification-subscriber)]] 66 67 Each user can override these defaults in his ''Notifications'' preferences. 68 69 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. 70 63 71 === Customizing the e-mail subject 64 65 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: 66 {{{ 67 $prefix #$ticket.id: $summary 68 }}} 69 72 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 text template] snippet. The default value is: 73 {{{#!genshi 74 ${prefix} #${ticket.id}: ${summary} 75 }}} 70 76 The following variables are available in the template: 71 77 72 * `env`: The project environment (see [trac:source:/trunk/trac/env.py env.py]). 78 * `changes`: The ticket changes (prepared by [trac:source:/branches/1.4-stable/trac/ticket/model.py Ticket.get_change]). 79 * `env`: The project environment (see [trac:source:/branches/1.4-stable/trac/env.py env.py]). 73 80 * `prefix`: The prefix defined in `smtp_subject_prefix`. 74 81 * `summary`: The ticket summary, with the old value if the summary was edited. 75 * `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`.82 * `ticket`: The ticket model object (see [trac:source:/branches/1.4-stable/trac/ticket/model.py model.py]). Individual ticket fields can be addressed by appending the field name separated by a dot, eg `$ticket.milestone`. 76 83 77 84 === Customizing the e-mail content … … 79 86 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: 80 87 81 {{{ 88 {{{#!genshi 82 89 $ticket_body_hdr 83 90 $ticket_props … … 115 122 116 123 == Sample Email 117 118 124 {{{ 119 125 #42: testing … … 225 231 Alternatively, you can use `smtp_port = 25`.[[br]] 226 232 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. 227 228 == Filtering notifications for one's own changes and comments229 230 To delete these notifications in Gmail, use the following filter:231 {{{232 from:(<smtp_from>) (("Reporter: <username>" -Changes -Comment) OR "Changes (by <username>)" OR "Comment (by <username>)")233 }}}234 235 In Thunderbird, there is no such solution if you use IMAP, see http://kb.mozillazine.org/Filters_(Thunderbird)#Filtering_the_message_body.236 237 You can also add this plugin:238 http://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin, or vote for [trac:#2247] to be fixed.239 233 240 234 == Troubleshooting … … 247 241 248 242 Typical error message: 249 {{{ 243 {{{#!sh 250 244 ... 251 245 File ".../smtplib.py", line 303, in connect … … 260 254 telnet localhost 25 261 255 }}} 262 263 256 This is because a regular user may connect to the SMTP server, but the web server cannot: 264 257 {{{#!sh … … 268 261 In such a case, you need to configure your server so that the web server is authorized to post to the SMTP server. The actual settings depend on your Linux distribution and current security policy. You may find help in the Trac [trac:MailingList MailingList] archive. 269 262 270 Relevant mailing list thread on SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518 263 Relevant ML threads: 264 * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518 271 265 272 266 For SELinux in Fedora 10: 273 267 {{{#!sh 274 setsebool -P httpd_can_sendmail 1268 $ setsebool -P httpd_can_sendmail 1 275 269 }}} 276 270