<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>The Tlog - a technology blog &#187; SPF</title>
	<atom:link href="http://www.thetlog.net/tag/spf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thetlog.net</link>
	<description></description>
	<lastBuildDate>Fri, 27 Nov 2009 15:18:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.5/pt/</creativeCommons:license>		<item>
		<title>What if everyone used SPF?</title>
		<link>http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/</link>
		<comments>http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 15:07:25 +0000</pubDate>
		<dc:creator>Pedro Timóteo</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Unix / Linux / *BSD software]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.thetlog.net/?p=528</guid>
		<description><![CDATA[To end my SPF series, I&#8217;m going to consider the following question: what if everyone used SPF? Would it &#8220;end&#8221; spam? The answer is, of course, &#8220;no, but&#8230;&#8221;. But, first, let&#8217;s understand the question itself. In &#8220;everyone used&#8221;, what does &#8220;used&#8221; mean? If you followed my previous posts on this subject, you&#8217;ll know that there [...]


Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/' rel='bookmark' title='Permanent Link: SPF, part 1: what is SPF, and how to fight spam with it'>SPF, part 1: what is SPF, and how to fight spam with it</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/' rel='bookmark' title='Permanent Link: SPF, part 2: how to configure SPF for a domain'>SPF, part 2: how to configure SPF for a domain</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>To end my <a href="http://www.thetlog.net/tag/spf/">SPF series</a>, I&#8217;m going to consider the following question: what if everyone used SPF? Would it &#8220;end&#8221; spam?</p>
<p>The answer is, of course, &#8220;no, but&#8230;&#8221;. But, first, let&#8217;s understand the question itself.</p>
<p>In &#8220;everyone used&#8221;, what does &#8220;used&#8221; mean? If you followed my previous posts on this subject, you&#8217;ll know that there are two distinct parts: having an SPF record for your domain, and configuring your SMTP server to reject email purporting to be from an address with a valid SPF record, when it doesn&#8217;t come from an authorized server.</p>
<p>Let&#8217;s assume that the question implies <i>both</i>.</p>
<p>So, if every legit organization had an SPF record <i>and</i> enforced SPF in their incoming email servers, what would it mean?</p>
<p>It still depends on what was meant by &#8220;enforced&#8221;. For instance, as it is now, it makes sense to <i>use</i> an SPF record (and reject mail coming from an unauthorized server, as I mentioned before), but not to <i>require</i> an SPF record, as most of the world is still not using it. </p>
<p>If that changed, though&#8230; it would certainly make things a lot easier for the &#8220;good guys&#8221;. Think about it: what does SPF prevent? The <i>faking</i> of sender addresses. Who ever does that? Spammers. Therefore, who has ever a reason <i>not</i> to use an SPF record? Spammers. In a world where every legitimate organization used SPF, having such a record wouldn&#8217;t mean that the sender wasn&#8217;t a spammer, but <i>not</i> having one would certainly mean that he <i>was</i>. Ergo, reject any mail from a domain without an SPF record, even <i>before</i> verifying whether the origin server is authorized for that domain.</p>
<p>Of course, spammers would adapt, and have SPF records for their own domains. But <i>never again would they be able to fake a sender address</i>. They would never again be able to efficiently pretend to be your internet provider, or your bank, or Facebook, or anything like that. They would have to use their own domains in the sender address&#8230; and they don&#8217;t exactly tend to look &#8220;nice&#8221;; besides, they&#8217;re not what your ISP or your bank would use.</p>
<p>A world with SPF would mean a world where you could actually trust the &#8220;From:&#8221; field. Can you imagine such a thing?</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.thetlog.net">The Tlog - a technology blog</a></strong> 

<p>Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/' rel='bookmark' title='Permanent Link: SPF, part 1: what is SPF, and how to fight spam with it'>SPF, part 1: what is SPF, and how to fight spam with it</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/' rel='bookmark' title='Permanent Link: SPF, part 2: how to configure SPF for a domain'>SPF, part 2: how to configure SPF for a domain</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Postfix&#8217;s log file when using SPF: what it looks like</title>
		<link>http://www.thetlog.net/2009/11/26/postfixs-log-file-when-using-spf-what-it-looks-like/</link>
		<comments>http://www.thetlog.net/2009/11/26/postfixs-log-file-when-using-spf-what-it-looks-like/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 17:05:02 +0000</pubDate>
		<dc:creator>Pedro Timóteo</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Unix / Linux / *BSD software]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.thetlog.net/?p=512</guid>
		<description><![CDATA[In the previous post, I wrote, at the end of the recipe: restart Postfix. Check your logs to see if everything is working properly. But what to look for? Here are a few real life examples, from my own Postfix log file: Nov 26 07:07:27 sh postfix/policy-spf[10685]: : SPF none (No applicable sender policy available): [...]


Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/' rel='bookmark' title='Permanent Link: SPF, part 2: how to configure SPF for a domain'>SPF, part 2: how to configure SPF for a domain</a></li>
<li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/">previous post</a>, I wrote, at the end of the recipe:</p>
<blockquote><p>restart Postfix. Check your logs to see if everything is working properly.</p></blockquote>
<p>But what to look for? Here are a few real life examples, from my own Postfix log file:</p>
<p><code>Nov 26 07:07:27 sh postfix/policy-spf[10685]: : SPF none (No applicable sender policy available): Envelope-from: bounce-1492514-406278644@lyris.diskeepermail.com<br />
Nov 26 07:07:27 sh postfix/policy-spf[10685]: handler sender_policy_framework: is decisive.<br />
Nov 26 07:07:27 sh postfix/policy-spf[10685]: : Policy action=PREPEND Received-SPF: none (lyris.diskeepermail.com: No applicable sender policy available) receiver=sh.dehumanizer.com; identity=mailfrom; envelope-from="bounce-1492514-406278644@lyris.diskeepermail.com"; helo=lyris.diskeepermail.com; client-ip=68.177.217.241</code></p>
<p>This (note the &#8220;SPF none&#8221;) is what will happen for most emails: <i>no SPF record exists</i>. Unfortunately, most of the world is still not using it. The mail passes this check, since it&#8217;s not a good idea to enforce SPF yet (but may fail one of the remaining ones, such as an RBL list or SpamAssassin.)</p>
<p><code>Nov 24 16:19:56 sh postfix/policy-spf[32619]: : SPF pass (Mechanism 'ip4:209.128.72.240/28' matched): Envelope-from: promotions@iambic.com<br />
Nov 24 16:19:56 sh postfix/policy-spf[32619]: handler sender_policy_framework: is decisive.<br />
Nov 24 16:19:56 sh postfix/policy-spf[32619]: : Policy action=PREPEND Received-SPF: pass (iambic.com: 209.128.72.242 is authorized to use 'promotions@iambic.com' in 'mfrom' identity (mechanism 'ip4:209.128.72.240/28' matched)) receiver=sh.dehumanizer.com; identity=mailfrom; envelope-from="promotions@iambic.com"; helo=ns1.iambic.com; client-ip=209.128.72.242</code></p>
<p>Above is an example of a legitimate mail from a sender with a properly configured SPF record. The record says &#8220;here are the server(s) that send email from this domain&#8221;, and the origin server is indeed one of those. The email passes (note the &#8220;SPF pass&#8221;), and, if you&#8217;re using SpamAssassin, it takes that into account, meaning that the mail is <i>less</i> likely to be considered spam. (See? That&#8217;s a <i>great</i> reason to have an SPF record for your domain!)</p>
<p>Finally, the following:</p>
<p><code>Nov 24 19:57:13 sh postfix/policy-spf[1210]: : SPF fail (Mechanism '-all' matched): Envelope-from: pedro@dehumanizer.com<br />
Nov 24 19:57:13 sh postfix/policy-spf[1210]: handler sender_policy_framework: is decisive.<br />
Nov 24 19:57:13 sh postfix/policy-spf[1210]: : Policy action=550 Please see http://www.openspf.org/Why?s=mfrom;id=pedro%40dehumanizer.com;ip=204.212.122.254;r=sh.dehumanizer.com</code></p>
<p>is a good demonstration of the usefulness of SPF. You&#8217;ll notice that the mail pretends to come from <i>my own</i> domain, but since I have configured the SPF record for it, Postfix is able to see that the origin server is not authorized to send mail from that domain. And, since my record ends with &#8220;<code>-all</code>&#8220;, it means that the record is to be &#8220;taken seriously&#8221;, so the mail is refused then and there (note the &#8220;SPF fail&#8221;), even before checking RBL lists and the like.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.thetlog.net">The Tlog - a technology blog</a></strong> 

<p>Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/' rel='bookmark' title='Permanent Link: SPF, part 2: how to configure SPF for a domain'>SPF, part 2: how to configure SPF for a domain</a></li>
<li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thetlog.net/2009/11/26/postfixs-log-file-when-using-spf-what-it-looks-like/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPF, part 3: configuring Postfix to check SPF records when receiving mail</title>
		<link>http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/</link>
		<comments>http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 11:57:06 +0000</pubDate>
		<dc:creator>Pedro Timóteo</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Unix / Linux / *BSD software]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.thetlog.net/?p=497</guid>
		<description><![CDATA[(for extra fun, read parts 1 and 2 first.) Now that you know how to configure an SPF record for your domain(s), the natural next step, if you administer an email server, is to start checking SPF records for mails you receive. Now, spammers are infamous for not respecting rules, not &#8220;playing nice&#8221;, so, you [...]


Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
<li><a href='http://www.thetlog.net/2009/11/26/postfixs-log-file-when-using-spf-what-it-looks-like/' rel='bookmark' title='Permanent Link: Postfix&#8217;s log file when using SPF: what it looks like'>Postfix&#8217;s log file when using SPF: what it looks like</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/' rel='bookmark' title='Permanent Link: SPF, part 1: what is SPF, and how to fight spam with it'>SPF, part 1: what is SPF, and how to fight spam with it</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><i>(for extra fun, read parts <a href="http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/">1</a> and <a href="http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/">2</a> first.)</i></p>
<p>Now that you know how to configure an SPF record for your domain(s), the natural next step, if you administer an email server, is to start checking SPF records for mails you <i>receive</i>.</p>
<p>Now, spammers are infamous for not respecting rules, not &#8220;playing nice&#8221;, so, you might ask, what makes me think they&#8217;ll set up SPF records for their domains, which would be kind of self-defeating? The obvious answer is that SPF doesn&#8217;t depend on the spammers&#8217; collaboration. Since legitimate email senders use SPF to tell the world which servers they use to send email, it prevents others &#8212; such as the aforementioned spammers &#8212; from faking sender addresses to pretend they&#8217;re from those senders / domains.</p>
<p>To put it simply: if there&#8217;s an SPF record for the &#8220;gmail.com&#8221; domain, then you can &#8212; and should &#8212; reject mail purporting to be from something@gmail.com that doesn&#8217;t come from the servers listed in that record. In other words, anyone who fakes a @gmail.com address can&#8217;t fool your server, assuming you have it configured to use SPF.</p>
<p>Now, how to do that? There are many ways, of course, depending on the email server you use. The simple recipe below uses <i>postfix-policyd-spf-perl</i> to make Postfix reject mail from domains with properly configured SPF records, when the mail comes from an unauthorized server (that is, one not listed on the record.) This assumes you already have Postfix up and running.</p>
<ul>
<li>install <a href="http://www.openspf.org/Software">postfix-policyd-spf-perl</a>. In Ubuntu, just do an <code>apt-get install postfix-policyd-spf-perl</code> .</li>
<li>add this line to /etc/postfix/main.cf:<br />
<code>spf-policyd_time_limit = 3600s</code></li>
<li>add the following to /etc/postfix/master.cf:
<pre>policy-spf  unix  -       n       n       -       -       spawn
     user=nobody argv=/usr/bin/policyd-spf</pre>
<p> (change the path of policyd-spf if it&#8217;s installed somewhere else; that&#8217;s where the Ubuntu package puts it.)</li>
<li>in /etc/postfix/main.cf, find the <i>smtpd_recipient_restrictions</i> section, and, immediately after permit_mynetworks (and permit_sasl_authenticated, if you&#8217;re using that), add:<br />
<code>check_policy_service unix:private/policy-spf</code></li>
<li>restart Postfix. Check your logs to <a href="http://www.thetlog.net/2009/11/26/postfixs-log-file-when-using-spf-what-it-looks-like/">see if everything is working properly</a>.</li>
</ul>
<p>Now, remember when in part 2 I mentioned a lesser-known reason for configuring the SPF record for your domain? It&#8217;s this: it&#8217;ll stop a lot of <i>incoming</i> spam. These days, a lot of spam email pretends to be from <i>you</i> (that is, it uses your email address as both the &#8220;From:&#8221; and &#8220;To:&#8221;), or at least from <i>your domain</i> (e.g. administrator@yourdomain, manager@yourdomain, and so on.) I don&#8217;t know why spammers do that, but apparently it works, or else they wouldn&#8217;t do it (maybe victims get confused and think the email comes from someone in their company, or maybe webmail services tend &#8212; or at least did so once &#8212; to trust the user&#8217;s own address, I don&#8217;t know.) Well, if you have SPF for your domain <i>and</i> your email server checks SPF records for incoming mail, then spam messages such as these will be always rejected, even when other methods of stopping spam (RBL lists, SpamAssassin, etc.) fail. Never again will you receive emails pretending to be from your own address.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.thetlog.net">The Tlog - a technology blog</a></strong> 

<p>Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
<li><a href='http://www.thetlog.net/2009/11/26/postfixs-log-file-when-using-spf-what-it-looks-like/' rel='bookmark' title='Permanent Link: Postfix&#8217;s log file when using SPF: what it looks like'>Postfix&#8217;s log file when using SPF: what it looks like</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/' rel='bookmark' title='Permanent Link: SPF, part 1: what is SPF, and how to fight spam with it'>SPF, part 1: what is SPF, and how to fight spam with it</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPF, part 2: how to configure SPF for a domain</title>
		<link>http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/</link>
		<comments>http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:42:16 +0000</pubDate>
		<dc:creator>Pedro Timóteo</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Unix / Linux / *BSD software]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.thetlog.net/?p=454</guid>
		<description><![CDATA[(this is part 2 of a series. You should read part 1 first, and after this post you should read part 3.) Suppose you have a domain and send email from it (in fact, even if you don&#8217;t, this is still a good idea; more about that later). How to configure SPF for it? Easy: [...]


Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
<li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/' rel='bookmark' title='Permanent Link: SPF, part 1: what is SPF, and how to fight spam with it'>SPF, part 1: what is SPF, and how to fight spam with it</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><i>(this is part 2 of a series. You should read <a href="http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/">part 1</a> first, and after this post you should read <a href="http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/">part 3</a>.)</i></p>
<p>Suppose you have a domain and send email from it (in fact, even if you don&#8217;t, this is still a good idea; more about that later). How to configure SPF for it?</p>
<p>Easy: you simply add a specially formatted <i>TXT record</i> to the domain. (Where? If you have your own public DNS servers, you&#8217;ll have to edit the zone file<sup>1</sup>; else, if your domain (note: the domain, not the web server) is maintained by a registrar or ISP, it should provide for you an administration interface where you are able to add and edit records.)</p>
<p><a href="http://www.openspf.org/">OpenSPF.org</a> provides a &#8220;wizard&#8221; to build an SPF TXT record for your domain, and I suggest you try it out. However, I think I can give you an example that is mostly self-explanatory, which is the SPF TXT record for my own dehumanizer.com domain:</p>
<p><code>v=spf1 a a:mail.dehumanizer.com a:sh.dehumanizer.com a:sh2.dehumanizer.com mx include:netcabo.pt -all</code></p>
<p><small>(In fact, that record is kind of overkill; I could remove about half of it and everything would still work. But it&#8217;s useful as an example.)</small></p>
<p><code>v=spf1</code> means it&#8217;s an SPF record.</p>
<p><code>a</code> means that &#8220;dehumanizer.com&#8221; (the host that that name resolves to) is authorized for that domain. I could remove that one, as the following one takes care of it (it&#8217;s the same host).</p>
<p><code>a:mail.dehumanizer.com</code> means that mail.dehumanizer.com is authorized. The same for the following two (sh.dehumanizer.com and sh2.dehumanizer.com; the latter doesn&#8217;t exist anymore, so I could remove it.)</p>
<p><code>mx</code> means that the mx records for the domain are also authorized. They&#8217;re currently mail.dehumanizer.com and sh.dehumanizer.com, which were previously taken care of, so I could remove this one as well.</p>
<p><code>include:netcabo.pt</code> means that whatever is authorized for the netcabo.pt domain is also authorized here. This is from when I used my ISP as a smart host, some time ago; as I no longer do that, I could remove this one too.</p>
<p>Finally, <code>-all</code> means, in effect, that, yes, I&#8217;m serious about this, all of the authorized servers for this domain <i>are</i> listed, which means that any <i>other</i> hosts are unauthorized, and emails coming from them with a &#8220;From:&#8221; of this domain should be <i>refused</i>. You should configure this part only after successfully testing your configuration. Until then, there&#8217;s a &#8220;soft fail&#8221; option, <code>~all</code>, which means the same, but adds &#8220;but don&#8217;t take it seriously.&#8221;</p>
<p>If you&#8217;ve been paying attention, you&#8217;ve probably already noticed that I could replace that record with the much simpler:</p>
<p><code>v=spf1 a:mail.dehumanizer.com a:sh.dehumanizer.com -all</code></p>
<p>for the exact same results (and I&#8217;ll probably do that a bit later today.)</p>
<p>What&#8217;s the benefit of this? Well, as you are telling the world &#8220;mails from my domain come only from my servers&#8221;, the rest of the world will more easily be able to kill mails pretending to be from your domain&#8230; while also &#8220;respecting&#8221; legit mail more. In effect, you tell other servers &#8220;here&#8217;s how you can tell which mails from my domain are genuine&#8221;. Many ISPs and filtering systems (such as SpamAssassin) take advantage of a properly configured SPF record to raise the &#8220;trustworthiness&#8221; of emails coming from the correct servers (while lowering it, or even simply refusing to accept the mail, for messages coming from a server not listed in the SPF record.)</p>
<p>There&#8217;s also another (lesser-known) advantage of using SPF for your domain, when you also receive email <i>to</i> it. But that&#8217;s for part 3, where I&#8217;ll explain how to configure Postfix to look at SPF records when receiving mail&#8230;</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.thetlog.net">The Tlog - a technology blog</a></strong> <ol class="footnotes"><li id="footnote_0_454" class="footnote">note: put the entire record contents between quotes; e.g. for Bind, use <code>dehumanizer.com. IN TXT "v=spf1 a a:mail.dehumanizer.com a:sh.dehumanizer.com a:sh2.dehumanizer.com mx include:netcabo.pt -all"</code> (that&#8217;s a single line) </li></ol>

<p>Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
<li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/' rel='bookmark' title='Permanent Link: SPF, part 1: what is SPF, and how to fight spam with it'>SPF, part 1: what is SPF, and how to fight spam with it</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPF, part 1: what is SPF, and how to fight spam with it</title>
		<link>http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/</link>
		<comments>http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:12:51 +0000</pubDate>
		<dc:creator>Pedro Timóteo</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Unix / Linux / *BSD software]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.thetlog.net/?p=449</guid>
		<description><![CDATA[(Note: this is the first of a series of posts related to email servers and spam. This one is more of a theoretical intro; future posts will delve into the gory details.) (Later note: here are parts 2 and 3.) You may have heard of SPF (Sender Policy Framework), but what is it? To put [...]


Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
<li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/' rel='bookmark' title='Permanent Link: SPF, part 2: how to configure SPF for a domain'>SPF, part 2: how to configure SPF for a domain</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><i>(Note: this is the first of a series of posts related to email servers and spam. This one is more of a theoretical intro; future posts will delve into the gory details.)</i></p>
<p><i>(Later note: here are parts <a href="http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/">2</a> and <a href="http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/">3</a>.)</i></p>
<p>You may have heard of SPF (<a href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">Sender Policy Framework</a>), but what is it? To put it simply, it&#8217;s a way for domain owners to say to the world: <i>&#8220;these servers are the only ones that send email from this domain.&#8221;</i></p>
<p>What is the point? Well, if you have been using email for any amount of time, you&#8217;ve probably noticed that a lot of spam <i>fakes</i> its sender address (the &#8220;From:&#8221; field). In fact, you may have found yourself that it&#8217;s incredibly easy to do; most SMTP servers simply accept <i>any</i> sender, as long as either 1) the <i>destination</i> address is theirs, or 2) your IP address is on their client list. In other words, a company&#8217;s email server accepts mail to the company&#8217;s employees, and also allows those employees to use it to send mail to the rest of the world.</p>
<p>SPF, when correctly configured by everyone involved, prevents that.</p>
<p>&#8220;Everyone involved&#8221; is, of course, an utopic scenario. Still, there is no reason for you <i>not</i> to do your part, whether you are a domain owner who sends email from that domain, the administrator of an email server that receives mail to its users, or both.</p>
<p>More to come&#8230;</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.thetlog.net">The Tlog - a technology blog</a></strong> 

<p>Related posts:<ol><li><a href='http://www.thetlog.net/2009/11/27/what-if-everyone-used-spf/' rel='bookmark' title='Permanent Link: What if everyone used SPF?'>What if everyone used SPF?</a></li>
<li><a href='http://www.thetlog.net/2009/11/26/spf-part-3-configuring-postfix-to-check-spf-records-when-receiving-mail/' rel='bookmark' title='Permanent Link: SPF, part 3: configuring Postfix to check SPF records when receiving mail'>SPF, part 3: configuring Postfix to check SPF records when receiving mail</a></li>
<li><a href='http://www.thetlog.net/2009/11/25/spf-part-2-how-to-configure-spf-for-a-domain/' rel='bookmark' title='Permanent Link: SPF, part 2: how to configure SPF for a domain'>SPF, part 2: how to configure SPF for a domain</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thetlog.net/2009/11/25/spf-part-1-what-is-spf-and-how-to-fight-spam-with-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
