FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Automatic Editing To Remove Redundant Info
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon5.gif  Automatic Editing To Remove Redundant Info [message #33106] Sat, 12 August 2006 13:45 Go to next message
jeffrey is currently offline  jeffrey   United States
Messages: 36
Registered: June 2006
Location: Atlanta, GA
Karma: 0
Member
I have the email mailing list integrated with my web-board http://itdiscuss.org

A problem I'm having is that the footer on the mailing list is getting repeated whenever the members reply in their email program.

My footer for the mailing list looks like this:
_______________________________________________
discuss mailing list
discuss(at)itdiscuss(dot)org
Mailing List: http://itdiscuss.org/mailman/listinfo/discuss
Web Discussion Board: http://itdiscuss.org

You can see an example of what I'm talking about here:
http://itdiscuss.org/index.php?t=msg&th=54&start=0

And everytime a person replies, another copy of the email footer is tacked onto the message (I'm using MailMan).

I would like to automatically filter these additional footers out of the reply, maybe just have one copy of the footer in a message.

Any ideas on how to filter out extra copies of the footer?

[Updated on: Sat, 12 August 2006 13:46]

Report message to a moderator

Re: Automatic Editing To Remove Redundant Info [message #33107 is a reply to message #33106] Sat, 12 August 2006 14:21 Go to previous messageGo to next message
jeffrey is currently offline  jeffrey   United States
Messages: 36
Registered: June 2006
Location: Atlanta, GA
Karma: 0
Member
I'm thinking of running the posts through a sed script before I post the message to the list. The sed script would filter out the footer before posting it to the board.
Re: Automatic Editing To Remove Redundant Info [message #33110 is a reply to message #33106] Sat, 12 August 2006 15:06 Go to previous messageGo to next message
aleman   United Kingdom
Messages: 40
Registered: May 2006
Location: Blackpool UK
Karma: 0
Member
Jeffrey

If you are any good with regex you can remove this using body mangling in the Mailing list manager. I had it working on my site albeit briefly, you simply add the regex into the box and low and behold all the mailman added footer disappear


--
Aleman
icon5.gif  Re: Automatic Editing To Remove Redundant Info [message #33118 is a reply to message #33110] Sat, 12 August 2006 16:39 Go to previous messageGo to next message
jeffrey is currently offline  jeffrey   United States
Messages: 36
Registered: June 2006
Location: Atlanta, GA
Karma: 0
Member
I looked around and don't see a body mangle option anywhere. Where is that located in the MailMan Admin menu?
Re: Automatic Editing To Remove Redundant Info [message #33121 is a reply to message #33118] Sat, 12 August 2006 16:46 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This is a FUDforum option you can setup inside the mailing list manager.

FUDforum Core Developer
icon5.gif  Re: Automatic Editing To Remove Redundant Info [message #33123 is a reply to message #33121] Sat, 12 August 2006 16:54 Go to previous messageGo to next message
jeffrey is currently offline  jeffrey   United States
Messages: 36
Registered: June 2006
Location: Atlanta, GA
Karma: 0
Member
Is there a way to match on more than one regular expression? I have two things I want to remove (match on two different patterns and apply the same action ie make it disappear).
Re: Automatic Editing To Remove Redundant Info [message #33125 is a reply to message #33123] Sat, 12 August 2006 17:01 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You only have one pattern, but you can (OR) merge patterns.

FUDforum Core Developer
icon5.gif  Re: Automatic Editing To Remove Redundant Info [message #33128 is a reply to message #33125] Sat, 12 August 2006 17:16 Go to previous messageGo to next message
jeffrey is currently offline  jeffrey   United States
Messages: 36
Registered: June 2006
Location: Atlanta, GA
Karma: 0
Member
Can you give me an example of what that looks like?

How about:

Replace mask: /(foo)|(bar)/
Replace with: <blank>

match on "foo" or "bar" and then I'll have a blank in the replace with field so it will effectively delete foo or bar

Also, to match carriage returns and newlines it recognizes \r\n correct?
Re: Automatic Editing To Remove Redundant Info [message #33132 is a reply to message #33128] Sat, 12 August 2006 18:11 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yes, it recognizes \r\n

FUDforum Core Developer
Re: Automatic Editing To Remove Redundant Info [message #33224 is a reply to message #33132] Sat, 19 August 2006 14:48 Go to previous messageGo to next message
jeffrey is currently offline  jeffrey   United States
Messages: 36
Registered: June 2006
Location: Atlanta, GA
Karma: 0
Member
My patterns ended up being to complex, so I do pre-filtering; instead of directing the email straight to FUDforum, I direct it to my PHP filter that removes the duplicated five line signature from the email and replaces it with one occurance (all others are deleted).

To protect things, I actually have a C program that sets the uid/gid to NOBODY and then fork/execs the PHP filter from Sendmail. It works well.

I have integrated FUDforum with MailMan as well, and I pre-filter that email for the list as well. I have setup a chain of PHP filters. Each filter does a single thing. One removes duplicate signatures, another removes leading spaces. I can add additional filters as I see fit without changing the others. These all work the same way. From sendmail, fork/exec a PHP filter as NOBODY, and the last filter in the chain feeds the resulting email to MailMan.

I don't know if anyone else is interested in this, if so I can post some code in the Code Hacks section.

Very Happy
Re: Automatic Editing To Remove Redundant Info [message #33230 is a reply to message #33224] Sun, 20 August 2006 16:02 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
E-mail integration with FUDforum is something many users do, so I think any hacks, patches, tweaks or helper utilities that you have is worth posting. You never know, your tools can end up helping someone and saving them a lot of time. Even if no one uses them, they would be a great reference material.

FUDforum Core Developer
Re: Automatic Editing To Remove Redundant Info [message #33232 is a reply to message #33230] Sun, 20 August 2006 20:32 Go to previous message
jeffrey is currently offline  jeffrey   United States
Messages: 36
Registered: June 2006
Location: Atlanta, GA
Karma: 0
Member
Will do. I think my hacks may be a good starting point. I'll go ahead and post the source.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how to move forums from one domain to another
Next Topic: Anonymous user cannot post anything
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 07:14:34 GMT 2024

Total time taken to generate the page: 0.06333 seconds