procmail
[Top] [All Lists]

Re: Looking for some help

1997-02-24 01:42:36
"Gino" == Gino Filicetti <ginof(_at_)interlog(_dot_)com> writes:

Gino> I recently signed up to a mail forwarding service, and now they
Gino> have begun appending little advertisements to the beginning of
Gino> each email message. The good news is that each ad ends with a
Gino> line of tilde characters (~), so this could easily lend itself
Gino> to filtering....

I would try something like this:

# ~ is a metacharacter, but here we need it literally.
OLD_SHELLMETAS="$SHELLMETAS"
SHELLMETAS

:0fb
* <conditions>
| sed -e 1,/^~~*$/d

SHELLMETAS="$OLD_SHELLMETAS"

This should delete everything in the body up to and including the
first line containing nothing but tildes.

-- 
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>
Home Page: http://www.elis.rug.ac.be/~ggeens
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

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