/usr/sbin/amavisd-new-cronjob could be changed to check if use_bayes is set to 0:
sa-clean) grep -q "use_bayes 0" /etc/spamassassin/local.cf || do_amavis_cmd "/usr/bin/sa-learn --sync --force-expire" ;;
Or it can be checked for in cron.daily/amavisd-new in a similar way.
/usr/sbin/ amavisd- new-cronjob could be changed to check if use_bayes is set to 0:
sa-clean)
grep -q "use_bayes 0" /etc/spamassass in/local. cf || do_amavis_cmd "/usr/bin/sa-learn --sync --force-expire"
;;
Or it can be checked for in cron.daily/ amavisd- new in a similar way.