[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 |
---|
| 20 | email_header: 1 # OPTIONAL, if set then show TO/CC fields in description |
---|
| 21 | trac_version: 0.8 # OPTIONAL, if set use this as trac version (D: 0.9) |
---|
| 22 | |
---|
[20] | 23 | [bas] # OPTIONAL project declaration, also set |
---|
| 24 | # project option, use -p|--project |
---|
| 25 | project: /data/trac/bas # |
---|
[19] | 26 | spam_level: 2 # Override DEFAULT spam_level, can also be |
---|
| 27 | # done for other options |
---|
[16] | 28 | }}} |
---|
[5] | 29 | |
---|
[16] | 30 | == Installation and Configuration == |
---|
[5] | 31 | |
---|
[16] | 32 | First build, install email2trac : |
---|
[5] | 33 | |
---|
[24] | 34 | * ./configure (see --help) |
---|
| 35 | {{{ |
---|
| 36 | default values for: |
---|
| 37 | prefix=/usr/local --> --prefix=<path> |
---|
| 38 | exec_prefix=$prefix/bin --> --exec_prefix=<path> |
---|
| 39 | sysconfdir=$prefix/etc --> --sysconfdir=<path> |
---|
| 40 | MTA_USER=nobody --> --with-mta_user=<name> |
---|
| 41 | TRAC_USER=www-data --> --with-trac_user=<name> |
---|
| 42 | }}} |
---|
[16] | 43 | * make |
---|
| 44 | * make install |
---|
[24] | 45 | * First install copy emailtrac.conf to $sysconfdir |
---|
[5] | 46 | |
---|
[19] | 47 | After installation, edit email2trac.conf for your site. Most important |
---|
| 48 | parameter is project, see above |
---|
[9] | 49 | |
---|
[16] | 50 | == Usage == |
---|
| 51 | |
---|
[19] | 52 | It depends on your MTA how the setup is. For Sendmail and Postfix, the p |
---|
| 53 | rocedure is the same : |
---|
| 54 | * Edit your alias definition file (default : /etc/aliases for Postfix, |
---|
| 55 | /etc/mail/aliases for Sendmail) and add one line per project/component you |
---|
| 56 | want to allow ticket submission from email to. For each alias, you can |
---|
| 57 | specify option --project. This option selects a configuration stanza in the |
---|
| 58 | config file and ''--component'' to specify a component other than the |
---|
| 59 | default component for the project. Line must have the following format : |
---|
[16] | 60 | {{{ |
---|
| 61 | tracproj: |/usr/sbin/run_email2trac [--project=<project_name>] [--component=<project_component>] |
---|
| 62 | }}} |
---|
| 63 | |
---|
| 64 | * Update your alias database with command ''newaliases'' |
---|
[19] | 65 | * Test with a command like : |
---|
[16] | 66 | {{{ |
---|
| 67 | mail tracproj < test7.eml |
---|
| 68 | }}} |
---|