Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] RELAYHOST_PASSWORD printed out #95

Closed
spali opened this issue Dec 21, 2021 · 2 comments
Closed

[Bug] RELAYHOST_PASSWORD printed out #95

spali opened this issue Dec 21, 2021 · 2 comments

Comments

@spali
Copy link

spali commented Dec 21, 2021

I assume this is a bug :)

‣ NOTE  Forwarding all emails to [mail.example.com]:587 using username [email protected] and password (redacted).
[mail.example.com]:587 [email protected]:MYPASSWORD
‣ INFO  Using default private network list for trusted networks.

Set via docker compose env variables:

      RELAYHOST: ${SMTP_RELAYHOST:?}
      RELAYHOST_USERNAME: ${SMTP_RELAYHOST_USERNAME:?}
      RELAYHOST_PASSWORD: ${SMTP_RELAYHOST_PASSWORD:?}

Not sure which line is responsible for the print of the password, but I assume somewhere here:

if [[ -f /etc/postfix/sasl_passwd ]]; then
if ! grep -F "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" /etc/postfix/sasl_passwd; then
sed -i -e "s/^$SASL_RELAYHOST .*$/d" /etc/postfix/sasl_passwd
echo "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" >> /etc/postfix/sasl_passwd
fi
else
echo "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" >> /etc/postfix/sasl_passwd
fi

Maybe the grep should be redirected to /dev/null ?

@bokysan
Copy link
Owner

bokysan commented Dec 21, 2021

Thank you for the report.

grep's missing -q.

@geekscrapy
Copy link

seeing this also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants