dot-qmail forwarding to php skript

dot-qmail forwarding to php skript

am 23.05.2006 18:09:57 von Daniel Schmidt

Hi,

I want to pipe all incoming mails to a php skript (pipe.php), so I wrote in
my dot-qmail-default :

| /usr/bin/php -q /path/pipe.php

It seems, that during processing a "./" is added to that line, because in my
mail.info I get the hint:

.... delivery 101: deferral: Could_not_open_input_file:_/path/pipe.php./

I have no idea, where that ./ comes from. Any ideas?

Thanks,
Daniel

Re: dot-qmail forwarding to php skript

am 24.05.2006 00:12:11 von AK

Daniel Schmidt wrote:

> Hi,
>
> I want to pipe all incoming mails to a php skript (pipe.php), so I wrote in
> my dot-qmail-default :
>
> | /usr/bin/php -q /path/pipe.php
>
> It seems, that during processing a "./" is added to that line, because in my
> mail.info I get the hint:
>
> ... delivery 101: deferral: Could_not_open_input_file:_/path/pipe.php./
>
> I have no idea, where that ./ comes from. Any ideas?
>
> Thanks,
> Daniel
>
>
>

What is in the pipe.php? Do you have anything in the pipe.php that
tries to open a file? Is /path/pipe.php acccessible be the user that
access .qmail-default?
what happens if you cat some message into | /usr/bin/php.

Depending on your qmail installation, try removing the leading space
following the | and see whether that resolves the issue.

AK

Re: dot-qmail forwarding to php skript

am 24.05.2006 01:51:09 von Daniel Schmidt

>
> What is in the pipe.php? Do you have anything in the pipe.php that tries
> to open a file? Is /path/pipe.php acccessible be the user that access
> .qmail-default?
> what happens if you cat some message into | /usr/bin/php.
>
> Depending on your qmail installation, try removing the leading space
> following the | and see whether that resolves the issue.
>
> AK
>

pipe.php does some delivery. If I do manually:

cat file_with_mail | /usr/bin/php -q /path/pipe.php

everything works fine. Also there are no access problems (chmod 777).

I now nearly tried every possible combination with (or without) leading
spaces and/or quotation marks. As I told, as far as I guess according to
the log files there is an ./ directly added at the end of the
dot-qmail line and it's obvious that there is no /path/pipe.php./ avaiable.
But why is qmail behaving that way? Ok, the version of qmail was
preinstalled
by my root server provider, so may be, that provider uses a special version.

Re: dot-qmail forwarding to php skript

am 24.05.2006 05:05:35 von AK

Daniel Schmidt wrote:

>>What is in the pipe.php? Do you have anything in the pipe.php that tries
>>to open a file? Is /path/pipe.php acccessible be the user that access
>>.qmail-default?
>>what happens if you cat some message into | /usr/bin/php.
>>
>>Depending on your qmail installation, try removing the leading space
>>following the | and see whether that resolves the issue.
>>
>>AK
>>
>
>
> pipe.php does some delivery. If I do manually:
>
> cat file_with_mail | /usr/bin/php -q /path/pipe.php
>
> everything works fine. Also there are no access problems (chmod 777).
>
> I now nearly tried every possible combination with (or without) leading
> spaces and/or quotation marks. As I told, as far as I guess according to
> the log files there is an ./ directly added at the end of the
> dot-qmail line and it's obvious that there is no /path/pipe.php./ avaiable.
> But why is qmail behaving that way? Ok, the version of qmail was
> preinstalled
> by my root server provider, so may be, that provider uses a special version.
>
>
>
>


I think the 777 might be your problem.

Also, have you considered removing the space between the | and
/usr/bin/php?

Since it does delivery, does it try to open a file to which to write,
could that be where the problem is?

Try adding a slash at the end of the file to see whether the error that
is generated has the added ./ as well.

AK

Re: dot-qmail forwarding to php skript

am 01.06.2006 20:56:02 von Dave Sill

"Daniel Schmidt" writes:

> ... delivery 101: deferral: Could_not_open_input_file:_/path/pipe.php./
>
> I have no idea, where that ./ comes from. Any ideas?

Do "cat -vet .qmail-default". I think you'll find an unprintable
character at the end of the line...maybe a carriage return (a la DOS
format).

--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook
: Almost everything you always wanted to know.