1 (edited by lakano 2015-08-19 23:28:02)

Topic: [SOLVED] ClamAV errors even after disabled

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu Server 14.04.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): NginX
- Manage mail accounts with iRedAdmin-Pro? Not yet
- Related log if you're reporting an issue:

mail.log

Aug 19 15:59:03 mail amavis[4069]: (04069-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Aucun fichier ou dossier de ce type
Aug 19 15:59:03 mail amavis[4069]: (04069-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 140) line 603.\n
Aug 19 15:59:03 mail amavis[4069]: (04069-01) (!)WARN: all primary virus scanners failed, considering backups

====

Hello,

I want to disable ClamAV (only 512MB RAM and it wasn't works correctly.. can't connect socket error)
After some search on the forum, I found similar solution:

1) Stop clamav
/etc/init.d/clamav-daemon stop

2) Uncomment out the below line in /etc/amavis/conf.d/50-user, and set it to 0.
@bypass_virus_checks_maps = (0);  # controls running of anti-virus code

3) Remove clamav from startup
update-rc.d -f clamav-daemon remove

4) Remove clamav from startup
update-rc.d -f clamav-freshclam remove

The clamav services are not loaded, but I still have the errors.
And the problem isn't just the warning in mail.log, I suspect that this slow down the delivery of each email.

Any help will be appreciated smile

----

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

2

Re: [SOLVED] ClamAV errors even after disabled

Maybe you need this tutorial:
http://www.iredmail.org/docs/completely … assin.html

3

Re: [SOLVED] ClamAV errors even after disabled

I only need to disable ClamAV, all users desktop are under GNU/Linux, so there is really little risks of viruses.
But I need SpamAssassin, and I suppose Amavisd is usefull for some others things than against viruses (sanitize, dkim.. ).

I don't understood, I have also removed all clamav packages and removed the amavisd/conf.d/15-av_scanner.conf

After the restart of amavis:

Aug 19 17:17:58 mail amavis[6753]: Using primary internal av scanner code for ClamAV-clamd

And still the errors at each incoming email:

g 19 17:18:17 mail amavis[6755]: (06755-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Aucun fichier ou dossier de ce type
Aug 19 17:18:18 mail amavis[6755]: (06755-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Aucun fichier ou dossier de ce type
Aug 19 17:18:18 mail amavis[6755]: (06755-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
Aug 19 17:18:24 mail amavis[6755]: (06755-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Aucun fichier ou dossier de ce type
Aug 19 17:18:24 mail amavis[6755]: (06755-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 140) line 603.\n
Aug 19 17:18:24 mail amavis[6755]: (06755-01) (!)WARN: all primary virus scanners failed, considering backups
Aug 19 17:18:24 mail amavis[6755]: (06755-01) (!!)AV: ALL VIRUS SCANNERS FAILED

4

Re: [SOLVED] ClamAV errors even after disabled

SOLVED.

I've found someone with exactly the same problem ( https://www.howtoforge.com/community/th … vis.52114/ )

The solution is to create a new file /etc/amavis/conf.d/90-custom with :

use strict;

@bypass_virus_checks_maps  = (1);

#------------ Do not modify anything below this line -------------
1;  # insure a defined return

And restart, this works!