Hi Guys, I know this can be done, but I can't find it in the docs. I want an e-mail send to a particular account to run a batch file that will send the results back to another account. Any ideas or pointers please ??
Simon
On Wed, Nov 21, 2001 at 09:18:23AM -0000, Simon Parkes wrote:
Hi Guys, I know this can be done, but I can't find it in the docs. I want an e-mail send to a particular account to run a batch file that will send the results back to another account. Any ideas or pointers please ??
in /etc/aliases:
someaccount: "| /usr/local/bin/someprog"
Then email sent to someaccount will be piped to /usr/local/bin/someprog
On Wed, 21 Nov 2001 15:20:27 Chris Allen wrote:
On Wed, Nov 21, 2001 at 09:18:23AM -0000, Simon Parkes wrote:
Hi Guys, I know this can be done, but I can't find it in the docs. I
want an e-mail
send to a particular account to run a batch file that will send the
results
back to another account. Any ideas or pointers please ??
in /etc/aliases:
someaccount: "| /usr/local/bin/someprog"
Then email sent to someaccount will be piped to /usr/local/bin/someprog
And as for sending the results to a third account, this can be done by having the script that gets run invoke sendmail again to send the output out.
On Wed, 21 Nov 2001, Simon Parkes wrote:
Hi Guys, I know this can be done, but I can't find it in the docs. I want an e-mail send to a particular account to run a batch file that will send the results back to another account. Any ideas or pointers please ??
Simplest (non-sendmail-specific) solution is to use forward, ie in the account that receives the email put in .forward something like:
\user,"| name_of_batchfile"
...which will save a copy of the email to user's account and also pipe it to the batchfile (which should then email the results).
I think. I could be wrong (and probably am).
Andrew.
Simon Parkes wrote:
Hi Guys, I know this can be done, but I can't find it in the docs. I want an e-mail send to a particular account to run a batch file that will send the results back to another account. Any ideas or pointers please ??
Simon
I think you either need procmail for this (with sendmail, that is), or a cron job to detect, analyse and then delete the file. AFAIK, sendmail itself can't do this. But then, I may be wrong!
Cheers, Laurie.