2
** Copyright 2004 Double Precision, Inc.
3
** See COPYING for distribution information.
9
static const char rfc1035_spf_h_rcsid[]="$Id: spf.h,v 1.1 2004/08/15 16:41:02 mrsam Exp $";
11
#include "rfc1035/rfc1035.h"
18
An SPF client evaluates an SPF record and produces one of seven
21
None: The domain does not publish SPF data.
23
Neutral (?): The SPF client MUST proceed as if a domain did not
24
publish SPF data. This result occurs if the domain explicitly
25
specifies a "?" value, or if processing "falls off the end" of
28
Pass (+): the message meets the publishing domain's definition of
29
legitimacy. MTAs proceed to apply local policy and MAY accept or
30
reject the message accordingly.
32
Fail (-): the message does not meet a domain's definition of
33
legitimacy. MTAs MAY reject the message using a permanent
34
failure reply code. (Code 550 is RECOMMENDED. See [RFC2821]
37
Softfail (~): the message does not meet a domain's strict
38
definition of legitimacy, but the domain cannot confidently state
39
that the message is a forgery. MTAs SHOULD accept the message
40
but MAY subject it to a higher transaction cost, deeper scrutiny,
41
or an unfavourable score.
43
There are two error conditions, one temporary and one permanent.
45
Error: indicates an error during lookup; an MTA SHOULD reject the
46
message using a transient failure code, such as 450.
48
Unknown: indicates incomplete processing: an MTA MUST proceed as
49
if a domain did not publish SPF data.
53
#define SPF_NEUTRAL '?'
56
#define SPF_SOFTFAIL '~'
59
/* Everything else is SPF_UNKNOWN */
60
#define SPF_UNKNOWN '5'
62
char rfc1035_spf_lookup(const char *mailfrom,
63
const char *tcpremoteip,
64
const char *tcpremotehost,
65
const char *helodomain,
68
size_t errmsg_buf_size);
71
struct rfc1035_spf_info {
73
const char *current_domain;
74
const char *tcpremoteip;
75
const char *tcpremotehost;
76
const char *helodomain;
79
size_t errmsg_buf_size;