clamav
How to install ClamAV and config EXIM on DirectAdmin(CentOS)
µÔ´µÑé§ repo ¨Ò¡ atomic
#wget -q -O - http://www.atomicorp.com/installers/atomic |sh
á¤è¹Õé µÔ´µÑé§ clamav ¡çà»ç¹á¤èàÃ×èͧËÁÙæ
ÊÑè§ yum âÅé´´´´
#yum -y install clamd clamav
ÊÑè§ãËé service ·Ó§Ò¹
#service clamd start
ÍѾഷ°Ò¹¢éÍÁÙÅäÇÃÑÊ
#freshclam
ÊÑè§ãËéÃѹµÍ¹ºÙµà¤Ã×èͧ
#chkconfig clamd on
µèÍ´éÇ á¡é config ¢Í§ exim
#nano /etc/exim.conf
¤é¹ËÒºÃ÷Ѵ primary_hostname ¾ÔÁ¾ì ºÃ÷ѴµèÍä»´éÇÂ
av_scanner = clamd:127.0.0.1 3310
¨Ò¡¹é鹤é¹ËÒ check_message:
¢Í§à´ÔÁ¨Ðà»ç¹áºº¹Õé
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: Clean mail though you should still use an Antivirus
accept
¨Ò¡¹Ñ鹡ç Save and Exit «Ð
Ctrl + x + y
ÊÑè§ restart service exim
#service exim restart
´Ù log «Ñ¡Ë¹èÍÂ
#tail /var/log/exim/mainlog -f
áÅéÇ¡çÅͧÊè§ÍÕàÁÅ ´ÙÇèÒä´éÃѺËÃ×Íà»ÅèÒ(¡Ñ¹¾ÅÒ´)
¨º...
To install ClamAV:
1) Install the binaries:
cd /usr/local/directadmin/custombuild
./build update
./build set clamav yes
./build clamav
2) Edit your /etc/exim.conf, and add the following before "primary_hostname =":
av_scanner = clamd:127.0.0.1 3310
3) While still editing your exim.conf, find "check_message:", and add this code below it:
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 = */defer_ok
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: Clean mail though you should still use an Antivirus
4) Restart exim:
/etc/init.d/exim restart #Redhat/Debian
/usr/local/etc/rc.d/exim restart #FreeBSD