#include "spf.h"
#include "spf_request.h"
Include dependency graph for spf_response.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
The results of the SPF check (as defined by the official SPF spec)
To quote from doc/draft-mengwong-spf-00.txt Section 3:
3. SPF Record Evaluation
An SPF client evaluates an SPF record and produces one of seven results:
None: The domain does not publish SPF data.
Neutral (?): The SPF client MUST proceed as if a domain did not publish SPF data. This result occurs if the domain explicitly specifies a "?" value, or if processing "falls off the end" of the SPF record.
Pass (+): the message meets the publishing domain's definition of legitimacy. MTAs proceed to apply local policy and MAY accept or reject the message accordingly.
Fail (-): the message does not meet a domain's definition of legitimacy. MTAs MAY reject the message using a permanent failure reply code. (Code 550 is RECOMMENDED. See RFC2821 section 7.1.)
Softfail (~): the message does not meet a domain's strict definition of legitimacy, but the domain cannot confidently state that the message is a forgery. MTAs SHOULD accept the message but MAY subject it to a higher transaction cost, deeper scrutiny, or an unfavourable score.
There are two error conditions, one temporary and one permanent.
Error: indicates an error during lookup; an MTA MAY reject the message using a transient failure code, such as 450.
Unknown: indicates incomplete processing: an MTA MUST proceed as if a domain did not publish SPF data.
When SPF-aware SMTP receivers accept a message, they SHOULD prepend a Received-SPF header. See section 6.
SPF clients MUST use the algorithm described in this section or its functional equivalent.
If an SPF client encounters a syntax error in an SPF record, it must terminate processing and return a result of "unknown".
note: SPF_RESULT_* values are constrained by the internal PREFIX_* values
Definition in file spf_response.h.
|
|
|
The reason that the result was returned This is what triggered the SPF result. Usually, it is a mechanism in the SPF record that causes the result, but if it was something else, the calling program will often want to take a different action or issue a different message. |
|
Definition at line 164 of file spf_response.h. |
|
|
|
error codes returned by various SPF functions. (including SPF_compile() and SPF_id2str(), spf_result(), etc.). The function SPF_strerror() will return a longer explanation of these errors.
Definition at line 118 of file spf_response.h. |
|
The reason that the result was returned This is what triggered the SPF result. Usually, it is a mechanism in the SPF record that causes the result, but if it was something else, the calling program will often want to take a different action or issue a different message.
Definition at line 99 of file spf_response.h. |
|
Definition at line 78 of file spf_response.h. |
|
Definition at line 314 of file spf_response.c. References SPF_error_struct::code. Referenced by main(), and SPF_record_compile(). |
|
Definition at line 326 of file spf_response.c. References SPF_error_struct::is_error. Referenced by main(), and SPF_record_compile(). |
|
Definition at line 320 of file spf_response.c. References SPF_error_struct::message. Referenced by main(). |
|
Definition at line 256 of file spf_response.c. References NULL, and SPF_ADD_ERROR. Referenced by SPF_record_compile(), SPF_server_get_record(), SPF_server_set_explanation(), and SPF_server_set_localpolicy(). |
|
Definition at line 247 of file spf_response.c. References SPF_ADD_ERROR. |
|
Internal functions for adding errors. Definition at line 238 of file spf_response.c. References SPF_ADD_ERROR. Referenced by SPF_record_compile(). |
|
Definition at line 282 of file spf_response.c. References NULL, and SPF_ADD_WARN. Referenced by SPF_request_get_exp(). |
|
Definition at line 273 of file spf_response.c. References SPF_ADD_WARN. |
|
Definition at line 264 of file spf_response.c. References SPF_ADD_WARN. Referenced by SPF_record_compile(). |
|
Definition at line 90 of file spf_response.c. References main(), SPF_response_result(), SPF_RESULT_FAIL, SPF_RESULT_INVALID, SPF_RESULT_NEUTRAL, SPF_RESULT_PASS, SPF_RESULT_PERMERROR, SPF_RESULT_SOFTFAIL, and SPF_RESULT_TEMPERROR. Here is the call graph for this function: ![]() |
|
Definition at line 147 of file spf_response.c. References SPF_response_struct::err. Referenced by main(). |
|
How many errors were generated? Definition at line 296 of file spf_response.c. References SPF_response_struct::num_errors. Referenced by main(), and SPF_record_compile(). |
|
|
Definition at line 177 of file spf_response.c. References SPF_response_struct::explanation. |
|
Definition at line 165 of file spf_response.c. References SPF_response_struct::header_comment. |
|
Definition at line 153 of file spf_response.c. References SPF_response_struct::received_spf. |
|
Definition at line 159 of file spf_response.c. References SPF_response_struct::received_spf_value. |
|
Definition at line 171 of file spf_response.c. References SPF_response_struct::smtp_comment. |
|
Returns an individual message Definition at line 308 of file spf_response.c. References SPF_response_struct::errors. Referenced by main(), and SPF_record_compile(). |
|
How many warnings were generated? Definition at line 290 of file spf_response.c. References SPF_response_struct::errors_length. Referenced by main(), and SPF_record_compile(). |
|
Definition at line 37 of file spf_response.c. References SPF_response_struct::result, SPF_response_struct::spf_request, and SPF_RESULT_INVALID. Referenced by main(), SPF_request_query_fallback(), SPF_request_query_mailfrom(), SPF_request_query_rcptto(), SPF_server_set_explanation(), and SPF_server_set_localpolicy(). |
|
Definition at line 141 of file spf_response.c. References SPF_response_struct::reason. |
|
Definition at line 135 of file spf_response.c. References SPF_response_struct::result. Referenced by main(), and SPF_response_combine(). |
|
Errors + warnings Definition at line 302 of file spf_response.c. References SPF_response_struct::errors_length, and SPF_response_struct::num_errors. |