-
-
Save neidiom/a433eb3b3a1093329152e743b9b7fe2f to your computer and use it in GitHub Desktop.
Revisions
-
neidiom revised this gist
Feb 19, 2018 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,9 @@ IP=`dig +short A $DOMAIN` /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -txt 'v=spf1 +a +mx -all' # Create records /usr/local/psa/bin/dns -d ${DOMAIN} -a '' -ip ${NEW_IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${NEW_IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${NEW_IP} /usr/local/psa/bin/dns -a ${DOMAIN} -txt "v=spf1 +a +mx ip4:${NEW_IP} -all" # /usr/local/psa/bin/dns --off ${DOMAIN} -
neidiom revised this gist
Feb 19, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,13 +18,13 @@ NEW_IP=$2 echo "Provided domain name is ${DOMAIN}" echo "Provided NEW IP ADDRESS is ${NEW_IP}" IP=`dig +short A $DOMAIN` # Delete records /usr/local/psa/bin/dns -d ${DOMAIN} -a '' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -txt 'v=spf1 +a +mx -all' # Create records /usr/local/psa/bin/dns -a ${DOMAIN} -txt "v=spf1 +a +mx ip4:${NEW_IP} -all" # -
neidiom revised this gist
Feb 19, 2018 . No changes.There are no files selected for viewing
-
neidiom revised this gist
Feb 19, 2018 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,12 +6,27 @@ if [ -z "$1" ] exit 1 fi if [ -z "$2" ] then echo "Please provide a new IP address" exit 1 fi DOMAIN=$1 NEW_IP=$2 echo "Provided domain name is ${DOMAIN}" echo "Provided NEW IP ADDRESS is ${NEW_IP}" IP=`dig +short A $DOMAIN` # Delete records /usr/local/psa/bin/dns -d ${DOMAIN} -a '' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${IP} # Create records /usr/local/psa/bin/dns -a ${DOMAIN} -txt "v=spf1 +a +mx ip4:${NEW_IP} -all" # /usr/local/psa/bin/dns --off ${DOMAIN} /usr/local/psa/bin/dns --on ${DOMAIN} -
neidiom revised this gist
Feb 19, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ fi DOMAIN=$1 IP=`dig +short A $DOMAIN` /usr/local/psa/bin/dns -d ${DOMAIN} -a '' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${IP} # -
neidiom renamed this gist
Feb 19, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ fi DOMAIN=$1 IP=`dig +short A $DOMAIN` /usr/local/psa/bin/dns -d ${DOMAIN} -a $DOMAIN -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${IP} # -
neidiom renamed this gist
Feb 19, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
neidiom revised this gist
Feb 19, 2018 . 1 changed file with 2 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,18 +9,10 @@ fi DOMAIN=$1 IP=`dig +short A $DOMAIN` /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${IP} # /usr/local/psa/bin/dns --off ${DOMAIN} /usr/local/psa/bin/dns --on ${DOMAIN} -
agarzon created this gist
Oct 24, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/bin/bash if [ -z "$1" ] then echo "Please provide a domain name as argument" exit 1 fi DOMAIN=$1 IP=`dig +short A $DOMAIN` /usr/local/psa/bin/dns -d ${DOMAIN} -a 'mail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -a 'webmail' -ip ${IP} /usr/local/psa/bin/dns -d ${DOMAIN} -mx '' -mailexchanger mail.$1 /usr/local/psa/bin/dns -a ${DOMAIN} -cname 'mail' -canonical ghs.googlehosted.com. /usr/local/psa/bin/dns -a ${DOMAIN} -cname 'webmail' -canonical ghs.googlehosted.com. /usr/local/psa/bin/dns -a ${DOMAIN} -mx '' -mailexchanger ASPMX.L.GOOGLE.COM -priority 0 /usr/local/psa/bin/dns -a ${DOMAIN} -mx '' -mailexchanger ALT1.ASPMX.L.GOOGLE.COM. -priority 5 /usr/local/psa/bin/dns -a ${DOMAIN} -mx '' -mailexchanger ALT2.ASPMX.L.GOOGLE.COM. -priority 5 /usr/local/psa/bin/dns -a ${DOMAIN} -mx '' -mailexchanger ALT3.ASPMX.L.GOOGLE.COM. -priority 10 /usr/local/psa/bin/dns -a ${DOMAIN} -mx '' -mailexchanger ALT4.ASPMX.L.GOOGLE.COM. -priority 10 /usr/local/psa/bin/dns -d ${DOMAIN} -txt 'v=spf1 +a +mx -all' /usr/local/psa/bin/dns -a ${DOMAIN} -txt 'v=spf1 include:_spf.google.com ~all' /usr/local/psa/bin/dns --off ${DOMAIN} /usr/local/psa/bin/dns --on ${DOMAIN} echo "Done!"