This function validates a Sender Policy Framework (SPF) record for one or more domains.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ validate_current_spfs \ domain='example.com'
{- "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
}
}