Comment 7 for bug 165184

Daniel Hahler (blueyed) wrote :

Ok, I agree that errors should not get discarded.

What's the better approach then?
1. Fix spamassassin to not handle/output "configuration specifies 'use_bayes 0', sa-learn disabled" as an error?
2. Try to find out if use_bayes is 0 before calling sa-learn?

The first one seems easier, because in the second case the only solution I see is grepping "/etc/spamassassin/" for the use_bayes setting.
The sa-learn tool could still exit with an error code, but would just print a warning to STDOUT.

Please note, that discarding STDOUT is supposed to be done (but fails so in the case where the script is run as user amavis). Therefor I'm getting the "bayes: synced databases from journal in 3 seconds: 210 unique entries (350 total entries)" spam.

There are two similar issues:
1. STDOUT does get handled differently for invocation by "root" and "amavis" - this should get fixed so that both code paths are the same. It does not make sense to have STDOUT in the cron mail. Agreed?
2. spamassassin/sa-learn causes output on STDERR, if use_bayes is disabled.