Edgewall Software

Changes between Version 3 and Version 4 of 0.12/TracNotification


Ignore:
Timestamp:
Apr 10, 2010, 6:34:05 PM (14 years ago)
Author:
Christian Boos
Comment:

sync with [9452] and freezing

Legend:

Unmodified
Added
Removed
Modified
  • 0.12/TracNotification

    v3 v4  
     1** Note: this page was used to prepare the 0.12 version of wiki:/TracNotification, see now directly that toplevel page **
    12= Email Notification of Ticket Changes =
    23[[TracGuideToc]]
     
    910
    1011== Receiving Notification Mails ==
    11 When reporting a new ticket or adding a comment, enter a valid email address 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).
     12When reporting a new ticket or adding a comment, enter a valid email address or your 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).
    1213
    1314This is useful to keep up-to-date on an issue or enhancement request that interests you.
    1415
     16=== How to use your username to receive notification mails ===
     17
     18To receive notification mails, you can either enter a full email address or your username. To get notified with a simple username or login, you need to specify a valid email address in the ''Preferences'' page.
     19
     20Alternatively, a default domain name ('''`smtp_default_domain`''') can be set in the TracIni file (see [#ConfigurationOptions Configuration Options] below). In this case, the default domain will be appended to the username, which can be useful for an "Intranet" kind of installation.
     21
    1522== Configuring SMTP Notification ==
     23
     24'''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini].
    1625
    1726=== Configuration Options ===
     
    8594 * `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, e.g. `$ticket.milestone`.
    8695
     96=== Customizing the e-mail content ===
     97
     98The 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:
     99
     100{{{
     101$ticket_body_hdr
     102$ticket_props
     103#choose ticket.new
     104  #when True
     105$ticket.description
     106  #end
     107  #otherwise
     108    #if changes_body
     109Changes (by $change.author):
     110
     111$changes_body
     112    #end
     113    #if changes_descr
     114      #if not changes_body and not change.comment and change.author
     115Description changed by $change.author:
     116      #end
     117$changes_descr
     118--
     119    #end
     120    #if change.comment
     121
     122Comment${not changes_body and '(by %s)' % change.author or ''}:
     123
     124$change.comment
     125    #end
     126  #end
     127#end
     128
     129--
     130Ticket URL: <$ticket.link>
     131$project.name <${project.url or abs_href()}>
     132$project.descr
     133}}}
    87134== Sample Email ==
    88135{{{
     
    137184}}}
    138185
     186For Trac .10, use the filter:
     187{{{
     188from:(<smtp_from>) (("Reporter: <username>" -Changes -Comment) OR "Changes (by <username>)" OR "Comment (by <username>)")
     189}}}
     190
    139191to delete these notifications.
    140192
     
    179231Relevant ML threads:
    180232 * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518
    181 Relevant commands:
    182  * system-config-selinux
    183  
     233
     234For SELinux in Fedora 10:
     235{{{
     236$ setsebool -P httpd_can_sendmail 1
     237}}}
    184238=== ''Suspected spam'' error ===
    185239
     
    189243
    190244Quoted printable encoding works better with languages that use one of the Latin charsets. For Asian charsets, it is recommended to stick with the Base64 encoding.
     245
     246=== ''501, 5.5.4 Invalid Address'' error ===
     247
     248On IIS 6.0 you could get a
     249{{{
     250Failure sending notification on change to ticket #1: SMTPHeloError: (501, '5.5.4 Invalid Address')
     251}}}
     252in the trac log. Have a look [http://support.microsoft.com/kb/291828 here] for instructions on resolving it.
     253
    191254
    192255----