View | Details | Raw Unified | Return to bug 255809 | Differences between
and this patch

Collapse All | Expand All

(-)b/mail/postfix35/Makefile (-91 / +113 lines)
Lines 15-85 MASTER_SITES:= ${MASTER_SITES:S|$|official/|} Link Here
15
DIST_SUBDIR=	${PORTNAME}
15
DIST_SUBDIR=	${PORTNAME}
16
16
17
MAINTAINER=	otis@FreeBSD.org
17
MAINTAINER=	otis@FreeBSD.org
18
COMMENT=	Secure alternative to widely-used Sendmail
18
COMMENT=	Secure alternative to widely-used Sendmaill ${COMMENT_${FLAVOR}}
19
19
20
LICENSE=	EPL IPL10
20
LICENSE=	EPL IPL10
21
LICENSE_COMB=	multi
21
LICENSE_COMB=	multi
22
LICENSE_FILE=	${WRKSRC}/LICENSE
23
LICENSE_NAME_IPL10=	IBM PUBLIC LICENSE VERSION 1.0
22
LICENSE_NAME_IPL10=	IBM PUBLIC LICENSE VERSION 1.0
23
LICENSE_FILE=	${WRKSRC}/LICENSE
24
LICENSE_PERMS_IPL10=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
24
LICENSE_PERMS_IPL10=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
25
25
26
DEPRECATED=	It is only here until FreeBSD 11 is EoL (Postfix >= 3.6 requires OpenSSL >= 1.1.x)
26
DEPRECATED=	It is only here until FreeBSD 11 is EoL (Postfix >= 3.6 requires OpenSSL >= 1.1.x)
27
EXPIRATION_DATE=2021-09-30
27
EXPIRATION_DATE=	2021-09-30
28
28
29
PORTSCOUT=	limit:^3\.5\.
29
FLAVORS=			default ldap_sasl sasl
30
30
default_PKGNAMESUFFIX=		35
31
CONFLICTS_INSTALL?=	courier-0.* opensmtpd-[0-9]* sendmail-8.* sendmail+*-8.* \
31
default_CONFLICTS_INSTALL=	courier-0.* opensmtpd-[0-9]* opensmtpd-devel-* \
32
		postfix-* postfix-current-*
32
				postfix-[0-9]* postfix-base-* postfix-current-* \
33
				postfix35-ldap-sasl-* postfix35-sasl-* \
34
				sendmail-[0-9]* sendmail-devel-*
35
ldap_sasl_PKGNAMESUFFIX=	35-ldap-sasl
36
ldap_sasl_CONFLICTS_INSTALL=	courier-0.* opensmtpd-[0-9]* opensmtpd-devel-* \
37
				postfix-[0-9]* postfix-base-* postfix-current-* \
38
				postfix35-[0-9] postfix35-sasl-* \
39
				sendmail-[0-9]* sendmail-devel-*
40
sasl_PKGNAMESUFFIX=		35-sasl
41
sasl_CONFLICTS_INSTALL=		courier-0.* opensmtpd-[0-9]* opensmtpd-devel-* \
42
				postfix-[0-9]* postfix-base-* postfix-current-* \
43
				postfix35-[0-9] postfix35-ldap-sasl-* \
44
				sendmail-[0-9]* sendmail-devel-*
45
46
COMMENT_ldap-sasl=	(with OpenLDAP and Cyrus SASL support)
47
COMMENT_sasl=		(with Cyrus SASL support)
48
49
USES=		cpe shebangfix
50
USE_RC_SUBR=	postfix
51
USE_SUBMAKE=	yes
33
52
34
USERS=		postfix
35
GROUPS=		mail maildrop postfix
36
USES=		shebangfix cpe
37
SHEBANG_FILES=	auxiliary/qshape/qshape.pl
53
SHEBANG_FILES=	auxiliary/qshape/qshape.pl
38
54
39
USE_RC_SUBR=	postfix
40
USE_SUBMAKE=	yes
41
SCRIPTS_ENV+=	POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}"
55
SCRIPTS_ENV+=	POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}"
42
56
43
OPTIONS_SUB=	yes
57
CONFLICTS_INSTALL?=	courier-0.* opensmtpd-[0-9]* postfix-* \
44
OPTIONS_DEFINE=	BDB BLACKLISTD CDB DOCS EAI INST_BASE LDAP LDAP_SASL \
58
			postfix-current-* sendmail+*-8.* sendmail-8.*
