On 2/16/2023 4:30 PM, Reindl Harald wrote:


Am 16.02.23 um 21:57 schrieb joe a:
I understand that sa-learn should be run as the same user as spamd, however I find it has always been run as root and when running as the spamassassin user results in errors, such as:

~su -c "sa-learn --spam /var/mail/spamd/Cabinet.Missed-SPAM" spamfilter

results in errors, starting with:

plugin: failed to parse plugin (from @INC): Can't locate Mail/SpamAssassin/Plugin/SpamCop.pm: lib/Mail/SpamAssassin/Plugin/SpamCop.pm: Permission denied at (eval 44) line 1.

plugin: failed to parse plugin (from @INC): Can't locate Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm: lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm: Permission denied at (eval 45) line 1.

One might presume this to be a permissions issue (where would I get THAT idea?) but permissions to what?  As I cannot seem to find the items mentioned even as root.

when you don't use proper packages and even can't update your mlocate database so that "locate SpamAssassin/Plugin/AutoLearnThreshold" that's hardly a SA topic

[root@mail-gw:~]$ rpm -q --file /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm
spamassassin-3.4.6-5.fc36.x86_64

[root@mail-gw:~]$ rpm -q --file /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/SpamCop.pm
spamassassin-3.4.6-5.fc36.x86_64

I have no idea what you refer to when you state "don't user proper packages". "Proper" in what sense? A rhetorical question.

Mlocate is (was) not installed in this particular system but promises to be useful in the future, regardless of your intent. "find" has always been my go to tool. Such as it is.

Still it remains to be determined why root user can run sa-learn without error while another whose permissions are more constrained, cannot.

And that, regardless of root (!) cause, would seem to be an SA topic.

Reply via email to