Hi,
I'm having a problem with part of a procmail recipe that allows
people to remove themselves from my block on agis by sending me a message
with a password in the subject.
I 'm having a problem with part of the recipe, and it seems to me
there has to be a more elegant approach than the one that I am using.
#This generates a response if you continue sending the password
# and you are already cleared.
:0c
* ^Subject:.*givematthewgsaroffacookie
* !^X-Loop: msaroff(_at_)pca(_dot_)net
* ? (formail -xFrom:) | fgrep -i -f $GOLIST
| (formail -r \
-A "X-Loop: msaroff(_at_)pca(_dot_)net" \
-A "Precedence: junk"; \
echo "Hi,";\
echo " In my last message, I said that you would be AUTOMATICALLY";\
echo "added to the approved list if you sent a message with the";\
echo "password.";\
echo " Well, you have been added, so you don't have to use the";\
echo "password any more.";\
echo " ";\
echo "--Matthew Saroff";) | $SENDMAIL -t -oi
# this one is supposed to ad you to the cleared list if you send in
# the password, and you are not already on the list. For some reason
# it appends the user name in all cases. THIS IS THE PROBLEM PART.
:0c
* ^Subject:.*givematthewgsaroffacookie
* !^X-Loop: msaroff(_at_)pca(_dot_)net
* !(? (formail -xFrom:) | fgrep -i -f $GOLIST)
|formail -xFrom: >> $GOLIST
# Anyone on my list goes into the
# inbox. It works fine. I'll eventually this as a condition on the Agis
#Net Blocks
:0
* ? (formail -xFrom:) | fgrep -i -f $GOLIST
$DEFAULT
--Matthew Saroff