I am hoping someone can assist me in getting piping working using email Mail Aliases.
My crons folder is outside my WHMCS root as per their docs on additional security steps.
My pipe.php file is set to permissions 755
I am using the correct path - proved by the fact crons are working as expected
As mentioned I do have crons running correctly but every attempt to setup email piping fails
I have tried every combination in the aliases destination string but receive errors ranging from
- Permission denied Could not open input file:
- Command died with status 1 -- Could not open input file
This is just one example of the aliases destination string I have tried
/usr/bin/php | php -q /home/mydomain/domains/my-sub-domain/whmcs_working/crons/pipe.php
Any assistance would be gratefully accepted
Yes, it works fine for me, I have situation [cron outside public], all you need to do is create a mail alias.
VirtualMin, Edit Mail Alias, Tab Advanced Mode, Feed in program and use this:
php -q /home/user/crons/pipe.php
Thank you for your reply
Under Mail forwarding alias details - I have selected " Feed to Program"
So from your example and my example I have used
php -q /home/mydomain/domains/my-sub-domain/whmcs_working/crons/pipe.php
The address is correct to my pipe.php file (and sensitive info substituted)
This is the error I receive
Command died with status 1: "php -q /home/mydomain/domains/my-sub-domain/whmcs_working/crons/pipe.php".
Command output: Could not open input file: php -q /home/mydomain/domains/my-sub-domain/whmcs_working/crons/pipe.php
I am using this command below to run my crons which work correctly
/usr/bin/php -q /home/mydomain/domains/my-sub-domain/whmcs_working/crons/cron.php
Any assistance with this error would be gratefully accepted.
Have you tried using the pop cron instead of the pipe cron?
Yes I have tried running the pop cron - and it does work as expected.
Just been weighing up the pros and cons between using direct piping and POP3 importing - but I suppose as piping will not run it is time to move on…
All the best
Please find a reply from WHMCS, below
I can confirm that piping is only officially supported on cPanel and DirectAdmin, I don't believe we've seen it working correctly on a Webmin server.
What version of WHMcs do you use?
I’m going to weigh in on this old post. First of all, running piping is so much better than pop3 because you are instantly notified about new email. That can make the difference between a huge sale and a mediocre one, and the difference between slow customer service and perceived exceptional customer service. So I’m very much for piping instead of popping. Secondly the fact that WHMCS only supports cPanel and DirectAdmin should be taken with a pinch of salt. WHMCS has cPanel as a partner and are quick to not support other panels. Piping is a function of Postfix on Linux and Virtualmin does things in a stock way, so there should be no reason why it could not work.
As for the error itself:
“Command output: Could not open input file: php -q /home/mydomain/domains/my-sub-domain/whmcs_working/crons/pipe.php”
“Could not open input file” to me is a very simple and straightforward message. It simple can’t “open” / “FIND” the file. My guess it when piping the process can’t find the PHP executable. So I would change the pipe command to include the full path to PHP, e.g.:
/usr/bin/php -q /home/mydomain/domains/my-sub-domain/whmcs_working/crons/pipe.php
I’m really curious to find out if you got this working.