Enabling email authentication (SPF and DKIM)
cPanel is a Linux-based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides capabilities for administrators, resellers, and end-user website owners to control the various aspects of website and server administration through a standard web browser.
In addition to the GUI, cPanel also has command line and API-based access that allows third party software vendors, web hosting organizations, and developers to automate standard system administration processes.
cPanel is designed to function either as a dedicated server or virtual private server. The latest cPanel version supports installation on CentOS, Red Hat Enterprise Linux (RHEL), and CloudLinux OS. cPanel 11.30 is the last major version to support FreeBSD.
Application-based support includes Apache, PHP, MySQL, PostgreSQL, Perl, and BIND (DNS). Email based support includes POP3, IMAP, and SMTP services. cPanel is accessed via https on port 2083
cPanel script to enable SPF via commandline:
# /usr/local/cpanel/bin/spf_installer $username
Where, $username is the cPanel user name
cPanel script to enable DKIM via commandline:
# /usr/local/cpanel/bin/dkim_keys_install $username
Replace $username with the actual cPanel username.
The above commands will help you to enable email authentications for single cPanel users. If you have hundreds of accounts and you want to enable SPF and DKIM for all accounts, please follow the simple for loop.
Here we can get the cPanel usernames from "/var/cpanel/users". Then give that to installations scripts. Please see the sample script below:
for username in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/dkim_keys_install $username && /usr/local/cpanel/bin/spf_installer $username ; done
Thanks for support
Post a Comment