meisam

Member
Oct 11, 2004
22
0
151
Hello,

I am using a billing manager called Ubersmith. I have followed all the instructions on email piping in their documentation but it is not working. According to them its a problem with cPanel. I send and email to [email protected] and i keep getting this error:

Code:
------ pipe to |/usr/local/bin/php -q -f
/home/billing/public_html/cron/gateway.php billing.evhost.ca 1
generated by [email][email protected][/email] ------

Could not open input file: /home/billing/public_html/cron/gateway.php
gateway.php does exist and i have disabled open_basedir for both evhost.ca and billing.evhost.ca. I also tried chmoding gateway.php to 777, but it still doesnt work, is there something wrong that i am doing here?

Thanks,
Meisam Mulla
[email protected]
 
Last edited:

webignition

Well-Known Member
Jan 22, 2005
1,876
1
166
1) Check the filter in cPanel and make sure it is definitely correct
What, exactly, do you have?

2) Check that the file to which email is piped exists

3) Set the permissions correctly: try 0755 on with the file and the directory it is in

4) Try and execute the script from shell - does it run, any errors?
 

meisam

Member
Oct 11, 2004
22
0
151
webignition said:
1) Check the filter in cPanel and make sure it is definitely correct
What, exactly, do you have?
This is what shows up when i test the filter:
Code:
Condition is true: $header_to: contains [email protected]
Return-path copied from sender
Sender      = [email protected]
Recipient   = [email protected]
Testing Exim filter file "/etc/vfilters/evhost.ca"

Save message to: /dev/null
Filtering set up at least one significant delivery or other action.
No other deliveries will occur.
This is what the filter is set to:
Code:
$header_to: contains "[email protected]" \"\/usr/local/bin/php -q -f /home/billing/public_html/cron/gateway.php billing.evhost.ca 1\"

webignition said:
2) Check that the file to which email is piped exists?
Yes. It does exist.

webignition said:
3) Set the permissions correctly: try 0755 on with the file and the directory it is in?
Yes i have chmoded both the file and the directory to 0755.

webignition said:
4) Try and execute the script from shell - does it run, any errors?
It shows a few errors but i am told by Ubersmith that the errors shown are normal.

Thanks,
Meisam Mulla
[email protected]
 

webignition

Well-Known Member
Jan 22, 2005
1,876
1
166
meisam said:
This is what the filter is set to:
Code:
$header_to: contains "[email protected]" \"\/usr/local/bin/php -q -f /home/billing/public_html/cron/gateway.php billing.evhost.ca 1\"
How was this filter set? It seems to be missing the vital pipe character and contains other details I've never before encountered.

I'd normally expect a filter piping mail to a script to be more of the form:

Code:
$header_to: contains "[email protected]"+++++++|/home/example/path/to/script.php
What purpose does the 'billing.evhost.ca 1' after the script serve?

You might also want to consider simply putting the full path to the script in the filter without the PHP command and popping a shebang line in the script.
 

meisam

Member
Oct 11, 2004
22
0
151
webignition said:
How was this filter set?
VIA cPanel.

webignition said:
It seems to be missing the vital pipe character and contains other details I've never before encountered.
I added the pipe character when i set it up, but somewhere along the way it got lost :eek:

webignition said:
What purpose does the 'billing.evhost.ca 1' after the script serve?
Those are values needed by the script.

webignition said:
You might also want to consider simply putting the full path to the script in the filter without the PHP command and popping a shebang line in the script.
Script is encoded with ioncube, Ubersmith advises that i should leave the script intact to avoid parsing problems


Thanks,
Meisam Mulla
[email protected]
 

meisam

Member
Oct 11, 2004
22
0
151
Okay, i have changed the filter to

Code:
$header_to: contains "[email protected]" \"|/usr/local/bin/php -q -f /home/billing/public_html/cron/gateway.php billing.evhost.ca 1\"
I have tried sending an email to [email protected] and i have not yet gotten the delivery failed message so i think its good so far. It also has not shown up as a ticket in the Ubersmith Support Manager ticket area...so i have no idea if it worked or not :confused:

Thanks,
Meisam Mulla
[email protected]
 

webignition

Well-Known Member
Jan 22, 2005
1,876
1
166
meisam said:
*bump yet again*
You're bumping this thread without including any new information?

All you last said was that you managed to send a message but that you're not sure if it got through to the ticketing system.

What, if anything, have you done to investigate this?

If nothing, try sending a message again and then checking the relevant entries in /var/log/exim_mainlog to see what happens to it!

Btw, you'd probably want to avoid bumping threads - it mostly just tends to get the attention of a moderator who will then add a comment to the effect that bumping is not appreciated. Rather than simply bumping a thread, it would probably be better if you simply added something new and meaningful to a thread - this has the same effect as bumping but with the benefit of having a purpose and without breaking the house rules!
 

webignition

Well-Known Member
Jan 22, 2005
1,876
1
166
meisam said:
I just ended up paying $40 to the Ubersmith Developers to fix it for me. Thanks webignition for all your help.

Thanks,
Meisam Mulla
[email protected]
Good to hear you got things working.

I'm interested to hear what the problem was.