Virtualmin installation postfix error

Hi, trying to install Virtualmin on Ubuntu 24 cloud-init version and it is failing.

root@ubuntu24:~# sudo sh -c “$(curl -fsSL https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh)” – --bundle LEMP -m
[INFO] Installation log is written to /root/virtualmin-install.log

Welcome to the Virtualmin GPL installer, version 7.5.2

This script must be run on a freshly installed supported OS. It does not
perform updates or upgrades (use your system package manager) or license
changes (use the “virtualmin change-license” command).

The systems currently supported by the install script are:

Red Hat Enterprise Linux and derivatives
  - RHEL 8 and 9 on x86_64
  - Alma and Rocky 8 and 9 on x86_64
  - CentOS 7 on x86_64
  
Debian Linux and derivatives
  - Debian 10, 11 and 12 on i386 and amd64
  - Ubuntu 20.04 LTS, 22.04 LTS and 24.04 LTS on i386 and amd64

If your OS/version/arch is not listed, installation will fail. More
details about the systems supported by the script can be found here:

https://www.virtualmin.com/os-support

The selected package bundle is LEMP and the size of install is
minimal. It will require up to 1 GB of disk space.

Exit and re-run this script with --help flag to see available options.

Continue? (y/n) y

▣:white_medium_square::white_medium_square::white_medium_square: Phase 1 of 4: Check
Checking system time :check_mark:
Checking Perl installation :check_mark:
Checking CA certificates package :check_mark:
Checking HTTP client :check_mark:
Checking GPG package :check_mark:

▣▣:white_medium_square::white_medium_square: Phase 2 of 4: Setup
Downloading Virtualmin 7 key :check_mark:
Installing Virtualmin 7 key :check_mark:
Downloading repository metadata :check_mark:
Enabling universe repositories, if not already available :check_mark:
Disabling cdrom: repositories :check_mark:
Cleaning up software repo metadata :check_mark:

▣▣▣◻ Phase 3 of 4: Installation
Checking and installing system package updates :check_mark:
Installing Virtualmin 7 and all related packages ✘

[ERROR] Something went wrong. Exiting.
[ERROR] The last few log entries were:
Processing triggers for man-db (2.12.0-4build2) …
Processing triggers for dbus (1.14.10-4ubuntu4.1) …
Processing triggers for nginx (1.24.0-2ubuntu7.5) …
Triggering nginx reload …
Processing triggers for php8.3-cli (8.3.6-0ubuntu0.24.04.5) …
Processing triggers for php8.3-cgi (8.3.6-0ubuntu0.24.04.5) …
Processing triggers for dovecot-core (1:2.3.21+dfsg1-2ubuntu6.1) …
Processing triggers for php8.3-fpm (8.3.6-0ubuntu0.24.04.5) …
Processing triggers for mariadb-server (1:10.11.13-0ubuntu0.24.04.1) …
Errors were encountered while processing:
postfix
postfix-pcre
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
[2025-11-25 11:38:50 UTC] [INFO] Installing Virtualmin 7 and all related packages: [2025-11-25 11:38:50 UTC] [INFO] Failed with error: 100

Is there any additional information mentioned on the virtualmin-install.log file?

I don’t see any.

  GNU nano 7.2                           /root/virtualmin-install.log                                     
Setting up php8.3-fpm (8.3.6-0ubuntu0.24.04.5) ...

Creating config file /etc/php/8.3/fpm/php.ini with new version
Created symlink /etc/systemd/system/multi-user.target.wants/php8.3-fpm.service → /usr/lib/systemd/system/>
Setting up dovecot-pop3d (1:2.3.21+dfsg1-2ubuntu6.1) ...

