Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 15th June 2010, 19:55
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 258 Times in 206 Posts
Post Using clamd / spamd instead of clamscan / spamassassin in ispconfig 2

I know this topic has come up several times here, so I decided to make a little shell script as I needed this myself.

The script below works for debian lenny with ispconfig 2 installed.
I do not guarantee that this will work for you, use it at your own risk

Code:
#!/bin/sh
apt-get -q -y install clamav-daemon spamassassin

/etc/init.d/ispconfig_server stop
/etc/init.d/postfix stop

sed -i -r "s/^CLAMSCAN=.*/CLAMSCAN=\/usr\/bin\/clamdscan/" /home/admispconfig/ispconfig/tools/clamav/bin/clamassassin
sed -i -r "s/^ScanMail .*/ScanMail true/" /etc/clamav/clamd.conf

sed -i -r "s/^NotifyClamd (.*)/#NotifyClamd \1/" /etc/clamav/freshclam.conf
echo "NotifyClamd /etc/clamav/clamd.conf" >> /etc/clamav/freshclam.conf

sed -i -r "s/^NotifyClamd (.*)/#NotifyClamd \1/" /home/admispconfig/ispconfig/tools/clamav/etc/freshclam.conf
echo "NotifyClamd /etc/clamav/clamd.conf" >> /home/admispconfig/ispconfig/tools/clamav/etc/freshclam.conf

sed -i -r "s/^ENABLED=.*/ENABLED=1/" /etc/default/spamassassin
sed -i -r "s/^CRON=.*/CRON=1/" /etc/default/spamassassin

sed -i -r "s/\| .*\-\-prefs\-file.*/\| \/usr\/bin\/spamc/" /root/ispconfig/isp/conf/spamassassin.rc.master
find /var/www/ -name ".spamassassin.rc" -exec sed -i -r "s/\| \/home\/admispc.*\/spamassassin.*/\| \/usr\/bin\/spamc/" {} \;


/etc/init.d/spamassassin restart
/etc/init.d/ispconfig_server restart
/etc/init.d/postfix restart


echo "Update done." ;
What this script does:
- Switches from clamscan bundled with ispc to clamd to reduce server load
- Switches from spamassassin bundled with ispc to spamd/spamc
- Enables daily sa-update cron
- changes all existing user spamassassin config files to use spamc

You should have the debian volatile project in your apt sources.list!
Reply With Quote
The Following 7 Users Say Thank You to Croydon For This Useful Post:
falko (16th June 2010), MasteRTriX (18th November 2010), mike4494 (22nd August 2010), oriongr (10th December 2010), radim_h (7th September 2010), Spaetzle (2nd November 2010), till (16th June 2010)
Sponsored Links
 

Bookmarks

Tags
clamd, clamscan, spamassassin, spamc, spamd

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clamd terminating too quickly? BorderAmigos Installation/Configuration 2 5th April 2010 15:33
ISPConfig 3.0.1 released till General 36 29th March 2009 14:30
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 14:31
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
How to config spamassassin and clamAV in ISPconfig? tom Installation/Configuration 16 25th May 2006 05:24


All times are GMT +2. The time now is 20:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.