[SOLVED] Zimbra 9: amavis, antivirus, antispam not running

Ask questions about your setup or get help installing ZCS server (ZD section below).
Post Reply
User avatar
rosch
Advanced member
Advanced member
Posts: 163
Joined: Sat Sep 13, 2014 1:34 am
ZCS/ZD Version: 9.0.0.ZEXTRAS.20220713.UBUNTU20.64

[SOLVED] Zimbra 9: amavis, antivirus, antispam not running

Post by rosch »

I have issues getting services amavis, antivirus, and antispam to run.

Code: Select all

amavis[2170]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
amavis[2170]: Net::Server: Binding to TCP port 10024 on host ::1 with IPv6
amavis[2170]: (!)Net::Server: 2022/04/01-15:09:45 Can't connect to TCP port 10024 on ::1 [Cannot assign requested address]\n  at line 64 in file /opt/zimbra/common/lib/perl5/Net/Server/Proto/TCP.pm
amavis[2170]: Net::Server: 2022/04/01-15:09:45 Server closing!

Code: Select all

sudo netstat -tulpn |grep 10024
is empty

Code: Select all

lsof -i :10024
is empty

I disabled ipv6 because of zmconfigd issues.
Last edited by rosch on Fri Apr 01, 2022 7:19 pm, edited 1 time in total.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2802
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.7 Network Edition
Contact:

Re: Zimbra 9: amavis, antivirus, antispam not running

Post by L. Mark Stone »

Try turning off IPv6 in the kernel and then reboot.

If Ubuntu 18 or 20:

As root, run "nano /etc/default/grub" and change:
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
# GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

Save the file, run "update-grub" and then stop Zimbra and reboot.

If Ubuntu 16 or earlier:

As root run "nano /etc/sysctl.conf" and add to the bottom of the file:
# Turn off IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Save the file, stop Zimbra, then as root run "sysctl -p" then "ifconfig" to be sure Pv6 is off, and then start Zimbra (or just reboot).

Turning off IPv6 in RHEL/CentOS is slightly different; I don't typically use those distros so don't have the specifics handy.

Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
User avatar
rosch
Advanced member
Advanced member
Posts: 163
Joined: Sat Sep 13, 2014 1:34 am
ZCS/ZD Version: 9.0.0.ZEXTRAS.20220713.UBUNTU20.64

Re: Zimbra 9: amavis, antivirus, antispam not running

Post by rosch »

Thanks for your quick answer.

There is some progress, I'm now down to only zmclamdctl not running.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2802
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.7 Network Edition
Contact:

Re: Zimbra 9: amavis, antivirus, antispam not running

Post by L. Mark Stone »

rosch wrote:Thanks for your quick answer.

There is some progress, I'm now down to only zmclamdctl not running.
Run "top" and see if "freshclam" is running. After a reboot, freshclam usually runs to update the ClamAV databases, and ClamAV won't start until freshclam finishes running. This can take several minutes.

All the best,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
User avatar
rosch
Advanced member
Advanced member
Posts: 163
Joined: Sat Sep 13, 2014 1:34 am
ZCS/ZD Version: 9.0.0.ZEXTRAS.20220713.UBUNTU20.64

Re: Zimbra 9: amavis, antivirus, antispam not running

Post by rosch »

L. Mark Stone wrote: Run "top" and see if "freshclam" is running. After a reboot, freshclam usually runs to update the ClamAV databases, and ClamAV won't start until freshclam finishes running. This can take several minutes.
It's running:

Code: Select all

ps ax|grep freshclam
4796 ?        Ss     0:05 /opt/zimbra/common/bin/freshclam --config-file=/opt/zimbra/conf/freshclam.conf --quiet --daemon --checks=12
I have these in the log (about 280 times / 10 minutes):

Code: Select all

amavis[27819]: (27819-02) (!)connect to /opt/zimbra/data/clamav/clamav.sock failed, attempt #1: Can't connect to a UNIX socket /opt/zimbra/data/clamav/clamav.sock: No such file or directory
amavis[27819]: (27819-02) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /opt/zimbra/data/clamav/clamav.sock (All attempts (1) failed connecting to /opt/zimbra/data/clamav/clamav.sock) at (eval 100) line 613.\n
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2802
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.7 Network Edition
Contact:

Re: Zimbra 9: amavis, antivirus, antispam not running

Post by L. Mark Stone »

I'd stop and/or kill ClamAV separately and then start it:

Code: Select all

zimbra@mail2:~$ zmclamdctl 
Usage: /opt/zimbra/bin/zmclamdctl start|stop|kill|restart|status
Sounds like you are very close!

Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
User avatar
rosch
Advanced member
Advanced member
Posts: 163
Joined: Sat Sep 13, 2014 1:34 am
ZCS/ZD Version: 9.0.0.ZEXTRAS.20220713.UBUNTU20.64

Re: Zimbra 9: amavis, antivirus, antispam not running

Post by rosch »

Starting it with zmclamdctl start did the trick.
Not sure why it didn't start by itself but ok, let's see how it goes from here.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2802
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.7 Network Edition
Contact:

Re: [SOLVED] Zimbra 9: amavis, antivirus, antispam not running

Post by L. Mark Stone »

Clamd can’t start until freshclam finishes updating the database. It’s WAD in old IBM-speak!

(Working As Designed)

;-)

All the best,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
Gram
Posts: 4
Joined: Sat Sep 17, 2016 2:30 am

Re: [SOLVED] Zimbra 9: amavis, antivirus, antispam not running

Post by Gram »

I discovered the same issue today, looks like I stopped receiving mail on Friday, April 1. amavis, antivirus, and antispam were not running. The steps above did not help me.

Incoming mail was failing with the following error:

Code: Select all

postfix/error[13647]: 09FC2ECF86: to=<admin@domain.tld>, relay=none, delay=0.07, delays=0.05/0/0/0.02, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
I tried issuing zmcontrol restart noticed the following error in the log:

Code: Select all

amavis[4389]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?
Running sa-update failed with the following error:

Code: Select all

$ sa-update 
error: no mirror data available for channel updates.spamassassin.org
channel 'updates.spamassassin.org': MIRRORED.BY file contents were missing, channel failed
The fix for me was to download MIRRORED.BY manually.

Code: Select all

# su - zimbra
$ cd /opt/zimbra/data/spamassassin/state/3.004005/updates_spamassassin_org/
$ wget http://spamassassin.apache.org/updates/MIRRORED.BY
$ sa-update
$ zmcontrol restart
Carroll
Posts: 1
Joined: Mon Apr 25, 2022 3:00 am

Re: [SOLVED] Zimbra 9: amavis, antivirus, antispam not running

Post by Carroll »

Hello zimbra administrator, I followed the tutorial and opened clamscanner after installing zimbra

Code: Select all

zmprov mcf zimbraAttachmentsScanURL clam://localhost:3310/
zmprov mcf zimbraAttachmentsScanEnabled TRUE
but why didn't I find anything related to clam in the log?

Code: Select all

zmcontrol -v
Release 8.8.15.GA.3869.UBUNTU18.64 UBUNTU18_64 FOSS edition, Patch 8.8.15_P31.
Post Reply