git: ee87152d51a0 - main - mail/postfix-current: Update to 3.8.20220220

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Sun, 13 Mar 2022 12:37:08 UTC
The branch main has been updated by otis:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ee87152d51a0a63406f189987975dc14a3ed5825

commit ee87152d51a0a63406f189987975dc14a3ed5825
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2022-03-12 11:55:38 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2022-03-13 12:34:29 +0000

    mail/postfix-current: Update to 3.8.20220220
    
    - Update to 3.8.20220220
    - Correct installation instructions [1]
    - Listen on both IPv4 and IPv6 [2]
    - Use system-wide CA path [3]
    - Correct typo in pkg-message [4]
    - Switch to PCRE2 [5]
    
    PR:     261821 [1]
    PR:     252872 [2]
    PR:     239473 [3]
    PR:     261824 [4]
    PR:     262100 [5]
---
 mail/postfix-current/Makefile                      | 15 ++++++------
 mail/postfix-current/distinfo                      |  6 ++---
 mail/postfix-current/files/patch-conf_main.cf      | 11 +++++++++
 mail/postfix-current/files/patch-makedefs          | 27 ----------------------
 .../files/patch-src_util_sys__defs.h               | 12 ----------
 mail/postfix-current/files/pkg-install.in          |  6 ++---
 mail/postfix-current/files/pkg-message.in          |  1 +
 mail/postfix-current/pkg-plist                     |  6 ++---
 8 files changed, 29 insertions(+), 55 deletions(-)

diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
index c16c0a61d1e1..008846f1cc63 100644
--- a/mail/postfix-current/Makefile
+++ b/mail/postfix-current/Makefile
@@ -1,7 +1,7 @@
 # Created by: Torsten Blum <torstenb@FreeBSD.org>
 
 PORTNAME=	postfix
-DISTVERSION=	3.7-20211107
+DISTVERSION=	3.8-20220220
 PORTREVISION?=	0
 PORTEPOCH=	6
 CATEGORIES=	mail
@@ -60,8 +60,8 @@ USERS=		postfix
 GROUPS=		mail maildrop postfix
 
 OPTIONS_DEFINE=		BDB BLACKLISTD CDB DOCS EAI INST_BASE LDAP LMDB MYSQL \
-			NIS PCRE PGSQL SASL SQLITE TEST TLS
-OPTIONS_DEFAULT?=	BLACKLISTD EAI PCRE TLS
+			NIS PCRE2 PGSQL SASL SQLITE TEST TLS
+OPTIONS_DEFAULT?=	BLACKLISTD EAI PCRE2 TLS
 OPTIONS_RADIO=		RG1
 OPTIONS_RADIO_RG1=	SASLKMIT SASLKRB5
 .if ${FLAVOR:U} == ldap
@@ -81,6 +81,7 @@ EAI_DESC=		Email Address Internationalization (SMTPUTF8) support
 INST_BASE_DESC=		Install into /usr and /etc/postfix
 LDAP_DESC=		LDAP maps (uses WITH_OPENLDAP_VER)
 LMDB_DESC=		LMDB maps
+PCRE2_DESC=             Use Perl Compatible Regular Expressions, version 2
 RG1_DESC=		Kerberos network authentication protocol type
 SASLKMIT_DESC=		If your SASL req. MIT Kerberos5, select this
 SASLKRB5_DESC=		If your SASL req. Kerberos5, select this
@@ -94,7 +95,7 @@ EAI_LIB_DEPENDS=		libicuuc.so:devel/icu
 LDAP_USE=			OPENLDAP=yes
 LMDB_LIB_DEPENDS=		liblmdb.so:databases/lmdb
 MYSQL_USES?=			mysql
-PCRE_LIB_DEPENDS=		libpcre.so:devel/pcre
+PCRE2_LIB_DEPENDS=		libpcre2-8.so:devel/pcre2
 PGSQL_USES=			pgsql
 SASLKMIT_LIB_DEPENDS=		libkrb5.so:security/krb5
 SASL_LIB_DEPENDS=		libsasl2.so:security/cyrus-sasl2
@@ -197,10 +198,10 @@ POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -licuuc
 POSTFIX_CCARGS+=	-DNO_EAI
 .endif
 
-.if ${PORT_OPTIONS:MPCRE}
+.if ${PORT_OPTIONS:MPCRE2}
 DYN_EXT+=		pcre
