procmail
[Top] [All Lists]

keeping and updating database of names

1996-10-30 10:14:33

This is _very_ simple

# just the email address
SENDER=`formail -rtzxTo:`

# a list of every email address which has ever sent me mail
NAMES=$PROCDIR/email-names.txt


:0c
* ! ^FROM_DAEMON
# if they are not in the file already, ignoring caps
* ! ? grep -iw "$SENDER" "$NAMES"
{
        # send their address to the names file
        :0c
        |/bin/echo "$SENDER" >> $NAMES
        
        
        # send me a message telling me they were just added
        :0
        |(/bin/echo "Sender \`$SENDER' added to $NAMES" | \
           Mail -s "New Email Address added: $SENDER" luomat)
}


It is the "send me a message" part that is giving me trouble.

All I want it a little note saying:

#
Subject: New Email Address added: someone(_at_)somewhere(_dot_)com

Sender someone(_at_)somewhere(_dot_)com added to   
/Users/luomat/.procmail/email-names.txt
#
that doesn't seem to hard, but I get a "From: " line that looks  
like this:

From: To: "luomat(_at_)nerc(_dot_)com Subject: Re: test References:  
<199610301659(_dot_)LAA04459(_at_)nerc(_dot_)com> In-Reply-To:  
<199610301659(_dot_)LAA04459(_at_)nerc(_dot_)com>" <luomat(_at_)nerc(_dot_)com>

I have been unable to debug this, but I am sure that it is simple.

TjL

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