procmail
[Top] [All Lists]

Re: What am I doing wrong? (was: Re: why won't it match something in the body for me?

2002-10-12 15:18:55
Thank-you, all three who responded.

On Sat, 12 Oct 2002, Alan Clifford wrote:

On Sat, 12 Oct 2002, daniel lance herrick wrote:

dlh> > I'm writing a spam and malware filter for an e-mail discussion list. 
Dump
dlh> > anything with a header "Content-Type: text/html" or "Content-Type:
dlh> > multipart/". That part works, as procmail always has worked for me.
dlh> >
dlh> > I'm replying to test messages so that there are cascading lines like
dlh> >
dlh> > > > > On Mon, 7 Oct 2002, daniel lance herrick wrote:
dlh> >
 
The body is probably encoded.  It the "daniel" really there or has your
viewer decoded and displayed it as such?
 
I'm sending it with pine and reading it with pine. I use pine so I can use 
tools like emacs and grep to examine my e-mail boxes. I've been doing it 
so long I didn't even think about the other possibilities. It is not 
encoded, as will develop in the sequel. (I know pine will decode things 
and display them to me, but I also know it is not going to encode them on 
me when they don't have to be encoded.)

Thinking, "I can always do it with a perl script," I wrote a perl script
that just dumped its STDIN into a file and put it in the condition line.  
With ":0 B:" the file written by that perl script contained only a single
blank line. So I changed the recipe to ":0 HB:" and ran it again. Now the
file contains the entire message except for the "From " line that marked
the beginning.

So, I'm now writing recipes that search both headers and body for the 
offending tokens; I'm happy to dump a message that has a non-breaking 
space in the headers.

But I would really like to know what is going on! Why does ":0 B:" feed a 
single blank line to the pattern matcher and not the entire body?

(And I may want to not dump some messages that have an anchor tag with an 
href attribute in the headers. But I can start things running with what I 
have.)

dan


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