View | Details | Raw Unified | Return to bug 225664
Collapse All | Expand All

(-)mail/postfix/distinfo (-1 / +1 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1517758440
1
TIMESTAMP = 1518582346
2
SHA256 (postfix/postfix-3.3.0-RC1.tar.gz) = 8bf16bee213bb5de95cbcab30479f3fd1c7fd2940fd9b4e63a1a6104c1fe3658
2
SHA256 (postfix/postfix-3.3.0-RC1.tar.gz) = 8bf16bee213bb5de95cbcab30479f3fd1c7fd2940fd9b4e63a1a6104c1fe3658
3
SIZE (postfix/postfix-3.3.0-RC1.tar.gz) = 4418769
3
SIZE (postfix/postfix-3.3.0-RC1.tar.gz) = 4418769
(-)mail/postfix/files/extra-patch-blacklistd (+67 lines)
Line 0 Link Here
1
--- src/smtpd/Makefile.in.orig	2017-02-05 23:36:32 UTC
2
+++ src/smtpd/Makefile.in
3
@@ -2,14 +2,14 @@ SHELL	= /bin/sh
4
 SRCS	= smtpd.c smtpd_token.c smtpd_check.c smtpd_chat.c smtpd_state.c \
5
 	smtpd_peer.c smtpd_sasl_proto.c smtpd_sasl_glue.c smtpd_proxy.c \
6
 	smtpd_xforward.c smtpd_dsn_fix.c smtpd_milter.c smtpd_resolve.c \
7
-	smtpd_expand.c smtpd_haproxy.c
8
+	smtpd_expand.c smtpd_haproxy.c pfilter.c
9
 OBJS	= smtpd.o smtpd_token.o smtpd_check.o smtpd_chat.o smtpd_state.o \
10
 	smtpd_peer.o smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o \
11
 	smtpd_xforward.o smtpd_dsn_fix.o smtpd_milter.o smtpd_resolve.o \
12
-	smtpd_expand.o smtpd_haproxy.o
13
+	smtpd_expand.o smtpd_haproxy.o pfilter.o
14
 HDRS	= smtpd_token.h smtpd_check.h smtpd_chat.h smtpd_sasl_proto.h \
15
 	smtpd_sasl_glue.h smtpd_proxy.h smtpd_dsn_fix.h smtpd_milter.h \
16
-	smtpd_resolve.h smtpd_expand.h
17
+	smtpd_resolve.h smtpd_expand.h  pfilter.h
18
 TESTSRC	= smtpd_token_test.c
19
 DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
20
 CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
21
--- src/smtpd/pfilter.c.orig	2018-02-14 04:29:19 UTC
22
+++ src/smtpd/pfilter.c
23
@@ -0,0 +1,19 @@
24
+#include "pfilter.h"
25
+#include <stdio.h>	/* for NULL */
26
+#include <blacklist.h>
27
+
28
+static struct blacklist *blstate;
29
+
30
+void
31
+pfilter_notify(int a, int fd)
32
+{
33
+	if (blstate == NULL)
34
+		blstate = blacklist_open();
35
+	if (blstate == NULL)
36
+		return;
37
+	(void)blacklist_r(blstate, a, fd, "smtpd");
38
+	if (a == 0) {
39
+		blacklist_close(blstate);
40
+		blstate = NULL;
41
+	}
42
+}
43
--- src/smtpd/pfilter.h.orig	2018-02-14 04:29:19 UTC
44
+++ src/smtpd/pfilter.h
45
@@ -0,0 +1 @@
46
+void pfilter_notify(int, int);
47
--- src/smtpd/smtpd_sasl_glue.c.orig	2017-02-19 01:58:21 UTC
48
+++ src/smtpd/smtpd_sasl_glue.c
49
@@ -147,6 +147,7 @@
50
 #include "smtpd.h"
51
 #include "smtpd_sasl_glue.h"
52
 #include "smtpd_chat.h"
53
+#include "pfilter.h" /* for blacklistd(8) */
54
 
55
 #ifdef USE_SASL_AUTH
56
 
57
@@ -332,6 +333,10 @@ int     smtpd_sasl_authenticate(SMTPD_ST
58
 	else
59
 	    smtpd_chat_reply(state, "535 5.7.8 Error: authentication failed: %s",
60
 			     STR(state->sasl_reply));
61
+
62
+
63
+	/* notify blacklistd of SASL authentication failure */
64
+	pfilter_notify(1, vstream_fileno(state->client));
65
 	return (-1);
66
     }
67
     /* RFC 4954 Section 6. */
(-)mail/postfix/files/patch-makedefs (-2 / +2 lines)
Lines 1-6 Link Here
1
--- makedefs.orig	2016-05-15 16:39:11 UTC
1
--- makedefs.orig	2018-02-03 17:20:46 UTC
2
+++ makedefs
2
+++ makedefs
3
@@ -272,6 +272,24 @@ case "$SYSTEM.$RELEASE" in
3
@@ -287,6 +287,24 @@ case "$SYSTEM.$RELEASE" in
4
 		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
4
 		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
5
 		: ${PLUGIN_LD="${CC} -shared"}
5
 		: ${PLUGIN_LD="${CC} -shared"}
6
 		;;
6
 		;;
(-)mail/postfix/files/patch-src__util__sys_defs.h (-2 / +2 lines)
Lines 1-6 Link Here
1
--- src/util/sys_defs.h.orig	2016-05-15 16:39:11 UTC
1
--- src/util/sys_defs.h.orig	2017-06-18 19:30:20 UTC
2
+++ src/util/sys_defs.h
2
+++ src/util/sys_defs.h
3
@@ -26,6 +26,7 @@
3
@@ -30,6 +30,7 @@
4
 #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
4
 #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
5
     || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
5
     || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
6
     || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
6
     || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
(-)mail/postfix/files/patch-src_posttls-finger_posttls-finger.c (-3 / +3 lines)
Lines 1-6 Link Here
1
--- src/posttls-finger/posttls-finger.c.orig	2016-08-27 20:27:50 UTC
1
--- src/posttls-finger/posttls-finger.c.orig	2017-02-03 22:43:04 UTC
2
+++ src/posttls-finger/posttls-finger.c
2
+++ src/posttls-finger/posttls-finger.c
3
@@ -1511,7 +1511,8 @@ static int finger(STATE *state)
3
@@ -1513,7 +1513,8 @@ static int finger(STATE *state)
4
     return (0);
4
     return (0);
5
 }
