diff --git a/patch.sh b/patch.sh index 4741e4e..b0fc38d 100644 --- a/patch.sh +++ b/patch.sh @@ -4,7 +4,7 @@ echo "- Apt Update and upgrade system..." apt update apt upgrade -y echo "- Install Packages." -apt install ifupdown2 postfix sasl2-bin mailutils libsasl2-modules -y +apt install ifupdown2 postfix sasl2-bin mailutils libsasl2-modules -y mkdir -p /usr/share/pve-patch/{images,scripts} echo "- patch `pveversion`..." @@ -28,17 +28,17 @@ chmod -R go= ~/.ssh #echo "- Seting up smtp for email alerts" -#rm -f /etc/postfix/{mailtest.txt,main.cf,sasl_passwd,sender_canonical} -#wget -nc -P /etc/postfix/ https://raw.githubusercontent.com/sbennell/pve-patch/master/mail/mailtest.txt +rm -f /etc/postfix/{mailtest.txt,main.cf,sasl_passwd,sender_canonical} +wget -nc -P /etc/postfix/ https://raw.githubusercontent.com/sbennell/pve-patch/master/mail/mailtest.txt #wget -nc -P /etc/postfix/ https://raw.githubusercontent.com/sbennell/pve-patch/master/mail/main.cf -#wget --user=bennellit --ask-password -P /etc/postfix/ https://bennellit.com.au/Files/noaccess/{sasl_passwd,sender_canonical} -#postmap hash:/etc/postfix/sasl_passwd -#postmap hash:/etc/postfix/sender_canonical -#chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db -#chmod 644 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db -#chown root:root /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db -#chmod 644 /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db -#service postfix restart -#sendmail -v server@lab-network.xyz < /etc/postfix/mailtest.txt +wget --user=bennellit --ask-password -P /etc/postfix/ https://bennellit.com.au/Files/noaccess/{sasl_passwd,sender_canonical} +postmap hash:/etc/postfix/sasl_passwd +postmap hash:/etc/postfix/sender_canonical +chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db +chmod 644 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db +chown root:root /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db +chmod 644 /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db +service postfix restart +sendmail -v server@lab-network.xyz < /etc/postfix/mailtest.txt echo "- done!" \ No newline at end of file