45
		LMDB MYSQL NIS PCRE PGSQL SASL SQLITE TEST TLS
46
59
47
OPTIONS_RADIO=		RG1
60
PORTSCOUT=	limit:^3\.5\.
48
OPTIONS_RADIO_RG1=	SASLKRB5 SASLKMIT
49
OPTIONS_DEFAULT?=	BLACKLISTD EAI PCRE TLS
50
61
51
BDB_USES=		bdb
62
USERS=		postfix
52
BLACKLISTD_EXTRA_PATCHES=	${FILESDIR}/extra-patch-blacklistd
63
GROUPS=		mail maildrop postfix
53
CDB_LIB_DEPENDS=	libcdb.so:databases/tinycdb
64
54
EAI_LIB_DEPENDS=	libicuuc.so:devel/icu
65
OPTIONS_DEFINE=		BDB BLACKLISTD CDB DOCS EAI INST_BASE LDAP LDAP_SASL \
55
LDAP_USE=		OPENLDAP=yes
66
			LMDB MYSQL NIS PCRE PGSQL SASL SQLITE TEST TLS
56
LMDB_LIB_DEPENDS=	liblmdb.so:databases/lmdb
67
OPTIONS_DEFAULT?=	BLACKLISTD EAI PCRE TLS
57
MYSQL_USES?=		mysql
68
OPTIONS_RADIO=		RG1
58
PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
69
OPTIONS_RADIO_RG1=	SASLKMIT SASLKRB5
59
PGSQL_USES=		pgsql
70
.if ${FLAVOR:U} == ldap_sasl
60
SASLKMIT_LIB_DEPENDS=	libkrb5.so:security/krb5
71
OPTIONS_SLAVE=		LDAP LDAP_SASL SASL
61
SASL_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
72
.elif ${FLAVOR:U} == sasl
62
SQLITE_USES=		sqlite
73
OPTIONS_SLAVE=		SASL
63
TLS_USES=		ssl
74
.endif
75
OPTIONS_SUB=		yes
64
76
65
BLACKLISTD_DESC=	Enable blacklistd support (FreeBSD 11.0 and later only)
77
BLACKLISTD_DESC=	Enable blacklistd support (FreeBSD 11.0 and later only)
66
CDB_DESC=	CDB maps lookups
78
CDB_DESC=		CDB maps lookups
67
EAI_DESC=	Email Address Internationalization (SMTPUTF8) support
79
EAI_DESC=		Email Address Internationalization (SMTPUTF8) support
68
INST_BASE_DESC=	Install into /usr and /etc/postfix
80
INST_BASE_DESC=		Install into /usr and /etc/postfix
69
LDAP_DESC=	LDAP maps (uses WITH_OPENLDAP_VER)
81
LDAP_DESC=		LDAP maps (uses WITH_OPENLDAP_VER)
70
LDAP_SASL_DESC=	LDAP client-to-server SASL auth
82
LDAP_SASL_DESC=		LDAP client-to-server SASL auth
71
LMDB_DESC=	LMDB maps
83
LMDB_DESC=		LMDB maps
72
TEST_DESC=	SMTP/LMTP test server and generator
84
RG1_DESC=		Kerberos network authentication protocol type
73
85
SASLKMIT_DESC=		If your SASL req. MIT Kerberos5, select this
74
SASL_DESC=	Cyrus SASL support (Dovecot SASL is always built in)
86
SASLKRB5_DESC=		If your SASL req. Kerberos5, select this
75
RG1_DESC=	Kerberos network authentication protocol type
87
SASL_DESC=		Cyrus SASL support (Dovecot SASL is always built in)
76
SASLKRB5_DESC=	If your SASL req. Kerberos5, select this
88
TEST_DESC=		SMTP/LMTP test server and generator
77
SASLKMIT_DESC=	If your SASL req. MIT Kerberos5, select this
89
90
BDB_USES=			bdb
91
BLACKLISTD_EXTRA_PATCHES=	${FILESDIR}/extra-patch-blacklistd
92
CDB_LIB_DEPENDS=		libcdb.so:databases/tinycdb
93
EAI_LIB_DEPENDS=		libicuuc.so:devel/icu
94
LDAP_USE=			OPENLDAP=yes
95
LMDB_LIB_DEPENDS=		liblmdb.so:databases/lmdb
96
MYSQL_USES?=			mysql
97
PCRE_LIB_DEPENDS=		libpcre.so:devel/pcre
98
PGSQL_USES=			pgsql
99
SASLKMIT_LIB_DEPENDS=		libkrb5.so:security/krb5
100
SASL_LIB_DEPENDS=		libsasl2.so:security/cyrus-sasl2
101
SQLITE_USES=			sqlite
102
TLS_USES=			ssl
78
103
79
.include <bsd.port.options.mk>
104
.include <bsd.port.options.mk>
80
105
81
HTML1=	body_checks.5.html bounce.5.html postfix-power.png \
106
HTML1=		body_checks.5.html bounce.5.html postfix-power.png \
82
	scache.8.html tlsmgr.8.html
