Email

Don’t let your email be labeled as spam with SPF.

Monday, November 24th, 2008

What the heck is an SPF? 

SPF stands for Sender Policy Framework. It allows domain owners to specify which mail servers they use to send mail from their domain. The policy is specified by adding a txt record containing the SPF policy to your domains nameservers. So for SPF to work the receiving mail server needs to be setup to check the sender’s domains policy.

Just because your domain doesn’t have an SPF policy doesn’t mean your email will automatically be labeled as spam, But it can help you get out of the spam folder. An emails header without a SPF policy would look like this: 

Received-SPF: neutral (google.com: 210.19.84.47 is neither permitted nor denied by best guess record for domain of www-data@gnix.us) client-ip=210.19.84.47;

Authentication-Results: mx.google.com; spf=neutral (google.com: 210.19.84.47 is neither permitted nor denied by best guess record for domain of greg[at]gnix.us) smtp.mail=greg[@]gnix.us

Once you add the policy to your nameservers, your headers will look like this: 

Received-SPF: pass (google.com: domain of greg[at]gnix.us designates 210.19.84.47 as permitted sender) client-ip= 210.19.84.47; Authentication-Results: mx.google.com; spf=pass (google.com: domain of greg[at]gnix.us designates 210.19.84.47 as permitted sender) smtp.mail=greg[at]gnix.us

Of course there are a lot of other factors that spam filters use to eliminate spam, but adding an SPF policy is an easy way to add trust between email senders and spam filters.

On SPF’s website, they have a wizard to generate your TXT record. Just input your domain and answer a few questions about which mail servers will be used to send emails from your domain.

SPF isn’t the only protocol that tries to validate the sender of an email. And out of the three big webmail companies (Google, Yahoo, Microsoft) only Google checks for SPF records. Here’s a summary on what the others use.

Microsoft

Sender ID - Is confusingly similar to SPF. they both validate email sender addresses and both use dns records to publish their policies. I won’t get into the differences, but they are different.

Yahoo

Domain Keys Identified Mail (DKIM) - Signs the email with a key, and then the recieving mail server verifies key from a record in the sender’s domain nameservers.

SPF - They don’t check for SPF records, but they do have a SPF policy in their dns records.

Google

SPF, DKIM

If your serious about your email getting through spam filters, you should look into DKIM. Unfortunately DKIM requires a lot more effort to get working, but is probably the most supported.

Posted in Email | No Comments »