| Linode Forum https://forum.linode.com/ |
|
| Messages sent by Exim to Gmail never arrive. https://forum.linode.com/viewtopic.php?f=11&t=10768 |
Page 1 of 1 |
| Author: | fritzbogott [ Thu Jan 09, 2014 2:17 pm ] |
| Post subject: | Messages sent by Exim to Gmail never arrive. |
My PHP app is now sending mail via Exim just fine to everywhere but Gmail. Weirdly, if I send to Gmail via the command line, like Quote: echo "This is test 1." | mail -s Testing_1 redacted@gmail.com the message arrives promptly in the inbox. BUT When my PHP app sends a message to Gmail, their servers appear (based on the Exim logfile) to accept the message without error, but the message never arrives in the inbox (or spam folder). I have tried several different Gmail addresses with the same result. Here's an example of a happy-looking logfile message: 2014-01-09 11:52:54 1W1JmV-0000Eh-Cw => redacted@gmail.com R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [2607:f8b0:400d:c02::1a] X=TLS1.2:RSA_ARCFOUR_SHA1:128 DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com" But if I log into Gmail as redacted@gmail.com, there is no message in the inbox or in spam. Best I can tell, I have a valid SPF record that authorizes linode to send mail for my domain. Not sure what other sins I could be committing. Any ideas? |
|
| Author: | obs [ Thu Jan 09, 2014 3:44 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
Emails a tricky thing, even a single link can block a message getting through spam filters. (I had this problem with yahoo a couple of weeks ago). What's your server's FQDN Code: hostname -fand the email address you're sending from? |
|
| Author: | fritzbogott [ Thu Jan 09, 2014 5:22 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
hostname -f returns http://www.acceleratenorthfield.org The sender is baz@acceleratenorthfield.org In the process of answering that question, I checked the full message headers on one of the other, non-gmail recipients of one of the failed messages, and here is what I found: Quote: Received-SPF: fail (google.com: domain of www-data@acceleratenorthfield.org does not designate 2600:3c00::f03c:91ff:fedb:7934 as permitted sender) client-ip=2600:3c00::f03c:91ff:fedb:7934; Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of www-data@acceleratenorthfield.org does not designate 2600:3c00::f03c:91ff:fedb:7934 as permitted sender) I changed my SPF record from Quote: v=spf1 a mx ptr a:mail.acceleratenorthfield.org a:www.acceleratenorthfield.org a:acceleratenorthfield.org ip4:198.58.126.51 mx:mail.acceleratenorthfield.org -all to Quote: v=spf1 a mx ptr a:mail.acceleratenorthfield.org a:www.acceleratenorthfield.org a:acceleratenorthfield.org ip4:198.58.126.51 ipv6:2600:3c00::f03c:91ff:fedb:7934/64 -all mx:mail.acceleratenorthfield.org -all Now I no longer get the SPF fails in the message headers, but my messages still don't show up in my Gmail inboxes. [CORRECTION: I'm still getting the old fails, so the SPF record must not have propagated yet. I'll try again in a couple of hours.] |
|
| Author: | vonskippy [ Thu Jan 09, 2014 8:01 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
You can't have http:// in your FQDN hostname. It should be whatever your computer name is + the domain name (i.e. sparky.acceleratenorthfield.org) |
|
| Author: | fritzbogott [ Thu Jan 09, 2014 8:24 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
Yes, sorry, that was a typo. hostname -f returns www.acceleratenorthfield.org |
|
| Author: | fritzbogott [ Thu Jan 09, 2014 8:30 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
Headers from Gmail (these headers appear on messages for one of the CC recipients whose address is not at Gmail) now confirm the SPF record is correct and complete: Quote: Received-SPF: pass (google.com: domain of www-data@acceleratenorthfield.org designates 2600:3c00::f03c:91ff:fedb:7934 as permitted sender) client-ip=2600:3c00::f03c:91ff:fedb:7934; Authentication-Results: mx.google.com; spf=pass (google.com: domain of www-data@acceleratenorthfield.org designates 2600:3c00::f03c:91ff:fedb:7934 as permitted sender) smtp.mail=www-data@acceleratenorthfield.org but message still doesn't appear in Gmail inbox or spam folder. |
|
| Author: | vonskippy [ Thu Jan 09, 2014 8:36 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
does hostname return "www" ? hostname -f should return the hostname+domain You shouldn't name your server "www" |
|
| Author: | fritzbogott [ Thu Jan 09, 2014 8:55 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
hostname returns northfield hostname -f returns http://www.acceleratenorthfield.org /etc/hosts looks like this: Quote: 127.0.0.1 localhost 127.0.0.1 debian 198.58.126.51 http://www.acceleratenorthfield.org northfield # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters I'm guessing that's b0rked? Can you talk me through fixing it? |
|
| Author: | vonskippy [ Fri Jan 10, 2014 12:26 am ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
Here's a CentOS box I'm just getting started setting up the LAMP stack and Web Engine (sorry, it's on a DO droplet, it was the only free dev space I had, and this is a open source gratis project so money is more scarce then the need for Linodes most excellent network and support). nano /etc/hosts 127.0.0.1 localhost localhost.localdomain 192.241.224.196 midori.ipcopsupport.org midori nano /etc/sysconfig/network NETWORKING=yes HOSTNAME=midori.ipcopsupport.org hostname returns midori hostname -f returns midori.ipcopsupport.org |
|
| Author: | fritzbogott [ Fri Jan 10, 2014 9:52 am ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
Okay, thanks. I changed /etc/hosts to Quote: 127.0.0.1 localhost localhost.localdomain 198.58.126.51 northfield.acceleratenorthfield.org northfield # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters and rebooted. hostname responds northfield hostname -f responds northfield.acceleratenorthfield.org My web apps are all still running fine. I re-tested my email issue, and found no change: When I have PHP send a single message with multiple recipients, the non-Gmail accounts receive the message, and the Gmail accounts do not. No errors in the Apache logs. Anyone have ideas what to try next? |
|
| Author: | obs [ Fri Jan 10, 2014 2:18 pm ] |
| Post subject: | Re: Messages sent by Exim to Gmail never arrive. |
You've changed your hostname to northfield.acceleratenorthfield.org however your rDNS is pointing to www.acceleratenorthfield.org you should update this, you should also change -all to ~all in your SPF records -all tends to be a bit aggressive. Update your records give it 24 hours and try again. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|