source: emailtotracscript/trunk/INSTALL @ 106

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

EmailtoTracScript?:

Added:

  • email2trac.spec file thanks to Jon Topper
  • Property svn:mime-type set to text/x-trac-wiki
File size: 5.0 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
[106]56option 3:
57  * cp email2trac.tar.gz /usr/src/redhat/SOURCES
58  * rpmbuild -ba email2trac.spec
59
[51]60After installation, edit email2trac.conf for your site. Most important
61parameter is project, see above
62
[81]63If you have enabled 'ticket_update' in email2trac.conf then you have
[82]64to choose one of these options to make it work:
[81]65  1 - Configure trac notification, eg:
66      - (ticket address: ticket@test.nl)
67      [notification]
68      smtp_enabled = true
69      smtp_always_cc = test@test.nl
70      smtp_server = localhost
71      smtp_from =  ticket@test.nl
72      always_notify_reporter = true
73
74  2 - Use the mailto_cc in email2trac.conf if you want to sent
[82]75      an email to the user and the trac ticket email address via
76      the mailto link
[81]77
[16]78== Usage ==
79
[19]80It depends on your MTA how the setup is. For Sendmail and Postfix, the p
81rocedure is the same :
82 * Edit your alias definition file (default : /etc/aliases for Postfix,
83   /etc/mail/aliases for Sendmail) and add one line per project/component you
84   want to allow ticket submission from email to. For each alias, you can
85   specify option --project. This option selects a configuration stanza in the
86   config file and ''--component'' to specify a component other than the
87   default component for the project. Line must have the following format :
[16]88{{{
[93]89     tracproj: |"/usr/sbin/run_email2trac [--project=<project_name>] [--component=<project_component>]"
[16]90}}}
91
92  * Update your alias database with command ''newaliases''
[19]93  * Test with a command like :
[16]94{{{
[56]95     mail tracproj
[16]96}}}
[93]97
98===  Note for Sendmail ===
99This is a message from emailtotrac tickets archive:
100{{{
101Sendmail limits the executables that can be run via aliases to those in a
102special directory, and runs them using a restricted shell called smrsh.
103On RH, the default location for the allowed programs is /etc/smrsh.
104
105I tried both a link in that dir to the run_email2trac file and a little
106shell script that simply calls run_email2trac and passes the params. Both
107should work, but neither did yet. Majordomo works the same way, and it
108set up on the machine already so I'll check on that later today.
109
110I found a pretty good walk-through of the problem/solution at
111http://archives.free.net.ph/message/20030605.105120.74c3bfa8.html
112
113Well, I was in fact doing the right thing. Here's all the steps to follow
114post make install
115
116ln -s /usr/local/bin/run_email2trac /etc/smrsh/run_email2trac
117
118in aliases use:
119
120"|run_email2trac -project=bas"
121
122Note: Include the quotes, they are necessary. That got me past the
123sendmail problem. No ticket appeared in the project, but I'll look into
124that next. Is there a log generated anywhere?
125}}}
Note: See TracBrowser for help on using the repository browser.