This seemed to work:
FROMHEADER=`formail -c -rtz -x To:`
# play sound
DUMMY=`test -f "${PMDIR}/mailsounds/${FROMHEADER}.wav" \
&& play "${PMDIR}/mailsounds/${FROMHEADER}.wav" > /dev/null`
I'm a bit worried about funny email address going into the file name, such
as
" alan @ "@example.com
Am I getting the quotes correct so that the file name with spaces will
appear correctly to the shell?
Now to find a text-to-speech translator for the subject line ...
Alan
( Please do not email me AS WELL as replying to the list. Personal
email is welcome but may invoke a password autoresponder. )
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail