[SOGo, Config, Update] Add SOGO_EXPIRE_SESSION to define default session timeout

master
andryyy 2019-07-21 13:07:48 +02:00
parent b6acc5ef09
commit 5e7466ac7f
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
4 changed files with 16 additions and 3 deletions

View File

@ -36,9 +36,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
sogo-activesync \ sogo-activesync \
&& apt-get autoclean \ && apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& echo '* * * * * sogo /usr/sbin/sogo-ealarms-notify -p /etc/sogo/sieve.creds 2>/dev/null' > /etc/cron.d/sogo \
&& echo '* * * * * sogo /usr/sbin/sogo-tool expire-sessions 60' >> /etc/cron.d/sogo \
&& echo '0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds' >> /etc/cron.d/sogo \
&& touch /etc/default/locale && touch /etc/default/locale
COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh

View File

@ -200,4 +200,10 @@ fi
echo "Syncing web content with named volume" echo "Syncing web content with named volume"
rsync -a /usr/lib/GNUstep/SOGo/. /sogo_web/ rsync -a /usr/lib/GNUstep/SOGo/. /sogo_web/
# Creating cronjobs
echo "* * * * * sogo /usr/sbin/sogo-ealarms-notify -p /etc/sogo/sieve.creds 2>/dev/null" > /etc/cron.d/sogo
echo "* * * * * sogo /usr/sbin/sogo-tool expire-sessions ${SOGO_EXPIRE_SESSION}" >> /etc/cron.d/sogo
echo "0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds" >> /etc/cron.d/sogo
exec gosu sogo /usr/sbin/sogod exec gosu sogo /usr/sbin/sogod

View File

@ -250,6 +250,9 @@ IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
# mail_home is ~/Maildir # mail_home is ~/Maildir
MAILDIR_SUB=Maildir MAILDIR_SUB=Maildir
# SOGo session timeout in minutes
SOGO_EXPIRE_SESSION=480
EOF EOF
mkdir -p data/assets/ssl mkdir -p data/assets/ssl

View File

@ -163,6 +163,7 @@ CONFIG_ARRAY=(
"SKIP_SOLR" "SKIP_SOLR"
"ALLOW_ADMIN_EMAIL_LOGIN" "ALLOW_ADMIN_EMAIL_LOGIN"
"SKIP_HTTP_VERIFICATION" "SKIP_HTTP_VERIFICATION"
"SOGO_EXPIRE_SESSION"
) )
sed -i '$a\' mailcow.conf sed -i '$a\' mailcow.conf
@ -281,6 +282,12 @@ for option in ${CONFIG_ARRAY[@]}; do
echo '# Notify about banned IP. Includes whois lookup.' >> mailcow.conf echo '# Notify about banned IP. Includes whois lookup.' >> mailcow.conf
echo "WATCHDOG_NOTIFY_BAN=y" >> mailcow.conf echo "WATCHDOG_NOTIFY_BAN=y" >> mailcow.conf
fi fi
elif [[ ${option} == "SOGO_EXPIRE_SESSION" ]]; then
if ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf"
echo '# SOGo session timeout in minutes' >> mailcow.conf
echo "SOGO_EXPIRE_SESSION=480" >> mailcow.conf
fi
elif ! grep -q ${option} mailcow.conf; then elif ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf" echo "Adding new option \"${option}\" to mailcow.conf"
echo "${option}=n" >> mailcow.conf echo "${option}=n" >> mailcow.conf