# Phone will be in the form (555) 222-1234 (see previous Vonage
related posts)
PHONE = "($ACODE) $XCHANG-$PNUM"
CALLN = $PHONE
CALLID=$HOME/.vonange.callers
ISLISTED=`grep -i "^$PHONE" $CALLID`
:0
* ISLISTED ?? ^[^,]+,[ ]+\/.*
{ CALLN=$MATCH }
:0
* ! $CALLN ^^^^
{
:0fw
| formail -i "Subject: $CALLN"
:0c
* ! $PHONE ?? ^\(555\) 333-4444
|(echo "Subject: $CALLN $DATE"; \
echo;)|/usr/sbin/sendmail -io -t 5553334444(_at_)tmomail(_dot_)net
}
% cat .vonage_callers
(555) 222-1234, Test Name
(333) 444-1243, Another Test Name
etc.
Seems to work.
Of course, if you want both the phone and the caller name, you can do
that too.
--
"Give a man a fire and he's warm for a day, but set fire to him and
he's warm for the rest of his life."
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail