= Connvert email to trac tickets = == Description == === 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 email2trac.py 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 basv@sara.nl * Walter de Jong walter@sara.nl Contributor: (0.9 port + implemneted some new features) * Michel Jouvin jouvin@lal.in2p3.fr http://www.sara.nl for more info about SARA. == Bugs/Feature Requests == Existing bugs and feature requests for EmailtoTracScript are [report:9?COMPONENT=EmailtoTracScript here]. If you have any issues, create a [http://trac-hacks.swapoff.org/newticket?component=EmailtoTracScript&owner=bas new ticket]. == Download == Download the zipped source from [download:emailtotracscript here]. == Source == You can check out EmailtoTracScript from [http://trac-hacks.swapoff.org/svn/emailtotracscript here] using Subversion, or [source:emailtotracscript browse the source] with Trac. == Example == The email2trac package contains the following utilities: email2trac.py:: Converts an email to ticket. Reads a config file email2trac.conf run_email2trac.c:: Suid program that changes the MTA-user to the TRAC-user so that we can save attachments delete_spam.py:: A small program that deletes the SPAM tickets from the database email2trac.conf:: Is read by email2trac.py 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 }}} == SETUP == It depends on your MTA how the setup is. Below is an example of the SARA setup that uses postfix as our MTA. * Copy email2trac.conf to /etc (default location for email2trac.py) If different location use the -f <filename> option for email2trac.py * Postfix run as user 'nobody' and the apache as user 'www-data'. To enable saving of attachments we must use 'run_email2trac.c'. We do not have to adjust the values. If you use other accounts then adjust the c-file: gcc -o run_email2trac run_email2trac.c default path for email2trac.py is /usr/sbin * cp run_email2trac /usr/sbin * chmod 4111 run_email2trac * cp email2trac.py /usr/sbin * vi /etc/aliases bas: |/usr/sbin/run_email2trac * newaliases * Test cat test7.eml | mail bas == Author/Contributors == '''Author:''' [wiki:bas] [[BR]] '''Contributors:''' [[TagIt(script,bas,0.8,0.9)]]