Version 8 (modified by Bas van der Vlies, 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
  • Walter de Jong

Contributor: (0.9 port + implemented some new features)

  • Michel Jouvin for more info about SARA.

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.


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:
[DEFAULT]               # REQUIRED
project: /data/trac/bas # 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 [mailto:<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


It depends on your MTA how the setup is. Below is an example of the SARA setup that uses postfix as our MTA.

  • Edit Makefile, adjust the variables
  • make
  • make install
  • Copy email2trac.conf to /etc (default location for If different location use the "-f <config file> or --file=<config file>" to run_email2trac
  • vi /etc/aliases
    bas: |/usr/sbin/run_email2trac [-f|--filename <config file>]
  • newaliases
  • Test
    cat test7.eml | mail bas 


Author: bas, Walter de Jong
Contributors: Michel Jouvin