Attached in my .procmailrc file...what I'm trying to do is have procmail take
the a mesage recieved with a specific subject and parse certain information
from it and assign that information to variables. The message will have the
following format, I want the info after the colons
ack:aname
site:sitename
note:anynotes
I would then like procmail to execute a shell command, pager-ack, with the
arguments begin the value of the variables.
If there any reason why this current config won't do that...Did I miss
something crucial somewhere?!?
thanks.
------------------------------------------------------------------------------------------------------
SHELL=/bin/sh
MAILDIR=$HOME/mail/
LOGFILE=$MAILDIR/received.log
DEFAULT=$HOME/mail/
#variables for pager-ack
NAME=`cat | egrep "^ack:" | awk '{ print $2 }'`
SITE=`cat | egrep "^site:" | awk '{ print $2 }'`
NOTE=`cat | egrep "^note:" | awk '{ print $2 }'`
:0
* ^Subject:message from a*
* ^ack:[ ].+[a-z0-9]
* ^site:[ ].+[a-z0-9]
* ^note:[ ].+[a-z0-9]
| pager-ack ${NAME} ${SITE} ${NOTE}
--------------------------------------------------------------------------------------------------------
------------------------------------------------
Joey Jablonski
Oso Grande Technologies
(505) 345-6555 office
(505) 239-4947 mobile
joeyj(_at_)osogrande(_dot_)com