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 Pipeing

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

  1. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    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:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Try setting it to
    |php /home/MYUSERNAME/public_html/email/lib/pipe.php
     
  3. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    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
     
  4. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    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:
    765
    Likes Received:
    2
    Trophy Points:
    18
    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
     
  6. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    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?
     
  7. Izkabola

    Izkabola Well-Known Member

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

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    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.
     
  9. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    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:
    16
    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:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Thanks. I was wondering if I could get rid of that from my cron job script output. :)
     
  12. Izkabola

    Izkabola Well-Known Member

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

    gingerman Registered

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

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

    Very useful.
     
Loading...

Share This Page