in reply to What're some good ways of notifying a perl script of an incoming email?

tye pointed out the .forward file. I don't believe qmail uses that file. Instead the ~/.qmail file gets used. See the dot-qmail man page for details about the .qmail file. Read the man page because your program's exit codes are important to qmail. My /home/frink/.qmail file looks like this:
| /home/frink/scripts/email-spam-keywords.pl ./Mailbox