"Meng" == Meng Weng Wong <mengwong(_at_)dumbo(_dot_)pobox(_dot_)com>
writes:
Meng> So I'm going to put the "Resent/Sender/From" rules into the
Meng> SPF draft
Ok, can I propose a different (but similar) set of rules for
determining the header sender. It is, for example, slightly odd to
take the first of multiple from addresses. If the message has
multiple from addresses, and no sender address, then it is malformed
according to the RFCs.
This is my first cut on an algorithm to extract the header sender.
Note that my algorithm can explicitly return 'unknown' for malformed
messages, so the spec would have to specify how to handle this case.
Definitions
A resent header is defined to be any of Resent-Date, Resent-From,
Resent-Sender, Resent-To, Resent-CC, Resent-Bcc or Resent-Message-ID
Procedure
If the message contains no resent headers, use algorithm A. If the
message contains one or more resent headers, use algorithm B.
Algorthm A (message has not been resent)
1. If the message contains exactly one well-formed Sender header, the
address in that header is the header sender. Return this address.
If the Sender header is malformed, or there is more than one Sender
header, the message is malformed. Return 'unknown'. If there is
no Sender header, proceed to step 2.
Note: a well-formed Sender header must contain exactly one address.
It cannot be empty, and cannot contain multiple addresses.
2. If the message contains exactly one From header, and that header
contains exactly one address, this address is the header sender.
Return this address. Otherwise the message is malformed. Return
'unknown'.
Algorithm B (message has been resent)
1. Locate the first block of Resent headers (a suggested algorithm for
doing this is included below)
2. If this block contains exactly one well-formed Resent-Sender
header, the address in that header is the header sender. Return
this address. If the Resent-Sender header is malformed, or there
is more than one Resent-Sender header in the block, the message is
malformed. Return 'unknown'. If there is no Resent-Sender header
in the block, proceed to step 2.
Note: a well-formed Resent-Sender header must contain exactly one
address. It cannot be empty, and cannot contain multiple
addresses.
3. If the block contains exactly one Resent-From header, and that
header contains exactly one address, this address is the header
sender. Return this address. Otherwise the message is malformed.
Return 'unknown'.
Suggested algorithm for identifying the first resent block:
Locate the first resent header in the message. Collect all headers
starting with (and including) this one, until a Received header is
encountered, or until there are no more headers. Take the collected
headers, and discard from them all headers other than resent headers.
What remains is the first resent block.
-roy
-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/draft-mengwong-spf-02.9.5.txt
Wiki: http://spfwiki.infinitepenguins.net/pmwiki.php/SenderPermittedFrom/
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to
http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