I mailed this to the sender several days ago but couldn't post it to the
newsgroup. I'm trying again!
I have had clamav-milter running on slack 9.0/9.1 for months without a
hitch. I did this several weeks ago so I hope I can still remember the
procedure.
1. Copy the slack sources into a local folder (eg /root/sendmail)
2. Edit the file site.config.m4 thus:
APPENDDEF(`confMAPDEF',
`-DNEWDB -DSTARTTLS -DTCPWRAPPERS -DNIS -DMAP_REGEX')
APPENDDEF(`confLIBS', `-lnsl -lssl -lcrypto -lwrap -lm -ldb -lresolv')
APPENDDEF(`conf_sendmail_ENVDEF',`-DMILTER')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE ')
ie. add the last two lines
3. run ./Slackbuild (you might need to make a few files executable). That
should compile the necessary libmilter. If not you might need to extract
the sendmail source and compile it from the
/root/sendmail/sendmail-8.12.10/libmilter directory.
4. Install sendmail from /tmp/sendmail and /tmp/sendmail-cf
4. Compile and install clamav etc. You'll need to fiddle the permissions on
a few files. You can put .pid and .sock in /var/run/clamd and change
ownership of this directory to clamav.clamav.
5. Fire it up as below - I needed to add a few sleeps to make it work.
6. To rotate the logs, I put this in /etc/logrotate.d/clam (there was
discussion about this earlier this week):
/var/log/clam/clam*.log {
sharedscripts
postrotate
su clamav '-c /bin/kill -HUP `cat /var/run/clamd/clamd.pid
2>/dev/null` 2>/dev/null || true'
endscript
}
Good luck!
#!/bin/sh
# Start/stop/restart sendmail.
# Start sendmail:
sendmail_start() {
if [ -x /usr/sbin/sendmail ]; then
export PATH=$PATH:/usr/local/bin
echo "Starting clamd: /usr/local/sbin/clamd"
/usr/local/sbin/clamd
echo "Starting clamav-milter: /usr/local/sbin/clamav-milter -lo
/var/run/clmilter.sock"
sleep 1
[ -S /var/run/clmilter.sock ] && rm /var/run/clmilter.sock
/usr/local/sbin/clamav-milter --max-children=2 -lo
/var/run/clmilter.sock &
sleep 1
echo "Starting sendmail MTA daemon: /usr/sbin/sendmail -L
sm-mta -bd -q25m"
/usr/sbin/sendmail -L sm-mta -bd -q25m
echo "Starting sendmail MSP queue runner: /usr/sbin/sendmail -L
sm-msp-queue -Ac -q25m"
/usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
fi
}
# Stop sendmail:
sendmail_stop() {
kill `cat /var/run/clamd/clamd.pid`
killall clamav-milter
[ -S /var/run/clmilter.sock ] && rm /var/run/clmilter.sock
killall sendmail
}
# Restart sendmail:
sendmail_restart() {
sendmail_stop
sleep 1
sendmail_start
}
case "$1" in
'start')
sendmail_start
;;
'stop')
sendmail_stop
;;
'restart')
sendmail_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users