Mail
Mail DNS Settings
Validate domain SPF records
This function validates a Sender Policy Framework (SPF) record for one or more domains.
get/validate_current_spfs
Query parameters
domainstring domain required
The domain for which to check the SPF records.
Response
HTTP Request was successful.
Example response
{
"data": {
"payload": [
{
"domain": "example.com",
"expected": "ip6:0:0:0:0:0:ffff:c0a8:101",
"ip_address": "0:0:0:0:0:ffff:c0a8:101",
"ip_version": 6,
"records": [
{
"current": "v=spf1 ~all",
"reason": "example.com: Sender is not authorized by default to use 'example.com' in 'helo' identity (mechanism '-all' matched)",
"state": "FAIL"
}
],
"state": "VALID"
},
{
"domain": "example2.com",
"error": "(XID rm8h9f) DNS returned “SERVFAIL” (code 2) in response to the system’s query for “example2.com”’s “TXT” records.",
"ip_address": "198.252.32.45",
"ip_version": 4,
"records": [],
"state": "ERROR"
}
]
},
"metadata": {
"command": "validate_current_spfs",
"reason": "OK",
"result": 1,
"version": 1
}
}