procmail
[Top] [All Lists]

Re: Scoring multipart HTML messages in the big5 charset?

2000-01-15 05:41:46
[Cc:ed back to the list]

On Sat, 15 Jan 2000 13:36:58 +0100, Morten Bo Johansen 
<mojo(_at_)image(_dot_)dk>
wrote:
era eriksson <era(_at_)iki(_dot_)fi> said:
Unless you know more than I do about big5, it has to be specified in
there somewhere if you can figure out that it's big5.
They appears as being part of the body and therefore I don't know
how to score them. The example you pointed me to seems to score on
the regular headers too.

Yes, that's right. But it's easy to match on the body instead, or as
here, both headers and body:

    :0HB  # H means headers, B means body; default is only H
    * ^Content-Type: text/[-a-z]+;\<*charset=big5 
    { whatever }

I don't see why you'd need scoring here, as you say you want to kill
this under all circumstances -- if you really do want to use scoring
instead of regular matching, you need something like

    :0HB
    * 1^1 ^Content-Type etc etc
    { whatever }

or even, if you want to specify the H/B (header/body distinction) on a
condition by condition basis:

    :0  # (no flags -- default to H matching only)
    * 1^1       something you score on only in the headers (implicit)
    * 1^1 B  ?? something you score on only in the body
    * 1^1 HB ?? ^Content-Type etc etc // both headers and body
    { whatever }

You can flip around the flags, i.e. move the HB up to the flags and
specify either H or B for the conditions where you want only one or
the other. Perhaps that would be clearer if you don't want to memorize
the default behavior and all that.

Hope this helps,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

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