Control exim logging

This commit is contained in:
Bob Mottram 2016-11-28 14:03:49 +00:00
parent ac5f91b6b6
commit 1c7b22ea1a
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,7 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
if [ ! -d /var/log/exim4 ]; then if [ ! -d /var/log/exim4 ]; then
mkdir /var/log/exim4 mkdir /var/log/exim4
fi fi
sed -i 's|MAIN_LOG_SELECTOR = .*|MAIN_LOG_SELECTOR = +tls_peerdn|g' /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs
sed -i 's|MAIN_LOG_SELECTOR = .*|MAIN_LOG_SELECTOR = +tls_peerdn|g' /etc/exim4/exim4.conf.template sed -i 's|MAIN_LOG_SELECTOR = .*|MAIN_LOG_SELECTOR = +tls_peerdn|g' /etc/exim4/exim4.conf.template
sed -i 's|log_selector =.*|log_selector = MAIN_LOG_SELECTOR|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector sed -i 's|log_selector =.*|log_selector = MAIN_LOG_SELECTOR|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector
fi fi
@ -184,6 +185,7 @@ else
rm -rf /var/log/prosody rm -rf /var/log/prosody
fi fi
if [ -d /etc/exim4 ]; then if [ -d /etc/exim4 ]; then
sed -i 's|MAIN_LOG_SELECTOR = .*|MAIN_LOG_SELECTOR = -all|g' /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs
sed -i 's|MAIN_LOG_SELECTOR = .*|MAIN_LOG_SELECTOR = -all|g' /etc/exim4/exim4.conf.template sed -i 's|MAIN_LOG_SELECTOR = .*|MAIN_LOG_SELECTOR = -all|g' /etc/exim4/exim4.conf.template
sed -i 's|log_selector =.*|log_selector = -all|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector sed -i 's|log_selector =.*|log_selector = -all|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector
shred -zu /var/log/exim4/* shred -zu /var/log/exim4/*