Control: tags -1 + moreinfo On Mon, Aug 23, 2021 at 04:39:55PM -0700, Francois Marier wrote: > > 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" >
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