clamav scanning did not finish

Ercan DAĞ

Registered
Apr 25, 2012
4
0
51
cPanel Access Level
Root Administrator
Hello everyone,

sorry for my bad english.

I have a small problem Waiting for advice

I used clamav latest version in cPanel/WHM/CloudLinux server. I using daily scan home directories


My cron command;

00 17 * * * /usr/bin/clamscan -r /home/*/public_html -l /tmp/virus/clamscan.log --move=/tmp/virus

This cron working fine. But not scan all home directory files did not finish


is an e-mail as follows:

Mail failure - message too big

A message that you sent was longer than the maximum size allowed on this
system. It was not delivered to any recipients.

------ This is a copy of your message, including all the headers.
------ No more than 100K characters of the body are included.

From: root (Cron Daemon)
From: [email protected] (Cron Daemon)
To: root
To: [email protected]
Subject: Cron <root@linux23> /usr/bin/clamscan -r /home/*/public_html -l /tmp/virus/clamscan.log --move=/tmp/virus
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <[email protected]>
Date: Sat, 06 Jul 2013 17:00:05 +0300

/home/user/public_html/favicon.html: OK
/home/user/public_html/googlea6375cc8ec22463c.html: OK
/home/user/public_html/font/fontawesome-webfont.eot: OK
/home/user......

the scan log: (/tmp/virus/clamscan.log) pyy4c.png


How to solved this issue, Do you have any idea my friend ?
 

Ercan DAĞ

Registered
Apr 25, 2012
4
0
51
cPanel Access Level
Root Administrator
Hello,

You may want to add -i option to your clamscan cron so it will only log infected files making the mail message much smaller.
This correct;

00 17 * * * /usr/bin/clamscan - /home/*/public_html -l /tmp/virus/clamscan.log --move=/tmp/virus

or

00 17 * * * /usr/bin/clamscan -i /home/*/public_html -i /tmp/virus/clamscan.log --move=/tmp/virus
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

Changed to;

/usr/bin/clamscan /home/*/public_html -ir --move=/tmp/virus

I think solved this issue. Thank you
Yes, the original message failed due to the size of the message. Your updated command is a better option for output in an email.

Thank you.