in reply to Invoking Perl script from an email

I'm actually running quite a few scripts this way, and in fact have been writing one this week that handles quite a few neat things in an incoming email, and responds with an attachment to the sender.

A few things:

  1. Have you run newaliases after updating the /etc/mail/aliases file?
  2. Are you sure the script is valid, reachable, in the mail user's path, permissions are correct, and it's not misspelled?
  3. Can you run the script at the shell as the mail user interactively? (su - mail; perl /path/to/your/file.pl)
  4. Remember that many MDAs will run sendmail/procmail/etc. under a wrapper such as smrsh, so you have to be careful about the environment, and make sure to set paths and such ($ENV{'HOME'} = '/var/mail'; for example).
  5. The proper syntax for /etc/mail/aliases is as follows:
    udb: "|/path/to/my/file.pl" # ^ this is a tab, not spaces

Also, what are the errors the script returns? Have you tried a simple script that opens a file in /tmp, writes out to it and then closes the file, to see if any script is being executed?