FreeBSD 5.4 Clamav tutorial

If you post it within code tags the line won't wrap.

I can't show you easily how to create a code tag so I'll do it this way:

{code}code goes here{/code}

but replace the { with [ and the } with } each time they appear above.

Jeff
 
Works for freebsd 6.1 too...
There is a problem with rar files (noticed in clamd.conf). Is there a way to install some extra libraries to have rar checking work?
Also how can i notify the users that their mail was blocked?
 
***** For those who get the error in /var/log/exim/mainlog

malware acl condition: clamd: ClamAV returned /var/spool/exim/scan/1GSEhp-000JJA-RN/1GSEhp-000JJA-RN-00002: RAR module failure ERROR

-----------------------------------------------

If you wish to quick enable rar3 checking in freebsd follow these steps :
(i'm new to freebsd so i'm sure that there is a right way to do this)
* I've noticed that with a cd /usr/ports/security/clamav/files there were some patches including libunrar fix. After a make configure in /usr/ports/security/clamav/ i 've noticed that the extra-patch-libclamav__unrarlib.h was included and not extra-patch-libunrar.

1. install libunrar
#pkg_add libunrar
2. if you have already installed clavav delete it
#pkg_delete clamav-0.88.4
3. #cd /usr/ports/security/clamav/
#vi Makefile
goto line 124. There is an : .if defined(WITH_LIBUNRAR)

replace the else statement contents to be the same with the if's :

.if defined(WITH_LIBUNRAR)
CFLAGS+= -DUNRAR3
LDFLAGS+= -lunrar
LIB_DEPENDS+= unrar.3:${PORTSDIR}/archivers/libunrar
EXTRA_PATCHES= ${FILESDIR}/extra-patch-libunrar
.else
CFLAGS+= -DUNRAR3
LDFLAGS+= -lunrar
LIB_DEPENDS+= unrar.3:${PORTSDIR}/archivers/libunrar
EXTRA_PATCHES= ${FILESDIR}/extra-patch-libunrar
.endif


save and exit.

4. install clamav
#make install clean

5. uncomment ScanRAR in /usr/local/etc/clamd.conf

6. start the service
#/usr/local/etc/rc.d/clamav-clamd start

test it... good luck works for me...

I think that if you upgrade the clamav with portupgrade in the future you have to do the same as mentioned above...
 
Last edited:
i install this error i need fix

mars# cd /usr/ports/security/clamav
mars# make install
On FreeBSD before 6.2 ports system unfortunately can not set default X11BASE by itself so please help it a bit by setting X11BASE=${LOCALBASE} in make.conf.
On the other hand, if you do wish to use non-default X11BASE, please set variabl e USE_NONDEFAULT_X11BASE.
*** Error code 1
 
i install this error i need fix

mars# cd /usr/ports/security/clamav
mars# make install
On FreeBSD before 6.2 ports system unfortunately can not set default X11BASE by itself so please help it a bit by setting X11BASE=${LOCALBASE} in make.conf.
On the other hand, if you do wish to use non-default X11BASE, please set variabl e USE_NONDEFAULT_X11BASE.
*** Error code 1

Edit make.conf
X11BASE=${LOCALBASE}
 
Back
Top