Skip to content

Commit d9e7020

Browse files
committed
Fix missing AUTHPATH in dma.conf & add DMA_BLOCKING variable for testing
1 parent 0a396bd commit d9e7020

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

utils/docker-entrypoint-as-root.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ if [ -e /usr/sbin/dma ]; then
122122
123123
fi
124124
export PHP_INI_SENDMAIL_PATH="/usr/sbin/sendmail -t -i -f'$DMA_FROM'"
125+
if [[ "$DMA_BLOCKING" == "1" ]]; then
126+
# run in foreground & block until the email really has been sent
127+
# only documented here as it should not normally be used in production; it's mostly used for testing
128+
export PHP_INI_SENDMAIL_PATH="${PHP_INI_SENDMAIL_PATH} -D"
129+
fi
125130

126131
# generate DMA config based on DMA_CONF_... environment variables
127132
php /usr/local/bin/generate_dma.php > /etc/dma/dma.conf
@@ -132,6 +137,7 @@ if [ -e /usr/sbin/dma ]; then
132137
echo "DMA_AUTH_USERNAME and DMA_AUTH_PASSWORD are set, but DMA_CONF_SMARTHOST is empty - not attempting authentication" >&2
133138
else
134139
echo "$DMA_AUTH_USERNAME|$DMA_CONF_SMARTHOST:$DMA_AUTH_PASSWORD" > /etc/dma/auth.conf
140+
echo "AUTHPATH /etc/dma/auth.conf" >> /etc/dma/dma.conf
135141
fi
136142
fi
137143

0 commit comments

Comments
 (0)