RFC4408 日本語訳
4408 Sender Policy Framework (SPF) for Authorizing Use of Domains inE-Mail, Version 1. M. Wong, W. Schlitt. April 2006. (Format: TXT=105009 bytes) (Status: EXPERIMENTAL)
プログラムでの自動翻訳です。
英語原文
Network Working Group M. Wong Request for Comments: 4408 W. Schlitt Category: Experimental April 2006
Network Working Group M. Wong Request for Comments: 4408 W. Schlitt Category: Experimental April 2006
Sender Policy Framework (SPF) for Authorizing Use of Domains in E-Mail, Version 1
Sender Policy Framework (SPF) for Authorizing Use of Domains in E-Mail, Version 1
Status of This Memo
Status of This Memo
This memo defines an Experimental Protocol for the Internet community. It does not specify an Internet standard of any kind. Discussion and suggestions for improvement are requested. Distribution of this memo is unlimited.
This memo defines an Experimental Protocol for the Internet community. It does not specify an Internet standard of any kind. Discussion and suggestions for improvement are requested. Distribution of this memo is unlimited.
Copyright Notice
Copyright Notice
Copyright (C) The Internet Society (2006).
Copyright (C) The Internet Society (2006).
IESG Note
IESG Note
The following documents (RFC 4405, RFC 4406, RFC 4407, and RFC 4408) are published simultaneously as Experimental RFCs, although there is no general technical consensus and efforts to reconcile the two approaches have failed. As such, these documents have not received full IETF review and are published "AS-IS" to document the different approaches as they were considered in the MARID working group.
The following documents (RFC 4405, RFC 4406, RFC 4407, and RFC 4408) are published simultaneously as Experimental RFCs, although there is no general technical consensus and efforts to reconcile the two approaches have failed. As such, these documents have not received full IETF review and are published "AS-IS" to document the different approaches as they were considered in the MARID working group.
The IESG takes no position about which approach is to be preferred and cautions the reader that there are serious open issues for each approach and concerns about using them in tandem. The IESG believes that documenting the different approaches does less harm than not documenting them.
The IESG takes no position about which approach is to be preferred and cautions the reader that there are serious open issues for each approach and concerns about using them in tandem. The IESG believes that documenting the different approaches does less harm than not documenting them.
Note that the Sender ID experiment may use DNS records that may have been created for the current SPF experiment or earlier versions in this set of experiments. Depending on the content of the record, this may mean that Sender-ID heuristics would be applied incorrectly to a message. Depending on the actions associated by the recipient with those heuristics, the message may not be delivered or may be discarded on receipt.
Note that the Sender ID experiment may use DNS records that may have been created for the current SPF experiment or earlier versions in this set of experiments. Depending on the content of the record, this may mean that Sender-ID heuristics would be applied incorrectly to a message. Depending on the actions associated by the recipient with those heuristics, the message may not be delivered or may be discarded on receipt.
Participants relying on Sender ID experiment DNS records are warned that they may lose valid messages in this set of circumstances. aParticipants publishing SPF experiment DNS records should consider the advice given in section 3.4 of RFC 4406 and may wish to publish both v=spf1 and spf2.0 records to avoid the conflict.
Participants relying on Sender ID experiment DNS records are warned that they may lose valid messages in this set of circumstances. aParticipants publishing SPF experiment DNS records should consider the advice given in section 3.4 of RFC 4406 and may wish to publish both v=spf1 and spf2.0 records to avoid the conflict.
Wong & Schlitt Experimental [Page 1] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 1] RFC 4408 Sender Policy Framework (SPF) April 2006
Participants in the Sender-ID experiment need to be aware that the way Resent-* header fields are used will result in failure to receive legitimate email when interacting with standards-compliant systems (specifically automatic forwarders which comply with the standards by not adding Resent-* headers, and systems which comply with RFC 822 but have not yet implemented RFC 2822 Resent-* semantics). It would be inappropriate to advance Sender-ID on the standards track without resolving this interoperability problem.
Participants in the Sender-ID experiment need to be aware that the way Resent-* header fields are used will result in failure to receive legitimate email when interacting with standards-compliant systems (specifically automatic forwarders which comply with the standards by not adding Resent-* headers, and systems which comply with RFC 822 but have not yet implemented RFC 2822 Resent-* semantics). It would be inappropriate to advance Sender-ID on the standards track without resolving this interoperability problem.
The community is invited to observe the success or failure of the two approaches during the two years following publication, in order that a community consensus can be reached in the future.
The community is invited to observe the success or failure of the two approaches during the two years following publication, in order that a community consensus can be reached in the future.
Abstract
Abstract
E-mail on the Internet can be forged in a number of ways. In particular, existing protocols place no restriction on what a sending host can use as the reverse-path of a message or the domain given on the SMTP HELO/EHLO commands. This document describes version 1 of the Sender Policy Framework (SPF) protocol, whereby a domain may explicitly authorize the hosts that are allowed to use its domain name, and a receiving host may check such authorization.
E-mail on the Internet can be forged in a number of ways. In particular, existing protocols place no restriction on what a sending host can use as the reverse-path of a message or the domain given on the SMTP HELO/EHLO commands. This document describes version 1 of the Sender Policy Framework (SPF) protocol, whereby a domain may explicitly authorize the hosts that are allowed to use its domain name, and a receiving host may check such authorization.
Table of Contents
Table of Contents
1. Introduction ....................................................4 1.1. Protocol Status ............................................4 1.2. Terminology ................................................5 2. Operation .......................................................5 2.1. The HELO Identity ..........................................5 2.2. The MAIL FROM Identity .....................................5 2.3. Publishing Authorization ...................................6 2.4. Checking Authorization .....................................6 2.5. Interpreting the Result ....................................7 2.5.1. None ................................................8 2.5.2. Neutral .............................................8 2.5.3. Pass ................................................8 2.5.4. Fail ................................................8 2.5.5. SoftFail ............................................9 2.5.6. TempError ...........................................9 2.5.7. PermError ...........................................9 3. SPF Records .....................................................9 3.1. Publishing ................................................10 3.1.1. DNS Resource Record Types ..........................10 3.1.2. Multiple DNS Records ...............................11 3.1.3. Multiple Strings in a Single DNS record ............11 3.1.4. Record Size ........................................11 3.1.5. Wildcard Records ...................................11
1. Introduction ....................................................4 1.1. Protocol Status ............................................4 1.2. Terminology ................................................5 2. Operation .......................................................5 2.1. The HELO Identity ..........................................5 2.2. The MAIL FROM Identity .....................................5 2.3. Publishing Authorization ...................................6 2.4. Checking Authorization .....................................6 2.5. Interpreting the Result ....................................7 2.5.1. None ................................................8 2.5.2. Neutral .............................................8 2.5.3. Pass ................................................8 2.5.4. Fail ................................................8 2.5.5. SoftFail ............................................9 2.5.6. TempError ...........................................9 2.5.7. PermError ...........................................9 3. SPF Records .....................................................9 3.1. Publishing ................................................10 3.1.1. DNS Resource Record Types ..........................10 3.1.2. Multiple DNS Records ...............................11 3.1.3. Multiple Strings in a Single DNS record ............11 3.1.4. Record Size ........................................11 3.1.5. Wildcard Records ...................................11
Wong & Schlitt Experimental [Page 2] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 2] RFC 4408 Sender Policy Framework (SPF) April 2006
4. The check_host() Function ......................................12 4.1. Arguments .................................................12 4.2. Results ...................................................13 4.3. Initial Processing ........................................13 4.4. Record Lookup .............................................13 4.5. Selecting Records .........................................13 4.6. Record Evaluation .........................................14 4.6.1. Term Evaluation ....................................14 4.6.2. Mechanisms .........................................15 4.6.3. Modifiers ..........................................15 4.7. Default Result ............................................16 4.8. Domain Specification ......................................16 5. Mechanism Definitions ..........................................16 5.1. "all" .....................................................17 5.2. "include" .................................................18 5.3. "a" .......................................................19 5.4. "mx" ......................................................20 5.5. "ptr" .....................................................20 5.6. "ip4" and "ip6" ...........................................21 5.7. "exists" ..................................................22 6. Modifier Definitions ...........................................22 6.1. redirect: Redirected Query ................................23 6.2. exp: Explanation ..........................................23 7. The Received-SPF Header Field ..................................25 8. Macros .........................................................27 8.1. Macro Definitions .........................................27 8.2. Expansion Examples ........................................30 9. Implications ...................................................31 9.1. Sending Domains ...........................................31 9.2. Mailing Lists .............................................32 9.3. Forwarding Services and Aliases ...........................32 9.4. Mail Services .............................................34 9.5. MTA Relays ................................................34 10. Security Considerations .......................................35 10.1. Processing Limits ........................................35 10.2. SPF-Authorized E-Mail May Contain Other False Identities ...............................................37 10.3. Spoofed DNS and IP Data ..................................37 10.4. Cross-User Forgery .......................................37 10.5. Untrusted Information Sources ............................38 10.6. Privacy Exposure .........................................38 11. Contributors and Acknowledgements .............................38 12. IANA Considerations ...........................................39 12.1. The SPF DNS Record Type ..................................39 12.2. The Received-SPF Mail Header Field .......................39 13. References ....................................................39 13.1. Normative References .....................................39 13.2. Informative References ...................................40
4. The check_host() Function ......................................12 4.1. Arguments .................................................12 4.2. Results ...................................................13 4.3. Initial Processing ........................................13 4.4. Record Lookup .............................................13 4.5. Selecting Records .........................................13 4.6. Record Evaluation .........................................14 4.6.1. Term Evaluation ....................................14 4.6.2. Mechanisms .........................................15 4.6.3. Modifiers ..........................................15 4.7. Default Result ............................................16 4.8. Domain Specification ......................................16 5. Mechanism Definitions ..........................................16 5.1. "all" .....................................................17 5.2. "include" .................................................18 5.3. "a" .......................................................19 5.4. "mx" ......................................................20 5.5. "ptr" .....................................................20 5.6. "ip4" and "ip6" ...........................................21 5.7. "exists" ..................................................22 6. Modifier Definitions ...........................................22 6.1. redirect: Redirected Query ................................23 6.2. exp: Explanation ..........................................23 7. The Received-SPF Header Field ..................................25 8. Macros .........................................................27 8.1. Macro Definitions .........................................27 8.2. Expansion Examples ........................................30 9. Implications ...................................................31 9.1. Sending Domains ...........................................31 9.2. Mailing Lists .............................................32 9.3. Forwarding Services and Aliases ...........................32 9.4. Mail Services .............................................34 9.5. MTA Relays ................................................34 10. Security Considerations .......................................35 10.1. Processing Limits ........................................35 10.2. SPF-Authorized E-Mail May Contain Other False Identities ...............................................37 10.3. Spoofed DNS and IP Data ..................................37 10.4. Cross-User Forgery .......................................37 10.5. Untrusted Information Sources ............................38 10.6. Privacy Exposure .........................................38 11. Contributors and Acknowledgements .............................38 12. IANA Considerations ...........................................39 12.1. The SPF DNS Record Type ..................................39 12.2. The Received-SPF Mail Header Field .......................39 13. References ....................................................39 13.1. Normative References .....................................39 13.2. Informative References ...................................40
Wong & Schlitt Experimental [Page 3] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 3] RFC 4408 Sender Policy Framework (SPF) April 2006
Appendix A. Collected ABNF .......................................42 Appendix B. Extended Examples ....................................44 B.1. Simple Examples ..........................................44 B.2. Multiple Domain Example ..................................45 B.3. DNSBL Style Example ......................................46 B.4. Multiple Requirements Example ............................46
Appendix A. Collected ABNF .......................................42 Appendix B. Extended Examples ....................................44 B.1. Simple Examples ..........................................44 B.2. Multiple Domain Example ..................................45 B.3. DNSBL Style Example ......................................46 B.4. Multiple Requirements Example ............................46
1. Introduction
1. Introduction
The current E-Mail infrastructure has the property that any host injecting mail into the mail system can identify itself as any domain name it wants. Hosts can do this at a variety of levels: in particular, the session, the envelope, and the mail headers. Although this feature is desirable in some circumstances, it is a major obstacle to reducing Unsolicited Bulk E-Mail (UBE, aka spam). Furthermore, many domain name holders are understandably concerned about the ease with which other entities may make use of their domain names, often with malicious intent.
The current E-Mail infrastructure has the property that any host injecting mail into the mail system can identify itself as any domain name it wants. Hosts can do this at a variety of levels: in particular, the session, the envelope, and the mail headers. Although this feature is desirable in some circumstances, it is a major obstacle to reducing Unsolicited Bulk E-Mail (UBE, aka spam). Furthermore, many domain name holders are understandably concerned about the ease with which other entities may make use of their domain names, often with malicious intent.
This document defines a protocol by which domain owners may authorize hosts to use their domain name in the "MAIL FROM" or "HELO" identity. Compliant domain holders publish Sender Policy Framework (SPF) records specifying which hosts are permitted to use their names, and compliant mail receivers use the published SPF records to test the authorization of sending Mail Transfer Agents (MTAs) using a given "HELO" or "MAIL FROM" identity during a mail transaction.
This document defines a protocol by which domain owners may authorize hosts to use their domain name in the "MAIL FROM" or "HELO" identity. Compliant domain holders publish Sender Policy Framework (SPF) records specifying which hosts are permitted to use their names, and compliant mail receivers use the published SPF records to test the authorization of sending Mail Transfer Agents (MTAs) using a given "HELO" or "MAIL FROM" identity during a mail transaction.
An additional benefit to mail receivers is that after the use of an identity is verified, local policy decisions about the mail can be made based on the sender's domain, rather than the host's IP address. This is advantageous because reputation of domain names is likely to be more accurate than reputation of host IP addresses. Furthermore, if a claimed identity fails verification, local policy can take stronger action against such E-Mail, such as rejecting it.
An additional benefit to mail receivers is that after the use of an identity is verified, local policy decisions about the mail can be made based on the sender's domain, rather than the host's IP address. This is advantageous because reputation of domain names is likely to be more accurate than reputation of host IP addresses. Furthermore, if a claimed identity fails verification, local policy can take stronger action against such E-Mail, such as rejecting it.
1.1. Protocol Status
1.1. Protocol Status
SPF has been in development since the summer of 2003 and has seen deployment beyond the developers beginning in December 2003. The design of SPF slowly evolved until the spring of 2004 and has since stabilized. There have been quite a number of forms of SPF, some written up as documents, some submitted as Internet Drafts, and many discussed and debated in development forums.
SPF has been in development since the summer of 2003 and has seen deployment beyond the developers beginning in December 2003. The design of SPF slowly evolved until the spring of 2004 and has since stabilized. There have been quite a number of forms of SPF, some written up as documents, some submitted as Internet Drafts, and many discussed and debated in development forums.
The goal of this document is to clearly document the protocol defined by earlier draft specifications of SPF as used in existing implementations. This conception of SPF is sometimes called "SPF Classic". It is understood that particular implementations and
The goal of this document is to clearly document the protocol defined by earlier draft specifications of SPF as used in existing implementations. This conception of SPF is sometimes called "SPF Classic". It is understood that particular implementations and
Wong & Schlitt Experimental [Page 4] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 4] RFC 4408 Sender Policy Framework (SPF) April 2006
deployments may differ from, and build upon, this work. It is hoped that we have nonetheless captured the common understanding of SPF version 1.
deployments may differ from, and build upon, this work. It is hoped that we have nonetheless captured the common understanding of SPF version 1.
1.2. Terminology
1.2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
This document is concerned with the portion of a mail message commonly called "envelope sender", "return path", "reverse path", "bounce address", "2821 FROM", or "MAIL FROM". Since these terms are either not well defined or often used casually, this document defines the "MAIL FROM" identity in Section 2.2. Note that other terms that may superficially look like the common terms, such as "reverse-path", are used only with the defined meanings from normative documents.
This document is concerned with the portion of a mail message commonly called "envelope sender", "return path", "reverse path", "bounce address", "2821 FROM", or "MAIL FROM". Since these terms are either not well defined or often used casually, this document defines the "MAIL FROM" identity in Section 2.2. Note that other terms that may superficially look like the common terms, such as "reverse-path", are used only with the defined meanings from normative documents.
2. Operation
2. Operation
2.1. The HELO Identity
2.1. The HELO Identity
The "HELO" identity derives from either the SMTP HELO or EHLO command (see [RFC2821]). These commands supply the SMTP client (sending host) for the SMTP session. Note that requirements for the domain presented in the EHLO or HELO command are not always clear to the sending party, and SPF clients must be prepared for the "HELO" identity to be malformed or an IP address literal. At the time of this writing, many legitimate E-Mails are delivered with invalid HELO domains.
The "HELO" identity derives from either the SMTP HELO or EHLO command (see [RFC2821]). These commands supply the SMTP client (sending host) for the SMTP session. Note that requirements for the domain presented in the EHLO or HELO command are not always clear to the sending party, and SPF clients must be prepared for the "HELO" identity to be malformed or an IP address literal. At the time of this writing, many legitimate E-Mails are delivered with invalid HELO domains.
It is RECOMMENDED that SPF clients not only check the "MAIL FROM" identity, but also separately check the "HELO" identity by applying the check_host() function (Section 4) to the "HELO" identity as the <sender>.
It is RECOMMENDED that SPF clients not only check the "MAIL FROM" identity, but also separately check the "HELO" identity by applying the check_host() function (Section 4) to the "HELO" identity as the <sender>.
2.2. The MAIL FROM Identity
2.2. The MAIL FROM Identity
The "MAIL FROM" identity derives from the SMTP MAIL command (see [RFC2821]). This command supplies the "reverse-path" for a message, which generally consists of the sender mailbox, and is the mailbox to which notification messages are to be sent if there are problems delivering the message.
The "MAIL FROM" identity derives from the SMTP MAIL command (see [RFC2821]). This command supplies the "reverse-path" for a message, which generally consists of the sender mailbox, and is the mailbox to which notification messages are to be sent if there are problems delivering the message.
[RFC2821] allows the reverse-path to be null (see Section 4.5.5 in RFC 2821). In this case, there is no explicit sender mailbox, and such a message can be assumed to be a notification message from the mail system itself. When the reverse-path is null, this document
[RFC2821] allows the reverse-path to be null (see Section 4.5.5 in RFC 2821). In this case, there is no explicit sender mailbox, and such a message can be assumed to be a notification message from the mail system itself. When the reverse-path is null, this document
Wong & Schlitt Experimental [Page 5] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 5] RFC 4408 Sender Policy Framework (SPF) April 2006
defines the "MAIL FROM" identity to be the mailbox composed of the localpart "postmaster" and the "HELO" identity (which may or may not have been checked separately before).
defines the "MAIL FROM" identity to be the mailbox composed of the localpart "postmaster" and the "HELO" identity (which may or may not have been checked separately before).
SPF clients MUST check the "MAIL FROM" identity. SPF clients check the "MAIL FROM" identity by applying the check_host() function to the "MAIL FROM" identity as the <sender>.
SPF clients MUST check the "MAIL FROM" identity. SPF clients check the "MAIL FROM" identity by applying the check_host() function to the "MAIL FROM" identity as the <sender>.
2.3. Publishing Authorization
2.3. Publishing Authorization
An SPF-compliant domain MUST publish a valid SPF record as described in Section 3. This record authorizes the use of the domain name in the "HELO" and "MAIL FROM" identities by the MTAs it specifies.
An SPF-compliant domain MUST publish a valid SPF record as described in Section 3. This record authorizes the use of the domain name in the "HELO" and "MAIL FROM" identities by the MTAs it specifies.
If domain owners choose to publish SPF records, it is RECOMMENDED that they end in "-all", or redirect to other records that do, so that a definitive determination of authorization can be made.
If domain owners choose to publish SPF records, it is RECOMMENDED that they end in "-all", or redirect to other records that do, so that a definitive determination of authorization can be made.
Domain holders may publish SPF records that explicitly authorize no hosts if mail should never originate using that domain.
Domain holders may publish SPF records that explicitly authorize no hosts if mail should never originate using that domain.
When changing SPF records, care must be taken to ensure that there is a transition period so that the old policy remains valid until all legitimate E-Mail has been checked.
When changing SPF records, care must be taken to ensure that there is a transition period so that the old policy remains valid until all legitimate E-Mail has been checked.
2.4. Checking Authorization
2.4. Checking Authorization
A mail receiver can perform a set of SPF checks for each mail message it receives. An SPF check tests the authorization of a client host to emit mail with a given identity. Typically, such checks are done by a receiving MTA, but can be performed elsewhere in the mail processing chain so long as the required information is available and reliable. At least the "MAIL FROM" identity MUST be checked, but it is RECOMMENDED that the "HELO" identity also be checked beforehand.
A mail receiver can perform a set of SPF checks for each mail message it receives. An SPF check tests the authorization of a client host to emit mail with a given identity. Typically, such checks are done by a receiving MTA, but can be performed elsewhere in the mail processing chain so long as the required information is available and reliable. At least the "MAIL FROM" identity MUST be checked, but it is RECOMMENDED that the "HELO" identity also be checked beforehand.
Without explicit approval of the domain owner, checking other identities against SPF version 1 records is NOT RECOMMENDED because there are cases that are known to give incorrect results. For example, almost all mailing lists rewrite the "MAIL FROM" identity (see Section 9.2), but some do not change any other identities in the message. The scenario described in Section 9.3, sub-section 1.2, is another example. Documents that define other identities should define the method for explicit approval.
Without explicit approval of the domain owner, checking other identities against SPF version 1 records is NOT RECOMMENDED because there are cases that are known to give incorrect results. For example, almost all mailing lists rewrite the "MAIL FROM" identity (see Section 9.2), but some do not change any other identities in the message. The scenario described in Section 9.3, sub-section 1.2, is another example. Documents that define other identities should define the method for explicit approval.
It is possible that mail receivers will use the SPF check as part of a larger set of tests on incoming mail. The results of other tests may influence whether or not a particular SPF check is performed. For example, finding the sending host's IP address on a local white
It is possible that mail receivers will use the SPF check as part of a larger set of tests on incoming mail. The results of other tests may influence whether or not a particular SPF check is performed. For example, finding the sending host's IP address on a local white
Wong & Schlitt Experimental [Page 6] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 6] RFC 4408 Sender Policy Framework (SPF) April 2006
list may cause all other tests to be skipped and all mail from that host to be accepted.
list may cause all other tests to be skipped and all mail from that host to be accepted.
When a mail receiver decides to perform an SPF check, it MUST use a correctly-implemented check_host() function (Section 4) evaluated with the correct parameters. Although the test as a whole is optional, once it has been decided to perform a test it must be performed as specified so that the correct semantics are preserved between publisher and receiver.
When a mail receiver decides to perform an SPF check, it MUST use a correctly-implemented check_host() function (Section 4) evaluated with the correct parameters. Although the test as a whole is optional, once it has been decided to perform a test it must be performed as specified so that the correct semantics are preserved between publisher and receiver.
To make the test, the mail receiver MUST evaluate the check_host() function with the arguments set as follows:
To make the test, the mail receiver MUST evaluate the check_host() function with the arguments set as follows:
<ip> - the IP address of the SMTP client that is emitting the mail, either IPv4 or IPv6.
<ip> - the IP address of the SMTP client that is emitting the mail, either IPv4 or IPv6.
<domain> - the domain portion of the "MAIL FROM" or "HELO" identity.
<domain> - the domain portion of the "MAIL FROM" or "HELO" identity.
<sender> - the "MAIL FROM" or "HELO" identity.
<sender> - the "MAIL FROM" or "HELO" identity.
Note that the <domain> argument may not be a well-formed domain name. For example, if the reverse-path was null, then the EHLO/HELO domain is used, with its associated problems (see Section 2.1). In these cases, check_host() is defined in Section 4.3 to return a "None" result.
Note that the <domain> argument may not be a well-formed domain name. For example, if the reverse-path was null, then the EHLO/HELO domain is used, with its associated problems (see Section 2.1). In these cases, check_host() is defined in Section 4.3 to return a "None" result.
Although invalid, malformed, or non-existent domains cause SPF checks to return "None" because no SPF record can be found, it has long been the policy of many MTAs to reject E-Mail from such domains, especially in the case of invalid "MAIL FROM". In order to prevent the circumvention of SPF records, rejecting E-Mail from invalid domains should be considered.
Although invalid, malformed, or non-existent domains cause SPF checks to return "None" because no SPF record can be found, it has long been the policy of many MTAs to reject E-Mail from such domains, especially in the case of invalid "MAIL FROM". In order to prevent the circumvention of SPF records, rejecting E-Mail from invalid domains should be considered.
Implementations must take care to correctly extract the <domain> from the data given with the SMTP MAIL FROM command as many MTAs will still accept such things as source routes (see [RFC2821], Appendix C), the %-hack (see [RFC1123]), and bang paths (see [RFC1983]). These archaic features have been maliciously used to bypass security systems.
Implementations must take care to correctly extract the <domain> from the data given with the SMTP MAIL FROM command as many MTAs will still accept such things as source routes (see [RFC2821], Appendix C), the %-hack (see [RFC1123]), and bang paths (see [RFC1983]). These archaic features have been maliciously used to bypass security systems.
2.5. Interpreting the Result
2.5. Interpreting the Result
This section describes how software that performs the authorization should interpret the results of the check_host() function. The authorization check SHOULD be performed during the processing of the SMTP transaction that sends the mail. This allows errors to be returned directly to the sending MTA by way of SMTP replies.
This section describes how software that performs the authorization should interpret the results of the check_host() function. The authorization check SHOULD be performed during the processing of the SMTP transaction that sends the mail. This allows errors to be returned directly to the sending MTA by way of SMTP replies.
Wong & Schlitt Experimental [Page 7] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 7] RFC 4408 Sender Policy Framework (SPF) April 2006
Performing the authorization after the SMTP transaction has finished may cause problems, such as the following: (1) It may be difficult to accurately extract the required information from potentially deceptive headers; (2) legitimate E-Mail may fail because the sender's policy may have since changed.
Performing the authorization after the SMTP transaction has finished may cause problems, such as the following: (1) It may be difficult to accurately extract the required information from potentially deceptive headers; (2) legitimate E-Mail may fail because the sender's policy may have since changed.
Generating non-delivery notifications to forged identities that have failed the authorization check is generally abusive and against the explicit wishes of the identity owner.
Generating non-delivery notifications to forged identities that have failed the authorization check is generally abusive and against the explicit wishes of the identity owner.
2.5.1. None
2.5.1. None
A result of "None" means that no records were published by the domain or that no checkable sender domain could be determined from the given identity. The checking software cannot ascertain whether or not the client host is authorized.
A result of "None" means that no records were published by the domain or that no checkable sender domain could be determined from the given identity. The checking software cannot ascertain whether or not the client host is authorized.
2.5.2. Neutral
2.5.2. Neutral
The domain owner has explicitly stated that he cannot or does not want to assert whether or not the IP address is authorized. A "Neutral" result MUST be treated exactly like the "None" result; the distinction exists only for informational purposes. Treating "Neutral" more harshly than "None" would discourage domain owners from testing the use of SPF records (see Section 9.1).
The domain owner has explicitly stated that he cannot or does not want to assert whether or not the IP address is authorized. A "Neutral" result MUST be treated exactly like the "None" result; the distinction exists only for informational purposes. Treating "Neutral" more harshly than "None" would discourage domain owners from testing the use of SPF records (see Section 9.1).
2.5.3. Pass
2.5.3. Pass
A "Pass" result means that the client is authorized to inject mail with the given identity. The domain can now, in the sense of reputation, be considered responsible for sending the message. Further policy checks can now proceed with confidence in the legitimate use of the identity.
A "Pass" result means that the client is authorized to inject mail with the given identity. The domain can now, in the sense of reputation, be considered responsible for sending the message. Further policy checks can now proceed with confidence in the legitimate use of the identity.
2.5.4. Fail
2.5.4. Fail
A "Fail" result is an explicit statement that the client is not authorized to use the domain in the given identity. The checking software can choose to mark the mail based on this or to reject the mail outright.
A "Fail" result is an explicit statement that the client is not authorized to use the domain in the given identity. The checking software can choose to mark the mail based on this or to reject the mail outright.
If the checking software chooses to reject the mail during the SMTP transaction, then it SHOULD use an SMTP reply code of 550 (see [RFC2821]) and, if supported, the 5.7.1 Delivery Status Notification (DSN) code (see [RFC3464]), in addition to an appropriate reply text. The check_host() function may return either a default explanation string or one from the domain that published the SPF records (see Section 6.2). If the information does not originate with the
If the checking software chooses to reject the mail during the SMTP transaction, then it SHOULD use an SMTP reply code of 550 (see [RFC2821]) and, if supported, the 5.7.1 Delivery Status Notification (DSN) code (see [RFC3464]), in addition to an appropriate reply text. The check_host() function may return either a default explanation string or one from the domain that published the SPF records (see Section 6.2). If the information does not originate with the
Wong & Schlitt Experimental [Page 8] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 8] RFC 4408 Sender Policy Framework (SPF) April 2006
checking software, it should be made clear that the text is provided by the sender's domain. For example:
checking software, it should be made clear that the text is provided by the sender's domain. For example:
550-5.7.1 SPF MAIL FROM check failed: 550-5.7.1 The domain example.com explains: 550 5.7.1 Please see http://www.example.com/mailpolicy.html
550-5.7.1 SPF MAIL FROM check failed: 550-5.7.1 The domain example.com explains: 550 5.7.1 Please see http://www.example.com/mailpolicy.html
2.5.5. SoftFail
2.5.5. SoftFail
A "SoftFail" result should be treated as somewhere between a "Fail" and a "Neutral". The domain believes the host is not authorized but is not willing to make that strong of a statement. Receiving software SHOULD NOT reject the message based solely on this result, but MAY subject the message to closer scrutiny than normal.
A "SoftFail" result should be treated as somewhere between a "Fail" and a "Neutral". The domain believes the host is not authorized but is not willing to make that strong of a statement. Receiving software SHOULD NOT reject the message based solely on this result, but MAY subject the message to closer scrutiny than normal.
The domain owner wants to discourage the use of this host and thus desires limited feedback when a "SoftFail" result occurs. For example, the recipient's Mail User Agent (MUA) could highlight the "SoftFail" status, or the receiving MTA could give the sender a message using a technique called "greylisting" whereby the MTA can issue an SMTP reply code of 451 (4.3.0 DSN code) with a note the first time the message is received, but accept it the second time.
The domain owner wants to discourage the use of this host and thus desires limited feedback when a "SoftFail" result occurs. For example, the recipient's Mail User Agent (MUA) could highlight the "SoftFail" status, or the receiving MTA could give the sender a message using a technique called "greylisting" whereby the MTA can issue an SMTP reply code of 451 (4.3.0 DSN code) with a note the first time the message is received, but accept it the second time.
2.5.6. TempError
2.5.6. TempError
A "TempError" result means that the SPF client encountered a transient error while performing the check. Checking software can choose to accept or temporarily reject the message. If the message is rejected during the SMTP transaction for this reason, the software SHOULD use an SMTP reply code of 451 and, if supported, the 4.4.3 DSN code.
A "TempError" result means that the SPF client encountered a transient error while performing the check. Checking software can choose to accept or temporarily reject the message. If the message is rejected during the SMTP transaction for this reason, the software SHOULD use an SMTP reply code of 451 and, if supported, the 4.4.3 DSN code.
2.5.7. PermError
2.5.7. PermError
A "PermError" result means that the domain's published records could not be correctly interpreted. This signals an error condition that requires manual intervention to be resolved, as opposed to the TempError result. Be aware that if the domain owner uses macros (Section 8), it is possible that this result is due to the checked identities having an unexpected format.
A "PermError" result means that the domain's published records could not be correctly interpreted. This signals an error condition that requires manual intervention to be resolved, as opposed to the TempError result. Be aware that if the domain owner uses macros (Section 8), it is possible that this result is due to the checked identities having an unexpected format.
3. SPF Records
3. SPF Records
An SPF record is a DNS Resource Record (RR) that declares which hosts are, and are not, authorized to use a domain name for the "HELO" and "MAIL FROM" identities. Loosely, the record partitions all hosts into permitted and not-permitted sets (though some hosts might fall into neither category).
An SPF record is a DNS Resource Record (RR) that declares which hosts are, and are not, authorized to use a domain name for the "HELO" and "MAIL FROM" identities. Loosely, the record partitions all hosts into permitted and not-permitted sets (though some hosts might fall into neither category).
Wong & Schlitt Experimental [Page 9] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 9] RFC 4408 Sender Policy Framework (SPF) April 2006
The SPF record is a single string of text. An example record is the following:
SPFレコードはテキストの一連です。 例の記録は以下です:
v=spf1 +mx a:colo.example.com/28 -all
v=spf1+mx a: colo.example.com/28、-すべて。
This record has a version of "spf1" and three directives: "+mx", "a:colo.example.com/28" (the + is implied), and "-all".
この記録にはバージョンがある、「spf1"と3つの指示:」 「+ mx」と、「: colo.example.com/28インチ(+は含意される)、および「-すべて」。」
3.1. Publishing
3.1. 発行します。
Domain owners wishing to be SPF compliant must publish SPF records for the hosts that are used in the "MAIL FROM" and "HELO" identities. The SPF records are placed in the DNS tree at the host name it pertains to, not a subdomain under it, such as is done with SRV records. This is the same whether the TXT or SPF RR type (see Section 3.1.1) is used.
SPF対応するのになりたがっているドメイン所有者が中で使用されるホストのためにSPF記録を発表しなければならない、「」 "HELO"から、アイデンティティを郵送してください。 SPF記録はSRV記録でするようなそれの下のサブドメインではなく、それが関係するホスト名でDNS木に置かれます。 TXTかSPF RRタイプ(セクション3.1.1を見る)が使用されているか否かに関係なく、これは同じです。
The example above in Section 3 might be published via these lines in a domain zone file:
セクション3の上記の例はドメインゾーンファイルのこれらの線を通して発表されるかもしれません:
example.com. TXT "v=spf1 +mx a:colo.example.com/28 -all" smtp-out.example.com. TXT "v=spf1 a -all"
example.com。 TXT、「v=spf1+mx a: colo.example.com/28、-すべて」、smtp-out.example.com。 TXT、「v=spf1a、-すべて」
When publishing via TXT records, beware of other TXT records published there for other purposes. They may cause problems with size limits (see Section 3.1.4).
TXT記録で発行するときには、他の目的のためにそこで発表された他のTXT記録に注意してください。 それらはサイズ限界で問題を起こすかもしれません(セクション3.1.4を見てください)。
3.1.1. DNS Resource Record Types
3.1.1. DNSリソースレコード種類
This document defines a new DNS RR of type SPF, code 99. The format of this type is identical to the TXT RR [RFC1035]. For either type, the character content of the record is encoded as [US-ASCII].
このドキュメントはタイプSPF、コード99の新しいDNS RRを定義します。 このタイプの形式はTXT RR[RFC1035]と同じです。 タイプにおいて、記録のキャラクタ内容は[米国のASCII]としてコード化されます。
It is recognized that the current practice (using a TXT record) is not optimal, but it is necessary because there are a number of DNS server and resolver implementations in common use that cannot handle the new RR type. The two-record-type scheme provides a forward path to the better solution of using an RR type reserved for this purpose.
現在の習慣(TXT記録を使用する)が最適でないと認められますが、新しいRRタイプを扱うことができない共用の多くのDNSサーバとレゾルバ実現があるので、それが必要です。 2レコード種類の計画はこのために予約されたRRタイプを使用するより良い解決策にフォワードパスを提供します。
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. If a domain has records of both types, they MUST have identical content. For example, instead of publishing just one record as in Section 3.1 above, it is better to publish:
SPF対応することのドメイン名SHOULDには、両方のRRタイプに関するSPF記録があります。 対応するドメイン名には、少なくとも1つのタイプに関する記録がなければなりません。 ドメインに両方のタイプに関する記録があるなら、彼らには、同じ内容がなければなりません。 例えば、セクション3.1のようにちょうど1つの記録を発表することの代わりに、上では、発行しているほうがよいです:
example.com. IN TXT "v=spf1 +mx a:colo.example.com/28 -all" example.com. IN SPF "v=spf1 +mx a:colo.example.com/28 -all"
example.com。 IN TXT、「v=spf1+mx a: colo.example.com/28、-すべて」、example.com。 IN SPF、「v=spf1+mx a: colo.example.com/28、-すべて」
Wong & Schlitt Experimental [Page 10] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[10ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
Example RRs in this document are shown with the TXT record type; however, they could be published with the SPF type or with both types.
例のRRsはTXTレコード種類で本書では見せられます。 しかしながら、SPFタイプかタイプの両方でそれらを発行できるでしょう。
3.1.2. Multiple DNS Records
3.1.2. 複数のDNS記録
A domain name MUST NOT have multiple records that would cause an authorization check to select more than one record. See Section 4.5 for the selection rules.
ドメイン名には、許可検査が1つ以上の記録を選択する複数の記録があってはいけません。 選択規則に関してセクション4.5を見てください。
3.1.3. Multiple Strings in a Single DNS record
3.1.3. Single DNS記録の複数のStrings
As defined in [RFC1035] sections 3.3.14 and 3.3, a single text DNS record (either TXT or SPF RR types) can be composed of more than one string. If a published record contains multiple strings, then the record MUST be treated as if those strings are concatenated together without adding spaces. For example:
セクション3.3 [RFC1035]の.14と3.3で定義されるように、1個以上のストリングでただ一つのテキストDNS記録(TXTかSPF RRのどちらかがタイプする)を構成できます。 発行された記録が多連を含んでいるなら、まるでそれらのストリングが空間を加えないで一緒に連結されるかのように記録を扱わなければなりません。 例えば:
IN TXT "v=spf1 .... first" "second string..."
IN TXT、「v=spf1… 」 最初に、「2番目のストリング」…
MUST be treated as equivalent to
同じくらい相当していた状態で扱わなければなりません。
IN TXT "v=spf1 .... firstsecond string..."
IN TXT、「v=spf1… firstsecondに」 …を結んでください。
SPF or TXT records containing multiple strings are useful in constructing records that would exceed the 255-byte maximum length of a string within a single TXT or SPF RR record.
多連を含むSPFかTXT記録が独身のTXTかSPF RR記録の中でストリングの255バイトの最大の長さを超えている記録を構成する際に役に立ちます。
3.1.4. Record Size
3.1.4. レコード・サイズ
The published SPF record for a given domain name SHOULD remain small enough that the results of a query for it will fit within 512 octets. This will keep even older DNS implementations from falling over to TCP. Since the answer size is dependent on many things outside the scope of this document, it is only possible to give this guideline: If the combined length of the DNS name and the text of all the records of a given type (TXT or SPF) is under 450 characters, then DNS answers should fit in UDP packets. Note that when computing the sizes for queries of the TXT format, one must take into account any other TXT records published at the domain name. Records that are too long to fit in a single UDP packet MAY be silently ignored by SPF clients.
与えられたドメイン名のためのSHOULDがそれのための質問の結果が512の八重奏の中で合うほど小さいままで残っているという発行されたSPF記録。 これは、さらに古いDNS実現がTCPへ倒れるのを妨げるでしょう。 答えサイズがこのドキュメントの範囲の外の多くのものに依存しているので、単にこのガイドラインを与えるのは可能です: DNS名の結合した長さと与えられたタイプに関するすべての記録のテキスト(TXTかSPF)が450未満のキャラクタであるなら、DNS答えはUDPパケットをうまくはめ込むべきです。 TXT形式の質問のためにサイズを計算するとき、ドメイン名で発表されたいかなる他のTXT記録も考慮に入れなければならないことに注意してください。 単一のUDPパケットをうまくはめ込むことができないくらい長い記録はSPFクライアントによって静かに無視されるかもしれません。
3.1.5. Wildcard Records
3.1.5. ワイルドカード記録
Use of wildcard records for publishing is not recommended. Care must be taken if wildcard records are used. If a domain publishes wildcard MX records, it may want to publish wildcard declarations,
ワイルドカード記録の出版の使用は推薦されません。 ワイルドカード記録が使用されているなら、注意しなければなりません。 ドメインがワイルドカードMX記録を発表するなら、それはワイルドカード宣言を発行したがっているかもしれません。
Wong & Schlitt Experimental [Page 11] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[11ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
subject to the same requirements and problems. In particular, the declaration must be repeated for any host that has any RR records at all, and for subdomains thereof. For example, the example given in [RFC1034], Section 4.3.3, could be extended with the following:
同じ要件と問題Inを条件として、特定です、全くどんなRR記録も持っているどんなホスト、およびそれのサブドメインのためにも宣言を繰り返さなければなりません。 例えば、以下で[RFC1034]で出された例(セクション4.3.3)は広げることができました:
X.COM. MX 10 A.X.COM X.COM. TXT "v=spf1 a:A.X.COM -all"
X.COM。 Mx10A.X.COM X.COM。 TXT、「v=spf1 a: A.X.COM、-すべて」
*.X.COM. MX 10 A.X.COM *.X.COM. TXT "v=spf1 a:A.X.COM -all"
*.X. COM。 Mx10A.X.COM*.X. COM。 TXT、「v=spf1 a: A.X.COM、-すべて」
A.X.COM. A 1.2.3.4 A.X.COM. MX 10 A.X.COM A.X.COM. TXT "v=spf1 a:A.X.COM -all"
A.X.COM。 A1.2.3.4A.X.COM。 Mx10A.X.COM A.X.COM。 TXT、「v=spf1 a: A.X.COM、-すべて」
*.A.X.COM. MX 10 A.X.COM *.A.X.COM. TXT "v=spf1 a:A.X.COM -all"
*.A.X.COM。 Mx10A.X.COM*.A.X.COM。 TXT、「v=spf1 a: A.X.COM、-すべて」
Notice that SPF records must be repeated twice for every name within the domain: once for the name, and once with a wildcard to cover the tree under the name.
ドメインの中のあらゆる名前のために二度SPF記録を繰り返さなければならないのに注意してください: 一度名前、およびかつての覆うワイルドカードで名前の下における木のために。
Use of wildcards is discouraged in general as they cause every name under the domain to exist and queries against arbitrary names will never return RCODE 3 (Name Error).
それらがドメインの下におけるあらゆる名前を存在させるとき、一般に、ワイルドカードの使用はお勧めできないです、そして、任意の名前に対する質問はRCODE3(名前Error)を決して、返さないでしょう。
4. The check_host() Function
4. チェック_ホスト()機能
The check_host() function fetches SPF records, parses them, and interprets them to determine whether a particular host is or is not permitted to send mail with a given identity. Mail receivers that perform this check MUST correctly evaluate the check_host() function as described here.
チェック_ホスト()機能は、SPFに記録をとって来るか、それらを分析して、特定のホストがそうかどうか決定するためにそれらを解釈するか、または与えられたアイデンティティがあるメールを送ることが許可されていません。 このチェックを実行するメール受信機はここで説明されるように正しくチェック_ホスト()機能を評価しなければなりません。
Implementations MAY use a different algorithm than the canonical algorithm defined here, so long as the results are the same in all cases.
実現はここで定義された正準なアルゴリズムと異なったアルゴリズムを使用するかもしれません、結果がすべての場合で同じである限り。
4.1. Arguments
4.1. 議論
The check_host() function takes these arguments:
チェック_ホスト()機能はこれらの議論を取ります:
<ip> - the IP address of the SMTP client that is emitting the mail, either IPv4 or IPv6.
<ip>--メール(IPv4かIPv6のどちらか)を放っているSMTPクライアントのIPアドレス。
<domain> - the domain that provides the sought-after authorization information; initially, the domain portion of the "MAIL FROM" or "HELO" identity.
<ドメイン>--需要の多い認可情報を提供するドメイン。 初めはドメインが分配する、「」 "HELO"から、アイデンティティを郵送してください。
Wong & Schlitt Experimental [Page 12] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[12ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
<sender> - the "MAIL FROM" or "HELO" identity.
<送付者>--、「」 "HELO"から、アイデンティティを郵送してください。
The domain portion of <sender> will usually be the same as the <domain> argument when check_host() is initially evaluated. However, this will generally not be true for recursive evaluations (see Section 5.2 below).
チェック_ホスト()が初めは評価されるとき、通常、<送付者>のドメイン部分は<ドメイン>議論と同じになるでしょう。 しかしながら、一般に、これは再帰的な評価に本当にならないでしょう(以下のセクション5.2を見てください)。
Actual implementations of the check_host() function may need additional arguments.
チェック_ホスト()機能の実際の実現は追加議論を必要とするかもしれません。
4.2. Results
4.2. 結果
The function check_host() can return one of several results described in Section 2.5. Based on the result, the action to be taken is determined by the local policies of the receiver.
機能チェック_ホスト()はセクション2.5で説明されたいくつかの結果の1つを返すことができます。 結果に基づいて、取られるべき動作は受信機のローカルの方針で決定します。
4.3. Initial Processing
4.3. 初期の処理
If the <domain> is malformed (label longer than 63 characters, zero- length label not at the end, etc.) or is not a fully qualified domain name, or if the DNS lookup returns "domain does not exist" (RCODE 3), check_host() immediately returns the result "None".
<ドメイン>が奇形であるか(終わりでないことの63のキャラクタより長くて、無長さのラベルなどをラベルします)、完全修飾ドメイン名でないDNSルックアップが戻るなら「ドメインは存在していない」なら(RCODE3)、チェック_ホスト()はすぐに、結果「なにも」を返します。
If the <sender> has no localpart, substitute the string "postmaster" for the localpart.
<送付者>にlocalpartが全くないなら、ストリング「郵便局長」をlocalpartの代わりに用いてください。
4.4. Record Lookup
4.4. ルックアップを記録してください。
In accordance with how the records are published (see Section 3.1 above), a DNS query needs to be made for the <domain> name, querying for either RR type TXT, SPF, or both. If both SPF and TXT RRs are looked up, the queries MAY be done in parallel.
記録がどう発表されるかによると(セクション3.1が上であることを見てください)、DNS質問は、<ドメイン>名のために作られている必要があります、RRのためにタイプTXT、SPF、または両方について質問して。 SPFとTXT RRsの両方を見上げるなら、平行で質問するかもしれません。
If all DNS lookups that are made return a server failure (RCODE 2), or other error (RCODE other than 0 or 3), or time out, then check_host() exits immediately with the result "TempError".
作られているすべてのDNSルックアップがサーバ失敗(RCODE2)、他の誤り(0か3以外のRCODE)、またはタイムアウトを返すなら、すぐ結果"TempError"に_ホスト()出口について問い合わせてください。
4.5. Selecting Records
4.5. 記録を選択します。
Records begin with a version section:
記録はバージョン部で始まります:
record = version terms *SP version = "v=spf1"
記録=バージョン用語*SPバージョン="v=spf1""
Starting with the set of records that were returned by the lookup, record selection proceeds in two steps:
ルックアップによって返された記録のセットから始まって、レコード選択は以下の2ステップで続きます:
Wong & Schlitt Experimental [Page 13] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[13ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
1. Records that do not begin with a version section of exactly "v=spf1" are discarded. Note that the version section is terminated either by an SP character or the end of the record. A record with a version section of "v=spf10" does not match and must be discarded.
1. ちょうど「v=spf1"は捨てられること」のバージョン部で始まらない記録。 バージョン部がSPキャラクタか記録の終わりまでに終えられることに注意してください。 「v=spf10"は合わないで、捨てなければならない」バージョン部がある記録。
2. If any records of type SPF are in the set, then all records of type TXT are discarded.
2. セットに何かタイプSPFに関する記録があるなら、タイプTXTのすべての記録が捨てられます。
After the above steps, there should be exactly one record remaining and evaluation can proceed. If there are two or more records remaining, then check_host() exits immediately with the result of "PermError".
上のステップの後に、残っている1つの記録がまさにあるべきです、そして、評価は続くことができます。 残っている2つ以上の記録があれば、すぐ"PermError"の結果に_ホスト()出口について問い合わせてください。
If no matching records are returned, an SPF client MUST assume that the domain makes no SPF declarations. SPF processing MUST stop and return "None".
合っている記録を全く返さないなら、SPFクライアントは、ドメインがSPF宣言を全くしないと仮定しなければなりません。 SPF処理は、「なにも」を止めて、返さなければなりません。
4.6. Record Evaluation
4.6. 評価を記録してください。
After one SPF record has been selected, the check_host() function parses and interprets it to find a result for the current test. If there are any syntax errors, check_host() returns immediately with the result "PermError".
1つのSPF記録が選択された後に、チェック_ホスト()機能は、現在のテストに関して結果を見つけるためにそれを分析して、解釈します。 何か構文エラーがあれば、すぐ結果"PermError"に_ホスト()リターンについて問い合わせてください。
Implementations MAY choose to parse the entire record first and return "PermError" if the record is not syntactically well formed. However, in all cases, any syntax errors anywhere in the record MUST be detected.
記録がシンタクス上よく形成されないなら、実現は、最初に、全体の記録を分析して、"PermError"を返すのを選ぶかもしれません。 しかしながら、すべての場合では、記録でどこでもどんな構文エラーも検出しなければなりません。
4.6.1. Term Evaluation
4.6.1. 用語評価
There are two types of terms: mechanisms and modifiers. A record contains an ordered list of these as specified in the following Augmented Backus-Naur Form (ABNF).
2つのタイプの用語があります: メカニズムと修飾語。 記録は以下のAugmented BN記法(ABNF)における指定されるとしてのこれらの規則正しいリストを含んでいます。
terms = *( 1*SP ( directive / modifier ) )
用語は*と等しいです。(1*SP(指示/修飾語))
directive = [ qualifier ] mechanism qualifier = "+" / "-" / "?" / "~" mechanism = ( all / include / A / MX / PTR / IP4 / IP6 / exists ) modifier = redirect / explanation / unknown-modifier unknown-modifier = name "=" macro-string
指示=[資格を与える人]メカニズム資格を与える人=「+」/「-」/“?" /「~」メカニズム=(すべての/インクルード/A/Mx/ PTR / IP4 / IP6 /は存在しています)修飾語=再直接の/未知の説明/修飾語未知の修飾語=名前「=」マクロストリング
name = ALPHA *( ALPHA / DIGIT / "-" / "_" / "." )
名前=アルファー*「(アルファ/ケタ/「-」/"_"/、」、」、)
Most mechanisms allow a ":" or "/" character after the name.
「ほとんどのメカニズムがa」を許容します」 「」 /、」 名前の後のキャラクタ。
Wong & Schlitt Experimental [Page 14] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[14ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
Modifiers always contain an equals ('=') character immediately after the name, and before any ":" or "/" characters that may be part of the macro-string.
「修飾語は名前直後、どんな前にもいつも同輩('=')キャラクタを含んでいる」:、」 「」 /、」 マクロストリングの一部であるかもしれないキャラクタ。
Terms that do not contain any of "=", ":", or "/" are mechanisms, as defined in Section 5.
: 」 」 「いずれかも含まない「=」の用語」、/、」 中で定義されるとしてのメカニズムはセクション5ですか?
As per the definition of the ABNF notation in [RFC4234], mechanism and modifier names are case-insensitive.
[RFC4234]とのABNF記法の定義に従って、メカニズムと修飾語名は大文字と小文字を区別しないです。
4.6.2. Mechanisms
4.6.2. メカニズム
Each mechanism is considered in turn from left to right. If there are no more mechanisms, the result is specified in Section 4.7.
各メカニズムは左から右まで順番に考えられます。 それ以上のメカニズムが全くなければ、結果はセクション4.7で指定されます。
When a mechanism is evaluated, one of three things can happen: it can match, not match, or throw an exception.
メカニズムが評価されるとき、3つのものの1つは起こることができます: それは例外を合わせるか、または投げるのではなく、合うことができます。
If it matches, processing ends and the qualifier value is returned as the result of that record. If it does not match, processing continues with the next mechanism. If it throws an exception, mechanism processing ends and the exception value is returned.
合っているなら、処理は終わります、そして、その記録の結果として資格を与える人値を返します。 合っていないなら、処理は次のメカニズムを続行します。 例外を投げるなら、メカニズム処理は終わります、そして、例外値を返します。
The possible qualifiers, and the results they return are as follows:
可能な資格を与える人、およびそれらが返す結果がそうである、以下の通り:
"+" Pass "-" Fail "~" SoftFail "?" Neutral
「+」 パス「-」は「~」SoftFail “?"に失敗します。 中立
The qualifier is optional and defaults to "+".
資格を与える人は、任意であり、「+」をデフォルトとします。
When a mechanism matches and the qualifier is "-", then a "Fail" result is returned and the explanation string is computed as described in Section 6.2.
メカニズムが合って、資格を与える人が「-」であるときに、次に、「失敗してください」という結果は返されます、そして、説明ストリングはセクション6.2で説明されるように計算されます。
The specific mechanisms are described in Section 5.
特定のメカニズムはセクション5で説明されます。
4.6.3. Modifiers
4.6.3. 修飾語
Modifiers are not mechanisms: they do not return match or not-match. Instead they provide additional information. Although modifiers do not directly affect the evaluation of the record, the "redirect" modifier has an effect after all the mechanisms have been evaluated.
修飾語はメカニズムではありません: 彼らは、どんなリターンマッチもしないか、または合っていません。 代わりに、彼らは追加情報を提供します。 修飾語は直接記録の評価に影響しませんが、「再直接」の修飾語には、すべてのメカニズムが評価された後に効果があります。
Wong & Schlitt Experimental [Page 15] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[15ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
4.7. Default Result
4.7. デフォルト結果
If none of the mechanisms match and there is no "redirect" modifier, then the check_host() returns a result of "Neutral", just as if "?all" were specified as the last directive. If there is a "redirect" modifier, check_host() proceeds as defined in Section 6.1.
「メカニズムのいずれも合わないで、また「再直接」の修飾語が全くなければ、チェック_ホスト()は「中立」の結果を返します、正当である、」 すべて、」 最後の指示として、指定されました。 「再直接」の修飾語があれば、チェック_ホスト()はセクション6.1で定義されるように続きます。
Note that records SHOULD always use either a "redirect" modifier or an "all" mechanism to explicitly terminate processing.
記録SHOULDが明らかに処理を終えるのにいつも「再直接」の修飾語か「すべて」メカニズムのどちらかを使用することに注意してください。
For example:
例えば:
v=spf1 +mx -all or v=spf1 +mx redirect=_spf.example.com
v=spf1+mx、-すべて、v=spf1+mxの再直接の=_spf.example.com
4.8. Domain Specification
4.8. ドメイン仕様
Several of these mechanisms and modifiers have a <domain-spec> section. The <domain-spec> string is macro expanded (see Section 8). The resulting string is the common presentation form of a fully- qualified DNS name: a series of labels separated by periods. This domain is called the <target-name> in the rest of this document.
これらのメカニズムといくつかの修飾語で、a<ドメイン仕様>は区分します。 >が結ぶ<ドメイン仕様は広げられたマクロ(セクション8を見る)です。 結果として起こるストリングは完全に適切なDNS名の一般的な表示形です: 一連のラベルが周期的に分離しました。 このドメインはこのドキュメントの残りで<目標名の>と呼ばれます。
Note: The result of the macro expansion is not subject to any further escaping. Hence, this facility cannot produce all characters that are legal in a DNS label (e.g., the control characters). However, this facility is powerful enough to express legal host names and common utility labels (such as "_spf") that are used in DNS.
以下に注意してください。 マクロ展開の結果はこれ以上逃げるのを受けることがありません。 したがって、この施設はすべてのDNSラベル(例えば、制御文字)で法的なキャラクタを生産できるというわけではありません。 「しかしながら、この施設が法的なホスト名と共用設備ラベルを表すほど強力である、(」 _spfなど、」、)、それはDNSで使用されます。
For several mechanisms, the <domain-spec> is optional. If it is not provided, the <domain> is used as the <target-name>.
数個のメカニズムにおいて、<ドメイン仕様>は任意です。 それが提供されないなら、<ドメイン>は>という<目標名として使用されます。
5. Mechanism Definitions
5. メカニズム定義
This section defines two types of mechanisms.
このセクションは2つのタイプのメカニズムを定義します。
Basic mechanisms contribute to the language framework. They do not specify a particular type of authorization scheme.
基本的機構は言語枠組みに貢献します。 彼らは特定のタイプの認可計画を指定しません。
all include
すべてのインクルード
Designated sender mechanisms are used to designate a set of <ip> addresses as being permitted or not permitted to use the <domain> for sending mail.
指定された送付者メカニズムは、受入れられるとip>アドレスに<の1セットを指定するのに使用されるか、または送付メールに<ドメイン>を使用することが許可されていません。
Wong & Schlitt Experimental [Page 16] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[16ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
a mx ptr ip4 ip6 exists
mx ptr ip4 ip6は存在しています。
The following conventions apply to all mechanisms that perform a comparison between <ip> and an IP address at any point:
以下のコンベンションは任意な点で<ip>とIPアドレスでの比較を実行するすべてのメカニズムに適用されます:
If no CIDR-length is given in the directive, then <ip> and the IP address are compared for equality. (Here, CIDR is Classless Inter- Domain Routing.)
指示でCIDR-長さを全く与えないなら、平等のために<ip>とIPアドレスを比較します。 (ここで、CIDRはClassless Interドメインルート設定です。)
If a CIDR-length is specified, then only the specified number of high-order bits of <ip> and the IP address are compared for equality.
CIDR-長さが指定されるなら、高位のビットの<ip>の指定された数とIPアドレスだけが平等のために比較されます。
When any mechanism fetches host addresses to compare with <ip>, when <ip> is an IPv4 address, A records are fetched, when <ip> is an IPv6 address, AAAA records are fetched. Even if the SMTP connection is via IPv6, an IPv4-mapped IPv6 IP address (see [RFC3513], Section 2.5.5) MUST still be considered an IPv4 address.
<ip>がIPv4アドレスであるときに、何かメカニズムが<ip>と比較するためにホスト・アドレスをとって来ると、A記録はとって来られます、<ip>がIPv6アドレスであるときに、記録がとって来られるAAAA。 IPv6を通してSMTP接続があっても、IPv4アドレスであるとまだ、IPv4によって写像されたIPv6IPアドレス([RFC3513]、セクション2.5.5を見る)を考えなければなりません。
Several mechanisms rely on information fetched from DNS. For these DNS queries, except where noted, if the DNS server returns an error (RCODE other than 0 or 3) or the query times out, the mechanism throws the exception "TempError". If the server returns "domain does not exist" (RCODE 3), then evaluation of the mechanism continues as if the server returned no error (RCODE 0) and zero answer records.
数個のメカニズムがDNSからとって来られた情報を当てにします。 DNSサーバが誤り(0か3以外のRCODE)を返すか、そして、質問時間が外にある状態で有名であるところ以外のこれらのDNS質問のために、メカニズムは例外"TempError"を投げます。 サーバが戻るなら「ドメインは存在していなく」て(RCODE3)、まるでサーバが誤り(RCODE0)を全く返さないで、ゼロが記録に答えるかのように次に、メカニズムの評価は続きます。
5.1. "all"
5.1. 「すべて」
all = "all"
すべての=「すべて」
The "all" mechanism is a test that always matches. It is used as the rightmost mechanism in a record to provide an explicit default.
「すべて」メカニズムはいつも合っているテストです。 それは、明白なデフォルトを提供するのに一番右のメカニズムとして記録で使用されます。
For example:
例えば:
v=spf1 a mx -all
v=spf1a mx、-すべて。
Mechanisms after "all" will never be tested. Any "redirect" modifier (Section 6.1) has no effect when there is an "all" mechanism.
「すべて」の後のメカニズムは決してテストされないでしょう。 「すべて」メカニズムがあるとき、どんな「再直接」の修飾語(セクション6.1)も効き目がありません。
Wong & Schlitt Experimental [Page 17] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[17ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
5.2. "include"
5.2. 「包含」
include = "include" ":" domain-spec
「=「インクルード」を含めてください」:、」 ドメイン仕様
The "include" mechanism triggers a recursive evaluation of check_host(). The domain-spec is expanded as per Section 8. Then check_host() is evaluated with the resulting string as the <domain>. The <ip> and <sender> arguments remain the same as in the current evaluation of check_host().
「包含」メカニズムはチェック_ホスト()の再帰的な評価の引き金となります。 ドメイン仕様はセクション8に従って広げられます。 そして、チェック_ホスト()は<ドメイン>として結果として起こるひもで評価されます。 <ip>と<送付者>議論はチェック_ホスト()の現在の評価のように同じままで残っています。
In hindsight, the name "include" was poorly chosen. Only the evaluated result of the referenced SPF record is used, rather than acting as if the referenced SPF record was literally included in the first. For example, evaluating a "-all" directive in the referenced record does not terminate the overall processing and does not necessarily result in an overall "Fail". (Better names for this mechanism would have been "if-pass", "on-pass", etc.)
後知恵では、「包含」という名前は不十分に選ばれました。 参照をつけられたSPF記録の評価の結果だけがまるで参照をつけられたSPF記録が1番目に文字通り含まれているかのように行動するよりむしろ使用されています。 例えば、「-すべて」という参照をつけられた記録における指示を評価すると、総合的な処理が終えられないで、総合的な「失敗」は必ずもたらされるというわけではありません。 (このメカニズムのための、より良い名前があっただろう、「-通ってください、」、「パス」のなど)
The "include" mechanism makes it possible for one domain to designate multiple administratively-independent domains. For example, a vanity domain "example.net" might send mail using the servers of administratively-independent domains example.com and example.org.
「包含」メカニズムで、1つのドメインが複数の行政上独立しているドメインを指定するのが可能になります。 例えば、"example.net"が行政上独立しているドメインのexample.comとexample.orgのサーバを使用するメールを送るかもしれない虚栄ドメイン。
Example.net could say
Example.netは言うことができました。
IN TXT "v=spf1 include:example.com include:example.org -all"
IN TXT、「v=spf1インクルード: example.comインクルード: example.org、-すべて」
This would direct check_host() to, in effect, check the records of example.com and example.org for a "Pass" result. Only if the host were not permitted for either of those domains would the result be "Fail".
これは、事実上、「パス」結果がないかどうかexample.comとexample.orgに関する記録をチェックするようチェック_ホスト()に指示するでしょう。 ホストがそれらのどちらのドメインのためにも受入れられない場合にだけ、結果は「失敗してください」でしょうか?
Wong & Schlitt Experimental [Page 18] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[18ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
Whether this mechanism matches, does not match, or throws an exception depends on the result of the recursive evaluation of check_host():
このメカニズムが合っているか否かに関係なく、例外が再帰的な評価の結果に依存するマッチ、または一投が_ホスト()をチェックしません:
+---------------------------------+---------------------------------+ | A recursive check_host() result | Causes the "include" mechanism | | of: | to: | +---------------------------------+---------------------------------+ | Pass | match | | | | | Fail | not match | | | | | SoftFail | not match | | | | | Neutral | not match | | | | | TempError | throw TempError | | | | | PermError | throw PermError | | | | | None | throw PermError | +---------------------------------+---------------------------------+
+---------------------------------+---------------------------------+ | 再帰的なチェック_ホスト()結果| 「包含」メカニズムを引き起こします。| | : | to: | +---------------------------------+---------------------------------+ | パス| マッチ| | | | | 失敗してください。| マッチでない| | | | | SoftFail| マッチでない| | | | | 中立| マッチでない| | | | | TempError| TempErrorを投げてください。| | | | | PermError| PermErrorを投げてください。| | | | | なし| PermErrorを投げてください。| +---------------------------------+---------------------------------+
The "include" mechanism is intended for crossing administrative boundaries. Although it is possible to use includes to consolidate multiple domains that share the same set of designated hosts, domains are encouraged to use redirects where possible, and to minimize the number of includes within a single administrative domain. For example, if example.com and example.org were managed by the same entity, and if the permitted set of hosts for both domains was "mx:example.com", it would be possible for example.org to specify "include:example.com", but it would be preferable to specify "redirect=example.com" or even "mx:example.com".
「包含」メカニズムは、管理境界に交差するように意図します。 そして、倍数を統合するのにインクルードを使用するために、同じように設定していた状態で共有されるドメインがホストを任命して、ドメインが奨励されるのが、可能ですが、使用が可能などこを向け直すか、ただ一つの管理ドメインの中でインクルードの数を最小にするために。 例えば、example.comとexample.orgが同じ実体によって管理されて、両方のドメインに「mx: example.com」が受入れられたセットのホストであるならあるなら、それは「: example.comを含めてください」を指定する可能なfor example.orgでしょうにが、「再直接の=example.com」か「mx: example.com」さえ指定するのは望ましいでしょう。
5.3. "a"
5.3. "a"
This mechanism matches if <ip> is one of the <target-name>'s IP addresses.
このメカニズムは<ip>が<目標名の>のIPアドレスの1つであるなら合っています。
A = "a" [ ":" domain-spec ] [ dual-cidr-length ]
=“a"[「:」 ドメイン仕様][二元的なcidrの長さ]
An address lookup is done on the <target-name>. The <ip> is compared to the returned address(es). If any address matches, the mechanism matches.
>という<目標名でアドレスルックアップをします。 <ip>は返されたアドレス(es)と比較されます。 何かアドレスが合っているなら、メカニズムは合っています。
Wong & Schlitt Experimental [Page 19] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[19ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
5.4. "mx"
5.4. "mx"
This mechanism matches if <ip> is one of the MX hosts for a domain name.
このメカニズムは<ip>がドメイン名のためのMXホストのひとりであるなら合っています。
MX = "mx" [ ":" domain-spec ] [ dual-cidr-length ]
MXは"mx"[「:」 ドメイン仕様]と等しいです。[二元的なcidrの長さ]
check_host() first performs an MX lookup on the <target-name>. Then it performs an address lookup on each MX name returned. The <ip> is compared to each returned IP address. To prevent Denial of Service (DoS) attacks, more than 10 MX names MUST NOT be looked up during the evaluation of an "mx" mechanism (see Section 10). If any address matches, the mechanism matches.
チェック_ホスト()は最初に、>という<目標名にMXルックアップを実行します。 そして、それはMX名が返したそれぞれにアドレスルックアップを実行します。 <ip>はそれぞれの返されたIPアドレスと比較されます。 サービス妨害(DoS)攻撃を防ぐために、"mx"メカニズムの評価の間、10以上のMX名を調べてはいけません(セクション10を見てください)。 何かアドレスが合っているなら、メカニズムは合っています。
Note regarding implicit MXs: If the <target-name> has no MX records, check_host() MUST NOT pretend the target is its single MX, and MUST NOT default to an A lookup on the <target-name> directly. This behavior breaks with the legacy "implicit MX" rule. See [RFC2821], Section 5. If such behavior is desired, the publisher should specify an "a" directive.
内在しているMXsに関して以下に注意してください。 >という<目標名にMX記録が全くないなら、チェック_ホスト()は、目標が独身のMXであるふりをしてはいけなくて、>という<目標名で直接Aルックアップをデフォルトとしてはいけません。 この振舞いは遺産「内在しているMX」規則と分かれます。 [RFC2821]、セクション5を見てください。 そのような振舞いが望まれているなら、出版社は“a"指示を指定するべきです。
5.5. "ptr"
5.5. "ptr"
This mechanism tests whether the DNS reverse-mapping for <ip> exists and correctly points to a domain name within a particular domain.
このメカニズムは、<ip>のための逆マッピングのDNSが存在しているか否かに関係なく、テストして、特定のドメインの中に正しくドメイン名を示します。
PTR = "ptr" [ ":" domain-spec ]
PTRは"ptr"と等しいです。[「:」 ドメイン仕様]
First, the <ip>'s name is looked up using this procedure: perform a DNS reverse-mapping for <ip>, looking up the corresponding PTR record in "in-addr.arpa." if the address is an IPv4 one and in "ip6.arpa." if it is an IPv6 address. For each record returned, validate the domain name by looking up its IP address. To prevent DoS attacks, more than 10 PTR names MUST NOT be looked up during the evaluation of a "ptr" mechanism (see Section 10). If <ip> is among the returned IP addresses, then that domain name is validated. In pseudocode:
まず最初に、<ip>の名前はこの手順を用いることで調べられます: <ip>のための逆マッピングのDNSを実行してください、「addr.arpa」での対応するPTR記録を調べて。. それがIPv6アドレスであるなら。IPv4がアドレスであるなら1つと"ip6.arpa"にあります。 返された各記録に関しては、IPアドレスを調べることによって、ドメイン名を有効にしてください。 DoS攻撃を防ぐために、"ptr"メカニズムの評価の間、10以上のPTR名を調べてはいけません(セクション10を見てください)。 返されたIPアドレスの中に<ip>があるなら、そのドメイン名は有効にされます。 擬似コードで:
sending-domain_names := ptr_lookup(sending-host_IP); if more than 10 sending-domain_names are found, use at most 10. for each name in (sending-domain_names) { IP_addresses := a_lookup(name); if the sending-domain_IP is one of the IP_addresses { validated-sending-domain_names += name; } }
発信ドメイン_はptr_ルックアップ(発信ホスト_IP)と:=を命名します。 10以上発信ドメインであるなら、_名は見つけられて、使用は高々10です。それぞれにちなんで、中で(発信ドメイン_名)を命名してください。IP_が発信ドメイン_IPがIP_アドレスの1つであるなら:=a_ルックアップ(名前)を記述する、名前+=が命名する有効にされた発信しているドメインの_。
Check all validated domain names to see if they end in the <target-name> domain. If any do, this mechanism matches. If no validated domain name can be found, or if none of the validated
すべての有効にされたドメイン名をチェックして、それらがドメインという<目標名の>に終わるかどうか確認してください。 いずれかそうするなら、このメカニズムは合っています。 有効にされたドメイン名を全く見つけることができないか、またはなにもである、有効にする。
Wong & Schlitt Experimental [Page 20] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[20ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
domain names end in the <target-name>, this mechanism fails to match. If a DNS error occurs while doing the PTR RR lookup, then this mechanism fails to match. If a DNS error occurs while doing an A RR lookup, then that domain name is skipped and the search continues.
ドメイン名は>という<目標名に終わって、このメカニズムは合っていません。 DNS誤りがPTR RRルックアップをしている間、発生するなら、このメカニズムは合っていません。 DNS誤りがA RRルックアップをしている間、発生するなら、そのドメイン名はスキップされます、そして、検索は続きます。
Pseudocode:
擬似コード:
for each name in (validated-sending-domain_names) { if name ends in <domain-spec>, return match. if name is <domain-spec>, return match. } return no-match.
仕様>(リターンマッチ)を<ドメインに終わらせている名前であるなら、名前であるなら、<はドメイン仕様です。(有効にされた発信ドメイン_名)の各名前、>(リターンマッチ)、リターンマッチがありません。
This mechanism matches if the <target-name> is either an ancestor of a validated domain name or if the <target-name> and a validated domain name are the same. For example: "mail.example.com" is within the domain "example.com", but "mail.bad-example.com" is not.
>という<目標名が有効にされたドメイン名の先祖であるか>という<目標名と有効にされたドメイン名が同じであるなら、このメカニズムは合っています。 例えば: "mail.example.com"はドメイン"example.com"の中のそうですが、"mail.bad-example.com"はそうであるというわけではありません。
Note: Use of this mechanism is discouraged because it is slow, it is not as reliable as other mechanisms in cases of DNS errors, and it places a large burden on the arpa name servers. If used, proper PTR records must be in place for the domain's hosts and the "ptr" mechanism should be one of the last mechanisms checked.
Note: Use of this mechanism is discouraged because it is slow, it is not as reliable as other mechanisms in cases of DNS errors, and it places a large burden on the arpa name servers. If used, proper PTR records must be in place for the domain's hosts and the "ptr" mechanism should be one of the last mechanisms checked.
5.6. "ip4" and "ip6"
5.6. "ip4" and "ip6"
These mechanisms test whether <ip> is contained within a given IP network.
These mechanisms test whether <ip> is contained within a given IP network.
IP4 = "ip4" ":" ip4-network [ ip4-cidr-length ] IP6 = "ip6" ":" ip6-network [ ip6-cidr-length ]
IP4 = "ip4" ":" ip4-network [ ip4-cidr-length ] IP6 = "ip6" ":" ip6-network [ ip6-cidr-length ]
ip4-cidr-length = "/" 1*DIGIT ip6-cidr-length = "/" 1*DIGIT dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]
ip4-cidr-length = "/" 1*DIGIT ip6-cidr-length = "/" 1*DIGIT dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]
ip4-network = qnum "." qnum "." qnum "." qnum qnum = DIGIT ; 0-9 / %x31-39 DIGIT ; 10-99 / "1" 2DIGIT ; 100-199 / "2" %x30-34 DIGIT ; 200-249 / "25" %x30-35 ; 250-255 ; as per conventional dotted quad notation. e.g., 192.0.2.0 ip6-network = <as per [RFC 3513], section 2.2> ; e.g., 2001:DB8::CD30
ip4-network = qnum "." qnum "." qnum "." qnum qnum = DIGIT ; 0-9 / %x31-39 DIGIT ; 10-99 / "1" 2DIGIT ; 100-199 / "2" %x30-34 DIGIT ; 200-249 / "25" %x30-35 ; 250-255 ; as per conventional dotted quad notation. e.g., 192.0.2.0 ip6-network = <as per [RFC 3513], section 2.2> ; e.g., 2001:DB8::CD30
The <ip> is compared to the given network. If CIDR-length high-order bits match, the mechanism matches.
The <ip> is compared to the given network. If CIDR-length high-order bits match, the mechanism matches.
Wong & Schlitt Experimental [Page 21] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 21] RFC 4408 Sender Policy Framework (SPF) April 2006
If ip4-cidr-length is omitted, it is taken to be "/32". If ip6-cidr-length is omitted, it is taken to be "/128". It is not permitted to omit parts of the IP address instead of using CIDR notations. That is, use 192.0.2.0/24 instead of 192.0.2.
If ip4-cidr-length is omitted, it is taken to be "/32". If ip6-cidr-length is omitted, it is taken to be "/128". It is not permitted to omit parts of the IP address instead of using CIDR notations. That is, use 192.0.2.0/24 instead of 192.0.2.
5.7. "exists"
5.7. "exists"
This mechanism is used to construct an arbitrary domain name that is used for a DNS A record query. It allows for complicated schemes involving arbitrary parts of the mail envelope to determine what is permitted.
This mechanism is used to construct an arbitrary domain name that is used for a DNS A record query. It allows for complicated schemes involving arbitrary parts of the mail envelope to determine what is permitted.
exists = "exists" ":" domain-spec
exists = "exists" ":" domain-spec
The domain-spec is expanded as per Section 8. The resulting domain name is used for a DNS A RR lookup. If any A record is returned, this mechanism matches. The lookup type is A even when the connection type is IPv6.
The domain-spec is expanded as per Section 8. The resulting domain name is used for a DNS A RR lookup. If any A record is returned, this mechanism matches. The lookup type is A even when the connection type is IPv6.
Domains can use this mechanism to specify arbitrarily complex queries. For example, suppose example.com publishes the record:
Domains can use this mechanism to specify arbitrarily complex queries. For example, suppose example.com publishes the record:
v=spf1 exists:%{ir}.%{l1r+-}._spf.%{d} -all
v=spf1 exists:%{ir}.%{l1r+-}._spf.%{d} -all
The <target-name> might expand to "1.2.0.192.someuser._spf.example.com". This makes fine-grained decisions possible at the level of the user and client IP address.
The <target-name> might expand to "1.2.0.192.someuser._spf.example.com". This makes fine-grained decisions possible at the level of the user and client IP address.
This mechanism enables queries that mimic the style of tests that existing anti-spam DNS blacklists (DNSBL) use.
This mechanism enables queries that mimic the style of tests that existing anti-spam DNS blacklists (DNSBL) use.
6. Modifier Definitions
6. Modifier Definitions
Modifiers are name/value pairs that provide additional information. Modifiers always have an "=" separating the name and the value.
Modifiers are name/value pairs that provide additional information. Modifiers always have an "=" separating the name and the value.
The modifiers defined in this document ("redirect" and "exp") MAY appear anywhere in the record, but SHOULD appear at the end, after all mechanisms. Ordering of these two modifiers does not matter. These two modifiers MUST NOT appear in a record more than once each. If they do, then check_host() exits with a result of "PermError".
The modifiers defined in this document ("redirect" and "exp") MAY appear anywhere in the record, but SHOULD appear at the end, after all mechanisms. Ordering of these two modifiers does not matter. These two modifiers MUST NOT appear in a record more than once each. If they do, then check_host() exits with a result of "PermError".
Unrecognized modifiers MUST be ignored no matter where in a record, or how often. This allows implementations of this document to gracefully handle records with modifiers that are defined in other specifications.
Unrecognized modifiers MUST be ignored no matter where in a record, or how often. This allows implementations of this document to gracefully handle records with modifiers that are defined in other specifications.
Wong & Schlitt Experimental [Page 22] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 22] RFC 4408 Sender Policy Framework (SPF) April 2006
6.1. redirect: Redirected Query
6.1. redirect: Redirected Query
If all mechanisms fail to match, and a "redirect" modifier is present, then processing proceeds as follows:
If all mechanisms fail to match, and a "redirect" modifier is present, then processing proceeds as follows:
redirect = "redirect" "=" domain-spec
redirect = "redirect" "=" domain-spec
The domain-spec portion of the redirect section is expanded as per the macro rules in Section 8. Then check_host() is evaluated with the resulting string as the <domain>. The <ip> and <sender> arguments remain the same as current evaluation of check_host().
The domain-spec portion of the redirect section is expanded as per the macro rules in Section 8. Then check_host() is evaluated with the resulting string as the <domain>. The <ip> and <sender> arguments remain the same as current evaluation of check_host().
The result of this new evaluation of check_host() is then considered the result of the current evaluation with the exception that if no SPF record is found, or if the target-name is malformed, the result is a "PermError" rather than "None".
The result of this new evaluation of check_host() is then considered the result of the current evaluation with the exception that if no SPF record is found, or if the target-name is malformed, the result is a "PermError" rather than "None".
Note that the newly-queried domain may itself specify redirect processing.
Note that the newly-queried domain may itself specify redirect processing.
This facility is intended for use by organizations that wish to apply the same record to multiple domains. For example:
This facility is intended for use by organizations that wish to apply the same record to multiple domains. For example:
la.example.com. TXT "v=spf1 redirect=_spf.example.com" ny.example.com. TXT "v=spf1 redirect=_spf.example.com" sf.example.com. TXT "v=spf1 redirect=_spf.example.com" _spf.example.com. TXT "v=spf1 mx:example.com -all"
la.example.com. TXT "v=spf1 redirect=_spf.example.com" ny.example.com. TXT "v=spf1 redirect=_spf.example.com" sf.example.com. TXT "v=spf1 redirect=_spf.example.com" _spf.example.com. TXT "v=spf1 mx:example.com -all"
In this example, mail from any of the three domains is described by the same record. This can be an administrative advantage.
In this example, mail from any of the three domains is described by the same record. This can be an administrative advantage.
Note: In general, the domain "A" cannot reliably use a redirect to another domain "B" not under the same administrative control. Since the <sender> stays the same, there is no guarantee that the record at domain "B" will correctly work for mailboxes in domain "A", especially if domain "B" uses mechanisms involving localparts. An "include" directive may be more appropriate.
Note: In general, the domain "A" cannot reliably use a redirect to another domain "B" not under the same administrative control. Since the <sender> stays the same, there is no guarantee that the record at domain "B" will correctly work for mailboxes in domain "A", especially if domain "B" uses mechanisms involving localparts. An "include" directive may be more appropriate.
For clarity, it is RECOMMENDED that any "redirect" modifier appear as the very last term in a record.
For clarity, it is RECOMMENDED that any "redirect" modifier appear as the very last term in a record.
6.2. exp: Explanation
6.2. exp: Explanation
explanation = "exp" "=" domain-spec
explanation = "exp" "=" domain-spec
If check_host() results in a "Fail" due to a mechanism match (such as "-all"), and the "exp" modifier is present, then the explanation string returned is computed as described below. If no "exp" modifier
If check_host() results in a "Fail" due to a mechanism match (such as "-all"), and the "exp" modifier is present, then the explanation string returned is computed as described below. If no "exp" modifier
Wong & Schlitt Experimental [Page 23] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 23] RFC 4408 Sender Policy Framework (SPF) April 2006
is present, then either a default explanation string or an empty explanation string may be returned.
is present, then either a default explanation string or an empty explanation string may be returned.
The <domain-spec> is macro expanded (see Section 8) and becomes the <target-name>. The DNS TXT record for the <target-name> is fetched.
The <domain-spec> is macro expanded (see Section 8) and becomes the <target-name>. The DNS TXT record for the <target-name> is fetched.
If <domain-spec> is empty, or there are any DNS processing errors (any RCODE other than 0), or if no records are returned, or if more than one record is returned, or if there are syntax errors in the explanation string, then proceed as if no exp modifier was given.
If <domain-spec> is empty, or there are any DNS processing errors (any RCODE other than 0), or if no records are returned, or if more than one record is returned, or if there are syntax errors in the explanation string, then proceed as if no exp modifier was given.
The fetched TXT record's strings are concatenated with no spaces, and then treated as an <explain-string>, which is macro-expanded. This final result is the explanation string. Implementations MAY limit the length of the resulting explanation string to allow for other protocol constraints and/or reasonable processing limits. Since the explanation string is intended for an SMTP response and [RFC2821] Section 2.4 says that responses are in [US-ASCII], the explanation string is also limited to US-ASCII.
The fetched TXT record's strings are concatenated with no spaces, and then treated as an <explain-string>, which is macro-expanded. This final result is the explanation string. Implementations MAY limit the length of the resulting explanation string to allow for other protocol constraints and/or reasonable processing limits. Since the explanation string is intended for an SMTP response and [RFC2821] Section 2.4 says that responses are in [US-ASCII], the explanation string is also limited to US-ASCII.
Software evaluating check_host() can use this string to communicate information from the publishing domain in the form of a short message or URL. Software SHOULD make it clear that the explanation string comes from a third party. For example, it can prepend the macro string "%{o} explains: " to the explanation, such as shown in Section 2.5.4.
Software evaluating check_host() can use this string to communicate information from the publishing domain in the form of a short message or URL. Software SHOULD make it clear that the explanation string comes from a third party. For example, it can prepend the macro string "%{o} explains: " to the explanation, such as shown in Section 2.5.4.
Suppose example.com has this record:
Suppose example.com has this record:
v=spf1 mx -all exp=explain._spf.%{d}
v=spf1 mx -all exp=explain._spf.%{d}
Here are some examples of possible explanation TXT records at explain._spf.example.com:
Here are some examples of possible explanation TXT records at explain._spf.example.com:
"Mail from example.com should only be sent by its own servers." -- a simple, constant message
"Mail from example.com should only be sent by its own servers." -- a simple, constant message
"%{i} is not one of %{d}'s designated mail servers." -- a message with a little more information, including the IP address that failed the check
"%{i} is not one of %{d}'s designated mail servers." -- a message with a little more information, including the IP address that failed the check
"See http://%{d}/why.html?s=%{S}&i=%{I}" -- a complicated example that constructs a URL with the arguments to check_host() so that a web page can be generated with detailed, custom instructions
"See http://%{d}/why.html?s=%{S}&i=%{I}" -- a complicated example that constructs a URL with the arguments to check_host() so that a web page can be generated with detailed, custom instructions
Note: During recursion into an "include" mechanism, an exp= modifier from the <target-name> MUST NOT be used. In contrast, when executing
Note: During recursion into an "include" mechanism, an exp= modifier from the <target-name> MUST NOT be used. In contrast, when executing
Wong & Schlitt Experimental [Page 24] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 24] RFC 4408 Sender Policy Framework (SPF) April 2006
a "redirect" modifier, an exp= modifier from the original domain MUST NOT be used.
a "redirect" modifier, an exp= modifier from the original domain MUST NOT be used.
7. The Received-SPF Header Field
7. The Received-SPF Header Field
It is RECOMMENDED that SMTP receivers record the result of SPF processing in the message header. If an SMTP receiver chooses to do so, it SHOULD use the "Received-SPF" header field defined here for each identity that was checked. This information is intended for the recipient. (Information intended for the sender is described in Section 6.2, Explanation.)
It is RECOMMENDED that SMTP receivers record the result of SPF processing in the message header. If an SMTP receiver chooses to do so, it SHOULD use the "Received-SPF" header field defined here for each identity that was checked. This information is intended for the recipient. (Information intended for the sender is described in Section 6.2, Explanation.)
The Received-SPF header field is a trace field (see [RFC2822] Section 3.6.7) and SHOULD be prepended to the existing header, above the Received: field that is generated by the SMTP receiver. It MUST appear above all other Received-SPF fields in the message. The header field has the following format:
The Received-SPF header field is a trace field (see [RFC2822] Section 3.6.7) and SHOULD be prepended to the existing header, above the Received: field that is generated by the SMTP receiver. It MUST appear above all other Received-SPF fields in the message. The header field has the following format:
header-field = "Received-SPF:" [CFWS] result FWS [comment FWS] [ key-value-list ] CRLF
header-field = "Received-SPF:" [CFWS] result FWS [comment FWS] [ key-value-list ] CRLF
result = "Pass" / "Fail" / "SoftFail" / "Neutral" / "None" / "TempError" / "PermError"
result = "Pass" / "Fail" / "SoftFail" / "Neutral" / "None" / "TempError" / "PermError"
key-value-list = key-value-pair *( ";" [CFWS] key-value-pair ) [";"]
key-value-list = key-value-pair *( ";" [CFWS] key-value-pair ) [";"]
key-value-pair = key [CFWS] "=" ( dot-atom / quoted-string )
key-value-pair = key [CFWS] "=" ( dot-atom / quoted-string )
key = "client-ip" / "envelope-from" / "helo" / "problem" / "receiver" / "identity" / mechanism / "x-" name / name
key = "client-ip" / "envelope-from" / "helo" / "problem" / "receiver" / "identity" / mechanism / "x-" name / name
identity = "mailfrom" ; for the "MAIL FROM" identity / "helo" ; for the "HELO" identity / name ; other identities
identity = "mailfrom" ; for the "MAIL FROM" identity / "helo" ; for the "HELO" identity / name ; other identities
dot-atom = <unquoted word as per [RFC2822]> quoted-string = <quoted string as per [RFC2822]> comment = <comment string as per [RFC2822]> CFWS = <comment or folding white space as per [RFC2822]> FWS = <folding white space as per [RFC2822]> CRLF = <standard end-of-line token as per [RFC2822]>
dot-atom = <unquoted word as per [RFC2822]> quoted-string = <quoted string as per [RFC2822]> comment = <comment string as per [RFC2822]> CFWS = <comment or folding white space as per [RFC2822]> FWS = <folding white space as per [RFC2822]> CRLF = <standard end-of-line token as per [RFC2822]>
The header field SHOULD include a "(...)" style <comment> after the result, conveying supporting information for the result, such as <ip>, <sender>, and <domain>.
The header field SHOULD include a "(...)" style <comment> after the result, conveying supporting information for the result, such as <ip>, <sender>, and <domain>.
Wong & Schlitt Experimental [Page 25] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 25] RFC 4408 Sender Policy Framework (SPF) April 2006
The following key-value pairs are designed for later machine parsing. SPF clients SHOULD give enough information so that the SPF results can be verified. That is, at least "client-ip", "helo", and, if the "MAIL FROM" identity was checked, "envelope-from".
The following key-value pairs are designed for later machine parsing. SPF clients SHOULD give enough information so that the SPF results can be verified. That is, at least "client-ip", "helo", and, if the "MAIL FROM" identity was checked, "envelope-from".
client-ip the IP address of the SMTP client
client-ip the IP address of the SMTP client
envelope-from the envelope sender mailbox
envelope-from the envelope sender mailbox
helo the host name given in the HELO or EHLO command
helo the host name given in the HELO or EHLO command
mechanism the mechanism that matched (if no mechanisms matched, substitute the word "default")
mechanism the mechanism that matched (if no mechanisms matched, substitute the word "default")
problem if an error was returned, details about the error
problem if an error was returned, details about the error
receiver the host name of the SPF client
receiver the host name of the SPF client
identity the identity that was checked; see the <identity> ABNF rule
identity the identity that was checked; see the <identity> ABNF rule
Other keys may be defined by SPF clients. Until a new key name becomes widely accepted, new key names should start with "x-".
Other keys may be defined by SPF clients. Until a new key name becomes widely accepted, new key names should start with "x-".
SPF clients MUST make sure that the Received-SPF header field does not contain invalid characters, is not excessively long, and does not contain malicious data that has been provided by the sender.
SPF clients MUST make sure that the Received-SPF header field does not contain invalid characters, is not excessively long, and does not contain malicious data that has been provided by the sender.
Examples of various header styles that could be generated are the following:
Examples of various header styles that could be generated are the following:
Received-SPF: Pass (mybox.example.org: domain of myname@example.com designates 192.0.2.1 as permitted sender) receiver=mybox.example.org; client-ip=192.0.2.1; envelope-from=<myname@example.com>; helo=foo.example.com;
Received-SPF: Pass (mybox.example.org: domain of myname@example.com designates 192.0.2.1 as permitted sender) receiver=mybox.example.org; client-ip=192.0.2.1; envelope-from=<myname@example.com>; helo=foo.example.com;
Received-SPF: Fail (mybox.example.org: domain of myname@example.com does not designate 192.0.2.1 as permitted sender) identity=mailfrom; client-ip=192.0.2.1; envelope-from=<myname@example.com>;
Received-SPF: Fail (mybox.example.org: domain of myname@example.com does not designate 192.0.2.1 as permitted sender) identity=mailfrom; client-ip=192.0.2.1; envelope-from=<myname@example.com>;
Wong & Schlitt Experimental [Page 26] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 26] RFC 4408 Sender Policy Framework (SPF) April 2006
8. Macros
8. Macros
8.1. Macro Definitions
8.1. Macro Definitions
Many mechanisms and modifiers perform macro expansion on part of the term.
Many mechanisms and modifiers perform macro expansion on part of the term.
domain-spec = macro-string domain-end domain-end = ( "." toplabel [ "." ] ) / macro-expand
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
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 )
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 = "." / "-" / "+" / "," / "/" / "_" / "="
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 "%%".
A literal "%" is expressed by "%%".
"%_" expands to a single " " space. "%-" expands to a URL-encoded space, viz., "%20".
"%_" expands to a single " " space. "%-" expands to a URL-encoded space, viz., "%20".
The following macro letters are expanded in term arguments:
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
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
Wong & Schlitt Experimental [Page 27] RFC 4408 Sender Policy Framework (SPF) April 2006
The following macro letters are allowed only in "exp" text:
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
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
A '%' character not followed by a '{', '%', '-', or '_' character is a syntax error. So
-exists:%(ir).sbl.spamhaus.example.org
-exists:%(ir).sbl.spamhaus.example.org
is incorrect and will cause check_host() to return a "PermError". Instead, say
is incorrect and will cause check_host() to return a "PermError". Instead, say
-exists:%{ir}.sbl.spamhaus.example.org
-exists:%{ir}.sbl.spamhaus.example.org
Optional transformers are the following:
Optional transformers are the following:
*DIGIT = zero or more digits 'r' = reverse value, splitting on dots by default
*DIGIT = zero or more digits 'r' = reverse value, splitting on dots by default
If transformers or delimiters are provided, the replacement value for a macro letter is split into parts. After performing any reversal operation and/or removal of left-hand parts, the parts are rejoined using "." and not the original splitting characters.
If transformers or delimiters are provided, the replacement value for a macro letter is split into parts. After performing any reversal operation and/or removal of left-hand parts, the parts are rejoined using "." and not the original splitting characters.
By default, strings are split on "." (dots). Note that no special treatment is given to leading, trailing, or consecutive delimiters, and so the list of parts may contain empty strings. Older implementations of SPF prohibit trailing dots in domain names, so trailing dots should not be published by domain owners, although they must be accepted by implementations conforming to this document. Macros may specify delimiter characters that are used instead of ".".
By default, strings are split on "." (dots). Note that no special treatment is given to leading, trailing, or consecutive delimiters, and so the list of parts may contain empty strings. Older implementations of SPF prohibit trailing dots in domain names, so trailing dots should not be published by domain owners, although they must be accepted by implementations conforming to this document. Macros may specify delimiter characters that are used instead of ".".
The 'r' transformer indicates a reversal operation: if the client IP address were 192.0.2.1, the macro %{i} would expand to "192.0.2.1" and the macro %{ir} would expand to "1.2.0.192".
The 'r' transformer indicates a reversal operation: if the client IP address were 192.0.2.1, the macro %{i} would expand to "192.0.2.1" and the macro %{ir} would expand to "1.2.0.192".
The DIGIT transformer indicates the number of right-hand parts to use, after optional reversal. If a DIGIT is specified, the value MUST be nonzero. If no DIGITs are specified, or if the value specifies more parts than are available, all the available parts are used. If the DIGIT was 5, and only 3 parts were available, the macro interpreter would pretend the DIGIT was 3. Implementations MUST support at least a value of 128, as that is the maximum number of labels in a domain name.
The DIGIT transformer indicates the number of right-hand parts to use, after optional reversal. If a DIGIT is specified, the value MUST be nonzero. If no DIGITs are specified, or if the value specifies more parts than are available, all the available parts are used. If the DIGIT was 5, and only 3 parts were available, the macro interpreter would pretend the DIGIT was 3. Implementations MUST support at least a value of 128, as that is the maximum number of labels in a domain name.
Wong & Schlitt Experimental [Page 28] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 28] RFC 4408 Sender Policy Framework (SPF) April 2006
The "s" macro expands to the <sender> argument. It is an E-Mail address with a localpart, an "@" character, and a domain. The "l" macro expands to just the localpart. The "o" macro expands to just the domain part. Note that these values remain the same during recursive and chained evaluations due to "include" and/or "redirect". Note also that if the original <sender> had no localpart, the localpart was set to "postmaster" in initial processing (see Section 4.3).
The "s" macro expands to the <sender> argument. It is an E-Mail address with a localpart, an "@" character, and a domain. The "l" macro expands to just the localpart. The "o" macro expands to just the domain part. Note that these values remain the same during recursive and chained evaluations due to "include" and/or "redirect". Note also that if the original <sender> had no localpart, the localpart was set to "postmaster" in initial processing (see Section 4.3).
For IPv4 addresses, both the "i" and "c" macros expand to the standard dotted-quad format.
For IPv4 addresses, both the "i" and "c" macros expand to the standard dotted-quad format.
For IPv6 addresses, the "i" macro expands to a dot-format address; it is intended for use in %{ir}. The "c" macro may expand to any of the hexadecimal colon-format addresses specified in [RFC3513], Section 2.2. It is intended for humans to read.
For IPv6 addresses, the "i" macro expands to a dot-format address; it is intended for use in %{ir}. The "c" macro may expand to any of the hexadecimal colon-format addresses specified in [RFC3513], Section 2.2. It is intended for humans to read.
The "p" macro expands to the validated domain name of <ip>. The procedure for finding the validated domain name is defined in Section 5.5. If the <domain> is present in the list of validated domains, it SHOULD be used. Otherwise, if a subdomain of the <domain> is present, it SHOULD be used. Otherwise, any name from the list may be used. If there are no validated domain names or if a DNS error occurs, the string "unknown" is used.
The "p" macro expands to the validated domain name of <ip>. The procedure for finding the validated domain name is defined in Section 5.5. If the <domain> is present in the list of validated domains, it SHOULD be used. Otherwise, if a subdomain of the <domain> is present, it SHOULD be used. Otherwise, any name from the list may be used. If there are no validated domain names or if a DNS error occurs, the string "unknown" is used.
The "r" macro expands to the name of the receiving MTA. This SHOULD be a fully qualified domain name, but if one does not exist (as when the checking is done by a MUA) or if policy restrictions dictate otherwise, the word "unknown" SHOULD be substituted. The domain name may be different from the name found in the MX record that the client MTA used to locate the receiving MTA.
The "r" macro expands to the name of the receiving MTA. This SHOULD be a fully qualified domain name, but if one does not exist (as when the checking is done by a MUA) or if policy restrictions dictate otherwise, the word "unknown" SHOULD be substituted. The domain name may be different from the name found in the MX record that the client MTA used to locate the receiving MTA.
The "t" macro expands to the decimal representation of the approximate number of seconds since the Epoch (Midnight, January 1, 1970, UTC). This is the same value as is returned by the POSIX time() function in most standards-compliant libraries.
The "t" macro expands to the decimal representation of the approximate number of seconds since the Epoch (Midnight, January 1, 1970, UTC). This is the same value as is returned by the POSIX time() function in most standards-compliant libraries.
When the result of macro expansion is used in a domain name query, if the expanded domain name exceeds 253 characters (the maximum length of a domain name), the left side is truncated to fit, by removing successive domain labels until the total length does not exceed 253 characters.
When the result of macro expansion is used in a domain name query, if the expanded domain name exceeds 253 characters (the maximum length of a domain name), the left side is truncated to fit, by removing successive domain labels until the total length does not exceed 253 characters.
Uppercased macros expand exactly as their lowercased equivalents, and are then URL escaped. URL escaping must be performed for characters not in the "uric" set, which is defined in [RFC3986].
Uppercased macros expand exactly as their lowercased equivalents, and are then URL escaped. URL escaping must be performed for characters not in the "uric" set, which is defined in [RFC3986].
Wong & Schlitt Experimental [Page 29] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 29] RFC 4408 Sender Policy Framework (SPF) April 2006
Note: Care must be taken so that macro expansion for legitimate E-Mail does not exceed the 63-character limit on DNS labels. The localpart of E-Mail addresses, in particular, can have more than 63 characters between dots.
Note: Care must be taken so that macro expansion for legitimate E-Mail does not exceed the 63-character limit on DNS labels. The localpart of E-Mail addresses, in particular, can have more than 63 characters between dots.
Note: Domains should avoid using the "s", "l", "o", or "h" macros in conjunction with any mechanism directive. Although these macros are powerful and allow per-user records to be published, they severely limit the ability of implementations to cache results of check_host() and they reduce the effectiveness of DNS caches.
Note: Domains should avoid using the "s", "l", "o", or "h" macros in conjunction with any mechanism directive. Although these macros are powerful and allow per-user records to be published, they severely limit the ability of implementations to cache results of check_host() and they reduce the effectiveness of DNS caches.
Implementations should be aware that if no directive processed during the evaluation of check_host() contains an "s", "l", "o", or "h" macro, then the results of the evaluation can be cached on the basis of <domain> and <ip> alone for as long as the shortest Time To Live (TTL) of all the DNS records involved.
Implementations should be aware that if no directive processed during the evaluation of check_host() contains an "s", "l", "o", or "h" macro, then the results of the evaluation can be cached on the basis of <domain> and <ip> alone for as long as the shortest Time To Live (TTL) of all the DNS records involved.
8.2. Expansion Examples
8.2. Expansion Examples
The <sender> is strong-bad@email.example.com. The IPv4 SMTP client IP is 192.0.2.3. The IPv6 SMTP client IP is 2001:DB8::CB01. The PTR domain name of the client IP is mx.example.org.
The <sender> is strong-bad@email.example.com. The IPv4 SMTP client IP is 192.0.2.3. The IPv6 SMTP client IP is 2001:DB8::CB01. The PTR domain name of the client IP is mx.example.org.
macro expansion ------- ---------------------------- %{s} strong-bad@email.example.com %{o} email.example.com %{d} email.example.com %{d4} email.example.com %{d3} email.example.com %{d2} example.com %{d1} com %{dr} com.example.email %{d2r} example.email %{l} strong-bad %{l-} strong.bad %{lr} strong-bad %{lr-} bad.strong %{l1r-} strong
macro expansion ------- ---------------------------- %{s} strong-bad@email.example.com %{o} email.example.com %{d} email.example.com %{d4} email.example.com %{d3} email.example.com %{d2} example.com %{d1} com %{dr} com.example.email %{d2r} example.email %{l} strong-bad %{l-} strong.bad %{lr} strong-bad %{lr-} bad.strong %{l1r-} strong
Wong & Schlitt Experimental [Page 30] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 30] RFC 4408 Sender Policy Framework (SPF) April 2006
macro-string expansion -------------------------------------------------------------------- %{ir}.%{v}._spf.%{d2} 3.2.0.192.in-addr._spf.example.com %{lr-}.lp._spf.%{d2} bad.strong.lp._spf.example.com
macro-string expansion -------------------------------------------------------------------- %{ir}.%{v}._spf.%{d2} 3.2.0.192.in-addr._spf.example.com %{lr-}.lp._spf.%{d2} bad.strong.lp._spf.example.com
%{lr-}.lp.%{ir}.%{v}._spf.%{d2} bad.strong.lp.3.2.0.192.in-addr._spf.example.com
%{lr-}.lp.%{ir}.%{v}._spf.%{d2} bad.strong.lp.3.2.0.192.in-addr._spf.example.com
%{ir}.%{v}.%{l1r-}.lp._spf.%{d2} 3.2.0.192.in-addr.strong.lp._spf.example.com
%{ir}.%{v}.%{l1r-}.lp._spf.%{d2} 3.2.0.192.in-addr.strong.lp._spf.example.com
%{d2}.trusted-domains.example.net example.com.trusted-domains.example.net
%{d2}.trusted-domains.example.net example.com.trusted-domains.example.net
IPv6: %{ir}.%{v}._spf.%{d2} 1.0.B.C.0.0.0.0. 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.B.D.0.1.0.0.2.ip6._spf.example.com
IPv6: %{ir}.%{v}._spf.%{d2} 1.0.B.C.0.0.0.0. 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.B.D.0.1.0.0.2.ip6._spf.example.com
9. Implications
9. Implications
This section outlines the major implications that adoption of this document will have on various entities involved in Internet E-Mail. It is intended to make clear to the reader where this document knowingly affects the operation of such entities. This section is not a "how-to" manual, or a "best practices" document, and it is not a comprehensive list of what such entities should do in light of this document.
This section outlines the major implications that adoption of this document will have on various entities involved in Internet E-Mail. It is intended to make clear to the reader where this document knowingly affects the operation of such entities. This section is not a "how-to" manual, or a "best practices" document, and it is not a comprehensive list of what such entities should do in light of this document.
This section is non-normative.
This section is non-normative.
9.1. Sending Domains
9.1. Sending Domains
Domains that wish to be compliant with this specification will need to determine the list of hosts that they allow to use their domain name in the "HELO" and "MAIL FROM" identities. It is recognized that forming such a list is not just a simple technical exercise, but involves policy decisions with both technical and administrative considerations.
Domains that wish to be compliant with this specification will need to determine the list of hosts that they allow to use their domain name in the "HELO" and "MAIL FROM" identities. It is recognized that forming such a list is not just a simple technical exercise, but involves policy decisions with both technical and administrative considerations.
It can be helpful to publish records that include a "tracking exists:" mechanism. By looking at the name server logs, a rough list may then be generated. For example:
It can be helpful to publish records that include a "tracking exists:" mechanism. By looking at the name server logs, a rough list may then be generated. For example:
v=spf1 exists:_h.%{h}._l.%{l}._o.%{o}._i.%{i}._spf.%{d} ?all
v=spf1 exists:_h.%{h}._l.%{l}._o.%{o}._i.%{i}._spf.%{d} ?all
Wong & Schlitt Experimental [Page 31] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 31] RFC 4408 Sender Policy Framework (SPF) April 2006
9.2. Mailing Lists
9.2. Mailing Lists
Mailing lists must be aware of how they re-inject mail that is sent to the list. Mailing lists MUST comply with the requirements in [RFC2821], Section 3.10, and [RFC1123], Section 5.3.6, that say that the reverse-path MUST be changed to be the mailbox of a person or other entity who administers the list. Whereas the reasons for changing the reverse-path are many and long-standing, SPF adds enforcement to this requirement.
メーリングリストはそれらがどうリストに送られるメールを再注入するかを意識しているに違いありません。 メーリングリストはリストを管理する人か他の実体のメールボックスになるように逆経路を変えなければならないと言う[RFC2821]、セクション3.10、および[RFC1123]、セクション5.3.6における要件に従わなければなりません。 逆経路を変える理由は、多くであって長年ですが、SPFはこの要件に実施を加えます。
In practice, almost all mailing list software in use already complies with this requirement. Mailing lists that do not comply may or may not encounter problems depending on how access to the list is restricted. Such lists that are entirely internal to a domain (only people in the domain can send to or receive from the list) are not affected.
実際には、使用中のほとんどすべてのメーリングリストソフトウェアが既にこの要件に従います。 応じないメーリングリストはリストへのアクセスがどう制限されるかによることにおける問題に行きあたるかもしれません。 ドメイン(そのドメインの唯一の人々が、リストから発信するか、または受信できる)に完全に内部であることのそのようなリストは影響を受けません。
9.3. Forwarding Services and Aliases
9.3. 転送サービスと別名
Forwarding services take mail that is received at a mailbox and direct it to some external mailbox. At the time of this writing, the near-universal practice of such services is to use the original "MAIL FROM" of a message when re-injecting it for delivery to the external mailbox. [RFC1123] and [RFC2821] describe this action as an "alias" rather than a "mail list". This means that the external mailbox's MTA sees all such mail in a connection from a host of the forwarding service, and so the "MAIL FROM" identity will not, in general, pass authorization.
転送サービスは、メールボックスに受け取られるメールを取って、ある外部のメールボックスにそれを向けます。 この書くこと時点でそのようなサービスの近く普遍的な習慣がオリジナルを使用することになっている、「メール、」 aでは、配送のために外部のメールボックスにそれを再注入するときには、通信してください。 [RFC1123]と[RFC2821]は「メール・リスト」よりむしろ「別名」としてこの動作を記述します。 これが、外部のメールボックスのMTAが推進サービス、およびそうのホストから接続におけるそのようなすべてのメールを見ることを意味する、「一般に、」 アイデンティティからの郵便配達人は認可を通過しないでしょう。
There are three places that techniques can be used to ameliorate this problem.
この問題を改善するのに使用されるテクニックがあることができる3つの場所があります。
1. The beginning, when E-Mail is first sent.
1. 始め。(メールはその時、最初に、送られます)。
1. "Neutral" results could be given for IP addresses that may be forwarders, instead of "Fail" results. For example:
1. 「失敗してください」という結果の代わりに混載業者であるかもしれないIPアドレスのために「中立」の結果を与えるかもしれません。 例えば:
"v=spf1 mx -exists:%{ir}.sbl.spamhaus.example.org ?all"
「v=spf1 mxは存在しています:、%、不-、.sbl.spamhaus.example.org?すべて」
This would cause a lookup on an anti-spam DNS blacklist (DNSBL) and cause a result of "Fail" only for E-Mail coming from listed sources. All other E-Mail, including E-Mail sent through forwarders, would receive a "Neutral" result. By checking the DNSBL after the known good sources, problems with incorrect listing on the DNSBL are greatly reduced.
これは反スパムDNSブラックリスト(DNSBL)と原因に関するルックアップにメールのためだけの「失敗してください」が記載されたソースから来るという結果を引き起こすでしょう。 混載業者を通して送られたメールを含む他のすべてのメールが「中立」の結果を受けるでしょう。 知られている良いソースの後にDNSBLをチェックすることによって、DNSBLの上の不正確なリストに関する問題は大いに減少します。
Wong & Schlitt Experimental [Page 32] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[32ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
2. The "MAIL FROM" identity could have additional information in the localpart that cryptographically identifies the mail as coming from an authorized source. In this case, such an SPF record could be used:
2. 「」 アイデンティティからのメールはメールが認可されたソースから来ることであると暗号で認識するlocalpartに追加情報を持っているかもしれません。 この場合、そのようなSPF記録を使用できました:
"v=spf1 mx exists:%{l}._spf_verify.%{d} -all"
「v=spf1 mxは存在しています: l%_spf_が. %について確かめる、d、-すべて」
Then, a specialized DNS server can be set up to serve the _spf_verify subdomain that validates the localpart. Although this requires an extra DNS lookup, this happens only when the E-Mail would otherwise be rejected as not coming from a known good source.
そして、_spf_に役立つようにサーバをセットアップできる専門化しているDNSはlocalpartを有効にするサブドメインについて確かめます。 余分なDNSルックアップを必要としますが、そうでなければ、メールが知られている良いソースから来ないことで拒絶されるだろうというときだけ、これは起こります。
Note that due to the 63-character limit for domain labels, this approach only works reliably if the localpart signature scheme is guaranteed either to only produce localparts with a maximum of 63 characters or to gracefully handle truncated localparts.
ドメインラベルのための63キャラクタの限界へのそんなに当然の注意、localpart署名計画が最大63のキャラクタと共にlocalpartsを生産するだけであるか、または優雅に端が欠けているlocalpartsを扱うために保証される場合にだけ、このアプローチは確かに働いています。
3. Similarly, a specialized DNS server could be set up that will rate-limit the E-Mail coming from unexpected IP addresses.
3. 同様に、専門化しているDNSサーバはそれに設定されて、予期していなかったIPアドレスから来るメールをレートで制限するということであるかもしれません。
"v=spf1 mx exists:%{ir}._spf_rate.%{d} -all"
「v=spf1 mxは存在しています:、%、不-. _のspf_が. %がdであると評定する、-すべて」
4. SPF allows the creation of per-user policies for special cases. For example, the following SPF record and appropriate wildcard DNS records can be used:
4. SPFは特別なケースのための1ユーザあたりの方針の創造を許します。 例えば、以下のSPF記録と適切なワイルドカードDNS記録を使用できます:
"v=spf1 mx redirect=%{l1r+}._at_.%{o}._spf.%{d}"
「l1r+o_%_のv=spf1 mx再直接の=%_が. %をspfする、d、」
2. The middle, when E-Mail is forwarded.
2. メールを転送するときの中央。
1. Forwarding services can solve the problem by rewriting the "MAIL FROM" to be in their own domain. This means that mail bounced from the external mailbox will have to be re-bounced by the forwarding service. Various schemes to do this exist though they vary widely in complexity and resource requirements on the part of the forwarding service.
1. 転送サービスが書き直すことによって問題を解決できる、「メール、」 それら自身のドメインにあるように。 これは、外部のメールボックスから戻って来るメールが推進サービスで再戻って来なければならないことを意味します。 推進サービス側の複雑さとリソース要件でばらつきが大きいのですが、これをする様々な計画は存在しています。
2. Several popular MTAs can be forced from "alias" semantics to "mailing list" semantics by configuring an additional alias with "owner-" prepended to the original alias name (e.g., an alias of "friends: george@example.com, fred@example.org" would need another alias of the form "owner-friends: localowner").
2. オリジナルの別名にprependedされる「所有者」の追加別名名を構成することによって「通称」意味論から「メーリングリスト」意味論まで数個のポピュラーなMTAsを強制できる、(例えば、別名、「友人: george@example.com 、fred@example.org」がフォーム「所有者友人: localowner」の別の別名を必要とするだろう、)
Wong & Schlitt Experimental [Page 33] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[33ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
3. The end, when E-Mail is received.
3. 終わり。(その時、メールは受け取られています)。
1. If the owner of the external mailbox wishes to trust the forwarding service, he can direct the external mailbox's MTA to skip SPF tests when the client host belongs to the forwarding service.
1. 外部のメールボックスの所有者が推進サービスを信じたいなら、クライアントホストが推進サービスに属すと、彼は、SPFテストをサボるよう外部のメールボックスのMTAに指示できます。
2. Tests against other identities, such as the "HELO" identity, may be used to override a failed test against the "MAIL FROM" identity.
2. "HELO"のアイデンティティなどの他のアイデンティティに対するテストが失敗したテストをくつがえすのにおいて使用されているかもしれない、「」 アイデンティティからのメール。
3. For larger domains, it may not be possible to have a complete or accurate list of forwarding services used by the owners of the domain's mailboxes. In such cases, whitelists of generally-recognized forwarding services could be employed.
3. より大きいドメインには、ドメインのメールボックスの所有者に転送サービスの完全であるか正確なリストを使用させるのは、可能でないかもしれません。 そのような場合、一般に認識された転送サービスのwhitelistsを使うことができました。
9.4. Mail Services
9.4. サービスを郵送してください。
Service providers that offer mail services to third-party domains, such as sending of bulk mail, may want to adjust their setup in light of the authorization check described in this document. If the "MAIL FROM" identity used for such E-Mail uses the domain of the service provider, then the provider needs only to ensure that its sending host is authorized by its own SPF record, if any.
料金別納郵便を発信などにさせることなどの第三者ドメインに対するメールサービスを提供するサービスプロバイダーは本書では説明された許可検査の観点から彼らのセットアップを調整したがっているかもしれません。 「」 そのようなメールに使用されるアイデンティティからのメールはサービスプロバイダー、次に送付ホストがそれ自身のSPFによって権限を与えられるのを保証するためには唯一の必要性がもしあれば記録するプロバイダーのドメインを使用します。
If the "MAIL FROM" identity does not use the mail service provider's domain, then extra care must be taken. The SPF record format has several options for the third-party domain to authorize the service provider's MTAs to send mail on its behalf. For mail service providers, such as ISPs, that have a wide variety of customers using the same MTA, steps should be taken to prevent cross-customer forgery (see Section 10.4).
「」 アイデンティティからの郵便配達人はメールサービスプロバイダーのドメインを使用しないで、次に、余分な注意を払わなければなりません。 SPFレコード形式は、サービスプロバイダーのMTAsがそのに代わってメールを送るのを認可するために第三者ドメインにいくつかのオプションを持っています。 さまざまな顧客が同じMTAを使用することでいるISPなどのメールサービスプロバイダーにおいて、交差している顧客偽造を防ぐために方法を取るべきです(セクション10.4を見てください)。
9.5. MTA Relays
9.5. MTAリレー
The authorization check generally precludes the use of arbitrary MTA relays between sender and receiver of an E-Mail message.
一般に、許可検査はメールメッセージの送付者と受信機の間の任意のMTAリレーの使用を排除します。
Within an organization, MTA relays can be effectively deployed. However, for purposes of this document, such relays are effectively transparent. The SPF authorization check is a check between border MTAs of different domains.
組織の中では、事実上、MTAリレーを配備できます。 しかしながら、このドキュメントの目的のために、事実上、そのようなリレーはわかりやすいです。 SPF許可検査は異なったドメインの境界MTAsの間のチェックです。
For mail senders, this means that published SPF records must authorize any MTAs that actually send across the Internet. Usually, these are just the border MTAs as internal MTAs simply forward mail to these MTAs for delivery.
メール送付者に関しては、これは、発行されたSPF記録が実際にインターネットの向こう側に発信するどんなMTAsも認可しなければならないことを意味します。 通常、内部のMTAsが配送のために単にこれらのMTAsにメールを転送するとき、これらはまさしく境界MTAsです。
Wong & Schlitt Experimental [Page 34] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[34ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
Mail receivers will generally want to perform the authorization check at the border MTAs, specifically including all secondary MXs. This allows mail that fails to be rejected during the SMTP session rather than bounced. Internal MTAs then do not perform the authorization test. To perform the authorization test other than at the border, the host that first transferred the message to the organization must be determined, which can be difficult to extract from the message header. Testing other than at the border is not recommended.
一般に、明確にすべての二次MXsを含んでいて、メール受信機は境界MTAsで許可検査を実行したくなるでしょう。 これはSMTPセッションの間に弾むよりむしろ拒絶されないメールを許容します。 そして、内部のMTAsは認可テストを実行しません。 働くために、境界、組織へのメッセージが最初に移されたホスト以外の認可テスト(メッセージヘッダーから抽出するのは難しい場合がある)を決定しなければなりません。 境界以外に、テストするのは推薦されません。
10. Security Considerations
10. セキュリティ問題
10.1. Processing Limits
10.1. 処理限界
As with most aspects of E-Mail, there are a number of ways that malicious parties could use the protocol as an avenue for a Denial-of-Service (DoS) attack. The processing limits outlined here are designed to prevent attacks such as the following:
メールのほとんどの局面のように、悪意があるパーティーがサービスのDenial(DoS)攻撃に大通りとしてプロトコルを使用できるだろう多くの方法があります。 ここに概説された処理限界は以下などの攻撃を防ぐように設計されています:
o A malicious party could create an SPF record with many references to a victim's domain and send many E-Mails to different SPF clients; those SPF clients would then create a DoS attack. In effect, the SPF clients are being used to amplify the attacker's bandwidth by using fewer bytes in the SMTP session than are used by the DNS queries. Using SPF clients also allows the attacker to hide the true source of the attack.
o 悪意があるパーティーは、多くの参照でSPF記録を犠牲者のドメインに作成して、異なったSPFクライアントに多くのメールを送ることができました。 そして、それらのSPFクライアントはDoS攻撃を作成するでしょう。 事実上、SPFクライアントは、SMTPセッションにおけるDNS質問で使用されるより少ないバイトを使用することによって攻撃者の帯域幅を増幅するのに使用されています。 また、SPFクライアントを使用するのに、攻撃者は攻撃の正しい源を隠すことができます。
o Whereas implementations of check_host() are supposed to limit the number of DNS lookups, malicious domains could publish records that exceed these limits in an attempt to waste computation effort at their targets when they send them mail. Malicious domains could also design SPF records that cause particular implementations to use excessive memory or CPU usage, or to trigger bugs.
o チェック_ホスト()の実現はDNSルックアップの数を制限するべきですが、悪意があるドメインはメールをそれらに送るときそれらの目標で計算の努力を浪費する試みでこれらの限界を超えている記録を発表するかもしれません。 また、悪意があるドメインは特定の実現が過度の記憶かCPU用法を使用するか、またはバグの引き金となることを引き起こすSPF記録を設計するかもしれません。
o Malicious parties could send a large volume of mail purporting to come from the intended target to a wide variety of legitimate mail hosts. These legitimate machines would then present a DNS load on the target as they fetched the relevant records.
o 悪意があるパーティーは多くの郵便配達人に意図している目標から正統のさまざまなメールホストに来ることを意味させることができました。 そして、彼らが関連記録をとって来たので、これらの正統のマシンは目標の上にDNS荷重を示すでしょう。
Of these, the case of a third party referenced in the SPF record is the easiest for a DoS attack to effectively exploit. As a result, limits that may seem reasonable for an individual mail server can still allow an unreasonable amount of bandwidth amplification. Therefore, the processing limits need to be quite low.
これらでは、DoS攻撃に、SPF記録で参照をつけられる第三者のケースは事実上、利用するのが最も簡単です。 その結果、個々のメールサーバに妥当に思えるかもしれない限界はまだ無理な量の帯域幅増幅を許すことができます。 したがって、処理限界は、かなり低い必要があります。
SPF implementations MUST limit the number of mechanisms and modifiers that do DNS lookups to at most 10 per SPF check, including any lookups caused by the use of the "include" mechanism or the
またはSPF実現がメカニズムの数を制限しなければならなくて、「インクルード」メカニズムの使用で引き起こされたどんなルックアップも含んでいて、高々10への1SPFあたりのルックアップをDNSにする修飾語がチェックする。
Wong & Schlitt Experimental [Page 35] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[35ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
"redirect" modifier. If this number is exceeded during a check, a PermError MUST be returned. The "include", "a", "mx", "ptr", and "exists" mechanisms as well as the "redirect" modifier do count against this limit. The "all", "ip4", and "ip6" mechanisms do not require DNS lookups and therefore do not count against this limit. The "exp" modifier does not count against this limit because the DNS lookup to fetch the explanation string occurs after the SPF record has been evaluated.
「再直接」の修飾語。 チェックの間、この数を超えているなら、PermErrorを返さなければなりません。 「再直接」の修飾語と同様に「包含」、“a"、"mx"、"ptr"、および「存在」メカニズムはこの限界に不利となります。 「すべて」、「ip4"、「ip6"メカニズムは、DNSルックアップを必要としないで、またしたがって、この限界に不利となりません」。 SPF記録が評価された後に説明ストリングをとって来るDNSルックアップが起こるので、"exp"修飾語はこの限界に不利となりません。
When evaluating the "mx" and "ptr" mechanisms, or the %{p} macro, there MUST be a limit of no more than 10 MX or PTR RRs looked up and checked.
"mx"と"ptr"メカニズム、または%を評価する、p、マクロ、10未満MXの限界があるに違いないか、PTR RRsは見上げて、チェックしました。
SPF implementations SHOULD limit the total amount of data obtained from the DNS queries. For example, when DNS over TCP or EDNS0 are available, there may need to be an explicit limit to how much data will be accepted to prevent excessive bandwidth usage or memory usage and DoS attacks.
SPF実現SHOULDはDNS質問から得られたデータの総量を制限します。 TCPかEDNS0の上のDNSが利用可能であるときに、例えば、そこでは、過度の帯域幅用法かメモリ使用量とDoS攻撃を防ぐためにどのくらいのデータを受け入れるかへの明白な限界であることが必要であるかもしれません。
MTAs or other processors MAY also impose a limit on the maximum amount of elapsed time to evaluate check_host(). Such a limit SHOULD allow at least 20 seconds. If such a limit is exceeded, the result of authorization SHOULD be "TempError".
また、MTAsか他のプロセッサが、最大の量の経過時間にチェック_ホスト()を評価するために指し値するかもしれません。 SHOULDが少なくとも20秒許容するそのような限界。 限界がそのようなものであるなら超えられて、認可の結果がSHOULDである、"TempError"はそうです。
Domains publishing records SHOULD try to keep the number of "include" mechanisms and chained "redirect" modifiers to a minimum. Domains SHOULD also try to minimize the amount of other DNS information needed to evaluate a record. This can be done by choosing directives that require less DNS information and placing lower-cost mechanisms earlier in the SPF record.
記録SHOULDが数を保とうとするドメイン出版は、メカニズムを「含ん」で、「再直接」の修飾語を最小限に束縛しました。 また、ドメインSHOULDは情報が記録を評価する必要があった他のDNSの量を最小にしようとします。 より少ないDNS情報を必要とする指示を選んで、より早く低い費用メカニズムをSPF記録に置くことによって、これができます。
For example, consider a domain set up as follows:
例えば、セットアップされたドメインは以下の通りであると考えてください:
example.com. IN MX 10 mx.example.com. mx.example.com. IN A 192.0.2.1 a.example.com. IN TXT "v=spf1 mx:example.com -all" b.example.com. IN TXT "v=spf1 a:mx.example.com -all" c.example.com. IN TXT "v=spf1 ip4:192.0.2.1 -all"
example.com。 IN MX10mx.example.com. mx.example.com。 IN A192.0.2.1a.example.com。 IN TXT、「v=spf1 mx: example.com、-すべて」、b. example.com。 IN TXT、「v=spf1 a: mx.example.com、-すべて」、c. example.com。 IN TXT、「v=spf1 ip4: 192.0 .2 .1 -すべて」
Evaluating check_host() for the domain "a.example.com" requires the MX records for "example.com", and then the A records for the listed hosts. Evaluating for "b.example.com" requires only the A records. Evaluating for "c.example.com" requires none.
ドメイン「a.example.com」にチェック_ホスト()を評価するのは、"example.com"のためにMX記録を必要として、記載されたホストのために次にA記録を必要とします。 「b.example.com」のための評価はA記録だけを必要とします。 「c.example.com」のための評価はなにも必要としません。
However, there may be administrative considerations: using "a" over "ip4" allows hosts to be renumbered easily. Using "mx" over "a" allows the set of mail hosts to be changed easily.
しかしながら、管理問題があるかもしれません: 「ip4"は、ホストが容易に番号を付け替えられるのを許容する」上で“a"を使用します。 “a"の上で"mx"を使用するのに、メールホストのセットは容易に変化します。
Wong & Schlitt Experimental [Page 36] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[36ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
10.2. SPF-Authorized E-Mail May Contain Other False Identities
10.2. SPFによって認可されたメールは他の偽名を含むかもしれません。
The "MAIL FROM" and "HELO" identity authorizations must not be construed to provide more assurance than they do. It is entirely possible for a malicious sender to inject a message using his own domain in the identities used by SPF, to have that domain's SPF record authorize the sending host, and yet the message can easily list other identities in its header. Unless the user or the MUA takes care to note that the authorized identity does not match the other more commonly-presented identities (such as the From: header field), the user may be lulled into a false sense of security.
「より多くの保証を提供するために解釈されるより」 "HELO"アイデンティティ承認からのメールを解釈してはいけません。 悪意がある送付者がそのドメインのSPF記録を送付ホストに権限を与えさせるSPFによって使用されたアイデンティティに彼自身のドメインを使用するメッセージを注入するのが、完全に可能ですが、メッセージはヘッダーに容易に他のアイデンティティを記載できます。 ユーザかMUAが認可されたアイデンティティが他の一般的により提示されたアイデンティティ(From:ヘッダーフィールドなどの)に合っていないことに注意するために注意しない場合、ユーザは大丈夫だという誤った感覚に和らげられるかもしれません。
10.3. Spoofed DNS and IP Data
10.3. だまされたDNSとIPデータ
There are two aspects of this protocol that malicious parties could exploit to undermine the validity of the check_host() function:
悪意があるパーティーがチェック_ホスト()機能の正当性をひそかに害するのに利用できたこのプロトコルの2つの局面があります:
o The evaluation of check_host() relies heavily on DNS. A malicious attacker could attack the DNS infrastructure and cause check_host() to see spoofed DNS data, and then return incorrect results. This could include returning "Pass" for an <ip> value where the actual domain's record would evaluate to "Fail". See [RFC3833] for a description of DNS weaknesses.
o チェック_ホスト()の評価は大いにDNSを当てにします。 悪意がある攻撃者はDNSインフラストラクチャを攻撃できました、そして、会う原因チェック_ホスト()はDNSデータをだましました、そして、不正確な結果がその時、戻ります。 これは、実際のドメインの記録が「失敗する」と評価する<ip>価値のために「パス」を返すのを含むかもしれません。 DNS弱点の記述に関して[RFC3833]を見てください。
o The client IP address, <ip>, is assumed to be correct. A malicious attacker could spoof TCP sequence numbers to make mail appear to come from a permitted host for a domain that the attacker is impersonating.
o クライアントIPアドレス(<ip>)が正しいと思われます。 悪意がある攻撃者は、メールを受入れられたホストから攻撃者がまねているドメインに来るように見えさせるようにTCP一連番号をだますことができました。
10.4. Cross-User Forgery
10.4. 交差しているユーザ偽造
By definition, SPF policies just map domain names to sets of authorized MTAs, not whole E-Mail addresses to sets of authorized users. Although the "l" macro (Section 8) provides a limited way to define individual sets of authorized MTAs for specific E-Mail addresses, it is generally impossible to verify, through SPF, the use of specific E-Mail addresses by individual users of the same MTA.
定義上、SPF方針はただ認定ユーザのセットへの全体のメールアドレスではなく、認可されたMTAsのセットにドメイン名を写像します。 「l」マクロ(セクション8)は特定のメールアドレスのために認可されたMTAsの個々のセットを定義する限られた方法を提供しますが、一般に、確かめるのは不可能です、SPFを通して、同じMTAの個々のユーザによる特定のメールアドレスの使用。
It is up to mail services and their MTAs to directly prevent cross-user forgery: based on SMTP AUTH ([RFC2554]), users should be restricted to using only those E-Mail addresses that are actually under their control (see [RFC4409], Section 6.1). Another means to verify the identity of individual users is message cryptography such as PGP ([RFC2440]) or S/MIME ([RFC3851]).
直接交差しているユーザ偽造を防ぐのは、メールサービスとそれらのMTAs次第です: SMTP AUTH([RFC2554])に基づいて、ユーザは実際に彼らのコントロールの下にないそれらのメールアドレスしか使用するのに制限されるべきです([RFC4409]を見てください、セクション6.1)。 個々のユーザのアイデンティティについて確かめる別の手段はPGP([RFC2440])かS/MIME([RFC3851])などのメッセージ暗号です。
Wong & Schlitt Experimental [Page 37] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[37ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
10.5. Untrusted Information Sources
10.5. 信頼されていない情報源
SPF uses information supplied by third parties, such as the "HELO" domain name, the "MAIL FROM" address, and SPF records. This information is then passed to the receiver in the Received-SPF: trace fields and possibly returned to the client MTA in the form of an SMTP rejection message. This information must be checked for invalid characters and excessively long lines.
SPFが"HELO"ドメイン名などの第三者によって提供された情報を使用する、「」 アドレス、およびSPFから、記録を郵送してください。 次に、この情報はReceived-SPFの受信機に通過されます: 跡は、SMTP拒絶メッセージの形のクライアントMTAにさばいて、ことによると戻りました。 無効のキャラクタと過度に長い線がないかどうかこの情報をチェックしなければなりません。
When the authorization check fails, an explanation string may be included in the reject response. Both the sender and the rejecting receiver need to be aware that the explanation was determined by the publisher of the SPF record checked and, in general, not the receiver. The explanation may contain malicious URLs, or it may be offensive or misleading.
許可検査が失敗すると、説明ストリングは廃棄物応答に含まれるかもしれません。 送付者と拒絶受信機の両方が、説明がチェックされたSPF記録の出版社で断固としていて一般に、受信機でなかったのを意識している必要があります。それは、説明が悪意があるURLを含むかもしれませんか、不快であるか、または紛らわしいかもしれません。
This is probably less of a concern than it may initially seem since such messages are returned to the sender, and the explanation strings come from the sender policy published by the domain in the identity claimed by that very sender. As long as the DSN is not redirected to someone other than the actual sender, the only people who see malicious explanation strings are people whose messages claim to be from domains that publish such strings in their SPF records. In practice, DSNs can be misdirected, such as when an MTA accepts an E-Mail and then later generates a DSN to a forged address, or when an E-Mail forwarder does not direct the DSN back to the original sender.
そのようなメッセージを送付者に返すので、関心ではこれはたぶん初めは見えるかもしれないより少ないです、そして、説明ストリングはまさしくその送付者によって要求されたアイデンティティにおけるドメインによって発行された送付者方針から来ます。 DSNが実際の送付者以外のだれかに向け直されない限り、悪意がある説明ストリングを見る唯一の人々がメッセージがそれらのSPF記録でそのようなストリングを発行するドメインからあると主張する人々です。 実際には、DSNsは的外れである場合があります、MTAがいつメールを受け入れて、次に、後で偽造アドレスにDSNを発生させるか、そして、またはE-Mail混載業者がいつDSNを元の送り主にあてて戻さないのなどように。
10.6. Privacy Exposure
10.6. プライバシ暴露
Checking SPF records causes DNS queries to be sent to the domain owner. These DNS queries, especially if they are caused by the "exists" mechanism, can contain information about who is sending E-Mail and likely to which MTA the E-Mail is being sent. This can introduce some privacy concerns, which may be more or less of an issue depending on local laws and the relationship between the domain owner and the person sending the E-Mail.
SPF記録をチェックするのに、DNS質問をドメイン所有者に送ります。 特にそれらが「存在」メカニズムによって引き起こされるなら、これらのDNS質問はだれがメールを送って、どのMTAにメールを送るかにありそうであるかの情報を含むことができます。 これはいくつかのプライバシーの問題を紹介できます。(プライバシーの問題は多少地域法による問題とドメイン所有者と人とのメールを送る関係のものであるかもしれません)。
11. Contributors and Acknowledgements
11. 貢献者と承認
This document is largely based on the work of Meng Weng Wong and Mark Lentczner. Although, as this section acknowledges, many people have contributed to this document, a very large portion of the writing and editing are due to Meng and Mark.
このドキュメントはMeng WengウォンとマークLentcznerの仕事に主に基づいています。 このセクションが承認するような多くの人々がいましたが、寄付して、このドキュメント、ライティング、編集の非常に大きい部分には、Mengへの支払われるべきものとマークがいます。
This design owes a debt of parentage to [RMX] by Hadmut Danisch and to [DMP] by Gordon Fecyk. The idea of using a DNS record to check the legitimacy of an E-Mail address traces its ancestry further back through messages on the namedroppers mailing list by Paul Vixie
このデザインはゴードンFecykで[RMX]から生まれの負債をHadmut Danischと[DMP]に借りています。 メールアドレスの合法性をチェックするのにDNS記録を使用するという考えはさらにnamedroppersメーリングリストに関するメッセージを通してポールVixieで祖先をつけます。
Wong & Schlitt Experimental [Page 38] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[38ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
[Vixie] (based on suggestion by Jim Miller) and by David Green [Green].
[Vixie](ジム・ミラーによる勧めに基づいている)とデヴィッド・グリーン[グリーン]。
Philip Gladstone contributed the concept of macros to the specification, multiplying the expressiveness of the language and making per-user and per-IP lookups possible.
フィリップGladstoneはマクロの概念を仕様に寄付しました、言語の表情の豊かさを掛けて、ユーザとIPあたりのルックアップを可能にして。
The authors would also like to thank the literally hundreds of individuals who have participated in the development of this design. They are far too numerous to name, but they include the following:
また、作者が感謝したがっている、文字通り数百、このデザインの開発に参加した個人について。 それらは命名できないくらい非常に多いのですが、彼らは以下を含んでいます:
The folks on the spf-discuss mailing list. The folks on the SPAM-L mailing list. The folks on the IRTF ASRG mailing list. The folks on the IETF MARID mailing list. The folks on #perl.
人々、オンである、メーリングリストについてspf議論してください。 スパムLメーリングリストの人々。 IRTF ASRGメーリングリストの人々。 IETF MARIDメーリングリストの人々。 #パールの人々。
12. IANA Considerations
12. IANA問題
12.1. The SPF DNS Record Type
12.1. SPF DNSレコード種類
The IANA has assigned a new Resource Record Type and Qtype from the DNS Parameters Registry for the SPF RR type with code 99.
IANAは新しいResource Record Typeを割り当てました、そして、SPF RRのためのDNS Parameters RegistryからのQtypeはコード99でタイプします。
12.2. The Received-SPF Mail Header Field
12.2. 受け取られていているSPFメールヘッダ分野
Per [RFC3864], the "Received-SPF:" header field is added to the IANA Permanent Message Header Field Registry. The following is the registration template:
[RFC3864]単位で「受け取られていているSPF:」 ヘッダーフィールドはIANA Permanent Message Header Field Registryに加えられます。 ↓これは登録テンプレートです:
Header field name: Received-SPF Applicable protocol: mail ([RFC2822]) Status: Experimental Author/Change controller: IETF Specification document(s): RFC 4408 Related information: Requesting SPF Council review of any proposed changes and additions to this field are recommended. For information about the SPF Council see http://www.openspf.org/Council
ヘッダーフィールド名: 受け取られていているSPF Applicableは議定書を作ります: ([RFC2822])状態を郵送してください: 実験的なAuthor/変化コントローラ: IETF Specificationは(s)を記録します: RFC4408の関連情報: いずれかのSPF Councilレビューを要求すると、変化は提案されました、そして、この分野への追加はお勧めです。 SPF Councilの情報に関しては、 http://www.openspf.org/Council を見てください。
13. References
13. 参照
13.1. Normative References
13.1. 引用規格
[RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987.
[RFC1035]Mockapetris、P.、「ドメイン名--、実現と仕様、」、STD13、RFC1035、11月1987日
Wong & Schlitt Experimental [Page 39] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[39ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
[RFC1123] Braden, R., "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, October 1989.
[RFC1123]ブレーデン、R.、「インターネットホストのための要件--、アプリケーションとサポート、」、STD3、RFC1123、10月1989日
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119] ブラドナー、S.、「Indicate Requirement LevelsへのRFCsにおける使用のためのキーワード」、BCP14、RFC2119、1997年3月。
[RFC2821] Klensin, J., "Simple Mail Transfer Protocol", RFC 2821, April 2001.
[RFC2821] Klensin、J.、「簡単なメール転送プロトコル」、RFC2821、2001年4月。
[RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 2001.
[RFC2822] レズニック、P.、「インターネットメッセージ・フォーマット」、RFC2822、2001年4月。
[RFC3464] Moore, K. and G. Vaudreuil, "An Extensible Message Format for Delivery Status Notifications", RFC 3464, January 2003.
[RFC3464] ムーアとK.とG.ボードルイ、「配送状態通知のための広げることができるメッセージ・フォーマット」、RFC3464、2003年1月。
[RFC3513] Hinden, R. and S. Deering, "Internet Protocol Version 6 (IPv6) Addressing Architecture", RFC 3513, April 2003.
[RFC3513]HindenとR.とS.デアリング、「インターネットプロトコルバージョン6(IPv6)アドレッシング体系」、RFC3513、2003年4月。
[RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, September 2004.
[RFC3864]KlyneとG.とノッティンガム、M.とJ.ムガール人、「メッセージヘッダーフィールドのための登録手順」BCP90、2004年9月のRFC3864。
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.
[RFC3986] バーナーズ・リー、T.、フィールディング、R.、およびL.Masinter、「Uniform Resource Identifier(URI):」 「一般的な構文」、STD66、RFC3986、2005年1月。
[RFC4234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 4234, October 2005.
[RFC4234] クロッカー、D.、およびP.Overell、「構文仕様のための増大しているBNF:」 "ABNF"、2005年10月のRFC4234。
[US-ASCII] American National Standards Institute (formerly United States of America Standards Institute), "USA Code for Information Interchange, X3.4", 1968.
[米国-ASCII] American National Standards Institut(以前アメリカ合衆国規格研究所)、「米国情報交換用符号、X3.4"、1968。」
ANSI X3.4-1968 has been replaced by newer versions with slight modifications, but the 1968 version remains definitive for the Internet.
わずかな変更でANSI X3.4-1968をより新しいバージョンに取り替えましたが、1968年のバージョンはインターネットに決定的に残っています。
13.2 Informative References
13.2 有益な参照
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, November 1987.
[RFC1034]Mockapetris、P.、「ドメイン名--、概念と施設、」、STD13、RFC1034、11月1987日
[RFC1983] Malkin, G., "Internet Users' Glossary", RFC 1983, August 1996.
[RFC1983] マルキン、G.、「インターネットユーザの用語集」、RFC1983、1996年8月。
[RFC2440] Callas, J., Donnerhacke, L., Finney, H., and R. Thayer, "OpenPGP Message Format", RFC 2440, November 1998.
[RFC2440] カラスとJ.とDonnerhackeとL.とフィニー、H.とR.セイヤー、「OpenPGPメッセージ・フォーマット」、RFC2440、1998年11月。
Wong & Schlitt Experimental [Page 40] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[40ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
[RFC2554] Myers, J., "SMTP Service Extension for Authentication", RFC 2554, March 1999.
[RFC2554] マイアーズ、J.、「認証のためのSMTPサービス拡張子」、RFC2554、1999年3月。
[RFC3696] Klensin, J., "Application Techniques for Checking and Transformation of Names", RFC 3696, February 2004.
[RFC3696] Klensin、J.、「名前の照合と変化のためのアプリケーションのテクニック」、RFC3696、2004年2月。
[RFC3833] Atkins, D. and R. Austein, "Threat Analysis of the Domain Name System (DNS)", RFC 3833, August 2004.
[RFC3833] アトキンスとD.とR.Austein、「ドメインネームシステム(DNS)の脅威分析」、RFC3833、2004年8月。
[RFC3851] Ramsdell, B., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Message Specification", RFC 3851, July 2004.
[RFC3851] Ramsdell、B.、「安全な/マルチパーパスインターネットメールエクステンション(S/MIME)バージョン3.1メッセージ仕様」、RFC3851、2004年7月。
[RFC4409] Gellens, R. and J. Klensin, "Message Submission for Mail", RFC 4409, April 2006.
[RFC4409] GellensとR.とJ.Klensin、「メールのためのメッセージ提案」、RFC4409、2006年4月。
[RMX] Danish, H., "The RMX DNS RR Type for light weight sender authentication", Work In Progress
[RMX] デンマーク語、H.、「軽量送付者認証のためのRMX DNS RR Type」Work In Progress
[DMP] Fecyk, G., "Designated Mailers Protocol", Work In Progress
[DMP]Fecyk(「郵送者プロトコルに指定された」G.)は進行中で働いています。
[Vixie] Vixie, P., "Repudiating MAIL FROM", 2002.
[Vixie]Vixie、P.、「メールを否認する」、2002
[Green] Green, D., "Domain-Authorized SMTP Mail", 2002.
[グリーン]グリーン、D.、「ドメインで認可されたSMTPメール」、2002。
Wong & Schlitt Experimental [Page 41] RFC 4408 Sender Policy Framework (SPF) April 2006
ウォンとSchlittの実験的な[41ページ]RFC4408送付者方針枠組み(SPF)の2006年4月
Appendix A. Collected ABNF
付録A.はABNFを集めました。
This section is normative and any discrepancies with the ABNF fragments in the preceding text are to be resolved in favor of this grammar.
このセクションは規範的です、そして、ABNF断片が前のテキストにあるどんな食い違いもこの文法を支持して決議されることです。
See [RFC4234] for ABNF notation. Please note that as per this ABNF definition, literal text strings (those in quotes) are case- insensitive. Hence, "mx" matches "mx", "MX", "mX", and "Mx".
ABNF記法に関して[RFC4234]を見てください。 このABNF定義に従って、文字通りのテキスト文字列(引用文のそれら)はケース神経が鈍いです。 したがって、"mx"は"mx"、「Mx」「Mx」、および「Mx」に合っています。
record = version terms *SP version = "v=spf1"
記録=バージョン用語*SPバージョン="v=spf1""
terms = *( 1*SP ( directive / modifier ) )
用語は*と等しいです。(1*SP(指示/修飾語))
directive = [ qualifier ] mechanism qualifier = "+" / "-" / "?" / "~" mechanism = ( all / include / A / MX / PTR / IP4 / IP6 / exists )
指示=[資格を与える人]メカニズム資格を与える人=「+」/「-」/“?" /「~」メカニズム=(/インクルード/A/ MX / PTR / IP4 / IP6 /はすべて、存在しています)
all = "all" include = "include" ":" domain-spec A = "a" [ ":" domain-spec ] [ dual-cidr-length ] MX = "mx" [ ":" domain-spec ] [ dual-cidr-length ] PTR = "ptr" [ ":" domain-spec ] IP4 = "ip4" ":" ip4-network [ ip4-cidr-length ] IP6 = "ip6" ":" ip6-network [ ip6-cidr-length ] exists = "exists" ":" domain-spec
「すべてが「」 インクルード=「インクルード」」と等しいです」 「"ptr"[「:」 ドメイン仕様]「Mx」[「:」 ドメイン仕様][二元的なcidrの長さ]ドメイン仕様A=“a"[「:」 ドメイン仕様][二元的なcidrの長さ]Mx=PTR=IP4は"ip4""と等しいです」 「ip4-ネットワーク[ip4-cidr-長さ]IP6は"ip6""と等しいです」 「ip6-ネットワーク[ip6-cidr-長さ]が存在している、=が「存在している」、」、:、」 ドメイン仕様
modifier = redirect / explanation / unknown-modifier redirect = "redirect" "=" domain-spec explanation = "exp" "=" domain-spec unknown-modifier = name "=" macro-string
modifier = redirect / explanation / unknown-modifier redirect = "redirect" "=" domain-spec explanation = "exp" "=" domain-spec unknown-modifier = name "=" macro-string
ip4-cidr-length = "/" 1*DIGIT ip6-cidr-length = "/" 1*DIGIT dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]
ip4-cidr-length = "/" 1*DIGIT ip6-cidr-length = "/" 1*DIGIT dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]
ip4-network = qnum "." qnum "." qnum "." qnum qnum = DIGIT ; 0-9 / %x31-39 DIGIT ; 10-99 / "1" 2DIGIT ; 100-199 / "2" %x30-34 DIGIT ; 200-249 / "25" %x30-35 ; 250-255 ; conventional dotted quad notation. e.g., 192.0.2.0 ip6-network = <as per [RFC 3513], section 2.2> ; e.g., 2001:DB8::CD30
ip4-network = qnum "." qnum "." qnum "." qnum qnum = DIGIT ; 0-9 / %x31-39 DIGIT ; 10-99 / "1" 2DIGIT ; 100-199 / "2" %x30-34 DIGIT ; 200-249 / "25" %x30-35 ; 250-255 ; conventional dotted quad notation. e.g., 192.0.2.0 ip6-network = <as per [RFC 3513], section 2.2> ; e.g., 2001:DB8::CD30
Wong & Schlitt Experimental [Page 42] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 42] RFC 4408 Sender Policy Framework (SPF) April 2006
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)
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
alphanum = ALPHA / DIGIT
explain-string = *( macro-string / SP )
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 = "." / "-" / "+" / "," / "/" / "_" / "="
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 = "." / "-" / "+" / "," / "/" / "_" / "="
name = ALPHA *( ALPHA / DIGIT / "-" / "_" / "." )
name = ALPHA *( ALPHA / DIGIT / "-" / "_" / "." )
header-field = "Received-SPF:" [CFWS] result FWS [comment FWS] [ key-value-list ] CRLF
header-field = "Received-SPF:" [CFWS] result FWS [comment FWS] [ key-value-list ] CRLF
result = "Pass" / "Fail" / "SoftFail" / "Neutral" / "None" / "TempError" / "PermError"
result = "Pass" / "Fail" / "SoftFail" / "Neutral" / "None" / "TempError" / "PermError"
key-value-list = key-value-pair *( ";" [CFWS] key-value-pair ) [";"]
key-value-list = key-value-pair *( ";" [CFWS] key-value-pair ) [";"]
key-value-pair = key [CFWS] "=" ( dot-atom / quoted-string )
key-value-pair = key [CFWS] "=" ( dot-atom / quoted-string )
key = "client-ip" / "envelope-from" / "helo" / "problem" / "receiver" / "identity" / mechanism / "x-" name / name
key = "client-ip" / "envelope-from" / "helo" / "problem" / "receiver" / "identity" / mechanism / "x-" name / name
identity = "mailfrom" ; for the "MAIL FROM" identity / "helo" ; for the "HELO" identity / name ; other identities
identity = "mailfrom" ; for the "MAIL FROM" identity / "helo" ; for the "HELO" identity / name ; other identities
dot-atom = <unquoted word as per [RFC2822]> quoted-string = <quoted string as per [RFC2822]> comment = <comment string as per [RFC2822]> CFWS = <comment or folding white space as per [RFC2822]> FWS = <folding white space as per [RFC2822]> CRLF = <standard end-of-line token as per [RFC2822]>
dot-atom = <unquoted word as per [RFC2822]> quoted-string = <quoted string as per [RFC2822]> comment = <comment string as per [RFC2822]> CFWS = <comment or folding white space as per [RFC2822]> FWS = <folding white space as per [RFC2822]> CRLF = <standard end-of-line token as per [RFC2822]>
Wong & Schlitt Experimental [Page 43] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 43] RFC 4408 Sender Policy Framework (SPF) April 2006
Appendix B. Extended Examples
Appendix B. Extended Examples
These examples are based on the following DNS setup:
These examples are based on the following DNS setup:
; A domain with two mail servers, two hosts ; and two servers at the domain name $ORIGIN example.com. @ MX 10 mail-a MX 20 mail-b A 192.0.2.10 A 192.0.2.11 amy A 192.0.2.65 bob A 192.0.2.66 mail-a A 192.0.2.129 mail-b A 192.0.2.130 www CNAME example.com.
; A domain with two mail servers, two hosts ; and two servers at the domain name $ORIGIN example.com. @ MX 10 mail-a MX 20 mail-b A 192.0.2.10 A 192.0.2.11 amy A 192.0.2.65 bob A 192.0.2.66 mail-a A 192.0.2.129 mail-b A 192.0.2.130 www CNAME example.com.
; A related domain $ORIGIN example.org. @ MX 10 mail-c mail-c A 192.0.2.140
; A related domain $ORIGIN example.org. @ MX 10 mail-c mail-c A 192.0.2.140
; The reverse IP for those addresses $ORIGIN 2.0.192.in-addr.arpa. 10 PTR example.com. 11 PTR example.com. 65 PTR amy.example.com. 66 PTR bob.example.com. 129 PTR mail-a.example.com. 130 PTR mail-b.example.com. 140 PTR mail-c.example.org.
; The reverse IP for those addresses $ORIGIN 2.0.192.in-addr.arpa. 10 PTR example.com. 11 PTR example.com. 65 PTR amy.example.com. 66 PTR bob.example.com. 129 PTR mail-a.example.com. 130 PTR mail-b.example.com. 140 PTR mail-c.example.org.
; A rogue reverse IP domain that claims to be ; something it's not $ORIGIN 0.0.10.in-addr.arpa. 4 PTR bob.example.com.
; A rogue reverse IP domain that claims to be ; something it's not $ORIGIN 0.0.10.in-addr.arpa. 4 PTR bob.example.com.
B.1. Simple Examples
B.1. Simple Examples
These examples show various possible published records for example.com and which values if <ip> would cause check_host() to return "Pass". Note that <domain> is "example.com".
These examples show various possible published records for example.com and which values if <ip> would cause check_host() to return "Pass". Note that <domain> is "example.com".
v=spf1 +all -- any <ip> passes
v=spf1 +all -- any <ip> passes
v=spf1 a -all -- hosts 192.0.2.10 and 192.0.2.11 pass
v=spf1 a -all -- hosts 192.0.2.10 and 192.0.2.11 pass
Wong & Schlitt Experimental [Page 44] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 44] RFC 4408 Sender Policy Framework (SPF) April 2006
v=spf1 a:example.org -all -- no sending hosts pass since example.org has no A records
v=spf1 a:example.org -all -- no sending hosts pass since example.org has no A records
v=spf1 mx -all -- sending hosts 192.0.2.129 and 192.0.2.130 pass
v=spf1 mx -all -- sending hosts 192.0.2.129 and 192.0.2.130 pass
v=spf1 mx:example.org -all -- sending host 192.0.2.140 passes
v=spf1 mx:example.org -all -- sending host 192.0.2.140 passes
v=spf1 mx mx:example.org -all -- sending hosts 192.0.2.129, 192.0.2.130, and 192.0.2.140 pass
v=spf1 mx mx:example.org -all -- sending hosts 192.0.2.129, 192.0.2.130, and 192.0.2.140 pass
v=spf1 mx/30 mx:example.org/30 -all -- any sending host in 192.0.2.128/30 or 192.0.2.140/30 passes
v=spf1 mx/30 mx:example.org/30 -all -- any sending host in 192.0.2.128/30 or 192.0.2.140/30 passes
v=spf1 ptr -all -- sending host 192.0.2.65 passes (reverse DNS is valid and is in example.com) -- sending host 192.0.2.140 fails (reverse DNS is valid, but not in example.com) -- sending host 10.0.0.4 fails (reverse IP is not valid)
v=spf1 ptr -all -- sending host 192.0.2.65 passes (reverse DNS is valid and is in example.com) -- sending host 192.0.2.140 fails (reverse DNS is valid, but not in example.com) -- sending host 10.0.0.4 fails (reverse IP is not valid)
v=spf1 ip4:192.0.2.128/28 -all -- sending host 192.0.2.65 fails -- sending host 192.0.2.129 passes
v=spf1 ip4:192.0.2.128/28 -all -- sending host 192.0.2.65 fails -- sending host 192.0.2.129 passes
B.2. Multiple Domain Example
B.2. Multiple Domain Example
These examples show the effect of related records:
These examples show the effect of related records:
example.org: "v=spf1 include:example.com include:example.net -all"
example.org: "v=spf1 include:example.com include:example.net -all"
This record would be used if mail from example.org actually came through servers at example.com and example.net. Example.org's designated servers are the union of example.com's and example.net's designated servers.
This record would be used if mail from example.org actually came through servers at example.com and example.net. Example.org's designated servers are the union of example.com's and example.net's designated servers.
la.example.org: "v=spf1 redirect=example.org" ny.example.org: "v=spf1 redirect=example.org" sf.example.org: "v=spf1 redirect=example.org"
la.example.org: "v=spf1 redirect=example.org" ny.example.org: "v=spf1 redirect=example.org" sf.example.org: "v=spf1 redirect=example.org"
These records allow a set of domains that all use the same mail system to make use of that mail system's record. In this way, only the mail system's record needs to be updated when the mail setup changes. These domains' records never have to change.
These records allow a set of domains that all use the same mail system to make use of that mail system's record. In this way, only the mail system's record needs to be updated when the mail setup changes. These domains' records never have to change.
Wong & Schlitt Experimental [Page 45] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 45] RFC 4408 Sender Policy Framework (SPF) April 2006
B.3. DNSBL Style Example
B.3. DNSBL Style Example
Imagine that, in addition to the domain records listed above, there are these:
Imagine that, in addition to the domain records listed above, there are these:
$ORIGIN _spf.example.com. mary.mobile-users A 127.0.0.2 fred.mobile-users A 127.0.0.2 15.15.168.192.joel.remote-users A 127.0.0.2 16.15.168.192.joel.remote-users A 127.0.0.2
$ORIGIN _spf.example.com. mary.mobile-users A 127.0.0.2 fred.mobile-users A 127.0.0.2 15.15.168.192.joel.remote-users A 127.0.0.2 16.15.168.192.joel.remote-users A 127.0.0.2
The following records describe users at example.com who mail from arbitrary servers, or who mail from personal servers.
The following records describe users at example.com who mail from arbitrary servers, or who mail from personal servers.
example.com:
example.com:
v=spf1 mx include:mobile-users._spf.%{d} include:remote-users._spf.%{d} -all
v=spf1 mx include:mobile-users._spf.%{d} include:remote-users._spf.%{d} -all
mobile-users._spf.example.com:
mobile-users._spf.example.com:
v=spf1 exists:%{l1r+}.%{d}
v=spf1 exists:%{l1r+}.%{d}
remote-users._spf.example.com:
remote-users._spf.example.com:
v=spf1 exists:%{ir}.%{l1r+}.%{d}
v=spf1 exists:%{ir}.%{l1r+}.%{d}
B.4. Multiple Requirements Example
B.4. Multiple Requirements Example
Say that your sender policy requires both that the IP address is within a certain range and that the reverse DNS for the IP matches. This can be done several ways, including the following:
Say that your sender policy requires both that the IP address is within a certain range and that the reverse DNS for the IP matches. This can be done several ways, including the following:
example.com. SPF ( "v=spf1 " "-include:ip4._spf.%{d} " "-include:ptr._spf.%{d} " "+all" ) ip4._spf.example.com. SPF "v=spf1 -ip4:192.0.2.0/24 +all" ptr._spf.example.com. SPF "v=spf1 -ptr +all"
example.com. SPF ( "v=spf1 " "-include:ip4._spf.%{d} " "-include:ptr._spf.%{d} " "+all" ) ip4._spf.example.com. SPF "v=spf1 -ip4:192.0.2.0/24 +all" ptr._spf.example.com. SPF "v=spf1 -ptr +all"
This example shows how the "-include" mechanism can be useful, how an SPF record that ends in "+all" can be very restrictive, and the use of De Morgan's Law.
This example shows how the "-include" mechanism can be useful, how an SPF record that ends in "+all" can be very restrictive, and the use of De Morgan's Law.
Wong & Schlitt Experimental [Page 46] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 46] RFC 4408 Sender Policy Framework (SPF) April 2006
Authors' Addresses
Authors' Addresses
Meng Weng Wong Singapore
Meng Weng Wong Singapore
EMail: mengwong+spf@pobox.com
EMail: mengwong+spf@pobox.com
Wayne Schlitt 4615 Meredeth #9 Lincoln Nebraska, NE 68506 United States of America
Wayne Schlitt 4615 Meredeth #9 Lincoln Nebraska, NE 68506 United States of America
EMail: wayne@schlitt.net URI: http://www.schlitt.net/spf/
EMail: wayne@schlitt.net URI: http://www.schlitt.net/spf/
Wong & Schlitt Experimental [Page 47] RFC 4408 Sender Policy Framework (SPF) April 2006
Wong & Schlitt Experimental [Page 47] RFC 4408 Sender Policy Framework (SPF) April 2006
Full Copyright Statement
Full Copyright Statement
Copyright (C) The Internet Society (2006).
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
Intellectual Property
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
Acknowledgement
Acknowledgement
Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).
Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).
Wong & Schlitt Experimental [Page 48]
Wong & Schlitt Experimental [Page 48]
一覧
スポンサーリンク