This code snippet is the simplest way to add SPF and DomainKeys on a cPanel server for all the accounts
[bash]
for i in $(ls /var/cpanel/users)
do
echo Installing Domain Keys on $i
/usr/local/cpanel/bin/domain_keys_installer $i;
echo Installing SPF Records on $i
/usr/local/cpanel/bin/spf_installer $i;
done
[/bash]