[16] | 1 | = Installation and Configuration of email2trac = |
---|
| 2 | |
---|
[5] | 3 | The email2trac package contains the following utilities: |
---|
[19] | 4 | email2trac.py : converts an email to ticket. Reads a config file |
---|
| 5 | email2trac.conf |
---|
| 6 | run_email2trac.c: suid program that changes the MTA-user to the TRAC-user so |
---|
| 7 | that we can save attachments |
---|
| 8 | delete_spam.py : small program that deletes the SPAM tickets from the database |
---|
| 9 | email2trac.conf : read by email2trac.py to set the various options. This are |
---|
| 10 | the options: |
---|
[16] | 11 | {{{ |
---|
[19] | 12 | [DEFAULT] # REQUIRED |
---|
| 13 | project: /data/trac/jouvin # REQUIRED |
---|
| 14 | debug: 1 # OPTIONAL, if set print some DEBUG info |
---|
| 15 | spam_level: 4 # OPTIONAL, if set check for SPAM mail |
---|
[47] | 16 | reply_address: 1 # OBSOLETE, see trac.ini notification section |
---|
| 17 | reply_all: 1 # OPTIONAL, if set then put all CC-addresses in ticket CC-field |
---|
[19] | 18 | umask: 022 # OPTIONAL, Use this umask for saving attachments |
---|
| 19 | mailto_link: 1 # OPTIONAL, if set then [mailto:<CC>] in description |
---|
[82] | 20 | mailto_cc: ticket@test.nl # OPTIONAL, Use this address as CC in mailto line |
---|
[74] | 21 | ticket_update: 1 # OPTIONAL, if set then check if this is an update for a ticket |
---|
[19] | 22 | email_header: 1 # OPTIONAL, if set then show TO/CC fields in description |
---|
| 23 | trac_version: 0.8 # OPTIONAL, if set use this as trac version (D: 0.9) |
---|
| 24 | |
---|
[20] | 25 | [bas] # OPTIONAL project declaration, also set |
---|
| 26 | # project option, use -p|--project |
---|
| 27 | project: /data/trac/bas # |
---|
[19] | 28 | spam_level: 2 # Override DEFAULT spam_level, can also be |
---|
| 29 | # done for other options |
---|
[16] | 30 | }}} |
---|
[5] | 31 | |
---|
[16] | 32 | == Installation and Configuration == |
---|
[5] | 33 | |
---|
[16] | 34 | First build, install email2trac : |
---|
[5] | 35 | |
---|
[51] | 36 | option 1: |
---|
| 37 | * ./configure (see --help) |
---|
[24] | 38 | {{{ |
---|
| 39 | default values for: |
---|
| 40 | prefix=/usr/local --> --prefix=<path> |
---|
| 41 | exec_prefix=$prefix/bin --> --exec_prefix=<path> |
---|
| 42 | sysconfdir=$prefix/etc --> --sysconfdir=<path> |
---|
| 43 | MTA_USER=nobody --> --with-mta_user=<name> |
---|
| 44 | TRAC_USER=www-data --> --with-trac_user=<name> |
---|
| 45 | }}} |
---|
[16] | 46 | * make |
---|
| 47 | * make install |
---|
[24] | 48 | * First install copy emailtrac.conf to $sysconfdir |
---|
[5] | 49 | |
---|
[51] | 50 | option 2: |
---|
| 51 | * debian/rules binary |
---|
| 52 | * First install copy emailtrac.conf to /etc |
---|
[9] | 53 | |
---|
[51] | 54 | After installation, edit email2trac.conf for your site. Most important |
---|
| 55 | parameter is project, see above |
---|
| 56 | |
---|
[81] | 57 | If you have enabled 'ticket_update' in email2trac.conf then you have |
---|
[82] | 58 | to choose one of these options to make it work: |
---|
[81] | 59 | 1 - Configure trac notification, eg: |
---|
| 60 | - (ticket address: ticket@test.nl) |
---|
| 61 | [notification] |
---|
| 62 | smtp_enabled = true |
---|
| 63 | smtp_always_cc = test@test.nl |
---|
| 64 | smtp_server = localhost |
---|
| 65 | smtp_from = ticket@test.nl |
---|
| 66 | always_notify_reporter = true |
---|
| 67 | |
---|
| 68 | 2 - Use the mailto_cc in email2trac.conf if you want to sent |
---|
[82] | 69 | an email to the user and the trac ticket email address via |
---|
| 70 | the mailto link |
---|
[81] | 71 | |
---|
[16] | 72 | == Usage == |
---|
| 73 | |
---|
[19] | 74 | It depends on your MTA how the setup is. For Sendmail and Postfix, the p |
---|
| 75 | rocedure is the same : |
---|
| 76 | * Edit your alias definition file (default : /etc/aliases for Postfix, |
---|
| 77 | /etc/mail/aliases for Sendmail) and add one line per project/component you |
---|
| 78 | want to allow ticket submission from email to. For each alias, you can |
---|
| 79 | specify option --project. This option selects a configuration stanza in the |
---|
| 80 | config file and ''--component'' to specify a component other than the |
---|
| 81 | default component for the project. Line must have the following format : |
---|
[16] | 82 | {{{ |
---|
| 83 | tracproj: |/usr/sbin/run_email2trac [--project=<project_name>] [--component=<project_component>] |
---|
| 84 | }}} |
---|
| 85 | |
---|
| 86 | * Update your alias database with command ''newaliases'' |
---|
[19] | 87 | * Test with a command like : |
---|
[16] | 88 | {{{ |
---|
[56] | 89 | mail tracproj |
---|
[16] | 90 | }}} |
---|