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

Only enable TLS and DKIM if keys exist and have a size greater than zero #30

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if [ "${SMTPPORTOUT}" ]; then
mv /etc/exim4/exim4.conf.temp /etc/exim4/exim4.conf.template
fi

if [ "$KEY_PATH" ] && [ "$CERTIFICATE_PATH" ]; then
if [ -s "$KEY_PATH" ] && [ -s "$CERTIFICATE_PATH" ]; then
echo "MAIN_TLS_ENABLE = yes" >> /etc/exim4/exim4.conf.localmacros
cp "$KEY_PATH" /etc/exim4/exim.key
cp "$CERTIFICATE_PATH" /etc/exim4/exim.crt
Expand All @@ -58,7 +58,7 @@ else
} >> /etc/exim4/exim4.conf.localmacros
fi

if [ "$DKIM_KEY_PATH" ]; then
if [ -s "$DKIM_KEY_PATH" ]; then
cp "$DKIM_KEY_PATH" /etc/exim4/dkim.key
chown Debian-exim /etc/exim4/dkim.key
chmod 640 /etc/exim4/dkim.key
Expand Down