troubleshooting Question

Qmail Sending Issue

Avatar of MarkDJordan
MarkDJordanFlag for United States of America asked on
Email ServersEmail Protocols
3 Comments1 Solution1066 ViewsLast Modified:
Hi Experts,

I have a simple form on our website that when submitted sends an email to webforms@mydomain.com

I am using php mail function

$headers = 'From: webform-submit@mydomain.com' . "\r\n" .
    'Reply-To: webform-submit@mydomain.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail (webforms@mydomain.com, subject, body from captured webform, $headers);

I receive the following error in my /psa/var/log/maillog

Oct 27 13:27:17 mydomain qmail-remote-handlers[26056]: Handlers Filter before-remote for qmail started ...
Oct 27 13:27:17 mydomain qmail-remote-handlers[26056]: from=#@[]
Oct 27 13:27:17 mydomain qmail-remote-handlers[26056]: to=postmaster@mydomain.com
Oct 27 13:27:17 mydomain qmail: 1256675237.656456 delivery 1805: failure: Connected_to_(IP OMITTED)_but_sender_was_rejected./Remote_host_said:_501_5.1.7_Bad_sender_address_syntax/
Oct 27 13:27:17 mydomain qmail: 1256675237.656528 status: local 0/10 remote 0/20
Oct 27 13:27:17 mydomain qmail: 1256675237.656559 triple bounce: discarding bounce/175875568
Oct 27 13:27:17 mydomain qmail: 1256675237.656587 end msg 175875568

The strange thing is that if I change the RECIPIENT address (not SENDER address) to my GMAIL account the mail goes directly through.  The log shows the following on a successful send to my GMAIL account.

Oct 27 13:29:20 mydomain qmail-queue-handlers[30393]: Handlers Filter before-queue for qmail started ...
Oct 27 13:29:21 mydomain qmail-queue-handlers[30393]: from=anonymous@mydomain.com
Oct 27 13:29:21 mydomain qmail-queue-handlers[30393]: to=myaddy@gmail.com
Oct 27 13:29:21 mydomain qmail-queue-handlers[30393]: hook_dir = '/var/qmail//handlers/before-queue'
Oct 27 13:29:21 mydomain qmail-queue-handlers[30393]: recipient[3] = 'myaddy@gmail.com'
Oct 27 13:29:21 mydomain qmail-queue-handlers[30393]: handlers dir = '/var/qmail//handlers/before-queue/recipient/myaddy@gmail.com'
Oct 27 13:29:21 mydomain qmail-queue-handlers[30393]: starter: submitter[30395] exited normally
Oct 27 13:29:21 mydomain qmail: 1256675361.022144 new msg 175875568
Oct 27 13:29:21 mydomain qmail: 1256675361.022918 info msg 175875568: bytes 420 from <anonymous@mydomain.com> qp 30395 uid 48
Oct 27 13:29:21 mydomain qmail: 1256675361.029780 starting delivery 1806: msg 175875568 to remote myaddy@gmail.com
Oct 27 13:29:21 mydomain qmail: 1256675361.029823 status: local 0/10 remote 1/20
Oct 27 13:29:21 mydomain qmail-remote-handlers[30406]: Handlers Filter before-remote for qmail started ...
Oct 27 13:29:21 mydomain qmail-remote-handlers[30406]: from=anonymous@mydomain.com
Oct 27 13:29:21 mydomain qmail-remote-handlers[30406]: to=myaddy@gmail.com
Oct 27 13:29:21 mydomain qmail: 1256675361.696854 delivery 1806: success: 209.85.210.6_accepted_message./Remote_host_said:_250_2.0.0_OK_1256675361_6si1552514yxe.75/
Oct 27 13:29:21 mydomain qmail: 1256675361.6974  

Thanks in advance for your help.

Mark
ASKER CERTIFIED SOLUTION
Daniel McAllister
President, IT4SOHO, LLC

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros