How to enable SPF and Domains Keys server-wide

If you need to enable SPF Keys and Domain Keys server-wide, then follow these instructions:

 

1. Login to your server as root via SSH and run the following command:

 

for user in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/domain_keys_installer $user && /usr/local/cpanel/bin/spf_installer $user ; done
 
2. Once done, add the following to your "/scripts/postwwwacct" file:

#!/usr/bin/perl

my %OPTS = @ARGV;
$ENV{USER} = “$OPTS{‘user’}”;
system q(/usr/local/cpanel/bin/domain_keys_installer $USER);
system q(/usr/local/cpanel/bin/spf_installer $USER);

 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I set a nice looking bash prompt on my Linux VPS?

Add the following lines to the end of /etc/profile PS1="\[\e]2;\u@\H...

How do I change my VPS's hostname

If you want to change your Virtual Private Server's hostname, you first need to login to your VPS...

What is a Virtual Private Server?

A Virtual Private Server, or VPS is simply put, a "slice" of a dedicated server. Dedicated...

How can I secure my VPS?

If you own, or run a Virtual Private Server, or Dedicated server on the internet, then you need...

how do I disable root logins?

Disabling direct root login to your VPS is almost a must!...