From: "Matt Kettler" <[EMAIL PROTECTED]>
> jdow wrote:
> > If I understand you then you are looking at a subject line that looks
> > like this in the raw mail file.
> > Subject: " This would be tagged as spam"
> >
> > This would render in email programs as a subject including the quotes:
> > " This would be tagged as spam"
> >
> > The normal subject header begins with the first non-blank character
after
> > the "Subject:" part. That means the "\"" character is the first
character
> > in the subject not the " " character. So if you want to catch the
specific
> > subject you cited then you must use a rule like, I believe:
> >
> > header X_QUOTE_SUBJECT    Subject =~ /\b\"\bThis would be tagged as
spam\"/i
>
> J..
>
> 1) \b is NOT a substitute for spaces. It's zero-width. For things other
than the
> beginning/ending of a rule, use \s unless you REALLY understand the
difference.
> i.e. you should know why /hello\bWorld/ will never match anything.
>
> In this case /\"\bT/ would match both " T and "T. Probably not what you
wanted,
> but since \b is zero width and "T counts as a boundary between word
and-non-word
> characters, this would match.
>
>
> 2) I'm figuring the quotes are figurative, only used to show the spacing.
>
> Something like these might work better...
> header X_DOUBLE_SPACE_SUBJECT Subject =~ /^  \w/
>
> header X_DOUBLE_SPACE_SUBJECT2 Subject =~ /^\s{2,20}\w/
>
> But IMHO, checking the spacing a the start of a subject line is an
> extraordinarily piss-poor test for spam. What if a real user accidentally
bumps
> the space bar before typing a subject...

I was riffing that without consulting some example rules. The fellow
stressed the quote was in the subject. Therefore I attempted to show the
search for blanks \s to be sure, and the search text including the "
character explicitly.

I am ornery enough that when someone INSISTS on what he wants I tell him
how to do it, whether or not I think it will do him any good. (That is, I
will tell him how to do it as long as it does no harm.) I figured the
exact incantation for the above is left as an exercise for the student.

{^_^}


Reply via email to