0

I am running spamassassin on Ubuntu 14.04 as root. When I am calling any of the methods, such as Check or ReportSpam, I am also passing in another user that the check should be run as. However I get a permissions issue

spamd: Can't locate Mail/SpamAssassin/PerMsgLearner.pm: 
Permission denied at /usr/share/perl5/Mail/SpamAssassin.pm line 644, <GEN14> line 7.

Looking at line 644 in that perl script it tries to import another perl file

require Mail::SpamAssassin::PerMsgLearner;

This is not an issue running as root. The problem with executing the functions as root is that the bayes files (for learning over time about spam) get written to /nonexistent, a dir that doesn't exist (it is home dir for 'nobody' user).

So either as root or another user I cannot get SpamAssassin to write bayes file to disk so the learning functionality is broken.

1 Answer 1

1

Turns out I had to add the following line to the /etc/mail/spamassassin config and then re-compile spamassassin. Note, it is important to include file name at the end e.g. bayes

bayes_path /path/to/dir/bayes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .