Postfix installation fails on fresh Ubuntu 22.04

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Webmin version ?
Virtualmin version 7.4.0
Webserver version ?
Related packages install script

When running the install script on a fresh Ubuntu 22.04, I get the following error upon configuring Postfix in phase 4 (excerpt from log file):

[2024-11-12 16:30:27 CET] [DEBUG] Phase 4 of 4: Configuration
[2024/11/12 16:30:27] [INFO] - Starting init-system log...
[2024/11/12 16:30:27] [INFO] - Total plugins to be run: 21
[2024/11/12 16:30:27] [INFO] - Configuring AWStats
[2024/11/12 16:30:28] [INFO] - Succeeded
[2024/11/12 16:30:28] [INFO] - Configuring Apache
[2024/11/12 16:30:28] [INFO] - Code: 0 Result: Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2
[2024/11/12 16:30:28] [INFO] - Code: 0 Result: Site default-ssl already disabled
[2024/11/12 16:30:28] [INFO] - Code: 0 Result: Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Enabling module socache_shmcb.
Enabling module ssl.
See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
To activate the new configuration, you need to run:
  systemctl restart apache2
[2024/11/12 16:30:31] [INFO] - Code: 0 Result:
[2024/11/12 16:30:34] [INFO] - Succeeded
[2024/11/12 16:30:34] [INFO] - Configuring Bind
[2024/11/12 16:30:35] [INFO] - Succeeded
[2024/11/12 16:30:35] [INFO] - Configuring ClamAV
[2024/11/12 16:30:37] [INFO] - Succeeded
[2024/11/12 16:30:37] [INFO] - Configuring Dovecot
[2024/11/12 16:30:38] [INFO] - Succeeded
[2024/11/12 16:30:38] [INFO] - Configuring Etckeeper
[2024/11/12 16:30:38] [INFO] - Succeeded
[2024/11/12 16:30:38] [INFO] - Configuring Firewalld
[2024/11/12 16:30:38] [INFO] - Code: 0 Result: Warning: ZONE_ALREADY_SET: public
success
[2024/11/12 16:30:38] [INFO] - Code: 0 Result: Warning: ALREADY_ENABLED: 'ssh' already in 'public'
success
[2024/11/12 16:30:38] [INFO] - Code: 0 Result: Warning: ALREADY_ENABLED: ssh
success

[2024/11/12 16:30:39] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:39] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:39] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:39] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:40] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:40] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:40] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: Invalid argument

internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"ct helper": {"family": "inet", "table": "firewalld", "name": "helper-ftp-tcp", "type": "ftp", "protocol": "tcp"}}}, {"add": {"rule": {"fami>
[2024/11/12 16:30:40] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:40] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:41] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:41] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:41] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:41] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:42] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:42] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:42] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:42] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:43] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:43] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:43] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:43] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:44] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:44] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "ip>
[2024/11/12 16:30:44] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:44] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:45] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:45] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:45] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:45] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:46] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:46] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:46] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:46] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:47] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:47] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory


JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_public_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tc>
[2024/11/12 16:30:47] [INFO] - Code: 0 Result: success
[2024/11/12 16:30:48] [INFO] - Code: 3328 Result: Error: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: No such file or directory

internal:0:0-0: Error: Could not process rule: Invalid argument

internal:0:0-0: Error: Could not process rule: No such file or directory

JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"chain": {"family": "inet", "table": "firewalld", "name": "mangle_PREROUTING", "type": "filter", "hook": "prerouting", "prio": -140}}}, {"ad>
[2024/11/12 16:30:48] [INFO] - Succeeded
[2024/11/12 16:30:49] [INFO] - Configuring MariaDB
[2024/11/12 16:30:49] [INFO] - Succeeded
[2024/11/12 16:30:49] [INFO] - Configuring Postfix
[2024/11/12 16:30:49] [WARN] - Failed
[2024/11/12 16:30:49] [INFO] - Configuring ProFTPd
[2024/11/12 16:30:49] [INFO] - Generating a self-signed certificate for TLS.
[2024/11/12 16:30:49] [INFO] - Code: 0 Result: [REMOVED BY ME]
-----
[2024/11/12 16:30:49] [INFO] - Code: 0 Result: Generating public/private ecdsa key pair.
Your identification has been saved in /etc/proftpd/ssh_host_ecdsa_key
Your public key has been saved in /etc/proftpd/ssh_host_ecdsa_key.pub
The key fingerprint is:
SHA256:[REMOVED BY ME] root@server.host.de
The key's randomart image is:
+---[ECDSA 256]---+
| [REMOVED BY ME] |
+----[SHA256]-----+
[2024/11/12 16:30:50] [INFO] - Code: 0 Result: Generating public/private rsa key pair.
Your identification has been saved in /etc/proftpd/ssh_host_rsa_key
Your public key has been saved in /etc/proftpd/ssh_host_rsa_key.pub
The key fingerprint is:
SHA256:[REMOVED BY ME] root@server.host.de
The key's randomart image is:
+---[RSA 3072]----+
| [REMOVED BY ME] |
+----[SHA256]-----+
[2024/11/12 16:30:51] [INFO] - Succeeded
[2024/11/12 16:30:51] [INFO] - Configuring Procmail
[2024/11/12 16:30:51] [INFO] - Succeeded
[2024/11/12 16:30:51] [INFO] - Configuring Quotas
[2024/11/12 16:30:51] [WARN] - Non-fatal error
[2024/11/12 16:30:51] [INFO] - Configuring SASL
[2024/11/12 16:30:52] [INFO] - Code: 0 Result:
[2024/11/12 16:30:52] [INFO] - Code: 256 Result: adduser: The user `postfix' does not exist.
[2024/11/12 16:30:52] [INFO] - Code: 256 Result: touch: cannot touch '/etc/postfix/sasl/smtpd.conf': No such file or directory

Can anybody help me, please?

Best regards,
fuggi

@fuggi,

Is this a fresh install on a freshly installed OS? Are you using the Virtualmin installer?

That doesn’t look like a freshly installed OS.

Maybe not a ‘minimal install’?
help.ubuntu.com/community/Installation/MinimalCD

It doesn’t have to be minimal. It just needs to be freshly installed. I prefer minimal just because there’s a lot of junk in a bigger install, but we have tested on a regular non-minimal installation, as well. (Though it’s been a long time since we were testing new installs on 22.04. @fuggi we generally recommend you use the latest supported version of your preferred OS, which would be 24.04. That will provide a longer lifecycle, and will be the version we’re currently doing most of our testing on.)

It is a fresh install on a VPS as delivered by the provider, but not a minimal.

[quote=“Joe, post:5, topic:130389, full:true”]
@fuggi we generally recommend you use the latest supported version of your preferred OS, which would be 24.04. That will provide a longer lifecycle, and will be the version we’re currently doing most of our testing on.)[/quote]

I’ve just tried it on 24.04.01, but got the same error.

@fuggi,

Where are you downloading the installer from?

OK, I assume they’ve got custom repositories configured and they’re broken. Maybe choose a better provider.

The issue actually would have been earlier in the log, probably during installation of the packages, and not during configuration. The configuration step looks like it’s failing because some stuff just isn’t installed. We don’t provide the missing packages, they’d come from the OS repos, and if your provider has custom repos that don’t work, that would explain it.

I don’t think it has anything to do with the installer.

Directly from the Virtualmin website by running

sh -c "$(curl -fsSL https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh)" -- --bundle LAMP

Note, I’m root on that VPS.

@fuggi,

Before running the installer, did you run:

sudo apt update

Were there any errors presented during this step?

*** Perhaps send us a screenshot of what this step produces ***

1 Like

Doesn’t look like custom repos to me IMHO:

root@server:~# grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse
/etc/apt/sources.list.d/ct-preset.list:deb [trusted=yes lang=none] https://repo.virtuozzo.com/ctpreset/deb/ /
/etc/apt/sources.list.d/virtualmin.list:deb [signed-by=/usr/share/keyrings/ubuntu-virtualmin-7.gpg] https://software.virtualmin.com/vm/7/gpl/apt virtualmin main

Best regards,
fuggi

Yes, I did and yes, there was a 404 error regarding the Virtuozzo repo:

Err:13 https://repo.virtuozzo.com/ctpreset/deb  Packages
  404  Not Found [IP: 46.231.178.114 443]
Err:13 https://repo.virtuozzo.com/ctpreset/deb  Packages
  404  Not Found [IP: 46.231.178.114 443]
Err:13 https://repo.virtuozzo.com/ctpreset/deb  Packages
  404  Not Found [IP: 46.231.178.114 443]

I guess we are getting closer to the root cause now, aren’t we? :wink:

@fuggi,

Was that repo installed during VPS creation or afterwards?

@tpnsolutions
During VPS creation.

@fuggi,

While that repo doesn’t seem broken from here (resolves to a diff IP from my computer – likely localized CDN)
 Try disabling the repo, then run the installer to see if you can get it working


== DISABLE REPO ==

Simply rename:

to

then re-run:

1 Like

Dont forget this is ubuntu 24.04 and the list file may have been replaced with a .sources file so if that file exists you may have to move that, but if the .list file exists you are 100% correct

@jimr1,

Recommendation ATM is based on output posted from command:

Noted above :slight_smile:

@jimr1
The apt-get update command worked without any error after disabling the list file. So I assume it did the trick.

@tpnsolutions
However, I seem to run into the same error again. But I noticed something in the standard output (not log file) which I also recall from my first attempt:

▣▣▣▣ Phase 4 of 4: Configuration
[1/21] Configuring AWStats                                                   ✔
[2/21] Configuring Apache                                                    ✔
[3/21] Configuring Bind                                                      ✔
[4/21] Configuring ClamAV                                                    ✔
[5/21] Configuring Dovecot                                                   ✔
[6/21] Configuring Etckeeper                                                 ✔
[7/21] Configuring Firewalld                                                 ✔
[8/21] Configuring MariaDB                                                   ✔
[9/21] Configuring Postfix                                                   ✘
[10/21] Configuring ProFTPd                                                  ✔
[11/21] Configuring Procmail                                                 ✔
[12/21] Configuring Quotas
The filesystem / could not be remounted with quotas enabled.
You may need to reboot your system, and/or enable quotas
manually in Webmin/System/Disk Quotas module.                                ⚠
[13/21] Configuring SASL                                                    ███[12/Nov/2024:18:51:11 +0100] Failed to open /etc/postfix/sasl/smtpd.conf for writing : No such file or directory web-lib-funcs.pl (line 10596)
Error
-----
Failed to open /etc/postfix/sasl/smtpd.conf for writing : No such file or directory web-lib-funcs.pl (line 10596)

What about that “filesystem / could not be remounted” issue?