spf_installer
I want to run the spf_installer script for all cpanel users using a simple bash script but not change spf records for accounts that already have one.
Running spf_installer --help I saw that there are options for overwrite and preserve
I tried something like the following
but the existing spf records got replaced by the default ones. What command should I issue so that any existing spf records are not overwritten by the command and any existing spf records are preserved?
/usr/local/cpanel/bin/spf_installer user 0 0 1but the existing spf records got replaced by the default ones. What command should I issue so that any existing spf records are not overwritten by the command and any existing spf records are preserved?
-
Hello :) You could generate a list of accounts that require SPF records by searching /var/cpanel/users/$username for the "HASSPF=1" entry. EX: grep HASSPF=1 /var/cpanel/users/*
Any account with the HASSPF=1 entry already has an SPF record enabled, so you could exclude these users in your script. Thank you.0 -
Hi Michael Thank you very much for the answer!!! I could use "HASDKIM=1" in the same way, to find out the users that already have dkim keys? 0 -
I could use "HASDKIM=1" in the same way, to find out the users that already have dkim keys?
Yes, the "HASDKIM=1" entry is also populated in those files the same way. Thank you.0
Please sign in to leave a comment.
Comments
3 comments