Topic: Testing 1.8.4 on FreeBSD 15.1, Python 3.12, PostGreSQL 18
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.8.4 PGSQL
- Deployed with iRedMail Easy or the downloadable installer? Installer (Github code)
- Linux/BSD distribution name and version: FreeBSD 15.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- 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.
====
Hi Zhang,
This is not a support ticket. I'm sharing some testing notes after validating iRedMail 1.8.4 on FreeBSD 15.1-RELEASE, which was released recently.
I've been running iRedMail on FreeBSD since 2019, on a personal mail server, and perform periodic rebuild and migration exercises to keep my documentation current and validate the upgrade path.
The actual server is running quite old versions.
This test was performed entirely in a disposable VM environment using a fresh install of FreeBSD 15.1 and iRedMail 1.8.4.
Overall, the installation was successful, but I encountered a few issues related mainly to platform version drift since FreeBSD 15.1 has newer package baselines than the currently supported FreeBSD release. The fixes were straightforward and may be worth considering for inclusion before declaring FreeBSD 15.1 officially supported.
Python Package Flavour
The installer currently uses Python 3.11 package names while FreeBSD 15.1 repositories now provide Python 3.12 packages by default.
# ./functions/packages_freebsd.sh
# replace
export PY3_VER='3.11'
export PY_FLAVOR='py311'
# with
export PY3_VER='3.12'
export PY_FLAVOR='py312'Without this change the installer attempts to install packages which no longer exist in the repository, for example:
py311-sqlalchemy14
py311-passlib
py311-psycopg2
py311-requests
...After changing the flavour to py312, package installation proceeds normally.
PostgreSQL Baseline
The installer currently uses PostgreSQL 17. FreeBSD 15.1 repositories now provide PostgreSQL 18 as the default baseline.
# ./conf/postgresql
# replace
export PGSQL_VERSION='17'
# with
export PGSQL_VERSION='18'This avoids package version conflicts later in the installation process.
Random Password Generation
I (we) ran into an issue previously encountered on FreeBSD several years ago.
Check Topic 21040 from 2025-Nov, under: Random Password Generator. We came across that also back in 2020. So it is still linguering and bites me every time.
During installation PostgreSQL would eventually report:
FATAL: canceling authentication due to timeoutThe root cause is the random password generation method used on FreeBSD.
# ./conf/global
# replace
export RANDOM_STRING='eval </dev/urandom LC_CTYPE=C tr -dc a-zA-Z0-9 | head -c 32'
# with
export RANDOM_STRING='openssl rand -base64 24'This method has worked reliably in my testing and avoids the FreeBSD-specific issues that can occur with the existing command.
The generated passwords were correctly written to:
./configand PostgreSQL setup completed successfully afterwards.
SpamAssassin Dependency (re2c)
The installer completed package installation but later failed when compiling SpamAssassin rules.
Error:
Can't exec "re2c": No such file or directoryThis occurred during:
Compiling SpamAssassin rulesets (sa-compile)
Suggested update in:
# ./functions/packages_freebsd.sh
# replace
ALL_PKGS="${ALL_PKGS} spamassassin"
# with
ALL_PKGS="${ALL_PKGS} re2c spamassassin"After installing re2c, the SpamAssassin compilation step completed successfully.
Optional Changes
These are not required for successful installation but may be useful depending on deployment preferences. I do make these changes manually post-installation.
PostgreSQL Login Class
# /etc/rc.conf.local
# add
postgresql_login_class="postgres"PHP-FPM Logging
# /usr/local/etc/php-fpm.conf
# Default: notice; reduce noise
log_level = warningSOGo Not Installed
If SOGo is not selected, remove it from the backup list:
# /var/vmail/backup/backup_pgsql.sh
# if sogo not installed
# replace
export DATABASES='vmail roundcubemail amavisd iredadmin sogo iredapd'
# with
export DATABASES='vmail roundcubemail amavisd iredadmin iredapd'PostFix server/domain
# /usr/local/etc/postfix/main.cf
# hostname
# server level
myhostname = server.domain.local
# domain level
myorigin = domain.local
# domain level (reuse, avoids issues)
mydomain = $myoriginSummary
After applying the following changes:
Python flavor: py311 -> py312
PostgreSQL: 17 -> 18
Random password generation -> openssl rand
Add re2c dependency
iRedMail 1.8.4 installed successfully on a fresh FreeBSD 15.1 VM.
Hopefully these notes help accelerate validation of FreeBSD 15.1 support and potentially reduce the work required for an upcoming release.
As always, thank you for continuing to support FreeBSD as a deployment platform for iRedMail.
Regards
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.