Spamassassin learning on cagefs

xervers

New member
Joined
Oct 18, 2023
Messages
1
Location
Portugal
Hello Folks.
I've been using Directadmin with Cloudlinux for several years now.
Recently, I've been receiving a lot of spam messages that I can't unsubscribe from and that spamassassin doesn't seem to detect (spam score of 4.1).

Looking at the Directadmin documentation here, I can teach spamassassin to identify the spam messages. I've got everything correctly configured but there's a problem: I can't run the "sa-learn --dump magic" command as user because the users are on cagefs and so the sa-learn command is not available.

I am wondering if anyone already faced this problem and solved it. If so, can you share a solution?

Thank you.
 
Open the file /etc/cagefs/conf.d/custom.cfg with vim for example. If the file doesn't already exist, this will create it.

Code:
vi /etc/cagefs/conf.d/binutils.cfg

Add this:

Code:
[spamassassin]
comment=custom paths for spamassassin
paths=/usr/bin/sa-learn

To apply the change, run the following command:

Code:
cagefsctl --force-update

Let me know your results please.
 
Thanks for your reply:

I put:
/etc/cagefs/conf.d/spamassassin.conf

[spamassassin]
comment=SpamaAssssin
paths=/usr/bin/sa-learn

and next:

cagefsctl --force-update

But when access to the user:

su -l xxxx -s /bin/sh
sa-learn --dump magic

I have:

-sh: sa-learn: command not found
 
Thanks for your reply:

I put:
/etc/cagefs/conf.d/spamassassin.conf

[spamassassin]
comment=SpamaAssssin
paths=/usr/bin/sa-learn

and next:

cagefsctl --force-update

But when access to the user:

su -l xxxx -s /bin/sh
sa-learn --dump magic

I have:

-sh: sa-learn: command not found

I don't know anything but did you try the full path /usr/bin/sa-learn
 
Back
Top