The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Email Piping

Discussion in 'E-mail Discussions' started by meisam, Jun 28, 2006.

  1. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    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 support@evhost.ca 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]support@evhost.ca[/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
    meisam@alpha-hosting.com
     
    #1 meisam, Jun 28, 2006
    Last edited: Jul 1, 2006
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
  3. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have tried everything on that turtorial, it just doesnt seem to work. is there anything else i can do to it?

    Thanks,
    Meisam Mulla
    meisam@alpha-hosting.com
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    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?
     
  5. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    This is what shows up when i test the filter:
    Code:
    Condition is true: $header_to: contains support@evhost.ca
    Return-path copied from sender
    Sender      = elitepc@evhost.meisam.net
    Recipient   = elitepc@evhost.meisam.net
    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 "support@evhost.ca" \"\/usr/local/bin/php -q -f /home/billing/public_html/cron/gateway.php billing.evhost.ca 1\"    

    Yes. It does exist.

    Yes i have chmoded both the file and the directory to 0755.

    It shows a few errors but i am told by Ubersmith that the errors shown are normal.

    Thanks,
    Meisam Mulla
    meisam@alpha-hosting.com
     
  6. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    *bumping thread*
     
  7. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    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 "user@example.com"+++++++|/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.
     
  8. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    VIA cPanel.

    I added the pipe character when i set it up, but somewhere along the way it got lost :eek:

    Those are values needed by the script.

    Script is encoded with ioncube, Ubersmith advises that i should leave the script intact to avoid parsing problems


    Thanks,
    Meisam Mulla
    meisam@alpha-hosting.com
     
  9. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Okay, i have changed the filter to

    Code:
    $header_to: contains "support@evhost.ca" \"|/usr/local/bin/php -q -f /home/billing/public_html/cron/gateway.php billing.evhost.ca 1\" 
    I have tried sending an email to support@evhost.ca 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
    meisam@alpha-hosting.com
     
  10. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    *bump yet again*
     
  11. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    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!
     
  12. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    I just ended up paying $40 to the Ubersmith Developers to fix it for me. Thanks webignition for all your help.

    Thanks,
    Meisam Mulla
    meisam@alpha-hosting.com
     
  13. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Good to hear you got things working.

    I'm interested to hear what the problem was.
     
  14. meisam

    meisam Member

    Joined:
    Oct 11, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
  15. nkommunikation

    nkommunikation Registered

    Joined:
    Jun 6, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Well Im also having the same problem...
     
Loading...

Share This Page