Blocking forgeries and spam with SPF
A technique called "Sender Permitted From" (SPF) is being readied to attempt to make this sort of filtering possible. Those looking for details can find them in the draft RFC, but the core concept is simple: the DNS database for each domain should be augmented with information on which systems are authorized to originate email for that domain. This information is added as a DNS "text" record, so no changes to the DNS protocol are required.
So, for example, the DNS zone file for a domain which never, ever sends mail could be made SPF-compliant by adding one line:
example.com IN TXT "v=spf1 default=deny"
The "v=spf1" portion indicates that this is an SPF version 1 entry, and the rest says to deny all mail from that domain.
In most interesting cases, however, people will want to be able to send mail from a domain. So the SPF entry must be modified to tell mail recipients which systems can send mail for the domain. The simplest way of doing that, perhaps, is to simply state that the domain's MX servers can originate mail:
example.com IN TXT "v=spf1 mx default=deny"
There are, of course, many ways of specifying, in great detail, exactly which systems can legitimately send mail for the domain of interest; see the RFC for details.
None of this will work until receiving systems perform SPF tests, of course. One of the nice features of SPF is that the check can be done before the body of a message is received. If the message will be filtered, this filtering can be done at the SMTP level and a meaningful message returned to the sender - if, indeed, there is a real sender. Patches exist for a number of MTAs now; expect more as the SPF specification solidifies. There are also plans to add SPF support in other places; apparently SpamAssassin 2.70 will support it, for example.
SPF certainly will not solve the spam problem; spammers will just use
domains that lack SPF information, open relays, or throwaway domains of
their own. But it does place one more obstacle in their way, and will
doubtless reduce the flow somewhat. The real value of SPF may be in its
ability to make the forgery of email more difficult. In a fully
SPF-compliant world, Linux users would no longer be flooded with "virus
notifications" every time a new worm starts digging through peoples'
address books. A dedicated attacker would probably still be able to forge
email from a specific victim, but the days of easy, casual forgery would,
one hopes, be over. And that is worth something.
