1 |
commit: 43159dcf782969bbc4320d786a87f127cb02d5df |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 1 16:08:18 2021 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 1 16:08:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43159dcf |
7 |
|
8 |
mail-mta/exim-4.94.2-r6: add patch to fix crash on resolve |
9 |
|
10 |
Closes: https://bugs.gentoo.org/799368 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.2 |
12 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
13 |
|
14 |
mail-mta/exim/exim-4.94.2-r6.ebuild | 665 +++++++++++++++++++++ |
15 |
.../exim/files/exim-4.94.2-fix-crash-resolve.patch | 24 + |
16 |
2 files changed, 689 insertions(+) |
17 |
|
18 |
diff --git a/mail-mta/exim/exim-4.94.2-r6.ebuild b/mail-mta/exim/exim-4.94.2-r6.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..fd36c6e44c7 |
21 |
--- /dev/null |
22 |
+++ b/mail-mta/exim/exim-4.94.2-r6.ebuild |
23 |
@@ -0,0 +1,665 @@ |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI="7" |
28 |
+ |
29 |
+inherit db-use toolchain-funcs multilib pam systemd |
30 |
+ |
31 |
+IUSE="arc berkdb +dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl |
32 |
+dsn elibc_glibc exiscan-acl gdbm gnutls idn ipv6 ldap lmtp maildir mbx |
33 |
+mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl selinux |
34 |
+socks5 spf sqlite srs +srs-alt srs-native +ssl syslog tdb tcpd +tpda X" |
35 |
+REQUIRED_USE=" |
36 |
+ arc? ( dkim spf ) |
37 |
+ dane? ( ssl !gnutls ) |
38 |
+ dmarc? ( dkim spf ) |
39 |
+ dkim? ( ssl !gnutls ) |
40 |
+ gnutls? ( ssl ) |
41 |
+ pkcs11? ( ssl ) |
42 |
+ spf? ( exiscan-acl ) |
43 |
+ srs? ( |
44 |
+ exiscan-acl |
45 |
+ ^^ ( srs-alt srs-native ) |
46 |
+ ) |
47 |
+ || ( berkdb gdbm tdb ) |
48 |
+" |
49 |
+# NOTE on USE="gnutls dane", gnutls[dane] is masked in base, unmasked |
50 |
+# for x86 and amd64 only, due to this, repoman won't allow depending on |
51 |
+# gnutls[dane] for all else. Because we cannot express USE=dane when |
52 |
+# USE=gnutls is in effect only in package.use.mask, the only option we |
53 |
+# have left is to a) ignore the dependency (but that results in bug |
54 |
+# #661164) or b) mask the usage of USE=dane with USE=gnutls. Both are |
55 |
+# incorrect, but b) is the only "correct" view from repoman. |
56 |
+# We cannot express a required use for berkdb/gdbm/tdb correctly because |
57 |
+# berkdb and gdbm are both enabled in base profile |
58 |
+ |
59 |
+SDIR=$([[ ${PV} == *_rc* ]] && echo /test |
60 |
+ [[ ${PV} == *.*.*.* ]] && echo /fixes) |
61 |
+COMM_URI="https://downloads.exim.org/exim4${SDIR}" |
62 |
+ |
63 |
+DESCRIPTION="A highly configurable, drop-in replacement for sendmail" |
64 |
+SRC_URI="${COMM_URI}/${P//_rc/-RC}.tar.xz |
65 |
+ mirror://gentoo/system_filter.exim.gz |
66 |
+ doc? ( ${COMM_URI}/${PN}-pdf-${PV//_rc/-RC}.tar.xz )" |
67 |
+HOMEPAGE="https://www.exim.org/" |
68 |
+ |
69 |
+SLOT="0" |
70 |
+LICENSE="GPL-2" |
71 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-solaris" |
72 |
+ |
73 |
+COMMON_DEPEND=">=sys-apps/sed-4.0.5 |
74 |
+ dev-libs/libpcre:= |
75 |
+ tdb? ( sys-libs/tdb:= ) |
76 |
+ !tdb? ( berkdb? ( >=sys-libs/db-3.2:= <sys-libs/db-6:= ) ) |
77 |
+ !tdb? ( !berkdb? ( sys-libs/gdbm:= ) ) |
78 |
+ idn? ( net-dns/libidn:= net-dns/libidn2:= ) |
79 |
+ perl? ( dev-lang/perl:= ) |
80 |
+ pam? ( sys-libs/pam ) |
81 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
82 |
+ ssl? ( |
83 |
+ gnutls? ( |
84 |
+ net-libs/gnutls:0=[pkcs11?] |
85 |
+ dev-libs/libtasn1 |
86 |
+ ) |
87 |
+ !gnutls? ( |
88 |
+ dev-libs/openssl:0= |
89 |
+ ) |
90 |
+ ) |
91 |
+ ldap? ( >=net-nds/openldap-2.0.7 ) |
92 |
+ elibc_glibc? ( |
93 |
+ net-libs/libnsl |
94 |
+ nis? ( |
95 |
+ net-libs/libtirpc |
96 |
+ >=net-libs/libnsl-1:= |
97 |
+ ) |
98 |
+ ) |
99 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
100 |
+ postgres? ( dev-db/postgresql:= ) |
101 |
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.26-r2 ) |
102 |
+ redis? ( dev-libs/hiredis ) |
103 |
+ spf? ( >=mail-filter/libspf2-1.2.5-r1 ) |
104 |
+ dmarc? ( mail-filter/opendmarc:= ) |
105 |
+ srs? ( srs-alt? ( mail-filter/libsrs_alt ) ) |
106 |
+ X? ( |
107 |
+ x11-libs/libX11 |
108 |
+ x11-libs/libXmu |
109 |
+ x11-libs/libXt |
110 |
+ x11-libs/libXaw |
111 |
+ ) |
112 |
+ sqlite? ( dev-db/sqlite ) |
113 |
+ radius? ( net-dialup/freeradius-client ) |
114 |
+ virtual/libcrypt:= |
115 |
+ virtual/libiconv |
116 |
+ " |
117 |
+ # added X check for #57206 |
118 |
+BDEPEND="virtual/pkgconfig" |
119 |
+DEPEND="${COMMON_DEPEND}" |
120 |
+RDEPEND="${COMMON_DEPEND} |
121 |
+ !mail-mta/courier |
122 |
+ !mail-mta/esmtp |
123 |
+ !mail-mta/mini-qmail |
124 |
+ !<mail-mta/msmtp-1.4.19-r1 |
125 |
+ !>=mail-mta/msmtp-1.4.19-r1[mta] |
126 |
+ !mail-mta/netqmail |
127 |
+ !mail-mta/nullmailer |
128 |
+ !mail-mta/postfix |
129 |
+ !mail-mta/qmail-ldap |
130 |
+ !mail-mta/sendmail |
131 |
+ !mail-mta/opensmtpd |
132 |
+ !<mail-mta/ssmtp-2.64-r2 |
133 |
+ !>=mail-mta/ssmtp-2.64-r2[mta] |
134 |
+ !net-mail/mailwrapper |
135 |
+ >=net-mail/mailbase-0.00-r5 |
136 |
+ virtual/logger |
137 |
+ dcc? ( mail-filter/dcc ) |
138 |
+ selinux? ( sec-policy/selinux-exim ) |
139 |
+ " |
140 |
+ |
141 |
+S=${WORKDIR}/${P//_rc/-RC} |
142 |
+ |
143 |
+src_prepare() { |
144 |
+ # Legacy patches which need a respin for -p1 |
145 |
+ eapply -p0 "${FILESDIR}"/exim-4.14-tail.patch |
146 |
+ eapply -p0 "${FILESDIR}"/exim-4.74-radius-db-ENV-clash.patch # 287426 |
147 |
+ eapply "${FILESDIR}"/exim-4.93-as-needed-ldflags.patch # 352265, 391279 |
148 |
+ eapply -p0 "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591 |
149 |
+ eapply "${FILESDIR}"/exim-4.69-r1.27021.patch |
150 |
+ eapply "${FILESDIR}"/exim-4.94-localscan_dlopen.patch |
151 |
+ eapply "${FILESDIR}"/exim-4.94.2-fix-crash-resolve.patch # 799368 upstr |
152 |
+ |
153 |
+ # for this reason we have a := dep on opendmarc, they changed their |
154 |
+ # API in a minor release |
155 |
+ if use dmarc && has_version ">=mail-filter/opendmarc-1.4" ; then |
156 |
+ eapply "${FILESDIR}"/exim-4.94-opendmarc-1.4.patch |
157 |
+ fi |
158 |
+ |
159 |
+ if use maildir ; then |
160 |
+ eapply "${FILESDIR}"/exim-4.94-maildir.patch |
161 |
+ else |
162 |
+ eapply -p0 "${FILESDIR}"/exim-4.80-spool-mail-group.patch # 438606 |
163 |
+ fi |
164 |
+ |
165 |
+ eapply_user |
166 |
+ |
167 |
+ # user Exim believes it should be |
168 |
+ MAILUSER=mail |
169 |
+ MAILGROUP=mail |
170 |
+ if use prefix && [[ ${EUID} != 0 ]] ; then |
171 |
+ MAILUSER=$(id -un) |
172 |
+ MAILGROUP=$(id -gn) |
173 |
+ fi |
174 |
+} |
175 |
+ |
176 |
+src_configure() { |
177 |
+ # general config and paths |
178 |
+ |
179 |
+ local aliases="${EPREFIX}/etc/mail/aliases" |
180 |
+ sed -i \ |
181 |
+ -e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${aliases}'" \ |
182 |
+ src/configure.default || die |
183 |
+ |
184 |
+ sed -i -e 's/^buildname=.*/buildname=exim-gentoo/' Makefile || die |
185 |
+ |
186 |
+ if use elibc_musl; then |
187 |
+ sed -i -e 's/^LIBS = -lnsl/LIBS =/g' OS/Makefile-Linux || die |
188 |
+ fi |
189 |
+ |
190 |
+ local conffile="${EPREFIX}/etc/exim/exim.conf" |
191 |
+ sed -e "48i\CFLAGS=${CFLAGS}" \ |
192 |
+ -e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \ |
193 |
+ -e "s;EXIM_USER=;EXIM_USER=ref:${MAILUSER};" \ |
194 |
+ -e "s:CONFIGURE_FILE=.*$:CONFIGURE_FILE=${conffile}:" \ |
195 |
+ -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ |
196 |
+ -e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ |
197 |
+ src/EDITME > Local/Makefile || die |
198 |
+ |
199 |
+ # work on Local/Makefile from now on |
200 |
+ cd Local |
201 |
+ |
202 |
+ cat >> Makefile <<- EOC |
203 |
+ INFO_DIRECTORY=${EPREFIX}/usr/share/info |
204 |
+ PID_FILE_PATH=${EPREFIX}/run/exim.pid |
205 |
+ SPOOL_DIRECTORY=${EPREFIX}/var/spool/exim |
206 |
+ HAVE_ICONV=yes |
207 |
+ EOC |
208 |
+ |
209 |
+ # configure db implementation, Exim always needs one for its hints |
210 |
+ # database, we prefer tdb and gdbm, since bdb is kind of getting |
211 |
+ # less and less support |
212 |
+ if use tdb ; then |
213 |
+ cat >> Makefile <<- EOC |
214 |
+ USE_TDB=yes |
215 |
+ DBMLIB = -ltdb |
216 |
+ EOC |
217 |
+ sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die |
218 |
+ sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die |
219 |
+ elif use berkdb ; then |
220 |
+ # use the "native" interfaces to the DBM and CDB libraries, support |
221 |
+ # passwd and directory lookups by default |
222 |
+ local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2" |
223 |
+ cat >> Makefile <<- EOC |
224 |
+ USE_DB=yes |
225 |
+ # keep include in CFLAGS because exim.h -> dbstuff.h -> db.h |
226 |
+ CFLAGS += -I$(db_includedir ${DB_VERS}) |
227 |
+ DBMLIB = -l$(db_libname ${DB_VERS}) |
228 |
+ EOC |
229 |
+ sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die |
230 |
+ sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die |
231 |
+ else # must be gdbm via required_use |
232 |
+ cat >> Makefile <<- EOC |
233 |
+ USE_GDBM=yes |
234 |
+ DBMLIB = -lgdbm |
235 |
+ EOC |
236 |
+ sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die |
237 |
+ sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die |
238 |
+ fi |
239 |
+ |
240 |
+ # if we use libiconv, now is the time to tell so |
241 |
+ if use !elibc_glibc && use !elibc_musl ; then |
242 |
+ cat >> Makefile <<- EOC |
243 |
+ EXTRALIBS_EXIM=-liconv |
244 |
+ EOC |
245 |
+ fi |
246 |
+ |
247 |
+ # support for IPv6 |
248 |
+ if use ipv6; then |
249 |
+ cat >> Makefile <<- EOC |
250 |
+ HAVE_IPV6=YES |
251 |
+ EOC |
252 |
+ fi |
253 |
+ |
254 |
+ # support i18n/IDNA |
255 |
+ if use idn; then |
256 |
+ cat >> Makefile <<- EOC |
257 |
+ SUPPORT_I18N=yes |
258 |
+ SUPPORT_I18N_2008=yes |
259 |
+ EXTRALIBS_EXIM += -lidn -lidn2 |
260 |
+ EOC |
261 |
+ fi |
262 |
+ |
263 |
+ # |
264 |
+ # mail storage formats |
265 |
+ # |
266 |
+ |
267 |
+ # mailstore is Exim's traditional storage format |
268 |
+ cat >> Makefile <<- EOC |
269 |
+ SUPPORT_MAILSTORE=yes |
270 |
+ EOC |
271 |
+ |
272 |
+ # mbox |
273 |
+ if use mbx; then |
274 |
+ cat >> Makefile <<- EOC |
275 |
+ SUPPORT_MBX=yes |
276 |
+ EOC |
277 |
+ fi |
278 |
+ |
279 |
+ # maildir |
280 |
+ if use maildir; then |
281 |
+ cat >> Makefile <<- EOC |
282 |
+ SUPPORT_MAILDIR=yes |
283 |
+ EOC |
284 |
+ fi |
285 |
+ |
286 |
+ # |
287 |
+ # lookup methods |
288 |
+ # |
289 |
+ |
290 |
+ # support passwd and directory lookups by default |
291 |
+ cat >> Makefile <<- EOC |
292 |
+ LOOKUP_CDB=yes |
293 |
+ LOOKUP_PASSWD=yes |
294 |
+ LOOKUP_DSEARCH=yes |
295 |
+ EOC |
296 |
+ |
297 |
+ if ! use dnsdb; then |
298 |
+ # DNSDB lookup is enabled by default |
299 |
+ sed -i -e 's:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:' Makefile || die |
300 |
+ fi |
301 |
+ |
302 |
+ if use ldap; then |
303 |
+ cat >> Makefile <<- EOC |
304 |
+ LOOKUP_LDAP=yes |
305 |
+ LDAP_LIB_TYPE=OPENLDAP2 |
306 |
+ LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/ldap |
307 |
+ LOOKUP_LIBS += -lldap -llber |
308 |
+ EOC |
309 |
+ fi |
310 |
+ |
311 |
+ if use mysql; then |
312 |
+ cat >> Makefile <<- EOC |
313 |
+ LOOKUP_MYSQL=yes |
314 |
+ LOOKUP_INCLUDE += $(mysql_config --include) |
315 |
+ LOOKUP_LIBS += $(mysql_config --libs) |
316 |
+ EOC |
317 |
+ fi |
318 |
+ |
319 |
+ if use nis; then |
320 |
+ cat >> Makefile <<- EOC |
321 |
+ LOOKUP_NIS=yes |
322 |
+ LOOKUP_NISPLUS=yes |
323 |
+ EOC |
324 |
+ if use elibc_glibc ; then |
325 |
+ cat >> Makefile <<- EOC |
326 |
+ LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/tirpc |
327 |
+ LOOKUP_LIBS += -lnsl |
328 |
+ EOC |
329 |
+ fi |
330 |
+ fi |
331 |
+ |
332 |
+ if use postgres; then |
333 |
+ cat >> Makefile <<- EOC |
334 |
+ LOOKUP_PGSQL=yes |
335 |
+ LOOKUP_INCLUDE += -I$(pg_config --includedir) |
336 |
+ LOOKUP_LIBS += -L$(pg_config --libdir) -lpq |
337 |
+ EOC |
338 |
+ fi |
339 |
+ |
340 |
+ if use sqlite; then |
341 |
+ cat >> Makefile <<- EOC |
342 |
+ LOOKUP_SQLITE=yes |
343 |
+ LOOKUP_SQLITE_PC=sqlite3 |
344 |
+ EOC |
345 |
+ fi |
346 |
+ |
347 |
+ if use redis; then |
348 |
+ cat >> Makefile <<- EOC |
349 |
+ LOOKUP_REDIS=yes |
350 |
+ LOOKUP_LIBS += -lhiredis |
351 |
+ EOC |
352 |
+ fi |
353 |
+ |
354 |
+ # Exim monitor, enabled by default, controlled via X USE-flag, |
355 |
+ # disable if not requested, bug #46778 |
356 |
+ if use X; then |
357 |
+ cp ../exim_monitor/EDITME eximon.conf || die |
358 |
+ cat >> Makefile <<- EOC |
359 |
+ EXIM_MONITOR=eximon.bin |
360 |
+ EOC |
361 |
+ fi |
362 |
+ |
363 |
+ # |
364 |
+ # features |
365 |
+ # |
366 |
+ |
367 |
+ # content scanning support |
368 |
+ if use exiscan-acl; then |
369 |
+ cat >> Makefile <<- EOC |
370 |
+ WITH_CONTENT_SCAN=yes |
371 |
+ EOC |
372 |
+ fi |
373 |
+ |
374 |
+ # DomainKeys Identified Mail, RFC4871 |
375 |
+ if ! use dkim; then |
376 |
+ # DKIM is enabled by default |
377 |
+ cat >> Makefile <<- EOC |
378 |
+ DISABLE_DKIM=yes |
379 |
+ EOC |
380 |
+ fi |
381 |
+ |
382 |
+ # Per-Recipient-Data-Response |
383 |
+ if ! use prdr; then |
384 |
+ # PRDR is enabled by default |
385 |
+ cat >> Makefile <<- EOC |
386 |
+ DISABLE_PRDR=yes |
387 |
+ EOC |
388 |
+ fi |
389 |
+ |
390 |
+ # Transport post-delivery actions |
391 |
+ if use !tpda && use !dane; then |
392 |
+ # EVENT is enabled by default |
393 |
+ cat >> Makefile <<- EOC |
394 |
+ DISABLE_EVENT=yes |
395 |
+ EOC |
396 |
+ fi |
397 |
+ |
398 |
+ # log to syslog |
399 |
+ if use syslog; then |
400 |
+ local eximlog="${EPREFIX}/var/log/exim/exim_%s.log" |
401 |
+ sed -i \ |
402 |
+ -e "s:LOG_FILE_PATH=${eximlog}:LOG_FILE_PATH=syslog:" \ |
403 |
+ Makefile || die |
404 |
+ cat >> Makefile <<- EOC |
405 |
+ LOG_FILE_PATH=syslog |
406 |
+ EOC |
407 |
+ else |
408 |
+ cat >> Makefile <<- EOC |
409 |
+ LOG_FILE_PATH=${EPREFIX}/var/log/exim/exim_%s.log |
410 |
+ EOC |
411 |
+ fi |
412 |
+ |
413 |
+ # starttls support (ssl) |
414 |
+ if use ssl; then |
415 |
+ if use gnutls; then |
416 |
+ echo "USE_GNUTLS=yes" >> Makefile |
417 |
+ echo "USE_GNUTLS_PC=gnutls $(use dane && echo gnutls-dane)" \ |
418 |
+ >> Makefile |
419 |
+ use pkcs11 || echo "AVOID_GNUTLS_PKCS11=yes" >> Makefile |
420 |
+ else |
421 |
+ echo "USE_OPENSSL=yes" >> Makefile |
422 |
+ echo "USE_OPENSSL_PC=openssl" >> Makefile |
423 |
+ fi |
424 |
+ else |
425 |
+ echo "DISABLE_TLS=yes" >> Makefile |
426 |
+ fi |
427 |
+ |
428 |
+ # TCP wrappers |
429 |
+ if use tcpd; then |
430 |
+ cat >> Makefile <<- EOC |
431 |
+ USE_TCP_WRAPPERS=yes |
432 |
+ EXTRALIBS_EXIM += -lwrap |
433 |
+ EOC |
434 |
+ fi |
435 |
+ |
436 |
+ # Light Mail Transport Protocol |
437 |
+ if use lmtp; then |
438 |
+ cat >> Makefile <<- EOC |
439 |
+ TRANSPORT_LMTP=yes |
440 |
+ EOC |
441 |
+ fi |
442 |
+ |
443 |
+ # embedded Perl |
444 |
+ if use perl; then |
445 |
+ cat >> Makefile <<- EOC |
446 |
+ EXIM_PERL=perl.o |
447 |
+ EOC |
448 |
+ fi |
449 |
+ |
450 |
+ # dlfunc |
451 |
+ if use dlfunc; then |
452 |
+ cat >> Makefile <<- EOC |
453 |
+ EXPAND_DLFUNC=yes |
454 |
+ HAVE_LOCAL_SCAN=yes |
455 |
+ DLOPEN_LOCAL_SCAN=yes |
456 |
+ EOC |
457 |
+ fi |
458 |
+ |
459 |
+ # Proxy Protocol |
460 |
+ if use proxy; then |
461 |
+ cat >> Makefile <<- EOC |
462 |
+ SUPPORT_PROXY=yes |
463 |
+ EOC |
464 |
+ fi |
465 |
+ |
466 |
+ # SOCKS5 (outbound) proxy support |
467 |
+ if use socks5; then |
468 |
+ cat >> Makefile <<- EOC |
469 |
+ SUPPORT_SOCKS=yes |
470 |
+ EOC |
471 |
+ fi |
472 |
+ |
473 |
+ # DANE |
474 |
+ if use !dane; then |
475 |
+ # DANE is enabled by default |
476 |
+ sed -i -e 's:^SUPPORT_DANE=yes:# SUPPORT_DANE=yes:' Makefile || die |
477 |
+ fi |
478 |
+ |
479 |
+ # DMARC |
480 |
+ if use dmarc; then |
481 |
+ cat >> Makefile <<- EOC |
482 |
+ SUPPORT_DMARC=yes |
483 |
+ EXTRALIBS_EXIM += -lopendmarc |
484 |
+ EOC |
485 |
+ fi |
486 |
+ |
487 |
+ # Sender Policy Framework |
488 |
+ if use spf; then |
489 |
+ cat >> Makefile <<- EOC |
490 |
+ SUPPORT_SPF=yes |
491 |
+ EXTRALIBS_EXIM += -lspf2 |
492 |
+ EOC |
493 |
+ fi |
494 |
+ |
495 |
+ # |
496 |
+ # experimental features |
497 |
+ # |
498 |
+ |
499 |
+ # Authenticated Receive Chain |
500 |
+ if use arc; then |
501 |
+ echo "EXPERIMENTAL_ARC=yes">> Makefile |
502 |
+ fi |
503 |
+ |
504 |
+ # Distributed Checksum Clearinghouse |
505 |
+ if use dcc; then |
506 |
+ echo "EXPERIMENTAL_DCC=yes">> Makefile |
507 |
+ fi |
508 |
+ |
509 |
+ # Sender Rewriting Scheme |
510 |
+ if use srs; then |
511 |
+ # NOTE: we currently USE-default to srs-alt, because this is |
512 |
+ # what USE=srs used to be. Eventually we want to rid ourselves |
513 |
+ # of this external implementation. |
514 |
+ if use srs-alt; then |
515 |
+ # historical default, from 4.95 this becomes |
516 |
+ # EXPERIMENTAL_SRS_ALT |
517 |
+ cat >> Makefile <<- EOC |
518 |
+ EXPERIMENTAL_SRS=yes |
519 |
+ EXTRALIBS_EXIM += -lsrs_alt |
520 |
+ EOC |
521 |
+ fi |
522 |
+ if use srs-native; then |
523 |
+ # this one becomes SUPPORT_SRS in 4.95 |
524 |
+ cat >> Makefile <<- EOC |
525 |
+ EXPERIMENTAL_SRS_NATIVE=yes |
526 |
+ EOC |
527 |
+ fi |
528 |
+ fi |
529 |
+ |
530 |
+ # Delivery Sender Notifications extra information in fail message |
531 |
+ if use dsn; then |
532 |
+ cat >> Makefile <<- EOC |
533 |
+ EXPERIMENTAL_DSN_INFO=yes |
534 |
+ EOC |
535 |
+ fi |
536 |
+ |
537 |
+ # |
538 |
+ # authentication (SMTP AUTH) |
539 |
+ # |
540 |
+ |
541 |
+ # standard bits |
542 |
+ cat >> Makefile <<- EOC |
543 |
+ AUTH_SPA=yes |
544 |
+ AUTH_CRAM_MD5=yes |
545 |
+ AUTH_PLAINTEXT=yes |
546 |
+ EOC |
547 |
+ |
548 |
+ # Cyrus SASL |
549 |
+ if use sasl; then |
550 |
+ cat >> Makefile <<- EOC |
551 |
+ CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/run/saslauthd/mux |
552 |
+ AUTH_CYRUS_SASL=yes |
553 |
+ AUTH_LIBS += -lsasl2 |
554 |
+ EOC |
555 |
+ fi |
556 |
+ |
557 |
+ # Dovecot |
558 |
+ if use dovecot-sasl; then |
559 |
+ cat >> Makefile <<- EOC |
560 |
+ AUTH_DOVECOT=yes |
561 |
+ EOC |
562 |
+ fi |
563 |
+ |
564 |
+ # Pluggable Authentication Modules |
565 |
+ if use pam; then |
566 |
+ cat >> Makefile <<- EOC |
567 |
+ SUPPORT_PAM=yes |
568 |
+ AUTH_LIBS += -lpam |
569 |
+ EOC |
570 |
+ fi |
571 |
+ |
572 |
+ # Radius |
573 |
+ if use radius; then |
574 |
+ cat >> Makefile <<- EOC |
575 |
+ RADIUS_CONFIG_FILE=${EPREFIX}/etc/radiusclient/radiusclient.conf |
576 |
+ RADIUS_LIB_TYPE=RADIUSCLIENTNEW |
577 |
+ AUTH_LIBS += -lfreeradius-client |
578 |
+ EOC |
579 |
+ fi |
580 |
+} |
581 |
+ |
582 |
+src_compile() { |
583 |
+ emake CC="$(tc-getCC)" HOSTCC="$(tc-getBUILD_CC)" \ |
584 |
+ AR="$(tc-getAR) cq" RANLIB="$(tc-getRANLIB)" FULLECHO='' |
585 |
+} |
586 |
+ |
587 |
+src_install() { |
588 |
+ cd "${S}"/build-exim-gentoo || die |
589 |
+ dosbin exim |
590 |
+ if use X; then |
591 |
+ dosbin eximon.bin |
592 |
+ dosbin eximon |
593 |
+ fi |
594 |
+ fperms 4755 /usr/sbin/exim |
595 |
+ |
596 |
+ dosym exim /usr/sbin/sendmail |
597 |
+ dosym exim /usr/sbin/rsmtp |
598 |
+ dosym exim /usr/sbin/rmail |
599 |
+ dosym ../sbin/exim /usr/bin/mailq |
600 |
+ dosym ../sbin/exim /usr/bin/newaliases |
601 |
+ dosym ../sbin/sendmail /usr/lib/sendmail |
602 |
+ |
603 |
+ for i in exicyclog exim_dbmbuild exim_dumpdb exim_fixdb exim_lock \ |
604 |
+ exim_tidydb exinext exiwhat exigrep eximstats exiqsumm exiqgrep \ |
605 |
+ convert4r3 convert4r4 exipick |
606 |
+ do |
607 |
+ dosbin $i |
608 |
+ done |
609 |
+ |
610 |
+ dodoc -r "${S}"/doc/. |
611 |
+ doman "${S}"/doc/exim.8 |
612 |
+ use dsn && dodoc "${S}"/README.DSN |
613 |
+ use doc && dodoc "${WORKDIR}"/${PN}-pdf-${PV//rc/RC}/doc/*.pdf |
614 |
+ |
615 |
+ # conf files |
616 |
+ insinto /etc/exim |
617 |
+ newins "${S}"/src/configure.default exim.conf.dist |
618 |
+ if use exiscan-acl; then |
619 |
+ newins "${S}"/src/configure.default exim.conf.exiscan-acl |
620 |
+ fi |
621 |
+ doins "${WORKDIR}"/system_filter.exim |
622 |
+ doins "${FILESDIR}"/auth_conf.sub |
623 |
+ |
624 |
+ if use pam; then |
625 |
+ pamd_mimic system-auth exim auth account |
626 |
+ fi |
627 |
+ |
628 |
+ # headers, #436406 |
629 |
+ if use dlfunc ; then |
630 |
+ # fixup includes so they actually can be found when including |
631 |
+ sed -i \ |
632 |
+ -e '/#include "\(config\|store\|mytypes\).h"/s:"\(.\+\)":<exim/\1>:' \ |
633 |
+ local_scan.h || die |
634 |
+ insinto /usr/include/exim |
635 |
+ doins {config,local_scan}.h ../src/{mytypes,store}.h |
636 |
+ fi |
637 |
+ |
638 |
+ insinto /etc/logrotate.d |
639 |
+ newins "${FILESDIR}/exim.logrotate" exim |
640 |
+ |
641 |
+ newinitd "${FILESDIR}"/exim.rc10 exim |
642 |
+ newconfd "${FILESDIR}"/exim.confd exim |
643 |
+ |
644 |
+ systemd_dounit \ |
645 |
+ "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket} |
646 |
+ systemd_newunit \ |
647 |
+ "${FILESDIR}"/exim_at.service 'exim@.service' |
648 |
+ systemd_newunit \ |
649 |
+ "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service' |
650 |
+ |
651 |
+ diropts -m 0750 -o ${MAILUSER} -g ${MAILGROUP} |
652 |
+ keepdir /var/log/${PN} |
653 |
+} |
654 |
+ |
655 |
+pkg_postinst() { |
656 |
+ if [[ ! -f ${EROOT}/etc/exim/exim.conf ]] ; then |
657 |
+ einfo "${EROOT}/etc/exim/system_filter.exim is a sample system_filter." |
658 |
+ einfo "${EROOT}/etc/exim/auth_conf.sub contains the configuration sub" |
659 |
+ einfo "for using smtp auth." |
660 |
+ einfo "Please create ${EROOT}/etc/exim/exim.conf from" |
661 |
+ einfo " ${EROOT}/etc/exim/exim.conf.dist." |
662 |
+ fi |
663 |
+ if use dmarc ; then |
664 |
+ einfo "DMARC support requires ${EROOT}/etc/exim/opendmarc.tlds" |
665 |
+ einfo "you can populate this file with the contents downloaded from" |
666 |
+ einfo " https://publicsuffix.org/list/public_suffix_list.dat" |
667 |
+ fi |
668 |
+ if use dcc ; then |
669 |
+ einfo "DCC support is experimental, you can find some limited" |
670 |
+ einfo "documentation at the bottom of this prerelease message:" |
671 |
+ einfo " http://article.gmane.org/gmane.mail.exim.devel/3579" |
672 |
+ fi |
673 |
+ if use srs ; then |
674 |
+ einfo "SRS support is experimental in this release of Exim" |
675 |
+ if use srs-alt; then |
676 |
+ elog "You are using libsrs_alt to implement SRS support." |
677 |
+ elog "In future release of Exim, the native SRS implementation" |
678 |
+ elog "(USE=srs-native) will become the default. Please prepare" |
679 |
+ elog "your package.use or switch to USE=srs-native now." |
680 |
+ fi |
681 |
+ fi |
682 |
+ use dsn && einfo "extra information in fail DSN message is experimental" |
683 |
+ einfo |
684 |
+ elog "Note that this release contains a tainted variable check that" |
685 |
+ elog "is likely to break your configuration used with Exim 4.93 and before." |
686 |
+ elog "Please check your transports for occurences of \$local_part, and" |
687 |
+ elog "use a replacement like \$local_part_data where possible." |
688 |
+} |
689 |
|
690 |
diff --git a/mail-mta/exim/files/exim-4.94.2-fix-crash-resolve.patch b/mail-mta/exim/files/exim-4.94.2-fix-crash-resolve.patch |
691 |
new file mode 100644 |
692 |
index 00000000000..27e68bfdd74 |
693 |
--- /dev/null |
694 |
+++ b/mail-mta/exim/files/exim-4.94.2-fix-crash-resolve.patch |
695 |
@@ -0,0 +1,24 @@ |
696 |
+From d4bc023436e4cce7c23c5f8bb5199e178b4cc743 Mon Sep 17 00:00:00 2001 |
697 |
+From: "Heiko Schlittermann (HS12-RIPE)" <hs@×××××××××××××.de> |
698 |
+Date: Sun, 16 May 2021 19:11:19 +0200 |
699 |
+Subject: [PATCH] Fix host_name_lookup (Close 2747) |
700 |
+ |
701 |
+https://bugs.exim.org/show_bug.cgi?id=2747 |
702 |
+ |
703 |
+(cherry picked from commit 20812729e3e47a193a21d326ecd036d67a8b2724) |
704 |
+--- |
705 |
+ src/src/host.c | 4 ++-- |
706 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
707 |
+ |
708 |
+diff --git a/src/src/host.c b/src/src/host.c |
709 |
+--- a/src/host.c |
710 |
++++ b/src/host.c |
711 |
+@@ -1691,7 +1691,7 @@ while ((ordername = string_nextinlist(&list, &sep, NULL, 0))) |
712 |
+ { |
713 |
+ uschar **aptr = NULL; |
714 |
+ int ssize = 264; |
715 |
+- int count = 0; |
716 |
++ int count = 1; /* need 1 more for terminating NULL */ |
717 |
+ int old_pool = store_pool; |
718 |
+ |
719 |
+ sender_host_dnssec = dns_is_secure(dnsa); |