On Thu, Jul 21, 2011 at 5:45 PM, Wade Preston Shearer <[email protected]> wrote: > I have a site where visitors are making charitable donations. A receipt is > emailed to them. A high percentage of these email receipts are bouncing. > > > Here is an example of diagnostic information being returned by one of the > rejecting email servers: > > mail.orcon.net.nz #<mail.orcon.net.nz #5.0.0 smtp; 550-Verification failed > for <[email protected]> 550-Unrouteable address 550 Sender verify > failed> #SMTP# > > > Original message headers: > > http://pastie.org/2251238 > > > Why would it work about eighty percent of the time but not the other twenty? > Could the problem be that the mail is coming from an internal server name > "dmzweb11.local" instead of a public domain name?
This is because this particular mail host is configured to check the validity of the sender's email address. Some mail hosts do this to reduce spam. The technique works quite well, though does have some false positives (like yours). Emails have two "sender" addresses. The From: header and the envelope sender. You clearly got the from header already, but the envelope sender is set to apache@localhost which got rewritten by postfix to [email protected]. It appears your PHP is setup to send mail using the standard sendmail (also supported by postfix) command. This is fine, but in your app you need to add an additional parameter to set the envelope sender address. http://www.php.net/manual/en/function.mail.php This describes the use of additional parameters, including setting the envelope sender. Example: mail($address,$subject,$message,$headers, "[email protected]") Your $headers should also include the From: header, but you already got that figured out. --lonnie _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
