1 (edited by adrian.L 2025-08-02 13:51:46)

Topic: Upgrade to Ubuntu 24.04 lts gives port 10024 and 10026 errors

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.7.4
- Deployed with iRedMail Easy or the downloadable installer? Downloadable Installer
- Linux/BSD distribution name and version: Ubuntu 24.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
   postfix/amavis/smtp[2051] (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
and
   postfix/amavis/smtp[2051]: (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

I started from a working IredMail v1.7.4 running on Ubuntu 22.04 LTS and followed the upgrade instructions at the iRedMail docs "Upgrade Ubuntu from 22.04 to 24.04" page.  (The forum does not allow me to post a link).

amavisd debug gives:

Aug  2 15:41:45.163 xxxxxx /usr/sbin/amavisd[2236]: logging initialized, log level 0, syslog: amavis.mail
Aug  2 15:41:45.163 xxxxxx /usr/sbin/amavisd[2236]: sd_notify (no socket): STATUS=Config files have been read, modules loaded.
Aug  2 15:41:45.163 xxxxxx /usr/sbin/amavisd[2236]: starting. /usr/sbin/amavisd at mailx.xxup.id.au amavis-2.13.0 (20230106), Unicode aware, LANG="en_US.UTF-8"
Aug  2 15:41:45.163 xxxxxx /usr/sbin/amavisd[2236]: perl=5.038002, user=, EUID: 120 (120);  group=(), EGID: 127 127 (127 127)
Aug  2 15:41:45.194 xxxxxx /usr/sbin/amavisd[2236]: INFO: no optional modules: utf8_heavy.pl unicore::To::Lower.pl unicore::To::Upper.pl unicore::To::Fold.pl unicore::To::Title.pl unicore::To::Digit.pl unicore::lib::Nt::De.pl unicore::Heavy.pl Unix::Getrusage
Aug  2 15:41:45.195 xxxxxx /usr/sbin/amavisd[2236]: SpamControl: attempting to load scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Aug  2 15:41:45.195 xxxxxx /usr/sbin/amavisd[2236]: SpamControl: scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Aug  2 15:41:45.444 xxxxxx /usr/sbin/amavisd[2236]: INFO: SA version: 4.0.0, 4.000000, no optional modules: Mail::SpamAssassin::AutoWhitelist Encode::Detect Mail::SpamAssassin::Plugin::Hashcash Mail::SpamAssassin::Plugin::WhiteListSubject Razor2::Client::Agent Image::Info Image::Info::GIF Image::Info::JPEG Image::Info::PNG Image::Info::BMP Image::Info::TIFF
Aug  2 15:41:45.444 xxxxx /usr/sbin/amavisd[2236]: SpamControl: init_pre_chroot on SpamAssassin done
Aug  2 15:41:45.444 xxxxx /usr/sbin/amavisd[2236]: socket module IO::Socket::IP, protocol families available: INET, INET6
Aug  2 15:41:45.445 xxxxx /usr/sbin/amavisd[2236]: will bind to /var/run/amavis/amavisd.socket|unix, 127.0.0.1:10024/tcp, 127.0.0.1:10026/tcp, 127.0.0.1:10027/tcp, 127.0.0.1:9998/tcp
Aug  2 15:41:45.445 xxxxx /usr/sbin/amavisd[2236]: sd_notify (no socket): STATUS=Transferring control to Net::Server.
Aug  2 15:41:45.446 xxxxx /usr/sbin/amavisd[2236]: (!)Net::Server: 2025/08/02-15:41:45 Couldn't open pid file "/var/run/amavis/amavisd.pid" [No such file or directory].\n\n  at line 177 in file /usr/share/perl5/Net/Server.pm
Aug  2 15:41:45.446 xxxxx /usr/sbin/amavisd[2236]: sd_notify (no socket): STOPPING=1\nSTATUS=Server rundown, notifying child processes.
Aug  2 15:41:45.446 xxxxx /usr/sbin/amavisd[2236]: Net::Server: 2025/08/02-15:41:45 Server closing!
Aug  2 15:41:45.446 xxxxx /usr/sbin/amavisd[2236]: sd_notify (no socket): STATUS=Child processes have been stopped.

A grep of netstat shows no ports 10026 or 10024.

Any thoughts before I restore my Ubuntu 22.04 backup?

----

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

2 (edited by adrian.L 2025-08-03 05:16:11)

Re: Upgrade to Ubuntu 24.04 lts gives port 10024 and 10026 errors

More information:

I noted that the /var/run/amavis folder was missing - So, I created one.

mkdir -p /var/run/amavis
chown amavis:amavis /var/run/amavis


When I rebooted - it was gone.

I recreated the folder and then ran systemctl restart amavis.service.

The first status worked and I was able to send mail internally, but after a while the status reported this.

amavis.service - Interface between MTA and virus scanner/content filters
     Loaded: loaded (/usr/lib/systemd/system/amavis.service; enabled; preset: enabled)
     Active: inactive (dead) since Sat 2025-08-02 16:54:11 AEST; 2min 43s ago
   Duration: 2min 325ms
       Docs: "Removed so forum can accept post"
    Process: 864 ExecStartPre=/usr/bin/find /var/lib/amavis -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCESS)
    Process: 920 ExecStartPre=/usr/bin/find /var/lib/amavis/tmp -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCESS)
    Process: 955 ExecStart=/usr/sbin/amavisd foreground (code=exited, status=0/SUCCESS)
   Main PID: 955 (code=exited, status=0/SUCCESS)
        CPU: 5.159s

Aug 02 16:52:18 xxxxx amavis[955]: Net::Server: User Not Defined.  Defaulting to EUID '120'
Aug 02 16:52:18 xxxxx amavis[955]: No ext program for   .F, tried: unfreeze, freeze -d, melt, fcat
Aug 02 16:52:18 xxxxx amavis[955]: No ext program for   .zoo, tried: zoo, unzoo
Aug 02 16:52:18 xxxxx amavis[955]: No decoder for       .F
Aug 02 16:52:18 xxxxx amavis[955]: No decoder for       .zoo
Aug 02 16:52:18 xxxxx amavis[955]: Using primary internal av scanner code for clamav-socket
Aug 02 16:54:11 xxxxx systemd[1]: Stopping amavis.service - Interface between MTA and virus scanner/content filters...
Aug 02 16:54:11 xxxxx systemd[1]: amavis.service: Deactivated successfully.
Aug 02 16:54:11 xxxxx systemd[1]: Stopped amavis.service - Interface between MTA and virus scanner/content filters.
Aug 02 16:54:11 xxxxx systemd[1]: amavis.service: Consumed 5.159s CPU time, 193.9M memory peak, 0B memory swap peak.

And the /var/run/amavis folder is gone again!

3

Re: Upgrade to Ubuntu 24.04 lts gives port 10024 and 10026 errors

After some more reading on the forum:

I replaced:

Restart=on-failure

with

Restart=always

in the

/usr/lib/systemd/system/amavis.service

without any success.  Returned the file to its original state.