I’m one of the RT admins at work, and the main feature I’m always asked about is the “–reply above this line” delimiter you see in most modern email-based ticket systems. I’ve done a lot of searching online, but I can’t find a way to implement this. I even looked for Linux tools that could do it–I thought I might be able to use such a tool before RT’s mail processor is called, so RT itself would only receive the email text above the delimiter. I’ve had no luck.
RT’s method of including the entire email, but automatically hiding quoted text, isn’t a great solution. The concerns I hear from users are mostly these:
Some mail clients mess up the quoting, especially on longer mail threads. This can lead to random bits of old messages appearing, unquoted, in newer replies.
Signatures aren’t quoted by most mail clients. You then get a reply, some quoted text, then the sender’s email signature. Some signatures can be long, or involve images, which makes history annoying to dig through and wastes space (on the screen and in the database).
The signature can appear multiple times, as it may not be quoted properly in replies. An unquoted signature could show up two, or three, or five times on a single ticket reply. This makes the previous point even worse.
A delimiter fixes all this, by only putting the text above the line into the ticket. Everyone is asking me if there’s a way to have RT do this, but I’m unable to find anything. If this is possible, how? If not, how to you deal with the problems described above? Thank you.
To clarify, the goal is to parse out content after the delimiter for incoming emails so that it never makes it in the RT transaction? I am guessing there must be a place to do this in the Email interface
at the top, after which are all the transaction details. New ticket, owner change, reply, comment, it doesn’t matter. Every template would have that line at the top. When an email came in, if that line were found in it, everything above the line would be processed by RT, while everything below it would be discarded. If the line were absent, the entire email would be processed, as that’s likely a new ticket being sent in via email.
This is similar to Jira, Zendesk, and other help systems I’ve seen. I just can’t work out how to actually make it happen. My Perl knowledge is very low, so I’m not sure how I’d modify the mailgate program. I don’t even know if that’s the place to modify. I’m fine in other languages, just not Perl.
MIMEObj, not Content? I figured I’d want to modify the Content argument. I may also see if I can track down where this gets called for mail-based correspondence and modify it there. This way we can have discussions about the delimiter string using the website, without those replies being filtered.
This may work–thank you! I can just modify the message before it gets passed along. Will this work the same as HTML files, where I can create a copy in the same path under the local folder and RT will use my module instead of the one in lib? That is, rt5/local/lib/Interface/Email/Action/Defaults.pm will be used in place of rt5/lib/Interface/Email/Action/Defaults.pm?
Thank you, this script looks to do exactly what I want. Do you use it with Sendmail? I have our RT set up with Fetchmail, but I’m not at all opposed to switching if there’s no way to insert this script between Fetchmail and the RT mailgate.