Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the freshclam cron job be disabled when ENABLE_CLAMAV=0? #660

Closed
pkcinna01 opened this issue Jul 22, 2017 · 2 comments · Fixed by #667
Closed

Should the freshclam cron job be disabled when ENABLE_CLAMAV=0? #660

pkcinna01 opened this issue Jul 22, 2017 · 2 comments · Fixed by #667

Comments

@pkcinna01
Copy link

I'm getting several emails a day about cron job failing to rotate logs and things. Also, trying to minimize network, memory, and cpu usage by not updating clamav db.

@tomav
Copy link
Contributor

tomav commented Jul 22, 2017

Hi @pkcinna01, yes it can be disabled.

@pkcinna01
Copy link
Author

pkcinna01 commented Jul 22, 2017

Thanks tomav. The mailserver project is much appreciated. I hacked together a simple script for now which is called from docker-compose "command" so I can still use the official docker image.

if [ $ENABLE_CLAMAV -eq 0 ]
then
  echo "ENABLE_CLAMAV is zero.  Removing logrotate configs and cron job for freshclam"
  rm /etc/logrotate.d/clamav-* 
  sed -i "/\/usr\/bin\/freshclam --quiet/d" /var/spool/cron/crontabs/root
fi
echo "Launching originial start-mailserver.sh from Dockerfile CMD..."
/usr/local/bin/start-mailserver.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants