spf marco定义,mark下

https://www.ietf.org/rfc/rfc4408.txt

 

 

8.1.  Macro Definitions

   Many mechanisms and modifiers perform macro expansion on part of the
   term.

   domain-spec      = macro-string domain-end
   domain-end       = ( "." toplabel [ "." ] ) / macro-expand

   toplabel         = ( *alphanum ALPHA *alphanum ) /
                      ( 1*alphanum "-" *( alphanum / "-" ) alphanum )
                      ; LDH rule plus additional TLD restrictions
                      ; (see [RFC3696], Section 2)
   alphanum         = ALPHA / DIGIT

   explain-string   = *( macro-string / SP )

   macro-string     = *( macro-expand / macro-literal )
   macro-expand     = ( "%{" macro-letter transformers *delimiter "}" )
                      / "%%" / "%_" / "%-"
   macro-literal    = %x21-24 / %x26-7E
                      ; visible characters except "%"
   macro-letter     = "s" / "l" / "o" / "d" / "i" / "p" / "h" /
                      "c" / "r" / "t"
   transformers     = *DIGIT [ "r" ]
   delimiter        = "." / "-" / "+" / "," / "/" / "_" / "="

   A literal "%" is expressed by "%%".

      "%_" expands to a single " " space.
      "%-" expands to a URL-encoded space, viz., "%20".

   The following macro letters are expanded in term arguments:

      s = <sender>
      l = local-part of <sender>
      o = domain of <sender>
      d = <domain>
      i = <ip>
      p = the validated domain name of <ip>
      v = the string "in-addr" if <ip> is ipv4, or "ip6" if <ip> is ipv6
      h = HELO/EHLO domain








Wong & Schlitt                Experimental                     [Page 27]

RFC 4408             Sender Policy Framework (SPF)            April 2006


   The following macro letters are allowed only in "exp" text:

      c = SMTP client IP (easily readable format)
      r = domain name of host performing the check
      t = current timestamp

   A '%' character not followed by a '{', '%', '-', or '_' character is
   a syntax error.  So

      -exists:%(ir).sbl.spamhaus.example.org

   is incorrect and will cause check_host() to return a "PermError".
   Instead, say

      -exists:%{ir}.sbl.spamhaus.example.org

   Optional transformers are the following:

      *DIGIT = zero or more digits
      'r'    = reverse value, splitting on dots by default
posted @ 2023-02-28 17:22  sane_gao  阅读(16)  评论(0编辑  收藏  举报