procmail regex help needed

Archaic archaic at linuxfromscratch.org
Thu Nov 11 10:13:48 PST 2004


I've been fussing with a procmail recipe for a while and can't quite
sort it out. I can't seem to find info on escaping asterisks. Here's the
situation:

My mail is spamfiltered and if it is suspected spam the subject has

S|*****

appended to it. The more asterisks, the higher likelihood that it is
indeed spam. As it stands three asterisks or more is definately spam.
One or two asterisks is most likely spam, but the occasional legitimate
email might get tagged. Therefore, I decided to sort on S|*** and have
written many variations of recipe to try and nail down the regex.
Currently I use:

* ^Subject: .S|\*\*\*\*

And it is the first recipe. Later on in the .procmailrc, I have a recipe
for a particular mailling list. However, the occasional mail to this
list is being caught by procmail and sent to the spam folder and I
cannot figure out why since the spam filter did *not* append anything to
the subject and the subject contains no pipe or asterisk symbols. It
would probably be best to illustrate.

To List - From John - subject whatever                spam folder
|->To List - From Bill - subject whatever             list folder
   |->To List - From Mike - subject whatever          list folder
      |->To List - From John - subject whatever       spam folder
      |->To List - From Bill - subject whatever       list folder

I started thinking that something weird was happening with the
particular sender, but that pattern didn't last because eventually a
mail from Bill to that same thread went to the spam folder, and in other
threads (with different subjects) John's email went to the list folder.

Again, none of these subjects contained an "S", a "|", or an "*".

IIRC, escaping the pipe broke the regex causing nothing to match the
spam tag.

Any ideas?

-- 
Archaic

You [should] not examine legislation in the light of the benefits it
will convey if properly administered, but in the light of the wrongs it
would do and the harm it would cause if improperly administered

- Lyndon Johnson, former President of the U.S.




More information about the lfs-chat mailing list