Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Email Pipeing

Discussion in 'E-mail Discussion' started by Izkabola, Jun 5, 2004.

  1. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    156
    Hello, I am trying to pipe all of my email to public_html/email/lib/pipe.php however I am unsure how to do it.

    I went into cPanel and changed the default address to |/public_html/email/lib/pipe.php; that didn't work so I tryed |/home/MYUSERNAME/public_html/email/lib/pipe.php which also didn't work.

    Does anyone know how I can do this? Also, what would I enter?

    Thank you very much.
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    Try setting it to
    |php /home/MYUSERNAME/public_html/email/lib/pipe.php
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    773
    Likes Received:
    4
    Trophy Points:
    318
    Location:
    N.W. Iowa
    we have a similar setup with a perl script, I believe you need to enclose the pipe in double quotes like so:
    Code:
    "|/home/MYUSERNAME/public_html/email/lib/pipe.php"
    
    and yes, it has to be the full path to the script, not a relative path. :)

    Mickalo
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    156
    Thank you, that worked. The only problem is the person gets an email saying the email didn't go through when it actually did.

    Do you have any suggestions? Thank you.

    EDIT: In reply to squirrel
     
    #4 Izkabola, Jun 5, 2004
    Last edited: Jun 5, 2004
  5. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    773
    Likes Received:
    4
    Trophy Points:
    318
    Location:
    N.W. Iowa
    well, not sure how your php scrippt is processes the email, I am by no means a PHP programmer, stickly Perl :) We use a module called Mail::Audit to process the email.

    Mickalo
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    I'm not certain, but it could be the script that does that, or maybe something needs to be done in the script to stop it. PHP isn't my language. Like mickalo, I'm a perl user. I just wrote my first real php script 2 days ago. That's how I knew about needing php in front. My script was for a cron job and I had to figure that out to get it to run.

    What is the message the sender gets?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    156
     
  8. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    Maybe it's because it's not actually going to an email account. I'm not sure. You could try setting the email address to forward to :blackhole: and to the script to see if that allows it to go to the script and stops the failure message.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    156
    I don't get the message if I do that.
     
  10. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    316
    use |php -q /path/to/file

    That will surpress the:
    Content-type: text/html
    X-Powered-By: PHP/4.3.3
     
  11. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    Thanks. I was wondering if I could get rid of that from my cron job script output. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    156
    Great thank you.
     
  13. gingerman

    gingerman Registered

    Joined:
    Jul 10, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    151
    Thankyou Squirrel (mainly) and everyone else.

    I would have never have got this myself. ( the "|php /path/bit/....." )

    Very useful.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice