/usr/local/cpanel/bin/spf_installer script allows you to add an SPF record to all of a user's domains' zone files from the command line. For more information about SPF records, read our Email Deliverability in cPanel documentation.
/scripts/enable_spf_dkim_globally script allows you to enable SPF and DKIM for accounts that exist on the server, and to create the appropriate DNS records for their domains. For more information, read our The enable_spf_dkim_globally Script documentation.
To use this script, run the following command:
This example uses the following variables:
|The username to whose domains you wish to assign SPF records.|
|A comma-delimited list of SPF records that you wish to assign to or remove from the user's domains.|
v=spf1 +a +mx +ip4:192.0.2.0/24,-ip4:203.0.113.5,+ip6:2001:db8:1a34::/64
Whether the SPF key is a complete SPF entry (ends with
Whether to overwrite the existing domains' and subdomains' SPF records with the value of the
Whether to add the new set of keys to the existing records.
/usr/local/cpanel/bin/spf_installer script accepts the following arguments:
|Displays the help text for this script.|| |
Success and failure
If the function does not succeed, you will receive the following error message:
If the function succeeds, you will not receive confirmation from the command line. To confirm that the function succeeded, navigate to cPanel's Email Deliverability in cPanel interface (cPanel >> Home >> Email >> Authentication) for each domain that the user owns.