diff options
author | Olli Hauer <ohauer@FreeBSD.org> | 2018-02-25 15:27:30 +0000 |
---|---|---|
committer | Olli Hauer <ohauer@FreeBSD.org> | 2018-02-25 15:27:30 +0000 |
commit | de0cd10fe2df46eaebd18405a6924031137aaa54 (patch) | |
tree | 91416ef9358e0006972f2d724afc0a841aaab3c8 /mail/postfix/files | |
parent | Update gemspec patch for ruby-gems 2.7.6 update (r462122) (diff) |
- update to 3.3.0
- add patch for MySQL 8.x [1}
- add blacklistd support [2]
additional:
- regenerate patch for src/util/sys_defs.h
Release Notes:
ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-3.3.0.RELEASE_NOTES
PR: 220224 [1], 225664 [2]
Submitted by: Klaus Mayr [1], Koichiro IWAO [2]
Notes
Notes:
svn path=/head/; revision=462959
Diffstat (limited to 'mail/postfix/files')
-rw-r--r-- | mail/postfix/files/extra-patch-blacklistd | 69 | ||||
-rw-r--r-- | mail/postfix/files/patch-src_global_dict__mysql.c | 22 | ||||
-rw-r--r-- | mail/postfix/files/patch-src_util_sys__defs.h (renamed from mail/postfix/files/patch-src__util__sys_defs.h) | 4 |
3 files changed, 93 insertions, 2 deletions
diff --git a/mail/postfix/files/extra-patch-blacklistd b/mail/postfix/files/extra-patch-blacklistd new file mode 100644 index 000000000000..a9448d978c7d --- /dev/null +++ b/mail/postfix/files/extra-patch-blacklistd @@ -0,0 +1,69 @@ +# PR 225664: support blacklistd on FreeBSD >= 11.0 +# +--- src/smtpd/Makefile.in.orig 2017-02-05 23:36:32 UTC ++++ src/smtpd/Makefile.in +@@ -2,14 +2,14 @@ SHELL = /bin/sh + 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 \ +- smtpd_expand.c smtpd_haproxy.c ++ smtpd_expand.c smtpd_haproxy.c pfilter.c + OBJS = smtpd.o smtpd_token.o smtpd_check.o smtpd_chat.o smtpd_state.o \ + smtpd_peer.o smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o \ + smtpd_xforward.o smtpd_dsn_fix.o smtpd_milter.o smtpd_resolve.o \ +- smtpd_expand.o smtpd_haproxy.o ++ smtpd_expand.o smtpd_haproxy.o pfilter.o + HDRS = smtpd_token.h smtpd_check.h smtpd_chat.h smtpd_sasl_proto.h \ + smtpd_sasl_glue.h smtpd_proxy.h smtpd_dsn_fix.h smtpd_milter.h \ +- smtpd_resolve.h smtpd_expand.h ++ smtpd_resolve.h smtpd_expand.h pfilter.h + TESTSRC = smtpd_token_test.c + DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) + CFLAGS = $(DEBUG) $(OPT) $(DEFS) +--- src/smtpd/smtpd_sasl_glue.c.orig 2017-02-19 01:58:21 UTC ++++ src/smtpd/smtpd_sasl_glue.c +@@ -147,6 +147,7 @@ + #include "smtpd.h" + #include "smtpd_sasl_glue.h" + #include "smtpd_chat.h" ++#include "pfilter.h" /* for blacklistd(8) */ + + #ifdef USE_SASL_AUTH + +@@ -332,6 +333,10 @@ int smtpd_sasl_authenticate(SMTPD_ST + 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 2018-02-04 15:36:49 UTC ++++ src/smtpd/pfilter.h +@@ -0,0 +1 @@ ++void pfilter_notify(int, int); +--- src/smtpd/pfilter.c.orig 2018-02-04 15:36:49 UTC ++++ src/smtpd/pfilter.c +@@ -0,0 +1,19 @@ ++#include "pfilter.h" ++#include <stdio.h> /* for NULL */ ++#include <blacklist.h> ++ ++static struct blacklist *blstate; ++ ++void ++pfilter_notify(int a, int fd) ++{ ++ if (blstate == NULL) ++ blstate = blacklist_open(); ++ if (blstate == NULL) ++ return; ++ (void)blacklist_r(blstate, a, fd, "smtpd"); ++ if (a == 0) { ++ blacklist_close(blstate); ++ blstate = NULL; ++ } ++} diff --git a/mail/postfix/files/patch-src_global_dict__mysql.c b/mail/postfix/files/patch-src_global_dict__mysql.c new file mode 100644 index 000000000000..c33b3a403f78 --- /dev/null +++ b/mail/postfix/files/patch-src_global_dict__mysql.c @@ -0,0 +1,22 @@ +# PR: 220224 fix build against mysql 8.x +# +# from https://dev.mysql.com/doc/refman/5.7/en/mysql-options.html +# o MYSQL_OPT_SSL_VERIFY_SERVER_CERT (argument type: my_bool *) +# This option is deprecated as of MySQL 5.7.11 and is removed in MySQL 8.0. +# Instead, use MYSQL_OPT_SSL_MODE with a value of SSL_MODE_VERIFY_IDENTITY. +# +--- src/global/dict_mysql.c.orig 2017-02-19 01:58:20 UTC ++++ src/global/dict_mysql.c +@@ -656,7 +656,11 @@ static void plmysql_connect_single(DICT_ + dict_mysql->tls_key_file, dict_mysql->tls_cert_file, + dict_mysql->tls_CAfile, dict_mysql->tls_CApath, + dict_mysql->tls_ciphers); +-#if MYSQL_VERSION_ID >= 50023 ++#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_VERSION_ID) ++ if (dict_mysql->tls_verify_cert != -1) ++ mysql_options(host->db, MYSQL_OPT_SSL_MODE, ++ &dict_mysql->tls_verify_cert); ++#elif MYSQL_VERSION_ID >= 50023 + if (dict_mysql->tls_verify_cert != -1) + mysql_options(host->db, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + &dict_mysql->tls_verify_cert); diff --git a/mail/postfix/files/patch-src__util__sys_defs.h b/mail/postfix/files/patch-src_util_sys__defs.h index 41fbafc106ea..d1633b6c2ab0 100644 --- a/mail/postfix/files/patch-src__util__sys_defs.h +++ b/mail/postfix/files/patch-src_util_sys__defs.h @@ -1,6 +1,6 @@ ---- src/util/sys_defs.h.orig 2016-05-15 16:39:11 UTC +--- src/util/sys_defs.h.orig 2017-06-18 19:30:20 UTC +++ src/util/sys_defs.h -@@ -26,6 +26,7 @@ +@@ -30,6 +30,7 @@ #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \ || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \ |