Dovecot updated failed and won't start due to missing configuration file

After today’s restart, dovecot won’t start and plinth says that postfix/dovecot is updating.

/var/log/apt/history.log shows repeated attempts to update:

Start-Date: 2025-07-28  08:59:33
Commandline: apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd 
redis-server openssl
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  08:59:54

Start-Date: 2025-07-28  09:03:27
Commandline: apt-get --assume-yes --quiet=2 --fix-broken install
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  09:03:47

Start-Date: 2025-07-28  09:04:30
Commandline: apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd 
redis-server openssl
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  09:04:52

Start-Date: 2025-07-28  09:09:28
Commandline: apt-get --assume-yes --quiet=2 --fix-broken install
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  09:09:49

In the journal, I see:

Jul 28 10:57:01 fbox dovecot[1130]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 97: Couldn't open include file /etc/dovecot/c>
Jul 28 10:57:01 fbox dovecot[1060]: doveconf: Error: managesieve-login: dump-capability process returned 89
Jul 28 10:57:01 fbox dovecot[1060]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 97: Couldn't open include file /etc/dovecot/c>
Jul 28 10:57:01 fbox systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
Jul 28 10:57:01 fbox systemd[1]: dovecot.service: Failed with result 'exit-code'.
Jul 28 10:57:01 fbox systemd[1]: Failed to start dovecot.service - Dovecot IMAP/POP3 email server.
J

The missing file, /etc/dovecot/conf.d/95-freedombox-sieve.conf is a symbolic link to /usr/share/freedombox/etc/dovecot/conf.d/95-freedombox-sieve.conf, while /usr/share/freedombox/etc/dovecot/conf.d/ only contains two directories, named 2.3 and 2.4, each of which have a number of .conf files, among which the one indicated as missing in the journal.

So it looks like either /etc/dovecot/dovecot.conf does not have the paths as it should have them (like go in 2.4), or some other symbolic link is missing.

Any advice on what to do is welcome. I am considering to completely reinstall the freedombox using the last backup.

Could you provide the output of these commands:
$ ls -la /etc/dovecot/conf.d/
$ cat /etc/dovecot/dovecot.conf
$ /usr/sbin/dovecot --version

Thanks for looking at this. Here it is:

