procmail
[Top] [All Lists]

Re: conditional INCLUDERC files??

2002-12-11 13:04:37
Thank you all for the replies.
My procmail version is 3.13.1

You're right. It's what I'm trying to match.
I matched the string in a test area, but it did not match on the live 
system....go
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

I also tried:
POUND="[#]"
SPC="[ ]*"
:0
* ! ^Subject:.*${POUND}+NET${SPC}+FOLDERS${POUND}+:${SPC}+Update${SPC}+for

But I had no luck here, either.

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

However, #NET FOLDERS#: would not match \#NET FOLDERS\#: or \#NET FOLDERS\#\:

The colon seems to be the issue here. Any ideas?

"David W. Tamkin" wrote:

Mark asked,

| Is it possible to have a conditional INCLUDERC file in /etc/procmailrc?
| This example does not work.

Never say only that something "does not work" and leave it at that.  Tell us
both what you expect (you did that part) and what happens instead (you didn't
do that part).  If it's a procmail problem, make sure you have logfile defined
and VERBOSE on; if that doesn't give the answer, it can help narrow it down.

| :0
| * ! ^Subject:.*UniqueSubjectText
| {
| INCLUDERC=ScriptToInclude
| }

It certainly should.  It has always worked for me.  Either you're using a very
old version of procmail or what you're actually doing is in some small way
different from what you posted.

| Am I trying to accomplish something the /etc/procmailrc file does not
| support?

My first guess is that you're using a relative path to ScriptToInclude and
guessing wrong about which working directory procmail is looking from.  But
you're not giving us much to go on.

David

PS: I just saw Nancy's answer.  That probably isn't it.  There has to be some
whitespace around each brace, but spaces, tabs, and newlines all can do the
job.  Personally I type it the way she illustrated, but Mark's formatting
should work equally well.

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

--
mv $win /dev/null



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