How do you execute a shell script whenever a Growl notification is shown? And make it application specific. For instance, run a the shell script say "You have new mail" whenever a growlMail notification is shown?

I know you can forward growl notifications to other computers. Perhaps you could forward them to a port on localhost. If you had something listening to that port it could do something every time the notification was forwarded on that port. maybe..?