- Package:
- spamassassin
- Source:
- spamassassin
- Submitter:
- Francois Marier
- Date:
- 2021-09-03 20:06:03 UTC
- Severity:
- normal
- Tags:
When I run "spamassassin -r" from mutt, I get the following error: Can't locate Mail/SpamAssassin/Bayes.pm: /var/lib/spamassassin/compiled/5.032/3.004006/Mail/SpamAssassin/Bayes.pm: Permission non accordée at /usr/share/perl5/Mail/SpamAssassin.pm line 1771. at /usr/bin/spamassassin line 413. Here's the relevant entry in my ~/.muttrc: macro index \ed "<enter-command>unset wait_key\n<pipe-entry>spamassassin -r\n<enter-command>set wait_key\n<save-message>=spam\n" "report the message as spam" Francois
Control: tags -1 + moreinfo Initialization of the Bayes database involves opening files relative to $HOME. I'm wondering if maybe HOME, or some other important environment variable, is unset when you invoke spamassassin this way. If HOME is unset, then it could be that it's trying to open these files relative to to /, which would result in problems such as the one you describe. What happens if you pipe message content to spamassassin from your shell, outside mutt? Consider adding the '-D' flag to spamassassin to produce a lot of debug output. This could provide additional clues as to what spamassassin is trying to do. noah
I've attached the result of piping your message to spamassassin in this way: cat msg | spamassassin -r -D > spamassassin.out 2>&1 From what I can see, $HOME is set correctly, but perhaps the permissions on /var/lib/spamassassin are the source of the problem given that I'm running the spamassassin binary as the "francois" user? $ ls -ld /var/lib/spamassassin drwxr-x--- 8 debian-spamd debian-spamd 4,0K 4 jun 10:36 /var/lib/spamassassin/ In the last week, I've certainly noticed that SpamAssassin is letting tons of spam through. Maybe because everything ends up triggering BAYES_00? Francois
As far as I can tell, I was able to fix this successfully by doing: chmod a+rx /var/lib/spamassassin Not sure why this changed recently (after the bullseye release), but perhaps that's something that the package needs to set. Francois