Since my fun with getting these to work manually came with a few difficulties, I thought I'd add a little how-to for the JagPC community on installing SpamAssassin and ClamAV by hand without paying the fees for each module. I'm on a CentOS 5 box, so sorry Debian users.
First, you'll need to install yum (it just makes life easier).
You'll need to add the atomic repos. I'll quote the gist of the instructions from his site (link):
Run just one of these two (I used lynx) and it'll get the GPG key for the repo and enable his "stable" repo. That's the only repo beside the official repos I use.Using Lynx (yum -y install lynx):
lynx -source http://www.atomicorp.com/installers/atomic.sh | sh
Using Wget:
wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
I'd runbefore continuing.Code:yum update
Now, we need to install the packages:
Now, everything should be installed, but qmail (the mail agent for Plesk) will not be working properly because qmail-scanner needs to be configured nicely.Code:yum install clamd psa-spamassassin spamassassin qmail-scanner
First, ClamAV's clamd needs to be set to run as the user qscand. This can be done in the file /etc/clamd.conf using the option User (add the line User qscand if it is not already there). You will need to restart clamd by running
If it does not start because it could not read /var/log/clamav/*.log, chown them to the qscand user.Code:/etc/init.d/clamd restart
Also, be sure that SpamAssassin is loaded and running (/etc/init.d/spamassassin start).
You'll also have to run /usr/share/qmail-scanner/qmail-scanner-reconfigure.psa to make sure that qmail-scanner is correctly set. You can test to see if the scanner is working properly by running /usr/share/qmail-scanner/contrib/test_installation.sh -doit. If it returns an error, then there's something still not properly set. You have two logs at your disposal: /var/spool/qscan/qmail-queue.log and /usr/local/psa/var/log/maillog. Pay attention to the value it gives for the admin email listed at the start of the script (which should be yours). If it gives an incorrect value, you can hard code the reconfigure script by adding
somewhere afterCode:--admin USER \ --domain example.com \
Those two settings will be parsed to send email to USER@example.com. Run the reconfigure script (again) and it should be corrected. Also, the file /etc/qmail-scanner.ini has a bunch of config info for the reconfigure utility, such as the header to use for SpamAssassin if it finds spam, an option between verbose spam reporting and fast check. If you change a setting here, be sure to re-run the reconfigure utility.Code:cd $QMAILSCANNERHOME ./configure \ --batch \ --install \
One other thing I should not. If the qmail-queue log reports an inability to find /var/spool/qscan/settings_per_domain.db, you can run /var/qmail/bin/qmail-scanner-queue.pl -p to fix this. The first time I ran it, it generated /var/spool/qscan/settings_per_domain.db.tmp, which I moved to the proper name and chown it to qscand to get that error solved.
That's it (or should be). SA and Clam are running (for free) on Plesk. You won't be able to configure it from the CP, but it works. You can also still add server-wide rules for SA (thisisit has a good post on that as does Vin).


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks