source: emailtotracscript/trunk/INSTALL @ 93

Last change on this file since 93 was 93, checked in by bas, 18 years ago

EmailtoTracScript?:

INSTALL:

  • added docs for sendmail
  • Property svn:mime-type set to text/x-trac-wiki
File size: 4.9 KB
RevLine 
[16]1= Installation and Configuration of email2trac =
2
[5]3The 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)
[92]24 enable_syslog: 1           # OPTIONAL, if set log errors to syslog, note errors are not
25                                        mailed back to the reporter.
[19]26
[20]27 [bas]                     # OPTIONAL project declaration, also set
28                           # project option, use -p|--project
29 project: /data/trac/bas   #
[19]30 spam_level: 2             # Override DEFAULT spam_level, can also be
31                           # done for other options
[16]32}}}
[5]33
[16]34== Installation and Configuration ==
[5]35
[16]36First build, install email2trac :
[5]37
[51]38option 1:
39  * ./configure (see --help)
[24]40    {{{
41    default values for:
42       prefix=/usr/local        --> --prefix=<path>
43       exec_prefix=$prefix/bin  --> --exec_prefix=<path>
44       sysconfdir=$prefix/etc   --> --sysconfdir=<path>
45       MTA_USER=nobody          --> --with-mta_user=<name>
46       TRAC_USER=www-data       --> --with-trac_user=<name>
47    }}}
[16]48  * make
49  * make install
[24]50  * First install copy emailtrac.conf to $sysconfdir
[5]51
[51]52option 2:
53  * debian/rules binary
54  * First install copy emailtrac.conf to /etc
[9]55
[51]56After installation, edit email2trac.conf for your site. Most important
57parameter is project, see above
58
[81]59If you have enabled 'ticket_update' in email2trac.conf then you have
[82]60to choose one of these options to make it work:
[81]61  1 - Configure trac notification, eg:
62      - (ticket address: ticket@test.nl)
63      [notification]
64      smtp_enabled = true
65      smtp_always_cc = test@test.nl
66      smtp_server = localhost
67      smtp_from =  ticket@test.nl
68      always_notify_reporter = true
69
70  2 - Use the mailto_cc in email2trac.conf if you want to sent
[82]71      an email to the user and the trac ticket email address via
72      the mailto link
[81]73
[16]74== Usage ==
75
[19]76It depends on your MTA how the setup is. For Sendmail and Postfix, the p
77rocedure is the same :
78 * Edit your alias definition file (default : /etc/aliases for Postfix,
79   /etc/mail/aliases for Sendmail) and add one line per project/component you
80   want to allow ticket submission from email to. For each alias, you can
81   specify option --project. This option selects a configuration stanza in the
82   config file and ''--component'' to specify a component other than the
83   default component for the project. Line must have the following format :
[16]84{{{
[93]85     tracproj: |"/usr/sbin/run_email2trac [--project=<project_name>] [--component=<project_component>]"
[16]86}}}
87
88  * Update your alias database with command ''newaliases''
[19]89  * Test with a command like :
[16]90{{{
[56]91     mail tracproj
[16]92}}}
[93]93
94===  Note for Sendmail ===
95This is a message from emailtotrac tickets archive:
96{{{
97Sendmail limits the executables that can be run via aliases to those in a
98special directory, and runs them using a restricted shell called smrsh.
99On RH, the default location for the allowed programs is /etc/smrsh.
100
101I tried both a link in that dir to the run_email2trac file and a little
102shell script that simply calls run_email2trac and passes the params. Both
103should work, but neither did yet. Majordomo works the same way, and it
104set up on the machine already so I'll check on that later today.
105
106I found a pretty good walk-through of the problem/solution at
107http://archives.free.net.ph/message/20030605.105120.74c3bfa8.html
108
109Well, I was in fact doing the right thing. Here's all the steps to follow
110post make install
111
112ln -s /usr/local/bin/run_email2trac /etc/smrsh/run_email2trac
113
114in aliases use:
115
116"|run_email2trac -project=bas"
117
118Note: Include the quotes, they are necessary. That got me past the
119sendmail problem. No ticket appeared in the project, but I'll look into
120that next. Is there a log generated anywhere?
121}}}
Note: See TracBrowser for help on using the repository browser.