5
 }
6
 
6
 
Lines 10-16 Link Here
10
 
10
 
11
 /* ssl_cleanup - free memory allocated in the OpenSSL library */
11
 /* ssl_cleanup - free memory allocated in the OpenSSL library */
12
 
12
 
13
@@ -1958,7 +1959,8 @@ int     main(int argc, char *argv[])
13
@@ -1966,7 +1967,8 @@ int     main(int argc, char *argv[])
14
     cleanup(&state);
14
     cleanup(&state);
15
 
15
 
16
     /* OpenSSL 1.1.0 and later (de)initialization is implicit */
16
     /* OpenSSL 1.1.0 and later (de)initialization is implicit */
(-)mail/postfix/files/patch-src_smtpd_Makefile.in (+20 lines)
Line 0 Link Here
1
--- src/smtpd/Makefile.in.orig	2017-02-05 23:36:32 UTC
2
+++ src/smtpd/Makefile.in
3
@@ -2,14 +2,14 @@ SHELL	= /bin/sh
4
 SRCS	= smtpd.c smtpd_token.c smtpd_check.c smtpd_chat.c smtpd_state.c \
5
 	smtpd_peer.c smtpd_sasl_proto.c smtpd_sasl_glue.c smtpd_proxy.c \
6
 	smtpd_xforward.c smtpd_dsn_fix.c smtpd_milter.c smtpd_resolve.c \
7
-	smtpd_expand.c smtpd_haproxy.c
8
+	smtpd_expand.c smtpd_haproxy.c pfilter.c
9
 OBJS	= smtpd.o smtpd_token.o smtpd_check.o smtpd_chat.o smtpd_state.o \
10
 	smtpd_peer.o smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o \
11
 	smtpd_xforward.o smtpd_dsn_fix.o smtpd_milter.o smtpd_resolve.o \
12
-	smtpd_expand.o smtpd_haproxy.o
13
+	smtpd_expand.o smtpd_haproxy.o pfilter.o
14
 HDRS	= smtpd_token.h smtpd_check.h smtpd_chat.h smtpd_sasl_proto.h \
15
 	smtpd_sasl_glue.h smtpd_proxy.h smtpd_dsn_fix.h smtpd_milter.h \
16
-	smtpd_resolve.h smtpd_expand.h
17
+	smtpd_resolve.h smtpd_expand.h  pfilter.h
18
 TESTSRC	= smtpd_token_test.c
