1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PHP and Qmail ...again...

Discussion in 'Plesk for Linux - 8.x and Older' started by Wintermute, Dec 20, 2005.

  1. Wintermute

    Wintermute Guest

    0
     
    I am having trouble getting emails from a PHP form to work...
    Running plesk 7.5.4 under Fedora Core 2 (under virtuozzo)

    here is my php code....

    permissions are 755

    <?php

    $to = "me@mydomain.com";

    $subject = "Free Consultation Form";

    $message = "Free Consultation Form\n";
    $message .= "Name: ".$_POST["first"]."\nCompany: ".$_POST["company"]."\n";
    $message .= "Address: ".$_POST["street"]." ".$_POST["city"].", ".$_POST["state"]." ".$_POST["postal_code"]." ".$_POST["country"]."\n";
    $message .= "E-Mail: ".$_POST["email"]."\n";
    $message .= "Phone: ".$_POST["phone"]."\n";
    //$message .= "Interest: ".$_POST["interest"]."\n";
    $message .= "Attention: ".$_POST["attention"]."\n";
    $message .= "Additional Information: ".$_POST["additional"]."\n";
    $headers = "From: Admin\r\n";

    mail($to, $subject, $message, $headers);

    //CONFIRMATION
    $to_confirmation = $_POST["email"];

    $subject_confirmation = "Free Consultation Form Confirmation \n";

    $message_confirmation = "Your Free Consultation form has been submitted. We will contact you within the next 48HR to schedule an In-Home Free Consultation.\r\n\n";

    $message_confirmation .= $message;

    $headers_confirmation = "From: admin";

    mail($to_confirmation, $subject_confirmation, $message_confirmation, $headers_confirmation);
    ?>

    <a href="javascript:top.window.close()">CLOSE</a>

    ---------------------------

    my /usr/local/psa/var/log/maillog.processed
    log shows..

    Dec 19 23:13:32 vps105 qmail-queue: dwlib[17250]: mail: all addreses are uncheckable - need to skip scanning (by deny mode)
    Dec 19 23:13:32 vps105 qmail-queue: dwlib[17250]: scan: the message(drweb.tmp.Gp1xPx) sent by anonymous@mydomain.com to me@mydomain.com should be passed without checks, because contains uncheckable addresses

    does "passed" mean it was sent or dropped ?
    I am not receiving the e-mails genearated by the form.

    I changed the 'sendmail_path' option in my php.ini file

    from
    sendmail_path = /usr/sbin/sendmail -t -i
    to
    sendmail_path = /var/qmail/bin/qmail-inject -t -i

    and still nothing...

    also add the -Rt0 option to my /etc/xinetd.d/smtp_psa file

    server_args = -Rt0 /var/qmail/bin/relaylock ........

    still no go...

    I actually saw the email body in some log somwhere but now i forgot where it was..but in any case...its not sending...

    Oh and YES i did restart httpd and xinetd and qmail services after all changes...

    please help..

    winter
     
  2. Cranky

    Cranky Guest

    0
     
    "passed" means drweb isn't scanning it and is allowing it through. You should see the email listed in the maillog seconds after drweb passes it ... does that occur?
     
  3. Wintermute

    Wintermute Guest

    0
     
    Got a little further...

    The form basically is supposed to ask the user for name and phone number, email address etc.. then it sends a copy to the webmaster and to the person who submitted the form.

    the "myemail@gmail.com" address in the form is the webmaster account and that e-mail is received! The user submitting the form with address of "alex@mydomain.com" also receives the form. So what doesn't work you ask ?

    If for example the "alex@mydomain.com" e-mail address is of a domain that resides on the web server it does not deliver. In this particular case the domain resides there but the e-mail does not...it supposed to go to another server..and the DNS for the domain reflects that in the MX...but it looks like it tries to deliver local...if I create the mail account on the web server it delivers to it (even though its supposed to deliver off site) and it does not... Hope I didn't lose anybody in that explanation...

    any way any ideas... here is what the logs says....

    Dec 22 04:42:12 vps105 qmail-queue: dwlib[27896]: mail: all addreses are uncheckable - need to skip scanning (by deny mode)
    Dec 22 04:42:12 vps105 qmail-queue: dwlib[27896]: scan: the message(drweb.tmp.yEQRCB) sent by anonymous@userdomain.com to myemail@gmail.com should be passed without checks, because contains uncheckable addresses
    Dec 22 04:42:12 vps105 qmail: 1135244532.371601 new msg 492216322
    Dec 22 04:42:12 vps105 qmail: 1135244532.371684 info msg 492216322: bytes 463 from <anonymous@userdomain.com> qp 27897 uid 48
    Dec 22 04:42:12 vps105 qmail: 1135244532.372901 starting delivery 248: msg 492216322 to remote myemail@gmail.com
    Dec 22 04:42:12 vps105 qmail: 1135244532.372952 status: local 0/10 remote 1/20
    Dec 22 04:42:12 vps105 qmail-queue: dwlib[27900]: scan: the message(drweb.tmp.8KD4kA) sent by anonymous@userdomain.com to alex@mydomain.com is passed
    Dec 22 04:42:12 vps105 qmail: 1135244532.398504 new msg 492216323
    Dec 22 04:42:12 vps105 qmail: 1135244532.398623 info msg 492216323: bytes 608 from <anonymous@userdomain.com> qp 27902 uid 48
    Dec 22 04:42:12 vps105 qmail: 1135244532.400868 starting delivery 249: msg 492216323 to local 13-alex@mydomain.com
    Dec 22 04:42:12 vps105 qmail: 1135244532.400933 status: local 1/10 remote 1/20
    Dec 22 04:42:12 vps105 spamd[12275]: got connection over /tmp/spamd_full.sock
    Dec 22 04:42:12 vps105 spamd[27907]: handle_user: unable to find user 'alex@mydomain.com'!
    Dec 22 04:42:12 vps105 spamd[27907]: processing message <20051222094212.27898.qmail@userdomain.com> for alex@mydomain.com:110.
    Dec 22 04:42:12 vps105 spamd[27907]: clean message (1.5/7.0) for alex@mydomain.com:110 in 0.1 seconds, 608 bytes.
    Dec 22 04:42:12 vps105 qmail: 1135244532.509425 delivery 249: success: did_1+0+2/did_0+0+1/
    Dec 22 04:42:12 vps105 qmail: 1135244532.509478 status: local 0/10 remote 1/20
    Dec 22 04:42:12 vps105 qmail: 1135244532.509504 end msg 492216323
    Dec 22 04:42:12 vps105 qmail: 1135244532.832691 delivery 248: success: 64.233.185.114_accepted_message./Remote_host_said:_250_2.0.0_OK_1135244337_27si3532951wrl/
    Dec 22 04:42:12 vps105 qmail: 1135244532.832931 status: local 0/10 remote 0/20
    Dec 22 04:42:12 vps105 qmail: 1135244532.833080 end msg 492216322

    thanks

    winter
     
  4. mikk

    mikk Basic Pleskian

    23
    73%
    Joined:
    Jan 29, 2005
    Messages:
    83
    Likes Received:
    0
    sounds like you have simply forgotton to turn off mail services for that domain - until you do that it will be listed in rcpthosts/virtualdomains and be treated as local

    login to the control panel
    click the domain name
    click mail
    click disable

    then try it.
     
Loading...