[Kroupware] SpamAssassin + KOLAP mini howto (Draft )

Ian Reinhart Geiser geiseri at sourcextreme.com
Mon Jan 12 17:32:12 CET 2004


Hi,
	We wanted to use spam assassin only at our site, since no winders here ;)  To 
do this i performed the following acts:

login as root
adduser filter
passwd -l filter  (populate with sane defualts)
mkdir /kolab/var/spool/filter
chown filter /kolab/var/spool/filter 
create this script and save it as /kolab/bin/filter.sh
## Start
#!/bin/sh 
 
INSPECT_DIR=/kolab/var/spool/filter 
SENDMAIL="/kolab/sbin/sendmail -i" 
SPAMASSASSIN=/kolab/bin/spamassassin 
 
# Exit codes from <sysexits.h> 
EX_TEMPFAIL=75 
EX_UNAVAILABLE=69 
 
cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; } 
 
# Clean up when done or when aborting. 
trap "rm -f in.$$; rm -f out.$$" 0 1 2 3 15 
 
cat | $SPAMASSASSIN -P > out.$$ || { echo Message content rejected; exit 
$EX_UNAVAILABLE; } 
 
$SENDMAIL "$@" < out.$$ 
 
exit $? 

## End

chmod +x /kolab/bin/filter.sh
su - kolab
su -c "/kolab/bin/rpm -i 
http://www.sourcextreme.com/projects/kolab/spamassassin-2.61-20040108.ix86-linux2.4-kol.rpm"

edit: /kolab/etc/kolab/master.cf.template
comment out the smtp lines ( lines 11 and 21)
add the following lines at the end of the file:
 SpamAssassin
filter    unix  -       n       n       -       -       pipe user=filter 
argv=/kolab/bin/filter.sh -f ${sender} -- ${recipient}
smtp      inet  n       -       n       -       -       smtpd -o 
content_filter=filter:
smtp      unix  -       -       n       -       -       smtp  -o 
content_filter=filter:

then su -c "/kolab/etc/kolab/kolab -o -v" to reconfigure the server
and su -c "/kolab/etc/rc.d/rc.kolab restart" to activate the changes.

you will want to tweak /kolab/etc/spamassasin/local.cf to suit your site then.


Thats it!

If anyone has problems or questions/corrections please let me know.  The 
downloads are at: 
http://www.sourcextreme.com/projects/kolab/spamassassin-2.61-20040108.ix86-linux2.4-kol.rpm
( source rpm can be found at: 
http://www.sourcextreme.com/projects/kolab/spamassassin-2.61-20040108.src.rpm)

The official howto is at http://www.sourcextreme.com/projects/kolab/ and will 
get prettied up here soon ;)

Cheers
	-ian reinhart geiser
-- 
+-Ian Reinhart Geiser geiseri at sourcextreme.com
+-Vice President of Engineering 
+-http://www.sourcextreme.com 


More information about the Kroupware mailing list