added from replacement
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo apt install -y libsasl2-modules mailutils postfix
|
||||
sudo apt install -y libsasl2-modules mailutils postfix postfix-pcre
|
||||
|
||||
echo "smtp.gmail.com notify.akanealw@gmail.com:leawkqqpthbwacrf" > /etc/postfix/sasl_passwd
|
||||
echo "/^From:.*/ REPLACE From: $(hostname) <notify.akanealw@gmail.com>" > /etc/postfix/smtp_header_checks
|
||||
|
||||
chmod 600 /etc/postfix/sasl_passwd
|
||||
|
||||
postmap hash:/etc/postfix/sasl_passwd
|
||||
postmap hash:/etc/postfix/smtp_header_checks
|
||||
|
||||
isInFile=$(cat /etc/postfix/main.cf | grep -c "gmail")
|
||||
if [ $isInFile -eq 0 ]
|
||||
@@ -23,6 +25,7 @@ if [ $isInFile -eq 0 ]
|
||||
echo "smtp_tls_CAfile = /etc/ssl/certs/Entrust_Root_Certification_Authority.pem" >> /etc/postfix/main.cf
|
||||
echo "smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache" >> /etc/postfix/main.cf
|
||||
echo "smtp_tls_session_cache_timeout = 3600s" >> /etc/postfix/main.cf
|
||||
echo "smtp_header_checks = pcre:/etc/postfix/smtp_header_checks" >> /etc/postfix/main.cf
|
||||
echo "" >> /etc/postfix/main.cf
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user