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`;
do
/usr/local/cpanel/bin/dkim_keys_install $user && /usr/local/cpanel/bin/spf_installer $user;
done

Enjoy!

Leave a Reply

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

CommentLuv badge