Sorry I copied and pasted so I must have missed that but it is there 
and defined as 

MilterSocket /var/run/clamd/clamav-milter.socket


Ah!!!! but I did find this


##
## Clamd options
##

# Define the clamd socket to connect to for scanning.
# This option is mandatory! Syntax:
# ClamdSocket unix:path
# ClamdSocket tcp:host:port
# The first syntax specifies a local unix socket (needs an absolute path) e.g.:
#     ClamdSocket unix:/var/run/clamd/clamd.socket
# The second syntax specifies a tcp local or remote tcp socket: the
# host can be a hostname or an ip address; the ":port" field is only required
# for IPv6 addresses, otherwise it defaults to 3310
#     ClamdSocket tcp:192.168.0.1
#
# This option can be repeated several times with different sockets or even
# with the same socket: clamd servers will be selected in a round-robin fashion.
#
# Default: no default
#ClamdSocket tcp:scanner.mydomain:7357




I removed the comment from ClamSocket..... and put in the correct path. 
However, clamilt would still not run.Then, I changed the start-up script to 
this the following, which allowed me to start and stop the daemons 
independently. I stopped all, started clamd, waited for completion, then 
started clamilt and voila!!! It worked!! Thanks to Jason Bertoch, who clued me 
into the fact the server should be running before the milter :P

For now as a quick fix, I'm going to put in a sleep between the two starts, but 
does in not make sense to have milter run, but send a warning that the server 
is disco? This way admins would have a away of knowing if clam engine is down 
for any reason.


#!/bin/sh
#
# clamav-milter This script starts and stops the clamav-milter daemon
#
# chkconfig: - 79 40
#
# description: clamav-milter is a daemon which hooks into sendmail and routes \
#              email messages for virus scanning with ClamAV
# processname: clamav-milter
# pidfile: /var/lock/subsys/clamav-milter

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Local clamav-milter config
CLAMAV_FLAGS=
test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin

RETVAL=0

start_clamd() {

    # ADD BY SHAWN 04122010 for new ClamAV implementation 
    echo -n "Starting clam AV Server: "
    touch /var/lock/subsys/clamd

    if [ -x /sbin/restorecon ] ; then
        /sbin/restorecon /var/lock/subsys/clamd
    fi

        LANG= daemon clamd ${CLAMD_FLAGS}
        RETVAL=$?
        echo
        test $RETVAL -eq 0
        return $RETVAL
}

start_clamilt() {

        echo -n "Starting clamav-milter: "
    # Don't allow files larger than 20M to be created, to limit DoS
    # Needs to be large enough to extract the signature files
    ulimit -f 20000
    touch /var/lock/subsys/clamav-milter
# SE Linux Fix from http://webui.sourcelabs.com/fedora/issues/447247 (and in 
spamass-miter)

    if [ -x /sbin/restorecon ] ; then 
        /sbin/restorecon /var/lock/subsys/clamav-milter
    fi
# removed as we log to syslog now
    #if [ -x /sbin/restorecon ] ; then 
#        /sbin/restorecon /var/log/clamd.milter
#    fi
     
    LANG= daemon clamav-milter ${CLAMAV_FLAGS}
        RETVAL=$?
        echo
    test $RETVAL -eq 0
    return $RETVAL
}


start() {

    start_clamd
    start_clamilt
}


stop_clamd() {

    echo -n "Shuttung down clamd: "
    killproc clamd
        RETVAL=$?
        echo
        test $RETVAL -eq 0 && rm -f /var/lock/subsys/clamd

}

stop_clamilt() {
        echo -n "Shutting down clamav-milter: "
        killproc clamav-milter
        RETVAL=$?
        echo
    test $RETVAL -eq 0 && rm -f /var/lock/subsys/clamav-milter
}


stop() {

    stop_clamilt
    stop_clamd
}


restart() {
    stop
    start
}

# See how we were called.
case "$1" in
  start)
    case "$2" in
        clamd)
        start_clamd
        ;;
        clamilt)
        start_clamilt
        ;;
        *)
        start
            ;;
    esac
    ;;
  stop)
    case "$2" in
        clamd)
        stop_clamd
        ;;
        clamilt)
        stop_clamilt
        ;;
        *)
        stop
            ;;
       esac
    ;; 
  restart|reload)
    restart
        ;;
  condrestart)
    test -f /var/lock/subsys/clamav-milter && -f /var/lock/subsys/clamd && 
restart || :
        ;;
  status)
        status clamav-milter
        status clamd
        ;;
  *)
        echo "Usage: $0 
{start[clamd|clamilt]|stop[clamd|clamilt]|reload|restart|condrestart|status}"
        exit 1
