1

Topic: clamd error - problem sending/receiving emails

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Downloadable Installer
- Linux/BSD distribution name and version:  CentOS 7
- 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.
====

/var/log/maillog shows the below errors:

Dec  3 12:00:28 clamd[2516]: Received 0 file descriptor(s) from systemd.
Dec  3 12:00:28 clamd[2516]: clamd daemon 0.101.4 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Dec  3 12:00:28 clamd[2516]: Running as user amavis (UID 991, GID 987)
Dec  3 12:00:28 clamd[2516]: Log file size limited to 1048576 bytes.
Dec  3 12:06:30 clamd[2801]: Reading databases from /var/lib/clamav
Dec  3 12:06:30 clamd[2801]: Not loading PUA signatures.
Dec  3 12:06:30 clamd[2801]: Bytecode: Security mode set to "TrustSigned".
Dec  3 12:18:29 postfix/postscreen[3415]: CONNECT from [127.0.0.1]:37442 to [127.0.0.1]:25
Dec  3 12:18:29 postfix/postscreen[3415]: WHITELISTED [127.0.0.1]:37442
Dec  3 12:18:29 postfix/smtpd[3416]: connect from host.domain.com[127.0.0.1]
Dec  3 12:18:30 postfix/smtpd[3416]: 47S7x21t0Dz6jhl: client=host.domain.com[127.0.0.1]
Dec  3 12:18:30 postfix/cleanup[3421]: 47S7x21t0Dz6jhl: message-id=<790-5de69900-1-6470e780@84692781>
Dec  3 12:18:30 postfix/qmgr[1575]: 47S7x21t0Dz6jhl: from=<user@sendingdomain.com>, size=956, nrcpt=1 (queue active)
Dec  3 12:18:30 postfix/smtpd[3416]: disconnect from host.domain.com[127.0.0.1]
Dec  3 12:18:35 amavis[1992]: (01992-04) (!)terminating process [3294] running clamav-clamscan (reason: on reading: timed out)
Dec  3 12:18:35 amavis[1993]: (01993-03) (!)terminating process [3295] running clamav-clamscan (reason: on reading: timed out)
Dec  3 12:18:36 amavis[1992]: (01992-04) (!)process [3294] running clamav-clamscan is still alive, using a bigger hammer (SIGKILL)
Dec  3 12:18:36 amavis[1992]: (01992-04) (!)run_av (clamav-clamscan): collect_results - reading aborted: timed out at /usr/sbin/amavisd line 5115.
Dec  3 12:18:36 amavis[1992]: (01992-04) (!)clamav-clamscan av-scanner FAILED: run_av error: Exceeded allowed time\n
Dec  3 12:18:36 amavis[1992]: (01992-04) (!!)AV: ALL VIRUS SCANNERS FAILED
Dec  3 12:18:36 amavis[1993]: (01993-03) (!)process [3295] running clamav-clamscan is still alive, using a bigger hammer (SIGKILL)
Dec  3 12:18:36 amavis[1993]: (01993-03) (!)run_av (clamav-clamscan): collect_results - reading aborted: timed out at /usr/sbin/amavisd line 5115.
Dec  3 12:18:36 amavis[1993]: (01993-03) (!)clamav-clamscan av-scanner FAILED: run_av error: Exceeded allowed time\n
Dec  3 12:18:36 amavis[1993]: (01993-03) (!!)AV: ALL VIRUS SCANNERS FAILED
Dec  3 12:18:36 amavis[1991]: (01991-03) (!)terminating process [3296] running clamav-clamscan (reason: on reading: timed out)
Dec  3 12:18:36 amavis[1994]: (01994-03) (!)terminating process [3297] running clamav-clamscan (reason: on reading: timed out)
Dec  3 12:18:39 amavis[1991]: (01991-04) (!)clamav-socket: All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.socket, retrying (2)

Freshclam returns the below:

# freshclam
ClamAV update process started at Tue Dec  3 12:09:49 2019
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.4 Recommended version: 0.102.1
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
main.cvd is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
daily.cld is up to date (version: 25652, sigs: 2024968, f-level: 63, builder: raynman)
bytecode.cvd is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)


I have rebooted the entire server sevaral time.. the incoming and outgoing emails are a hit and miss now where sometimes they get delivered upon each reboot and some time it doesn't.

Any idea what can I check to solve the above issue?

----

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

2 (edited by purathal 2019-12-05 02:44:36)

Re: clamd error - problem sending/receiving emails

Update: Issue resolved.

Original Cause: The above issue started after I created and added a new DKIM key for a new domain as described in this KB: https://docs.iredmail.org/sign.dkim.sig … omain.html

Solution: It turned out under the amavisd.conf file (as described in the above KB) instead of using double quotes for the below line I used single quote -> restarted the amavisd service -> and it fixed the issue.

dkim_key('mydomain.com', "dkim", "/var/lib/dkim/mydomain.com.pem");