Creating config file /etc/dovecot/conf.d/20-pop3.conf with new version
Setting up nginx-full (1.24.0-2ubuntu7.5) ...
Setting up mariadb-server (1:10.11.13-0ubuntu0.24.04.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mar>
Setting up virtualmin-lemp-stack-minimal (7.0.6-1) ...
Setting up proftpd-mod-crypto (1.3.8.b+dfsg-1ubuntu0.1) ...
Setting up mariadb-plugin-provider-bzip2 (1:10.11.13-0ubuntu0.24.04.1) ...
Setting up mariadb-plugin-provider-lzma (1:10.11.13-0ubuntu0.24.04.1) ...
Setting up libxml-simple-perl (2.25-2) ...
Setting up php-fpm (2:8.3+93ubuntu2) ...
Setting up mariadb-plugin-provider-lzo (1:10.11.13-0ubuntu0.24.04.1) ...
Setting up mariadb-plugin-provider-lz4 (1:10.11.13-0ubuntu0.24.04.1) ...
Setting up mariadb-plugin-provider-snappy (1:10.11.13-0ubuntu0.24.04.1) ...
Setting up libwww-perl (6.76-1) ...
Setting up liblwp-protocol-https-perl (6.13-1) ...
Setting up libxml-parser-perl (2.47-1build3) ...
Setting up libxml-sax-expat-perl (0.51-2) ...
update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::Expat with priority 50...
update-perl-sax-parsers: Updating overall Perl SAX parser modules info file...
Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version
Processing triggers for libc-bin (2.39-0ubuntu8.6) ...
Processing triggers for rsyslog (8.2312.0-3ubuntu9.1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for dbus (1.14.10-4ubuntu4.1) ...
Processing triggers for nginx (1.24.0-2ubuntu7.5) ...
Triggering nginx reload ...
Processing triggers for php8.3-cli (8.3.6-0ubuntu0.24.04.5) ...
Processing triggers for php8.3-cgi (8.3.6-0ubuntu0.24.04.5) ...
Processing triggers for dovecot-core (1:2.3.21+dfsg1-2ubuntu6.1) ...
Processing triggers for php8.3-fpm (8.3.6-0ubuntu0.24.04.5) ...
Processing triggers for mariadb-server (1:10.11.13-0ubuntu0.24.04.1) ...
Errors were encountered while processing:
 postfix
 postfix-pcre
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
[2025-11-25 11:38:50 UTC] [INFO]  Installing Virtualmin 7 and all related packages: [2025-11-25 11:38:50 >
[2025-11-25 11:42:15 UTC] [ERROR] Something went wrong. Exiting.
[2025-11-25 11:42:15 UTC] [ERROR] The last few log entries were:

That’s not a normal or expected error. Try running the following to see if it fixes the original issue:

sudo journalctl -xeu postfix

and

sudo dpkg --configure -a
root@ubuntu24:~# sudo journalctl -xeu postfix
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
-- No entries --

tried doing some setting but seems like i failed.

oot@ubuntu24:~# sudo dpkg --configure -a
Setting up postfix (3.8.6-1build2) ...

Postfix (main.cf) configuration was not changed.  If you need to make changes, 
edit /etc/postfix/main.cf (and others) as needed.  To view Postfix 
configuration values, see postconf(1).

After modifying main.cf, be sure to run 'systemctl reload postfix'.

Running newaliases
newaliases: warning: valid_hostname: numeric hostname: 8.8.8.8
newaliases: fatal: file /etc/postfix/main.cf: parameter mydomain: bad parameter value: 8.8.8.8
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
dpkg: dependency problems prevent configuration of postfix-pcre:
 postfix-pcre depends on postfix (= 3.8.6-1build2); however:
  Package postfix is not configured yet.

dpkg: error processing package postfix-pcre (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postfix
 postfix-pcre

i don’t want postfix at all. possible to skip it? it always causing issue. better remove it with minimal install.

When you installed Virtualmin, did it ask you to enter a hostname? Anyway, what is the output of the hostnamectl command?

it is currently showing ubuntu24.8.8.8.8 i have set a new hostname. do we really need a hostname pointing to the ip to work?

hostnamectl set-hostname ubuntu24.site.live

rebooted and then it shows

root@ubuntu24:~# sudo dpkg --configure -a
Setting up postfix (3.8.6-1build2) ...

Postfix (main.cf) configuration was not changed.  If you need to make changes, 
edit /etc/postfix/main.cf (and others) as needed.  To view Postfix 
configuration values, see postconf(1).

After modifying main.cf, be sure to run 'systemctl reload postfix'.

Running newaliases
newaliases: warning: valid_hostname: numeric hostname: 8.8.8.8
newaliases: fatal: file /etc/postfix/main.cf: parameter mydomain: bad parameter value: 8.8.8.8
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
dpkg: dependency problems prevent configuration of postfix-pcre:
 postfix-pcre depends on postfix (= 3.8.6-1build2); however:
  Package postfix is not configured yet.

dpkg: error processing package postfix-pcre (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postfix
 postfix-pcre
Root@ubuntu24:~# hostnamectl
 Static hostname: ubuntu24.site.live
       Icon name: computer-vm
         Chassis: vm 🖴
      Machine ID: XX
         Boot ID: XX
  Virtualization: kvm
Operating System: Ubuntu 24.04.3 LTS              
          Kernel: Linux 6.8.0-88-generic
    Architecture: x86-64
 Hardware Vendor: QEMU
  Hardware Model: Standard PC _Q35 + ICH9, 2009_
Firmware Version: 3.20230228-4
   Firmware Date: Tue 2023-06-06
    Firmware Age: 2y 5month 2w 6d       

Only the owner of an IP address can create a PTR record, and adding the IP to the hostname doesn’t solve this problem.

what should i do now? minimal install should be simple. virtualmin is amazing but seems like i will have to move because it is very technical. i often afraid to make any change on my current installations.

This is bogus configuration, and I don’t know how you got there. 8.8.8.8 is a Google DNS server.

I don’t know how you’d have that as your system hostname, configured as mydomain in main.cf. But, obviously you should not have mydomain set to that. The vast majority of people should not change it at all, and leave it at the default. So, remove your explicit mydomain.

Really, any mention of 8.8.8.8 in the Postfix config is bogus and shouldn’t be there. But, I continue to have no idea how you got there.

You should just try again on the clean Ubuntu 24.04 instance, using a proper hostname before the installation.

And, the error message is pretty clear and self-explanatory, so I don’t think we can provide any more details on this.

it is fixed. in Cloud-init DNS domain i wrongly put the dns 8.8.8.8 instead of using the domain. i clearly missed it and typed two dns 8.8.8.8 1.1.1.1

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.