I’m using sendmail to send a bunch of e-mails (I really have to send this e-mails, unfortunately) through php. The e-mail began to get into gmail and yahoo’s SPAM boxes as soon as I stopped using my domain SMTP server, and started using the server’s sendmail facility (I separated my domain name provider from my host, which is now Amazon).
After studying a little, I realized that I could solve this problem just by sending the e-mail authenticatedly (i.e. through my domain’s SMTP server). Can I do that through configuration in sendmail? That way, I wouldn’t need any changes on my application, only on my server infrastructure.
The headers I’m receiving (from an email at gmail)
Delivered-To: ***********@gmail.com
Received: by 10.227.152.2 with SMTP id e2cs188839wbw;
Fri, 29 Oct 2010 03:39:45 -0700 (PDT)
Received: by 10.100.13.16 with SMTP id 16mr263366anm.209.1288348783979;
Fri, 29 Oct 2010 03:39:43 -0700 (PDT)
Return-Path: <apache@ip-10-194-150-64.ec2.internal>
Received: from ip-10-194-150-64.ec2.internal (ec2-75-101-144-206.compute-1.amazonaws.com [75.101.144.206])
by mx.google.com with ESMTP id x32si2412082vcr.72.2010.10.29.03.39.43;
Fri, 29 Oct 2010 03:39:43 -0700 (PDT)
Received-SPF: neutral (google.com: 75.101.144.206 is neither permitted nor denied by best guess record for domain of apache@ip-10-194-150-64.ec2.internal) client-ip=75.101.144.206;
Authentication-Results: mx.google.com; spf=neutral (google.com: 75.101.144.206 is neither permitted nor denied by best guess record for domain of apache@ip-10-194-150-64.ec2.internal) smtp.mail=apache@ip-10-194-150-64.ec2.internal
Received: from ip-10-194-150-64.ec2.internal (localhost [127.0.0.1] (may be forged))
by ip-10-194-150-64.ec2.internal (8.13.8/8.13.8) with ESMTP id o9TAdhxQ017836
for <*************e@gmail.com>; Fri, 29 Oct 2010 06:39:43 -0400
Received: (from apache@localhost)
by ip-10-194-150-64.ec2.internal (8.13.8/8.13.8/Submit) id o9TAdhHk017833;
Fri, 29 Oct 2010 06:39:43 -0400
Date: Fri, 29 Oct 2010 06:39:43 -0400
Message-Id: <201010291039.o9TAdhHk017833@ip-10-194-150-64.ec2.internal>
To: ***********@gmail.com
Subject: Esqueci minha senha
From: Cidade dos Bicos <*****************@cidadedosbicos.com.br>
X-Mailer: Cidade dos Bicos
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Thanks
For further referral: all my problems were because of bad configured DNS entries. Terms like MX, mx CNAME, PTR, DKIM should be in your veins when you decide to send e-mail.
This is a good reference: http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html