Spamassasin squirrelmail and sa-learn

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
Hello,

I nedeed a way of spamassassin to get intiligent.
So i updated spamassassin with all kind of new rules and info and it blocked 97% of the spam.

Then i discovered sa-learn
as i (think) i understand sa-learn does the learning as the user wich invokes the command.
YThis is offcource not what i want. bacause i have many different accounts on the server. what is spam to user1 can be ham for user2.

So i thought i could install the spam button plugin in to squirrelmail. so that users can teach the spamassassin what is spam and ham for them :)

But in the config file for the spam button plugin for squirrelmail ar a lot off options wich i cant set due to a lack of knowledge.
squirrelmail is run as user nobody i think, so in the config file i need to set the option so that if the "this is spam" button is pressed a sa-learn command is invoked, but as the user who is reading his email and NOT as the nobody user.

how do i do this?

the options in the plugin config.php ar as followed

// Sample for SpamAssassin:
//
//$is_spam_shell_command = '/usr/bin/sa-learn --spam --configpath=/etc/spamassassin -p /root/.spamassassin/user_prefs';
//$is_not_spam_shell_command = '/usr/bin/sa-learn --ham --configpath=/etc/spamassassin -p /root/.spamassassin/user_prefs';
//


// Sample for SpamAssassin per-user configuration:
//
//$is_spam_shell_command = '/usr/bin/sa-learn --spam --username=###EMAIL_ADDRESS###';
//$is_not_spam_shell_command = '/usr/bin/sa-learn --ham --username=###EMAIL_ADDRESS###';
//


// Advanced sample for SpamAssassin:
//
// In order to make sure you are running sa-learn as the correct user (else it will be
// run as the user that your web server runs as), you may need to run the command with
// sudo. In /etc/sudoers, you will want to set this:
//
// web_server_user ALL=(sa_user) NOPASSWD: /usr/bin/sa-learn, /usr/bin/spamassassin
//
// Where you need to change "web_server_user" to the actual userID of the user running
// your web server, and "sa_user" to the user that should run sa-learn (or spamassasin).
//
// After that, one of the following command pairs should work for you (remember to
// replace "sa_user" with the correct username):
//
//$is_spam_shell_command = 'sudo -u sa_user /usr/bin/sa-learn --spam';
//$is_not_spam_shell_command = 'sudo -u sa_user /usr/bin/sa-learn --ham';
//
//$is_spam_shell_command = 'sudo -u sa_user /usr/bin/spamassassin -r --configpath=/etc/spamassassin -p /root/.spamassassin/us$
//$is_not_spam_shell_command = 'sudo -u sa_user /usr/bin/spamassassin -k --configpath=/etc/spamassassin -p /root/.spamassassi$
//
//
//


would this work out off the box if i set it to use the per user config option?

Thanks in advance
 
Adding intelligence to SA is a losing battle because the spammers have SA set up, too, using all the latest rulesets, and Bayes installed as well.

And they continually run their emails through SA until they pass, before they send 'em to you.

Jeff
 
I Use BayesSpam Filtering for my email and it works wonderfully! The only draw back is that it's slow. It's slow at parsing the emails it checks and thus the login/refresh is SLOW. I don't know how to get around it to make it any faster. I know it's slow b/c I have a regular SM installed at a different directory and it's faster in login/checking emails than the SM w/ BayesSpam Filtering.

I wonder if anyone got spamassassin working like Bayesspam. I want to be able to interact with spamassassin like I do with bayesspam. spamassassin would be a lot faster b/c it's at the root level. Bayesspam initiates only when you log in. There are plugins to allow SM to hookup with spamassassin but it doesn't work for our setup or requires extensive knowlege to install=(
 
Back
Top