1 |
commit: dc4abcf3864328a21934a2ca51ea23d50a3238eb |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 27 12:06:45 2020 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 27 12:07:41 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc4abcf3 |
7 |
|
8 |
mail-mta/postfix: remove old |
9 |
|
10 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
11 |
Signed-off-by: Eray Aslan <eras <AT> gentoo.org> |
12 |
|
13 |
mail-mta/postfix/Manifest | 3 - |
14 |
mail-mta/postfix/files/postfix-gcc10.patch | 64 ------ |
15 |
mail-mta/postfix/files/postfix-glibc230.patch | 31 --- |
16 |
mail-mta/postfix/postfix-3.4.10.ebuild | 319 -------------------------- |
17 |
mail-mta/postfix/postfix-3.4.9.ebuild | 319 -------------------------- |
18 |
mail-mta/postfix/postfix-3.5.0.ebuild | 316 ------------------------- |
19 |
6 files changed, 1052 deletions(-) |
20 |
|
21 |
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest |
22 |
index 148e0663d92..5bb776f787b 100644 |
23 |
--- a/mail-mta/postfix/Manifest |
24 |
+++ b/mail-mta/postfix/Manifest |
25 |
@@ -1,6 +1,3 @@ |
26 |
-DIST postfix-3.4.10.tar.gz 4573370 BLAKE2B 57ed51539de2c06bdc8d5105ab28b06d9d9ae782255971571c57310b54e187ef5da5191b7145ada81863e247a72fcc576e571848f5ad7ad720afb06ac77c2cf3 SHA512 b337fff8212bfec100d4f415ddb04a4539fad31c7cb555a37e778e7807d70a2a6879ac6d79af96a0593c23189cfaf65e5021fd4e8d39c641ccaabdd06cb7daad |
27 |
-DIST postfix-3.4.9.tar.gz 4573241 BLAKE2B 6f6bd977d4670328aa89a296c0d92d7022a85e289b5197ad46f80e0fb88af565ca93f2affab50c742dd05010aa9a9ea2a68264c07f986ad39a6c1d7d6dec8300 SHA512 9038850d79bf19460d55dede2dd97e6f4bd8255363b4004704e5f0493bf9b1c0729f5bb11663ba6f6ed34177205609f72401b0f55d1d9dbce5398b4603a0a991 |
28 |
-DIST postfix-3.5.0.tar.gz 4609501 BLAKE2B 476520658c64ea2ee8b04896196d83bd2955613a6c2f80c66f8483ff5872bfe4480bf624485be80005c5eb1d73478fc59b90ee5eb44f903da324d5d261124d33 SHA512 7633687c8f9fb4f7204443dda66c1234b8ae121ae750916b23ea7cd16f2fd5944c0e4541c51cbdeb66f51437e3186433bbb9d2b1f538002a3c8aaeb6ddbfe154 |
29 |
DIST postfix-3.5.1.tar.gz 4609587 BLAKE2B 94b06ed536417ca72729d93f03d4fa2dce602508e4c5816ad902740d4203ad3df66d7380ea41859ab75ab327c0f53bc2bbaf09ba45fe83490d02808426a6253d SHA512 9c091cda6c2d54fefc7093736f69dc60dc4d9d2d858260bde1430427bc49caa59f81aea7a992b9764998a4edaaa015ddd50392b8f0a1bccd15f52b563887a698 |
30 |
DIST postfix-3.5.2.tar.gz 4611518 BLAKE2B 4bdf1876c6e210644541fb4fad6ecc4aad2f95afc1d3b7aa30c79e4ca8d2e1c24ad5541f235b8fea91b9831b9b967d6234aae3084938e334bc11a5777004134b SHA512 04e37c4542952dba0f3e44f10775c0bedf343e6382df14a9c43ebc80c005c3f6de68a4e7a7469f32ae74b8e50d10c089d4930eac0cd2e2a9ff1bd8d7481b3a76 |
31 |
DIST postfix-3.6-20200515.tar.gz 4644245 BLAKE2B 0b6ab90cc340cd04afc2066ebcd56f8b2baa885b61185562b88a53463528303f0fe9453889a47ed891611bc58016110edbe8bae1f7cd5e396444eafc466622af SHA512 f7b04820c610d835ca4fc9fc766ded6f1f2cd49b4c540b9e975e7b24342bb03f187fdc6ed6b33a37b2c4c722b371b9a48d6966821448ad128fa07917428da54a |
32 |
|
33 |
diff --git a/mail-mta/postfix/files/postfix-gcc10.patch b/mail-mta/postfix/files/postfix-gcc10.patch |
34 |
deleted file mode 100644 |
35 |
index cd263c5eedb..00000000000 |
36 |
--- a/mail-mta/postfix/files/postfix-gcc10.patch |
37 |
+++ /dev/null |
38 |
@@ -1,64 +0,0 @@ |
39 |
---- a/src/global/mail_params.h 2020-01-21 10:52:36.025753878 +0300 |
40 |
-+++ b/src/global/mail_params.h 2020-01-21 10:53:11.173763126 +0300 |
41 |
-@@ -3983,23 +3983,23 @@ |
42 |
- |
43 |
- #define VAR_TLSP_CLNT_USE_TLS "tlsproxy_client_use_tls" |
44 |
- #define DEF_TLSP_CLNT_USE_TLS "$" VAR_SMTP_USE_TLS |
45 |
--bool var_tlsp_clnt_use_tls; |
46 |
-+extern bool var_tlsp_clnt_use_tls; |
47 |
- |
48 |
- #define VAR_TLSP_CLNT_ENFORCE_TLS "tlsproxy_client_enforce_tls" |
49 |
- #define DEF_TLSP_CLNT_ENFORCE_TLS "$" VAR_SMTP_ENFORCE_TLS |
50 |
--bool var_tlsp_clnt_enforce_tls; |
51 |
-+extern bool var_tlsp_clnt_enforce_tls; |
52 |
- |
53 |
- #define VAR_TLSP_CLNT_LEVEL "tlsproxy_client_level" |
54 |
- #define DEF_TLSP_CLNT_LEVEL "$" VAR_SMTP_TLS_LEVEL |
55 |
--char *var_tlsp_clnt_level; |
56 |
-+extern char *var_tlsp_clnt_level; |
57 |
- |
58 |
- #define VAR_TLSP_CLNT_PER_SITE "tlsproxy_client_per_site" |
59 |
- #define DEF_TLSP_CLNT_PER_SITE "$" VAR_SMTP_TLS_PER_SITE |
60 |
--char *var_tlsp_clnt_per_site; |
61 |
-+extern char *var_tlsp_clnt_per_site; |
62 |
- |
63 |
- #define VAR_TLSP_CLNT_POLICY "tlsproxy_client_policy" |
64 |
- #define DEF_TLSP_CLNT_POLICY "$" VAR_SMTP_TLS_POLICY |
65 |
--char *var_tlsp_clnt_policy; |
66 |
-+extern char *var_tlsp_clnt_policy; |
67 |
- |
68 |
- /* |
69 |
- * SMTPD "reject" contact info. |
70 |
---- a/src/smtpd/smtpd_expand.h 2014-12-07 03:35:34.000000000 +0200 |
71 |
-+++ b/src/smtpd/smtpd_expand.h 2020-01-21 11:30:10.270425259 +0300 |
72 |
-@@ -18,7 +18,7 @@ |
73 |
- /* |
74 |
- * External interface. |
75 |
- */ |
76 |
--VSTRING *smtpd_expand_filter; |
77 |
-+extern VSTRING *smtpd_expand_filter; |
78 |
- void smtpd_expand_init(void); |
79 |
- const char *smtpd_expand_lookup(const char *, int, void *); |
80 |
- int smtpd_expand(SMTPD_STATE *, VSTRING *, const char *, int); |
81 |
---- a/src/trivial-rewrite/trivial-rewrite.h 2014-10-06 18:02:16.000000000 +0300 |
82 |
-+++ b/src/trivial-rewrite/trivial-rewrite.h 2020-01-21 11:29:36.411409526 +0300 |
83 |
-@@ -23,7 +23,7 @@ |
84 |
- /* |
85 |
- * Connection management. |
86 |
- */ |
87 |
--int server_flags; |
88 |
-+extern int server_flags; |
89 |
- |
90 |
- /* |
91 |
- * rewrite.c |
92 |
---- a/src/postconf/postconf.h 2018-02-19 04:43:29.000000000 +0300 |
93 |
-+++ b/src/postconf/postconf.h 2020-01-21 11:29:07.851401023 +0300 |
94 |
-@@ -152,7 +152,7 @@ |
95 |
- * Lookup table for master.cf entries. The table is terminated with an entry |
96 |
- * that has a null argv member. |
97 |
- */ |
98 |
--PCF_MASTER_ENT *pcf_master_table; |
99 |
-+extern PCF_MASTER_ENT *pcf_master_table; |
100 |
- |
101 |
- /* |
102 |
- * Line-wrapping support. |
103 |
|
104 |
diff --git a/mail-mta/postfix/files/postfix-glibc230.patch b/mail-mta/postfix/files/postfix-glibc230.patch |
105 |
deleted file mode 100644 |
106 |
index 23a869bd8d4..00000000000 |
107 |
--- a/mail-mta/postfix/files/postfix-glibc230.patch |
108 |
+++ /dev/null |
109 |
@@ -1,31 +0,0 @@ |
110 |
---- a/src/dns/dns_str_resflags.c 2016-05-15 18:20:14.000000000 +0300 |
111 |
-+++ b/src/dns/dns_str_resflags.c 2019-05-03 17:29:16.000000000 +0300 |
112 |
-@@ -52,18 +52,28 @@ |
113 |
- static const LONG_NAME_MASK resflag_table[] = { |
114 |
- "RES_INIT", RES_INIT, |
115 |
- "RES_DEBUG", RES_DEBUG, |
116 |
-+#ifdef RES_AAONLY |
117 |
- "RES_AAONLY", RES_AAONLY, |
118 |
-+#endif |
119 |
- "RES_USEVC", RES_USEVC, |
120 |
-+#ifdef RES_PRIMARY |
121 |
- "RES_PRIMARY", RES_PRIMARY, |
122 |
-+#endif |
123 |
- "RES_IGNTC", RES_IGNTC, |
124 |
- "RES_RECURSE", RES_RECURSE, |
125 |
- "RES_DEFNAMES", RES_DEFNAMES, |
126 |
- "RES_STAYOPEN", RES_STAYOPEN, |
127 |
- "RES_DNSRCH", RES_DNSRCH, |
128 |
-+#ifdef RES_INSECURE1 |
129 |
- "RES_INSECURE1", RES_INSECURE1, |
130 |
-+#endif |
131 |
-+#ifdef RES_INSECURE2 |
132 |
- "RES_INSECURE2", RES_INSECURE2, |
133 |
-+#endif |
134 |
- "RES_NOALIASES", RES_NOALIASES, |
135 |
-+#ifdef RES_USE_INET6 |
136 |
- "RES_USE_INET6", RES_USE_INET6, |
137 |
-+#endif |
138 |
- #ifdef RES_ROTATE |
139 |
- "RES_ROTATE", RES_ROTATE, |
140 |
- #endif |
141 |
|
142 |
diff --git a/mail-mta/postfix/postfix-3.4.10.ebuild b/mail-mta/postfix/postfix-3.4.10.ebuild |
143 |
deleted file mode 100644 |
144 |
index 96e41411110..00000000000 |
145 |
--- a/mail-mta/postfix/postfix-3.4.10.ebuild |
146 |
+++ /dev/null |
147 |
@@ -1,319 +0,0 @@ |
148 |
-# Copyright 1999-2020 Gentoo Authors |
149 |
-# Distributed under the terms of the GNU General Public License v2 |
150 |
- |
151 |
-EAPI=7 |
152 |
- |
153 |
-inherit flag-o-matic pam systemd toolchain-funcs |
154 |
- |
155 |
-MY_PV="${PV/_rc/-RC}" |
156 |
-MY_SRC="${PN}-${MY_PV}" |
157 |
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
158 |
-RC_VER="2.7" |
159 |
- |
160 |
-DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
161 |
-HOMEPAGE="http://www.postfix.org/" |
162 |
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
163 |
- |
164 |
-LICENSE="|| ( IBM EPL-2.0 )" |
165 |
-SLOT="0" |
166 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
167 |
-IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
168 |
- |
169 |
-DEPEND=">=dev-libs/libpcre-3.4 |
170 |
- dev-lang/perl |
171 |
- berkdb? ( >=sys-libs/db-3.2:* ) |
172 |
- cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
173 |
- eai? ( dev-libs/icu:= ) |
174 |
- ldap? ( net-nds/openldap ) |
175 |
- ldap-bind? ( net-nds/openldap[sasl] ) |
176 |
- lmdb? ( >=dev-db/lmdb-0.9.11 ) |
177 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
178 |
- nis? ( net-libs/libnsl ) |
179 |
- pam? ( sys-libs/pam ) |
180 |
- postgres? ( dev-db/postgresql:* ) |
181 |
- sasl? ( >=dev-libs/cyrus-sasl-2 ) |
182 |
- sqlite? ( dev-db/sqlite:3 ) |
183 |
- ssl? ( |
184 |
- !libressl? ( dev-libs/openssl:0= ) |
185 |
- libressl? ( >=dev-libs/libressl-2.9.1:0= ) |
186 |
- )" |
187 |
- |
188 |
-RDEPEND="${DEPEND} |
189 |
- acct-group/postfix |
190 |
- acct-group/postdrop |
191 |
- acct-user/postfix |
192 |
- memcached? ( net-misc/memcached ) |
193 |
- net-mail/mailbase |
194 |
- !mail-mta/courier |
195 |
- !mail-mta/esmtp |
196 |
- !mail-mta/exim |
197 |
- !mail-mta/mini-qmail |
198 |
- !mail-mta/msmtp[mta] |
199 |
- !mail-mta/netqmail |
200 |
- !mail-mta/nullmailer |
201 |
- !mail-mta/qmail-ldap |
202 |
- !mail-mta/sendmail |
203 |
- !mail-mta/opensmtpd |
204 |
- !<mail-mta/ssmtp-2.64-r2 |
205 |
- !>=mail-mta/ssmtp-2.64-r2[mta] |
206 |
- !net-mail/fastforward |
207 |
- selinux? ( sec-policy/selinux-postfix )" |
208 |
- |
209 |
-REQUIRED_USE="ldap-bind? ( ldap sasl )" |
210 |
- |
211 |
-S="${WORKDIR}/${MY_SRC}" |
212 |
- |
213 |
-PATCHES=( |
214 |
- "${FILESDIR}/${PN}-libressl-certkey.patch" |
215 |
- "${FILESDIR}/${PN}-libressl-server.patch" |
216 |
- "${FILESDIR}/${PN}-glibc230.patch" |
217 |
- "${FILESDIR}/${PN}-gcc10.patch" |
218 |
-) |
219 |
- |
220 |
-src_prepare() { |
221 |
- default |
222 |
- sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
223 |
- src/util/sys_defs.h || die "sed failed" |
224 |
- # change default paths to better comply with portage standard paths |
225 |
- sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
226 |
-} |
227 |
- |
228 |
-src_configure() { |
229 |
- for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
230 |
- do |
231 |
- local AUXLIBS_${name}="" |
232 |
- done |
233 |
- |
234 |
- # Make sure LDFLAGS get passed down to the executables. |
235 |
- local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
236 |
- AUXLIBS_PCRE="$(pcre-config --libs)" |
237 |
- |
238 |
- use pam && mylibs="${mylibs} -lpam" |
239 |
- |
240 |
- if use ldap; then |
241 |
- mycc="${mycc} -DHAS_LDAP" |
242 |
- AUXLIBS_LDAP="-lldap -llber" |
243 |
- fi |
244 |
- |
245 |
- if use mysql; then |
246 |
- mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
247 |
- AUXLIBS_MYSQL="$(mysql_config --libs)" |
248 |
- fi |
249 |
- |
250 |
- if use postgres; then |
251 |
- mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
252 |
- AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
253 |
- fi |
254 |
- |
255 |
- if use sqlite; then |
256 |
- mycc="${mycc} -DHAS_SQLITE" |
257 |
- AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
258 |
- fi |
259 |
- |
260 |
- if use ssl; then |
261 |
- mycc="${mycc} -DUSE_TLS" |
262 |
- mylibs="${mylibs} -lssl -lcrypto" |
263 |
- fi |
264 |
- |
265 |
- if use lmdb; then |
266 |
- mycc="${mycc} -DHAS_LMDB" |
267 |
- AUXLIBS_LMDB="-llmdb -lpthread" |
268 |
- fi |
269 |
- |
270 |
- if ! use eai; then |
271 |
- mycc="${mycc} -DNO_EAI" |
272 |
- fi |
273 |
- |
274 |
- # broken. and "in other words, not supported" by upstream. |
275 |
- # Use inet_protocols setting in main.cf |
276 |
- #if ! use ipv6; then |
277 |
- # mycc="${mycc} -DNO_IPV6" |
278 |
- #fi |
279 |
- |
280 |
- if use sasl; then |
281 |
- if use dovecot-sasl; then |
282 |
- # Set dovecot as default. |
283 |
- mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
284 |
- fi |
285 |
- if use ldap-bind; then |
286 |
- mycc="${mycc} -DUSE_LDAP_SASL" |
287 |
- fi |
288 |
- mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
289 |
- mylibs="${mylibs} -lsasl2" |
290 |
- elif use dovecot-sasl; then |
291 |
- mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
292 |
- fi |
293 |
- |
294 |
- if ! use nis; then |
295 |
- mycc="${mycc} -DNO_NIS" |
296 |
- fi |
297 |
- |
298 |
- if ! use berkdb; then |
299 |
- mycc="${mycc} -DNO_DB" |
300 |
- if use cdb; then |
301 |
- # change default hash format from Berkeley DB to cdb |
302 |
- mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
303 |
- fi |
304 |
- fi |
305 |
- |
306 |
- if use cdb; then |
307 |
- mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
308 |
- # Tinycdb is preferred. |
309 |
- if has_version dev-db/tinycdb ; then |
310 |
- einfo "Building with dev-db/tinycdb" |
311 |
- AUXLIBS_CDB="-lcdb" |
312 |
- else |
313 |
- einfo "Building with dev-db/cdb" |
314 |
- CDB_PATH="/usr/$(get_libdir)" |
315 |
- for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
316 |
- AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
317 |
- done |
318 |
- fi |
319 |
- fi |
320 |
- |
321 |
- # Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
322 |
- # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
323 |
- mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
324 |
- filter-lfs-flags |
325 |
- |
326 |
- # Workaround for bug #76512 |
327 |
- if use hardened; then |
328 |
- [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
329 |
- fi |
330 |
- |
331 |
- # Remove annoying C++ comment style warnings - bug #378099 |
332 |
- append-flags -Wno-comment |
333 |
- |
334 |
- sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
335 |
- sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
336 |
- |
337 |
- emake makefiles shared=yes dynamicmaps=no pie=yes \ |
338 |
- shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
339 |
- DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
340 |
- AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
341 |
- AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
342 |
- AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
343 |
- AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
344 |
-} |
345 |
- |
346 |
-src_install() { |
347 |
- LD_LIBRARY_PATH="${S}/lib" \ |
348 |
- /bin/sh postfix-install \ |
349 |
- -non-interactive \ |
350 |
- install_root="${D}" \ |
351 |
- config_directory="/etc/postfix" \ |
352 |
- manpage_directory="/usr/share/man" \ |
353 |
- command_directory="/usr/sbin" \ |
354 |
- mailq_path="/usr/bin/mailq" \ |
355 |
- newaliases_path="/usr/bin/newaliases" \ |
356 |
- sendmail_path="/usr/sbin/sendmail" \ |
357 |
- || die "postfix-install failed" |
358 |
- |
359 |
- # Fix spool removal on upgrade |
360 |
- rm -Rf "${D}"/var |
361 |
- keepdir /var/spool/postfix |
362 |
- |
363 |
- # Install rmail for UUCP, closes bug #19127 |
364 |
- dobin auxiliary/rmail/rmail |
365 |
- |
366 |
- # Provide another link for legacy FSH |
367 |
- dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail |
368 |
- |
369 |
- # Install qshape, posttls-finger and collate |
370 |
- dobin auxiliary/qshape/qshape.pl |
371 |
- doman man/man1/qshape.1 |
372 |
- dobin bin/posttls-finger |
373 |
- doman man/man1/posttls-finger.1 |
374 |
- dobin auxiliary/collate/collate.pl |
375 |
- newdoc auxiliary/collate/README README.collate |
376 |
- |
377 |
- # Performance tuning tools and their manuals |
378 |
- dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
379 |
- doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
380 |
- |
381 |
- # Set proper permissions on required files/directories |
382 |
- keepdir /var/lib/postfix |
383 |
- fowners -R postfix:postfix /var/lib/postfix |
384 |
- fperms 0750 /var/lib/postfix |
385 |
- fowners root:postdrop /usr/sbin/post{drop,queue} |
386 |
- fperms 02755 /usr/sbin/post{drop,queue} |
387 |
- |
388 |
- keepdir /etc/postfix |
389 |
- keepdir /etc/postfix/postfix-files.d |
390 |
- if use mbox; then |
391 |
- mypostconf="mail_spool_directory=/var/spool/mail" |
392 |
- else |
393 |
- mypostconf="home_mailbox=.maildir/" |
394 |
- fi |
395 |
- LD_LIBRARY_PATH="${S}/lib" \ |
396 |
- "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
397 |
- -e ${mypostconf} || die "postconf failed" |
398 |
- |
399 |
- insinto /etc/postfix |
400 |
- newins "${FILESDIR}"/smtp.pass saslpass |
401 |
- fperms 600 /etc/postfix/saslpass |
402 |
- |
403 |
- newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
404 |
- # do not start mysql/postgres unnecessarily - bug #359913 |
405 |
- use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
406 |
- use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
407 |
- |
408 |
- dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
409 |
- mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
410 |
- # postfix set-permissions expects uncompressed man files |
411 |
- docompress -x /usr/share/man |
412 |
- |
413 |
- pamd_mimic_system smtp auth account |
414 |
- |
415 |
- if use sasl; then |
416 |
- insinto /etc/sasl2 |
417 |
- newins "${FILESDIR}"/smtp.sasl smtpd.conf |
418 |
- fi |
419 |
- |
420 |
- # header files |
421 |
- insinto /usr/include/postfix |
422 |
- doins include/*.h |
423 |
- |
424 |
- if has_version mail-mta/postfix; then |
425 |
- # let the sysadmin decide when to change the compatibility_level |
426 |
- sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
427 |
- fi |
428 |
- |
429 |
- systemd_dounit "${FILESDIR}/${PN}.service" |
430 |
-} |
431 |
- |
432 |
-pkg_preinst() { |
433 |
- if has_version '<mail-mta/postfix-3.4'; then |
434 |
- elog |
435 |
- elog "Postfix-3.4 introduces a new master.cf service 'postlog'" |
436 |
- elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon." |
437 |
- elog "Before backing out to an older Postfix version, edit the master.cf" |
438 |
- elog "file and remove the postlog entry." |
439 |
- elog |
440 |
- fi |
441 |
-} |
442 |
- |
443 |
-pkg_postinst() { |
444 |
- if [[ ! -e /etc/mail/aliases.db ]] ; then |
445 |
- ewarn |
446 |
- ewarn "You must edit /etc/mail/aliases to suit your needs" |
447 |
- ewarn "and then run /usr/bin/newaliases. Postfix will not" |
448 |
- ewarn "work correctly without it." |
449 |
- ewarn |
450 |
- fi |
451 |
- |
452 |
- # check and fix file permissions |
453 |
- "${EROOT}"/usr/sbin/postfix set-permissions |
454 |
- |
455 |
- # configure tls |
456 |
- if use ssl ; then |
457 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
458 |
- elog "To configure client side TLS settings:" |
459 |
- elog "${EROOT}"/usr/sbin/postfix tls enable-client |
460 |
- fi |
461 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
462 |
- elog "To configure server side TLS settings:" |
463 |
- elog "${EROOT}"/usr/sbin/postfix tls enable-server |
464 |
- fi |
465 |
- fi |
466 |
-} |
467 |
|
468 |
diff --git a/mail-mta/postfix/postfix-3.4.9.ebuild b/mail-mta/postfix/postfix-3.4.9.ebuild |
469 |
deleted file mode 100644 |
470 |
index 57e4d8c2f25..00000000000 |
471 |
--- a/mail-mta/postfix/postfix-3.4.9.ebuild |
472 |
+++ /dev/null |
473 |
@@ -1,319 +0,0 @@ |
474 |
-# Copyright 1999-2020 Gentoo Authors |
475 |
-# Distributed under the terms of the GNU General Public License v2 |
476 |
- |
477 |
-EAPI=7 |
478 |
- |
479 |
-inherit flag-o-matic pam systemd toolchain-funcs |
480 |
- |
481 |
-MY_PV="${PV/_rc/-RC}" |
482 |
-MY_SRC="${PN}-${MY_PV}" |
483 |
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
484 |
-RC_VER="2.7" |
485 |
- |
486 |
-DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
487 |
-HOMEPAGE="http://www.postfix.org/" |
488 |
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
489 |
- |
490 |
-LICENSE="|| ( IBM EPL-2.0 )" |
491 |
-SLOT="0" |
492 |
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86" |
493 |
-IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
494 |
- |
495 |
-DEPEND=">=dev-libs/libpcre-3.4 |
496 |
- dev-lang/perl |
497 |
- berkdb? ( >=sys-libs/db-3.2:* ) |
498 |
- cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
499 |
- eai? ( dev-libs/icu:= ) |
500 |
- ldap? ( net-nds/openldap ) |
501 |
- ldap-bind? ( net-nds/openldap[sasl] ) |
502 |
- lmdb? ( >=dev-db/lmdb-0.9.11 ) |
503 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
504 |
- nis? ( net-libs/libnsl ) |
505 |
- pam? ( sys-libs/pam ) |
506 |
- postgres? ( dev-db/postgresql:* ) |
507 |
- sasl? ( >=dev-libs/cyrus-sasl-2 ) |
508 |
- sqlite? ( dev-db/sqlite:3 ) |
509 |
- ssl? ( |
510 |
- !libressl? ( dev-libs/openssl:0= ) |
511 |
- libressl? ( >=dev-libs/libressl-2.9.1:0= ) |
512 |
- )" |
513 |
- |
514 |
-RDEPEND="${DEPEND} |
515 |
- acct-group/postfix |
516 |
- acct-group/postdrop |
517 |
- acct-user/postfix |
518 |
- memcached? ( net-misc/memcached ) |
519 |
- net-mail/mailbase |
520 |
- !mail-mta/courier |
521 |
- !mail-mta/esmtp |
522 |
- !mail-mta/exim |
523 |
- !mail-mta/mini-qmail |
524 |
- !mail-mta/msmtp[mta] |
525 |
- !mail-mta/netqmail |
526 |
- !mail-mta/nullmailer |
527 |
- !mail-mta/qmail-ldap |
528 |
- !mail-mta/sendmail |
529 |
- !mail-mta/opensmtpd |
530 |
- !<mail-mta/ssmtp-2.64-r2 |
531 |
- !>=mail-mta/ssmtp-2.64-r2[mta] |
532 |
- !net-mail/fastforward |
533 |
- selinux? ( sec-policy/selinux-postfix )" |
534 |
- |
535 |
-REQUIRED_USE="ldap-bind? ( ldap sasl )" |
536 |
- |
537 |
-S="${WORKDIR}/${MY_SRC}" |
538 |
- |
539 |
-PATCHES=( |
540 |
- "${FILESDIR}/${PN}-libressl-certkey.patch" |
541 |
- "${FILESDIR}/${PN}-libressl-server.patch" |
542 |
- "${FILESDIR}/${PN}-glibc230.patch" |
543 |
- "${FILESDIR}/${PN}-gcc10.patch" |
544 |
-) |
545 |
- |
546 |
-src_prepare() { |
547 |
- default |
548 |
- sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
549 |
- src/util/sys_defs.h || die "sed failed" |
550 |
- # change default paths to better comply with portage standard paths |
551 |
- sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
552 |
-} |
553 |
- |
554 |
-src_configure() { |
555 |
- for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
556 |
- do |
557 |
- local AUXLIBS_${name}="" |
558 |
- done |
559 |
- |
560 |
- # Make sure LDFLAGS get passed down to the executables. |
561 |
- local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
562 |
- AUXLIBS_PCRE="$(pcre-config --libs)" |
563 |
- |
564 |
- use pam && mylibs="${mylibs} -lpam" |
565 |
- |
566 |
- if use ldap; then |
567 |
- mycc="${mycc} -DHAS_LDAP" |
568 |
- AUXLIBS_LDAP="-lldap -llber" |
569 |
- fi |
570 |
- |
571 |
- if use mysql; then |
572 |
- mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
573 |
- AUXLIBS_MYSQL="$(mysql_config --libs)" |
574 |
- fi |
575 |
- |
576 |
- if use postgres; then |
577 |
- mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
578 |
- AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
579 |
- fi |
580 |
- |
581 |
- if use sqlite; then |
582 |
- mycc="${mycc} -DHAS_SQLITE" |
583 |
- AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
584 |
- fi |
585 |
- |
586 |
- if use ssl; then |
587 |
- mycc="${mycc} -DUSE_TLS" |
588 |
- mylibs="${mylibs} -lssl -lcrypto" |
589 |
- fi |
590 |
- |
591 |
- if use lmdb; then |
592 |
- mycc="${mycc} -DHAS_LMDB" |
593 |
- AUXLIBS_LMDB="-llmdb -lpthread" |
594 |
- fi |
595 |
- |
596 |
- if ! use eai; then |
597 |
- mycc="${mycc} -DNO_EAI" |
598 |
- fi |
599 |
- |
600 |
- # broken. and "in other words, not supported" by upstream. |
601 |
- # Use inet_protocols setting in main.cf |
602 |
- #if ! use ipv6; then |
603 |
- # mycc="${mycc} -DNO_IPV6" |
604 |
- #fi |
605 |
- |
606 |
- if use sasl; then |
607 |
- if use dovecot-sasl; then |
608 |
- # Set dovecot as default. |
609 |
- mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
610 |
- fi |
611 |
- if use ldap-bind; then |
612 |
- mycc="${mycc} -DUSE_LDAP_SASL" |
613 |
- fi |
614 |
- mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
615 |
- mylibs="${mylibs} -lsasl2" |
616 |
- elif use dovecot-sasl; then |
617 |
- mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
618 |
- fi |
619 |
- |
620 |
- if ! use nis; then |
621 |
- mycc="${mycc} -DNO_NIS" |
622 |
- fi |
623 |
- |
624 |
- if ! use berkdb; then |
625 |
- mycc="${mycc} -DNO_DB" |
626 |
- if use cdb; then |
627 |
- # change default hash format from Berkeley DB to cdb |
628 |
- mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
629 |
- fi |
630 |
- fi |
631 |
- |
632 |
- if use cdb; then |
633 |
- mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
634 |
- # Tinycdb is preferred. |
635 |
- if has_version dev-db/tinycdb ; then |
636 |
- einfo "Building with dev-db/tinycdb" |
637 |
- AUXLIBS_CDB="-lcdb" |
638 |
- else |
639 |
- einfo "Building with dev-db/cdb" |
640 |
- CDB_PATH="/usr/$(get_libdir)" |
641 |
- for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
642 |
- AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
643 |
- done |
644 |
- fi |
645 |
- fi |
646 |
- |
647 |
- # Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
648 |
- # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
649 |
- mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
650 |
- filter-lfs-flags |
651 |
- |
652 |
- # Workaround for bug #76512 |
653 |
- if use hardened; then |
654 |
- [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
655 |
- fi |
656 |
- |
657 |
- # Remove annoying C++ comment style warnings - bug #378099 |
658 |
- append-flags -Wno-comment |
659 |
- |
660 |
- sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
661 |
- sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
662 |
- |
663 |
- emake makefiles shared=yes dynamicmaps=no pie=yes \ |
664 |
- shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
665 |
- DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
666 |
- AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
667 |
- AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
668 |
- AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
669 |
- AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
670 |
-} |
671 |
- |
672 |
-src_install() { |
673 |
- LD_LIBRARY_PATH="${S}/lib" \ |
674 |
- /bin/sh postfix-install \ |
675 |
- -non-interactive \ |
676 |
- install_root="${D}" \ |
677 |
- config_directory="/etc/postfix" \ |
678 |
- manpage_directory="/usr/share/man" \ |
679 |
- command_directory="/usr/sbin" \ |
680 |
- mailq_path="/usr/bin/mailq" \ |
681 |
- newaliases_path="/usr/bin/newaliases" \ |
682 |
- sendmail_path="/usr/sbin/sendmail" \ |
683 |
- || die "postfix-install failed" |
684 |
- |
685 |
- # Fix spool removal on upgrade |
686 |
- rm -Rf "${D}"/var |
687 |
- keepdir /var/spool/postfix |
688 |
- |
689 |
- # Install rmail for UUCP, closes bug #19127 |
690 |
- dobin auxiliary/rmail/rmail |
691 |
- |
692 |
- # Provide another link for legacy FSH |
693 |
- dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail |
694 |
- |
695 |
- # Install qshape, posttls-finger and collate |
696 |
- dobin auxiliary/qshape/qshape.pl |
697 |
- doman man/man1/qshape.1 |
698 |
- dobin bin/posttls-finger |
699 |
- doman man/man1/posttls-finger.1 |
700 |
- dobin auxiliary/collate/collate.pl |
701 |
- newdoc auxiliary/collate/README README.collate |
702 |
- |
703 |
- # Performance tuning tools and their manuals |
704 |
- dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
705 |
- doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
706 |
- |
707 |
- # Set proper permissions on required files/directories |
708 |
- keepdir /var/lib/postfix |
709 |
- fowners -R postfix:postfix /var/lib/postfix |
710 |
- fperms 0750 /var/lib/postfix |
711 |
- fowners root:postdrop /usr/sbin/post{drop,queue} |
712 |
- fperms 02755 /usr/sbin/post{drop,queue} |
713 |
- |
714 |
- keepdir /etc/postfix |
715 |
- keepdir /etc/postfix/postfix-files.d |
716 |
- if use mbox; then |
717 |
- mypostconf="mail_spool_directory=/var/spool/mail" |
718 |
- else |
719 |
- mypostconf="home_mailbox=.maildir/" |
720 |
- fi |
721 |
- LD_LIBRARY_PATH="${S}/lib" \ |
722 |
- "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
723 |
- -e ${mypostconf} || die "postconf failed" |
724 |
- |
725 |
- insinto /etc/postfix |
726 |
- newins "${FILESDIR}"/smtp.pass saslpass |
727 |
- fperms 600 /etc/postfix/saslpass |
728 |
- |
729 |
- newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
730 |
- # do not start mysql/postgres unnecessarily - bug #359913 |
731 |
- use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
732 |
- use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
733 |
- |
734 |
- dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
735 |
- mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
736 |
- # postfix set-permissions expects uncompressed man files |
737 |
- docompress -x /usr/share/man |
738 |
- |
739 |
- pamd_mimic_system smtp auth account |
740 |
- |
741 |
- if use sasl; then |
742 |
- insinto /etc/sasl2 |
743 |
- newins "${FILESDIR}"/smtp.sasl smtpd.conf |
744 |
- fi |
745 |
- |
746 |
- # header files |
747 |
- insinto /usr/include/postfix |
748 |
- doins include/*.h |
749 |
- |
750 |
- if has_version mail-mta/postfix; then |
751 |
- # let the sysadmin decide when to change the compatibility_level |
752 |
- sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
753 |
- fi |
754 |
- |
755 |
- systemd_dounit "${FILESDIR}/${PN}.service" |
756 |
-} |
757 |
- |
758 |
-pkg_preinst() { |
759 |
- if has_version '<mail-mta/postfix-3.4'; then |
760 |
- elog |
761 |
- elog "Postfix-3.4 introduces a new master.cf service 'postlog'" |
762 |
- elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon." |
763 |
- elog "Before backing out to an older Postfix version, edit the master.cf" |
764 |
- elog "file and remove the postlog entry." |
765 |
- elog |
766 |
- fi |
767 |
-} |
768 |
- |
769 |
-pkg_postinst() { |
770 |
- if [[ ! -e /etc/mail/aliases.db ]] ; then |
771 |
- ewarn |
772 |
- ewarn "You must edit /etc/mail/aliases to suit your needs" |
773 |
- ewarn "and then run /usr/bin/newaliases. Postfix will not" |
774 |
- ewarn "work correctly without it." |
775 |
- ewarn |
776 |
- fi |
777 |
- |
778 |
- # check and fix file permissions |
779 |
- "${EROOT}"/usr/sbin/postfix set-permissions |
780 |
- |
781 |
- # configure tls |
782 |
- if use ssl ; then |
783 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
784 |
- elog "To configure client side TLS settings:" |
785 |
- elog "${EROOT}"/usr/sbin/postfix tls enable-client |
786 |
- fi |
787 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
788 |
- elog "To configure server side TLS settings:" |
789 |
- elog "${EROOT}"/usr/sbin/postfix tls enable-server |
790 |
- fi |
791 |
- fi |
792 |
-} |
793 |
|
794 |
diff --git a/mail-mta/postfix/postfix-3.5.0.ebuild b/mail-mta/postfix/postfix-3.5.0.ebuild |
795 |
deleted file mode 100644 |
796 |
index 15887b8c8b9..00000000000 |
797 |
--- a/mail-mta/postfix/postfix-3.5.0.ebuild |
798 |
+++ /dev/null |
799 |
@@ -1,316 +0,0 @@ |
800 |
-# Copyright 1999-2020 Gentoo Authors |
801 |
-# Distributed under the terms of the GNU General Public License v2 |
802 |
- |
803 |
-EAPI=7 |
804 |
- |
805 |
-inherit flag-o-matic pam systemd toolchain-funcs |
806 |
- |
807 |
-MY_PV="${PV/_rc/-RC}" |
808 |
-MY_SRC="${PN}-${MY_PV}" |
809 |
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
810 |
-RC_VER="2.7" |
811 |
- |
812 |
-DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
813 |
-HOMEPAGE="http://www.postfix.org/" |
814 |
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
815 |
- |
816 |
-LICENSE="|| ( IBM EPL-2.0 )" |
817 |
-SLOT="0" |
818 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
819 |
-IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
820 |
- |
821 |
-DEPEND=">=dev-libs/libpcre-3.4 |
822 |
- dev-lang/perl |
823 |
- berkdb? ( >=sys-libs/db-3.2:* ) |
824 |
- cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
825 |
- eai? ( dev-libs/icu:= ) |
826 |
- ldap? ( net-nds/openldap ) |
827 |
- ldap-bind? ( net-nds/openldap[sasl] ) |
828 |
- lmdb? ( >=dev-db/lmdb-0.9.11 ) |
829 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
830 |
- nis? ( net-libs/libnsl ) |
831 |
- pam? ( sys-libs/pam ) |
832 |
- postgres? ( dev-db/postgresql:* ) |
833 |
- sasl? ( >=dev-libs/cyrus-sasl-2 ) |
834 |
- sqlite? ( dev-db/sqlite:3 ) |
835 |
- ssl? ( |
836 |
- !libressl? ( dev-libs/openssl:0= ) |
837 |
- libressl? ( >=dev-libs/libressl-2.9.1:0= ) |
838 |
- )" |
839 |
- |
840 |
-RDEPEND="${DEPEND} |
841 |
- acct-group/postfix |
842 |
- acct-group/postdrop |
843 |
- acct-user/postfix |
844 |
- memcached? ( net-misc/memcached ) |
845 |
- net-mail/mailbase |
846 |
- !mail-mta/courier |
847 |
- !mail-mta/esmtp |
848 |
- !mail-mta/exim |
849 |
- !mail-mta/mini-qmail |
850 |
- !mail-mta/msmtp[mta] |
851 |
- !mail-mta/netqmail |
852 |
- !mail-mta/nullmailer |
853 |
- !mail-mta/qmail-ldap |
854 |
- !mail-mta/sendmail |
855 |
- !mail-mta/opensmtpd |
856 |
- !mail-mta/ssmtp[mta] |
857 |
- !net-mail/fastforward |
858 |
- selinux? ( sec-policy/selinux-postfix )" |
859 |
- |
860 |
-REQUIRED_USE="ldap-bind? ( ldap sasl )" |
861 |
- |
862 |
-S="${WORKDIR}/${MY_SRC}" |
863 |
- |
864 |
-PATCHES=( |
865 |
- "${FILESDIR}/${PN}-libressl-certkey.patch" |
866 |
- "${FILESDIR}/${PN}-libressl-server.patch" |
867 |
-) |
868 |
- |
869 |
-src_prepare() { |
870 |
- default |
871 |
- sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
872 |
- src/util/sys_defs.h || die "sed failed" |
873 |
- # change default paths to better comply with portage standard paths |
874 |
- sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
875 |
-} |
876 |
- |
877 |
-src_configure() { |
878 |
- for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
879 |
- do |
880 |
- local AUXLIBS_${name}="" |
881 |
- done |
882 |
- |
883 |
- # Make sure LDFLAGS get passed down to the executables. |
884 |
- local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
885 |
- AUXLIBS_PCRE="$(pcre-config --libs)" |
886 |
- |
887 |
- use pam && mylibs="${mylibs} -lpam" |
888 |
- |
889 |
- if use ldap; then |
890 |
- mycc="${mycc} -DHAS_LDAP" |
891 |
- AUXLIBS_LDAP="-lldap -llber" |
892 |
- fi |
893 |
- |
894 |
- if use mysql; then |
895 |
- mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
896 |
- AUXLIBS_MYSQL="$(mysql_config --libs)" |
897 |
- fi |
898 |
- |
899 |
- if use postgres; then |
900 |
- mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
901 |
- AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
902 |
- fi |
903 |
- |
904 |
- if use sqlite; then |
905 |
- mycc="${mycc} -DHAS_SQLITE" |
906 |
- AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
907 |
- fi |
908 |
- |
909 |
- if use ssl; then |
910 |
- mycc="${mycc} -DUSE_TLS" |
911 |
- mylibs="${mylibs} -lssl -lcrypto" |
912 |
- fi |
913 |
- |
914 |
- if use lmdb; then |
915 |
- mycc="${mycc} -DHAS_LMDB" |
916 |
- AUXLIBS_LMDB="-llmdb -lpthread" |
917 |
- fi |
918 |
- |
919 |
- if ! use eai; then |
920 |
- mycc="${mycc} -DNO_EAI" |
921 |
- fi |
922 |
- |
923 |
- # broken. and "in other words, not supported" by upstream. |
924 |
- # Use inet_protocols setting in main.cf |
925 |
- #if ! use ipv6; then |
926 |
- # mycc="${mycc} -DNO_IPV6" |
927 |
- #fi |
928 |
- |
929 |
- if use sasl; then |
930 |
- if use dovecot-sasl; then |
931 |
- # Set dovecot as default. |
932 |
- mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
933 |
- fi |
934 |
- if use ldap-bind; then |
935 |
- mycc="${mycc} -DUSE_LDAP_SASL" |
936 |
- fi |
937 |
- mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
938 |
- mylibs="${mylibs} -lsasl2" |
939 |
- elif use dovecot-sasl; then |
940 |
- mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
941 |
- fi |
942 |
- |
943 |
- if ! use nis; then |
944 |
- mycc="${mycc} -DNO_NIS" |
945 |
- fi |
946 |
- |
947 |
- if ! use berkdb; then |
948 |
- mycc="${mycc} -DNO_DB" |
949 |
- if use cdb; then |
950 |
- # change default hash format from Berkeley DB to cdb |
951 |
- mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
952 |
- fi |
953 |
- fi |
954 |
- |
955 |
- if use cdb; then |
956 |
- mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
957 |
- # Tinycdb is preferred. |
958 |
- if has_version dev-db/tinycdb ; then |
959 |
- einfo "Building with dev-db/tinycdb" |
960 |
- AUXLIBS_CDB="-lcdb" |
961 |
- else |
962 |
- einfo "Building with dev-db/cdb" |
963 |
- CDB_PATH="/usr/$(get_libdir)" |
964 |
- for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
965 |
- AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
966 |
- done |
967 |
- fi |
968 |
- fi |
969 |
- |
970 |
- # Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
971 |
- # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
972 |
- mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
973 |
- filter-lfs-flags |
974 |
- |
975 |
- # Workaround for bug #76512 |
976 |
- if use hardened; then |
977 |
- [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
978 |
- fi |
979 |
- |
980 |
- # Remove annoying C++ comment style warnings - bug #378099 |
981 |
- append-flags -Wno-comment |
982 |
- |
983 |
- sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
984 |
- sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
985 |
- |
986 |
- emake makefiles shared=yes dynamicmaps=no pie=yes \ |
987 |
- shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
988 |
- DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
989 |
- AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
990 |
- AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
991 |
- AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
992 |
- AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
993 |
-} |
994 |
- |
995 |
-src_install() { |
996 |
- LD_LIBRARY_PATH="${S}/lib" \ |
997 |
- /bin/sh postfix-install \ |
998 |
- -non-interactive \ |
999 |
- install_root="${D}" \ |
1000 |
- config_directory="/etc/postfix" \ |
1001 |
- manpage_directory="/usr/share/man" \ |
1002 |
- command_directory="/usr/sbin" \ |
1003 |
- mailq_path="/usr/bin/mailq" \ |
1004 |
- newaliases_path="/usr/bin/newaliases" \ |
1005 |
- sendmail_path="/usr/sbin/sendmail" \ |
1006 |
- || die "postfix-install failed" |
1007 |
- |
1008 |
- # Fix spool removal on upgrade |
1009 |
- rm -Rf "${D}"/var |
1010 |
- keepdir /var/spool/postfix |
1011 |
- |
1012 |
- # Install rmail for UUCP, closes bug #19127 |
1013 |
- dobin auxiliary/rmail/rmail |
1014 |
- |
1015 |
- # Provide another link for legacy FSH |
1016 |
- dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail |
1017 |
- |
1018 |
- # Install qshape, posttls-finger and collate |
1019 |
- dobin auxiliary/qshape/qshape.pl |
1020 |
- doman man/man1/qshape.1 |
1021 |
- dobin bin/posttls-finger |
1022 |
- doman man/man1/posttls-finger.1 |
1023 |
- dobin auxiliary/collate/collate.pl |
1024 |
- newdoc auxiliary/collate/README README.collate |
1025 |
- |
1026 |
- # Performance tuning tools and their manuals |
1027 |
- dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
1028 |
- doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
1029 |
- |
1030 |
- # Set proper permissions on required files/directories |
1031 |
- keepdir /var/lib/postfix |
1032 |
- fowners -R postfix:postfix /var/lib/postfix |
1033 |
- fperms 0750 /var/lib/postfix |
1034 |
- fowners root:postdrop /usr/sbin/post{drop,queue} |
1035 |
- fperms 02755 /usr/sbin/post{drop,queue} |
1036 |
- |
1037 |
- keepdir /etc/postfix |
1038 |
- keepdir /etc/postfix/postfix-files.d |
1039 |
- if use mbox; then |
1040 |
- mypostconf="mail_spool_directory=/var/spool/mail" |
1041 |
- else |
1042 |
- mypostconf="home_mailbox=.maildir/" |
1043 |
- fi |
1044 |
- LD_LIBRARY_PATH="${S}/lib" \ |
1045 |
- "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
1046 |
- -e ${mypostconf} || die "postconf failed" |
1047 |
- |
1048 |
- insinto /etc/postfix |
1049 |
- newins "${FILESDIR}"/smtp.pass saslpass |
1050 |
- fperms 600 /etc/postfix/saslpass |
1051 |
- |
1052 |
- newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
1053 |
- # do not start mysql/postgres unnecessarily - bug #359913 |
1054 |
- use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
1055 |
- use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
1056 |
- |
1057 |
- dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
1058 |
- mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
1059 |
- # postfix set-permissions expects uncompressed man files |
1060 |
- docompress -x /usr/share/man |
1061 |
- |
1062 |
- pamd_mimic_system smtp auth account |
1063 |
- |
1064 |
- if use sasl; then |
1065 |
- insinto /etc/sasl2 |
1066 |
- newins "${FILESDIR}"/smtp.sasl smtpd.conf |
1067 |
- fi |
1068 |
- |
1069 |
- # header files |
1070 |
- insinto /usr/include/postfix |
1071 |
- doins include/*.h |
1072 |
- |
1073 |
- if has_version mail-mta/postfix; then |
1074 |
- # let the sysadmin decide when to change the compatibility_level |
1075 |
- sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
1076 |
- fi |
1077 |
- |
1078 |
- systemd_dounit "${FILESDIR}/${PN}.service" |
1079 |
-} |
1080 |
- |
1081 |
-pkg_preinst() { |
1082 |
- if has_version '<mail-mta/postfix-3.4'; then |
1083 |
- elog |
1084 |
- elog "Postfix-3.4 introduces a new master.cf service 'postlog'" |
1085 |
- elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon." |
1086 |
- elog "Before backing out to an older Postfix version, edit the master.cf" |
1087 |
- elog "file and remove the postlog entry." |
1088 |
- elog |
1089 |
- fi |
1090 |
-} |
1091 |
- |
1092 |
-pkg_postinst() { |
1093 |
- if [[ ! -e /etc/mail/aliases.db ]] ; then |
1094 |
- ewarn |
1095 |
- ewarn "You must edit /etc/mail/aliases to suit your needs" |
1096 |
- ewarn "and then run /usr/bin/newaliases. Postfix will not" |
1097 |
- ewarn "work correctly without it." |
1098 |
- ewarn |
1099 |
- fi |
1100 |
- |
1101 |
- # check and fix file permissions |
1102 |
- "${EROOT}"/usr/sbin/postfix set-permissions |
1103 |
- |
1104 |
- # configure tls |
1105 |
- if use ssl ; then |
1106 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
1107 |
- elog "To configure client side TLS settings:" |
1108 |
- elog "${EROOT}"/usr/sbin/postfix tls enable-client |
1109 |
- fi |
1110 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
1111 |
- elog "To configure server side TLS settings:" |
1112 |
- elog "${EROOT}"/usr/sbin/postfix tls enable-server |
1113 |
- fi |
1114 |
- fi |
1115 |
-} |