Hello,

I am trying to write a script that is run by piping email to
it from an alias.  The script is running on Red Hat Linux
7.0, and the MTA's sendmail.  I'm also using smrsh.  I'm not
sure if the problem is with the script or something else,
but here's the code I'm using (just for testing right now, I
know there's a lot I'd have to do to tighten up security on
something like this) . . .

#!/usr/bin/perl -w
use strict;

open TEST, ">test.txt";
        print TEST "Test Worked";
close TEST;

I'd expect that if it worked, I'd get a file called
"text.txt" with the text "Test Worked" in the same directory
as the script.  Right now I get nothing.  The mail doesn't
get bounced back.  I don't get any error messages from
anywhere.  I read through some sendmail FAQ's about using
smrsh and searched around on Google, but I can't figure out
what could be wrong.

As suggested by the smrsh documentation, I didn't put the
actual script in /etc/smrsh, just a link to its real
location, and the alias is set to pipe to the script at the
/etc/smrsh path.

If anyone's got any suggestions, I'd really appreciate it.

Thanks!

-Dave

Reply via email to