RFC 6686

Resolution of the Sender Policy Framework (SPF) and Sender ID Experiments

๐Ÿ“… published July 2012, from ietf

๐Ÿ“œ RFC 6686: The Tea on SPF vs Sender ID ๐Ÿ’…

okay bestie, so this is RFC 6686, titled "Resolution of the Sender Policy Framework (SPF) and Sender ID Experiments" โœจ. It was written by M. Kucherawy from Cloudmark and published in July 2012 as an Informational doc, so it's sharing findings, not setting a standard ๐ŸŽ€. It has ISSN 2070-1721 ๐Ÿฆ‹. The title block doesn't list anything it obsoletes or updates, so it's just vibing on its own ๐ŸŒธ.

Abstract ๐ŸŒˆ

okay so back in 2006 the IETF dropped a whole suite of email authentication docs: SPF and Sender ID ๐Ÿ“ฌ. Both let you publish a policy in DNS saying which mail servers are allowed to send email for a domain ๐Ÿ’Œ. The worry was that these two would clash in some real-world situations and mess up delivery ๐Ÿ˜ฌ.

The IESG said all of these docs (RFC 4405, RFC 4406, RFC 4407, and RFC 4408) had to be published as Experimental RFCs. They also asked the community to watch how things were deployed and run for two years from publication, so everyone could figure out a good path forward ๐Ÿ”.

Fast forward six years, and there's now enough experience and evidence that the experiments can be called concluded ๐ŸŽ‰. This document is the receipts ๐Ÿงพโœจ.

Status of This Memo ๐Ÿง

This doc is not an Internet Standards Track spec. It's published just for info ๐Ÿ’–.

It's an IETF product ๐Ÿ’œ. It reflects IETF community consensus, got public review, and was approved by the Internet Engineering Steering Group (IESG). Not every IESG-approved doc is up for any level of Internet Standard, so check Section 2 of RFC 5741 for the deets ๐Ÿง.

For the current status, errata, and where to send feedback, go to http://www.rfc-editor.org/info/rfc6686 ๐Ÿ”—.

Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved ๐Ÿ›ก๏ธ.

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stood on the publication date. Please actually read them, because they spell out your rights and restrictions for this doc. Code Components pulled out of this doc must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as described in the Simplified BSD License ๐Ÿ“œ๐Ÿ’….

Table of Contents ๐Ÿ—‚๏ธ

1. Introduction ....................................................2
2. Definitions .....................................................3
3. Evidence of Deployment ..........................................3
   3.1. DNS Resource Record Types ..................................3
   3.2. Implementations ............................................5
   3.3. The SUBMITTER SMTP Extension ...............................6
4. Evidence of Differences .........................................7
5. Analysis ........................................................7
6. Conclusions .....................................................8
7. Security Considerations .........................................9
8. References ......................................................9
   8.1. Normative References .......................................9
   8.2. Informative References .....................................9
Appendix A. Background on the RRTYPE Issue ........................10
Appendix B. Acknowledgments .......................................11

1. Introduction โœจ

okay so in April 2006 the IETF published the [SPF] protocol and the Sender ID protocol ๐Ÿ“ฎ. Sender ID is made of three docs: [SUBMITTER], [SENDER-ID], and [PRA] ๐Ÿงฉ. Both protocols let you publish, through the Domain Name System, a policy that says which mail servers can send email on behalf of the domain you picked ๐Ÿ’Œ.

So the consensus didn't clearly favour one protocol over the other ๐Ÿคทโ€โ™€๏ธ. There was a lot of worry that they'd collide in some important operational situations and interfere with message delivery ๐Ÿ˜ญ. The IESG made all of these docs Experimental and asked the community to watch deployment and operation for two years after publication, so they could decide what to do next ๐Ÿ”.

Following the IESG's request to evaluate after a while, this document wraps up the experiments. It shares evidence about both deployment and the comparative effects of the two protocols, then ends with conclusions based on the data ๐Ÿ“Š๐ŸŽ€.

It's really important to know this doc does not do a direct technical comparison of the two protocols on correctness, weaknesses, or use case coverage ๐Ÿ™…โ€โ™€๏ธ. The email community already did that through its deployment choices ๐Ÿ’…. What this doc does is just observe what got deployed and supported since the protocols came out, and then draws conclusions from those observations ๐Ÿ‘€.

The data here is presumed to be a reasonably representative view of global deployment data ๐ŸŒ. Obviously nobody could survey all of that within a reasonable amount of time ๐Ÿ˜….

2. Definitions ๐Ÿ“š

