mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
fix: run Amavis cron job only when Amavis is enabled (#2831)
This commit is contained in:
parent
032ed00a17
commit
ac795a5976
|
@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. The format
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- **scripts**: Run `user-patches.sh` right before starting daemons ([#2817](https://github.com/docker-mailserver/docker-mailserver/pull/2817))
|
- **scripts**: Run `user-patches.sh` right before starting daemons ([#2817](https://github.com/docker-mailserver/docker-mailserver/pull/2817))
|
||||||
|
- **scripts**: Run Amavis cron job only when Amavis is enabled ([#2831](https://github.com/docker-mailserver/docker-mailserver/pull/2831))
|
||||||
|
|
||||||
## [11.2.0](https://github.com/docker-mailserver/docker-mailserver/releases/tag/v11.2.0)
|
## [11.2.0](https://github.com/docker-mailserver/docker-mailserver/releases/tag/v11.2.0)
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,11 @@ function _setup_amavis
|
||||||
else
|
else
|
||||||
_log 'debug' "Removing Amavis from Postfix's configuration"
|
_log 'debug' "Removing Amavis from Postfix's configuration"
|
||||||
sed -i 's|content_filter =.*|content_filter =|' /etc/postfix/main.cf
|
sed -i 's|content_filter =.*|content_filter =|' /etc/postfix/main.cf
|
||||||
|
|
||||||
|
_log 'debug' 'Disabling Amavis cron job'
|
||||||
|
mv /etc/cron.d/amavisd-new /etc/cron.d/amavisd-new.disabled
|
||||||
|
chmod 0 /etc/cron.d/amavisd-new.disabled
|
||||||
|
|
||||||
[[ ${ENABLE_CLAMAV} -eq 1 ]] && _log 'warn' 'ClamAV will not work when Amavis is disabled. Remove ENABLE_AMAVIS=0 from your configuration to fix it.'
|
[[ ${ENABLE_CLAMAV} -eq 1 ]] && _log 'warn' 'ClamAV will not work when Amavis is disabled. Remove ENABLE_AMAVIS=0 from your configuration to fix it.'
|
||||||
[[ ${ENABLE_SPAMASSASSIN} -eq 1 ]] && _log 'warn' 'Spamassassin will not work when Amavis is disabled. Remove ENABLE_AMAVIS=0 from your configuration to fix it.'
|
[[ ${ENABLE_SPAMASSASSIN} -eq 1 ]] && _log 'warn' 'Spamassassin will not work when Amavis is disabled. Remove ENABLE_AMAVIS=0 from your configuration to fix it.'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue