char *ip_address, char *mail_from_domain, char *helo_domain,
char *spf_record, int softfail_okay_flag, char *human_readable,
size_t human_readable_len, int *used_mfrom
Validate a passed in SPF record or look up one and validate it.
May be called anytime all its needed information is gathered. The envelope sender (MAIL From: or mlfi_envfrom)
is the earliest it can be called. The mlfi_eom() is the optimum time because that is the only
routine that can add a header.
||A pointer to a string representation of an IPv4 or IPv6 address.
||This can be the domain itself, or the full sender address or even the
angle brace enclosed address. Any of of those will work, including the
empty address <> and the literal MAILER_DAEMON.
||This is the domain specified with the HELO command. This domain is ignored
if the mail_from_domain contains an actual domain.
||If not NULL, is a string containing the SPF record to validate.
If NULL, the record will be looked up based on either the mail_from_domain or helo_domain/.
||If zero softfails (~all and ?all) are treated the same as if the are hard fails.
If non-zero, softfails are threated as a pass.
||If not NULL, is the address of a string buffer into which to scribble a human readble reason for
||The sizeof() or number of characters available in human_readable.
||Address of an integer into which either TRUE or FALSE will be written. If TRUE,
the mail_from_domain was used to validate the SPF record. If FALSE,
the helo_domain was used to validate the SPF record.
- DMARC_POLICY_SPF_OUTCOME_PASS -- On success
- DMARC_POLICY_SPF_OUTCOME_FAIL -- If the SPF record check failed.
- DMARC_POLICY_SPF_OUTCOME_TMPFAIL -- If there was as recoverable failure.
- DMARC_POLICY_SPF_OUTCOME_NONE -- If domain did not have an spf record.
- This spf record check performs it own DNS lookups. There are no hooks provided
to subsitute your own DNS lookup routines at this time.