Setting up email piping with Ensim seems to cause fits. It took me a little to get it down but after researching and trial and error I have had luck using these methods. Here is a small how-to compiled from my notes.
Paths
Open the script and make sure that the paths are correct. /usr/bin/perl -w (add the -w switch) or for php /usr/bin/php . Keep or move perl scripts into the cgi-bin directory. If your script has a path to sendmail in it make sure that it is correct /usr/sbin/sendmail
Perl Scripts
This has been posted here before and people still seem to have problems. The only things that I can think of that I did differently are to add the -w switch to the #!/usr/bin/perl -w line of the script and move the script to the cgi-bin directory. Make sure that you chmod your script to 755
SSH in as root:
# cd /home/virtual/yourdomain.com/etc/smrsh
# ln -s ./../../var/www/helpdesk/cgi-bin/automail.pl (change to your path and script)
verify that the link is owned by root
# ls -l
# cd ..
# pico aliases
Scroll to the last line of the file and add the line:
support: "|/etc/smrsh/automail.pl"
Ctrl-X and save, then the command:
# newaliases
PHP Scripts
I have not tried this on a site running in the"High Security" mode so at this point I am not sure if this works in anything other than 3.1 compatibility mode. Make sure to chmod your script to 755
ssh in as server admin and su- to root
# cd /home/virtual/site#/fst/etc/smrsh
make sure php is usable by sendmail
# ln -s /usr/bin/php php
Create a link to your php script
# ln -s /var/www/pathtoscript/script.php (change to your path and script)
verify that the link is owned by root
# ls -l
# cd ..
# pico -w aliases
add this to the aliases file for each email address that you want to pipe
support: "|/etc/smrsh/yourscript.php"
sales: "|/etc/smrsh/yourscript.php"
save and exit
# newaliases
I hope that this helps and if anyone sees anything that I missed, please add it here.
Scott
Several people have noted that if the above fails they have been successful using this:
yourAlias: "|/etc/smrsh/php /var/www/pathto/pop3pipe.php"