esac

exit $?









> Date: Tue, 11 May 2010 19:33:42 +0000
> From: replies-lists-a1z2-cla...@listmail.innovate.net
> To: shashan...@hotmail.com
> Subject: Re: [Clamav-users] Can not get clamav-milter to work on Sendmail
> 
> In your clamav-milter.conf file, what do you have defined for the
> clamd socket, and does that match where it is (including name) when
> clamd starts? 
> 
> By the way, I suspect that the rpmforge repository has rpms of the
> current version of the clamav suite for FC8.
> 
>      - Richard
> 
> 
> ------------ Original Message ------------
> > Date: Tuesday, May 11, 2010 03:03:37 PM -0400
> > From: Shawn Bakhtiar <shashan...@hotmail.com>
> > To: clamav-users@lists.clamav.net
> > Subject: [Clamav-users] Can not get clamav-milter to work on
> Sendmail
> >
> > 
> > 
> > I have been trying to get clamav-milter to work on Linux FC 8:
> > 
> > Linux smtp 2.6.26.6-49.fc8 #1 SMP Fri Oct 17 15:33:32 EDT 2008
> > x86_64 x86_64 x86_64 GNU/Linux Fedora release 8 (Werewolf)
> > 
> > 
> > I downloaded the latest source and built. freshclam is working, it
> > looks like I am able to run the clamav daemon, but for some reason
> > my clamav-milter is NOT starting... and given all the changes I
> > don't know if I am doing this right:
> > 
> > sendmail.mc:
> > 
> > ....
> > dnl # SPAM FILTERS
> > INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/spamass-milter/
> > spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
> > INPUT_MAIL_FILTER(`clmilter',
> > `S=local:/var/run/clamd/clamav-milter.socket, F=, T=S:4m;R:4m')dnl
> > define(`confINPUT_MAIL_FILTERS', `clmilter,spamassassin')dnl ....
> > 
> > 
> > /usr/local/etc/clamav-milter.conf 
> > 
> > ...
> > 
> > MilterSocket /var/run/clamd/clamav-milter.socket
> > User clamav 
> > PidFile /var/run/clamd/clamav-milter.pid
> > 
> > LogTime yes
> > LogSyslog yes
> > LogFacility LOG_LOCAL6
> > 
> > ....
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Here is my startup script which I updated to run the clamd then
> > launch clamav (log follows). No matter what I do, clam-miter does
> > not seem to be running? Any ideas?
> > 
> > 
> > 
> > 
> > [r...@smtp log]# more /etc/init.d/clamav-milter 
> ># !/bin/sh
> ># 
> ># clamav-milter This script starts and stops the clamav-milter
> ># daemon
> ># 
> ># chkconfig: - 79 40
> ># 
> ># description: clamav-milter is a daemon which hooks into sendmail
> ># and routes \ email messages for virus scanning with ClamAV
> ># processname: clamav-milter
> ># pidfile: /var/lock/subsys/clamav-milter
> > 
> ># Source function library.
> > . /etc/rc.d/init.d/functions
> > 
> ># Source networking configuration.
> > . /etc/sysconfig/network
> > 
> ># Local clamav-milter config
> > CLAMAV_FLAGS=
> > test -f /etc/sysconfig/clamav-milter && .
> > /etc/sysconfig/clamav-milter
> > 
> ># Check that networking is up.
> > [ ${NETWORKING} = "no" ] && exit 0
> > 
> > PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
> > 
> > RETVAL=0
> > 
> > start() {
> > 
> >     # ADD BY SHAWN 04122010 for new ClamAV implementation 
> >     echo -n "Starting clam AV Server: "
> >     touch /var/lock/subsys/clamd
> > 
> >     if [ -x /sbin/restorecon ] ; then
> >         /sbin/restorecon /var/lock/subsys/clamd
> >     fi
> > 
> >         LANG= daemon clamd ${CLAMD_FLAGS}
> >         RETVAL=$?
> >         echo
> >         test $RETVAL -eq 0
> >         return $RETVAL
> > 
> > 
> >         echo -n "Starting clamav-milter: "
> >     # Don't allow files larger than 20M to be created, to limit DoS
> >     # Needs to be large enough to extract the signature files
> >     ulimit -f 20000
> >     touch /var/lock/subsys/clamav-milter
> ># SE Linux Fix from
> ># http://webui.sourcelabs.com/fedora/issues/447247 (and in
> ># spamass-miter)
> > 
> >     if [ -x /sbin/restorecon ] ; then 
> >         /sbin/restorecon /var/lock/subsys/clamav-milter
> >     fi
> ># removed as we log to syslog now
> >     #if [ -x /sbin/restorecon ] ; then 
> >#        /sbin/restorecon /var/log/clamd.milter
> >#    fi
> >      
> >     LANG= daemon clamav-milter ${CLAMAV_FLAGS}
> >         RETVAL=$?
> >         echo
> >     test $RETVAL -eq 0
> >     return $RETVAL
> > }
> > 
> > stop() {
> > 
> >     echo -n "Shuttung down clamd: "
> >     killproc clamd
> >         RETVAL=$?
> >         echo
> >         test $RETVAL -eq 0 && rm -f /var/lock/subsys/clamd
> > 
> > 
> >         echo -n "Shutting down clamav-milter: "
> >         killproc clamav-milter
> >         RETVAL=$?
> >         echo
> >     test $RETVAL -eq 0 && rm -f /var/lock/subsys/clamav-milter
> > }
> > 
> > restart() {
> >     stop
> >     start
> > }
> > 
> ># See how we were called.
> > case "$1" in
> >   start)
> >         # Start daemon.
> >     start
> >         ;;
> >   stop)
> >         # Stop daemon.
> >     stop
> >         ;;
> >   restart|reload)
> >     restart
> >         ;;
> >   condrestart)
> >     test -f /var/lock/subsys/clamav-milter && restart || :
> >         ;;
> >   status)
> >         status clamav-milter
> >         status clamd
> >         ;;
> >   *)
> >         echo "Usage: $0
> > {start|stop|reload|restart|condrestart|status}"         exit 1
> > esac
> > 
> > exit $?
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > /var/log/clamav.log 
> > 
> > May 11 11:55:20 smtp clamd[31928]: Pid file removed.
> > May 11 11:55:20 smtp clamd[31928]: --- Stopped at Tue May 11
> > 11:55:20 2010 May 11 11:55:20 smtp clamd[31928]: Socket file
> > removed.
> > May 11 11:55:23 smtp clamd[32161]: clamd daemon 0.96 (OS:
> > linux-gnu, ARCH: x86_64, CPU: x86_64) May 11 11:55:23 smtp
> > clamd[32161]: Running as user clamav (UID 497, GID 496) May 11
> > 11:55:23 smtp clamd[32161]: Log file size limited to 1048576 bytes.
> > May 11 11:55:23 smtp clamd[32161]: Reading databases from
> > /usr/local/share/clamav May 11 11:55:23 smtp clamd[32161]: Not
> > loading PUA signatures. May 11 11:55:27 smtp clamd[32161]: Loaded
> > 767740 signatures. May 11 11:55:27 smtp clamd[32161]: LOCAL: Unix
> > socket file /var/run/clamd/clamd.socket May 11 11:55:27 smtp
> > clamd[32161]: LOCAL: Setting connection queue length to 15 May 11
> > 11:55:27 smtp clamd[32162]: Limits: Global size limit set to
> > 104857600 bytes. May 11 11:55:27 smtp clamd[32162]: Limits: File
> > size limit set to 26214400 bytes. May 11 11:55:27 smtp
> > clamd[32162]: Limits: Recursion level limit set to 16. May 11
> > 11:55:27 smtp clamd[32162]: Limits: Files limit set to 10000. May
> > 11 11:55:27 smtp clamd[32162]: Archive support enabled. May 11
> > 11:55:27 smtp clamd[32162]: Algorithmic detection enabled. May 11
> > 11:55:27 smtp clamd[32162]: Portable Executable support enabled.
> > May 11 11:55:27 smtp clamd[32162]: ELF support enabled.
> > May 11 11:55:27 smtp clamd[32162]: Mail files support enabled.
> > May 11 11:55:27 smtp clamd[32162]: OLE2 support enabled.
> > May 11 11:55:27 smtp clamd[32162]: PDF support enabled.
> > May 11 11:55:27 smtp clamd[32162]: HTML support enabled.
> > May 11 11:55:27 smtp clamd[32162]: Self checking every 600 seconds.
> > 
> >                                       
> > _________________________________________________________________
> > The New Busy think 9 to 5 is a cute idea. Combine multiple
> > calendars with Hotmail. 
> > http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&;
> > ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
> > _______________________________________________
> > Help us build a comprehensive ClamAV guide: visit
> > http://wiki.clamav.net http://www.clamav.net/support/ml
> 
> ------------ End Original Message ------------
> 
> 
                                          
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail.  Get busy.                                     
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to