cPanel/WHM mass add spf and domainkeys to all accounts

I am not really just now adding these, i merely ran some cleanups on the zones, removing obsolete ip’s and stuff like that, but i thought to share the script i used to reset the DKIM and SPF records for all accounts:

#!/bin/bash -x
for user in `ls -A /var/cpanel/users`;
/usr/local/cpanel/bin/dkim_keys_install $user && /usr/local/cpanel/bin/spf_installer $user;


Leave a Reply