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.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th June 2010, 19:55
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 932
Thanks: 16
Thanked 262 Times in 208 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
Sponsored Links
Reply

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
ISPconfig 3: can't send or receive messages zogthegreat Installation/Configuration 6 22nd May 2010 14:45
Clamd terminating too quickly? BorderAmigos Installation/Configuration 2 5th April 2010 15:33
ISPConfig installation into multiple OpenVZ containers letezo Installation/Configuration 11 3rd March 2009 22:47
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 12:25.


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