Edgewall Software

Changes between Version 88 and Version 89 of TracNotification


Ignore:
Timestamp:
Apr 13, 2015, 4:53:30 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracNotification

    v88 v89  
    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
     12
    1213When 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.
    1314
    14 === How to use your username to receive notification mails ===
     15=== How to use your username to receive notification mails
    1516
    1617To 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.
     
    2829}}}
    2930
    30 == Configuring SMTP Notification ==
     31== Configuring SMTP Notification
    3132
    3233'''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini].
    3334
    34 === Configuration Options ===
    35 These are the available options for the `[notification]` section in trac.ini:
     35=== Configuration Options
     36
     37These are the available options for the `[notification]` section in `trac.ini`:
    3638
    3739[[TracIni(notification)]]
    3840
    39 === Example Configuration (SMTP) ===
    40 {{{
     41=== Example Configuration (SMTP)
     42
     43{{{#!ini
    4144[notification]
    4245smtp_enabled = true
     
    4750}}}
    4851
    49 === Example Configuration (`sendmail`) ===
    50 {{{
     52=== Example Configuration (`sendmail`)
     53
     54{{{#!ini
    5155[notification]
    5256smtp_enabled = true
     
    5862}}}
    5963
    60 === Customizing the e-mail subject ===
     64=== Customizing the e-mail subject
     65
    6166The 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:
    6267{{{
    6368$prefix #$ticket.id: $summary
    6469}}}
     70
    6571The following variables are available in the template:
    6672
     
    7076 * `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`.
    7177
    72 === Customizing the e-mail content ===
     78=== Customizing the e-mail content
    7379
    7480The 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:
     
    109115}}}
    110116
    111 == Sample Email ==
     117== Sample Email
     118
    112119{{{
    113120#42: testing
     
    135142}}}
    136143
    137 == Customizing e-mail content for MS Outlook ==
     144== Customizing e-mail content for MS Outlook
    138145
    139146MS 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].
     
    201208However, the solution is still a workaround to an automatically HTML-formatted e-mail.
    202209
    203 == Using GMail as the SMTP relay host ==
     210== Using GMail as the SMTP relay host
    204211
    205212Use the following configuration snippet:
    206 {{{
     213{{{#!ini
    207214[notification]
    208215smtp_enabled = true
     
    220227You 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.
    221228 
    222 == Filtering notifications for one's own changes and comments ==
    223 In Gmail, use the filter:
     229== Filtering notifications for one's own changes and comments
     230
     231To delete these notifications in Gmail, use the following filter:
    224232{{{
    225233from:(<smtp_from>) (("Reporter: <username>" -Changes -Comment) OR "Changes (by <username>)" OR "Comment (by <username>)")
    226234}}}
    227 
    228 to delete these notifications.
    229235
    230236In Thunderbird, there is no such solution if you use IMAP, see http://kb.mozillazine.org/Filters_(Thunderbird)#Filtering_the_message_body.
     
    233239http://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin, or vote for [trac:#2247] to be fixed.
    234240
    235 == Troubleshooting ==
     241== Troubleshooting
    236242
    237243If 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.
     
    239245Notification 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.
    240246
    241 === ''Permission denied'' error ===
     247=== ''Permission denied'' error
    242248
    243249Typical error message:
     
    252258
    253259Many users get confused when their manual attempts to contact the SMTP server succeed:
    254 {{{
     260{{{#!sh
    255261telnet localhost 25
    256262}}}
     263
    257264This is because a regular user may connect to the SMTP server, but the web server cannot:
    258 {{{
     265{{{#!sh
    259266sudo -u www-data telnet localhost 25
    260267}}}
     
    262269In 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.
    263270
    264 Relevant ML threads:
    265  * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518
     271Relevant mailing list thread on SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518
    266272
    267273For SELinux in Fedora 10:
    268 {{{
    269 $ setsebool -P httpd_can_sendmail 1
    270 }}}
    271 
    272 === ''Suspected spam'' error ===
     274{{{#!sh
     275setsebool -P httpd_can_sendmail 1
     276}}}
     277
     278=== ''Suspected spam'' error
    273279
    274280Some SMTP servers may reject the notification email sent by Trac.