Ignore:
Timestamp:
12/08/06 17:48:31 (17 years ago)
Author:
bas
Message:

EmailtoTracScript?:

email2trac.py.in:

  • default version 0.10

INSTALL:

  • Only list http sites
File:
1 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/INSTALL

    r106 r146  
    11= Installation and Configuration of email2trac =
    22
    3 The email2trac package contains the following utilities:
    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:
    11 {{{
    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
    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
    18  umask: 022                 # OPTIONAL, Use this umask for saving attachments
    19  mailto_link: 1             # OPTIONAL, if set then [mailto:<CC>] in description
    20  mailto_cc: ticket@test.nl  # OPTIONAL, Use this address as CC in mailto line
    21  ticket_update: 1           # OPTIONAL, if set then check if this is an update for a ticket
    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  enable_syslog: 1           # OPTIONAL, if set log errors to syslog, note errors are not
    25                                         mailed back to the reporter.
    26 
    27  [bas]                     # OPTIONAL project declaration, also set
    28                            # project option, use -p|--project
    29  project: /data/trac/bas   #
    30  spam_level: 2             # Override DEFAULT spam_level, can also be
    31                            # done for other options
    32 }}}
    33 
    34 == Installation and Configuration ==
    35 
    36 First build, install email2trac :
    37 
    38 option 1:
    39   * ./configure (see --help)
    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     }}}
    48   * make
    49   * make install
    50   * First install copy emailtrac.conf to $sysconfdir
    51 
    52 option 2:
    53   * debian/rules binary
    54   * First install copy emailtrac.conf to /etc
    55 
    56 option 3:
    57   * cp email2trac.tar.gz /usr/src/redhat/SOURCES
    58   * rpmbuild -ba email2trac.spec
    59 
    60 After installation, edit email2trac.conf for your site. Most important
    61 parameter is project, see above
    62 
    63 If you have enabled 'ticket_update' in email2trac.conf then you have
    64 to choose one of these options to make it work:
    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
    75       an email to the user and the trac ticket email address via
    76       the mailto link
    77 
    78 == Usage ==
    79 
    80 It depends on your MTA how the setup is. For Sendmail and Postfix, the p
    81 rocedure 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 :
    88 {{{
    89      tracproj: |"/usr/sbin/run_email2trac [--project=<project_name>] [--component=<project_component>]"
    90 }}}
    91 
    92   * Update your alias database with command ''newaliases''
    93   * Test with a command like :
    94 {{{
    95      mail tracproj
    96 }}}
    97 
    98 ===  Note for Sendmail ===
    99 This is a message from emailtotrac tickets archive:
    100 {{{
    101 Sendmail limits the executables that can be run via aliases to those in a
    102 special directory, and runs them using a restricted shell called smrsh.
    103 On RH, the default location for the allowed programs is /etc/smrsh.
    104 
    105 I tried both a link in that dir to the run_email2trac file and a little
    106 shell script that simply calls run_email2trac and passes the params. Both
    107 should work, but neither did yet. Majordomo works the same way, and it
    108 set up on the machine already so I'll check on that later today.
    109 
    110 I found a pretty good walk-through of the problem/solution at
    111 http://archives.free.net.ph/message/20030605.105120.74c3bfa8.html
    112 
    113 Well, I was in fact doing the right thing. Here's all the steps to follow
    114 post make install
    115 
    116 ln -s /usr/local/bin/run_email2trac /etc/smrsh/run_email2trac
    117 
    118 in aliases use:
    119 
    120 "|run_email2trac -project=bas"
    121 
    122 Note: Include the quotes, they are necessary. That got me past the
    123 sendmail problem. No ticket appeared in the project, but I'll look into
    124 that next. Is there a log generated anywhere?
    125 }}}
     3See for installation:
     4        http://www.trac-hacks.org/wiki/EmailtoTracScript
     5                or
     6        https://subtrac.sara.nl/oss/email2trac
Note: See TracChangeset for help on using the changeset viewer.