Re: Working with overly aggressive anti-spam measures

From: Date: Tue, 10 Oct 2006 08:09:48 +0000
Subject: Re: Working with overly aggressive anti-spam measures
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-242886@lists.php.net to get a copy of this message
Dave M G wrote:
Travis, Chris, Thank you for your advice. I've installed spamassassin and I'm using it to monitor how well my PHP generated emails rate as spam. So far, I'm not doing well. I have two main issues so far: 1. Spamassassin says: Spam detection software, running on the system "homebase", has identified this incoming email as possible spam. [...] Content analysis details: (0.3 points, 5.0 required)
pts rule name              description
---- ---------------------- --------------------------------------------------
0.3 AWL                    AWL: From: address is in the auto white-list
I looked up about auto white-lists on the net, and it says that it's a comparison between the current and previous emails. But for testing purposes, I don't really want it to compare against previous emails, since previous test emails would be "spammier" and bias spamassassin the wrong way. How can I compensate for this? 2. I've attempted to add the "Return-Path" headers to my headers, like so: $headers = "Return-Path: info@tokyohockey.com\n"; $headers .= "From: Tokyo Street Hockey Association <info@tokyohockey.com>\n"; $headers .= "X-Sender: info@tokyohockey.com\n"; mail($member, $subject, $content, $headers); And yet, when I look at the headers of the email that's being generated, it says: Return-Path: <nobody@server.mywebhost.com> Received: from server.mywebhost.com (ns1.nameserver.com [123.123.123.123] (may be forged) (Note that I've changed the names of servers and the DNS just to keep some info private) Why are my attempts to set these headers in PHP not taking effect?
Because the return path can't be set manually. You need to set the 5th parameter: mail($to, $subject, $headers, $body, '-freal_return_path@domain.com'); or ini_set('sendmail_from', 'real_return_path@domain.com'); mail($to, $subject, $headers, $body); -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#242886) next »