cgisupp
04-08-2001, 03:25 AM
. Just a small problem re setting up smrsh so that the email is piped correctly using a .forward file.
550 /home/sites/site4/users/support/.forward: line 1: "| /usr/bin/perl /home/sites/site4/web/support/gateway.pl"... Address <support@XXXXX.com> is unsafe for mailing to programs
Appreciate any assistance thanks - Bruce
make a symbolic link to /usr/bin/perl in your /etc/smrsh (or whatever) directory. also make sure that this directory is readable by others, or by whoever sendmail runs as.
you really shouldn't be doing this. allowing something like perl (or other command interpreter/shell-like thing eg. bash) to be piped your mail makes smrsh totally redundant. smrsh is supposed to be a restricted mail shell to restrict what programs can be used to process mail for security reasons. this will commonly be used for things like vacation, etc. if you allow programs like perl to be used in this way, the perl script can go on and call any other program to do anything else, so you might as well remove smrsh. If you decide to get rid of smrsh, remove the line that says FEATURE(smrsh) (or similar) in your .mc file and use m4 to regenerate your sendmail.cf
Oh, err. just realised that this is in the RAQ forum. i don't know if doing this suggestion would be permanent (the raq control panel may overwrite it?) or if there is a way to control it from the control panel.
Gilby
04-09-2001, 09:15 PM
On the RAQ3, put a symbolic link to the script in /usr/adm/sm.bin/ but not a link to perl as that is a big security risk (as you can execute any perl script which can execute any command). Then make sure the perl script is only writable to by the admin (you) and has the location of perl in the #! line of the script. Then in the aliases file, put "|/path/to/perl/script" for the alias.