Edgewall Software

Changes between Version 2 and Version 3 of 1.1/TracNotification


Ignore:
Timestamp:
Mar 29, 2015, 12:59:30 AM (9 years ago)
Author:
Ryan J Ollos
Comment:

Page cleanup.

Legend:

Unmodified
Added
Removed
Modified
  • 1.1/TracNotification

    v2 v3  
    1 = Email Notification of Ticket Changes =
     1= Email Notification of Ticket Changes
    22[[TracGuideToc]]
    33[[TranslatedPages]]
     
    99Disabled by default, notification can be activated and configured in [wiki:TracIni trac.ini].
    1010
    11 == Receiving Notification Mails ==
     11== Receiving Notification Mails
    1212When 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.
    1313
    14 === How to use your username to receive notification mails ===
     14=== How to use your username to receive notification mails
    1515
    1616To 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.
     
    2828}}}
    2929
    30 == Configuring SMTP Notification ==
     30== Configuring SMTP Notification
    3131
    3232'''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini].
    3333
    34 === Configuration Options ===
     34=== Configuration Options
    3535These are the available options for the `[notification]` section in trac.ini:
    3636
    3737[[TracIni(notification)]]
    3838
    39 === Example Configuration (SMTP) ===
    40 {{{
     39=== Example Configuration (SMTP)
     40{{{#!ini
    4141[notification]
    4242smtp_enabled = true
     
    4747}}}
    4848
    49 === Example Configuration (`sendmail`) ===
    50 {{{
     49=== Example Configuration (`sendmail`)
     50{{{#!ini
    5151[notification]
    5252smtp_enabled = true
     
    5858}}}
    5959
    60 === Subscriber Configuration ===
     60=== Subscriber Configuration
    6161The default subscriptions are configured in the `[notification-subscriber]` section in trac.ini:
    6262
     
    6767For 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.
    6868
    69 === Customizing the e-mail subject ===
     69=== Customizing the e-mail subject
    7070The 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
    7272$prefix #$ticket.id: $summary
    7373}}}
     
    7979 * `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`.
    8080
    81 === Customizing the e-mail content ===
     81=== Customizing the e-mail content
    8282
    8383The 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:
    8484
    85 {{{
     85{{{#!genshi
    8686$ticket_body_hdr
    8787$ticket_props
     
    118118}}}
    119119
    120 == Sample Email ==
     120== Sample Email
    121121{{{
    122122#42: testing
     
    144144}}}
    145145
    146 == Customizing e-mail content for MS Outlook ==
     146== Customizing e-mail content for MS Outlook
    147147
    148148MS 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].
     
    210210However, the solution is still a workaround to an automatically HTML-formatted e-mail.
    211211
    212 == Using GMail as the SMTP relay host ==
     212== Using GMail as the SMTP relay host
    213213
    214214Use the following configuration snippet:
    215 {{{
     215{{{#!ini
    216216[notification]
    217217smtp_enabled = true
     
    229229You 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.
    230230
    231 == Troubleshooting ==
     231== Troubleshooting
    232232
    233233If 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.
     
    235235Notification 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.
    236236
    237 === ''Permission denied'' error ===
     237=== ''Permission denied'' error
    238238
    239239Typical error message:
    240 {{{
     240{{{#!sh
    241241  ...
    242242  File ".../smtplib.py", line 303, in connect
     
    248248
    249249Many users get confused when their manual attempts to contact the SMTP server succeed:
    250 {{{
     250{{{#!sh
    251251telnet localhost 25
    252252}}}
    253253This is because a regular user may connect to the SMTP server, but the web server cannot:
    254 {{{
     254{{{#!sh
    255255sudo -u www-data telnet localhost 25
    256256}}}
     
    262262
    263263For SELinux in Fedora 10:
    264 {{{
     264{{{#!sh
    265265$ setsebool -P httpd_can_sendmail 1
    266266}}}
    267267
    268 === ''Suspected spam'' error ===
     268=== ''Suspected spam'' error
    269269
    270270Some SMTP servers may reject the notification email sent by Trac.