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

Collapse All | Expand All

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

Return to bug 255641