spf-discuss
[Top] [All Lists]

Re: implementation question

2004-01-14 07:45:22
Meng Weng Wong wrote:
On Tue, Jan 13, 2004 at 03:01:47PM -0800, Justin Mason wrote:
| | BTW does Mail::SPF::Query support a way to differentiate between the
| second and third return types?
|
Yes, version 1.97 will do:

   my ($result, $smtp_comment, $header_comment, $spf_record) = $query->result();

   if ($result eq "unknown" and not $spf_record) { # record does not exist }
   if ($result eq "unknown" and     $spf_record) { # record does exist, 
resolution = unknown }

Have you put any thought toward my idea for the RFC to encode sender helo, envelope sender, current IP, and matching mechanism into the comment of Received-SPF in a well-defined way?

header = 'Received-SPF:' result [ FWS '(' [FWS] comment [FWS] ')' ] CRLF

FWS = [*WSP CRLF] 1*WSP

result = 'pass' / 'fail' / 'error' / 'unknown'
         / unknown-declarations

unknown-declarations = 'unknown' *( FWS declaration )

comment = 'h=' smtp-sender-helo FWS 'e=' envelope-sender
          FWS 'ip=' current-ip FWS 'm=' match-mechanism
          [ FWS 'v=' version-string ] [ FWS comment-string ]

smtp-sender-helo = dot-atom-text
    ;dot-atom-text is defined in RFC 2822 section 3.2.4
    ;hostname given by SMTP client at HELO or EHLO command

envelope-sender = dot-atom-text '@' dot-atom-text
    ;dot-atom-text is defined in RFC 2822 section 3.2.4
    ;reverse-path given by SMTP client at MAIL FROM command

current-domain = ( IPV4Address / IPV6Address )
    ;IP address of current SMTP client

IPV4Address = 1*3DIGIT 3( '.' 1*3DIGIT )

IPV6Address = *4HEXDIG 7( ':' *4HEXDIG )

match-mechanism = mechanism / 'none'
    ;mechanism format specified in section 3.2
    ;MUST be the mechanism (and argument) part of the SPF record
    ; which was matched to cause the result, copied exactly from
    ; the actual SPF record.
    ;MUST be 'none' if no match was made for any reason
    ;  (ie, error, no SPF information given)

version-string = 1*DIGIT *( '.' 1*DIGIT )
    ;The SPF version from the SPF record.
    ; I don't know if this is useful, but we can include it, so why not.

comment-string = *( ccontent [FWS] )
    ;ccontent is defined in RFC 2822 section 3.2.3
    ;SHOULD include further information not already provided
    ;  (ie, description of error message in the case of errors)
    ;MAY include a human-readable explanation of why the current result
    ;  was decided

--
Jim Ramsay

-------
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.4.txt
To unsubscribe, change your address, or temporarily deactivate your subscription, please go to http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