Categories
General

Verifica domenii pe servere cPanel care nu mai sunt local


for user in $(whmapi1 listaccts | awk '/user:/ {print $2}'); do domain=$(whmapi1 accountsummary user=$user | awk '/domain:/ {print $2}'); assignedip=$(whmapi1 accountsummary user=$user | awk '/ip:/ {print$2}') ; dnsip=$(dig +short $domain); dnsmx=$(dig MX +short $domain @8.8.8.8 | awk '{print $2}' | xargs dig +short); if [[ $dnsip != $assignedip ]]; then echo -n "$user:$domain - A - FAILS"; if [[ "$dnsmx" == "$assignedip" ]]; then echo -e " but MX for $user:$domain does point locally"; else echo ""; fi; fi ; done

Lasă un răspuns

Adresa ta de email nu va fi publicată. Câmpurile obligatorii sunt marcate cu *