Changes between Version 3 and Version 4 of TracNotification


Ignore:
Timestamp:
02/01/17 00:33:40 (8 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracNotification

    v3 v4  
    1 = Email Notification of Ticket Changes =
     1= Email Notification of Ticket Changes
    22[[TracGuideToc]]
    33
     
    88Disabled by default, notification can be activated and configured in [wiki:TracIni trac.ini].
    99
    10 == Receiving Notification Mails ==
     10== Receiving Notification Mails
    1111When 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.
    1212
    13 === How to use your username to receive notification mails ===
     13=== How to use your username to receive notification mails
    1414
    1515To 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.
     
    2727}}}
    2828
    29 == Configuring SMTP Notification ==
     29== Configuring SMTP Notification
    3030
    3131'''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini].
    3232
    33 === Configuration Options ===
     33=== Configuration Options
    3434These are the available options for the `[notification]` section in trac.ini:
    3535
    3636[[TracIni(notification)]]
    3737
    38 === Example Configuration (SMTP) ===
    39 {{{
     38=== Example Configuration (SMTP)
     39{{{#!ini
    4040[notification]
    4141smtp_enabled = true
     
    4646}}}
    4747
    48 === Example Configuration (`sendmail`) ===
    49 {{{
     48=== Example Configuration (`sendmail`)
     49{{{#!ini
    5050[notification]
    5151smtp_enabled = true
     
    5757}}}
    5858
    59 === Customizing the e-mail subject ===
     59=== Subscriber Configuration
     60The default subscriptions are configured in the `[notification-subscriber]` section in trac.ini:
     61
     62[[TracIni(notification-subscriber)]]
     63
     64Each user can override these defaults in his ''Notifications'' preferences.
     65
     66For 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.
     67
     68=== Customizing the e-mail subject
    6069The 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:
    61 {{{
     70{{{#!genshi
    6271$prefix #$ticket.id: $summary
    6372}}}
     
    6978 * `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`.
    7079
    71 === Customizing the e-mail content ===
     80=== Customizing the e-mail content
    7281
    7382The 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:
    7483
    75 {{{
     84{{{#!genshi
    7685$ticket_body_hdr
    7786$ticket_props
     
    108117}}}
    109118
    110 == Sample Email ==
     119== Sample Email
    111120{{{
    112121#42: testing
     
    134143}}}
    135144
    136 == Customizing e-mail content for MS Outlook ==
     145== Customizing e-mail content for MS Outlook
    137146
    138147MS 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].
     
    200209However, the solution is still a workaround to an automatically HTML-formatted e-mail.
    201210
    202 == Using GMail as the SMTP relay host ==
     211== Using GMail as the SMTP relay host
    203212
    204213Use the following configuration snippet:
    205 {{{
     214{{{#!ini
    206215[notification]
    207216smtp_enabled = true
     
    218227Alternatively, you can use `smtp_port = 25`.[[br]]
    219228You 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.
    220  
    221 == Filtering notifications for one's own changes and comments ==
    222 In Gmail, use the filter:
    223 {{{
    224 from:(<smtp_from>) (("Reporter: <username>" -Changes -Comment) OR "Changes (by <username>)" OR "Comment (by <username>)")
    225 }}}
    226 
    227 to delete these notifications.
    228 
    229 In Thunderbird, there is no such solution if you use IMAP, see http://kb.mozillazine.org/Filters_(Thunderbird)#Filtering_the_message_body.
    230 
    231 You can also add this plugin:
    232 http://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin, or vote for [trac:#2247] to be fixed.
    233 
    234 == Troubleshooting ==
     229
     230== Troubleshooting
    235231
    236232If 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.
     
    238234Notification 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.
    239235
    240 === ''Permission denied'' error ===
     236=== ''Permission denied'' error
    241237
    242238Typical error message:
    243 {{{
     239{{{#!sh
    244240  ...
    245241  File ".../smtplib.py", line 303, in connect
     
    251247
    252248Many users get confused when their manual attempts to contact the SMTP server succeed:
    253 {{{
     249{{{#!sh
    254250telnet localhost 25
    255251}}}
    256252This is because a regular user may connect to the SMTP server, but the web server cannot:
    257 {{{
     253{{{#!sh
    258254sudo -u www-data telnet localhost 25
    259255}}}
     
    265261
    266262For SELinux in Fedora 10:
    267 {{{
     263{{{#!sh
    268264$ setsebool -P httpd_can_sendmail 1
    269265}}}
    270266
    271 === ''Suspected spam'' error ===
     267=== ''Suspected spam'' error
    272268
    273269Some SMTP servers may reject the notification email sent by Trac.