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 pipe fine but still generate and send bounce email back to sender

Discussion in 'E-mail Discussions' started by CBiLL, Aug 5, 2008.

  1. CBiLL

    CBiLL Member

    Joined:
    Jul 1, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I am setting up a eticket support helpdesk using pipe to get the emails into eticket and it works great but my senders are getting bounce message back from the cpanel for some reason.

    Here an example of the bounce

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    pipe to |/home/ccccc/public_html/helpdesk/pipe.php
    generated by support@ccccc.com

    The following text was generated during the delivery attempt:

    ------ pipe to |/home/ccccc/public_html/helpdesk/pipe.php
    generated by support@ccccc.com ------

    X-Powered-By: PHP/5.2.6
    Set-Cookie: PHPSESSID=5503c575cb5796ef7c81ea79eecb7862; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Content-type: text/html



    It look like php is generating a message after each sucessful pipe and email server is assuming it a bounce message then send the php message back to the sender.

    I believe one way to stop this is to add -q in the /usr/bin/php -q |/home/ccccc/public_html/helpdesk/pipe.php so php would stay silent but I cannot do this in cPanel instead I am force to only use home/ccccc/public_html/helpdesk/pipe.php in the forwarder.

    Is there a way to stop this bounce message? Pipe is working fine it just sending bounce back to the sender is what my issue are.


    Thanks
    Bill
     
  2. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    I think you are right: bounced email is probably do to output from the PHP script. The following should work:
    Code:
    heldesk@yourdomain.com: |/usr/bin/php -q /home/ccccc/public_html/helpdesk/pipe.php >/dev/null 2>&1
    The above pipes to PHP in quiet mode (as you suggested) and redirects the output.
     
  3. CBiLL

    CBiLL Member

    Joined:
    Jul 1, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I tried to add
    |/usr/bin/php -q in the Email Forwarder but it wouldn't let me and show up as

    /home/ccccc/|/usr/bin/php -q /home/ccccc/public_html/helpdesk/pipe.php

    so in the pipe script at the top I changed
    #!/usr/bin/php
    to
    #!/usr/bin/php -q

    which seem to stop the bouce but not sure if that the way to do it.

    I would prefer doing it your way but how do I add this command in the Email Forwarder or I need to shell in and vi it in the aliases?

    Bill
     
  4. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    I think what you did is valid. Well done!

    To edit the pipe the way I showed, it seems like you will have to edit the /etc/valiases/yourdomain.com file directly. This is the only way I have done it until now; have not tried it via cPanel before :p
     
  5. cleanwebdesign

    cleanwebdesign Registered

    Joined:
    Aug 1, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Hailey, ID
    Finally killed the bounces!

    On another forum, some kind soul shared that adding:
    PHP:
    return NULL;
    at the very end of your pipe script keeps that pesky bounce away! Whoo hoo!

    I also have this:
    PHP:
    error_reporting(E_ALL E_DEPRECATED E_WARNING E_NOTICE);   
    to keep error messages out of the bounce. Comment it out if you want to find out why certain things aren't working and the error message will come to your bounce helping you find out what is going wrong where.

    If you are including scripts, make sure to use the entire server path, not a relative path.
     
Loading...

Share This Page