107
		scache.8.html tlsmgr.8.html
83
108
84
STRIP_LIBEXEC=	anvil bounce cleanup discard dnsblog error flush lmtp local \
109
STRIP_LIBEXEC=	anvil bounce cleanup discard dnsblog error flush lmtp local \
85
		master nqmgr oqmgr pickup pipe postlogd postscreen proxymap \
110
		master nqmgr oqmgr pickup pipe postlogd postscreen proxymap \
Lines 93-99 MAKEFILEFLAGS+= DEBUG= Link Here
93
MAKEFILEFLAGS+=	pie=yes CC="${CC}" OPT="${CFLAGS}"
118
MAKEFILEFLAGS+=	pie=yes CC="${CC}" OPT="${CFLAGS}"
94
119
95
.if ${PORT_OPTIONS:MINST_BASE}
120
.if ${PORT_OPTIONS:MINST_BASE}
121
.if ${FLAVOR:U} == ldap_sasl
122
PKGNAMESUFFIX=	35-base-ldap-sasl
123
.elif ${FLAVOR:U} == sasl
124
PKGNAMESUFFIX=	35-base-sasl
125
.else
96
PKGNAMESUFFIX=	35-base
126
PKGNAMESUFFIX=	35-base
127
.endif
97
PREFIX=		/usr
128
PREFIX=		/usr
98
ETCDIR=		/etc/postfix
129
ETCDIR=		/etc/postfix
99
PLIST_SUB+=	BMAN="share/"
130
PLIST_SUB+=	BMAN="share/"
Lines 106-114 PLIST_SUB+= PFETC=${ETCDIR} Link Here
106
137
107
# check if mailwrapper supports $LOCALBASE
138
# check if mailwrapper supports $LOCALBASE
108
.if ${OPSYS} == FreeBSD
139
.if ${OPSYS} == FreeBSD
109
SUB_LIST+=	USE_LOCALBASE_MAILER_CONF="yes" MC_PREFIX="${LOCALBASE}"
140
SUB_LIST+=	MC_PREFIX="${LOCALBASE}" \
141
		USE_LOCALBASE_MAILER_CONF="yes"
110
.else
142
.else
111
SUB_LIST+=	USE_LOCALBASE_MAILER_CONF="no" MC_PREFIX=""
143
SUB_LIST+=	MC_PREFIX="" \
144
		USE_LOCALBASE_MAILER_CONF="no"
112
.endif
145
.endif
113
146
114
.if ${PORT_OPTIONS:MDOCS}
147
.if ${PORT_OPTIONS:MDOCS}
Lines 119-152 READMEDIR= no Link Here
119
.endif
152
.endif
120
153
121
# dynamic direcory location
154
# dynamic direcory location
122
DAEMONDIR=	${PREFIX}/libexec/postfix
155
DAEMONDIR=		${PREFIX}/libexec/postfix
123
SHLIB_DIRECTORY=${PREFIX}/lib/postfix
156
SHLIB_DIRECTORY=	${PREFIX}/lib/postfix
124
# new proposed location is ETCDIR (see README_FILES/INSTALL)
157
# new proposed location is ETCDIR (see README_FILES/INSTALL)
125
# keep compatiblity with Postfix 2.6 .. 2.11 and use DAEMOMDIR
158
# keep compatiblity with Postfix 2.6 .. 2.11 and use DAEMOMDIR
126
META_DIRECTORY=	${DAEMONDIR}
159
META_DIRECTORY=		${DAEMONDIR}
127
160
128
SUB_LIST+=	REQUIRE="${_REQUIRE}" READMEDIR="${READMEDIR}" \
161
SUB_LIST+=	DAEMONDIR="${DAEMONDIR}" \
129
		DAEMONDIR="${DAEMONDIR}" META_DIRECTORY="${META_DIRECTORY}"
