1 (edited by aniyan.rajan6 2014-07-16 19:54:27)

Topic: clamav updrade

==== Required information ====
- iRedMail version: iRedMail-0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: Debian / Wheezy
- Related log if you're reporting an issue:
====

Hello,

As clamav is complaining about the outdated version in the Logwatch, I have

1. removed the current clamav installation
apt-get --purge remove clamav clamav-base clamav-daemon clamav-freshclam libclamav2 clamtk

2. Build clamav from the sources and installed the latest version 0.98.4.

3. I did the following manually to start freshclam.
/usr/local/bin/freshclam -d --quiet

The installation went fine. But how can I make sure that the new clamav works along with the iRedmail ?


Thanks.

There is an update on this. When I try to send an email from gmail to my-domain, it gives the following errors in /var/log/mail.log. For some reason the new clamav installation went to /usr/local/. Please suggest. Thanks.

Jul 16 07:39:16 sunrise amavis[2051]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.51, libdb 5.1
Jul 16 07:39:38 sunrise postfix/master[3521]: daemon started -- version 2.9.6, configuration /etc/postfix
Jul 16 11:45:05 sunrise postfix/smtpd[24240]: connect from mail-pa0-f47.google.com[209.85.220.47]
Jul 16 11:45:08 sunrise cbpolicyd[3578]: module=Greylisting, action=pass, host=209.85.220.47, helo=mail-pa0-f47.google.com, from=abc@gmail.com, to=abc@my-domain.com, reason=authenticated
Jul 16 11:45:08 sunrise postfix/smtpd[24240]: 1F93B401A2: client=mail-pa0-f47.google.com[209.85.220.47]
Jul 16 11:45:08 sunrise postfix/cleanup[24258]: 1F93B401A2: message-id=<53C665BA.6020708@gmail.com>
Jul 16 11:45:09 sunrise postfix/qmgr[3541]: 1F93B401A2: from=<abc@gmail.com>, size=6326, nrcpt=1 (queue active)
Jul 16 11:45:09 sunrise postfix/smtpd[24240]: disconnect from mail-pa0-f47.google.com[209.85.220.47]
Jul 16 11:45:10 sunrise amavis[2478]: (02478-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
Jul 16 11:45:11 sunrise amavis[2478]: (02478-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
Jul 16 11:45:11 sunrise amavis[2478]: (02478-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /tmp/clamd.socket, retrying (2)
Jul 16 11:45:17 sunrise amavis[2478]: (02478-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
Jul 16 11:45:17 sunrise amavis[2478]: (02478-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /tmp/clamd.socket (All attempts (1) failed connecting to /tmp/clamd.socket) at (eval 113) line 603.\n
Jul 16 11:45:17 sunrise amavis[2478]: (02478-01) (!)WARN: all primary virus scanners failed, considering backups
Jul 16 11:45:17 sunrise amavis[24267]: (02478-01) (!)run_command: child process [24267]: run_command: failed to exec /usr/bin/clamscan --stdout --disable-summary -r --tempdir=/var/lib/amavis/tmp /var/lib/amavis/tmp/amavis-20140716T114509-02478-wfIU6zsS/parts: No such file or directory at /usr/sbin/amavisd-new line 3616.
Jul 16 11:45:17 sunrise amavis[2478]: (02478-01) (!)run_av (ClamAV-clamscan) FAILED - unexpected exit 6, output=""
Jul 16 11:45:17 sunrise amavis[2478]: (02478-01) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 6, output="" at (eval 113) line 899.
Jul 16 11:45:17 sunrise amavis[2478]: (02478-01) (!!)AV: ALL VIRUS SCANNERS FAILED
Jul 16 11:45:22 sunrise postfix/smtpd[24268]: connect from sunrise.my-domain.com[127.0.0.1]
Jul 16 11:45:22 sunrise postfix/smtpd[24268]: 2FF3F40864: client=sunrise.my-domain.com[127.0.0.1]
Jul 16 11:45:22 sunrise postfix/cleanup[24258]: 2FF3F40864: message-id=<53C665BA.6020708@gmail.com>

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: clamav updrade

My suggestion is removing your own build clamav, return back to Debian official binary packages.

3

Re: clamav updrade

ZhangHuangbin wrote:

My suggestion is removing your own build clamav, return back to Debian official binary packages.

I have removed the clamav and installed the binary packages from Debian repository. But now it gives the following. Please help. Thanks.

Jul 17 03:44:13 sunrise amavis[2477]: (02477-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
Jul 17 03:44:14 sunrise amavis[2477]: (02477-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
Jul 17 03:44:14 sunrise amavis[2477]: (02477-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /tmp/clamd.socket, retrying (2)
Jul 17 03:44:20 sunrise amavis[2477]: (02477-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
Jul 17 03:44:20 sunrise amavis[2477]: (02477-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /tmp/clamd.socket (All attempts (1) failed connecting to /tmp/clamd.socket) at (eval 113) line 603.\n
Jul 17 03:44:20 sunrise amavis[2477]: (02477-01) (!)WARN: all primary virus scanners failed, considering backups

4

Re: clamav updrade

ClamAV service is not running, so Amavisd cannot connect to its socket /tmp/clamd.socket. Please start ClamAV service first.

5

Re: clamav updrade

ZhangHuangbin wrote:

ClamAV service is not running, so Amavisd cannot connect to its socket /tmp/clamd.socket. Please start ClamAV service first.

The clamav service was running.

ps aux| grep clam
clamav    4803  0.1  0.0  51088    48 ?        Ss   03:42   0:02 /usr/bin/freshclam -d --quiet --config-file=/etc/clamav/freshclam.conf
clamav    7852  0.0 33.5 368212 170676 ?       Ssl  04:10   0:00 /usr/sbin/clamd -c /etc/clamav/clamd.conf
root      7922  0.0  0.1   7832   876 pts/0    S+   04:18   0:00 grep clam

But the 'LocalSocket /tmp/clamd.socket' was wrong in /etc/clamav/clamd.conf. So I did a 'dpkg-reconfigure clamav-daemon' and gave the /tmp/clamd.socket for the local socket and now the error is not coming. I hope I have done it correctly. Thanks.