Skip to content

Commit

Permalink
mail/postfix: Update to 3.9.0
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
jurajlutter committed Mar 21, 2024
1 parent 44425a4 commit 05e8277
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 41 deletions.
39 changes: 31 additions & 8 deletions mail/postfix/Makefile
@@ -1,5 +1,5 @@
PORTNAME= postfix
DISTVERSION= 3.8.5
DISTVERSION= 3.9.0
PORTREVISION?= 0
PORTEPOCH= 1
CATEGORIES= mail
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions 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
60 changes: 30 additions & 30 deletions 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 \
Expand All @@ -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"
Expand All @@ -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)
1 change: 1 addition & 0 deletions mail/postfix/pkg-plist
Expand Up @@ -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
Expand Down

0 comments on commit 05e8277

Please sign in to comment.