* Summary [Rev2]: Sending mail to a perl script.
@ 1996-05-03 2:19 Garry Optland
0 siblings, 0 replies; only message in thread
From: Garry Optland @ 1996-05-03 2:19 UTC (permalink / raw)
To: tru64-unix-managers
Hi All,
In my summary yesterday I said:
> The answer is to change the alias from:
>
> test: "| /usr/local/mail/bin/test.pl"
> to:
> test: "| /usr/bin/perl /usr/local/mail/bin/test.pl"
However, futher help from others and testing revealed that this was not
the story.
The real answer was that as root, I do not have /usr/local/bin in my path.
I had set up a link linking /usr/bin/perl to /usr/local/bin/perl. The
permission that I checked on /usr/bin/perl was: lrwxrwxrwx. However,
/usr/local/bin/perl was -rwx-rx-r--.
My confusion (and reason for asking for help) was I could "cat mailfile |
/usr/local/mail/bin/test.pl" and it worked, but when I mailed to the alias
it bombed out. I thought that the prog mailer had trouble because it used
sh to call a perl script, but the real reason was that sh could not
execute perl. I am not sure if this is a bug or a feature, where the
permissions on the link get overridden by the real file :-)
So in summary, in the alias file, you only need:
test: "| /usr/local/mail/bin/test.pl"
as long as the first line of the perl script is #!/usr/bin/perl (or
whatever your path to perl is), although the other version works as well.
Sorry to cause confusion and take up extra bandwidth. In testing
suggestions and making changes, I rushed the summary out too quickly.
Thanks to all that helped.
Regards,
Garry.
--------------------------------------------------------------------
Garry Optland - Unix Specialist Email: garry@pp.nsw.gov.au
Pacific Power phone: +61 2 268 6160
Park & Elizabeth Streets Sydney NSW 2001 Australia
--------------------------------------------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-05-03 2:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-03 2:19 Summary [Rev2]: Sending mail to a perl script Garry Optland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox