Can the match operator (\/) be used in a NOT recipe?
Example:
:0
* ! ^\/(To|Cc):.*(harryp|reader|bobbiep)@(reader|newsguy)\.
How can I capture lines that match that recipe?
I've tried moving the `\/' around like just after !, but of course
that just makes every message match since it effectivly removes the
recipe altogether.
I think since the recipe is saying NOT to match the regex then
procmail takes it at its word and doesn't assign the line to $MATCH
The actual section from .procmailrc so you can see what the log output
is refering to:
================== ~/.procmailrc ================
[...]
TRAP='formail -XMessage-Id: && date +"%b %d %T%nSTOP"'
SCRIPTS="/home/reader/projects/perl"
## Get junk not addressed to me in To or CC
NotToMeRe='!
^(MATCH_OPERATOR)(To|Cc):.*(harryp|reader|bobbiep)@(reader|newsguy)\.'
:0
* ! ^\/(To|Cc):.*(harryp|reader|bobbiep)@(reader|newsguy)\.
* ! ^(To|Cc):.*lydia-productions
{
:0 wf
|formail -A "X-HPmatch: $MATCH" -A "${X-HPrcp: }$NotToMeRe"
# :0 wf
# | /anex2/mail.arc/strip2.pl
:0
NotToMe_spam.bk/.
}
NotToMeRe=''
============ Associated log output ========================
Lines from the verbose log output show MATCH just doesn't come up.
[...]
procmail: Assigning "TRAP=formail -XMessage-Id: && date +"%b %d %T%nSTOP""
procmail: Assigning "SCRIPTS=/home/reader/projects/perl"
procmail: Assigning "NotToMeRe=!
^(MATCH_OPERATOR)(To|Cc):.*(harryp|reader|bobbiep)@(reader|newsguy)\."
procmail: Match on ! "^\/(To|Cc):.*(harryp|reader|bobbiep)@(reader|newsguy)\."
procmail: Match on ! "^(To|Cc):.*lydia-productions"
procmail: Executing "formail,-A,X-HPmatch: ,-A,HPrcp: !
^(MATCH_OPERATOR)(To|Cc):.*(harryp|reader|bobbiep)@(reader|newsguy)\."
procmail: Assigning "LASTFOLDER=NotToMe_spam.bk/1"
procmail: Opening "NotToMe_spam.bk/1"
procmail: Acquiring kernel-lock
From icewm-user-bounces(_at_)lists(_dot_)sourceforge(_dot_)net Tue Nov 20
06:15:06 2007
Subject: Re: No backticks in keys file?
Folder: NotToMe_spam.bk/1 5322
[...]
==========
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail