1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-09 23:07:35 +02:00

Remove spamassassin cron job when spamassassin is off

This commit is contained in:
Erik Wramner
2019-08-11 09:52:50 +02:00
parent 1903e98ef2
commit d6838e8274

View File

@ -176,7 +176,10 @@ function register_functions() {
_register_fix_function "_fix_var_mail_permissions" _register_fix_function "_fix_var_mail_permissions"
_register_fix_function "_fix_var_amavis_permissions" _register_fix_function "_fix_var_amavis_permissions"
if [ "$ENABLE_CLAMAV" = 0 ]; then if [ "$ENABLE_CLAMAV" = 0 ]; then
_register_fix_function "_fix_cleanup_clamav" _register_fix_function "_fix_cleanup_clamav"
fi
if [ "$ENABLE_SPAMASSASSIN" = 0 ]; then
_register_fix_function "_fix_cleanup_spamassassin"
fi fi
################### << fix funcs ################### << fix funcs
@ -1430,6 +1433,11 @@ function _fix_cleanup_clamav() {
rm -f /etc/cron.d/clamav-freshclam rm -f /etc/cron.d/clamav-freshclam
} }
function _fix_cleanup_spamassassin() {
notify 'task' 'Cleaning up disabled spamassassin'
rm -f /etc/cron.daily/spamassassin
}
########################################################################## ##########################################################################
# << Fix Stack # << Fix Stack
########################################################################## ##########################################################################