$ ls -la /etc/dovecot/conf.d/
total 200
drwxr-xr-x 1 root root  1588 Feb 19 06:46 .
drwxr-xr-x 1 root root   332 Feb 19 06:47 ..
-rw-r--r-- 1 root root   350 Nov 27  2021 05-freedombox-auth.conf
-rw-r--r-- 1 root root  1200 Nov 27  2021 05-freedombox-mail.conf
lrwxrwxrwx 1 root root    66 Oct 10  2023 05-freedombox-passdb.conf -> /usr/share/freedombox/etc/dovecot/conf.d/05-freedombox-passdb.conf
lrwxrwxrwx 1 root root    66 Oct 10  2023 05-freedombox-userdb.conf -> /usr/share/freedombox/etc/dovecot/conf.d/05-freedombox-userdb.conf
-rw-r--r-- 1 root root  5248 Dec 22  2020 10-auth.conf
-rw-r--r-- 1 root root  1781 Dec 22  2020 10-director.conf
-rw-r--r-- 1 root root  3757 Jun 11  2023 10-logging.conf
-rw-r--r-- 1 root root 18068 Jul 20  2021 10-mail.conf
-rw-r--r-- 1 root root  3569 Dec 22  2020 10-master.conf
-rw-r--r-- 1 root root  3482 Jun 11  2023 10-ssl.conf
-rw-r--r-- 1 root root   291 Jul 20  2021 10-tcpwrapper.conf
lrwxrwxrwx 1 root root    64 Oct 10  2023 15-freedombox-auth.conf -> /usr/share/freedombox/etc/dovecot/conf.d/15-freedombox-auth.conf
lrwxrwxrwx 1 root root    64 Oct 10  2023 15-freedombox-mail.conf -> /usr/share/freedombox/etc/dovecot/conf.d/15-freedombox-mail.conf
-rw-r--r-- 1 root root  1657 Dec 22  2020 15-lda.conf
-rw-r--r-- 1 root root  3111 Dec 22  2020 15-mailboxes.conf
-rw-r--r-- 1 root root  4520 Dec 22  2020 20-imap.conf
-rw-r--r-- 1 root root  1367 Dec 22  2020 20-lmtp.conf
-rw-r--r-- 1 root root  2961 Dec 22  2020 20-managesieve.conf
-rw-r--r-- 1 root root  4066 Dec 22  2020 20-pop3.conf
-rw-r--r-- 1 root root   676 Dec 22  2020 90-acl.conf
lrwxrwxrwx 1 root root    64 Feb 19 06:46 90-freedombox-imap.conf -> /usr/share/freedombox/etc/dovecot/conf.d/90-freedombox-imap.conf
lrwxrwxrwx 1 root root    64 Oct 10  2023 90-freedombox-lmtp.conf -> /usr/share/freedombox/etc/dovecot/conf.d/90-freedombox-lmtp.conf
lrwxrwxrwx 1 root root    69 Oct 10  2023 90-freedombox-mailboxes.conf -> /usr/share/freedombox/etc/dovecot/conf.d/90-freedombox-mailboxes.conf
lrwxrwxrwx 1 root root    66 Oct 10  2023 90-freedombox-master.conf -> /usr/share/freedombox/etc/dovecot/conf.d/90-freedombox-master.conf
-rw-r--r-- 1 root root   564 Sep  2  2021 90-freedombox-ssl.conf
lrwxrwxrwx 1 root root    63 Oct 10  2023 90-freedombox-tls.conf -> /usr/share/freedombox/etc/dovecot/conf.d/90-freedombox-tls.conf
-rw-r--r-- 1 root root   292 Dec 22  2020 90-plugin.conf
-rw-r--r-- 1 root root  2596 Dec 22  2020 90-quota.conf
-rw-r--r-- 1 root root  1829 Dec 22  2020 90-sieve-extprograms.conf
-rw-r--r-- 1 root root 10258 Dec 22  2020 90-sieve.conf
-rw-r--r-- 1 root root   442 Feb 19 06:48 91-freedombox-tls.conf
lrwxrwxrwx 1 root root    65 Oct 10  2023 95-freedombox-sieve.conf -> /usr/share/freedombox/etc/dovecot/conf.d/95-freedombox-sieve.conf
-rw-r--r-- 1 root root   499 Dec 22  2020 auth-checkpassword.conf.ext
-rw-r--r-- 1 root root   489 Dec 22  2020 auth-deny.conf.ext
-rw-r--r-- 1 root root   343 Dec 22  2020 auth-dict.conf.ext
-rw-r--r-- 1 root root   924 Dec 22  2020 auth-ldap.conf.ext
-rw-r--r-- 1 root root   561 Dec 22  2020 auth-master.conf.ext
-rw-r--r-- 1 root root   515 Dec 22  2020 auth-passwdfile.conf.ext
-rw-r--r-- 1 root root   788 Dec 22  2020 auth-sql.conf.ext
-rw-r--r-- 1 root root   611 Dec 22  2020 auth-static.conf.ext
-rw-r--r-- 1 root root  2182 Dec 22  2020 auth-system.conf.ext
lrwxrwxrwx 1 root root    65 Oct 10  2023 freedombox-ldap.conf.ext -> /usr/share/freedombox/etc/dovecot/conf.d/freedombox-ldap.conf.ext

$ cat /etc/dovecot/dovecot.conf
## Dovecot configuration file

# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration

# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.

# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
# value inside quotes, eg.: key = "# char and trailing whitespace  "

# Most (but not all) settings can be overridden by different protocols and/or
# source/destination IPs by placing the settings inside sections, for example:
# protocol imap { }, local 127.0.0.1 { }, remote 10.0.0.0/8 { }

# Default values are shown for each setting, it's not required to uncomment
# those. These are exceptions to this though: No sections (e.g. namespace {})
# or plugin settings are added by default, they're listed only as examples.
# Paths are also just examples with the real defaults being based on configure
# options. The paths listed here are for configure --prefix=/usr
# --sysconfdir=/etc --localstatedir=/var

