Okay! Done it. Here's the script if anyone else is interested:

#!/bin/sh

MAILADDR="[EMAIL PROTECTED]"
TMP1=`mktemp /tmp/mailcheck.XXXXXX`
TMP2=`mktemp /tmp/mailcheck.XXXXXX`

cat /dev/stdin > $TMP1
grep Date: $TMP1 | head -n 1 > $TMP2
grep From: $TMP1 | head -n 1 >> $TMP2
grep Subject: $TMP1 | head -n 1 >> $TMP2
cat $TMP2 | mail -s "Mail Notification" $MAILADDR
cat $TMP1

rm $TMP1
rm $TMP2


Piping the appropriate mail through it with procmail should do what I want. 
Now to test it in the real world...

Jason

--
[EMAIL PROTECTED] mailing list

Reply via email to