Previously, I have set up the Qmail + MySQL + Vpopmail + ClamAV server platform. Only attachments in rar format cannot be scanned.
With the help of Cu altar friends, we found a solution.
Next, I will repeat the posts of my friends. For your reference
1. Modify TCP. SMTP
127.: Allow, relayclient = "", rblsmtpd = "", qmailqueue = "/var/Qmail/bin/qmail-scanner-queue.pl"
: Allow, qmailqueue = "/var/Qmail/bin/qmail-scanner-queue.pl"
Then # tcprules TCP. SMTP. cdb tcp. SMTP. tmp <TCP. SMTP
2. Install daemontools-0.76.tar.gz
The latest version is here: http://cr.yp.to/daemontools/install.html
Tar zxvf daemontools-0.76.tar.gz
CD admin/daemontools-0.76
Package/install
If an error is reported during installation, daemontools-0.76.errno.patch is required
Http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
Patch-P1 <daemontools-0.76.errno.patch
Adjust the value of softlimit according to the actual situation.
VI/var/Qmail/SMTP
Add/usr/local/bin/softlimit-M 25000000
3. download the latest unrar for Linux
Http://www.rarlab.com/
Tar xzvf rarlinux-3.4.0.tar.gz
CD RAR
Make install
VI/var/Qmail/bin/qmail-scanner-queue.pl
My $ clamscan_binary = '/usr/local/bin/clamscan ';
My $ clamscan_options = "-- unrar =/usr/local/bin/unrar-r -- mbox -- disable-Summary -- Max-recursion = 10 -- Max-Space = 1000000 ";
Enable the unrar Function
Restart the server to reload it (relatively simple and practically)
If not, execute the fourth method, but I have not tried it. (Some large RAR packages still report errors, but these three methods can solve most RAR packages)
4. qmail-scanner-queue.pl files can be modified
Modify here
Sub clamscan_detail {
# Clamscan finished
# Add the following sentence. If the value is greater than 10 MB, no check will be performed.
If ($ MS _ size> 10000000 ){
& Debug ("ClamAV: Message too big-Skip it ");
Return;
}
5. Send a letter to the company owner informing them of the ZIP format when sending the zip package ......
I am using the third method. Because I have already set TCP. SMTP.
Thank you for choosing Cu !!