ClamAV with pkg_add request

greenm

Verified User
Joined
Jul 11, 2006
Messages
38
Hello, i was reading on the forum alot about the installation of clamav with exim.

I really want to install this because this is a good service for clients.
Every install i read about on the forum is without pkg_add.

Could someone write a KISS of freebsd pkg_add install of ClamAV ?

There is one that seems pretty messy and a bit unclear with the comments beneith:
http://www.directadmin.com/forum/showthread.php?s=&threadid=11593&highlight=clamav+freebsd

If someone would write a clear KISS i would really appriciate it.

note*
I work with FreeBSD 6 but i've read clamav should work with both 5&6?

Tnx in advanced!
 
Last edited:

vingertop

Verified User
Joined
Jan 9, 2006
Messages
49
Location
The Netherlands
Using ports is actually the best way to go in my experience. The howto you relate to is actually 100% ok. This should be not very much or totally not different for BSD 6.0.

A package is actually al port that is "compiled" try teaching yourself the following commands which work fine for me for some time now :

portsnap (updating your ports tree)
portaudit (check vulnerable ports)
portupgrade (upgrade outdated ports)
portinstall (install a ports)

I use pkg_info an pkg_version - v to check ports against the tree.

Check the faq of freshports on http://www.freshports.org/faq.php for some additional info.

Ports is actually THE way to go on BSD.
Good Luck !
 

chatwizrd

Verified User
Joined
Jul 3, 2005
Messages
2,007
Install clamav via:

Code:
pkg_add -r clamav

or

cd /usr/ports/security/clamav
make install clean
Then:

Add:

av_scanner = clamd:/var/run/clamav/clamd

Under this in /etc/exim.conf

system_filter = /etc/system_filter.exim

Copy and paste:
Code:
touch /etc/rc.local

echo "
## Check for updates 24 times a day
/usr/local/bin/freshclam  -d -c 24
## Start clamd
/usr/local/sbin/clamd
" >> /etc/rc.local

/usr/local/bin/freshclam  -d -c 24
/usr/local/sbin/clamd
/usr/local/etc/rc.d/exim restart
 

chatwizrd

Verified User
Joined
Jul 3, 2005
Messages
2,007
I also use this for my check_message: section in /etc/exim.conf

Code:
# ACL that is used after the DATA command
#check_message:  
#  accept

check_message:
deny message = This message contains malformed MIME ($demime_reason)   
demime = *
condition = ${if >{$demime_errorlevel}{2}{1}{0}}
deny message = This message contains a virus or other harmful content ($malware_name)
demime = *
malware = *
deny message = This message contains an attachment of a type which we do not accept (.$found_extension)
demime = bat:com:pif:prf:scr:vbs
warn message = X-Antivirus-Scanner: This mail was checked and found to be clean. A virus scan is still recommended.
accept
 

rocketcity

Verified User
Joined
Aug 18, 2005
Messages
162
chatwizard,

when you said: copy and paste
Code:
echo "
## Check for updates 24 times a day
/usr/local/bin/freshclam  -d -c 24
## Start clamd
/usr/local/sbin/clamd
" >> /etc/rc.local

/usr/local/bin/freshclam  -d -c 24
/usr/local/sbin/clamd
/usr/local/etc/rc.d/exim restart
Was all of this going into the rc.local file or just the first part of the "echo" down to the line with " >> /etc/rc.local ?

I have setup several Centos servers in the past and understand that quite well, but this is my first FreeBSD box and not so sure on some things. Learning as I go here.

Thanks in advance for your help
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
The echo command will place these lines:
Code:
## Check for updates 24 times a day
/usr/local/bin/freshclam  -d -c 24
## Start clamd
/usr/local/sbin/clamd
at the bottom of the /etc.rc.local file.

These lines must be run as root:
Code:
/usr/local/bin/freshclam  -d -c 24
/usr/local/sbin/clamd
/usr/local/etc/rc.d/exim restart
Jeff
 
Top