procmail
[Top] [All Lists]

Re: Auto Subscription FINALLY!

1996-06-06 13:11:27
:0
* ! ^Subject: coc subscribe
* ! B ?? ^coc subscribe
* ^X-Loop: ginof(_at_)io(_dot_)org
* ^Subject:.*Re:
* ^FROM_DAEMON
{ }
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....

: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

}

<Prev in Thread] Current Thread [Next in Thread>