Can i enable spf & dkim this way?

postcd

Well-Known Member
Oct 22, 2010
720
20
68
Hello, for all already created cpanel accounts, can i safelly execute this command from command line of WHM server?

Code:
for user in `ls -A /var/cpanel/users` ; do
/usr/local/cpanel/bin/dkim_keys_install $user &&
/usr/local/cpanel/bin/spf_installer $user ; done
thank you
 

postcd

Well-Known Member
Oct 22, 2010
720
20
68
thx 24x7server, I run it and indeed i got spf and dkim TXT records generated in all my DNS Zone files correctly, i checked by SPF online testers.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

Yes, to confirm, that is a valid command. Note that it does enable SPF/DKIM for all accounts, and it may produce some harmless warnings for usernames that do not exist.

Thank you.