The term "RRTYPE" refers to a Domain Name System ([DNS]) Resource Record (RR) type ๐Ÿงพ. Software always stores these internally as numbers, assigned according to the procedures in [DNS-IANA]. Assigned RRTYPEs also have names ๐Ÿท๏ธ. The two that matter for this work are the TXT RRTYPE (16) and the SPF RRTYPE (99) ๐Ÿ’œ.

3. Evidence of Deployment ๐Ÿ”Ž

This section shares the research done to figure out which parts of the two protocol suites are actually in use, plus related stuff like [DNS] support ๐Ÿง๐ŸŒธ.

3.1. DNS Resource Record Types ๐Ÿ“

Three big DNS surveys were run, looking for the two kinds of RRTYPEs that can hold SPF policy statements ๐Ÿ”. The surveys picked large sets of distinct domain names from email headers and logs over long periods. It didn't matter whether the DNS data for those domains included A, MX, or any other RRTYPEs ๐Ÿ™Œ. The nameservers for these domains were queried for both RRTYPEs that could be used for SPF and/or Sender ID ๐Ÿ“ฌ.

In the tables below, a reply only counted if it had a prefix showing the record was meant to be one of the forms defined in [SPF] or [SENDER-ID]. Full syntax validation of the replies was not done ๐Ÿ™ˆ. So the records had to start with either "v=spf1" or "spf2.0/", or they didn't count as replies ๐Ÿ’….

The tables are split into three parts: (a) the size of the sample set, (b) a report on RRTYPE use independent of content, and (c) a report on content independent of RRTYPE ๐ŸŽ€.

"SPF+TXT" counts the domains where both types were in use ๐Ÿ’–.

DNS Survey #1 (Cisco)

  +------------------+-----------+-------+
  | Domains queried  | 1,000,000 |   -   |
  +------------------+-----------+-------+
  | TXT replies      |   397,511 | 39.8% |
  | SPF replies      |     6,627 | <1.0% |
  | SPF+TXT replies  |     6,603 | <1.0% |
  +------------------+-----------+-------+
  | v=spf1 replies   |   395,659 | 39.6% |
  | spf2.0/* replies |     5,291 | <1.0% |
  +------------------+-----------+-------+

The domains were the top million as reported by Alexa, which tracks browser activity ๐ŸŒโœจ.

DNS Survey #2 (The Trusted Domain Project)

  +------------------+-----------+-------+
  | Domains queried  |   278,353 |   -   |
  +------------------+-----------+-------+
  | TXT replies      |   156,894 | 56.4% |
  | SPF replies      |     2,876 |  1.0% |
  | SPF+TXT replies  |     2,689 | <1.0% |
  +------------------+-----------+-------+
  | v=spf1 replies   |   149,985 | 53.9% |
  | spf2.0/* replies |     7,285 |  2.7% |
  +------------------+-----------+-------+

This survey picked its domains from data seen in email headers and from earlier SPF and Sender ID evaluations ๐Ÿ“จ. The data came from 23 reporting hosts across a handful of unrelated operators, over a period of 22 months ๐Ÿ—“๏ธ๐Ÿ’œ.

Here's the tea from this second survey: some domains answered RRTYPE 16 queries right away, but timed out waiting on RRTYPE 99 queries ๐Ÿ˜ณ. For example, 4,360 distinct domains (over 1.6%) gave some kind of result (a record or an error) for the TXT query in time N, while the SPF query ultimately failed after at least time 4N ๐Ÿ’€.

DNS Survey #3 (Hotmail)

  +------------------+-----------+-------+
  | Domains queried  |   100,000 |   -   |
  +------------------+-----------+-------+
  | TXT replies      |    46,221 | 46.2% |
  | SPF replies      |       954 | <1.0% |
  | SPF+TXT replies  |     1,383 |  1.4% |
  +------------------+-----------+-------+

Hotmail's domain set came from live email traffic at the moment the sample was pulled ๐Ÿ“ฌ. Only the RRTYPE part of their report is available ๐Ÿ™ƒ.

There was also a separate survey of queries for RRTYPE 16 and RRTYPE 99 records, done by watching nameserver traffic logs ๐Ÿ‘€. Only a few queries for RRTYPE 99 records ever came in, and they almost all came from one big email service provider that queried for both RRTYPEs ๐Ÿ“ˆ. Pretty much every other querying agent only ever asked for RRTYPE 16 ๐Ÿ˜Œ.

3.2. Implementations ๐Ÿ› ๏ธ

It's probably impossible to figure out from a survey which Mail Transfer Agents (MTAs) have SPF and/or Sender ID checking turned on at message ingress ๐Ÿ™ˆ. It doesn't show up in the reply to the EHLO command from extended [SMTP], for example ๐Ÿคทโ€โ™€๏ธ. So instead, the authors relied on web searches, and found the following ๐Ÿ”:

  • A website [SID-IMPL] dedicated to highlighting Sender ID implementations, last updated in late 2007, listed 13 commercial implementations ๐Ÿ’ผ. The authors assume these implement the Purported Responsible Address (PRA) checks ๐Ÿง . At least one of them is known to no longer be supported by its vendor ๐Ÿฅ€. There were no free open-source implementations listed ๐Ÿ˜ฌ.
  • The [OPENSPF] website keeps a list of SPF implementations ๐Ÿ“‹. When this document was being written, it listed six libraries, 22 MTAs with built-in SPF implementations, and loads of patches for MTAs and mail clients ๐Ÿงฉโœจ. The set was a mix of commercial and free open-source implementations ๐ŸŒˆ.

Part 1 of 3 is done, bestie ๐ŸŽ€. Part 2 starts with Section 3.3, so stay tuned ๐Ÿ’–๐Ÿซถ

3.3. The SUBMITTER SMTP Extension โœจ

okay so the PRA is basically the output of a heuristic that scans a message header and picks out the email address most likely responsible for getting that message into the mail stream ๐Ÿ“ฌ. The SUBMITTER extension to SMTP is a way to give the receiving MTA an early hint, as part of the MAIL command in an SMTP session, about what the PRA would turn out to be once the whole message arrives. Early hints are lowkey iconic ๐Ÿ”ฅ

When the researchers reviewed a bunch of MTAs that are in use or were recently in use, two of them, Santronics WinServer and McAfee MxLogic, had implementations of the SMTP SUBMITTER extension as part of the MTA service ๐Ÿ’…. That could help Sender ID along.

Nobody knows exactly how many SMTP clients implement the SUBMITTER SMTP extension ๐Ÿคทโ€โ™€๏ธ. The MTA logs show it's used a lot, but there's no way to tell if all that usage comes from several instances of the same SMTP client or from different client implementations.

Next, there was an active survey of MTAs you can reach over the Internet ๐ŸŒ. The MTAs were found by querying the MX and A resource records of a subset of all the domains that The Trusted Domain Project's data collection system had seen in the previous 20 months. Here's how it went:

SUBMITTER Survey (The Trusted Domain Project)

  +-------------------+-----------+-------+
  | MTAs selected     |   484,980 |   -   |
  | MTAs responding   |   371,779 | 76.7% |
  | SUBMITTER enabled |    17,425 |  4.7% |
  | MXLogic banner    |    16,914 |  4.6% |
  +-------------------+-----------+-------+
Heads up, bestie: the bottom two rows are percentages of the responding MTAs that have the stated property, NOT percentages of the selected MTAs ๐Ÿ™ˆ

Going by the SMTP banner shown on connection, the whole set of SUBMITTER-enabled MTAs was made up of the two from the review above plus a third one whose identity couldn't be positively determined ๐Ÿ•ต๏ธโ€โ™€๏ธ.

Out of those few responding MTAs that advertised the SUBMITTER SMTP extension, 97% were different instances of one MTA. The service running that MTA (MXLogic, a division of McAfee) said that about 11% of all the SMTP sessions it observed involved SMTP clients that use the SUBMITTER extension. Just to be clear, that's about 11% of the clients of the 4.6% of responding MTAs in the survey. Tiny slice, very dramatic ๐Ÿ’€


4. Evidence of Differences ๐Ÿฆ‹

separate surveys from Hotmail and The Trusted Domain Project compared the cases where the PRA (which Sender ID uses) and the RFC5321.MailFrom address (which SPF uses) came out different ๐Ÿ‘€. The results showed that at least 50% of the time, the two addresses were the same. Past that point, the percentage swung a lot from one sampling location to the next, because each place gets a totally different kind of mail stream ๐Ÿ“Š.

The Trusted Domain Project also analyzed about 150,000 messages. In more than 95% of those cases, Sender ID and SPF reached the same conclusion about the message, meaning both returned a "pass" or both returned a "fail" ๐Ÿ’–. Quick reality check though: this doesn't tell you whether a "fail" meant spam or other abusive mail was caught, or whether a "pass" means the mail is good. It's only a measure of how often the two protocols agreed. The dataset couldn't say more about the cases where the answers didn't match ๐Ÿค”.

Hotmail ran a second analysis of the same kind and found the two protocols gave the same result about 80% of the time, across billions of messages ๐ŸŒธ.

Anecdotally, the email-receiving community hasn't noticed these differences in conclusions causing any big operational problems ๐Ÿซถ.


5. Analysis ๐Ÿ”

It's been six years since the Experimental RFCs were published, and given that plus the evidence in the earlier sections, the following analysis looks solid ๐Ÿ’…:

  1. There has not been substantial adoption of the RRTYPE 99 (SPF) DNS resource record. In all the large-scale surveys done for this work, fewer than 2% of responding domains published RRTYPE 99 records, and almost no clients asked for them ๐Ÿ˜ญ.
  2. Of the DNS resource records that were retrieved, fewer than 3% specifically asked for processing of messages using the PRA algorithm, which is a core part of Sender ID ๐Ÿงš.
  3. Although the two protocols often used different email address fields as the subject being evaluated, no collected data showed any substantial operational benefit, in terms of better accuracy, from using one mechanism over the other โš–๏ธ.
  4. A review of known implementations shows significant support for both protocols, though there were more implementations supporting SPF than Sender ID. The SPF implementations also showed better upkeep and more current interest than the Sender ID ones ๐ŸŒˆ.
  5. A survey of running MTAs shows fewer than 5% of them advertised the SUBMITTER extension, which is a Sender ID enabler. Only three implementations of it were found ๐Ÿ“.
  6. There are still obstacles to deploying protocols that use DNS RRTYPEs other than the most common ones. These include firewalls and DNS servers that block or discard requests for unknown RRTYPEs. On top of that, few if any web-based DNS configuration tools offer support for RRTYPE 99 records ๐Ÿ™„.

6. Conclusions ๐Ÿ‘‘

Based on the analysis in the previous section, these conclusions are supported โœจ:

  1. The experiments comprising the series of RFCs that define the SUBMITTER SMTP extension (RFC4405), the Sender ID mechanism (RFC4406), the Purported Responsible Address algorithm (RFC4407), and SPF (RFC4408), should be considered concluded ๐ŸŽ€.
  2. The absence of significant adoption of the RRTYPE 99 DNS Resource Record suggests that it hasn't attracted enough support to be useful ๐Ÿฅ€.
  3. Unavailability of software implementing the protocols was not a gating factor in choosing which ones to use ๐Ÿ› ๏ธ.
  4. The absence of significant adoption of the [SUBMITTER] extension, [SENDER-ID], and [PRA] indicates there isn't a strong community deploying and using these protocols ๐Ÿ˜”.
  5. [SPF] has widespread implementation and deployment, comparable to that of many Standards Track protocols. Iconic behavior from SPF, honestly ๐Ÿ’œ.

Appendix A is offered as a cautionary review of the problems that affected the process of developing SPF and Sender ID in terms of their use of the DNS. Please read it, it's the tea โ˜•.


7. Security Considerations ๐Ÿ”

This document contains information for the community, akin to an implementation report, and does not introduce any new security concerns. Phew ๐Ÿ˜Œ


8. References ๐Ÿ“š

8.1. Normative References

[DNS] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987.

[PRA] Lyon, J., "Purported Responsible Address in E-Mail Messages", RFC 4407, April 2006.

[SENDER-ID] Lyon, J. and M. Wong, "Sender ID: Authenticating E-Mail", RFC 4406, April 2006.

[SPF] Wong, M. and W. Schlitt, "Sender Policy Framework (SPF) for Authorizing Use of Domains in E-Mail, Version 1", RFC 4408, April 2006.

[SUBMITTER] Allman, E. and H. Katz, "SMTP Service Extension for Indicating the Responsible Submitter of an E-Mail Message", RFC 4405, April 2006.

8.2. Informative References

[DNS-EXPAND] IAB, Faltstrom, P., Austein, R., and P. Koch, "Design Choices When Expanding the DNS", RFC 5507, April 2009.

[DNS-IANA] Eastlake 3rd, D., "Domain Name System (DNS) IANA Considerations", BCP 42, RFC 6195, March 2011.

[OPENSPF] "Sender Policy Framework: Project Overview", <http://www.openspf.net>.

[SID-IMPL] "Sender ID Framework Industry Support and Solutions", October 2007, <http://www.microsoft.com/mscorp/safety/technologies/senderid/support.mspx>.

[SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, October 2008.

Appendix A. Background on the RRTYPE Issue ๐ŸŽ€

okay so SPF was originally cooked up by a community of devs outside the IETF ๐Ÿงš the plan was to bring it to the IETF for standardization once it was mature and ready for the Standards process ๐Ÿ’…

back when SPF was first being built, nobody was seriously thinking about getting an RRTYPE allocated for it ๐Ÿ™ˆ partly bc doing that had really high barriers to entry. so by the time it reached the IETF for development and publication, there was already a big, growing installed base running SPF on TXT RRs ๐Ÿ“œ eventually, the DNS experts in the community pushed for a new RRTYPE, insisting it was the preferred path for storing policy data in the DNS. iconic of them honestly ๐Ÿ‘‘

later on, after RRTYPE 99 was assigned (long after IESG approval of [SPF], fr) there was a plan to gradually move everyone from RRTYPE 16 over to RRTYPE 99 ๐Ÿฆ‹ and the plan flopped, for four main reasons:

  1. people hesitated to switch bc existing nameservers (and DNS-aware firewalls, too!) would drop or reject queries for unknown RRTYPEs ๐Ÿ’€ (see Section 3 for the evidence). so a successful rollout of a new RRTYPE depends on widespread adoption of updated nameservers and resolver functions ๐Ÿซถ
  2. a lot of DNS provisioning tools (like web interfaces for controlling DNS zone data) were, and still are, super lethargic about adding support for new RRTYPEs ๐Ÿ˜ญ
  3. the massive deployed base was already on RRTYPE 16 and it was working just fine, so there was major inertia ๐ŸŒธ
  4. [SPF] itself had a faulty transition plan ๐Ÿ˜ฌ probably bc a requirement to write one got added super late. the text says:
An SPF-compliant domain name SHOULD have SPF records of both RR types.  A compliant domain name MUST have a record of at least one type.

which means both types can claim to be fully compliant while totally failing to interoperate ๐Ÿ’€ the document was published without proper IETF review, so nobody caught it before publication. big oops ๐Ÿ“

it's likely this will happen again if the bar for creating new RRTYPEs, even for experimental development purposes, doesn't get lowered, and if handling of unknown RRTYPEs in software doesn't become more graceful ๐ŸŒˆ encouraging support for new RRTYPEs in DNS record provisioning tools is also important, no cap โœจ

thankfully, in the meantime, the requirements for new RRTYPE assignments got less strict (see [DNS-IANA]) โญ and the publication of [DNS-EXPAND] gave some useful guidance too ๐ŸŽ€ still, there's a common perception that adding new types of data to the DNS will hit resistance because of the lack of appropriate software support ๐Ÿฅบ

the DNS experts in the community will absolutely point at DNS servers and firewalls that mistreat queries for unknown RRTYPEs, and at overly simplistic provisioning tools, and say they're broken as a way of answering these concerns ๐Ÿ’… and honestly? that's undoubtedly correct ๐Ÿ’ฏ but they're among us and will likely be for some time, so this needs to be considered as new protocols and IETF procedures get developed ๐Ÿซถ

Appendix B. Acknowledgments ๐Ÿ’–

the following folks provided operational data that helped build the evidence above, and they are absolutely iconic ๐Ÿ‘‘

  • Cisco: contributed data about observed Sender ID and SPF records in the DNS for a large number of domains (DNS survey #1) ๐Ÿ“
  • Hotmail: contributed data about the difference between RFC5321.MailFrom and RFC5322.From domains across large mail volumes, and a survey of DNS replies observed in response to incoming mail traffic (DNS survey #3) ๐Ÿ“ฌ
  • John Levine: conducted a survey of DNS server logs to evaluate SPF-related query traffic ๐Ÿงš
  • McAfee: provided details about their SUBMITTER implementation and usage statistics ๐Ÿ›ก๏ธ
  • Santronics: contributed data about the use of the SUBMITTER extension in aggregate SMTP client traffic ๐ŸŒˆ
  • The Trusted Domain Project: contributed data about the difference between Sender ID and SPF results, conducted one of the detailed TXT/SPF RRTYPE surveys including collecting timing data (DNS survey #2), and conducted the MTA SUBMITTER survey ๐Ÿฆ‹

the author would also like to thank the following for their contributions to the development of the text in this document: Dave Crocker, Scott Kitterman, Barry Leiba, John Leslie, John Levine, Hector Santos, and Alessandro Vesely ๐Ÿซถ๐ŸŽ€


Author's Address ๐Ÿ“ฎ

Murray S. Kucherawy
Cloudmark
128 King St., 2nd Floor
San Francisco, CA  94107
USA

Phone: +1 415 946 3800
EMail: superuser@gmail.com
๐Ÿ“ฆ where this page comes from