If I execute the script manually it works great. If I execute it via
pipe with exim I get this:
Use of uninitialized value in concatenation (.) or string at
/usr/local/share/perl/5.8.0/LWP/Protocol.pm line 87, <> line 20
(#1)
Use of uninitialized value in concatenation (.) or string at
/usr/local/bin/Pager.pl line 60, <> line 20 (#1)
My pipe section of my exim.conf looks like this:
address_pipe:
driver = pipe
path = /sbin:/usr/sbin:/usr/bin:/bin:/usr/local/bin
user = mail
environment="http_proxy=http://proxy.rdlg.net:3128"
use_shell = true
home_directory = /var/mail
return_output
(If I don't include the proxy statement I time out on the network
connection. Odd because I'm not requiring proxy...)
I'm attaching the script.
Thus spake Shyamal Prasad (shyamal.prasad@sbcglobal.net):
> "Robert" == Robert L Harris <Robert.L.Harris@rdlg.net> writes:
>
> Robert> This hit the nail on the head. Only one problem now. If
> Robert> I save an email to a "file" and do a:
>
> Robert> cat <file> |/usr/local/bin/pager as user "nomad" it works
> Robert> great.
>
> Robert> If I set this to use user nomad and try to run it my logs
> Robert> show:
>
> Robert> [....deleted much output....]
> Robert> Child process of a ddress_pipe transport returned 255
> Robert> (could mean shell command ended by signal 127 (Unknown
> Robert> signal 127)) fr om command: /usr/local/bin/Pager.pl
>
> I am not familiar with this pager application. Does it produce
> anything on standard output? Does it return 0 on exit?
>
> Otherwise pay attention to this part of exim.conf
>
> # This transport is used for handling pipe addresses generated by
> # alias or .forward files. If the pipe generates any standard output,
> # it is returned to the sender of the message as a delivery error. Set
> # return_fail_output instead if you want this to happen only when the
> # pipe fails to complete normally.
>
> address_pipe:
> driver = pipe
> path = /usr/bin:/bin:/usr/local/bin
> return_output
>
>
> If you say return_output, any output results will cause delivery to
> fail. Also, the manual specifically says that the return value is
> checked.
>
> These are just ideas, I have not run exim like this.
>
> Best regards,
> Shyamal
:wq!
---------------------------------------------------------------------------
Robert L. Harris | PGP Key ID: FC96D405
DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
Attachment:
Pager.pl
Description: Perl program
Attachment:
pgpW18azLZLPF.pgp
Description: PGP signature