[rt-users] Stripping email history from reply mail body

John Rouillard rouilj at renesys.com
Fri Feb 3 09:00:30 EST 2006


On Thu, Feb 02, 2006 at 09:11:02PM -0500, Bill wrote:
> On Thu, 02 Feb 2006 18:30:32 -0500
> Davin Flatten <flatten at 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



More information about the rt-users mailing list