Sender ID: Difference between revisions

Line 5: Line 5:
Sender ID is heavily based on [[Sender Policy Framework|SPF]], with only a few additions. These differences are discussed here.
Sender ID is heavily based on [[Sender Policy Framework|SPF]], with only a few additions. These differences are discussed here.


Sender ID tries to improve on a principle deficiency in SPF: which is that SPF does not verify the [[Email#Message_header|header]] addresses that indicates the sending party. Such header addresses are typically used to reply to emails and can be different from the envelope "MAIL FROM" address. However there are many similar email header fields that containg sending party information; therefore Sender ID defines in RFC 4407 a Purported Responsible Address (PRA) as well as a set of heuristic rules to establish this address from the many typical headers in an email.
Sender ID tries to improve on a principle deficiency in SPF: which is that SPF does not verify the [[Email#Message_header|header]] addresses that indicates the sending party. Such header addresses are typically displayed to the user and are used to reply to emails. Indeed such header addresses can be different from the address that SPF tries to verify, the "MAIL FROM" address.
 
However there are many similar email header fields that all contain sending party information; therefore Sender ID defines in RFC 4407 a Purported Responsible Address (PRA) as well as a set of heuristic rules to establish this address from the many typical headers in an email.


Syntactically, Sender ID is almost identical to SPF except that <tt>v=spf1</tt> is replaced with one of:
Syntactically, Sender ID is almost identical to SPF except that <tt>v=spf1</tt> is replaced with one of:
* <tt>spf2.0/mfrom</tt> - meaning to test the envelope sender address just like SPF.
* <tt>spf2.0/mfrom</tt> - meaning to verify the envelope sender address just like SPF.
* <tt>spf2.0/mfrom,pra</tt> or <tt>spf2.0/pra,mfrom</tt> - meaning to test both the envelope sender and the PRA.
* <tt>spf2.0/mfrom,pra</tt> or <tt>spf2.0/pra,mfrom</tt> - meaning to verify both the envelope sender and the PRA.
* <tt>spf2.0/pra</tt> - meaning to test only the PRA.
* <tt>spf2.0/pra</tt> - meaning to verify only the PRA.
 
Semantically, there are only two differences: Sender ID offers the feature of ''positional'' modifiers not supported in SPF. In practice, so far no ''positional'' modifier has been specified in any Sender ID implementation.
 
Except for this detail, <tt>spf2.0/mfrom</tt> is semantically
the same as SPF: ''mfrom'' stands for MAIL FROM, the checked
identity in SPF. Because SPF is more widely deployed than the later
proposed <tt>spf2.0/mfrom</tt>, publishers of sender policies
wishing to protect their address in MAIL FROM [[Return-Path]]s
generally prefer the classic <tt>v=spf1</tt> format.
 
Both <tt>spf2.0/mfrom,pra</tt> and <tt>spf2.0/pra,mfrom</tt>
have the same meaning. They introduce a policy that can be
used to check the ''mfrom'' as well as the ''pra'' identity.
 
Last but not least, <tt>spf2.0/pra</tt> introduces policies
checked only with the ''pra'' identity.  At this time it is
not specified how SPF's <tt><nowiki>%{h}</nowiki></tt> macro
for the HELO identity should be handled in ''pra'' checks,
Sender ID implementations could handle it as syntax error.


The Purported Responsible Address or ''pra'' is determined by a tricky evaluation of four mail header fields—''From'', ''Sender'', ''Resent-From'', ''Resent-Sender''—resulting either in one address—the ''pra''—or an error for illegal combinations as explained in RFC 2822. Simplified, the rules are: <tt>Sender</tt> beats <tt>From</tt>
The only other syntactical difference is that Sender ID offers the feature of ''positional'' modifiers not supported in SPF. In practice, so far no ''positional'' modifier has been specified in any Sender ID implementation.
and <tt>Resent-</tt>* beats <tt>Sender</tt>. Note that it's illegal to have more than one <tt>From</tt>-address without a single <tt>Sender</tt>-address.


This ''pra'' scheme has the theoretical advantage of dealing with addresses
in header fields that are often displayed by MUAs (Mail User Agents),
unlike SPF's Return-Path header field or ''mfrom'' in Sender ID terminology.
 
In practice, the ''pra'' scheme usually only offers protection when the email is legitimate, while offering no real protection in the case of spam or phishing.  The ''pra'' for most legitimate email will be either the familiar From: header field, or, in the case of mailing lists, the Sender: header field.  In the case of phishing or spam, however, the ''pra'' may be based on Resent-* header fields that are often not displayed to the user.
In practice, the ''pra'' scheme usually only offers protection when the email is legitimate, while offering no real protection in the case of spam or phishing.  The ''pra'' for most legitimate email will be either the familiar From: header field, or, in the case of mailing lists, the Sender: header field.  In the case of phishing or spam, however, the ''pra'' may be based on Resent-* header fields that are often not displayed to the user.
To be an effective anti-phishing tool, the MUA will need to be modified to display either the ''pra'' for Sender ID, or the Return-Path: header field for SPF.   
To be an effective anti-phishing tool, the MUA will need to be modified to display either the ''pra'' for Sender ID, or the Return-Path: header field for SPF.