[Rt-devel] some stupid ticket systems decide to change the subject line

Bob Goldstein bobg at uic.edu
Mon Oct 2 10:57:09 EDT 2006


>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 at company.com".  If you could
  change that to  "myrt+2345 at 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
   <rtdir>/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


More information about the Rt-devel mailing list