Changes between Version 3 and Version 4 of 0.12/TracNotification
- Timestamp:
- Apr 10, 2010, 6:34:05 PM (13 years ago)
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 ** 1 2 = Email Notification of Ticket Changes = 2 3 [[TracGuideToc]] … … 9 10 10 11 == 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).12 When 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). 12 13 13 14 This is useful to keep up-to-date on an issue or enhancement request that interests you. 14 15 16 === How to use your username to receive notification mails === 17 18 To 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 20 Alternatively, 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 15 22 == Configuring SMTP Notification == 23 24 '''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini]. 16 25 17 26 === Configuration Options === … … 85 94 * `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`. 86 95 96 === Customizing the e-mail content === 97 98 The 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 109 Changes (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 115 Description changed by $change.author: 116 #end 117 $changes_descr 118 -- 119 #end 120 #if change.comment 121 122 Comment${not changes_body and '(by %s)' % change.author or ''}: 123 124 $change.comment 125 #end 126 #end 127 #end 128 129 -- 130 Ticket URL: <$ticket.link> 131 $project.name <${project.url or abs_href()}> 132 $project.descr 133 }}} 87 134 == Sample Email == 88 135 {{{ … … 137 184 }}} 138 185 186 For Trac .10, use the filter: 187 {{{ 188 from:(<smtp_from>) (("Reporter: <username>" -Changes -Comment) OR "Changes (by <username>)" OR "Comment (by <username>)") 189 }}} 190 139 191 to delete these notifications. 140 192 … … 179 231 Relevant ML threads: 180 232 * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518 181 Relevant commands: 182 * system-config-selinux 183 233 234 For SELinux in Fedora 10: 235 {{{ 236 $ setsebool -P httpd_can_sendmail 1 237 }}} 184 238 === ''Suspected spam'' error === 185 239 … … 189 243 190 244 Quoted 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 248 On IIS 6.0 you could get a 249 {{{ 250 Failure sending notification on change to ticket #1: SMTPHeloError: (501, '5.5.4 Invalid Address') 251 }}} 252 in the trac log. Have a look [http://support.microsoft.com/kb/291828 here] for instructions on resolving it. 253 191 254 192 255 ----