DIsable Mail For Now
This commit is contained in:
parent
a4f5fea34f
commit
28591326ab
33
patch.sh
33
patch.sh
|
|
@ -3,8 +3,8 @@
|
||||||
echo "- Apt Update and upgrade system..."
|
echo "- Apt Update and upgrade system..."
|
||||||
apt update
|
apt update
|
||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
echo "- Install ifupdown2..."
|
echo "- Install Packages."
|
||||||
apt install ifupdown2 -y
|
apt install ifupdown2 postfix sasl2-bin mailutils libsasl2-modules -y
|
||||||
|
|
||||||
mkdir -p /usr/share/pve-patch/{images,scripts}
|
mkdir -p /usr/share/pve-patch/{images,scripts}
|
||||||
echo "- patch `pveversion`..."
|
echo "- patch `pveversion`..."
|
||||||
|
|
@ -26,20 +26,19 @@ touch ~/.ssh/authorized_keys
|
||||||
echo ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkXk0+tC1ZMiWgTQvE/GeB9+TuPWTf8mr9zVOYdNhF+KFXxc/DjMjIPNCAUxtQErlush1GF87b7gaEIC2F5p/+xr39gnt5panjT2AJmVQm9GrSc0LwZOHducgB9SeW7F6A2hA0dtEDxOPHC88ipT9qvTZdeC+mgoNmyIAIMmnPVcZOqQm7iVUf3kJCRWVGI/csE1UYpZ1tLpkaNqjP0Iy7cQvNgodJWh8Mg//TD6ESKBQ35P3+6zT2zEpIK/hQ5eaW5Uu82kSt1ZGuNaPukfCra0cjWr2n4hC+C3E9m3K/3ZV43usaxwSbPa6R/jJE4fyqpC2hqdTKW8Z66mVTC8EpQ== Bennell IT >> ~/.ssh/authorized_keys
|
echo ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkXk0+tC1ZMiWgTQvE/GeB9+TuPWTf8mr9zVOYdNhF+KFXxc/DjMjIPNCAUxtQErlush1GF87b7gaEIC2F5p/+xr39gnt5panjT2AJmVQm9GrSc0LwZOHducgB9SeW7F6A2hA0dtEDxOPHC88ipT9qvTZdeC+mgoNmyIAIMmnPVcZOqQm7iVUf3kJCRWVGI/csE1UYpZ1tLpkaNqjP0Iy7cQvNgodJWh8Mg//TD6ESKBQ35P3+6zT2zEpIK/hQ5eaW5Uu82kSt1ZGuNaPukfCra0cjWr2n4hC+C3E9m3K/3ZV43usaxwSbPa6R/jJE4fyqpC2hqdTKW8Z66mVTC8EpQ== Bennell IT >> ~/.ssh/authorized_keys
|
||||||
chmod -R go= ~/.ssh
|
chmod -R go= ~/.ssh
|
||||||
|
|
||||||
echo "- Seting up smtp for email alerts"
|
#echo "- Seting up smtp for email alerts"
|
||||||
apt install postfix sasl2-bin mailutils -y
|
|
||||||
apt install libsasl2-modules -y
|
#rm -f /etc/postfix/{mailtest.txt,main.cf,sasl_passwd,sender_canonical}
|
||||||
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/mailtest.txt
|
#wget -nc -P /etc/postfix/ https://raw.githubusercontent.com/sbennell/pve-patch/master/mail/main.cf
|
||||||
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}
|
||||||
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/sasl_passwd
|
#postmap hash:/etc/postfix/sender_canonical
|
||||||
postmap hash:/etc/postfix/sender_canonical
|
#chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
|
||||||
chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
|
#chmod 644 /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
|
||||||
chown root:root /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
|
#chmod 644 /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
|
||||||
chmod 644 /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
|
#service postfix restart
|
||||||
service postfix restart
|
#sendmail -v server@lab-network.xyz < /etc/postfix/mailtest.txt
|
||||||
sendmail -v server@lab-network.xyz < /etc/postfix/mailtest.txt
|
|
||||||
|
|
||||||
echo "- done!"
|
echo "- done!"
|
||||||
Loading…
Reference in New Issue