> :0:
> * ^Subject:.*PEN
> Junk
>
> It *does* work, but it also throws a bunch of other stuff in the trash as
> well. Just random posts seem to get sent to my JUNK file.
You are matching PEN, pen, Pen, open, pigpen, etc. Any subject with the
character "PEN" in either upper or lowercase.
Try this:
:0 D:
* ^Subject:(.*\<)?PEN(\>|$)
Junk
This will trash mail with the subject having the word PEN, only as a
separate word, and only in uppercase.
Sorry about my very likely misunderstanding of the man page.
quoted:
\< or \> Match the character before or after a word. They
are merely a shorthand for `[^a-zA-Z0-9_]', but
can also match newlines. Since they match actual
characters, they are only suitable to delimit
words, not to delimit inter-word space.
If so, why the ? in the (.*\<)? is necessary? Also, the above man
page itself is not clear to me either. If the term "word" as used in
the man page is defined as a string of characters containing only
alphnumerical characters, then obviously there won't be any
possibility of having an inter-word space, since alphnumerical
character set doesn't contain any white space (blank, newline, tab ..)
Also, does the phrase "before or after a word" imply that these two
procmail extensions assume at least one white space before (or after)
the considered word already? If not, how can the assertion "only as a
separate word" is true?
Any clarifications appreciated.
Regards,
Chin Fang
fangchin(_at_)jessica(_dot_)stanford(_dot_)edu