# Enable installed protocols
!include_try /usr/share/dovecot/protocols.d/*.protocol

# A comma separated list of IPs or hosts where to listen in for connections. 
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
#listen = *, ::

# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/

# Name of this instance. In multi-instance setup doveadm and other commands
# can use -i <instance_name> to select which instance is used (an alternative
# to -c <config_path>). The instance name is also added to Dovecot processes
# in ps output.
#instance_name = dovecot

# Greeting message for clients.
#login_greeting = Dovecot ready.

# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
#login_trusted_networks =

# Space separated list of login access check sockets (e.g. tcpwrap)
#login_access_sockets = 

# With proxy_maybe=yes if proxy destination matches any of these IPs, don't do
# proxying. This isn't necessary normally, but may be useful if the destination
# IP is e.g. a load balancer's IP.
#auth_proxy_self =

# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no

# Should all processes be killed when Dovecot master process shuts down.
# Setting this to "no" means that Dovecot can be upgraded without
# forcing existing client connections to close (although that could also be
# a problem if the upgrade is e.g. because of a security fix).
#shutdown_clients = yes

# If non-zero, run mail commands via this many connections to doveadm server,
# instead of running them directly in the same process.
#doveadm_worker_count = 0
# UNIX socket or host:port used for connecting to doveadm server
#doveadm_socket_path = doveadm-server

# Space separated list of environment variables that are preserved on Dovecot
# startup and passed down to all of its child processes. You can also give
# key=value pairs to always set specific settings.
#import_environment = TZ

##
## Dictionary server settings
##

# Dictionary can be used to store key=value lists. This is used by several
# plugins. The dictionary can be accessed either directly or though a
# dictionary server. The following dict block maps dictionary names to URIs
# when the server is used. These can then be referenced using URIs in format
# "proxy::<name>".

dict {
  #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}

# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 00-prefixes
# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf

# A config file can also tried to be included without giving an error if
# it's not found:
!include_try local.conf

$ /usr/sbin/dovecot --version
2.3.19.1 (9b53102964)

Is the Email app showing as updating? If not, can you manually re-run the setup from the GUI?

Plinth shows email as updating, and /var/log/apt/history.log shows repeated attempts of apt-get install and apt-get fix-broken, which are still ongoing:

Start-Date: 2025-07-28  12:51:17
Commandline: apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd 
redis-server openssl
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  12:51:35

Start-Date: 2025-07-28  12:54:42
Commandline: apt-get --assume-yes --quiet=2 --fix-broken install
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  12:55:02

Start-Date: 2025-07-28  12:55:36
Commandline: apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd redis-server openssl
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  12:55:54

Start-Date: 2025-07-28  12:59:02
Commandline: apt-get --assume-yes --quiet=2 --fix-broken install
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  12:59:21

Start-Date: 2025-07-28  13:00:00
Commandline: apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd redis-server openssl
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  13:00:20

Start-Date: 2025-07-28  13:03:35
Commandline: apt-get --assume-yes --quiet=2 --fix-broken install
Requested-By: plinth (115)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-07-28  13:03:54

Note: plinth also says for MediaWiki “Error updating app: Apt command failed with return code: 100”, but I have uninstalled MediaWiki several months ago.

I also saw this in the journal just now:

Jul 28 13:19:39 fbox /usr/bin/plinth[551]: Error running action plinth..install(app_id="email", packages=["postfix", "postfix-sqlite", "dovecot-pop3d", "dovecot-imapd", "dovecot-lmtpd", "dovecot-managesieved", "dovecot-ldap", "rspamd", "redis-server", "openssl"], skip_recommends=false, force_configuration=null, reinstall=false, force_missing_configuration=false): RuntimeError("Apt command failed with return code: 100")
                                           Stdout:
                                           │ Setting up linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...
                                           │ freedombox set on hold.
                                           Stderr:
                                           ║ Initialized apps - apache, api, names, avahi, storage, backups, cockpit, firewall, config, datetime, diagnostics, dynamicdns, first_boot, help, letsencrypt, networks, power, privacy, security, snapshot, ssh, sso, upgrades, users, bepasty, bind, calibre, coturn, deluge, ejabberd, email, featherwiki, gitweb, gnome, ikiwiki, infinoted, janus, jsxc, kiwix, matrixsynapse, mediawiki, minetest, minidlna, miniflux, mumble, nextcloud, openvpn, pagekite, performance, privoxy, quassel, radicale, roundcube, rssbridge, samba, searx, shaarli, shadowsocks, shadowsocksserver, sharing, sogo, syncthing, tiddlywiki, tor, torproxy, transmission, ttrss, wireguard, wordpress, zoph
                                           ║ /etc/kernel/postinst.d/initramfs-tools:
                                           ║ update-initramfs: Generating /boot/initrd.img-6.1.0-35-armmp-lpae
                                           ║ W: No zstd in /usr/bin:/sbin:/bin, using gzip
                                           ║ grep: /boot/config-6.1.0-35-armmp-lpae: No such file or directory
                                           ║ E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
                                           ║ update-initramfs: failed for /boot/initrd.img-6.1.0-35-armmp-lpae with 1.
                                           ║ run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
                                           ║ dpkg: error processing package linux-image-6.1.0-35-armmp-lpae (--configure):
                                           ║  installed linux-image-6.1.0-35-armmp-lpae package post-installation script subprocess returned error exit status 1
                                           ║ Errors were encountered while processing:
                                           ║  linux-image-6.1.0-35-armmp-lpae
                                           ║ quota not working (qgroup not set)
                                           ║ Config is in use.
                                           ║ E: Sub-process /usr/bin/dpkg returned an error code (1)
                                           ║ quota not working (qgroup not set)
                                           ║ Config is in use.
                                           ║ E: Sub-process /usr/bin/dpkg returned an error code (1)
                                           Action traceback:
                                           ╞   File "/usr/lib/python3/dist-packages/plinth/actions.py", line 398, in _privileged_call
                                           ╞     return_values = func(*arguments['args'], **arguments['kwargs'])
                                           ╞                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                           ╞   File "/usr/lib/python3/dist-packages/plinth/privileged/packages.py", line 70, in install
                                           ╞     raise RuntimeError(
Jul 28 13:19:39 fbox /usr/bin/plinth[551]: Error installing package: Apt command failed with return code: 100
                                           Traceback (most recent call last):
                                             File "/usr/lib/python3/dist-packages/plinth/package.py", line 394, in install
                                               privileged.install(**kwargs)
                                             File "/usr/lib/python3/dist-packages/plinth/actions.py", line 73, in wrapper
                                               return _run_privileged_method_as_process(func, module_name,
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                             File "/usr/lib/python3/dist-packages/plinth/actions.py", line 134, in _run_privileged_method_as_process
                                               return _wait_for_return(*wait_args)
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                             File "/usr/lib/python3/dist-packages/plinth/actions.py", line 191, in _wait_for_return
                                               raise exception
                                           RuntimeError: Apt command failed with return code: 100
Jul 28 13:19:39 fbox /usr/bin/plinth[551]: Setup completed: email: Error updating app: {exception} Apt command failed with return code: 100
Jul 28 13:19:41 fbox apache-access[1236]: metani.eu:443 80.215.152.32 - - [28/Jul/2025:13:19:36 +0200] "GET /plinth/apps/email/ HTTP/2.0" 200 4993 "https://metani.eu/plinth/apps/email/" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.13.0"
Jul 28 13:19:41 fbox /usr/bin/plinth[551]: Error running setup - Apt command failed with return code: 100
Jul 28 13:19:41 fbox /usr/bin/plinth[551]: Unable to complete setup: Apt command failed with return code: 100
Jul 28 13:19:41 fbox /usr/bin/plinth[551]: Will try again in 10 seconds

Because of the grep error on /boot, I looked at it

$ ls -l /boot
total 94688
-rw-r--r--  1 root root       83 Aug  8  2023 System.map-6.1.0-11-armmp-lpae
-rw-r--r--  1 root root       83 May 22 20:32 System.map-6.1.0-37-armmp-lpae
-rw-r--r--  1 root root       83 May  8  2023 System.map-6.1.0-9-armmp-lpae
-rw-r--r--  1 root root     2627 Jul  9 07:06 boot.scr
-rw-r--r--  1 root root     2627 Jun 27 06:29 boot.scr.bak
-rw-r--r--  1 root root   274400 Aug  8  2023 config-6.1.0-11-armmp-lpae
-rw-r--r--  1 root root   274465 May 22 20:32 config-6.1.0-37-armmp-lpae
-rw-r--r--  1 root root   274302 May  8  2023 config-6.1.0-9-armmp-lpae
lrwxrwxrwx  1 root root       56 Jul  9 07:06 dtb -> dtbs/6.1.0-37-armmp-lpae/./sun7i-a20-olinuxino-lime2.dtb
lrwxrwxrwx  1 root root       56 Jul  1  2024 dtb-6.1.0-11-armmp-lpae -> dtbs/6.1.0-11-armmp-lpae/./sun7i-a20-olinuxino-lime2.dtb
lrwxrwxrwx  1 root root       56 Jul  9 07:06 dtb-6.1.0-37-armmp-lpae -> dtbs/6.1.0-37-armmp-lpae/./sun7i-a20-olinuxino-lime2.dtb
lrwxrwxrwx  1 root root       55 Sep  3  2023 dtb-6.1.0-9-armmp-lpae -> dtbs/6.1.0-9-armmp-lpae/./sun7i-a20-olinuxino-lime2.dtb
drwxr-xr-x 16 root root     1024 Jun 27 06:28 dtbs
-rw-r--r--  1 root root 26450528 Jul  1  2024 initrd.img-6.1.0-11-armmp-lpae
-rw-r--r--  1 root root 26512396 Jul  9 07:06 initrd.img-6.1.0-37-armmp-lpae
-rw-r--r--  1 root root 26434724 Sep  3  2023 initrd.img-6.1.0-9-armmp-lpae
drwx------  2 root root    12288 Jun 15  2023 lost+found
-rw-r--r--  1 root root  5403136 Aug  8  2023 vmlinuz-6.1.0-11-armmp-lpae
-rw-r--r--  1 root root  5517824 May 22 20:32 vmlinuz-6.1.0-37-armmp-lpae
-rw-r--r--  1 root root  5403136 May  8  2023 vmlinuz-6.1.0-9-armmp-lpae

Nevertheless, the Pioneer is booting fine, and other services like ejabberd or radicale work fine.

In the latest update of FreedomBox we modified how configuration files are droped in for Dovecot. Instead of linking /etc/dovecot/conf.d/*.conf to /usr/share/freedombox/etc/dovecot/conf.d/*.conf, we now link to /usr/share/freedombox/etc/dovecot/conf.d/{2.3 | 2.4} instead, based on Dovecot’s version.

You are experiencing this issue because /etc/dovecot/conf.d/*.conf are pointing to /usr/share/freedombox/etc/dovecot/conf.d/*.conf which don’t exist anymore. The FreedomBox update is expected to update the symlinks to point to the new path, but the code doesn’t get there as it is stuck with the failing apt commands.

I would manually run $ apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd to see why it’s failing.

Thanks for the insights and the suggestion.

However, since there is this update loop, I get an error “Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?”

What would be the way to stop plinth from trying to update?

EDIT: just retried and no such immediate response, so perhaps I managed to start it before plinth.

$ sudo apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd
quota not working (qgroup not set)
Setting up linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.1.0-35-armmp-lpae
W: No zstd in /usr/bin:/sbin:/bin, using gzip
grep: /boot/config-6.1.0-35-armmp-lpae: No such file or directory
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
update-initramfs: failed for /boot/initrd.img-6.1.0-35-armmp-lpae with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.1.0-35-armmp-lpae (--configure):
 installed linux-image-6.1.0-35-armmp-lpae package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-6.1.0-35-armmp-lpae
Config is in use.
E: Sub-process /usr/bin/dpkg returned an error code (1)

It made me think to look at this:

dpkg -l "linux-image-6.1.0*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                   Version          Architecture Description
+++-======================================-================-============-=================================================================
rc  linux-image-6.1.0-0.deb11.7-armmp-lpae 6.1.20-2~bpo11+1 armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-10-armmp-lpae        6.1.38-2         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-11-armmp-lpae        6.1.38-4         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-12-armmp-lpae        6.1.52-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-13-armmp-lpae        6.1.55-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-15-armmp-lpae        6.1.66-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-17-armmp-lpae        6.1.69-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-18-armmp-lpae        6.1.76-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-20-armmp-lpae        6.1.85-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-21-armmp-lpae        6.1.90-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-22-armmp-lpae        6.1.94-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-23-armmp-lpae        6.1.99-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-25-armmp-lpae        6.1.106-3        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-26-armmp-lpae        6.1.112-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-27-armmp-lpae        6.1.115-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-28-armmp-lpae        6.1.119-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-29-armmp-lpae        6.1.123-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-31-armmp-lpae        6.1.128-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-32-armmp-lpae        6.1.129-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-33-armmp-lpae        6.1.133-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-34-armmp-lpae        6.1.135-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
iF  linux-image-6.1.0-35-armmp-lpae        6.1.137-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
ii  linux-image-6.1.0-37-armmp-lpae        6.1.140-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-9-armmp-lpae         6.1.27-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE

I found that this “iF” means installed ok half configured. I find some suggestion without taking a definitive action:

sudo dpkg --remove --force-remove-reinstreq --dry-run linux-image-6.1.0-35-armmp-lpae
(Reading database ... 104153 files and directories currently installed.)
Would remove or purge linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...

Does “apt purge” sound like a reasonable idea?

Yes, I just saw this in your previous reply.
So it looks like update-initramfs first tries to use zstd but then falls back to gzip as zstd is not installed. Gzip however is not supported by the kernel.

The safest way to get rid of the apt lock would be:
$ sudo systemctl disable --now plinth
$ sudo reboot
Then, I would try
$ sudo apt install zstd
$ sudo systemctl enable --now plinth

If this fixes your issue, we should probable install zstd in the next release.

I did as you suggested. After enabling plinth, I tried installing zstd, it somehow failed, here is what I did:

$ sudo apt install zstd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  zstd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 611 kB of archives.
After this operation, 1450 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stable/main armhf zstd armhf 1.5.4+dfsg2-5 [611 kB]
Fetched 611 kB in 1s (1163 kB/s)
quota not working (qgroup not set)
Selecting previously unselected package zstd.
(Reading database ... 104154 files and directories currently installed.)
Preparing to unpack .../zstd_1.5.4+dfsg2-5_armhf.deb ...
Unpacking zstd (1.5.4+dfsg2-5) ...
Setting up linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.1.0-35-armmp-lpae
grep: /boot/config-6.1.0-35-armmp-lpae: No such file or directory
W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
grep: /boot/config-6.1.0-35-armmp-lpae: No such file or directory
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
update-initramfs: failed for /boot/initrd.img-6.1.0-35-armmp-lpae with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.1.0-35-armmp-lpae (--configure):
 installed linux-image-6.1.0-35-armmp-lpae package post-installation script subprocess returned error exit status 1
Setting up zstd (1.5.4+dfsg2-5) ...
Errors were encountered while processing:
 linux-image-6.1.0-35-armmp-lpae
quota not working (qgroup not set)
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
fbox_admin@fbox:~$ sudo dpkg --configure -a
Setting up linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.1.0-35-armmp-lpae
grep: /boot/config-6.1.0-35-armmp-lpae: No such file or directory
W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
grep: /boot/config-6.1.0-35-armmp-lpae: No such file or directory
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
update-initramfs: failed for /boot/initrd.img-6.1.0-35-armmp-lpae with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.1.0-35-armmp-lpae (--configure):
 installed linux-image-6.1.0-35-armmp-lpae package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-6.1.0-35-armmp-lpae
$ sudo dpkg --remove --force-remove-reinstreq --dry-run linux-image-6.1.0-35-armmp-lpae
(Reading database ... 104175 files and directories currently installed.)
Would remove or purge linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...
$ sudo apt purge linux-image-6.1.0-35-armmp-lpae
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  linux-image-6.1.0-35-armmp-lpae*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 200 MB disk space will be freed.
Do you want to continue? [Y/n] 
quota not working (qgroup not set)
(Reading database ... 104175 files and directories currently installed.)
Removing linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.1.0-35-armmp-lpae
/etc/kernel/postrm.d/zz-flash-kernel:
Using DTB: sun7i-a20-olinuxino-lime2.dtb
flash-kernel: Kernel 6.1.0-35-armmp-lpae has been removed.
flash-kernel: A higher version (6.1.0-37-armmp-lpae) is still installed, no reflashing required.
(Reading database ... 98963 files and directories currently installed.)
Purging configuration files for linux-image-6.1.0-35-armmp-lpae (6.1.137-1) ...
quota not working (qgroup not set)
needrestart is being skipped since dpkg has failed
$ 
$ dpkg -l zstd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version       Architecture Description
+++-==============-=============-============-===============================================
ii  zstd           1.5.4+dfsg2-5 armhf        fast lossless compression algorithm -- CLI tool
fbox_admin@fbox:~$ dpkg -l "linux-image-*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                   Version          Architecture Description
+++-======================================-================-============-============================================================================
rc  linux-image-5.10.0-10-armmp-lpae       5.10.84-1        armhf        Linux 5.10 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-5.10.0-21-armmp-lpae       5.10.162-1       armhf        Linux 5.10 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-5.10.0-22-armmp-lpae       5.10.178-3       armhf        Linux 5.10 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-5.10.0-23-armmp-lpae       5.10.179-1       armhf        Linux 5.10 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-0.deb11.7-armmp-lpae 6.1.20-2~bpo11+1 armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-10-armmp-lpae        6.1.38-2         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-11-armmp-lpae        6.1.38-4         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-12-armmp-lpae        6.1.52-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-13-armmp-lpae        6.1.55-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-15-armmp-lpae        6.1.66-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-17-armmp-lpae        6.1.69-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-18-armmp-lpae        6.1.76-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-20-armmp-lpae        6.1.85-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-21-armmp-lpae        6.1.90-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-22-armmp-lpae        6.1.94-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-23-armmp-lpae        6.1.99-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-25-armmp-lpae        6.1.106-3        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-26-armmp-lpae        6.1.112-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-27-armmp-lpae        6.1.115-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-28-armmp-lpae        6.1.119-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-29-armmp-lpae        6.1.123-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-31-armmp-lpae        6.1.128-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-32-armmp-lpae        6.1.129-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-33-armmp-lpae        6.1.133-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-34-armmp-lpae        6.1.135-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
ii  linux-image-6.1.0-37-armmp-lpae        6.1.140-1        armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
rc  linux-image-6.1.0-9-armmp-lpae         6.1.27-1         armhf        Linux 6.1 for ARMv7 multiplatform compatible SoCs supporting LPAE
ii  linux-image-armmp-lpae                 6.1.140-1        armhf        Linux for ARMv7 multiplatform compatible SoCs supporting LPAE (meta-package)
fbox_admin@fbox:~$ sudo systemctl enable --now plinth
Created symlink /etc/systemd/system/multi-user.target.wants/plinth.service → /lib/systemd/system/plinth.service.

I waited but dovecot was still not working, plinth was showing that it is updating dovecot but no apt process was running and I could see this in the journal periodically:

Jul 28 15:17:17 fbox sudo[3787]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16
Jul 28 15:17:17 fbox sudo[3787]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115)
Jul 28 15:17:21 fbox sudo[3787]: pam_unix(sudo:session): session closed for user root
Jul 28 15:17:21 fbox /usr/bin/plinth[2704]: # plinth..dropin_is_valid("email", "/etc/fail2ban/jail.d/dovecot-freedombox.conf", false, unlink_invalid=true) 
Jul 28 15:17:21 fbox sudo[3791]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16
Jul 28 15:17:21 fbox sudo[3791]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115)
Jul 28 15:17:25 fbox sudo[3791]: pam_unix(sudo:session): session closed for user root
Jul 28 15:17:25 fbox /usr/bin/plinth[2704]: # plinth..dropin_is_valid("email", "/etc/postfix/freedombox-aliases.cf", false, unlink_invalid=true) 
Jul 28 15:17:25 fbox sudo[3795]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16
Jul 28 15:17:25 fbox sudo[3795]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115)
Jul 28 15:17:29 fbox sudo[3795]: pam_unix(sudo:session): session closed for user root
Jul 28 15:17:29 fbox /usr/bin/plinth[2704]: # plinth..dropin_is_valid("email", "/etc/rspamd/local.d/freedombox-logging.inc", false, unlink_invalid=true) 
Jul 28 15:17:29 fbox sudo[3799]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16
Jul 28 15:17:29 fbox sudo[3799]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115)
Jul 28 15:17:34 fbox sudo[3799]: pam_unix(sudo:session): session closed for user root
Jul 28 15:17:34 fbox /usr/bin/plinth[2704]: # plinth..dropin_is_valid("email", "/etc/rspamd/local.d/freedombox-milter-headers.conf", false, unlink_invalid=true) 
Jul 28 15:17:34 fbox sudo[3803]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16
Jul 28 15:17:34 fbox sudo[3803]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115)
Jul 28 15:17:38 fbox sudo[3803]: pam_unix(sudo:session): session closed for user root
Jul 28 15:17:38 fbox /usr/bin/plinth[2704]: # plinth..dropin_is_valid("email", "/etc/rspamd/local.d/freedombox-redis.conf", false, unlink_invalid=true) 
Jul 28 15:17:38 fbox sudo[3807]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16
Jul 28 15:17:38 fbox sudo[3807]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115)
Jul 28 15:17:42 fbox sudo[3807]: pam_unix(sudo:session): session closed for user root
Jul 28 15:17:42 fbox /usr/bin/plinth[2704]: # plinth..dropin_is_valid("email", "/etc/rspamd/local.d/freedombox-dkim-signing.conf", false, unlink_invalid=true) 
Jul 28 15:17:42 fbox sudo[3811]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16
Jul 28 15:17:42 fbox sudo[3811]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=115)
Jul 28 15:17:46 fbox sudo[3811]: pam_unix(sudo:session): session closed for user root
Jul 28 15:17:47 fbox /usr/bin/plinth[2704]: # plinth..dropin_is_valid("email", "/etc/dovecot/freedombox-sieve/learn-ham.sieve", false, unlink_invalid=true) 
Jul 28 15:17:47 fbox sudo[3824]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions plinth dropin_is_valid --write-fd 16

I also saw a number of actions for dkim, and let’s encrypt for email.

I finally tried again:

$ apt-get --assume-yes --quiet=2 install postfix postfix-sqlite dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-ldap rspamd
$

After a rather short time, I just had the prompt back. Then, less than one minute after that, dovecot is working again.

So perhaps installing zstd is useful, but it seems that, after some error occurred on the previous kernel package, it wasn’t sufficient to restore dovecot in a functional state. I can’t say much more now. In any case, thanks for the help and the work on freedombox, it is a great system!

I think that postfix was also not functional while dovecot wasn’t working, so I’ll probably get a number of emails later when the servers resend them to me.

@nbenedek I just received a message about this thread and checked my mail server with the update. My Pioneer with Postfix/Dovecot and SOGo updated on 25.9.3 without any errors and also restarted without any hassle. SOGo has not the small fix yet for custom name and email account. I will write it to the other post…..

I am so thankful for you guys developing such a genius software!!! Thank you!!!

Maybe just for your information:
The server doesn’t have any errors except sometimes rspamd has had an error on server timeout. In /etc/rspamd/options.inc I did put the dns server timeout from 1s to 2s and since then there wasn’t an error again.

1 Like

After a rather short time, I just had the prompt back. Then, less than one minute after that, dovecot is working again.

The idea here is that after installing zstd, initramfs can update, which made the apt command succeed, which then allowed FreedomBox to go on and update the symlinks.

@David you confirmed to have no issues with the upgrade. Could you help us by checking if your Pioneer has the zstd package and what your kernel version is?
We would need the output of these commands:

$ apt list installed zstd
$ uname -r

This is the output:
zstd/stable 1.5.4+dfsg2-5 armhf
6.1.0-37-armmp-lpae