Hi there;
Some of our customers ticket systems decide on changing the subject line
altogether,and as a result we get an update to one of our tickets that
generate new one instead of adding new correspondence to the original
ticket. Is there any way we can add new headers where RT should be
looking for [myrt #number] instead of the subject line … I must admit I
not very familiar with the email rfc , and before I go on changing
headers I thought I’ll pass it by the experts …Any pointers or help
will be appreciated.
Regards;
Roy
Hi there;
Some of our customers ticket systems decide on changing the subject line
altogether,and as a result we get an update to one of our tickets that
generate new one instead of adding new correspondence to the original
ticket. Is there any way we can add new headers where RT should be
looking for [myrt #number] instead of the subject line … I must admit I
not very familiar with the email rfc , and before I go on changing
headers I thought I’ll pass it by the experts …Any pointers or help
will be appreciated.
Regards;
If you add a new header, would the remote system send that header
back to you, or just drop it? Better check before coding.
One interesting possibility is the FROM/TO. For example, suppose
when RT sends mail, the FROM is “myrt@company.com”. If you could
change that to “myrt+2345@company.com” (indicating the RT ticket is 2345),
then when the remote site replies, the mail will still get delivered,
but you’ll have the ticket number in a new place.
I’m sure you could add another header in a scrip. If you want to
alter the FROM address, I’m not sure if a scrip is enough,
or you need to mod the code.
In terms of parsing the returned mail, see the file
/lib/RT/Interface/Email.pm There is a subroutine ParseTicketId()
that parses the RT number. You’d have to override that subroutine
to check the TO address instead of the subject.
Unfortunately, I just discovered last night, that this routine
used to be in …/lib/RT/EmailParser.pm and the old place (from 3.4.x)
is deprecated. That’s unfortunate, because the old place
is much better for your purposes and mine. In the old way,
the call passed info about all the mail headers, so it was
easy to check for non-Subject lines. Now, only the Subject
line, itself, is passed. Which means, you can’t just override
ParseTicketId(), you have to change where it is called from
lib/RT/Interface/Email::Gateway
bobg
- Roy El-Hames:
Some of our customers ticket systems decide on changing the subject
line altogether,and as a result we get an update to one of our tickets
that generate new one instead of adding new correspondence to the
original ticket. Is there any way we can add new headers where RT
should be looking for [myrt #number] instead of the subject line …
The correct way to deal with this problem is to use ticket-specific
email addresses. This way, you are immune to subject rewriting. You
can even copy the subject line from the auto-response, so that the
tickets are linked together in both systems (there should be an
AdoptSubject script which implements this).
Interoperability of ticketing systems is a very neglected issue, I’m
afraid.
Florian Weimer fweimer@bfk.de
BFK edv-consulting GmbH http://www.bfk.de/
Durlacher Allee 47 tel: +49-721-96201-1
D-76131 Karlsruhe fax: +49-721-96201-99