procmail
[Top] [All Lists]

Re: Hung up while trying to scrub Yahoo advertisements...

1998-03-06 22:12:42

| The file test.sed contains this:
|
|       /^ *DO YOU YAHOO!?/q
|
| The file test2.sed contains this:
|
|       $d

I'm no sed wizard, but hre is one way to delete lines that you
don't want:

:0 fbw
| $GREP -v \
 -e "MATCH-IT" \
 -e "ANOTHER-LINE" \
 -e "AND MORE"

Well really I'd like to know the most economical way if I'm on the wrong
track. The problem with with all those freemail ads is that they invariably
begin with a line of dashes, or a line of underscores.

But of course we don't want to truncate the file at any line of dashes or
underscores (people might use sig files that trip the filter, or draw ASCII
art--we get a lot of ASCII art on automotive lists).

So I want to look for the telltale advertising text (DO YOU YAHOO!?), and
then back up one line and truncate the file there. Or equivalent. Of course
we only do this if procmail knows it's from a freemail server:

* From:.*yahoo.com|hotmail.com|rocketmail.com|etc.com

and we know from past experience exactly what the text is going to be so we
know what to search for.

Am I on the right track?

--Ken
  68 Westy, Admin --type2-- The Volkswagen Bus Mailing List