I am configuring my linode server to send mail from my webapp to users. I could use GoogleApps, but the 500/day limit it too restrictive, hence I'm attempting to set it up myself.
I set up Exim4 on my server using these instructions provided by linode. All good. I tested sending an email to my gmail/yahoo using this command on the server:
$ echo "This is a test from myapp." | mail -s Testing email@example.com
I do receive the email in my Gmail inbox (not marked as spam), and also in my Ymail (marked as spam). Wanting to not be marked as spam, I inspected the header of the email that was sent.
I see these lines (me obfuscating with XXX) in the gmail header:
Received-SPF: neutral (google.com: 69.XXX.XXX.XXX is neither permitted nor denied by best guess record for domain of firstname.lastname@example.org) client-ip=69.XXX.XXX.XXX; Authentication-Results: mx.google.com; spf=neutral (google.com: 69.XXX.XXX.XXX is neither permitted nor denied by best guess record for domain of email@example.com) firstname.lastname@example.org
This is the header of the email that Yahoo receives:
Received-SPF: none (mta1192.mail.mud.yahoo.com: domain of email@example.com does not designate permitted sender hosts)
So it seems like the SPF record was not set (which it wasn't). Since I own the domain, I went to insert this SPF text into my records:
To be exact, I set
1) the subdomain mail.myapp.com to an A record pointing to my IP.
2) a TXT record for "@" as "v=spf1 ip4:69.XXX.XXX.XXX a a:mail.myapp.com ~all"
This seems like all I should have to do appropriately set the ips/domain names as a SPF record. However, when testing gmail/yahoo again it continues to give me the same "Neutral" status on Gmail, and spam status on Yahoo.
I am suspecting that the Google Gmail / Yahoo Ymail servers must be caching my DNS information on their end, and I'll continue to get this "neutral/spam" status until the myapp.com DNS entry is flushed from their cache. Does anyone know if they do cache this info, and how long it typically takes before the SPF information is picked up? Anything else I might have done wrong or should check?