Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    2

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

    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:
    sales@domain.com: "|/home/myaccount/etc/newmail.php"
    john@domain.com: john@doe.com
    *: myaccount
    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:

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    2

    Default

    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:
    john@domain.com: john@doe.com
    *: "|/home/myaccount/etc/newmail.php"
    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:

Similar Threads & Tags
Similar threads

  1. Email piping to a php script fopen disabled
    By broncha in forum cPanel Developers
    Replies: 5
    Last Post: 08-28-2011, 06:51 AM
  2. Email Piping to script works, but sender gets an error message?
    By itzhero in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-24-2010, 01:50 PM
  3. Email Piping to PHP with CATCH ALL
    By zeeshanhashmi in forum cPanel Developers
    Replies: 11
    Last Post: 06-10-2010, 07:58 AM
  4. Piping email to script question.
    By SosyMe in forum E-mail Discussions
    Replies: 1
    Last Post: 06-08-2010, 09:57 PM
  5. eMail Piping to perl script PLUS copy to specific pop account (via cPanel)
    By cards4success in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 03-02-2004, 06:41 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube