How to install/enable SPF records for all accounts on cPanel server – command line option

Let’s start with SPF, what does it stand for?

Sender Policy Framework is abbreviated as SPF. This’s an email authentication measure. It’s designed to protect email spoofing by validating emails from a domain with its host’s reputed IP addresses. The authorised hosts details are addedd into the DNS (Domain Name System) of a domain as TXT record.

We already discussed the command to install/enable the SPF record for an account under the WHM server. Please refer this topic for more details, “How to add/enable SPF record for an account – cPanel server command line option

Here I am explaining the method for installing the SPF record for all accounts under your cPanel server. We need username of all accounts to enable the SPF record. We can fetch the user name from the location “/var/cpanel/users”.

Please do follow the steps below to enable the SPF for all accounts on the server.

Step I : Login to server as root.

Step II : Change the directory to “/var/cpanel/users

# cd /var/cpanel/users

Step III : Execute the following;

for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done

See this to enable SPF and DKIM for all accounts.

That’s it 🙂

Also read;

1, Important cPanel service’s configuration file, path, service name, port – Command line view
2, How to enable Varnish in cPanel server

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

2 thoughts on “How to install/enable SPF records for all accounts on cPanel server – command line option

Leave a Reply

Your email address will not be published. Required fields are marked *