sunrisepro Posted September 26, 2016 Report Share Posted September 26, 2016 I'm having trouble setting up the forwarder in cPanel as nothing seems to work. I tried both /usr/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php/usr/local/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php Blesta is in a subfolder named 'Blesta'. The error message I get is Action: failed Final-Recipient: rfc822;|/home/USERNAME/usr/local/bin/php /home/USERNAME/public_html/blesta/plugins/support_manager/pipe.php Status: 5.0.0 The path to pipe.php is correct - what else could be wrong? I also checked with my host & confirmed that Mailparse is installed & active. Quote Link to comment Share on other sites More sharing options...
0 Paul Posted September 26, 2016 Report Share Posted September 26, 2016 16 minutes ago, sunrisepro said: I'm having trouble setting up the forwarder in cPanel as nothing seems to work. I tried both /usr/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php/usr/local/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php Blesta is in a subfolder named 'Blesta'. The error message I get is Action: failed Final-Recipient: rfc822;|/home/USERNAME/usr/local/bin/php /home/USERNAME/public_html/blesta/plugins/support_manager/pipe.php Status: 5.0.0 The path to pipe.php is correct - what else could be wrong? I also checked with my host & confirmed that Mailparse is installed & active. It looks like cPanel is pre-pending the path to your home directory to restrict where you can pipe email. Make sure the 1st line in pipe.php is a hashbang to your PHP binary, and remove that part from your forwarder. #!/usr/local/bin/php Then pipe to /home/username/public_html/blesta/plugins/support_manager/pipe.php Quote Link to comment Share on other sites More sharing options...
0 Rocketz Posted September 26, 2016 Report Share Posted September 26, 2016 cpanel will always remove the /usr/bin/php part of the command. It does it automatically so don't worry about that part Make sure your chmod permissions are correct too, that error shows up when they're not And what Paul said, the hashbang MUST be added when using cPanel. Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 There appears to be a hashbang already at the beginning of pipe.php: #!/usr/local/bin/php -q Is that alright? And when I create the forwarder piping to , it becomes |/home/username/home/username/public_html/blesta/plugins/support_manager/pipe.php I'm going to remove 'home/username' from the forward & test it. Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 Nope - here's the email error: A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/username/public_html/blesta/plugins/support_manager/pipe.php generated by support@email.com local delivery failed Action: failed Final-Recipient: rfc822;|/home/username/public_html/blesta/plugins/support_manager/pipe.php Status: 5.0.0 Quote Link to comment Share on other sites More sharing options...
0 Michael Posted September 27, 2016 Report Share Posted September 27, 2016 the bottom code should be: /usr/local/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/ Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 When I made the new forwarder it became |/home/username/usr/local/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/ Is that right? Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 Nope - another email delivery error. Quote Link to comment Share on other sites More sharing options...
0 Michael Posted September 27, 2016 Report Share Posted September 27, 2016 Nope where did the /home/username/ come from? Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 Added by cpanel when I created the forwarder. I did remove the first slash from yours tho. Tried it again with the first slash & cpanel saved it as |/home/username/public_html/blesta/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/ Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 Here's the last error message: A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/username/public_html/blesta/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/ Action: failed Final-Recipient: rfc822;|/home/username/public_html/blesta/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/ Status: 5.0.0 Quote Link to comment Share on other sites More sharing options...
0 Paul Posted September 27, 2016 Report Share Posted September 27, 2016 3 hours ago, sunrisepro said: There appears to be a hashbang already at the beginning of pipe.php: #!/usr/local/bin/php -q Is that alright? And when I create the forwarder piping to , it becomes |/home/username/home/username/public_html/blesta/plugins/support_manager/pipe.php I'm going to remove 'home/username' from the forward & test it. This is probably correct, minus the /home/username. Is the file executable? chmod +x pipe.php or 755. Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 It was 744, just made it 755. Still not working: A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/username/public_html/blesta/plugins/support_manager/pipe.php generated by support@email.com local delivery failed Action: failed Final-Recipient: rfc822;|/home/username/public_html/blesta/plugins/support_manager/pipe.php Status: 5.0.0 Quote Link to comment Share on other sites More sharing options...
0 Paul Posted September 27, 2016 Report Share Posted September 27, 2016 Do you have SSH access? Is mailparse included in the CLI version of PHP? To find out, you can run the following via SSH: php -i | grep mailparse The next thing you could do is send yourself an email, and view the source including the headers. Copy this to a text file called something like email.txt, and replace the TO address with that of your ticket email address. /home/username/public_html/blesta/plugins/support_manager/pipe.php < /path/to/email.txt This will send the content of email.txt to pipe.php for processing. This is a simple way to test by bypassing the mail server. Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 I don't have the time to enable & setup SSH access right now, and I have no idea what the 'CLI version of PHP' even means. Aside from SSH, what do you think is the problem? Quote Link to comment Share on other sites More sharing options...
0 Paul Posted September 27, 2016 Report Share Posted September 27, 2016 10 minutes ago, sunrisepro said: I don't have the time to enable & setup SSH access right now, and I have no idea what the 'CLI version of PHP' even means. Aside from SSH, what do you think is the problem? There is some kind of error. The only thing I can think of, is that it's missing the mailparse dependency. The other steps help you determine that, and also debug to rule out the mail server being the issue by manually piping an email from text file to the application. Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 I'm confirming that Mailparse is active with my host.. Quote Link to comment Share on other sites More sharing options...
0 Paul Posted September 27, 2016 Report Share Posted September 27, 2016 7 minutes ago, sunrisepro said: I'm confirming that Mailparse is active with my host.. Be sure to confirm it's available via CLI in /usr/local/bin/php Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 27, 2016 Author Report Share Posted September 27, 2016 Quote Yes, the Mailparse extension is enabled for all cPanel accounts on your server. It is also enabled for PHP-CLI (again on all accounts): Code: username@server [~]# echo "<?php phpinfo(); ?>" | /usr/local/bin/php | grep -i mailparse mailparse mailparse support => enabled mailparse.def_charset => us-ascii => us-ascii Does that help? Quote Link to comment Share on other sites More sharing options...
0 evolvewh Posted September 27, 2016 Report Share Posted September 27, 2016 Use 700 for the pipe.php file permission, make sure the hashbang is included and you should be all set. Quote Link to comment Share on other sites More sharing options...
0 Paul Posted September 28, 2016 Report Share Posted September 28, 2016 19 hours ago, sunrisepro said: Does that help? Yes, it appears that mailparse is in your PHP CLI environment, great! Unfortunately that doesn't get us any closer to determining the issue. What you can do is enable error reporting. An error may occur in the bounce message, but would definitely appear if you tried to pipe a text file email to pipe.php via SSH. To enable error reporting, edit /config/blesta.php and change Configure::errorReporting(0); to Configure::errorReporting(-1); If running Blesta 3.6.2, also change Configure::set("System.debug", false); to Configure::set("System.debug", true); 19 hours ago, evolvewh said: Use 700 for the pipe.php file permission, make sure the hashbang is included and you should be all set. Did that work for you on cPanel? Quote Link to comment Share on other sites More sharing options...
0 evolvewh Posted September 28, 2016 Report Share Posted September 28, 2016 31 minutes ago, Paul said: Did that work for you on cPanel? If you're asking me, yes. I've been using this since 3.0 came out. Paul 1 Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 30, 2016 Author Report Share Posted September 30, 2016 Here's the new error in the returned mail: This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/username/public_html/blesta/plugins/support_manager/pipe.php generated by support@mail.com local delivery failed The following text was generated during the delivery attempt: ------ pipe to |/home/username/public_html/blesta/plugins/support_manager/pipe.php generated by support@email.com ------ PHP Fatal error: Call to undefined function mailparse_msg_create() in /home/username/public_html/blesta/plugins/support_manager/vendors/mime_mail_parser/MimeMailParser.class.php on line 113 Fatal error: Call to undefined function mailparse_msg_create() in /home/username/public_html/blesta/plugins/support_manager/vendors/mime_mail_parser/MimeMailParser.class.php on line 113 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" dir="ltr"> <head> <title>Blesta</title> <link rel="stylesheet" type="text/css" href="/home/username/public_html/blesta/plugins/support_manager/app/views/errors/css/styles.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div class="program_error"> <h3>Oh noes!</h3> <div class="contents"> <p>Call to undefined function mailparse_msg_create() on line <strong>113</strong> in <strong>/home/username/public_html/blesta/plugins/support_manager/vendors/mime_mail_parser/MimeMailParser.class.php</strong></p> </div> </div> </body> </html>PHP Fatal error: Uncaught exception 'UnknownException' with message 'Invalid callback Session::sessionWrite, cannot access private method Session::sessionWrite()' in Unknown:0 Stack trace: #0 [internal function]: UnknownException::setErrorHandler(2, 'Invalid callbac...', 'Unknown', 0, NULL) #1 {main} thrown in Unknown on line 0 Fatal error: Uncaught exception 'UnknownException' with message 'Invalid callback Session::sessionWrite, cannot access private method Session::sessionWrite()' in Unknown:0 Stack trace: #0 [internal function]: UnknownException::setErrorHandler(2, 'Invalid callbac...', 'Unknown', 0, NULL) #1 {main} thrown in Unknown on line 0 PHP Warning: Invalid callback Session::sessionClose, cannot access private method Session::sessionClose() in Unknown on line 0 Warning: Invalid callback Session::sessionClose, cannot access private method Session::sessionClose() in Unknown on line 0 Action: failed Final-Recipient: rfc822;|/home/username/public_html/blesta/plugins/support_manager/pipe.php Status: 5.0.0 Quote Link to comment Share on other sites More sharing options...
0 Paul Posted September 30, 2016 Report Share Posted September 30, 2016 Well that sounds like you don't have mailparse. Quote Link to comment Share on other sites More sharing options...
0 sunrisepro Posted September 30, 2016 Author Report Share Posted September 30, 2016 OK, let's see what my host says. Quote Link to comment Share on other sites More sharing options...
0 Michael Posted September 30, 2016 Report Share Posted September 30, 2016 38 minutes ago, sunrisepro said: OK, let's see what my host says. Do you have CloudLinux options like PHP Selector, if you do check it and see if mail parse is enabled. Quote Link to comment Share on other sites More sharing options...
Question
sunrisepro
I'm having trouble setting up the forwarder in cPanel as nothing seems to work. I tried both
/usr/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php
/usr/local/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php
Blesta is in a subfolder named 'Blesta'. The error message I get is
Action: failed Final-Recipient: rfc822;|/home/USERNAME/usr/local/bin/php /home/USERNAME/public_html/blesta/plugins/support_manager/pipe.php Status: 5.0.0
The path to pipe.php is correct - what else could be wrong? I also checked with my host & confirmed that Mailparse is installed & active.
Link to comment
Share on other sites
31 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.