162
		META_DIRECTORY="${META_DIRECTORY}" \
130
SUB_FILES+=	pkg-install pkg-message mailer.conf.postfix
163
		READMEDIR="${READMEDIR}" \
131
164
		REQUIRE="${_REQUIRE}"
132
POSTFIX_CCARGS+=	-DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
165
SUB_FILES+=	mailer.conf.postfix pkg-install pkg-message
133
			-DDEF_DAEMON_DIR=\\\"${DAEMONDIR}\\\" \
166
134
			-DDEF_META_DIR=\\\"${META_DIRECTORY}\\\" \
167
POSTFIX_CCARGS+=	-DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" -DDEF_DAEMON_DIR=\\\"${DAEMONDIR}\\\" -DDEF_META_DIR=\\\"${META_DIRECTORY}\\\" -DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" -DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" -DDEF_NEWALIAS_PATH=\\\"${PREFIX}/bin/newaliases\\\" -DDEF_MAILQ_PATH=\\\"${PREFIX}/bin/mailq\\\" -DDEF_MANPAGE_DIR=\\\"${MANPREFIX}/man\\\" -DDEF_README_DIR=\\\"${READMEDIR}\\\" -DDEF_HTML_DIR=\\\"${READMEDIR}\\\" -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\" -DDEF_DATA_DIR=\\\"/var/db/postfix\\\" -DDEF_MAIL_OWNER=\\\"postfix\\\" -DDEF_SGID_GROUP=\\\"maildrop\\\" -Wmissing-prototypes -Wformat -Wno-comment
135
			-DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \
136
			-DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \
137
			-DDEF_NEWALIAS_PATH=\\\"${PREFIX}/bin/newaliases\\\" \
138
			-DDEF_MAILQ_PATH=\\\"${PREFIX}/bin/mailq\\\" \
139
			-DDEF_MANPAGE_DIR=\\\"${MANPREFIX}/man\\\" \
140
			-DDEF_README_DIR=\\\"${READMEDIR}\\\" \
141
			-DDEF_HTML_DIR=\\\"${READMEDIR}\\\" \
142
			-DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\" \
143
			-DDEF_DATA_DIR=\\\"/var/db/postfix\\\" \
144
			-DDEF_MAIL_OWNER=\\\"postfix\\\" \
145
			-DDEF_SGID_GROUP=\\\"maildrop\\\" \
146
			-Wmissing-prototypes -Wformat -Wno-comment
147
168
148
# Default requirement for postfix rc script
169
# Default requirement for postfix rc script
149
_REQUIRE=		LOGIN cleanvar dovecot
170
_REQUIRE=	LOGIN cleanvar dovecot
150
171
151
# always build with Dovecot SASL support, Cyrus is optional
172
# always build with Dovecot SASL support, Cyrus is optional
152
# see Postfix HISTORY 20051222
173
# see Postfix HISTORY 20051222
Lines 169-186 POSTFIX_CCARGS+= -DNO_PCRE Link Here
169
.endif
190
.endif
170
191
171
.if ${PORT_OPTIONS:MSASL}
192
.if ${PORT_OPTIONS:MSASL}
172
POSTFIX_CCARGS+=	-DUSE_CYRUS_SASL -I${LOCALBASE}/include -I${LOCALBASE}/include/sasl
193
POSTFIX_CCARGS+=	-DUSE_CYRUS_SASL -I${LOCALBASE}/include \
194
			-I${LOCALBASE}/include/sasl
173
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -lsasl2 -lpam -lcrypt
195
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -lsasl2 -lpam -lcrypt
174
.else
196
.else
175
POSTFIX_CCARGS+=	-DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"
197
POSTFIX_CCARGS+=	-DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"
176
.endif
198
.endif
177
199
178
.if ${PORT_OPTIONS:MSASLKRB5}
200
.if ${PORT_OPTIONS:MSASLKRB5}
179
POSTFIX_AUXLIBS+=	-lkrb5 -lhx509 -lcrypto -lcrypt -lcom_err -lasn1 -lroken
201
POSTFIX_AUXLIBS+=	-lkrb5 -lhx509 -lcrypto -lcrypt -lcom_err -lasn1 \
202
			-lroken
