1

Topic: cron.daily logrotate

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

good afternoon.
I received an email in my master has an error, follows:

/etc/cron.daily/logrotate:
error: dovecot:9 bad compress path $(which bzip2)
error: found error in /var/log/dovecot.log
/var/log/dovecot-sieve.log
/var/log/dovecot-lmtp.log , skipping
/etc/cron.daily/spamassassin:
Job for spamassassin.service failed. See 'systemctl status spamassassin.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript spamassassin, action "reload" failed.

how to solve this?
thanks!

----

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

2

Re: cron.daily logrotate

Open file /etc/logrotate.d/dovecot, replace "$(which bzip2)" by the absolute path to 'bzip2' command.

3

Re: cron.daily logrotate

It turns out it's a bug of iRedMail-0.9.5. It's fixed in development edition.

4

Re: cron.daily logrotate

How to know the absolute path for CentOS 7?
Thanks!

5

Re: cron.daily logrotate

kysil wrote:

How to know the absolute path for CentOS 7?

Run:

which bzip2

6

Re: cron.daily logrotate

Thanks!

in /etc/logrotate.d/dovecot are two line:
    # Use bzip2 for compress.
    compresscmd $(which bzip2)
    uncompresscmd $(which bunzip2)

For uncompresscmd aslo need provide absolute path to 'buzip2 ?

7

Re: cron.daily logrotate

kysil wrote:

For uncompresscmd aslo need provide absolute path to 'buzip2 ?

Yes.

8

Re: cron.daily logrotate

Thanks!
And also one question. This bugs after fixed in /etc/logrotate.d/dovecot in line:
    # Use bzip2 for compress.
    compresscmd $(which bzip2)
    uncompresscmd $(which bunzip2)

Beging report bugs:

========   ==================================================



**Unmatched Entries**
       2   No ext program for   .lz4, tried: lz4c -d
       2   Deleting db files snmp.db,nanny.db,__db.001,__db.002,__db.003 in /var/spool/amavisd/db

---------------------- Amavisd-new End -------------------------

Anacron:
/etc/cron.daily/logrotate:

error: uwsgi:9 bad compress path $(which bzip2)
error: found error in /var/log/uwsgi/uwsgi.log , skipping

--
How to fix it?

9

Re: cron.daily logrotate

The lines should look like below:

    compresscmd /usr/bin/bzip2
    uncompresscmd /usr/bin/bunzip2