Child pages
  • The SPF and DKIM Global Settings Script
For cPanel & WHM version 70

Skip to end of metadata
Go to start of metadata

Overview

The /usr/local/cpanel/scripts/enable_spf_dkim_globally script enables SPF and DKIM for the specified users, and creates the appropriate DNS records for their domains.

  • If the system detects that a DKIM record exists for a domain, it will not update it.
  • If the system detects that an SPF record exists for a domain, it will update it.

The enable_spf_dkim_globally script

To use the /usr/local/cpanel/script/enable_spf_dkim_globally script, run the following command as the root user:

/scripts/enable_spf_dkim_globally -x --user=user1 --user=user2

In this example, user1 and user2 represent usernames for which you wish to enable SPF and DKIM. 

Arguments

The /usr/local/cpanel/scripts/enable_spf_dkim_globally script accepts the following arguments:

ArgumentDescription
-xYou must include this argument for the script to apply its changes. If you do not include this argument, the script returns a warning.
--user

Use this argument to specify each account for which you wish to enable SPF and DKIM and create the appropriate DNS records. 

Important:

  • To specify multiple users, add the argument once for each user, as in the example above.
  • If you do not specify at least one user, the script enables SPF and DKIM and updates DNS records for all users on the server.


Additional documentation