Working with overly aggressive anti-spam measures

From: Date: Tue, 10 Oct 2006 01:55:25 +0000
Subject: Working with overly aggressive anti-spam measures
Groups: php.general 
Request: Send a blank email to php-general+get-242879@lists.php.net to get a copy of this message
PHP List, I run a few various social groups, and with each one I keep in contact with members by emailing them short newsletters. All my user information is stored in a MySQL database. I use PHP to get the relevant contact information, and use the mail() command to send out the emails one by one, so that each email is a little personalized. I've used this system for many years now with no problems up until now. What has changed, though, is that in recent years, anti-spam measures have become so aggressive that more and more people who sign up to my groups complain that they never receive the emails. A lot of the times, after they alert me to the issue, I can educate them a little about the anti-spam measures they most likely have on their system, and walk them through how to make it so that my newsletters go through. However, that is clearly not enough. To shorten a story that has already gone on a little long, it's come to my attention that part of the reason that my emails may not be getting through are because the headers are not sufficiently legitimate looking enough to bypass some server side anti-spam measures. Things like "Return-Path" are being set so that they look like they come from an email address that begins with the username "nobody". If possible, can anyone help me with creating the PHP code that will make an email as legitimate as it can be? I know I can't totally prevent my email from being marked as spam (after all, if it were possible, all the spammers would do it). But as much as I can prevent anti-spam measures getting a false positive when testing my email, the better. Here is the PHP code I currently use (trimmed for clarity): while ( $member = mysql_fetch_row($mysqlResult) ) { $subscriber = $member[0]; $email = $member[1]; $subject = "Report for " . date('l jS F Y'); $mailContent = "This is an email to " . $subscriber . " at " . $email . "."; $fromAddress = "info@mysite.com" mail($email, $subject, $mailContent, $fromAddress); } And here is what the headers for an email from that code looks like: -Account-Key: account5 X-UIDL: UID497-1152485402 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-path: <nobody@server.myhostingservice.com> Envelope-to: info@mysite.com Delivery-date: Sun, 03 Sep 2006 14:22:42 -0700 Received: from nobody by server.myhostingservice.com with local (Exim 4.52) id 1GJzQQ-0005pA-Mz for info@mysite.com; Sun, 03 Sep 2006 14:22:42 -0700 To: member@subscriber.com Subject: Report for Monday 4th September 2006 From: info@mysite.com Message-Id: <E1GJzQQ-0005pA-Mz@server.myhostingservice.com> Date: Sun, 03 Sep 2006 14:22:42 -0700 Which parts are key to change, and how? Thank you for any and all advice. -- Dave M G Ubuntu 6.06 LTS Kernel 2.6.17.7 Pentium D Dual Core Processor PHP 5, MySQL 5, Apache 2

« previous php.general (#242879) next »