-POSTFIX_CCARGS+=	-DHAS_PCRE -I${LOCALBASE}/include
-POSTFIX_DYN_AUXLIBS+=	"AUXLIBS_PCRE=`${LOCALBASE}/bin/pcre-config --libs`"
+POSTFIX_CCARGS+=	-DHAS_PCRE=2 -I${LOCALBASE}/include
+POSTFIX_DYN_AUXLIBS+=	"AUXLIBS_PCRE=`${LOCALBASE}/bin/pcre2-config --libs8`"
 .else
 POSTFIX_CCARGS+=	-DNO_PCRE
 .endif
diff --git a/mail/postfix-current/distinfo b/mail/postfix-current/distinfo
index 2c98ce3287df..8e06a6189840 100644
--- a/mail/postfix-current/distinfo
+++ b/mail/postfix-current/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1636470430
-SHA256 (postfix/postfix-3.7-20211107.tar.gz) = 08b7c864819e7dfbd44c4513509afeca76ffcb8d9cfa5a97149aa4235c41f160
-SIZE (postfix/postfix-3.7-20211107.tar.gz) = 4771175
+TIMESTAMP = 1647041489
+SHA256 (postfix/postfix-3.8-20220220.tar.gz) = 242b20fe8a74381f7190233eb52dd5407124e42fcdab88adbfb2ec58b8bb8b0c
+SIZE (postfix/postfix-3.8-20220220.tar.gz) = 4821731
diff --git a/mail/postfix-current/files/patch-conf_main.cf b/mail/postfix-current/files/patch-conf_main.cf
new file mode 100644
index 000000000000..ecdcaecc206e
--- /dev/null
+++ b/mail/postfix-current/files/patch-conf_main.cf
@@ -0,0 +1,11 @@
+--- conf/main.cf.orig	2022-03-12 22:37:09 UTC
++++ conf/main.cf
+@@ -681,4 +681,7 @@ sample_directory = /etc/postfix
+ # readme_directory: The location of the Postfix README files.
+ #
+ readme_directory = no
+-inet_protocols = ipv4
++inet_protocols = all
++
++# smtp CA path (default to system-wide location)
++smtp_tls_CApath = /etc/ssl/certs
diff --git a/mail/postfix-current/files/patch-makedefs b/mail/postfix-current/files/patch-makedefs
deleted file mode 100644
index bc2fcbf36c3b..000000000000
--- a/mail/postfix-current/files/patch-makedefs
+++ /dev/null
@@ -1,27 +0,0 @@
---- makedefs.orig	2021-04-24 20:49:37 UTC
-+++ makedefs
-@@ -309,6 +309,24 @@ case "$SYSTEM.$RELEASE" in
- 		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
- 		: ${PLUGIN_LD="${CC} -shared"}
- 		;;
-+  FreeBSD.13*)	SYSTYPE=FREEBSD13
-+		: ${CC=cc}
-+		: ${SHLIB_SUFFIX=.so}
-+		: ${SHLIB_CFLAGS=-fPIC}
-+		: ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-+		: ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-+		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-+		: ${PLUGIN_LD="${CC} -shared"}
-+		;;
-+  FreeBSD.14*)	SYSTYPE=FREEBSD14
-+		: ${CC=cc}
-+		: ${SHLIB_SUFFIX=.so}
-+		: ${SHLIB_CFLAGS=-fPIC}
-+		: ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-+		: ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-+		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-+		: ${PLUGIN_LD="${CC} -shared"}
-+		;;
-  DragonFly.*)	SYSTYPE=DRAGONFLY
- 		;;
-   OpenBSD.2*)	SYSTYPE=OPENBSD2
diff --git a/mail/postfix-current/files/patch-src_util_sys__defs.h b/mail/postfix-current/files/patch-src_util_sys__defs.h
deleted file mode 100644
index 96beb47184f3..000000000000
--- a/mail/postfix-current/files/patch-src_util_sys__defs.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/util/sys_defs.h.orig	2020-05-21 18:34:23 UTC
-+++ src/util/sys_defs.h
-@@ -30,7 +30,8 @@
- #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
-     || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
-     || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
--    || defined(FREEBSD11) || defined(FREEBSD12) \
-+    || defined(FREEBSD11) || defined(FREEBSD12) || defined(FREEBSD13) \
-+    || defined(FREEBSD14) \
-     || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
-     || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
-     || defined(OPENBSD5) || defined(OPENBSD6) \
diff --git a/mail/postfix-current/files/pkg-install.in b/mail/postfix-current/files/pkg-install.in
index 0b7e47cfe011..340c1df561e7 100644
--- a/mail/postfix-current/files/pkg-install.in
+++ b/mail/postfix-current/files/pkg-install.in
@@ -61,7 +61,7 @@ yesno() {
 # Respect POSTFIX_DEFAULT_MTA, do not ask for confirmation!
 # (This helps tools like salt, ansible or puppet on new installations)
 # ==============================================================================
-install_choise(){
+install_choice(){
 	local mailerconf
 	mailerconf=$1
 
@@ -167,12 +167,12 @@ if [ -f "${MC_BASE}" ]; then
 			cmp_mailer ${MC_LOCALBASE} || install_mailer_conf ${MC_LOCALBASE}
 			try_reload
 		else
-			cmp_mailer ${MC_LOCALBASE} || install_choise ${MC_LOCALBASE}
+			cmp_mailer ${MC_LOCALBASE} || install_choice ${MC_LOCALBASE}
 		fi
 	else
 		cmp_mailer ${MC_BASE}
 		if [ $? -ne 0 ]; then
-			install_choise ${MC_BASE}
+			install_choice ${MC_BASE}
 		else
 			show_activated_msg ${MC_BASE}
 			try_reload
diff --git a/mail/postfix-current/files/pkg-message.in b/mail/postfix-current/files/pkg-message.in
index 57bf7b01a678..1727326607e1 100644
--- a/mail/postfix-current/files/pkg-message.in
+++ b/mail/postfix-current/files/pkg-message.in
@@ -11,6 +11,7 @@ Run the following commands to enable postfix during startup:
 
 If postfix is *not* already activated in %%MC_PREFIX%%/etc/mail/mailer.conf
   - mv %%MC_PREFIX%%/etc/mail/mailer.conf %%MC_PREFIX%%/etc/mail/mailer.conf.old
+  - install -d %%MC_PREFIX%%/etc/mail
   - install -m 0644 %%DATADIR%%/mailer.conf.postfix %%MC_PREFIX%%/etc/mail/mailer.conf
 
 Disable sendmail(8) specific tasks,
diff --git a/mail/postfix-current/pkg-plist b/mail/postfix-current/pkg-plist
index a3cc7b594290..4976929394de 100644
--- a/mail/postfix-current/pkg-plist
+++ b/mail/postfix-current/pkg-plist
@@ -29,7 +29,7 @@ lib/postfix/libpostfix-util.so
 %%LDAP%%lib/postfix/postfix-ldap.so
 %%LMDB%%lib/postfix/postfix-lmdb.so
 %%MYSQL%%lib/postfix/postfix-mysql.so
-%%PCRE%%lib/postfix/postfix-pcre.so
+%%PCRE2%%lib/postfix/postfix-pcre.so
 %%PGSQL%%lib/postfix/postfix-pgsql.so
 %%SQLITE%%lib/postfix/postfix-sqlite.so
 libexec/postfix/anvil
@@ -42,7 +42,7 @@ libexec/postfix/dynamicmaps.cf
 %%LDAP%%libexec/postfix/dynamicmaps.cf.d/ldap.cf
 %%LMDB%%libexec/postfix/dynamicmaps.cf.d/lmdb.cf
 %%MYSQL%%libexec/postfix/dynamicmaps.cf.d/mysql.cf
-%%PCRE%%libexec/postfix/dynamicmaps.cf.d/pcre.cf
+%%PCRE2%%libexec/postfix/dynamicmaps.cf.d/pcre.cf
 %%PGSQL%%libexec/postfix/dynamicmaps.cf.d/pgsql.cf
 %%SQLITE%%libexec/postfix/dynamicmaps.cf.d/sqlite.cf
 libexec/postfix/error
@@ -63,7 +63,7 @@ libexec/postfix/postfix-files
 %%LDAP%%libexec/postfix/postfix-files.d/ldap-files
 %%LMDB%%libexec/postfix/postfix-files.d/lmdb-files
 %%MYSQL%%libexec/postfix/postfix-files.d/mysql-files
-%%PCRE%%libexec/postfix/postfix-files.d/pcre-files
+%%PCRE2%%libexec/postfix/postfix-files.d/pcre-files
 %%PGSQL%%libexec/postfix/postfix-files.d/pgsql-files
 %%SQLITE%%libexec/postfix/postfix-files.d/sqlite-files
 libexec/postfix/postfix-script