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!

Piping email to a PHP script results in two copies of the email being processed

Discussion in 'E-mail Discussion' started by Chen, Jun 20, 2003.

  1. Chen

    Chen Registered

    Joined:
    Jan 2, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    I have a PHP script on my server that intercepts incoming messages to certain addresses on the domain name. This is set up directly from valiases, i.e:
    This was working fine until we upgraded to CPanel 7 (or at least, that's when I think the problems started).

    Right now, any messages sent to sales@domain.com are processed by newmail.php, but twice. I can tell from the log that the script is executed twice for the same message, so it's definitely not a problem with the script itself. However, if I change sales@domain.com to forward to some other address (not a pipe), it works fine and only one copy of the message is passed.

    Thanks for any help you can provide! :)

    Chen

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Chen

    Chen Registered

    Joined:
    Jan 2, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    After some more testing it seems that this is only a problem when forwarding messages from a particular address. If I change valiases to something like this:
    Then it works fine, and the script only processes the email once. Of course, this puts the whole thing in a loop so it's not really a viable solution. :)

    Thanks.

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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