This function applies a DMARC record to the specified domain(s).
policy required | string The DMARC record to apply to the requested domains. Note: When using multiple policies, each policy must have a matching domain. When using a single policy, it will be applied to all specified domains. Visit the following link for more information about the DMARC record specification: https://dmarc.org/resources/specification/ policy=policy="v=DMARC1; p=none;" policy="v=DMARC1; p=reject;" policy="v=DMARC1; p=quarantine;" policy=policy="v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com" |
domain | string The domain for which to apply the DMARC record. Note: To apply multiple domain DMARC records, duplicate the parameter name. For example, use the If you do not include this argument, the system applies the DMARC record to all domains on the system. domain=domain=example-1.com domain=example-2.com domain=example-3.com domain=example.com |
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ apply_dmarc \ domain='example.com' \ policy='v=DMARC1; p=reject;'
{- "data": {
- "payload": [
- {
- "domain": "example.com",
- "msg": "[ADD:TXT@_dmarc.example.com:v=DMARC1; p=reject;]",
- "status": 1
}
]
}, - "metadata": {
- "command": "apply_dmarc",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}