| > :0
| > * NAME ?? \\/[^ ].*[^ ]
| > { NAME=$MATCH }
| > where the two sets of brackets each enclose a caret, a space, and a tab.
| No, that didn't work... when I tried it, a verbose log told said there was
| NO MATCH for that condition, so I dont' know, it was one spc and one tab
| for sure, but no go...
If $NAME contains at least two characters that are not spaces and not tabs,
then there should be a match.
I tried it using coc subscribe test
and it didn't trim the white space in front of test...
Not difficult at all. The negated conditions, since their expressions match,
will still set $MATCH, even though (being negated) they fail as conditions:
:0
* !^Subject: coc subscribe *\/[^ ].*
* ! B ?? ^coc subscribe *\/[^ ].*
:0E
{ actions on success }
Note that if an incoming message has "coc subscribe name" in the subject and
again in the body, the name given in the subject will prevail.
Ok, I changed my rc file as below, it works beautifully if coc subscribe
is in the subject, but if it's in the body, it goes straight to my
mailbox, without any verbose log being generated, therefore, its not
negating the first expression.. here's the rc file....
:0
* ! ^Subject: coc subscribe
* ! B ?? ^coc subscribe
* ^X-Loop: ginof(_at_)io(_dot_)org
* ^Subject:.*Re:
* ^FROM_DAEMON
{ }
:0E
{
:0h
FROM_ADDRESS=| formail -rzxTo:
:0
* !^Subject: coc subscribe *\/[^ ].*
* ! B ?? ^coc subscribe *\/[^ ].*
{ }
:0E
{ NAME=$MATCH
:0 # twenty-five dots
* NAME ?? ^^\/.........................
{ NAME=$MATCH }
}
:0
* ! NAME ?? .
{ NAME=$FROM_ADDRESS }
:0fib
| echo "ADD coc-ezine crackcrack $FROM_ADDRESS $NAME"
OLDLOGFILE=$LOGFILE
LOGFILE=$HOME/.procmail/subscribe.log
LOG="$NAME <$FROM_ADDRESS> was added on $DATE
"
LOGFILE=$OLDLOGFILE
:0ab
! listproc(_at_)lists(_dot_)colorado(_dot_)edu
}