1 | The email2trac package contains the following utilities: |
---|
2 | - email2trac.py: |
---|
3 | Converts an email to ticket. Reads a config file email2trac.conf |
---|
4 | - run_email2trac.c: |
---|
5 | Suid program that changes the MTA-user to the TRAC-user so that we can |
---|
6 | save attachments |
---|
7 | - delete_spam.py: |
---|
8 | A small program that deletes the SPAM tickets from the database |
---|
9 | - email2trac.conf: |
---|
10 | Is read by email2trac.py to set the various options. This are the options: |
---|
11 | [DEFAULT] # REQUIRED |
---|
12 | project: /data/trac/bas # REQUIRED |
---|
13 | debug: 1 # OPTIONAL, if set print some DEBUG info |
---|
14 | spam_level: 4 # OPTIONAL, if set check for SPAM mail |
---|
15 | reply_address: 1 # OPTIONAL, if set then fill in ticket CC field |
---|
16 | umask: 022 # OPTIONAL, Use this umask for saving attachments |
---|
17 | mailto_link: 1 # OPTIONAL, if set then [mailto:<CC>] in description |
---|
18 | email_header: 1 # OPTIONAL, if set then show TO/CC fields in description |
---|
19 | |
---|
20 | |
---|
21 | SETUP |
---|
22 | ===== |
---|
23 | |
---|
24 | It depends on your MTA how the setup is. Below is an example of the SARA setup |
---|
25 | that uses postfix as our MTA. |
---|
26 | - Copy email2trac.conf to /etc (default location for email2trac.py) |
---|
27 | If different location use the -f <filename> option for email2trac.py |
---|
28 | - Postfix run as user 'nobody' and the apache as user 'www-data'. To enable |
---|
29 | saving of attachments we must use 'run_email2trac.c'. We do not have to |
---|
30 | adjust the values. If you use other accounts then adjust the c-file: |
---|
31 | gcc -o run_email2trac run_email2trac.c |
---|
32 | |
---|
33 | default path for email2trac.py is /usr/sbin |
---|
34 | - cp run_email2trac /usr/sbin |
---|
35 | - chmod 4111 run_email2trac |
---|
36 | - cp email2trac.py /usr/sbin |
---|
37 | - vi /etc/aliases |
---|
38 | bas: |/usr/sbin/run_email2trac |
---|
39 | - newaliases |
---|
40 | - Test |
---|
41 | mail bas < test7.eml |
---|