Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    17

    Default email pipe fine but still generate and send bounce email back to sender

    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. #2
    Member Stefaans's Avatar
    Join Date
    Mar 2002
    Location
    Vancouver, Canada
    Posts
    445

    Default

    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. #3
    Member
    Join Date
    Jul 2008
    Posts
    17

    Default

    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. #4
    Member Stefaans's Avatar
    Join Date
    Mar 2002
    Location
    Vancouver, Canada
    Posts
    445

    Default

    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

  5. #5
    Registered User
    Join Date
    Aug 2010
    Location
    Hailey, ID
    Posts
    1

    Default Finally killed the bounces!

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

    I also have this:
    PHP Code:
    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.

Similar Threads & Tags
Similar threads

  1. Strange Email Piping Bounce Back
    By Carl S in forum New User Questions
    Replies: 2
    Last Post: 06-16-2010, 09:28 AM
  2. Question about returning (bounce) a message back to sender...
    By guldvog in forum E-mail Discussions
    Replies: 8
    Last Post: 10-21-2007, 03:40 AM
  3. Email Pipe: Bounce Back Message makes no sense
    By doni49 in forum E-mail Discussions
    Replies: 2
    Last Post: 03-26-2007, 10:46 PM
  4. Replies: 2
    Last Post: 09-01-2005, 06:20 AM
  5. Email pipe works | Sender still gets error message
    By nybble in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-23-2004, 02:32 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube