File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 22set -e
33
44# Setup postfix if not done yet
5- if [ -f " /etc/postfix/sasl_passwd " ] && [ ! -f " /etc/postfix/sasl_passwd.db " ]; then
5+ if [ -f " /mailgun.txt " ] && [ ! -f " /etc/postfix/setupok " ]; then
66 echo " Configuring postfix..."
7- postmap /etc/postfix/sasl_passwd
8- chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
9- echo " relayhost = smtp.mailgun.org" >> /etc/postfix/main.cf
10- echo " smtp_sasl_auth_enable = yes" >> /etc/postfix/main.cf
11- echo " smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" >> /etc/postfix/main.cf
12- echo " smtp_sasl_security_options = noanonymous" >> /etc/postfix/main.cf
7+ touch " /etc/postfix/setupok"
8+ sed ' /^relayhost/d' /etc/postfix/main.cf
9+ cat /mailgun.txt >> /etc/postfix/main.cf
1310fi
1411
1512# Start background services
You can’t perform that action at this time.
0 commit comments