Re: Automatic Editing To Remove Redundant Info [message #33224 is a reply to message #33132] |
Sat, 19 August 2006 14:48   |
 |
jeffrey
 Messages: 36 Registered: June 2006 Location: Atlanta, GA
Karma:
|
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.
|
|
|