I'm trying to write a script that sends out a reply email when someone send
email to a certain address in my domain. The idea is someone sends mail to
[EMAIL PROTECTED] and a generic message is sent back to them. So far I
can't get anything sent anywhere if I let qmail-local run the program.
Here's the details:
/home/radius/.qmail-info contains:
|/home/radius/replyscript.pl
The replyscript.pl contains:
#!/usr/bin/perl
system ("cat message > /tmp/message");
system ("/var/qmail/bin/qmail-inject < message");
exit 0;
And /home/radius/message contains:
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Did it work?
Test........
If I send mail to [EMAIL PROTECTED] the script will copy the message to the
/tmp directory. This tells me that the script does in fact execute and the
file /home/radius/message is in the present working directory. However when
the script attempts to send the message to qmail-inject, the following error
is logged:
qmail-inject:_fatal:_read_error/did_0+0+1/
If I log into the Linux box and run the script directly it works fine. It
seems as if qmail-inject refuses to work if it's parent process is
qmail-local. Is this true? Know of any workarounds?
<|>/\\/|<|>