Changes between Version 3 and Version 4 of TracNotification


Ignore:
Timestamp:
Apr 6, 2020, 3:52:17 AM (4 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracNotification

    v3 v4  
    99
    1010== 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.
     11When 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
     13Permission groups can also be entered in the CC field,
     14to notify all members of the group.
    1315
    1416=== How to use your username to receive notification mails
     
    3335
    3436=== Configuration Options
    35 
    36 These are the available options for the `[notification]` section in `trac.ini`:
    37 
    38 [[TracIni(notification)]]
     37These are the available options for the `[notification]` section in trac.ini:
     38
     39[[TracIni(section=notification)]]
    3940
    4041=== Example Configuration (SMTP)
    41 
    4242{{{#!ini
    4343[notification]
     
    5050
    5151=== Example Configuration (`sendmail`)
    52 
    5352{{{#!ini
    5453[notification]
     
    6160}}}
    6261
     62=== Subscriber Configuration
     63The default subscriptions are configured in the `[notification-subscriber]` section in trac.ini:
     64
     65[[TracIni(section=notification-subscriber)]]
     66
     67Each user can override these defaults in his ''Notifications'' preferences.
     68
     69For 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
    6371=== 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 
     72The 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}}}
    7076The following variables are available in the template:
    7177
    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]).
    7380 * `prefix`: The prefix defined in `smtp_subject_prefix`.
    7481 * `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`.
    7683
    7784=== Customizing the e-mail content
     
    7986The 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:
    8087
    81 {{{
     88{{{#!genshi
    8289$ticket_body_hdr
    8390$ticket_props
     
    115122
    116123== Sample Email
    117 
    118124{{{
    119125#42: testing
     
    225231Alternatively, you can use `smtp_port = 25`.[[br]]
    226232You 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 comments
    229 
    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.
    239233
    240234== Troubleshooting
     
    247241
    248242Typical error message:
    249 {{{
     243{{{#!sh
    250244  ...
    251245  File ".../smtplib.py", line 303, in connect
     
    260254telnet localhost 25
    261255}}}
    262 
    263256This is because a regular user may connect to the SMTP server, but the web server cannot:
    264257{{{#!sh
     
    268261In 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.
    269262
    270 Relevant mailing list thread on SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518
     263Relevant ML threads:
     264 * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518
    271265
    272266For SELinux in Fedora 10:
    273267{{{#!sh
    274 setsebool -P httpd_can_sendmail 1
     268$ setsebool -P httpd_can_sendmail 1
    275269}}}
    276270