This function installs a Sender Policy Framework (SPF) record for a domain on the DNS server.
uapi --output=jsonpretty \ --user=username \ EmailAuth \ install_spf_records \ domain='example.com' \ record='"v=spf1 ip4:10.0.0.1 %2Ba %2Bmx %2Bip4:10.0.0.2 %2Bip4:10.0.0.3 -all"'
{- "apiversion": 3,
- "func": "install_spf_records",
- "module": "EmailAuth",
- "result": {
- "data": [
- {
- "domain": "example.com",
- "msg": "[ADD:TXT@example.com.:v=spf1 ip4:10.0.0.1 %2Ba %2Bmx %2Bip4:10.0.0.2 %2Bip4:10.0.0.3 -all]",
- "status": 1
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}