19
 DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
20
 CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
(-)mail/postfix/files/patch-src_smtpd_pfilter.c (+22 lines)
Line 0 Link Here
1
--- src/smtpd/pfilter.c.orig	2018-02-14 04:29:19 UTC
2
+++ src/smtpd/pfilter.c
3
@@ -0,0 +1,19 @@
4
+#include "pfilter.h"
5
+#include <stdio.h>	/* for NULL */
6
+#include <blacklist.h>
7
+
8
+static struct blacklist *blstate;
9
+
10
+void
11
+pfilter_notify(int a, int fd)
12
+{
13
+	if (blstate == NULL)
14
+		blstate = blacklist_open();
15
+	if (blstate == NULL)
16
+		return;
17
+	(void)blacklist_r(blstate, a, fd, "smtpd");
18
+	if (a == 0) {
19
+		blacklist_close(blstate);
20
+		blstate = NULL;
21
+	}
22
+}
(-)mail/postfix/files/patch-src_smtpd_pfilter.h (+4 lines)
Line 0 Link Here
1
--- src/smtpd/pfilter.h.orig	2018-02-14 04:29:19 UTC
2
+++ src/smtpd/pfilter.h
3
@@ -0,0 +1 @@
4
+void pfilter_notify(int, int);
(-)mail/postfix/files/patch-src_smtpd_smtpd__sasl__glue.c (+21 lines)
Line 0 Link Here
1
--- src/smtpd/smtpd_sasl_glue.c.orig	2017-02-19 01:58:21 UTC
2
+++ src/smtpd/smtpd_sasl_glue.c
3
@@ -147,6 +147,7 @@
4
 #include "smtpd.h"
5
 #include "smtpd_sasl_glue.h"
6
 #include "smtpd_chat.h"
7
+#include "pfilter.h" /* for blacklistd(8) */
8
 
9
 #ifdef USE_SASL_AUTH
10
 
11
@@ -332,6 +333,10 @@ int     smtpd_sasl_authenticate(SMTPD_ST
12
 	else
13
 	    smtpd_chat_reply(state, "535 5.7.8 Error: authentication failed: %s",
14
 			     STR(state->sasl_reply));
15
+
16
+
17
+	/* notify blacklistd of SASL authentication failure */
18
+	pfilter_notify(1, vstream_fileno(state->client));
19
 	return (-1);
20
     }
21
     /* RFC 4954 Section 6. */
