Comment 23 for bug 165184

Tuomas Jormola (tjormola) wrote :

In order to silence the bayes database sync messages that are frequently sent via cron, could you consider fix along the lines of

--- /usr/sbin/amavisd-new-cronjob 2008-10-11 07:17:30.000000000 +0300
+++ /tmp/amavisd-new-cronjob 2009-01-12 09:20:53.960773192 +0200
@@ -29,7 +29,7 @@

 case $1 in
        sa-sync)
- do_amavis_cmd "/usr/bin/sa-learn --sync >/dev/null"
+ do_amavis_cmd "/usr/bin/sa-learn --sync 2>&1 | egrep -v '^bayes: synced databases from journal in [0-9]+ seconds: [0-9]+ unique entries \([0-9]+ total entries\)$'"
                ;;
        sa-clean)
                do_amavis_cmd "/usr/bin/sa-learn --sync --force-expire >/dev/null"

This would discard the annoying and totally useless sync messages but keep other possible error messages.