180
.endif
203
.endif
181
204
182
.if ${PORT_OPTIONS:MSASLKMIT}
205
.if ${PORT_OPTIONS:MSASLKMIT}
183
POSTFIX_AUXLIBS+=	-Wl,--rpath,$${KRB5_HOME:-${LOCALBASE}}/lib -lkrb5 -lcrypto -lcrypt -lcom_err
206
POSTFIX_AUXLIBS+=	-Wl,--rpath,$${KRB5_HOME:-${LOCALBASE}}/lib -lkrb5 \
207
			-lcrypto -lcrypt -lcom_err
184
.endif
208
.endif
185
209
186
.if ${PORT_OPTIONS:MTLS}
210
.if ${PORT_OPTIONS:MTLS}
Lines 200-206 POSTFIX_AUXLIBS+= -L${BDB_LIB_DIR} -l${BDB_LIB_NAME} Link Here
200
. if ${OPSYS} == FreeBSD
224
. if ${OPSYS} == FreeBSD
201
POSTFIX_AUXLIBS+=	-lblacklist
225
POSTFIX_AUXLIBS+=	-lblacklist
202
. else
226
. else
203
IGNORE=	blacklistd is only supported on FreeBSD >= 11.0
227
IGNORE=		blacklistd is only supported on FreeBSD >= 11.0
204
. endif
228
. endif
205
.endif
229
.endif
206
230
Lines 264-283 POSTFIX_DYN_AUXLIBS+= "AUXLIBS_LMDB=-L${LOCALBASE}/lib -llmdb" Link Here
264
.endif
288
.endif
265
289
266
# sed script for files in ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man
290
# sed script for files in ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man
267
REINPLACE=	s!^PATH=.*!PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PREFIX}/bin:${PREFIX}/sbin!;\
291
REINPLACE=	s!^PATH=.*!PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PREFIX}/bin:${PREFIX}/sbin!; \
268
		s!(_directory = )/usr/!\1${PREFIX}/!g;\
292
		s!(_directory = )/usr/!\1${PREFIX}/!g; s!^(data_directory = \
269
		s!^(data_directory = /var/)lib/!\1db/!g;\
293
		/var/)lib/!\1db/!g; s!^\#(mynetworks_style = host)!\1!g; \
270
		s!^\#(mynetworks_style = host)!\1!g;\
294
		s!^(sendmail_path =)!\1 ${PREFIX}/sbin/sendmail!g; \
271
		s!^(sendmail_path =)!\1 ${PREFIX}/sbin/sendmail!g;\
295
		s!^(newaliases_path =)!\1 ${PREFIX}/bin/newaliases!g; \
272
		s!^(newaliases_path =)!\1 ${PREFIX}/bin/newaliases!g;\
296
		s!^(mailq_path =)!\1 ${PREFIX}/bin/mailq!g; s!^(setgid_group \
273
		s!^(mailq_path =)!\1 ${PREFIX}/bin/mailq!g;\
297
		=)!\1 maildrop!g; s!^(manpage_directory =)!\1 \
274
		s!^(setgid_group =)!\1 maildrop!g;\
298
		${MANPREFIX}/man!g; s!^((html|readme)_directory =)!\1 \
275
		s!^(manpage_directory =)!\1 ${MANPREFIX}/man!g;\
299
		${READMEDIR}!g; \!^\#alias_database = \
276
		s!^((html|readme)_directory =)!\1 ${READMEDIR}!g;\
300
		dbm:/etc/mail/aliases$$!d; s!(:|= \
277
		\!^\#alias_database = dbm:/etc/mail/aliases$$!d;\
301
		)/etc/postfix!\1$$config_directory!g; \
278
		s!(:|= )/etc/postfix!\1$$config_directory!g;\
302
		s!/etc/postfix!${ETCDIR}!g; s!^(sample_directory =)!\1 \
279
		s!/etc/postfix!${ETCDIR}!g;\
303
		${ETCDIR}!g; \
280
		s!^(sample_directory =)!\1 ${ETCDIR}!g;\
281
		s!($config_directory/(access|aliases|canonical|generic|header_checks|relocated|transport|virtual):f:root:-:644:)p1!\1o!;
304
		s!($config_directory/(access|aliases|canonical|generic|header_checks|relocated|transport|virtual):f:root:-:644:)p1!\1o!;
282
305
283
pre-patch:
306
pre-patch:
284
- 

Return to bug 255809