mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-06 14:37:45 +08:00
Fix #95: Make grep quiet
Grep was missing the quiet (`-q`) option which made it echo the password to postfix logs.
This commit is contained in:
parent
156b45d9f7
commit
3d750cfb6a
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,7 @@ postfix_setup_relayhost() {
|
|||
if [ -n "$RELAYHOST_USERNAME" ] && [ -n "$RELAYHOST_PASSWORD" ]; then
|
||||
echo -e " using username ${emphasis}$RELAYHOST_USERNAME${reset} and password ${emphasis}(redacted)${reset}."
|
||||
if [[ -f /etc/postfix/sasl_passwd ]]; then
|
||||
if ! grep -F "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" /etc/postfix/sasl_passwd; then
|
||||
if ! grep -q -F "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" /etc/postfix/sasl_passwd; then
|
||||
sed -i -e "/^$SASL_RELAYHOST .*$/d" /etc/postfix/sasl_passwd
|
||||
echo "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" >> /etc/postfix/sasl_passwd
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue