Skip to content

Commit

Permalink
Move SASL to /etc/postfix/sasl/
Browse files Browse the repository at this point in the history
  • Loading branch information
djjudas21 committed Nov 11, 2024
1 parent 768d068 commit 3cd1b6e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smtp-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ SMTP_TLS_SECURITY_LEVEL=${SMTP_TLS_SECURITY_LEVEL?Missing env var SMTP_TLS_SECUR


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

postconf 'smtp_sasl_auth_enable = yes' || exit 1
postconf 'smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd' || exit 1
postconf 'smtp_sasl_password_maps = lmdb:/etc/postfix/sasl/sasl_passwd' || exit 1
postconf 'smtp_sasl_security_options =' || exit 1

# These are required.
Expand Down

0 comments on commit 3cd1b6e

Please sign in to comment.