No processing of piped mails

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
BerndJM
Posts: 2
Joined: Fri Nov 18, 2011 2:42 am

No processing of piped mails

Post by BerndJM »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Have a problem that the piped mails where not processed.
Double and trible checked path, shebang and settings - all is ok.
But not tickets where created from the piped mails.
To ensure that all settings are allright I replaced the content of hesk_pipe.php with this little script

Code: Select all

<?php
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd))
{
    $email .= fread($fd, 1024);
}
fclose($fd);
mail(my.email@adress','From my email pipe!','"' . $email . '"');
?>
And this works fine, the content of the piped email is "back"-mailed to my email adress.
So I asume there is something going wrong in processing the piped mail.
No idea how I can further investigate this, any hints are welcome.

Regards Bernd
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: No processing of piped mails

Post by Klemen »

Look for any error messages in the bounced emails or paste a copy here and I will have a look.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
BerndJM
Posts: 2
Joined: Fri Nov 18, 2011 2:42 am

Re: No processing of piped mails

Post by BerndJM »

Hi Klemen,

there where no bounced mails, so I couldn't look for errors.
But I think I figured out where the problem is.

(Remark: in the following xxx is used to anomize the real path / root path)

I forced the writing of a php error log (because I have no acces to the php.ini on the server) directly in hesk_pipe.php:

Code: Select all

error_reporting(E_ALL);
ini_set('log_errors', 'on');
ini_set('error_log', 'THE_FULL_PATH_TO_MY_LOGFILE')
after sending another mail for piping I saw what happens:

Code: Select all

PHP Warning:  require(../../hesk_settings.inc.php): failed to open stream: No such file or directory in /xxx/hesk/inc/mail/hesk_pipe.php on line 44
PHP Fatal error:  require(): Failed opening required '../../hesk_settings.inc.php' (include_path='.:/usr/local/lib/php/') in /xxx/hesk/inc/mail/hesk_pipe.php on line 44
Now it was clear, the script couldn't find the required hesk_settings_inc.php and stopped.
So I thought it would be a good idea to change the

Code: Select all

define('HESK_PATH','../../');
to

Code: Select all

define('HESK_PATH','/xxx/hesk/');
And what should I say:
it works!!!

Heaven (or hell) knows why the ../../ definition didn't work - which is absolutely correct (in my opinion): as it means something like "go two levels higher to find the file" ...

Maybe this missbehavior depends on the method from my hoster to define the mail piping.
I have to do this in a aliases file in the root-folder of the domain, which will be read automaticly ?!?

Best regards
and many thanks for this wonderful software.
Bernd
Post Reply