(-)mail/postfix/files/patch-src_tls_tls__client.c (-2 / +2 lines)
Lines 1-4 Link Here
1
--- src/tls/tls_client.c.orig	2016-08-27 20:27:50 UTC
1
--- src/tls/tls_client.c.orig	2017-01-01 22:22:13 UTC
2
+++ src/tls/tls_client.c
2
+++ src/tls/tls_client.c
3
@@ -299,7 +299,7 @@ TLS_APPL_STATE *tls_client_init(const TL
3
@@ -299,7 +299,7 @@ TLS_APPL_STATE *tls_client_init(const TL
4
      */
4
      */
Lines 9-15 Link Here
9
 
9
 
10
     /*
10
     /*
11
      * Initialize the OpenSSL library by the book! To start with, we must
11
      * Initialize the OpenSSL library by the book! To start with, we must
12
@@ -441,7 +441,7 @@ TLS_APPL_STATE *tls_client_init(const TL
12
@@ -433,7 +433,7 @@ TLS_APPL_STATE *tls_client_init(const TL
13
     /*
13
     /*
14
      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
14
      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
15
      */
15
      */
(-)mail/postfix/files/patch-src_tls_tls__dane.c (-2 / +2 lines)
Lines 1-6 Link Here
1
--- src/tls/tls_dane.c.orig	2016-08-27 20:27:50 UTC
1
--- src/tls/tls_dane.c.orig	2017-12-27 21:53:13 UTC
2
+++ src/tls/tls_dane.c
2
+++ src/tls/tls_dane.c
3
@@ -2163,7 +2163,7 @@ static SSL_CTX *ctx_init(const char *CAf
3
@@ -2134,7 +2134,7 @@ static SSL_CTX *ctx_init(const char *CAf
4
     tls_param_init();
4
     tls_param_init();
5
     tls_check_version();
5
     tls_check_version();
6
 
6
 
(-)mail/postfix/files/patch-src_tls_tls__server.c (-2 / +2 lines)
Lines 1-4 Link Here
1
--- src/tls/tls_server.c.orig	2016-08-27 20:27:50 UTC
1
--- src/tls/tls_server.c.orig	2017-01-01 22:22:13 UTC
2
+++ src/tls/tls_server.c
2
+++ src/tls/tls_server.c
3
@@ -174,7 +174,7 @@ static const char server_session_id_cont
3
@@ -174,7 +174,7 @@ static const char server_session_id_cont
4
 #endif					/* OPENSSL_VERSION_NUMBER */
4
 #endif					/* OPENSSL_VERSION_NUMBER */
Lines 18-24 Link Here
18
 
18
 
19
     /*
19
     /*
20
      * Initialize the OpenSSL library by the book! To start with, we must
20
      * Initialize the OpenSSL library by the book! To start with, we must
21
@@ -588,7 +588,7 @@ TLS_APPL_STATE *tls_server_init(const TL
21
@@ -580,7 +580,7 @@ TLS_APPL_STATE *tls_server_init(const TL
22
     /*
22
     /*
23
      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
23
      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
24
      */
24
      */
(-)mail/postfix/Makefile (-2 / +8 lines)
Lines 41-54 Link Here
41
SCRIPTS_ENV+=	POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}"
41
SCRIPTS_ENV+=	POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}"
42
42
43
OPTIONS_SUB=	yes
43
OPTIONS_SUB=	yes
44
OPTIONS_DEFINE=	BDB CDB DOCS EAI INST_BASE LDAP LDAP_SASL LMDB MYSQL \
44
OPTIONS_DEFINE=	BDB BLACKLISTD CDB DOCS EAI INST_BASE LDAP LDAP_SASL \
45
		NIS PCRE PGSQL SASL SQLITE TEST TLS
45
		LMDB MYSQL NIS PCRE PGSQL SASL SQLITE TEST TLS
46
46
47
OPTIONS_RADIO=		RG1
47
OPTIONS_RADIO=		RG1
48
OPTIONS_RADIO_RG1=	SASLKRB5 SASLKMIT
48
OPTIONS_RADIO_RG1=	SASLKRB5 SASLKMIT
49
OPTIONS_DEFAULT=	EAI PCRE TLS
49
OPTIONS_DEFAULT=	EAI PCRE TLS
50
50
51
BDB_USES=		bdb
51
BDB_USES=		bdb
52
BLACKLISTD_EXTRA_PATCHES=	${FILESDIR}/extra-patch-blacklistd
52
CDB_LIB_DEPENDS=	libcdb.so:databases/tinycdb
53
CDB_LIB_DEPENDS=	libcdb.so:databases/tinycdb
53
EAI_LIB_DEPENDS=	libicuuc.so:devel/icu
54
EAI_LIB_DEPENDS=	libicuuc.so:devel/icu
54
LDAP_USE=		OPENLDAP=yes
55
LDAP_USE=		OPENLDAP=yes
Lines 61-66 Link Here
61
SQLITE_USES=		sqlite
62
SQLITE_USES=		sqlite
62
TLS_USES=		ssl
63
TLS_USES=		ssl
63
64
65
BLACKLISTD_DESC=	Enable blacklistd support
64
CDB_DESC=	CDB maps lookups
66
CDB_DESC=	CDB maps lookups
65
EAI_DESC=	Email Address Internationalization (SMTPUTF8) support
67
EAI_DESC=	Email Address Internationalization (SMTPUTF8) support
66
INST_BASE_DESC=	Install into /usr and /etc/postfix
68
INST_BASE_DESC=	Install into /usr and /etc/postfix
Lines 191-196 Link Here
191
POSTFIX_CCARGS+=	-DNO_TLS
193
POSTFIX_CCARGS+=	-DNO_TLS
192
.endif
194
.endif
193
195
196
.if ${PORT_OPTIONS:MBLACKLISTD}
197
POSTFIX_AUXLIBS+=	-lblacklist
198
.endif
199
194
.if ${PORT_OPTIONS:MBDB}
200
.if ${PORT_OPTIONS:MBDB}
195
POSTFIX_CCARGS+=	-I${BDB_INCLUDE_DIR}
201
POSTFIX_CCARGS+=	-I${BDB_INCLUDE_DIR}
196
POSTFIX_AUXLIBS+=	-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}
202
POSTFIX_AUXLIBS+=	-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}

Return to bug 225664