1

Topic: Amavis not calling ClamAV

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 16.04.5 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.

Snip from /var/log/mail.log

Nov 26 19:48:36 mail amavis[633]: (00633-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Permission denied
Nov 26 19:48:37 mail amavis[633]: (00633-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Permission denied
Nov 26 19:48:37 mail amavis[633]: (00633-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
Nov 26 19:48:43 mail amavis[633]: (00633-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Permission denied
Nov 26 19:48:43 mail amavis[633]: (00633-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 104) line 613.\n

sudo service --status-all
[ + ]  clamav-daemon

/etc/amavis/conf.d/50-user

@av_scanners = (
    # ['Avast','/bin/scan','{}',
    # [1],qr/\t(.+)/m],

    #### http://www.clamav.net/
    ['ClamAV-clamd',
    \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
    qr/\bOK$/, qr/\bFOUND$/,
    qr/^.*?: (?!Infected Archive)(.*) FOUND$/],
);

@av_scanners_backup = (
#    ### http://www.clamav.net/   - backs up clamd or Mail::ClamAV
#    ['ClamAV-clamscan', 'clamscan',
#    "--stdout --disable-summary -r --tempdir=$TEMPBASE {}", [0], [1],
#    qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
);

====

We have been without antivirus capability for a few days now since apt-get update && apt-get upgrade.  Seems to be a permissions error but we didn't change anything on the system.  Can you help us?

----

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

2

Re: Amavis not calling ClamAV

"clamav-daemon" service is not running, please try to start it.

3

Re: Amavis not calling ClamAV

This issue is fixed.