for domain in $(whmapi1 listaccts --output=json | jq -r '.data.acct[].domain'); do
zonefile="/var/named/${domain}.db"
if [ -f "$zonefile" ]; then
# Use the full path to cp to avoid any alias issues
/bin/cp -f "$zonefile" "$zonefile.bak" # Force overwrite without prompt
if grep -q 'v=spf1' "$zonefile"; then
sed -i 's/v=spf1.*/v=spf1 include:_spf.names4u.win ~all"/' "$zonefile"
echo "Updated SPF in $domain"
else
echo "$domain. IN TXT \"v=spf1 include:_spf.names4u.win ~all\"" >> "$zonefile"
echo "Added SPF to $domain"
fi
else
echo "No local zone file for $domain (managed by DNS cluster or Cloudflare)"
fi
done
[root@eostre ~]# cat /etc/postfix/master.cf
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
smtp inet n - n - - smtpd
submission inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=may
-o smtpd_sasl_auth_enable=yes
-o smtpd_relay_restrictions=permit_mynetworks,reject_unauth_destination
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
smtps inet n - n - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_relay_restrictions=permit_mynetworks,reject_unauth_destination
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
[root@eostre ~]#
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
namecheap : for general domain registration for myself/my projects.
trustname.com : for adult/freespeech domains
the-online.com : for casino/adult/free speech domains
namesilo/spaceship : for grabbing quick domain promo for use-n-throw projects
ourdomain/eranet/nicenic : for some clients who need a more secure place