I haven't filed a bug report on this. I think it is a ClamAV error rather than a Zimbra error. The fact that Zimbra isn't running the latest ClamAV code adds further complication.
As a work around I use the following approach:
I have a script '/root/StartZimbra.sh' as follows:
Code:
#!/bin/bash
su -c 'zmcontrol start' -l zimbra
In my experience, aided by some examination of the code, it is safe to run this command when Zimbra is running - in such circumstances it will just start those services that are not currently running (in my case the 'antivirus').
I then have a crontab entry for the 'root' user as follows:
Code:
#
# Try to ensure Zimbra is running fully (in case something didn't start after reboot
#
00 03 * * * /root/StartZimbra.sh
The 03:00am time is chosen to be about half an hour after Zimbra has been restarted following shutdown for backup.
If the antivirus has failed to start after the backup then this second script has, to date, always succeeded in starting it. As I said above, it is safe to run this even if all the other services are running so I don't bother with any checks to see if it is already running.
The result of this is that, when the AV fails to start (which is still does every now and then) it is only down for about half an hour. During that time messages get queued internally but clear when the AV is started. (Most of them are spam at that time of night).
I can tell if the AV has failed because the "Daily mail report" will show a slew of errors between 2:30am and 3:00am.
As I said, the error still occurs every few days, but with this workaround it is no longer much of a problem and so tracing the root cause has slipped down my priority list.