Jump to content
  • 0

Please Help To Set Piping Properly


yngens

Question

Whole day fighting with piping problem. Seems tried everything that http://docs.blesta.com/display/user/Support+Manager#SupportManager-EmailPiping and relevant discussions on this forum suggest, still no joy :(

 

Trying to make this work on CentOS 6.3, the virtual server is running in FCGId mode, pipe.php has 755 permission and "#!/usr/bin/php -q" line in the very beginning of the file. The "/etc/aliases" file has:

support: "/usr/bin/php /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1"

and the mail is returning:

Diagnostic-Code: X-Postfix; cannot append message to file /usr/bin/php    /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php
    plugin/support_manager/ticket_pipe/index/1: cannot create file exclusively:
    No such file or directory

Any suggestions?

 

Also, the "pipe.php" file contains:

   $argv = array(
        '',
            'plugin/support_manager/ticket_pipe/index/' . $company_id
    );

is the path correct? Shouldn't it be "plugins/" instead "plugin/"? Anyway, I tried both ways also changing "plugin/support_manager/ticket_pipe/index/1" to "plugins/support_manager/ticket_pipe/index/1" in the forwarder, but still no success. Quite frustrating is this problem. 

 

And yes "Piping" is selected as as Email Handling on /admin/plugin/support_manager/admin_departments/edit/1. Adn this setup is not multi company setup.

 

Any inputs will be much appreciated.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

It is now executing PHP properly, but php cannot access the script.

 

Be aware that the Unix user used by your mailserver to process local e-mail must be able to access it.

Check the file permissions on the script and parent directories.

 

 

Alternatively, you can try forwarding support e-mail to the username your website runs under.

And put your "|/usr/bin/php" line in a file called .forward in the home directory of that user.

Most mail servers execute pipe lines found in .forward under the username of the user.

 

Max, you were completely right - I just set bald permissions on all parent directories and it finally started to work. Thanks for the right tip! Oh, my God, me and my colleagues were just about giving up with Blesta. Now we definitely stay!

Link to comment
Share on other sites

  • 0

After changing

support: "/usr/bin/php /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1"

to

support: "/usr/bin/php /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/" 

(adding forward slash in the end)

 

I started to get:

Final-Recipient: rfc822; support@host.mysite.com
Original-Recipient: rfc822;support@mysite.com
Action: failed
Status: 5.2.0
Diagnostic-Code: X-Postfix; maildir delivery failed: create maildir file
    /usr/bin/php
    /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php
    plugin/support_manager/ticket_pipe/index/1/tmp/1398755976.P28600.host.mysite.com:
    Permission denied

but still no joy :(

Link to comment
Share on other sites

  • 0

Whole day fighting with piping problem. Seems tried everything that http://docs.blesta.com/display/user/Support+Manager#SupportManager-EmailPiping and relevant discussions on this forum suggest, still no joy :(

 

Trying to make this work on CentOS 6.3, the virtual server is running in FCGId mode, pipe.php has 755 permission and "#!/usr/bin/php -q" line in the very beginning of the file. The "/etc/aliases" file has:

support: "/usr/bin/php /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1"

 

You are currently telling it to append incoming e-mail to a text file named php.

Need to prepend | in front of /usr/bin/php to indicate it is a command to execute and pipe to.

Link to comment
Share on other sites

  • 0

You are currently telling it to append incoming e-mail to a text file named php.

Need to prepend | in front of /usr/bin/php to indicate it is a command to execute and pipe to.

 

Thanks for the suggestion. I edited /etc/aliases in the following way:

support: "|/usr/bin/php /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/"

but it still gives:

Command died
    with status 1: "/usr/bin/php
    /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php
    plugin/support_manager/ticket_pipe/index/1/". Command output: Could not
    open input file:
    /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php
Link to comment
Share on other sites

  • 0
Command output: Could not     open input file:     /home/mysite/domains/mysite.com/public_html/plugins/support_manager/pipe.php

 

 

It is now executing PHP properly, but php cannot access the script.

 

Be aware that the Unix user used by your mailserver to process local e-mail must be able to access it.

Check the file permissions on the script and parent directories.

 

 

Alternatively, you can try forwarding support e-mail to the username your website runs under.

And put your "|/usr/bin/php" line in a file called .forward in the home directory of that user.

Most mail servers execute pipe lines found in .forward under the username of the user.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...