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...