spamassassin throws errors in amavis cron job
The spamassassin install uses a cron job to do sync and cleanup called amavisd-new-cronjob. This job throws up errors on the Debian 7.
error creating a DNS resolver socket: Network is unreachable at /usr/share/perl5/Mail/SpamAssassin/DnsResolver.pm line 235. plugin: eval failed: error closing socket: Bad file descriptor at /usr/share/perl5/Mail/SpamAssassin/DnsResolver.pm line 568.
Looking into it the culprit is the check for whether Bayesian filtering is enabled at all, i.e. these lines:
if ! perl -MMail::SpamAssassin -e "my \$spamtest = Mail::SpamAssassin->new(); \$spamtest->compile_now (); \$spamtest->{conf}->{use_bayes} ? exit 0 : exit 1" then #bayes is disabled - just exit exit fi
Why it does not work and what precisely it needs, I have no idea and no desire to chase the error. Some Perl module or a plugin may be missing. Anyway, since Bayesian is enabled, I simply commented out the above lines in the /usr/sbin/amavisd-new-cronjob file and left it at that.
If you know how to fix it – let me know, please.… -->
continue reading →