1 (edited by kysil 2017-03-27 17:15:34)

Topic: Clamav ERROR on Fresh install

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6 (2017-03-26)
- Linux/BSD distribution name and version: CentOS 7.3.1611
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx 1.11.12
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

Hi,
after fresh install I get this two errors. Is this normal work, or I must reinstall iRM?

*************************************************************************
* iRedMail-0.9.6 installation and configuration complete.
*************************************************************************

[ INFO ] Disable SELinux in /etc/selinux/config.
< Question > Would you like to use firewall rules provided by iRedMail?
< Question > File: /etc/firewalld/zones/iredmail.xml, with SSHD port: 1260. [Y|n]y
[ INFO ] Copy firewall sample rules: /etc/firewalld/zones/iredmail.xml.
< Question > Restart firewall now (with SSHD port 1260)? [y|N]y
[ INFO ] Restarting firewall ...
< Question > Would you like to use MySQL configuration file shipped within iRedMail now?
< Question > File: /etc/my.cnf. [Y|n]y
[ INFO ] Copy MySQL sample file: /etc/my.cnf.
[ INFO ] Enable SSL support for MySQL server.
[ INFO ] Updating ClamAV database (freshclam), please wait ...
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
********************************************************************

----

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

2

Re: Clamav ERROR on Fresh install

If change in /etc/iRedMail-0.9.6/conf/clamav

from

export CLAMD_CONF='/etc/clamd.conf'
export CLAMD_LOGFILE='/var/log/clamav/clamd.log'
# CLAMD_BIND_HOST is configured in conf/global
export CLAMD_LOCAL_SOCKET='/tmp/clamd.socket'

export FRESHCLAM_CONF='/etc/freshclam.conf'
export FRESHCLAM_LOGFILE='/var/log/clamav/freshclam.log'
export FRESHCLAM_PID_FILE='/var/run/clamav/freshclam.pid'

to

export CLAMD_CONF='/etc/clamd.conf'
export CLAMD_LOGFILE='/var/log/clamd.log'
# CLAMD_BIND_HOST is configured in conf/global
export CLAMD_LOCAL_SOCKET='/tmp/clamd.socket'

export FRESHCLAM_CONF='/etc/freshclam.conf'
export FRESHCLAM_LOGFILE='/var/log/freshclam.log'
export FRESHCLAM_PID_FILE='/var/run/clamav/freshclam.pid'

Works fine

3

Re: Clamav ERROR on Fresh install

kysil wrote:

ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).

This is expected error during iRedMail installation. Because clamav service is not running, directory /var/log/clamav/ was not created yet. After you start clamav service (or reboot server -- this is expected right after iRedMail installation), it should be fine.

4

Re: Clamav ERROR on Fresh install

In Inbox postmaster@server.tld I have also same reports of previous date iRM v.0.9.6

Cron <root@mail> /usr/share/clamav/freshclam-sleep

ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).

5 (edited by kysil 2017-04-01 20:18:59)

Re: Clamav ERROR on Fresh install

On previous installation who have same problem need do few commands:

mkdir /var/log/clamav
touch /var/log/clamav/freshclam.log
chown root:clamupdate /var/log/clamav/freshclam.log
chmod 664 /var/log/clamav/freshclam.log
freshclam -v

6

Re: Clamav ERROR on Fresh install

Thanks for sharing.