Version 20 (modified by anonymous, 15 years ago) (diff)


Connvert email to trac tickets


email2trac utilities

This is a release of the SARA package email2trac that contains utilities that we use to convert emails to trac tickets. The initial setup was made by Daniel Lundin from Edgewall Software. SARA has extend the initial setup, with the following extensions:

  • HTML messages
  • Attachments
  • Use commandline options
  • Use config file to change the behaviour of the program
  • Some unicode support for special characters in the headers of an email message

See INSTALL for the how to setup the utilities

Comments or Suggestions mail them to:

  • Bas van der Vlies, more info about SARA
  • Walter de Jong

Contributor: (0.9 port + implemented some new features)

  • Michel Jouvin

Bugs/Feature Requests

Existing bugs and feature requests for EmailtoTracScript are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:emailtotracscript here].


You can check out EmailtoTracScript from here using Subversion, or browse the source with Trac.

Installation and Configuration

The email2trac package contains the following utilities:
Converts an email to ticket. Reads a config file email2trac.conf
Suid program that changes the MTA-user to the TRAC-user so that we can save attachments
A small program that deletes the SPAM tickets from the database


Is read by to set the various options. This are the options:

NAME VALUE Explanation
project: /data/trac/jouvin REQUIRED
debug: 1 OPTIONAL, if set print some DEBUG info
spam_level: 4 OPTIONAL, if set check for SPAM mail
reply_address: 1 OPTIONAL, if set then fill in ticket CC field
umask: 022 OPTIONAL, Use this umask for saving attachments
mailto_link: 1 OPTIONAL, if set then CC in description
email_header: 1 OPTIONAL, if set then show TO/CC fields in description
trac_version: 0.8 OPTIONAL. if set then use this as version number, default 0.9
[bas] OPTIONAL project declaration, also set project and use --project option
project: /data/trac/bas
spam_level: 2 Override DEFAULT spam_level, can also be done for other options

Installation and Configuration

First build, install email2trac :

  • Edit Makefile, adjust the variables (in particular INSTALL_DIR, MTA_USER and TRAC_USER)
  • make
  • make install
  • Define a symlink /etc/email2trac.conf referencing $INSTALL_DIR/email2trac.conf

After installation, edit email2trac.conf for your site. Most important parameter is project, see above


It depends on your MTA how the setup is. For Sendmail and Postfix, the procedure is the same :

  • Edit your alias definition file (default : /etc/aliases for Postfix, /etc/mail/aliases for Sendmail) and add one line per project/component you want to allow ticket submission from email to. For each alias, you can specify option --project. This option selects a configuration stanza in the config file and --component to specify a component other than the default component for the project. Line must have the following format :
         tracproj: |/usr/sbin/run_email2trac [--project=<name>] [--component=<component>]
  • Update your alias database with command newaliases
  • Test with a command like :
         mail tracproj < test7.eml


Author: bas, Walter de Jong
Contributors: Michel Jouvin