Changes between Version 24 and Version 25 of MailToTracPlugin
- Timestamp:
- Aug 2, 2017, 9:11:05 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MailToTracPlugin
v24 v25 9 9 * an extension point that allows email messages to be handled by Trac plugins other than mail2trac. 10 10 11 The bash script, `mail2tracAdmin` may be called by an [ http://en.wikipedia.org/wiki/Mail_transfer_agent MTA], for example [http://www.postfix.org/ postfix].11 The bash script, `mail2tracAdmin` may be called by an [wikipedia:Mail_transfer_agent MTA], for example [http://www.postfix.org/ postfix]. 12 12 13 13 It will open a Trac environment and run through each enabled [source:mailtotracplugin/0.12/plugin/mail2trac/interface.py IEmailHandler] and executes its `invoke()` method if its `match()` method returns `True`. 14 14 If invoke returns an [http://docs.python.org/library/email email] message, then subsequent `IEmailHandler`s will also process the message. If `None` is returned, then the message is consumed and execution stops. 15 15 16 To enable the plugin for `postfix`, add an appropriate line to the aliases file (usually `/etc/aliases` or `/etc/postfix/aliases` and then refreshing the aliases database (see [http://www.postfix.org/aliases.5.html man aliases]). The `mail2tracAdmin` script takes as argument the path to the project environment. The incoming email address should be specified in the `trac.ini` file: 16 To enable the plugin for `postfix`, add an appropriate line to the aliases file, usually `/etc/aliases` or `/etc/postfix/aliases` and then refreshing the aliases database, see [http://www.postfix.org/aliases.5.html man aliases]. 17 18 The `mail2tracAdmin` script takes as argument the path to the project environment. The incoming email address should be specified in the `trac.ini` file: 17 19 18 20 {{{#!ini … … 33 35 === Permission 34 36 35 mail2trac declares 4permissions:36 * MAIL2TICKET_COMMENT : user authorized to comment,37 * MAIL2TICKET_PROPERTIES : user authorized to change properties (like 'owner', 'cc', etc ...),38 * MAIL2TICKET_CREATE: user authorized to create a ticket39 * MAIL2TICKET_ADMIN: all the above40 41 In order to post ticket :42 * the Trac address must be correctly configured (Mr Obvious) 37 This plugin declares the following permissions: 38 * `MAIL2TICKET_COMMENT` : user authorized to comment 39 * `MAIL2TICKET_PROPERTIES` : user authorized to change properties, like 'owner', 'cc', etc. 40 * `MAIL2TICKET_CREATE` : user authorized to create a ticket 41 * `MAIL2TICKET_ADMIN` : all the above 42 43 In order to post a ticket : 44 * the Trac address must be correctly configured (Mr Obvious). 43 45 * you must have declared your mail address in your user preferences. 44 46 * have the correct permission according what you intend to do. 45 * the unix user launching the mail2tracAdmin should have permission on the trac files (even file creation for attachment)47 * the unix user launching the mail2tracAdmin should have permission on the Trac files, even file creation for attachment. 46 48 47 49 === mail parsing … … 56 58 57 59 * Body : 58 * any line begin ing with '''#field''' with field one of these: ''type'', ''priority'', ''milestone'', ''component'', ''version'', ''resolution'', ''keywords'', ''cc'', will be treated as request to change the 'field' property; works only with the `MAIL2TICKET_PROPERTIES` permission.60 * any line beginning with '''#field''' with field one of these: ''type'', ''priority'', ''milestone'', ''component'', ''version'', ''resolution'', ''keywords'', ''cc'', will be treated as request to change the 'field' property; works only with the `MAIL2TICKET_PROPERTIES` permission. 59 61 * mail2trac understand classic actions : resolve, reassign, accept and reopen, as in the classical web UI: 60 62 * '''#reassign : user''' , reassign to user … … 64 66 * for usability, few actions have an alias : 65 67 * '''#fixed''' is interpreted as '''#resolve:fixed''', 66 * '''#duplicate''' is interpreted as '''#resolve:duplicate''' ',68 * '''#duplicate''' is interpreted as '''#resolve:duplicate''', 67 69 * '''#wontfix''' is interpreted as '''#resolve:wontfix''', 68 70 * '''#invalid''' is interpreted as '''#resolve:invalid''', … … 70 72 * any '''#field''' or '''#end''' will be ignored, and what's left is the ticket's description if you create, or the comment if you comment. 71 73 72 '''Rq''' : at the creation, you can assign a ticket by setting its owner with '''#owner : jdoe'''. In a response you have to use the action '''#reassign'''.74 '''Rq''' : upon creation you can assign a ticket by setting its owner with '''#owner : jdoe'''. In a response you have to use the action '''#reassign'''. 73 75 74 76 === Attachments … … 93 95 we can do that with #cc:jdoe, #component: component2 and #priority : 94 96 trivial . 95 (note that this instruction are not on the begin ing of a line and will97 (note that this instruction are not on the beginning of a line and will 96 98 be seen as part of the description) 97 99 … … 125 127 we can do that with #cc:jdoe, #component: component2 and #priority : 126 128 trivial . 127 (note that this instruction are not on the begin ing of a line and will129 (note that this instruction are not on the beginning of a line and will 128 130 be seen as part of the description) 129 131 … … 167 169 > we can do that with #cc:jdoe, #component: component2 and #priority : 168 170 > trivial . 169 > (note that this instruction are not on the begin ing of a line and will171 > (note that this instruction are not on the beginning of a line and will 170 172 > be seen as part of the description) 171 173 > … … 254 256 > X-Mailer: Trac 0.12.2, by Edgewall Software 255 257 256 257 258 }}} 258 259