• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Plesk 7.5.3 FreeBSD - Link Report as Spam Option in IMP to sa-learn --ham

kevin@

Basic Pleskian
Does anyone know how to do this? Either i'm blind or there really isn't any documentation describing exactly how to do this on the horde site or the spamassassin site...

I was able to 'enable' the Report as Spam button but it currently does nothing. How can I make it report the email as SPAM by using the Bayesian database and sa-learn?

Note: I *DO* have the Baysian database and sa-learn currently working on the fly so that is not an issue. I just need to know how to feed in the spams that don't get caught by the filter, and feed in the hams that mistakenly DO get caught by the filter.

Thanks in advance!

Kevin
 
I've made a tiny bit of progress from searching mailing lists and messageboards...

I added the following to imp/conf.php:

$conf['spam']['reporting'] = true;
$conf['spam']['program'] = '/usr/local/psa/spamassassin/bin/sa-learn --spam';
$conf['notspam']['reporting'] = true;
$conf['notspam']['program'] = '/usr/local/psa/spamassassin/bin/sa-learn --ham';

Now in addition to having the "Report as Spam" or "Report as Innocent" links IMP actually will say "1 message(s) reported as spam"

Unfortuntely, nothing is actually happening... I checked the Bayes db before and after, and the nspam and nham counts do not increase at all.

My biggest problem here is that there are really no logs to look at so I can't see what is actually happening when I click "Report as SPAM" I tried running spamd in debug mode, but it only seems to log messages related to email coming into the server, not any messages 'reported as SPAM'

Any ideas? What am I missing here?

Thanks

Kevin
 
I'd already come across that thread :) Hasn't helped much but thanks anyway...

Kevin

I'm still searching..
 
so far i've tried:

$conf['spam']['program'] = '/usr/local/psa/spamassassin/bin/spamassassin -r';
$conf['spam']['program'] = '/usr/local/psa/spamassassin/bin/sa-learn --spam';
$conf['spam']['program'] = 'su -c /usr/local/psa/spamassassin/bin/sa-learn --spam $user';
$conf['spam']['program'] = '/usr/bin/spamc -u ' . Auth::getAuth();

all unsuccessful

funny enough i had just read that 2nd link you posted too :) seems we're getting the same search results! d'oh!
 
fyi i am more concerned with training my own global Bayesian database than actually 'reporting' the spam to other services.

(so I'd rather use sa-learn --spam/--ham)
 
I found that the error messages are actually being logged to /usr/local/psa/apache/log/error_log

This is what I am getting with the /usr/local/psa/spamassassin/bin/sa-learn --spam option:

/usr/libexec/ld-elf.so.1: /usr/bin/perl: Undefined symbol "PL_exit_flags"

What does that mean?
 
Some more progress...

I noticed by examining /usr/local/psa/spamassassin/bin/sa-learn
that it is calling /usr/bin/perl (which is version 5.8.6)
and is producing this error message:

/usr/libexec/ld-elf.so.1: /usr/bin/perl: Undefined symbol "PL_exit_flags"

Yet it is using the libs from perl 5.0:
use lib '/usr/local/psa/lib/perl5/site_perl/5.005'; # substituted at 'make' time

Just for shits and giggles, I changed sa-learn to call /usr/bin/perl.50 (the older version that matches the libs that sa-learn wants)

Now I get this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
bayes: lock: 37315 cannot create tmp lockfile /root/.spamassassin/bayes.lock.my.server.com.37315 for /root/.spamassassin/bayes.lock: Permission denied

bayes expire_old_tokens: lock: 37315 cannot create tmp lockfile /root/.spamassassin/bayes.lock.my.server.com.37315 for /root/.spamassassin/bayes.lock: Permission denied

lock: 37315 cannot create tmp lockfile /root/.spamassassin/bayes.lock.my.server.com.37315 for /root/.spamassassin/bayes.lock: Permission denied


Looks like I'm now in the same boat as the user on that messageboard/list that we both read. I'm going to re-read the posts again and see if I can use the suggestions to come up with a solution. Any further help or ideas would also be appreciated! :)
 
cannot create tmp lockfile /root/.spamassassin/bayes.lock.my.server.com.37315

If you do a ls -al in /root/ you will see the ownership of .spamassassin is root:root and the chmod is drwx------

Since SA is (I believe) running under user credentials (not root), this may pose a problem for it to create the tmp file. This may be why the other thread mentioned trying to run it with su -c

Now if only I had a spare few hours of down time, I could setup a fresh test server and do some hands on playing....

How interesting, I just got this in an email from 4PSA -
4PSA Spam Guardian 2.0.5 is available. 4PSA Spam Guardian 2.0.5 is a minor release that introduces new features and fixes discovered bugs:

[+] Debian 3.1 supported
[+] ham_learn IMAP folders added for learning

[-] Quota is no longer ignored by safecat (safecat update is required - www.4psa.com/software/)
[-] Statistics problem fixed
[-] 4PSA Spam Guardian follows 4PSA Clean Server in .qmail files
I'll have to do the upgrade and see if it works (when I get a chance)
 
Originally posted by jamesyeeoc
If you do a ls -al in /root/ you will see the ownership of .spamassassin is root:root and the chmod is drwx------

Since SA is (I believe) running under user credentials (not root), this may pose a problem for it to create the tmp file. This may be why the other thread mentioned trying to run it with su -c
Here is how it is currently set up, I had to modify it so that popuser (which is the user that runs spamassassin) could read/write the directory in order for the Bayesian database to work in the first place. (sa-autoleaning via incoming email)

drwxr-xr-x 2 popuser popuser 512 Jun 14 14:08 .spamassassin
Now if only I had a spare few hours of down time, I could setup a fresh test server and do some hands on playing....

How interesting, I just got this in an email from 4PSA -
I'll have to do the upgrade and see if it works (when I get a chance) [/B]

I would certainly appreciate the help! I'm going to tinker with it a bit more tonight and see if I can figure anything out. I had originally assumed that if popuser could write to /root/.spamassassin in the first place then the 'report as spam' feature would work too and thats not the case...

Kevin
 
I did it!!!

I followed the tips on that spamassassin-users mailing list in regards to the permissions.

Here's how I currently have it set up:

in /var/ :
drwxrwxrwx 2 nobody nobody 512 Jun 15 10:31 spamassassin

/var/spamassassin# ls -la
total 5480
drwxrwxrwx 2 nobody nobody 512 Jun 15 10:31 .
drwxr-xr-x 25 root wheel 512 Jun 15 10:10 ..
-rw-rw-rw- 1 popuser nobody 604 Jun 15 10:31 bayes_journal
-rw-rw-rw- 1 popuser popuser 1343488 Jun 15 10:26 bayes_seen
-rw-rw-rw- 1 popuser popuser 4227072 Jun 15 10:26 bayes_toks
-rwxr-xr-x 1 popuser popuser 1165 May 30 13:50 user_prefs

Now I can "Report as Spam" & "Report as Innocent" and it works like a charm!! SWSoft should sell PSA set up like this already, it's effectiveness is so good!

Oh, one other thing. In /usr/local/psa/spamassassin/bin/ I had to edit sa-learn and point perl to /usr/bin/perl.50 instead of /usr/bin/perl (since that would use 5.8.6)

The spamassassin packaged with plesk, since it's older, requires the old perl.

Cheers
 
spamassassin

I need Help with the 'Report as Spam' button functionality .

I am trying to have it add the selected message into the plesk spamassassin user specific black list.

AND have that message moved into a SPAM directory.

Has anyone been successfull in doing something similar?
 
Back
Top