From 05e82778870450d8d46f4e8761dec18911f3d8cc Mon Sep 17 00:00:00 2001 From: Juraj Lutter Date: Thu, 21 Mar 2024 22:01:50 +0100 Subject: [PATCH] mail/postfix: Update to 3.9.0 - Update to 3.9.0 - Add MongoDB maps support - regen patches. Release notes: https://postfix-mirror.horus-it.com/postfix-release/official/postfix-3.9.0.RELEASE_NOTES --- mail/postfix/Makefile | 39 ++++++++++++--- mail/postfix/distinfo | 6 +-- mail/postfix/files/extra-patch-blacklistd | 60 +++++++++++------------ mail/postfix/pkg-plist | 1 + 4 files changed, 65 insertions(+), 41 deletions(-) diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 5d5105052b48c..d43c786951dc4 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -1,5 +1,5 @@ PORTNAME= postfix -DISTVERSION= 3.8.5 +DISTVERSION= 3.9.0 PORTREVISION?= 0 PORTEPOCH= 1 CATEGORIES= mail @@ -22,39 +22,52 @@ LICENSE_NAME_IPL10= IBM PUBLIC LICENSE VERSION 1.0 LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_PERMS_IPL10= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -FLAVORS= default ldap mysql pgsql sasl sqlite +FLAVORS= default ldap mongo mysql pgsql sasl sqlite default_CONFLICTS_INSTALL= postfix-base-ldap postfix-base-sasl \ postfix-ldap postfix-sasl \ + postfix-mongo postfix-base-mongo \ postfix-mysql postfix-base-mysql \ postfix-pgsql postfix-base-pgsql \ postfix-sqlite postfix-base-sqlite ldap_PKGNAMESUFFIX= -ldap ldap_CONFLICTS_INSTALL= postfix postfix-base \ postfix-base-sasl postfix-sasl \ + postfix-mongo postfix-base-mongo \ postfix-mysql postfix-base-mysql \ postfix-pgsql postfix-base-pgsql \ postfix-sqlite postfix-base-sqlite +mongo_PKGNAMESUFFIX= -mongo +mongo_CONFLICTS_INSTALL= postfix postfix-base \ + postfix-ldap postfix-base-ldap \ + postfix-mysql postfix-base-mysql \ + postfix-pgsql postfix-base-pgsql \ + postfix-sasl postfix-base-sasl \ + postfix-sqlite postfix-base-sqlite mysql_PKGNAMESUFFIX= -mysql mysql_CONFLICTS_INSTALL= postfix postfix-base \ postfix-ldap postfix-base-ldap \ + postfix-mongo postfix-base-mongo \ postfix-pgsql postfix-base-pgsql \ postfix-sasl postfix-base-sasl \ postfix-sqlite postfix-base-sqlite pgsql_PKGNAMESUFFIX= -pgsql pgsql_CONFLICTS_INSTALL= postfix postfix-base \ postfix-ldap postfix-base-ldap \ + postfix-mongo postfix-base-mongo \ postfix-mysql postfix-base-mysql \ postfix-sasl postfix-base-sasl \ postfix-sqlite postfix-base-sqlite sasl_PKGNAMESUFFIX= -sasl sasl_CONFLICTS_INSTALL= postfix postfix-base \ postfix-base-ldap postfix-ldap \ + postfix-mongo postfix-base-mongo \ postfix-mysql postfix-base-mysql \ postfix-pgsql postfix-base-pgsql \ postfix-sqlite postfix-base-sqlite sqlite_PKGNAMESUFFIX= -sqlite sqlite_CONFLICTS_INSTALL= postfix postfix-base \ postfix-ldap postfix-base-ldap \ + postfix-mongo postfix-base-mongo \ postfix-mysql postfix-base-mysql \ postfix-pgsql postfix-base-pgsql \ postfix-sasl postfix-base-sasl @@ -73,16 +86,17 @@ SHEBANG_FILES= auxiliary/qshape/qshape.pl SCRIPTS_ENV+= POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}" -CONFLICTS_INSTALL= courier-0.* opensmtpd opensmtpd-devel \ - postfix-current sendmail sendmail-devel +PORTSCOUT= limit:^3\.9\. -PORTSCOUT= limit:^3\.7\. +CONFLICTS_INSTALL= courier-0.* opensmtpd opensmtpd-devel \ + postfix postfix-base postfix-ldap-sasl \ + postfix-sasl sendmail sendmail-devel USERS= postfix GROUPS= mail maildrop postfix -OPTIONS_DEFINE= BDB BLACKLISTD CDB DOCS EAI INST_BASE LDAP LMDB MYSQL \ - NIS PCRE2 PGSQL SASL SQLITE TEST TLS +OPTIONS_DEFINE= BDB BLACKLISTD CDB DOCS EAI INST_BASE LDAP LMDB MONGO \ + MYSQL NIS PCRE2 PGSQL SASL SQLITE TEST TLS OPTIONS_DEFAULT?= BLACKLISTD EAI PCRE2 TLS OPTIONS_RADIO= RG1 OPTIONS_RADIO_RG1= SASLKMIT SASLKRB5 @@ -106,7 +120,7 @@ BLACKLISTD_DESC= Enable blacklistd support CDB_DESC= CDB maps lookups EAI_DESC= Email Address Internationalization (SMTPUTF8) support INST_BASE_DESC= Install into /usr and /etc/postfix -LDAP_DESC= LDAP maps +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 @@ -121,6 +135,8 @@ CDB_LIB_DEPENDS= libcdb.so:databases/tinycdb EAI_LIB_DEPENDS= libicuuc.so:devel/icu LDAP_USES= ldap LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb +MONGO_LIB_DEPENDS= libbson-1.0.so:devel/libbson \ + libmongoc-1.0.so:devel/mongo-c-driver MYSQL_USES?= mysql PCRE2_LIB_DEPENDS= libpcre2-8.so:devel/pcre2 PGSQL_USES= pgsql @@ -275,6 +291,13 @@ IGNORE= blacklistd is only supported on FreeBSD . endif .endif +.if ${PORT_OPTIONS:MMONGO} +DYN_EXT+= mongodb +POSTFIX_CCARGS+= -DHAS_MONGODB -I${LOCALBASE}/include/libmongoc-1.0 \ + -I${LOCALBASE}/include/libbson-1.0 +POSTFIX_DYN_AUXLIBS+= "AUXLIBS_MONGODB=-L${LOCALBASE}/lib -lmongoc-1.0 -lbson-1.0" +.endif + .if ${PORT_OPTIONS:MMYSQL} DYN_EXT+= mysql POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql diff --git a/mail/postfix/distinfo b/mail/postfix/distinfo index fe806b59e6581..26dd38cfdb146 100644 --- a/mail/postfix/distinfo +++ b/mail/postfix/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1705933103 -SHA256 (postfix/postfix-3.8.5.tar.gz) = f3e827a2b2e410359ad25d31341970434ab07e36139f9a2ef93981b0ec564c85 -SIZE (postfix/postfix-3.8.5.tar.gz) = 4871284 +TIMESTAMP = 1711054433 +SHA256 (postfix/postfix-3.9.0.tar.gz) = 56f5e420e7c25455a4e96c19b672f80f9a0a35fb5becc9247c9e3d5dcc617f34 +SIZE (postfix/postfix-3.9.0.tar.gz) = 4953133 diff --git a/mail/postfix/files/extra-patch-blacklistd b/mail/postfix/files/extra-patch-blacklistd index 2b2bc712e667b..699d7b8905787 100644 --- a/mail/postfix/files/extra-patch-blacklistd +++ b/mail/postfix/files/extra-patch-blacklistd @@ -1,8 +1,6 @@ -# PR 225664: support blacklistd on FreeBSD >= 11.0 -# ---- src/smtpd/Makefile.in.orig 2021-04-18 20:45:05 UTC +--- src/smtpd/Makefile.in.orig 2024-02-29 20:13:17 UTC +++ src/smtpd/Makefile.in -@@ -2,14 +2,14 @@ SHELL = /bin/sh +@@ -2,14 +2,14 @@ SRCS = smtpd.c smtpd_token.c smtpd_check.c smtpd_chat. SRCS = smtpd.c smtpd_token.c smtpd_check.c smtpd_chat.c smtpd_state.c \ smtpd_peer.c smtpd_sasl_proto.c smtpd_sasl_glue.c smtpd_proxy.c \ smtpd_xforward.c smtpd_dsn_fix.c smtpd_milter.c smtpd_resolve.c \ @@ -20,32 +18,7 @@ TESTSRC = smtpd_token_test.c DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) CFLAGS = $(DEBUG) $(OPT) $(DEFS) ---- src/smtpd/smtpd_sasl_glue.c.orig 2020-08-30 21:03:46 UTC -+++ src/smtpd/smtpd_sasl_glue.c -@@ -149,6 +149,7 @@ - #include "smtpd.h" - #include "smtpd_sasl_glue.h" - #include "smtpd_chat.h" -+#include "pfilter.h" /* for blacklistd(8) */ - - #ifdef USE_SASL_AUTH - -@@ -350,6 +351,10 @@ int smtpd_sasl_authenticate(SMTPD_STATE *state, - else - smtpd_chat_reply(state, "535 5.7.8 Error: authentication failed: %s", - STR(state->sasl_reply)); -+ -+ -+ /* notify blacklistd of SASL authentication failure */ -+ pfilter_notify(1, vstream_fileno(state->client)); - return (-1); - } - /* RFC 4954 Section 6. */ ---- src/smtpd/pfilter.h.orig 2021-05-06 19:00:00 UTC -+++ src/smtpd/pfilter.h -@@ -0,0 +1 @@ -+void pfilter_notify(int, int); ---- src/smtpd/pfilter.c.orig 2021-05-06 19:00:00 UTC +--- src/smtpd/pfilter.c.orig 2024-03-21 21:45:18 UTC +++ src/smtpd/pfilter.c @@ -0,0 +1,19 @@ +#include "pfilter.h" @@ -67,3 +40,30 @@ + blstate = NULL; + } +} +--- src/smtpd/pfilter.h.orig 2024-03-21 21:45:18 UTC ++++ src/smtpd/pfilter.h +@@ -0,0 +1 @@ ++void pfilter_notify(int, int); +--- src/smtpd/smtpd_sasl_glue.c.orig 2023-11-12 21:41:13 UTC ++++ src/smtpd/smtpd_sasl_glue.c +@@ -153,6 +153,7 @@ + #include "smtpd.h" + #include "smtpd_sasl_glue.h" + #include "smtpd_chat.h" ++#include "pfilter.h" /* for blacklistd(8) */ + + #ifdef USE_SASL_AUTH + +@@ -358,8 +359,12 @@ int smtpd_sasl_authenticate(SMTPD_STATE *state, + else + smtpd_chat_reply(state, "535 5.7.8 Error: authentication failed: %s", + reason); ++ ++ /* notify blacklistd of SASL authentication failure */ ++ pfilter_notify(1, vstream_fileno(state->client)); + return (-1); + } ++ + /* RFC 4954 Section 6. */ + smtpd_chat_reply(state, "235 2.7.0 Authentication successful"); + if ((sasl_username = xsasl_server_get_username(state->sasl_server)) == 0) diff --git a/mail/postfix/pkg-plist b/mail/postfix/pkg-plist index 0bc26f8b07fb8..09838ec67fbf4 100644 --- a/mail/postfix/pkg-plist +++ b/mail/postfix/pkg-plist @@ -119,6 +119,7 @@ share/man/man5/ldap_table.5.gz share/man/man5/lmdb_table.5.gz share/man/man5/master.5.gz share/man/man5/memcache_table.5.gz +%%MONGO%%share/man/man5/mongodb_table.5.gz share/man/man5/mysql_table.5.gz share/man/man5/nisplus_table.5.gz share/man/man5/pcre_table.5.gz