Cài đặt ClamAV trên Directadmin

  • Thursday 03/12/2020

1. Giới thiệu

Bài viết này sẽ hướng dẫn các bạn cách cài đặt Clamav trên DirectAdmin

2. Thực hiện

Step 1: Di chuyển đến thư mục custombuild

cd /usr/local/directadmin/custombuild

Step 2: Thực hiện update các thư viện mới

./build update

Step 3:

Đặt giá trị clamav = yes

./build set clamav yes

Step 4:

Chạy cài đặt Clamav

./build clamav

Step 5:

Update Clamav

freshclam -v

Step 6:

Chỉnh sửa /etc/exim.conf

vi /etc/exim.conf

Thêm giá trị av_scanner = clamd:127.0.0.1 3310 ở phía trên “primary_hostname =”

Note: Nếu đang chạy custombuild 2.x, thì có thể bỏ qua

 

Tiếp theo vẫn trong file /etc/exim.conf thêm giá trị sau ở phía dưới dòng “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 = */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

Step 7:

Khởi động exim

/etc/init.d/exim restart

Đến đây, Clamav đã được cài đặt và tích hợp với exim trên CentOS với DirectAdmin

Sử dụng lệnh dưới đây để tiến hành scan:

clamscan -r -i /[đường dẫn]

Note:

-r: scan các thư mục và thư mục con

-i: In những file bị nhiễm

Rate this post