1 |
commit: 05e27f7049c028a88fda4f46b9e3b7f1a9d042af |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 29 08:19:55 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 29 08:19:55 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05e27f70 |
7 |
|
8 |
mail-mta/exim: security bump for heap overflow |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
mail-mta/exim/Manifest | 2 + |
14 |
mail-mta/exim/exim-4.92.3.ebuild | 582 +++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 584 insertions(+) |
16 |
|
17 |
diff --git a/mail-mta/exim/Manifest b/mail-mta/exim/Manifest |
18 |
index e94787221cc..569ecebc2f5 100644 |
19 |
--- a/mail-mta/exim/Manifest |
20 |
+++ b/mail-mta/exim/Manifest |
21 |
@@ -1,7 +1,9 @@ |
22 |
DIST exim-4.92.1.tar.xz 1767976 BLAKE2B fb5bdb8762f16e30c43c7899e5fb5b459bb5e910458f970d20a5cb26cdde842d87a1f8150e4c0f9e931fa277e2f33a0fb8a6d478b5bf871d03a12ebd06c36d67 SHA512 fd43448db0aa5139f8b459322b95e258f232ac8a4bf21a19099c7768329ec20c344c4e0d8dd2e98c33a192a5f97d7666a746de2c87bdfb8da42c625c985d7e05 |
23 |
DIST exim-4.92.2.tar.xz 1772688 BLAKE2B 618c70e26811d0e6d453a4b88ab1cdb9e337a9ca8ceec50aee665b1493c75157001483cf9721e3d57313a90910d2605717b2c4be4174c2897b3f992af01c1c26 SHA512 d27aca4d4e9df267b0afcbe7b3f74c9ca6e96e7e6eb4d2f86ff00b0e2234eaec90271405eb387a36a2e0d4ec5597b2920753f85318a5618ddbc8af475a7d81cd |
24 |
+DIST exim-4.92.3.tar.xz 1773156 BLAKE2B 7866c23c862f5b5aadac709279f9ed376e526e90e8ca09d41c1789041ec0a3ecd48f8d2237e4d462e547efa2178babd5942d3142fef7419e16d1707fe23fa226 SHA512 ca6d6f50653502345511b683859b33aa02faa48454fb2100ff89fed3dcb8af8933e7bce68939365fdee42f96eec0c3b135cf748f4581e92a62be0f0ab093868a |
25 |
DIST exim-4.92.tar.xz 1767136 BLAKE2B 6c97578807073a782112218c65de460cc94f046d807eddc7330f2f67266c0ef341ded61050a16aca13c88e606a923a9e08033c8bfb618a7ef34b3d2ea6db32ca SHA512 62c327e6184a358ba7f0dbc38b44d2537234be91727a5bfac97e74af64a8d77e376b3221dcfdd8f6eca7d812f9233595503dc6e50e2972bed40a1b74eb209c31 |
26 |
DIST exim-pdf-4.92.1.tar.xz 2038948 BLAKE2B 6624fb8930944f79e0c7e52a001727cfcff508ac69cb4107247201b8598d6e223cac7c7eda14c3102d0eabc151a547b6cc5ef11a6c4a830f31dfd88e24907c1d SHA512 437b868cd7dedae59e32b9245c8c1ca3375605eb4911846bc3508b627acf32c99bda644b3c3e84eb539a39b3c2cc4f83314eebe55160b3da617ccaec2f1623a2 |
27 |
DIST exim-pdf-4.92.2.tar.xz 2039468 BLAKE2B 3542bb5d38267bb06728ada72cfa89f06027b917799e743a1764cb7568cf0ba4cdbc5b40738c3ae41c9540d348810b388d74ad315a201f2740a5a0b79e83f904 SHA512 da90354cd8133103f08b978dd0422fd1a00e5866cd3f40e523d06875fb8b31163d7fe9791f1cf81d15bc63b16fc7f6bb98cf28c3036d054464336c07245b3c91 |
28 |
+DIST exim-pdf-4.92.3.tar.xz 2039436 BLAKE2B 8d20e7f0ebfcb573d08b490737923afc2cd2d5837f5c91bd2f3e6b5e637d86a5d5a59123c57ba9219ead675c72bfc46351d5b705d9533fab80bedeeca8bdd580 SHA512 3245a627a924db92e5a50e842e096731d08284f757274b5083ea234707c493abd6f27a3b34a2025e3acff167260df0f4ebe68b9f5832920c5f22c258143ab43f |
29 |
DIST exim-pdf-4.92.tar.xz 2038812 BLAKE2B d5966a27f980a2ceb31293d92049a6691a08262bd20ae7315f41929f0d7a45b5d66c7000f9596b193e74d0c17f91c56a3262602047673c49649f1cad6b216547 SHA512 3a40818025fceaa7ac17f8e7ce06a61e3cf65267c821aea93e1a1a659782b047ab177b88a38c9b2271c0a296e1dc7939e23fe0f89415a11cd45693cb8af10c15 |
30 |
DIST system_filter.exim.gz 3075 BLAKE2B d05e872b5cef377d29126cda03fc0a74c8777b2119b76ff43da6e8de808035eb9bfcb034a85d81824f135d484e864bfc0629fc1af2c228a7277d5ee7cf9cde79 SHA512 cb358d3ce2499a0bb5920d962a06f2af8486e55ec90c8c928bd8e3aefb279aa57f5f960d5adfcef68bd94110b405eaa144e9629cfe6014a529c79c544600bbf3 |
31 |
|
32 |
diff --git a/mail-mta/exim/exim-4.92.3.ebuild b/mail-mta/exim/exim-4.92.3.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..1217a52cf51 |
35 |
--- /dev/null |
36 |
+++ b/mail-mta/exim/exim-4.92.3.ebuild |
37 |
@@ -0,0 +1,582 @@ |
38 |
+# Copyright 1999-2019 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI="7" |
42 |
+ |
43 |
+inherit db-use toolchain-funcs multilib pam systemd |
44 |
+ |
45 |
+IUSE="arc dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl dsn elibc_glibc exiscan-acl gnutls idn ipv6 ldap libressl lmtp maildir mbx mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl selinux spf sqlite srs ssl syslog tcpd +tpda X" |
46 |
+REQUIRED_USE=" |
47 |
+ arc? ( dkim spf ) |
48 |
+ dane? ( ssl !gnutls ) |
49 |
+ dmarc? ( dkim spf ) |
50 |
+ gnutls? ( ssl ) |
51 |
+ pkcs11? ( ssl ) |
52 |
+ spf? ( exiscan-acl ) |
53 |
+ srs? ( exiscan-acl ) |
54 |
+ !ssl? ( !dkim ) |
55 |
+" |
56 |
+# NOTE on USE="gnutls dane", gnutls[dane] is masked in base, unmasked |
57 |
+# for x86 and amd64 only, due to this, repoman won't allow depending on |
58 |
+# gnutls[dane] for all else. Because we cannot express USE=dane when |
59 |
+# USE=gnutls is in effect only in package.use.mask, the only option we |
60 |
+# have left is to a) ignore the dependency (but that results in bug |
61 |
+# #661164) or b) mask the usage of USE=dane with USE=gnutls. Both are |
62 |
+# incorrect, but b) is the only "correct" view from repoman. |
63 |
+ |
64 |
+COMM_URI="https://downloads.exim.org/exim4$([[ ${PV} == *_rc* ]] && echo /test)" |
65 |
+ |
66 |
+DESCRIPTION="A highly configurable, drop-in replacement for sendmail" |
67 |
+SRC_URI="${COMM_URI}/${P//rc/RC}.tar.xz |
68 |
+ mirror://gentoo/system_filter.exim.gz |
69 |
+ doc? ( ${COMM_URI}/${PN}-pdf-${PV//rc/RC}.tar.xz )" |
70 |
+HOMEPAGE="https://www.exim.org/" |
71 |
+ |
72 |
+SLOT="0" |
73 |
+LICENSE="GPL-2" |
74 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-solaris" |
75 |
+ |
76 |
+COMMON_DEPEND=">=sys-apps/sed-4.0.5 |
77 |
+ ( >=sys-libs/db-3.2:= <sys-libs/db-6:= ) |
78 |
+ dev-libs/libpcre |
79 |
+ idn? ( net-dns/libidn:= net-dns/libidn2:= ) |
80 |
+ perl? ( dev-lang/perl:= ) |
81 |
+ pam? ( virtual/pam ) |
82 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
83 |
+ ssl? ( |
84 |
+ !libressl? ( dev-libs/openssl:0= ) |
85 |
+ libressl? ( dev-libs/libressl:= ) |
86 |
+ ) |
87 |
+ gnutls? ( |
88 |
+ net-libs/gnutls:0=[pkcs11?] |
89 |
+ dev-libs/libtasn1 |
90 |
+ ) |
91 |
+ ldap? ( >=net-nds/openldap-2.0.7 ) |
92 |
+ nis? ( |
93 |
+ elibc_glibc? ( |
94 |
+ net-libs/libtirpc |
95 |
+ >=net-libs/libnsl-1:= |
96 |
+ ) |
97 |
+ ) |
98 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
99 |
+ postgres? ( dev-db/postgresql:= ) |
100 |
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.26-r2 ) |
101 |
+ redis? ( dev-libs/hiredis ) |
102 |
+ spf? ( >=mail-filter/libspf2-1.2.5-r1 ) |
103 |
+ dmarc? ( mail-filter/opendmarc ) |
104 |
+ srs? ( mail-filter/libsrs_alt ) |
105 |
+ X? ( |
106 |
+ x11-libs/libX11 |
107 |
+ x11-libs/libXmu |
108 |
+ x11-libs/libXt |
109 |
+ x11-libs/libXaw |
110 |
+ ) |
111 |
+ sqlite? ( dev-db/sqlite ) |
112 |
+ radius? ( net-dialup/freeradius-client ) |
113 |
+ virtual/libiconv |
114 |
+ elibc_glibc? ( net-libs/libnsl ) |
115 |
+ " |
116 |
+ # added X check for #57206 |
117 |
+BDEPEND="virtual/pkgconfig" |
118 |
+DEPEND="${COMMON_DEPEND}" |
119 |
+RDEPEND="${COMMON_DEPEND} |
120 |
+ !mail-mta/courier |
121 |
+ !mail-mta/esmtp |
122 |
+ !mail-mta/mini-qmail |
123 |
+ !<mail-mta/msmtp-1.4.19-r1 |
124 |
+ !>=mail-mta/msmtp-1.4.19-r1[mta] |
125 |
+ !mail-mta/netqmail |
126 |
+ !mail-mta/nullmailer |
127 |
+ !mail-mta/postfix |
128 |
+ !mail-mta/qmail-ldap |
129 |
+ !mail-mta/sendmail |
130 |
+ !mail-mta/opensmtpd |
131 |
+ !<mail-mta/ssmtp-2.64-r2 |
132 |
+ !>=mail-mta/ssmtp-2.64-r2[mta] |
133 |
+ !net-mail/mailwrapper |
134 |
+ >=net-mail/mailbase-0.00-r5 |
135 |
+ virtual/logger |
136 |
+ dcc? ( mail-filter/dcc ) |
137 |
+ selinux? ( sec-policy/selinux-exim ) |
138 |
+ " |
139 |
+ |
140 |
+PATCHES=( |
141 |
+ "${FILESDIR}"/exim-4.69-r1.27021.patch |
142 |
+ "${FILESDIR}"/exim-4.92-localscan_dlopen.patch |
143 |
+) |
144 |
+ |
145 |
+S=${WORKDIR}/${P//rc/RC} |
146 |
+ |
147 |
+src_prepare() { |
148 |
+ # Legacy patches which need a respin for -p1 |
149 |
+ eapply -p0 "${FILESDIR}"/exim-4.14-tail.patch |
150 |
+ eapply -p0 "${FILESDIR}"/exim-4.74-radius-db-ENV-clash.patch # 287426 |
151 |
+ eapply -p0 "${FILESDIR}"/exim-4.82-makefile-freebsd.patch # 235785 |
152 |
+ eapply -p0 "${FILESDIR}"/exim-4.89-as-needed-ldflags.patch # 352265, 391279 |
153 |
+ eapply -p0 "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591 |
154 |
+ eapply -p2 "${FILESDIR}"/exim-4.92-fix-eval-expansion-32bit.patch #687554 |
155 |
+ |
156 |
+ if use maildir ; then |
157 |
+ eapply "${FILESDIR}"/exim-4.20-maildir.patch |
158 |
+ else |
159 |
+ eapply -p0 "${FILESDIR}"/exim-4.80-spool-mail-group.patch # 438606 |
160 |
+ fi |
161 |
+ |
162 |
+ default |
163 |
+ |
164 |
+ # user Exim believes it should be |
165 |
+ MAILUSER=mail |
166 |
+ MAILGROUP=mail |
167 |
+ if use prefix && [[ ${EUID} != 0 ]] ; then |
168 |
+ MAILUSER=$(id -un) |
169 |
+ MAILGROUP=$(id -gn) |
170 |
+ fi |
171 |
+} |
172 |
+ |
173 |
+src_configure() { |
174 |
+ # general config and paths |
175 |
+ |
176 |
+ local aliases="${EPREFIX}/etc/mail/aliases" |
177 |
+ sed -i \ |
178 |
+ -e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${aliases}'" \ |
179 |
+ src/configure.default || die |
180 |
+ |
181 |
+ sed -i -e 's/^buildname=.*/buildname=exim-gentoo/' Makefile || die |
182 |
+ |
183 |
+ if use elibc_musl; then |
184 |
+ sed -i -e 's/^LIBS = -lnsl/LIBS =/g' OS/Makefile-Linux || die |
185 |
+ fi |
186 |
+ |
187 |
+ local conffile="${EPREFIX}/etc/exim/exim.conf" |
188 |
+ sed -e "48i\CFLAGS=${CFLAGS}" \ |
189 |
+ -e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \ |
190 |
+ -e "s:EXIM_USER=:EXIM_USER=${MAILUSER}:" \ |
191 |
+ -e "s:CONFIGURE_FILE=.*$:CONFIGURE_FILE=${conffile}:" \ |
192 |
+ -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ |
193 |
+ -e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ |
194 |
+ src/EDITME > Local/Makefile || die |
195 |
+ |
196 |
+ # work on Local/Makefile from now on |
197 |
+ cd Local |
198 |
+ |
199 |
+ cat >> Makefile <<- EOC |
200 |
+ INFO_DIRECTORY=${EPREFIX}/usr/share/info |
201 |
+ PID_FILE_PATH=${EPREFIX}/run/exim.pid |
202 |
+ SPOOL_DIRECTORY=${EPREFIX}/var/spool/exim |
203 |
+ HAVE_ICONV=yes |
204 |
+ EOC |
205 |
+ |
206 |
+ # if we use libiconv, now is the time to tell so |
207 |
+ use !elibc_glibc && use !elibc_musl && \ |
208 |
+ echo "EXTRALIBS_EXIM=-liconv" >> Makefile |
209 |
+ |
210 |
+ # support for IPv6 |
211 |
+ if use ipv6; then |
212 |
+ cat >> Makefile <<- EOC |
213 |
+ HAVE_IPV6=YES |
214 |
+ EOC |
215 |
+ fi |
216 |
+ |
217 |
+ # support i18n/IDNA |
218 |
+ if use idn; then |
219 |
+ cat >> Makefile <<- EOC |
220 |
+ SUPPORT_I18N=yes |
221 |
+ SUPPORT_I18N_2008=yes |
222 |
+ EXTRALIBS_EXIM += -lidn -lidn2 |
223 |
+ EOC |
224 |
+ fi |
225 |
+ |
226 |
+ # |
227 |
+ # mail storage formats |
228 |
+ # |
229 |
+ |
230 |
+ # mailstore is Exim's traditional storage format |
231 |
+ cat >> Makefile <<- EOC |
232 |
+ SUPPORT_MAILSTORE=yes |
233 |
+ EOC |
234 |
+ |
235 |
+ # mbox |
236 |
+ if use mbx; then |
237 |
+ cat >> Makefile <<- EOC |
238 |
+ SUPPORT_MBX=yes |
239 |
+ EOC |
240 |
+ fi |
241 |
+ |
242 |
+ # maildir |
243 |
+ if use maildir; then |
244 |
+ cat >> Makefile <<- EOC |
245 |
+ SUPPORT_MAILDIR=yes |
246 |
+ EOC |
247 |
+ fi |
248 |
+ |
249 |
+ # |
250 |
+ # lookup methods |
251 |
+ |
252 |
+ # use the "native" interfaces to the DBM and CDB libraries, support |
253 |
+ # passwd and directory lookups by default |
254 |
+ local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2" |
255 |
+ cat >> Makefile <<- EOC |
256 |
+ USE_DB=yes |
257 |
+ CFLAGS+=-I$(db_includedir ${DB_VERS}) |
258 |
+ DBMLIB=-l$(db_libname ${DB_VERS}) |
259 |
+ LOOKUP_CDB=yes |
260 |
+ LOOKUP_PASSWD=yes |
261 |
+ LOOKUP_DSEARCH=yes |
262 |
+ EOC |
263 |
+ |
264 |
+ if ! use dnsdb; then |
265 |
+ # DNSDB lookup is enabled by default |
266 |
+ sed -i -e 's:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:' Makefile || die |
267 |
+ fi |
268 |
+ |
269 |
+ if use ldap; then |
270 |
+ cat >> Makefile <<- EOC |
271 |
+ LOOKUP_LDAP=yes |
272 |
+ LDAP_LIB_TYPE=OPENLDAP2 |
273 |
+ LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/ldap |
274 |
+ LOOKUP_LIBS += -lldap -llber |
275 |
+ EOC |
276 |
+ fi |
277 |
+ |
278 |
+ if use mysql; then |
279 |
+ cat >> Makefile <<- EOC |
280 |
+ LOOKUP_MYSQL=yes |
281 |
+ LOOKUP_INCLUDE += $(mysql_config --include) |
282 |
+ LOOKUP_LIBS += $(mysql_config --libs) |
283 |
+ EOC |
284 |
+ fi |
285 |
+ |
286 |
+ if use nis; then |
287 |
+ cat >> Makefile <<- EOC |
288 |
+ LOOKUP_NIS=yes |
289 |
+ LOOKUP_NISPLUS=yes |
290 |
+ EOC |
291 |
+ if use elibc_glibc ; then |
292 |
+ cat >> Makefile <<- EOC |
293 |
+ CFLAGS += -I"${EPREFIX}"/usr/include/tirpc |
294 |
+ EOC |
295 |
+ fi |
296 |
+ fi |
297 |
+ |
298 |
+ if use postgres; then |
299 |
+ cat >> Makefile <<- EOC |
300 |
+ LOOKUP_PGSQL=yes |
301 |
+ LOOKUP_INCLUDE += -I$(pg_config --includedir) |
302 |
+ LOOKUP_LIBS += -L$(pg_config --libdir) -lpq |
303 |
+ EOC |
304 |
+ fi |
305 |
+ |
306 |
+ if use sqlite; then |
307 |
+ cat >> Makefile <<- EOC |
308 |
+ LOOKUP_SQLITE=yes |
309 |
+ LOOKUP_SQLITE_PC=sqlite3 |
310 |
+ EOC |
311 |
+ fi |
312 |
+ |
313 |
+ if use redis; then |
314 |
+ cat >> Makefile <<- EOC |
315 |
+ LOOKUP_REDIS=yes |
316 |
+ LOOKUP_LIBS += -lhiredis |
317 |
+ EOC |
318 |
+ fi |
319 |
+ |
320 |
+ # Exim monitor, enabled by default, controlled via X USE-flag, |
321 |
+ # disable if not requested, bug #46778 |
322 |
+ if use X; then |
323 |
+ cp ../exim_monitor/EDITME eximon.conf || die |
324 |
+ else |
325 |
+ sed -i -e '/^EXIM_MONITOR=/s/^/# /' Makefile || die |
326 |
+ fi |
327 |
+ |
328 |
+ # |
329 |
+ # features |
330 |
+ # |
331 |
+ |
332 |
+ # content scanning support |
333 |
+ if use exiscan-acl; then |
334 |
+ cat >> Makefile <<- EOC |
335 |
+ WITH_CONTENT_SCAN=yes |
336 |
+ EOC |
337 |
+ fi |
338 |
+ |
339 |
+ # DomainKeys Identified Mail, RFC4871 |
340 |
+ if ! use dkim; then |
341 |
+ # DKIM is enabled by default |
342 |
+ cat >> Makefile <<- EOC |
343 |
+ DISABLE_DKIM=yes |
344 |
+ EOC |
345 |
+ fi |
346 |
+ |
347 |
+ # Per-Recipient-Data-Response |
348 |
+ if ! use prdr; then |
349 |
+ # PRDR is enabled by default |
350 |
+ cat >> Makefile <<- EOC |
351 |
+ DISABLE_PRDR=yes |
352 |
+ EOC |
353 |
+ fi |
354 |
+ |
355 |
+ # Transport post-delivery actions |
356 |
+ if use !tpda && use !dane; then |
357 |
+ # EVENT is enabled by default |
358 |
+ cat >> Makefile <<- EOC |
359 |
+ DISABLE_EVENT=yes |
360 |
+ EOC |
361 |
+ fi |
362 |
+ |
363 |
+ # log to syslog |
364 |
+ if use syslog; then |
365 |
+ local eximlog="${EPREFIX}/var/log/exim/exim_%s.log" |
366 |
+ sed -i \ |
367 |
+ -e "s:LOG_FILE_PATH=${eximlog}:LOG_FILE_PATH=syslog:" \ |
368 |
+ Makefile || die |
369 |
+ cat >> Makefile <<- EOC |
370 |
+ LOG_FILE_PATH=syslog |
371 |
+ EOC |
372 |
+ else |
373 |
+ cat >> Makefile <<- EOC |
374 |
+ LOG_FILE_PATH=${EPREFIX}/var/log/exim/exim_%s.log |
375 |
+ EOC |
376 |
+ fi |
377 |
+ |
378 |
+ # starttls support (ssl) |
379 |
+ if use ssl; then |
380 |
+ echo "SUPPORT_TLS=yes" >> Makefile |
381 |
+ if use gnutls; then |
382 |
+ echo "USE_GNUTLS=yes" >> Makefile |
383 |
+ echo "USE_GNUTLS_PC=gnutls" >> Makefile |
384 |
+ use pkcs11 || echo "AVOID_GNUTLS_PKCS11=yes" >> Makefile |
385 |
+ else |
386 |
+ echo "USE_OPENSSL_PC=openssl" >> Makefile |
387 |
+ fi |
388 |
+ fi |
389 |
+ |
390 |
+ # TCP wrappers |
391 |
+ if use tcpd; then |
392 |
+ cat >> Makefile <<- EOC |
393 |
+ USE_TCP_WRAPPERS=yes |
394 |
+ EXTRALIBS_EXIM += -lwrap |
395 |
+ EOC |
396 |
+ fi |
397 |
+ |
398 |
+ # Light Mail Transport Protocol |
399 |
+ if use lmtp; then |
400 |
+ cat >> Makefile <<- EOC |
401 |
+ TRANSPORT_LMTP=yes |
402 |
+ EOC |
403 |
+ fi |
404 |
+ |
405 |
+ # embedded Perl |
406 |
+ if use perl; then |
407 |
+ cat >> Makefile <<- EOC |
408 |
+ EXIM_PERL=perl.o |
409 |
+ EOC |
410 |
+ fi |
411 |
+ |
412 |
+ # dlfunc |
413 |
+ if use dlfunc; then |
414 |
+ cat >> Makefile <<- EOC |
415 |
+ EXPAND_DLFUNC=yes |
416 |
+ HAVE_LOCAL_SCAN=yes |
417 |
+ DLOPEN_LOCAL_SCAN=yes |
418 |
+ EOC |
419 |
+ fi |
420 |
+ |
421 |
+ # Proxy Protocol |
422 |
+ if use proxy; then |
423 |
+ cat >> Makefile <<- EOC |
424 |
+ SUPPORT_PROXY=yes |
425 |
+ EOC |
426 |
+ fi |
427 |
+ |
428 |
+ # DANE |
429 |
+ if use dane; then |
430 |
+ cat >> Makefile <<- EOC |
431 |
+ SUPPORT_DANE=yes |
432 |
+ EOC |
433 |
+ fi |
434 |
+ |
435 |
+ # Sender Policy Framework |
436 |
+ if use spf; then |
437 |
+ cat >> Makefile <<- EOC |
438 |
+ SUPPORT_SPF=yes |
439 |
+ EXTRALIBS_EXIM += -lspf2 |
440 |
+ EOC |
441 |
+ fi |
442 |
+ |
443 |
+ # |
444 |
+ # experimental features |
445 |
+ # |
446 |
+ |
447 |
+ # Authenticated Receive Chain |
448 |
+ if use arc; then |
449 |
+ echo "EXPERIMENTAL_ARC=yes">> Makefile |
450 |
+ fi |
451 |
+ |
452 |
+ # Distributed Checksum Clearinghouse |
453 |
+ if use dcc; then |
454 |
+ echo "EXPERIMENTAL_DCC=yes">> Makefile |
455 |
+ fi |
456 |
+ |
457 |
+ # Sender Rewriting Scheme |
458 |
+ if use srs; then |
459 |
+ cat >> Makefile <<- EOC |
460 |
+ EXPERIMENTAL_SRS=yes |
461 |
+ EXTRALIBS_EXIM += -lsrs_alt |
462 |
+ EOC |
463 |
+ fi |
464 |
+ |
465 |
+ # DMARC |
466 |
+ if use dmarc; then |
467 |
+ cat >> Makefile <<- EOC |
468 |
+ EXPERIMENTAL_DMARC=yes |
469 |
+ EXTRALIBS_EXIM += -lopendmarc |
470 |
+ EOC |
471 |
+ fi |
472 |
+ |
473 |
+ # Delivery Sender Notifications extra information in fail message |
474 |
+ if use dsn; then |
475 |
+ cat >> Makefile <<- EOC |
476 |
+ EXPERIMENTAL_DSN_INFO=yes |
477 |
+ EOC |
478 |
+ fi |
479 |
+ |
480 |
+ # |
481 |
+ # authentication (SMTP AUTH) |
482 |
+ # |
483 |
+ |
484 |
+ # standard bits |
485 |
+ cat >> Makefile <<- EOC |
486 |
+ AUTH_SPA=yes |
487 |
+ AUTH_CRAM_MD5=yes |
488 |
+ AUTH_PLAINTEXT=yes |
489 |
+ EOC |
490 |
+ |
491 |
+ # Cyrus SASL |
492 |
+ if use sasl; then |
493 |
+ cat >> Makefile <<- EOC |
494 |
+ CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/run/saslauthd/mux |
495 |
+ AUTH_CYRUS_SASL=yes |
496 |
+ AUTH_LIBS += -lsasl2 |
497 |
+ EOC |
498 |
+ fi |
499 |
+ |
500 |
+ # Dovecot |
501 |
+ if use dovecot-sasl; then |
502 |
+ cat >> Makefile <<- EOC |
503 |
+ AUTH_DOVECOT=yes |
504 |
+ EOC |
505 |
+ fi |
506 |
+ |
507 |
+ # Pluggable Authentication Modules |
508 |
+ if use pam; then |
509 |
+ cat >> Makefile <<- EOC |
510 |
+ SUPPORT_PAM=yes |
511 |
+ AUTH_LIBS += -lpam |
512 |
+ EOC |
513 |
+ fi |
514 |
+ |
515 |
+ # Radius |
516 |
+ if use radius; then |
517 |
+ cat >> Makefile <<- EOC |
518 |
+ RADIUS_CONFIG_FILE=${EPREFIX}/etc/radiusclient/radiusclient.conf |
519 |
+ RADIUS_LIB_TYPE=RADIUSCLIENTNEW |
520 |
+ AUTH_LIBS += -lfreeradius-client |
521 |
+ EOC |
522 |
+ fi |
523 |
+} |
524 |
+ |
525 |
+src_compile() { |
526 |
+ emake CC="$(tc-getCC)" HOSTCC="$(tc-getBUILD_CC)" \ |
527 |
+ AR="$(tc-getAR) cq" RANLIB="$(tc-getRANLIB)" FULLECHO='' \ |
528 |
+ || die "make failed" |
529 |
+} |
530 |
+ |
531 |
+src_install () { |
532 |
+ cd "${S}"/build-exim-gentoo || die |
533 |
+ dosbin exim |
534 |
+ if use X; then |
535 |
+ dosbin eximon.bin |
536 |
+ dosbin eximon |
537 |
+ fi |
538 |
+ fperms 4755 /usr/sbin/exim |
539 |
+ |
540 |
+ dosym exim /usr/sbin/sendmail |
541 |
+ dosym exim /usr/sbin/rsmtp |
542 |
+ dosym exim /usr/sbin/rmail |
543 |
+ dosym ../sbin/exim /usr/bin/mailq |
544 |
+ dosym ../sbin/exim /usr/bin/newaliases |
545 |
+ dosym ../sbin/sendmail /usr/lib/sendmail |
546 |
+ |
547 |
+ for i in exicyclog exim_dbmbuild exim_dumpdb exim_fixdb exim_lock \ |
548 |
+ exim_tidydb exinext exiwhat exigrep eximstats exiqsumm exiqgrep \ |
549 |
+ convert4r3 convert4r4 exipick |
550 |
+ do |
551 |
+ dosbin $i |
552 |
+ done |
553 |
+ |
554 |
+ dodoc -r "${S}"/doc/. |
555 |
+ doman "${S}"/doc/exim.8 |
556 |
+ use dsn && dodoc "${S}"/README.DSN |
557 |
+ use doc && dodoc "${WORKDIR}"/${PN}-pdf-${PV//rc/RC}/doc/*.pdf |
558 |
+ |
559 |
+ # conf files |
560 |
+ insinto /etc/exim |
561 |
+ newins "${S}"/src/configure.default exim.conf.dist |
562 |
+ if use exiscan-acl; then |
563 |
+ newins "${S}"/src/configure.default exim.conf.exiscan-acl |
564 |
+ fi |
565 |
+ doins "${WORKDIR}"/system_filter.exim |
566 |
+ doins "${FILESDIR}"/auth_conf.sub |
567 |
+ |
568 |
+ pamd_mimic system-auth exim auth account |
569 |
+ |
570 |
+ # headers, #436406 |
571 |
+ if use dlfunc ; then |
572 |
+ # fixup includes so they actually can be found when including |
573 |
+ sed -i \ |
574 |
+ -e '/#include "\(config\|store\|mytypes\).h"/s:"\(.\+\)":<exim/\1>:' \ |
575 |
+ local_scan.h || die |
576 |
+ insinto /usr/include/exim |
577 |
+ doins {config,local_scan}.h ../src/{mytypes,store}.h |
578 |
+ fi |
579 |
+ |
580 |
+ insinto /etc/logrotate.d |
581 |
+ newins "${FILESDIR}/exim.logrotate" exim |
582 |
+ |
583 |
+ newinitd "${FILESDIR}"/exim.rc10 exim |
584 |
+ newconfd "${FILESDIR}"/exim.confd exim |
585 |
+ |
586 |
+ systemd_dounit \ |
587 |
+ "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket} |
588 |
+ systemd_newunit \ |
589 |
+ "${FILESDIR}"/exim_at.service 'exim@.service' |
590 |
+ systemd_newunit \ |
591 |
+ "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service' |
592 |
+ |
593 |
+ diropts -m 0750 -o ${MAILUSER} -g ${MAILGROUP} |
594 |
+ keepdir /var/log/${PN} |
595 |
+} |
596 |
+ |
597 |
+pkg_postinst() { |
598 |
+ if [[ ! -f ${EROOT}/etc/exim/exim.conf ]] ; then |
599 |
+ einfo "${EROOT}/etc/exim/system_filter.exim is a sample system_filter." |
600 |
+ einfo "${EROOT}/etc/exim/auth_conf.sub contains the configuration sub" |
601 |
+ einfo "for using smtp auth." |
602 |
+ einfo "Please create ${EROOT}/etc/exim/exim.conf from" |
603 |
+ einfo " ${EROOT}/etc/exim/exim.conf.dist." |
604 |
+ fi |
605 |
+ if use dcc ; then |
606 |
+ einfo "DCC support is experimental, you can find some limited" |
607 |
+ einfo "documentation at the bottom of this prerelease message:" |
608 |
+ einfo "http://article.gmane.org/gmane.mail.exim.devel/3579" |
609 |
+ fi |
610 |
+ use srs && einfo "SRS support is experimental" |
611 |
+ if use dmarc ; then |
612 |
+ einfo "DMARC support is experimental. See global settings to" |
613 |
+ einfo "configure DMARC, for usage see the documentation at " |
614 |
+ einfo "experimental-spec.txt." |
615 |
+ fi |
616 |
+ use dsn && einfo "extra information in fail DSN message is experimental" |
617 |
+ elog "The obsolete acl condition 'demime' is removed, the replacements" |
618 |
+ elog "are the ACLs acl_smtp_mime and acl_not_smtp_mime" |
619 |
+} |