Skip to content

Commit

Permalink
Merge pull request #7 from djjudas21/sasl
Browse files Browse the repository at this point in the history
Check for writability of sasl_passwd
  • Loading branch information
djjudas21 authored Nov 11, 2024
2 parents 5ea0333 + d724e5b commit 006171c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions smtp-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ SMTP_TLS_SECURITY_LEVEL=${SMTP_TLS_SECURITY_LEVEL?Missing env var SMTP_TLS_SECUR


# handle sasl
echo "${SMTP_RELAY_HOST} ${SMTP_RELAY_USERNAME}:${SMTP_RELAY_PASSWORD}" > /etc/postfix/sasl_passwd || exit 1
[ -w /etc/postfix/sasl_passwd ] && echo "${SMTP_RELAY_HOST} ${SMTP_RELAY_USERNAME}:${SMTP_RELAY_PASSWORD}" > /etc/postfix/sasl_passwd || exit 1
postmap /etc/postfix/sasl_passwd || exit 1
rm /etc/postfix/sasl_passwd || exit 1

postconf 'smtp_sasl_auth_enable = yes' || exit 1
postconf 'smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd' || exit 1
Expand Down

0 comments on commit 006171c

Please sign in to comment.