procmail
[Top] [All Lists]

Re: conditional INCLUDERC files??

2002-12-11 16:18:42
At 14:55 2002-12-11 -0500, Mark_Saunders wrote:
Thank you all for the replies.
My procmail version is 3.13.1

It might be time to consider upgrading (or urging your sysadm to). Check the revision history between 3.13.1 to 3.15.2 if you really need to see compelling reasons.

I matched the string in a test area, but it did not match on the live system....go

"test area" on the _same_ system, or a different one? The procmail versions may not be the same. heck, within some system configurations, the procmail installed for shell use may not be the same as the one installed for use by the mail system, which may be mounted from a different volume or executed from a separate path -- when tests run, but the live system doesn't, make sure you're dealing with ONE binary.

figure...
The string I'm trying to match is:
#NET FOLDERS#: Update for

I'm trying to match it with:
* ! ^Subject:.*\#NET FOLDERS\#: Update for

FTR, with 3.15.2, I had no troubles using this - it matched when the string was present, and didn't match when it was not.

Once I tried a simple string to match on, the condition worked fine.

I removed characters from the match string until it worked:
#NET FOLDERS# matched with \#NET FOLDERS\#

Within a condition, # shouldn't act as a comment marker (that's not been my experience, and as a rule, I don't intersperse comments within conditions anyway), and a quick test demonstrates it does work without escaping the hashes on 3.15.2

:0:
* ! ^Subject:.*#NET FOLDERS#: Update for
testbox

:0:
testbox.yes


You might want to consider if you're dealing only with original #NET FOLDERS# messages, or if you want to process replies to them as well -- using:

* ! ^Subject:[  ]*#NET FOLDERS#: Update for

would deal with matching anything that wasn't an original message (assuming that this isn't a suffix on a longer subject line to begin with)

log verbosity trimmed down a bit, here's the results running the above filter on 3.15.2:

procmail: Match on ! "^Subject:.*#NET FOLDERS#: Update for"
From ???(_at_)??? Tue Jun 11 12:05:56 2002
 Subject: Why did it miss?
  Folder: testbox

procmail: No match on ! "^Subject:.*#NET FOLDERS#: Update for"
procmail: Locking "testbox.yes.lock"
From ???(_at_)??? Tue Jun 11 12:05:56 2002
 Subject: #NET FOLDERS#: Update for
  Folder: testbox.yes

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