Edgewall Software
Modify

Opened 19 years ago

Closed 18 years ago

#2397 closed enhancement (wontfix)

Better Crontib'd Bi-Directional E-Mail Integration

Reported by: Demitrious S. Kelly <dkelly@…> Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: 0.9
Severity: normal Keywords: e-mail email gateway smtp ticket
Cc: dkelly@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It would be great if trac had better e-mail integration. For example simply being able to take a reply to an e-mail notification and add it as a comment to an existing ticket would allow for much easier general use, as well as allow a private installation of trac to function as a support gateway. I'll attach my v1.0 code for this.

Attachments (1)

Trac-Egw.py (2.4 KB ) - added by Demitrious S. Kelly <dkelly@…> 19 years ago.
Improved functionality: piped input email-to-ticket gateway

Download all attachments as: .zip

Change History (7)

by Demitrious S. Kelly <dkelly@…>, 19 years ago

Attachment: Trac-Egw.py added

Improved functionality: piped input email-to-ticket gateway

comment:1 by Demitrious S. Kelly <dkelly@…>, 19 years ago

Cc: dkelly@… added

comment:2 by colin@…, 19 years ago

Type: enhancementdefect

This really needs a configuration usecase documented, otherwise it's of little use to others. As an example, getting this to function correctly in the standard chrooted environment of Postfix is quite academic, and impossible to debug as mail logs do not allow for a large traceback and the problems cannot be reproduced outside of this environment (it works for everything *other* than a piped email integration).

Apr 8 03:24:31 jupiter postfix/local[6418]: 2E54E450E: to=<tracit@jupiter.netlink.za.net>, relay=local, delay=0, status=bounced (Command died with status 1: "/usr/local/bin/Trac-Egw.py". Command output: Traceback (most recent call last): File "/usr/local/bin/Trac-Egw.py", line 69, in ? tktparser.parse(msg) File "/usr/local/bin/Trac-Egw.py", line 21, in parse tkt = Ticket(self.env) File "/usr/lib/python2.3/site-packages/trac/ticket/model.py", line 35, in __init__ self.fields = TicketSystem(self.env).get_ticket_fields() File "/usr/lib/python2.3/site-packages/trac/ticket/api.py", line 49, in get_ticket_fields db = self.env.get_db_cnx() File "/usr/lib/python2.3/site-packages/trac/env.py", line 144, in get_db_cnx return DatabaseManager(self).get_connection() File "/usr/lib/python2.3/site-packages/trac/db/api.py", line 59, in get_connection return self._cnx_pool.get_cnx() File "/usr/lib/python2.3/site-packages/trac/db/pool.py", line 75, in get_cnx

comment:3 by anonymous, 19 years ago

Type: defectenhancement

comment:4 by colin@…, 19 years ago

My bad this does work, and well too. The only problem is that the trac instance must be world readable, and the database world writable, as Postfix delivers as the user of the local address - which is a touch worrying.

comment:5 by ff-trac@…, 18 years ago

Nobody should use this script, there is an sql injection problem wrt the use of the From value in a simple format.

You need to be using placeholders in stead, see this page for some examples of how track does it: http://www.initd.org/tracker/psycopg/browser/psycopg2/trunk/doc/extensions.rst?rev=729

comment:6 by Christian Boos, 18 years ago

Resolution: wontfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.