A Question about quoted messages in body

ArmandMorin - February 22, 2008 - 15:24
Project:Listhandler
Version:5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Does anyone know of a way to automatically remove the quoted message that shows in a users reply at the bottom of the reply?

Any help would be appreciated.

#1

samuelet - February 22, 2008 - 19:54

Do you mean remove itfrom messagges imported in the forum?
To get this goal i use http://drupal.org/project/customfilter.
After installing it, you have to create a custom content filter with a regular expression that matches and delete the mail forward pattern (or any other pattern you want).
Then set that filter as default input format in the mailhandler mailbox setting,

#2

rmyoung - February 25, 2008 - 11:51

I would like to do this also. I have tried using the custom filter but mind is being blown by the regex stuff.

The quoted messages appears in the forum on my site as

On Tue, 12 Feb 2008 13:28:53 +1100, Matthew Young
wrote:
> Hi all,
>
> Just setting up and testing the new websites integration of mailing
> list into the forum. The website should be ready to go live soon.
>
> Regards,
> Matt Young.
> _______________________________________________
> OpenVPMs User Mailing List
> users@lists.openvpms.org
> http://lists.openvpms.org/mailman/listinfo/users

Should I be using a regex to identify the > at the start of the lines or use the starting and ending bits of the quote and delete anything in between.

Any chance of sharing your custom filter settings for this with us samuelet or anyone else?

#3

samuelet - February 25, 2008 - 12:39

I don't delete the whole quoting but I prefer to leave the quoting header with this regex

pattern:
/(\>\s{0,3}.*\n\>\s{0,3}.*\n)+/

replace:
> ....

This helps to follow the reply workflow in a flat list forum.
The regex was on-the-fly made and looking at it now it seems not perfect ,but it works.

I also delete mailman signature with a regex like this (not tested for your case):
pattern:
/\_{20,}.*(\n.*\n.*\n.*\/OpenVPMs|(\n|.).*\<(a|A).*\/(a|A)\>)/

replace:
(empty)

This regex should be applied with more weight than previous.

I've others regex but they are modelled after italian language so they could not work correctly for you.

Pay attention that custom filter caches its filter and you could need to reapply it also from "Input format" page.
Hope it could help to create your own.

#4

awry - May 12, 2009 - 21:23

Customfilter is discontinued and has no d6 port. I'm trying to figure out a way to strip out comments with flexifilter, but am having a hell of a time. If anyone has figured out how to wrangle flexifilter, let me know!

#5

philipnet - August 31, 2009 - 14:07

@samuelet:
For each mailbox, you can set the Signature identifier in Mailhandler.
Go to Content management -> Mailhandler -> <Mailbox> -> Signature separator:

 
 

Drupal is a registered trademark of Dries Buytaert.