If the MTA obeys a ~/.forward file, then you can have procmail process the incoming mail and run a script as soon as the message arrives.
See http://www.panix.com/~elflord/unix/procmail.html
For one of my accounts, I have the following ~/.procmailrc
# procmail tutorial: http://tldp.org/LDP/LG/issue14/procmail.html
PATH=/usr/local/bin:/bin:/usr/bin
MAILDIR=$HOME/Mail
DEFAULT=$HOME/Mail/inbox
LOGFILE=$HOME/procmail.`date +%Y-%m`.log
SHELL=/usr/bin/ksh
MY_XLOOP='X-Loop: user@example.com'
MY_RECIPIENT='mailing_list@example.com'
#############################################################################
# 3rd party request processing
# send a copy of the message to the processing script, and carry on
# with the next recipe
:0c
* ^From:.*@3rdparty\.invalid
* ^Subject:.*ABC/DEF.*(Request|Access|Approval)
| $HOME/bin/process_request_email.pl | \
mailx -s "3rd party request results" $MY_RECIPIENT
#############################################################################
# forward all mail to mailing list
:0
* ! ^$MY_XLOOP
{
# add a header
# 'f' = filter: continue processing results of program
# 'w' = wait for program to return
# 'h' = pass message headers to program
:0fwh
| formail -A "$MY_XLOOP"
# then forward the message
# 'c' = send a copy to recipient and continue processing
:0c
! $MY_RECIPIENT
}
# if we get here, then the message has an X-Loop header.
# let it fall into $DEFAULT