procmail
[Top] [All Lists]

Re: Recipy on "subject contains"

2004-05-28 07:36:09
At 14:45 2004-05-28 +0200, Hans du Plooy did say:
my recipy looks like this:
:0hb:
*^Subject:.[KT-USERS]
/home/hansdp/Maildir/.User-Lists.knowledgeTree/

"[]" encapsulates a CHARACTER CLASS, and since you're looking for literal brackets, you needs to escape the brackets. Additionally, the dot preceeding this will only match a SINGLE character - nothing like "Re:" before that text will work - only exactly one character.

* ^Subject:.*\[KT-USERS\]

would be more typical (though escaping the CLOSING bracket isn't so necessary).

hb in the flags is not applicable to this delivery. Nor is the trailing lockfile flag, since you're delivering to a maildir.

The method works fine if I replace [KT-USERS] with ****SPAM**** to catch out

* is another regexp character.

I strongly suggest that you read up on regexps.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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