procmail
[Top] [All Lists]

Re: Removing mail footers

2003-02-22 10:59:54
On Sat, Feb 22, 2003 at 01:43:05AM -0700, LuKreme wrote:
On Thursday, Feb 20, 2003, at 18:41 Canada/Mountain, Tyler F. Creelan 
wrote:
Hi folks -

I found this recipe for removing those ads from sourceforge list
emails:

:0 w: # filter sf.net footers
* SENDER ?? 
()\/(autopilot|acpi|asdp)-devel-admin(_at_)lists\(_dot_)sourceforge\(_dot_)net
* MATCH ?? ^^\/[^-]+
| perl -e 'while (<>) {$i++ if /this sf.net email/i; print unless $i}' 
$MATCH

does anyone have something similar for yahoo groups/MSN ?

I use a recipe more like this:

  :0fbW
  * ^List-Help:(.*\<).*topica.com/lists/
     | sed -e '/^==\^====/,/^==\^====/d'


to strip unwanted cruft from messages.  This one is for Topica lists, 
and merely deletes all the lines from:

(anything)^==^===(anything)
to
(anything)^==^===(anything)

sed scripts like that always make me nervous.  There's always the slight
chance that you might take out something legitimate.  Here's my sed
script for topica lists.  It tries to be exact before it deletes
anything.  I haven't updated it in a while and I'm not on any topica
lists anymore.  But you get the idea.

:0 fbw
* ^TO_(_dot_)*(_at_)topica\(_dot_)com
| sed -f $HOME/bin/topica.sed

# bin/topica.sed
# topica mailing list filter
#
# get rid of the (un)subscribe dialog box
# which looks something like this:
# __________________________________________________
# Expats in Italy
# subscribe: ex_in_italy-subscribe(_at_)topica(_dot_)com
# unsubscribe: ex_in_italy-unsubscribe(_at_)topica(_dot_)com
# __________________________________________________
/^_\{10,\}/ {
        N; N; N; N
        
/^.*subscribe:(_dot_)*(_at_)topica\(_dot_)com(_dot_)*unsubscribe:(_dot_)*(_at_)topica\(_dot_)com(_dot_)*_\{10,\}/d
}
# get rid of the bottom banner
# which looks like this:
#
# ==^================================================================
# EASY UNSUBSCRIBE click here: http://topica.com/u/?bz8Qa0.a89I4A
# Or send an email To: ex_in_italy-unsubscribe(_at_)topica(_dot_)com
# This email was sent to: zoot(_at_)zotikos(_dot_)com
# 
# T O P I C A -- Register now to manage your mail!
# http://www.topica.com/partner/tag02/register
# ==^================================================================
/^==^=\{10,\}/ {
        N; N; N; N; N; N; N
        /^.*EASY UNSUBSCRIBE.*topica\.com.*topica\.com.*\n==^=\{10,\}/d
}

-- 
- Matt Dunford <> zoot(_at_)zotikos(_dot_)com ..
-. www.zotikos.com -- o,;-
        
"Well, I think if you say you're going to do something and don't do
it, that's trustworthiness." 
   -- George W. Bush, CNN online chat, Aug. 30.
--

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>