• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

PHP and Qmail ...again...

W

Wintermute

Guest
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 = "[email protected]";

$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 [email protected] to [email protected] 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
 
"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?
 
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 "[email protected]" address in the form is the webmaster account and that e-mail is received! The user submitting the form with address of "[email protected]" also receives the form. So what doesn't work you ask ?

If for example the "[email protected]" 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 [email protected] to [email protected] 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 <[email protected]> qp 27897 uid 48
Dec 22 04:42:12 vps105 qmail: 1135244532.372901 starting delivery 248: msg 492216322 to remote [email protected]
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 [email protected] to [email protected] 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 <[email protected]> qp 27902 uid 48
Dec 22 04:42:12 vps105 qmail: 1135244532.400868 starting delivery 249: msg 492216323 to local [email protected]
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 '[email protected]'!
Dec 22 04:42:12 vps105 spamd[27907]: processing message <[email protected]> for [email protected]:110.
Dec 22 04:42:12 vps105 spamd[27907]: clean message (1.5/7.0) for [email protected]: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
 
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.
 
Back
Top