ClamAV
Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail gateways. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. The core of the package is an anti-virus engine available in a form of shared library.
Here is a list of the main features:
- command-line scanner
- fast, multi-threaded daemon with support for on-access scanning
- milter interface for sendmail
- advanced database updater with support for scripted updates and digital signatures
- virus scanner C library
- on-access scanning (Linux® and FreeBSD®)
- virus database updated multiple times per day (see home page for total number of signatures)
- built-in support for various archive formats, including Zip, RAR, Tar, Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS and others
- built-in support for almost all mail file formats
- built-in support for ELF executables and Portable Executable files compressed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack and obfuscated with SUE, Y0da Cryptor and others
- built-in support for popular document formats including MS Office and MacOffice files, HTML, RTF and PDF
Read the documentation for more details.
Source: http://www.clamav.net/lang/en/about/
I compile ClamAV on Solaris by myself, and I use script with proper options. In Ubuntu and other Linux systems are proper packages with ClamAV and Freshclam.
Below is my compilation script for Solaris 10 on SPARC with SunStudio:
#!/bin/sh
#
# for GCC:
#CC=gcc
#CFLAGS="-O2 -mcpu=v9"
#MAKE=gmake
#
# for Sun Studio
CC=cc
CXX=CC
CFLAGS="-xO2 -native"
CXXFLAGS=$CFLAGS
CPPFLAGS="-I/usr/local/include"
LDFLAGS="-L/usr/local/lib -R/usr/local/lib"
MAKE=gmake
export CC CFLAGS CPPFLAGS MAKE DMAKE_MODE
export CXX CXXFLAGS LDFLAGS LIBS
# $CC -v
$CC -V
set|grep PATH
set|grep FLAGS
KAT="clamav"
VER="0.97.5"
cd "$KAT-$VER"
tn="n"
echo "============================================="
echo "$MAKE clean [y|n] ?"
read tn
if [ "$tn" = "Y" ] || [ "$tn" = "y" ]; then
$MAKE distclean || $MAKE realclean || $MAKE clean
rm -f config.status
rm -f config.log
fi;
tn="n"
echo "============================================="
echo "configure [y|n] ?"
read tn
if [ "$tn" = "Y" ] || [ "$tn" = "y" ]; then
./configure \
--prefix=/usr/local/$KAT-$VER \
--infodir=/usr/local/info --mandir=/usr/local/man \
--sysconfdir=/data/etc/$KAT \
--localstatedir=/data/var/$KAT \
--disable-clamav \
--with-user=amavis --with-group=amavis \
fi;
tn="n"
echo "============================================="
echo "$MAKE [y|n] ?"
read tn
if [ "$tn" = "Y" ] || [ "$tn" = "y" ]; then
$MAKE && echo "Compilation successful"
fi;