Gino Filicetti <ginof(_at_)io(_dot_)org> writes:
Philip Guenther <guenther(_at_)gac(_dot_)edu> writes:
You've changed an effective OR into an effective AND. The above will cause
an incoming message from a mailer daemon to _still_ be processed by what
follows unless the Subject: also contains "Re:" _and_ an X-Loop: header
exists containing "ginof(_at_)io(_dot_)org". This is not what you want: you
want
it to not process a message on an _or_ing of those conditions.
To fix it, move the last three of those conditions to the ":0E" recipe
which follows, turning it into an "else if". Don't forget to add a ! to
each one.
alright, that's no sweat thanks a lot, I didn't think that would happen,
but my recipe STILL doesn't work for any requests coming in the BODY, and
it' supposed to catch both body and subject requests.... I'll include the
whole recipe again so you can check it out, I don't know why it's not
working....
Well, it appears you totally missed my point about the first conditions.
They shouldn't be causing the problem you're seeing, but you should fix
them anyway. Change the beginning of the recipes to read:
:0
* ! ^Subject: coc subscribe
* ! B ?? ^coc subscribe
{ }
:0E
* ! ^X-Loop: ginof(_at_)io(_dot_)org
* ! ^Subject:.*Re:
* ! ^FROM_DAEMON
{
# the nested block goes on from here...
:0h
FROM_ADDRESS=| formail -rzxTo:
# etc...
I also have a suspicion that the forwarding command you're doing is wrong.
:0ab
! listproc(_at_)lists(_dot_)colorado(_dot_)edu
Do you really want to forward *only* the (now one line) body?
Otherwise, it looks correct. Keep in mind that if a request appears in
the Subject: then the body won't even be looked at, and similarly, only
the first request in the body will be processed. Can you include a
message that doesn't lead to the results you think it should, as well
as an explanation of what you think it should cause?
Philip Guenther
: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 crazycrazy $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
}