Stripping email history from reply mail body

I don’t know if this is possible or not, but has anyone figured out how
to strip out the original message body from reply messages. What is
happening to us is when a ticket is a longer job each reply from our
users contains the original message sent to them. If I don’t strip this
by hand each new correspondence grows larger and the ticket history
becomes really difficult to read. Do you think I could safely regex the
mail body in a scrip? Maybe get rid of lines starting with ‘>’?

Anyone have a solution already short of educating our users?

Thanks!
Davin Flatten

On Thu, 02 Feb 2006 18:30:32 -0500
Davin Flatten flatten@ecs.umass.edu spake:

I don’t know if this is possible or not, but has anyone figured out how
to strip out the original message body from reply messages. What is
happening to us is when a ticket is a longer job each reply from our
users contains the original message sent to them. If I don’t strip this
by hand each new correspondence grows larger and the ticket history
becomes really difficult to read. Do you think I could safely regex the
mail body in a scrip? Maybe get rid of lines starting with ‘>’?

Anyone have a solution already short of educating our users?

Thanks!
Davin Flatten

I’ve been wondering this same thing. In my wonderings though I’ve
thought of a few times that it would be a problem. Mostly with people
who insert answers throughout the reply. If you stripped it out
automatically you’d lose the context of the answers.

A cool feature would be an option to “Clean up this message” or
something. I know PERL, but have little insight into RT, and my
proportion of available time versus desire for this feature factored by
the initial learning curve is not correct yet.

Bill Chmura
Director of Internet Technology
Explosivo ITG
Wolcott, CT

p: 860.621.8693
e: bill@Explosivo.com
w. http://www.explosivo.com

A cool feature would be an option to “Clean up this message” or
something. I know PERL, but have little insight into RT, and my
proportion of available time versus desire for this feature factored
by
the initial learning curve is not correct yet.

That sounds like a cool feature indeed.

I know I get all sorts of complaints from people, and even more people
don’t seem to care and as a result clutter things up (or perhaps they
don’t feel they can spend all that time doing it manually… poor over
worked people :wink: )

It would be kinda cool to have a way to make it an option… to clean it
up. What about even using some JS on the client side and then strip
everthing that starts with > or >>>>>

duncan

On Thu, 02 Feb 2006 18:30:32 -0500
Davin Flatten flatten@ecs.umass.edu spake:

I don’t know if this is possible or not, but has anyone figured out how
to strip out the original message body from reply messages. What is
happening to us is when a ticket is a longer job each reply from our
users contains the original message sent to them. […]
Do you think I could safely regex the
mail body in a scrip? Maybe get rid of lines starting with ‘>’?
I’ve been wondering this same thing. In my wonderings though I’ve
thought of a few times that it would be a problem. Mostly with people
who insert answers throughout the reply. If you stripped it out
automatically you’d lose the context of the answers.

Roundup’s email gateway, has the options:

keep_quoted_text – yes
Keep email citations when accepting messages. Setting this to no
strips out “quoted” text from the message. Signatures are also
stripped. Allowed values: yes, no

leave_body_unchanged – no
Preserve the email body as is - that is, keep the citations and
signatures. Allowed values: yes, no

leave_body_unchanged=no strips anything after a signature marker
(usually --), so this usually clears out quoted text when the user top
quotes. You could also strip quoted text starting from the end of the
email. This would preserve the inline quotes (which is correct) but
strip the prior quoted message when somebody top quotes.

Another alternative is to allow the user (or the queue/site) to set
the number of quoted context lines and take say 3 lines at the
beginning of quoted text, insert a […], and 3 lines at the end of
the quoted area to provide context for the response.

A cool feature would be an option to “Clean up this message” or
something.

Yup. As long as yu can unstrip the message it would be very neat.

			-- rouilj

John Rouillard
System Administrator
Renesys Corporation
603-643-9300 x 111

Stripping history like this isn’t as easy as you think. There are many
email clients (mostly webclients) that don’t handle the history block
well, and will wrap lines of history without indenting them. And if
someone replies inline stripping the history can make the response
unintelligable.

We don’t strip anything, but we do hide history. In the history
display, for each attachment, we wrap from the first quoted element to
the end of the attachment in a Titlebox that’s content is hidden by
default. So if the user wants to view the text all they need to do is
expand the box.

If others are interested we can provide code.

jbw

Davin Flatten wrote:

Very interested!
If you’re willing to provide the code it would be much appreciated!

Chris Boothroyd
Technical Support
Trent University
(705) 748-1011 x7066

Joby Walker joby@u.washington.edu 03/02/2006 11:28 am >>>
Stripping history like this isn’t as easy as you think. There are many
email clients (mostly webclients) that don’t handle the history block
well, and will wrap lines of history without indenting them. And if
someone replies inline stripping the history can make the response
unintelligable.

We don’t strip anything, but we do hide history. In the history
display, for each attachment, we wrap from the first quoted element to
the end of the attachment in a Titlebox that’s content is hidden by
default. So if the user wants to view the text all they need to do is
expand the box.

If others are interested we can provide code.

jbw

Davin Flatten wrote:

I don’t know if this is possible or not, but has anyone figured out how
to strip out the original message body from reply messages. What is
happening to us is when a ticket is a longer job each reply from our
users contains the original message sent to them. If I don’t strip this
by hand each new correspondence grows larger and the ticket history
becomes really difficult to read. Do you think I could safely regex the
mail body in a scrip? Maybe get rid of lines starting with ‘>’?

Anyone have a solution already short of educating our users?

Thanks!
Davin Flatten

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at http://bestpractical.com/services/training.html

I don’t know if this is possible or not, but has anyone figured out how
to strip out the original message body from reply messages. What is
happening to us is when a ticket is a longer job each reply from our
users contains the original message sent to them. If I don’t strip this
by hand each new correspondence grows larger and the ticket history
becomes really difficult to read. Do you think I could safely regex the
mail body in a scrip? Maybe get rid of lines starting with ‘>’?
[…]

I’ve been thinking it would be cool to make deeply-quoted text
collapsible (defaulting to collapsed) like Google Groups’ interface
does…

–Bret

I’ve been thinking it would be cool to make deeply-quoted text
collapsible (defaulting to collapsed) like Google Groups’ interface
does…

And really, that should be doable with a tiny, tiny bit of javascript,
since everything should already be depth-tagged in the HTML.

And just so the proper credit is known, this was done by Michael Gilbert
– another member of our rt-mgmt team.

Joby Walker
C&C SSG, University of Washington

Joby Walker wrote:

Michael just kicked me to remind us that we also added a CSS change to
colorize the bar:

----- And the css we used for the titlebar
.transaction-history .title { font-size: 10px; background-color: #cccccc; }

Joby Walker
C&C SSG, University of Washington

Joby Walker wrote:

Wow, I’m really doing poorly this morning…

attached is second diff that will cleanly apply via patch.

Joby Walker
C&C SSG, University of Washington

quotehide.2 (1.33 KB)

Diffs are attached.

NOTE this hides all text starting with the first quoted line, so if
you reply inline or below the quoted text it will hide the response (of
course you can just expand the text to view). This isn’t a problem for
us because (as you can see from my email) SOP at the UW is to reply
above the quote.

Joby Walker
C&C SSG, University of Washington

Joby Walker wrote:

quotehide.1 (809 Bytes)

quotehide.2 (1.33 KB)