• 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.

Spamassassin 3 on Plesk 7.5.4

B

bartje3

Guest
Hi,

I just wanted to say something positive, after all those messages from failed 7.5.4-updates. I have successfully updated SA to version 3.0.4-1 from http://www.spamassassin.org (on FC2 - Plesk 7.5.4).

First I downloaded the Mail-SpamAssassin-3.0.4.tar.gz

Then from command line:
rpmbuild -tb Mail-SpamAssassin-3.0.4.tar.gz
The rpm's are now in /usr/src/redhat/RPMS/i386/

then I had 2 failing dependencies, which I found (also for other distributions) on:
-perl-parse-syslog (http://dag.wieers.com/packages/perl-Parse-Syslog/)
-perl-Statistics-Distributions (http://dag.wieers.com/packages/perl-Statistics-Distributions/)

Then I installed these two together with the new SA rpm's:

rpm -Uvh perl-Mail-SpamAssassin-3.0.4-1.i386.rpm perl-Parse-Syslog-1.03-1.1.fc2.rf.noarch.rpm perl-Statistics-Distributions-1.02-1.1.fc2.rf.noarch.rpm spamassassin-3.0.4-1.i386.rpm spamassassin-tools-3.0.4-1.i386.rpm

Installation stops also psa-spamassassin and then it takes REALLY LONG (in my case almost 10 minutes), so don't interrupt - server is not hanging ! (think he is updating the existing mailaccounts)

Now Spamassassin works like a charm, did a few tests (also with the PSA "watchdog" and "spamtraining") - No problem.

Regards,
Bart
 
Go into your PSA Service and restart spamassassin.


Does it restart or just dies there and no longer start back up again?


I already tried several time to get psa-spamassassin to accept the SA3 but it just still refuses to so I have went back to 2.63 for the time being.


I must be missing something.


Bill
 
Hi,

Yes it does restart from the services page in Plesk !

Have you also installed spamassassin-tools and perl-Mail-SpamAssassin ?
Also Plesk 7.5.4 is REQUIRED, previsious versions do not have support for SA 3

If it doesn't restart, stop spamassassin from command line:
service spamassassin stop

Then go to your Plesk and start the service.

Kind Regards,
Bart
 
My experience:
downloaded SA3, built rpm, installed them (3 for SuSE 9.1) and everything seemed fine. But spamd could not restart on ssh, SA in CP was able to. Spammng could be restartet on ssh. SA worked tested in the shell, but mails were not scanned anymore. After a couple of hours (install/uninstall/reinstall/reconfig) I decided to go back to 2.6.3/4, which worked fine for me and which i configured very effective. I had to do this because my clients love SA since its working well. But big surprise and anger: the whole SA-Config had gone, all mailboxes hat SA not active, table psa/sa_conf was EMPTY and and the file user_prefs (in qmail/mailnames) had been reset to default (4 Lines, not very effective). So I had to go to each Mailbox in CP, reactivate SA an then copy my configured user_prefs to each mbox in qmail/mailnames. I need this because SA uses server-wide and personal settings. One more night spent after updating something on my box. I hope that a preconfigured SA3 will be available and delivered with the next Plesk-Update.
By the way: does anybody know, if the file user_prefs ist generated via script on mailbox-creation or is copied from somewhere? It would be very usefull for me to know this, so I could save much time, because now I have to copy this file in each new mailbox via ssh. I have some scripts which act on domain-creation (for awstats p.e.), but I did not find a handler or a variable from which I can get the mailboxname like it is stored in qmail/mailnames for copying user_prefs-file via script on mailbox creation.
Another bad thing: It would be much better to store SA-Config (enabled/disabled for specific mailbox) in the corresponding table (psa/mail) than copying the mailadress to an other table (psa/sa_conf). So one could turn on (or off) SA for all existing mailboxes (server-wide oder for single domains) via sql-script.
Perhaps for the next update...
This night, my wife did not allow me to open putty... ;-)
 
Hi,

I just upgraded SA2.64 to SA 3.04 on SuSe 9.1 (german 1&1 Server with Plesk 7.5.4)
I followed the instructions mentioned by bartje3 but there were some problems.
SA didn't work properly anymore.
so i had to reinstall the original packages from psa.

but now i found a way how to bypass the problems.

Sorry for my english which may be somewhat "too german" but here is my way:
(only what i have done, not why [would take too long to describe and im not as expierienced in linux as i should be to describe everything correctly])

download Mail-SpamAssassin-3.0.4.tar.gz
Code:
rpmbuild -tb Mail-SpamAssassin-3.0.4.tar.gz 

cd /usr/src/packages/RPMS/i586

/etc/psa-spamassassin stop
if u are using watchdog be sure it is disabled for spamassassin!

follow the instructions under http://wiki.apache.org/spamassassin/UpgradeTo300
and download and run the file sa3-upgrade.pl script from that site.

after that:

Code:
sa-learn --rebuild [or sa-learn --sync]

rpm -Uvh --force perl-Mail-SpamAssassin-3.0.4-1.i586.rpm spamassassin-3.0.4-1.i586.rpm spamassassin-tools-3.0.4-1.i586.rpm
 
rpm -q spamassassin
In my case there now are two versions:
- the old one from psa (spamassassin-2.64-3.2)
- and the new 3.04
Code:
rpm -e spamassassin-2.64-3.2
only to be sure everything is set up correctly:
Code:
rpm -Uvh perl-Mail-SpamAssassin-3.0.4-1.i586.rpm
Code:
cp /usr/bin/spamd /usr/sbin

sa-learn --sync

psa-spamassassin start
-> now it should work
 
Hello kleriker,

your description of the update-procedure gives me hope and energy to give it one more try. Some questions:
- Did you make any SuSE-Updates for qmail (like in http://wiki.apache.org/spamassassin/UpgradeTo300)?
- With "rpm -e spamassassin-2.64-3.2" your are uninstalling SA 2.64, are you not uninstalling perl-spamassassin (2.6.4)?
- What do you doing with "rpm -q spamassassin"? When I ask rpm --help, it does not show the parameter "q"...
- Are you now able to start/stop spammassassin in a shell with "/etc/init.d/spamd restart" and "/usr/local/psa/admin/bin/spammng (re)start"?
If you have answers to all these questions, I would be very happy :)
Grüße aus Freiburg (greetings from my hometown),
ProfiTiger
 
hi ProfiTiger

well, i will try to answer your questions:

- Did you make any SuSE-Updates for qmail (like in http://wiki.apache.org/spamassassin/UpgradeTo300)?
No
- With "rpm -e spamassassin-2.64-3.2" your are uninstalling SA 2.64, are you not uninstalling perl-spamassassin (2.6.4)?
worked for me without uninstalling it.
if you get errors while updating it may be better to uninstall it, too
- What do you doing with "rpm -q spamassassin"? When I ask rpm --help, it does not show the parameter "q"...
Sorry, this is not relevant for install or uninstall.
i just checked what packages are installed.
- Are you now able to start/stop spammassassin in a shell with "/etc/init.d/spamd restart" and "/usr/local/psa/admin/bin/spammng (re)start"?
i start SA from console with the plesk startup script or directly from plesk cp.
never tried another way on this server.

btw:
no probs till now. works fine with all customizations, razor, dcc, etc

greetz from hessen(giessen),
kleriker
 
Thnx for your help.
There is one question left:
After the update, did you have to reactivate SA in CP for each mailbox or were these settings leaved untouched? Did the uninstall of SA 2.6.4 delete all of the "user_prefs"-files in /var/qmail/mailnames (or install new, empty files with only 4 lines in it, size between 50-60 k)?
Oups, two questions... :rolleyes:
 
i didn't lost any of my settings and i had not to reactivate SA for any account.
if you follow the steps I mentioned above all settings leave untouched respectively were translated into sa3 format by the sa3_upgrade script.
but i suggest to check the files before restarting SA to play it safe :)

good luck :cool:
 
had to uninstall perl-spamassassin-2.x,
but then it WORKED!
Big thanx to Kleriker and bartje3 for their work :) :) :)
 
Originally posted by bartje3
Hi,

I just wanted to say something positive, after all those messages from failed 7.5.4-updates. I have successfully updated SA to version 3.0.4-1 from http://www.spamassassin.org (on FC2 - Plesk 7.5.4).

First I downloaded the Mail-SpamAssassin-3.0.4.tar.gz

Then from command line:
rpmbuild -tb Mail-SpamAssassin-3.0.4.tar.gz
The rpm's are now in /usr/src/redhat/RPMS/i386/

then I had 2 failing dependencies, which I found (also for other distributions) on:
-perl-parse-syslog (http://dag.wieers.com/packages/perl-Parse-Syslog/)
-perl-Statistics-Distributions (http://dag.wieers.com/packages/perl-Statistics-Distributions/)

Then I installed these two together with the new SA rpm's:

rpm -Uvh perl-Mail-SpamAssassin-3.0.4-1.i386.rpm perl-Parse-Syslog-1.03-1.1.fc2.rf.noarch.rpm perl-Statistics-Distributions-1.02-1.1.fc2.rf.noarch.rpm spamassassin-3.0.4-1.i386.rpm spamassassin-tools-3.0.4-1.i386.rpm

Installation stops also psa-spamassassin and then it takes REALLY LONG (in my case almost 10 minutes), so don't interrupt - server is not hanging ! (think he is updating the existing mailaccounts)

Now Spamassassin works like a charm, did a few tests (also with the PSA "watchdog" and "spamtraining") - No problem.

Regards,
Bart

I followed these instructions and it worked like a charm. I had to start SA from inside the Plesk panel after it was complete, but other than that, it works good!

Note: SA 3.1.0 is out now, so you have to go here to get 3.0.4: http://www.cpan.org/modules/by-module/Mail/


Thanks
 
Gentlemen:

Today I decided to go for SA 3.1.0-1 as my previous SA 2.63 was kinda limping already in terms of false positives.
I read this post from cover to cover. Thank you all, especially to Kleriker. I did my homework first at spamassassin.org then in this forum and at atomicturtle as well. So, my results as of now are:
1. My system:
RHL 3ES
PSA 7.5.4
ex-SA 2.63

2. My Installation:
- downed & built SA 3.1.0-1 RPMs
- ran installation, but it did not install sa-tools.rpm as in kleriker's example
- I found a standalone sa-tools.rpm and ran it too, but it kept asking for e-smith database for razor & pyzor
- I found e-smith (both standard & USA), but did not run it as it started to ask for more server components unknown to me, so I decided not to install razor and pyzor
- did sa-learn --rebuild/sync - did not notice any importing from previous DB
- ran sa3-upgrade.pl from spamassassin.org - this went well
- SA starts/shuts/down/restarts/ from PSA CP no problem

3. My problems now:
a. I can do HAM and UNKNOWN training, but it wouldn't train SPAM ! When you tick a message & hit "It's Spam" in PSA Training module the screen reloads & shows empty fields plus zeros down all counters in SPAM NON-SPAM positions > I refresh the screen or hit "UP LEVEL" > Training and it takes me back to the last screen and I can see the same spam message sitting there untrained.

b. I emailed spam & non-spam sample messages from the RPM package - detection is fine. I checked both messages headers: AutoLearn = NO > I checked local.cf - AutoLearn = 1 there.

c. My /etc/mail/spamassassin/ does not have Plugins folder. Is it because the Tools did not install or why?

Well, I'm not much concerned about the tools as I take that now they're under different licenses. My main concern is why SA would train SPAM, which is it's primary task.
Has anyone experienced this with SA 3.1.0-1?
Appreciate any advice.
 
Correction:
Wrong: My main concern is why SA would train SPAM, which is it's primary task.

Correct: My main concern is why SA would NOT train SPAM, which is it's primary task.

Also, my concern #2 is AutoLearn=0 in headers while it's 1 in local.cf

Thanks again.
 
As I know, autolearn in header shows not the setting, if autolearn is enabled or not. It shows, if SA does autolearn this mail as SPAM or HAM depending on the treshold-settings in local.cf
---------------------------------------------------
bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam 0.3
bayes_auto_learn_threshold_spam 4.0
--------------------------------------------------
These settings enable autolearn, mark a mail as ham if treshold is below 0.3 and marks as spam if its over 4.0 point.
 
To ProfiTiger:

These Bayes directories: Do i need to chenge settings in each user's directory or are they in just one root folder?
Thank you.
 
As I know, the training-data of bayes-filter is stored in each users qmail-directory (var/qmail/mailnaimes/domain.tld/adress
There are the files bayes_seen and bayes_toks. These files are trained within the cp (and after a short mod of horde there is a possibility to train SA, too). In this directory, you can find the file user_prefs which regulates SA-behaviour, if you select "per user" in SA-settings in cp. If you use only serverwide-settings (I do not), only the file local.cf in the SA-directory is used. I don't think there is a common-bayes-trainig-file which can be used by all users. There are posts here in and in other boards on the internet explaining how you can enable this. I did not do this because each user should have the decission, what is spam and what ham for him. On a per-user-setting with user_prefs and with working rules_du_jour, I have a spam detection/filtering rate of nearly 95% which is fine for me and our customers and so we needs no further modification of SA.(never change a running system...)
 
Which version are you running, ProfiTiger?

Yes, I've found them, thank you. In fact they're in .../domain.tld/accountname/.spamassassin/ shadow path. The files are not human-readable or editable, so PSA CP is the only handle here.
My SA still doesn't want to train SPAM. It asked for perl-NET-DNS version uptade, which I did. Then I found another error in Maillog that there's:
"persistent_udp: no such method at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/DnsResolver.pm line 99"
I greped Line 99 and it is: "$self->{res}->persistent_udp(0); # bug 3997" that I'm still googling for.
Otherwise I have both spamd_full & light socks (server-wide & personal settings) running, but SPAM doesn't get picked up.
I guess I'll just try reinstalling SAP 3 or, if it fails, roll it back to SA 2.60+.
Thanks for your input, man.
 
Everyone:

Don't waste your time upgrading SA to 3.1.0-1 on PSA 7.5.4. PSA is not compatible with it yet. SA 3.1+ isn't stable, can't be trained for spam from PSA and if you add new black or whitelists, it totally messes up your local.cf in SA, so it stops catching anything then.
I nuked SA 3.1.0-1 & put 3.0.3-1 instead which runs just fine; I can train it & it does rt checking with all major spam databases.
This has been my experience so far.
Good luck to all.
 
Back
Top