From 3bac1f33897b4076550f57944457996e98bc12a2 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Fri, 5 Jun 2026 14:43:17 +0530 Subject: [PATCH 1/2] fix(postfix): update package names for Debian 13 (trixie) compatibility libpcre3 and libpcre3-dev were removed in Debian 13 in favor of PCRE2; libicu72 was renamed to libicu76; libldap-2.4 was renamed to libldap2. Update Postfix build flags to use DHAS_PCRE2 and pcre2-config accordingly. Also bumps base image from debian:13.4-slim to debian:13.5-slim. --- postfix/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/postfix/Dockerfile b/postfix/Dockerfile index bf8d6d4..c99d634 100644 --- a/postfix/Dockerfile +++ b/postfix/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:13.4-slim +FROM debian:13.5-slim LABEL maintainer="Riddhesh Sanghvi " LABEL org.label-schema.schema-version="1.0.0" @@ -19,10 +19,10 @@ RUN apt-get update \ \ # Install Postfix dependencies && apt-get install -y --no-install-recommends --no-install-suggests \ - libpcre3 libicu72 \ + libpcre2-8-0 libicu76 \ libdb5.3 libpq5 libmariadb3 libmariadb-dev-compat libsqlite3-0 \ libsasl2-2 \ - libldap-2.4 \ + libldap2 \ libsasl2-modules \ \ # Install tools for building @@ -35,7 +35,7 @@ RUN apt-get update \ # Install Postfix build dependencies && buildDeps=" \ libssl-dev \ - libpcre3-dev libicu-dev \ + libpcre2-dev libicu-dev \ libdb-dev libpq-dev libmariadb-dev libsqlite3-dev \ libsasl2-dev \ libldap2-dev \ @@ -53,7 +53,7 @@ RUN cd /tmp/postfix-* \ && sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf \ && make makefiles \ CCARGS="-DHAS_SHL_LOAD -DUSE_TLS \ - -DHAS_PCRE $(pcre-config --cflags) \ + -DHAS_PCRE2 $(pcre2-config --cflags) \ -DHAS_PGSQL -I/usr/include/postgresql \ -DHAS_MYSQL $(mysql_config --include) \ -DHAS_SQLITE -I/usr/include \ @@ -62,7 +62,7 @@ RUN cd /tmp/postfix-* \ -DUSE_SASL_AUTH -DDEF_SASL_SERVER=\\\"dovecot\\\" \ -DUSE_LDAP_SASL" \ AUXLIBS="-lssl -lcrypto -lsasl2" \ - AUXLIBS_PCRE="$(pcre-config --libs)" \ + AUXLIBS_PCRE="$(pcre2-config --libs)" \ AUXLIBS_PGSQL="-lpq" \ AUXLIBS_MYSQL="$(mysql_config --libs)" \ AUXLIBS_SQLITE="-lsqlite3 -lpthread" \ From f4de81bb7cb7daa97e685f498f4e7bbd29a30760 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Fri, 5 Jun 2026 15:04:31 +0530 Subject: [PATCH 2/2] fix(postfix): fix three Debian 13 build failures - -DHAS_PCRE2 is not a valid Postfix flag; Postfix 3.7+ uses -DHAS_PCRE=2 (numeric) to select PCRE2 at compile time (see src/util/dict_pcre.c). - pcre2-config --libs exits with code 1 (usage error); the correct flag for linking the 8-bit library is --libs8. - debian:13.5-slim no longer ships adduser/addgroup; add the adduser package to the initial apt-get install block. - debian:13.5-slim auto-enables HAS_NIS via makedefs but rpcsvc/ypclnt.h is only available from libnsl-dev (not installed); add -DNO_NIS to CCARGS to disable legacy NIS support, which is unnecessary in a container environment. --- postfix/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/postfix/Dockerfile b/postfix/Dockerfile index c99d634..0cff269 100644 --- a/postfix/Dockerfile +++ b/postfix/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update \ m4 \ inetutils-syslogd \ ca-certificates \ + adduser \ && update-ca-certificates \ \ # Install Postfix dependencies @@ -53,16 +54,17 @@ RUN cd /tmp/postfix-* \ && sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf \ && make makefiles \ CCARGS="-DHAS_SHL_LOAD -DUSE_TLS \ - -DHAS_PCRE2 $(pcre2-config --cflags) \ + -DHAS_PCRE=2 $(pcre2-config --cflags) \ -DHAS_PGSQL -I/usr/include/postgresql \ -DHAS_MYSQL $(mysql_config --include) \ -DHAS_SQLITE -I/usr/include \ -DHAS_LDAP -I/usr/include \ -DUSE_CYRUS_SASL -I/usr/include/sasl \ -DUSE_SASL_AUTH -DDEF_SASL_SERVER=\\\"dovecot\\\" \ - -DUSE_LDAP_SASL" \ + -DUSE_LDAP_SASL \ + -DNO_NIS" \ AUXLIBS="-lssl -lcrypto -lsasl2" \ - AUXLIBS_PCRE="$(pcre2-config --libs)" \ + AUXLIBS_PCRE="$(pcre2-config --libs8)" \ AUXLIBS_PGSQL="-lpq" \ AUXLIBS_MYSQL="$(mysql_config --libs)" \ AUXLIBS_SQLITE="-lsqlite3 -lpthread" \