Skip to content

Commit

Permalink
Fix sasldb with SMTPD_SASL_USERS env variable
Browse files Browse the repository at this point in the history
We encountered an issue where the script common-run.sh would fail if the SMTPD_SASL_USERS environment variable was defined. The failure occurred immediately after displaying the "Enable smtpd sasl auth" message, preventing the container from starting correctly.

The root cause was traced to a conditional check for the existence of the /etc/sasl2/sasldb2 file. When the file did not exist, the subsequent `chown` operation was skipped as intended, but the script would still fail due to an undefined behavior in the shell context.

The addition of a debug message "Sasldb configured" before the closing `fi` statement has resolved the issue. This change appears to stabilize the script execution, allowing the container to start as expected.

While the underlying cause is not fully understood and warrants further investigation, this commit serves as a temporary workaround to ensure functionality in environments where SMTPD_SASL_USERS is set.
  • Loading branch information
SebastienDEMARCHI authored and bokysan committed Jan 19, 2024
1 parent 6f0831f commit bf84322
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/common-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ EOF

[ -f /etc/sasldb2 ] && chown postfix:postfix /etc/sasldb2
[ -f /etc/sasl2/sasldb2 ] && chown postfix:postfix /etc/sasl2/sasldb2
debug 'Sasldb configured'
fi
}

Expand Down

0 comments on commit bf84322

Please sign in to comment.