1

Topic: Issues with mail delivery (ClamAV)

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

Hi guys,

Mail is not delivering on my server. I keep seeing the following in mail.log - any suggestions?

This only started happening this morning for no reason!

Jul 25 10:48:18 s1 amavis[15163]: (15163-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Jul 25 10:48:18 s1 amavis[15163]: (15163-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
Jul 25 10:48:18 s1 amavis[15163]: (15163-01) (!)WARN: all primary virus scanners failed, considering backups
Jul 25 10:49:02 s1 amavis[15164]: (15164-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Jul 25 10:49:03 s1 amavis[15164]: (15164-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Jul 25 10:49:03 s1 amavis[15164]: (15164-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)

----

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

2 (edited by dgarvan 2018-07-25 17:58:52)

Re: Issues with mail delivery (ClamAV)

To temporarily get mail flow back working, I've commented out content_filter = smtp-amavis:[127.0.0.1]:10024 in /etc/postfix/main.cf

It's slow now, but it's working at least!

3

Re: Issues with mail delivery (ClamAV)

I am also having this issue, seems to be related to fail2ban also.

When either fail2ban or clamav are running the CPU usage hits 100% and  brings mail delivery to a stop.

Stopping both services does allow mail to be delivered.

4

Re: Issues with mail delivery (ClamAV)

weird..

but look what auto upgraded last night! I wonder is something broken somewhere in the update.

2018-07-25 06:55:58,538 INFO Starting unattended upgrades script
2018-07-25 06:57:20,104 INFO Packages that will be upgraded: clamav clamav-base clamav-daemon clamav-freshclam clamdscan libclamav7
2018-07-25 06:57:58,360 INFO All upgrades installed

5

Re: Issues with mail delivery (ClamAV)

Try to run clamd service manually like this:

clamd -c /etc/clamav/clamd.conf --debug

I expect it will print some unsupported parameter names. If it does, comment out or remove these parameters from clamd.conf.

6

Re: Issues with mail delivery (ClamAV)

Hey,

This is what it returned:

$ clamd -c /etc/clamav/clamd.conf --debug
ERROR: Parse error at line 79: Unknown option StatsEnabled
ERROR: Can't open/parse the config file /etc/clamav/clamd.conf

The last one is concerning?

Cheers,
Dara

7

Re: Issues with mail delivery (ClamAV)

dgarvan wrote:

ERROR: Parse error at line 79: Unknown option StatsEnabled

This is the point, remove 'StatsEnabled' parameter from clamd.conf and restart clamav.

8

Re: Issues with mail delivery (ClamAV)

Same issue here. Ended up removing several lines in order to be able to run the service manually ...

...
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
#StatsEnabled false
#StatsPEDisabled true
#StatsHostID auto
#StatsTimeout 10
StreamMaxLength 25M
#LogFile /var/log/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0

Things seem to be working now smile

9

Re: Issues with mail delivery (ClamAV)

Thank you for the responses, commented lines as in Runberg's response and the mail queue is now sending.

Thanks for the help