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.

Mail problems - redundancy

Discussion in 'E-mail Discussions' started by ryno267, Aug 9, 2004.

  1. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    Hey guys got a few problems that may / may not be related to each other but both are very annoying and embarrassing and need to be fixed immediately.

    FYI... We use EXIM with
    WHM 9.4.0 cPanel 9.4.1-R64
    RedHat 9 - WHM X v3.1.0

    Problem 1:

    With outlook and even mail on the guys' macs... we have an account that will always RE-download the same emails after they have already been downloaded... as if outlook or mail didnt tell the server already downloaded, but leave for others....
    Any reason this would happen and anybody know how to fix it?

    Problem 2:

    Clients and I have on our server have php mail() forms, that ONLY once in a blue moon, sends like 4000 emails on one submit - all duplicates.... Somehow, and i'm sure its not the form itself doing it, the mail box gets tons and tons of emails... Like the mail server is replicating it... or it possibly gets hung in the mail and sends over and over... I don't know.. but need that fixed as well...

    Thanks guys.. I'll also be available on AIM (rynoweb) for further questions....

    - rYno
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Problem 1:

    Are you talking about POP3 mailboxes? If so, then it is always an email client problem. In the POP3 protocol there is no such thing as "leave messages on server", it is a figment of the POP3 client writers imagination;). POP3 is not meant to be used for email storage beyond login, download, delete, quit. IMAP is for storing email on a server.

    Problem 2:

    Could be a user with a dodgy browser, repeatedly submitting the form - or someone less savioury trying to break something. The PHP script may have to be rewritten to check whether it has just been submitted by the person now submitting and stop if it is using HTTP_REFERER or REMOTE_ADDR, perhaps.
     
  3. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    here is the php script....

    you see anything wrong with it?? I've used it on many many sites and have never had a problem before...

    Code:
    <?php  
    $to = "office@domain.com"; /* recievers email address */
    $subject = "[Web Form Submission]"; /* Subject line on email */
    $body = "FROM: " . $HTTP_POST_VARS['sendername'] . " <" . $HTTP_POST_VARS['senderemail']  . ">\n"; 
    $body .= "PHONE: " . $HTTP_POST_VARS['phone'] . "\n";
    $body .= "MESSAGE:\n";
    $body .= stripslashes($HTTP_POST_VARS['msgbody']);
    $header = "From: " . $HTTP_POST_VARS['sendername'] . " <" . $HTTP_POST_VARS['senderemail'] . ">\n";
    $header .= "Reply-To: " . $HTTP_POST_VARS['sendername'] . " <" . $HTTP_POST_VARS['senderemail'] . ">\n";
    $header .= "X-Priority: 1";
    
    mail($to, $subject, $body, $header);
    include("index.php");
    ?>
    
     
Loading...

Share This Page