Update Mail 1
This commit is contained in:
parent
f489d05212
commit
a4f5fea34f
|
|
@ -0,0 +1,3 @@
|
|||
to: stewart@bennell.me
|
||||
subject:Subject Test
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
|
||||
|
||||
myhostname=SVR-1-VH1.lab-network.xyz
|
||||
|
||||
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
|
||||
biff = no
|
||||
|
||||
# appending .domain is the MUA's job.
|
||||
append_dot_mydomain = no
|
||||
|
||||
# Uncomment the next line to generate "delayed mail" warnings
|
||||
#delay_warning_time = 4h
|
||||
|
||||
inet_protocols = ipv4
|
||||
relayhost = [smtp.office365.com]:587
|
||||
smtp_sasl_auth_enable = yes
|
||||
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
|
||||
smtp_sasl_security_options = noanonymous
|
||||
smtp_tls_security_level = may
|
||||
sender_canonical_maps = regexp:/etc/postfix/sender_canonical
|
||||
smtp_tls_CAfile = /etc/postfix/cacert.pem
|
||||
smtp_use_tls = yes
|
||||
6
patch.sh
6
patch.sh
|
|
@ -30,7 +30,9 @@ 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}
|
||||
wget --user=bennellit --ask-password -P /etc/postfix/ https://bennellit.com.au/Files/noaccess/{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
|
||||
|
|
@ -38,6 +40,6 @@ 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
|
||||
sendmail -v server@lab-network.xyz < /etc/postfix/mailtest.txt
|
||||
|
||||
echo "- done!"
|
||||
|
|
|
|||
Loading…
Reference in New Issue