You need to pipe the email into a script. The script then parses the email and acts accordingly. There are some examples at www.perlmonks.org. This seems a little risky. What if some unrelated email ...