1 |
commit: 57df96d9c31aae23c50a28f1da2505e72afeb42c |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 1 17:57:35 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 1 17:58:47 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57df96d9 |
7 |
|
8 |
mail-mta/exim-4.94: version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
mail-mta/exim/Manifest | 2 + |
14 |
mail-mta/exim/exim-4.94.ebuild | 588 +++++++++++++++++++++ |
15 |
.../exim/files/exim-4.94-localscan_dlopen.patch | 269 ++++++++++ |
16 |
mail-mta/exim/files/exim-4.94-maildir.patch | 13 + |
17 |
4 files changed, 872 insertions(+) |
18 |
|
19 |
diff --git a/mail-mta/exim/Manifest b/mail-mta/exim/Manifest |
20 |
index e08c0096757..b618d116c98 100644 |
21 |
--- a/mail-mta/exim/Manifest |
22 |
+++ b/mail-mta/exim/Manifest |
23 |
@@ -1,3 +1,5 @@ |
24 |
DIST exim-4.93.0.4.tar.xz 1804696 BLAKE2B 721336101104d9c71b3bb6f432e382c28ad17d80cdb50d04213989e65a719d906caf8eb95639bfaf7a1bfdd62c7000d9df14484953446ecfca901fd7c708514e SHA512 84951849b69399d6f187d2801760dc0cb9e61c88c7c88aaca4e07e48120199a6be94b2236d058ffeacb8d611dd84056b610d480353c301a3ad5799768dd39d96 |
25 |
+DIST exim-4.94.tar.xz 1828824 BLAKE2B 3836ae6427830b16fa366f5ca35431144eb48b922b699da20f3a5e423c9c8266def981afa008e50a879ac3583f3491d8f9c449e67c66053dc45e8612e38e836f SHA512 3bf95ade30902327403e7308089a3e423761da5b0745397dace7c7fd15ba3838d93e0ee418f1fed57606f79e57b793c7c7407e5c0d526146f0036126d5d95316 |
26 |
DIST exim-pdf-4.93.0.4.tar.xz 2069744 BLAKE2B 28730134293d87b16d672df66119ff97aaf2d796cf28842bb5bf6831a0be6a186a5cce503200b9fc985aaa14386053ca83c259625949634c5a28937b285247ca SHA512 929b4198a3e8764a64478e7ff5a9c7398ad1990114206b68494b1f1f563c23405c7b440e2f21a9f777e9e3cd3a3398d6faea3b882407f731ef3a767c27fd9361 |
27 |
+DIST exim-pdf-4.94.tar.xz 2089804 BLAKE2B 08f4631e903f1344d76da8dc1dcfd122cd5963bb2efbd54a486e7cf95df9e7ef06aa31dead1243a007656f05c18993f3fda18ba16ba1fde9377ac33324d5fe99 SHA512 d56666b619ba850dfa68de90afc7435bae741d72d18b5837762781ba18032878323ad40978e0113d4b88a01fd7a1d07213e6a74c38d699371d62796b6c3c35cc |
28 |
DIST system_filter.exim.gz 3075 BLAKE2B d05e872b5cef377d29126cda03fc0a74c8777b2119b76ff43da6e8de808035eb9bfcb034a85d81824f135d484e864bfc0629fc1af2c228a7277d5ee7cf9cde79 SHA512 cb358d3ce2499a0bb5920d962a06f2af8486e55ec90c8c928bd8e3aefb279aa57f5f960d5adfcef68bd94110b405eaa144e9629cfe6014a529c79c544600bbf3 |
29 |
|
30 |
diff --git a/mail-mta/exim/exim-4.94.ebuild b/mail-mta/exim/exim-4.94.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..eaeaaeefbd3 |
33 |
--- /dev/null |
34 |
+++ b/mail-mta/exim/exim-4.94.ebuild |
35 |
@@ -0,0 +1,588 @@ |
36 |
+# Copyright 1999-2020 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI="7" |
40 |
+ |
41 |
+inherit db-use toolchain-funcs multilib pam systemd |
42 |
+ |
43 |
+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" |
44 |
+REQUIRED_USE=" |
45 |
+ arc? ( dkim spf ) |
46 |
+ dane? ( ssl !gnutls ) |
47 |
+ dmarc? ( dkim spf ) |
48 |
+ dkim? ( ssl !gnutls ) |
49 |
+ gnutls? ( ssl ) |
50 |
+ pkcs11? ( ssl ) |
51 |
+ spf? ( exiscan-acl ) |
52 |
+ srs? ( exiscan-acl ) |
53 |
+" |
54 |
+# NOTE on USE="gnutls dane", gnutls[dane] is masked in base, unmasked |
55 |
+# for x86 and amd64 only, due to this, repoman won't allow depending on |
56 |
+# gnutls[dane] for all else. Because we cannot express USE=dane when |
57 |
+# USE=gnutls is in effect only in package.use.mask, the only option we |
58 |
+# have left is to a) ignore the dependency (but that results in bug |
59 |
+# #661164) or b) mask the usage of USE=dane with USE=gnutls. Both are |
60 |
+# incorrect, but b) is the only "correct" view from repoman. |
61 |
+ |
62 |
+SDIR=$([[ ${PV} == *_rc* ]] && echo /test |
63 |
+ [[ ${PV} == *.*.*.* ]] && echo /fixes) |
64 |
+COMM_URI="https://downloads.exim.org/exim4${SDIR}" |
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 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~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? ( sys-libs/pam ) |
82 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
83 |
+ ssl? ( |
84 |
+ gnutls? ( |
85 |
+ net-libs/gnutls:0=[pkcs11?] |
86 |
+ dev-libs/libtasn1 |
87 |
+ ) |
88 |
+ !gnutls? ( |
89 |
+ !libressl? ( dev-libs/openssl:0= ) |
90 |
+ libressl? ( dev-libs/libressl:= ) |
91 |
+ ) |
92 |
+ ) |
93 |
+ ldap? ( >=net-nds/openldap-2.0.7 ) |
94 |
+ nis? ( |
95 |
+ elibc_glibc? ( |
96 |
+ net-libs/libtirpc |
97 |
+ >=net-libs/libnsl-1:= |
98 |
+ ) |
99 |
+ ) |
100 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
101 |
+ postgres? ( dev-db/postgresql:= ) |
102 |
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.26-r2 ) |
103 |
+ redis? ( dev-libs/hiredis ) |
104 |
+ spf? ( >=mail-filter/libspf2-1.2.5-r1 ) |
105 |
+ dmarc? ( mail-filter/opendmarc ) |
106 |
+ srs? ( mail-filter/libsrs_alt ) |
107 |
+ X? ( |
108 |
+ x11-libs/libX11 |
109 |
+ x11-libs/libXmu |
110 |
+ x11-libs/libXt |
111 |
+ x11-libs/libXaw |
112 |
+ ) |
113 |
+ sqlite? ( dev-db/sqlite ) |
114 |
+ radius? ( net-dialup/freeradius-client ) |
115 |
+ virtual/libiconv |
116 |
+ elibc_glibc? ( net-libs/libnsl ) |
117 |
+ " |
118 |
+ # added X check for #57206 |
119 |
+BDEPEND="virtual/pkgconfig" |
120 |
+DEPEND="${COMMON_DEPEND}" |
121 |
+RDEPEND="${COMMON_DEPEND} |
122 |
+ !mail-mta/courier |
123 |
+ !mail-mta/esmtp |
124 |
+ !mail-mta/mini-qmail |
125 |
+ !<mail-mta/msmtp-1.4.19-r1 |
126 |
+ !>=mail-mta/msmtp-1.4.19-r1[mta] |
127 |
+ !mail-mta/netqmail |
128 |
+ !mail-mta/nullmailer |
129 |
+ !mail-mta/postfix |
130 |
+ !mail-mta/qmail-ldap |
131 |
+ !mail-mta/sendmail |
132 |
+ !mail-mta/opensmtpd |
133 |
+ !<mail-mta/ssmtp-2.64-r2 |
134 |
+ !>=mail-mta/ssmtp-2.64-r2[mta] |
135 |
+ !net-mail/mailwrapper |
136 |
+ >=net-mail/mailbase-0.00-r5 |
137 |
+ virtual/logger |
138 |
+ dcc? ( mail-filter/dcc ) |
139 |
+ selinux? ( sec-policy/selinux-exim ) |
140 |
+ " |
141 |
+ |
142 |
+S=${WORKDIR}/${P//_rc/-RC} |
143 |
+ |
144 |
+src_prepare() { |
145 |
+ # Legacy patches which need a respin for -p1 |
146 |
+ eapply -p0 "${FILESDIR}"/exim-4.14-tail.patch |
147 |
+ eapply -p0 "${FILESDIR}"/exim-4.74-radius-db-ENV-clash.patch # 287426 |
148 |
+ eapply "${FILESDIR}"/exim-4.93-as-needed-ldflags.patch # 352265, 391279 |
149 |
+ eapply -p0 "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591 |
150 |
+ eapply "${FILESDIR}"/exim-4.69-r1.27021.patch |
151 |
+ eapply "${FILESDIR}"/exim-4.94-localscan_dlopen.patch |
152 |
+ |
153 |
+ if use maildir ; then |
154 |
+ eapply "${FILESDIR}"/exim-4.94-maildir.patch |
155 |
+ else |
156 |
+ eapply -p0 "${FILESDIR}"/exim-4.80-spool-mail-group.patch # 438606 |
157 |
+ fi |
158 |
+ |
159 |
+ eapply_user |
160 |
+ |
161 |
+ # user Exim believes it should be |
162 |
+ MAILUSER=mail |
163 |
+ MAILGROUP=mail |
164 |
+ if use prefix && [[ ${EUID} != 0 ]] ; then |
165 |
+ MAILUSER=$(id -un) |
166 |
+ MAILGROUP=$(id -gn) |
167 |
+ fi |
168 |
+} |
169 |
+ |
170 |
+src_configure() { |
171 |
+ # general config and paths |
172 |
+ |
173 |
+ local aliases="${EPREFIX}/etc/mail/aliases" |
174 |
+ sed -i \ |
175 |
+ -e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${aliases}'" \ |
176 |
+ src/configure.default || die |
177 |
+ |
178 |
+ sed -i -e 's/^buildname=.*/buildname=exim-gentoo/' Makefile || die |
179 |
+ |
180 |
+ if use elibc_musl; then |
181 |
+ sed -i -e 's/^LIBS = -lnsl/LIBS =/g' OS/Makefile-Linux || die |
182 |
+ fi |
183 |
+ |
184 |
+ local conffile="${EPREFIX}/etc/exim/exim.conf" |
185 |
+ sed -e "48i\CFLAGS=${CFLAGS}" \ |
186 |
+ -e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \ |
187 |
+ -e "s;EXIM_USER=;EXIM_USER=ref:${MAILUSER};" \ |
188 |
+ -e "s:CONFIGURE_FILE=.*$:CONFIGURE_FILE=${conffile}:" \ |
189 |
+ -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ |
190 |
+ -e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ |
191 |
+ src/EDITME > Local/Makefile || die |
192 |
+ |
193 |
+ # work on Local/Makefile from now on |
194 |
+ cd Local |
195 |
+ |
196 |
+ cat >> Makefile <<- EOC |
197 |
+ INFO_DIRECTORY=${EPREFIX}/usr/share/info |
198 |
+ PID_FILE_PATH=${EPREFIX}/run/exim.pid |
199 |
+ SPOOL_DIRECTORY=${EPREFIX}/var/spool/exim |
200 |
+ HAVE_ICONV=yes |
201 |
+ EOC |
202 |
+ |
203 |
+ # if we use libiconv, now is the time to tell so |
204 |
+ if use !elibc_glibc && use !elibc_musl ; then |
205 |
+ cat >> Makefile <<- EOC |
206 |
+ EXTRALIBS_EXIM=-liconv |
207 |
+ EOC |
208 |
+ fi |
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 |
+ LOOKUP_CDB=yes |
258 |
+ LOOKUP_PASSWD=yes |
259 |
+ LOOKUP_DSEARCH=yes |
260 |
+ # keep include in CFLAGS because exim.h -> dbstuff.h -> db.h |
261 |
+ CFLAGS += -I$(db_includedir ${DB_VERS}) |
262 |
+ DBMLIB = -l$(db_libname ${DB_VERS}) |
263 |
+ EOC |
264 |
+ |
265 |
+ if ! use dnsdb; then |
266 |
+ # DNSDB lookup is enabled by default |
267 |
+ sed -i -e 's:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:' Makefile || die |
268 |
+ fi |
269 |
+ |
270 |
+ if use ldap; then |
271 |
+ cat >> Makefile <<- EOC |
272 |
+ LOOKUP_LDAP=yes |
273 |
+ LDAP_LIB_TYPE=OPENLDAP2 |
274 |
+ LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/ldap |
275 |
+ LOOKUP_LIBS += -lldap -llber |
276 |
+ EOC |
277 |
+ fi |
278 |
+ |
279 |
+ if use mysql; then |
280 |
+ cat >> Makefile <<- EOC |
281 |
+ LOOKUP_MYSQL=yes |
282 |
+ LOOKUP_INCLUDE += $(mysql_config --include) |
283 |
+ LOOKUP_LIBS += $(mysql_config --libs) |
284 |
+ EOC |
285 |
+ fi |
286 |
+ |
287 |
+ if use nis; then |
288 |
+ cat >> Makefile <<- EOC |
289 |
+ LOOKUP_NIS=yes |
290 |
+ LOOKUP_NISPLUS=yes |
291 |
+ EOC |
292 |
+ if use elibc_glibc ; then |
293 |
+ cat >> Makefile <<- EOC |
294 |
+ LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/tirpc |
295 |
+ LOOKUP_LIBS += -lnsl |
296 |
+ EOC |
297 |
+ fi |
298 |
+ fi |
299 |
+ |
300 |
+ if use postgres; then |
301 |
+ cat >> Makefile <<- EOC |
302 |
+ LOOKUP_PGSQL=yes |
303 |
+ LOOKUP_INCLUDE += -I$(pg_config --includedir) |
304 |
+ LOOKUP_LIBS += -L$(pg_config --libdir) -lpq |
305 |
+ EOC |
306 |
+ fi |
307 |
+ |
308 |
+ if use sqlite; then |
309 |
+ cat >> Makefile <<- EOC |
310 |
+ LOOKUP_SQLITE=yes |
311 |
+ LOOKUP_SQLITE_PC=sqlite3 |
312 |
+ EOC |
313 |
+ fi |
314 |
+ |
315 |
+ if use redis; then |
316 |
+ cat >> Makefile <<- EOC |
317 |
+ LOOKUP_REDIS=yes |
318 |
+ LOOKUP_LIBS += -lhiredis |
319 |
+ EOC |
320 |
+ fi |
321 |
+ |
322 |
+ # Exim monitor, enabled by default, controlled via X USE-flag, |
323 |
+ # disable if not requested, bug #46778 |
324 |
+ if use X; then |
325 |
+ cp ../exim_monitor/EDITME eximon.conf || die |
326 |
+ cat >> Makefile <<- EOC |
327 |
+ EXIM_MONITOR=eximon.bin |
328 |
+ EOC |
329 |
+ fi |
330 |
+ |
331 |
+ # |
332 |
+ # features |
333 |
+ # |
334 |
+ |
335 |
+ # content scanning support |
336 |
+ if use exiscan-acl; then |
337 |
+ cat >> Makefile <<- EOC |
338 |
+ WITH_CONTENT_SCAN=yes |
339 |
+ EOC |
340 |
+ fi |
341 |
+ |
342 |
+ # DomainKeys Identified Mail, RFC4871 |
343 |
+ if ! use dkim; then |
344 |
+ # DKIM is enabled by default |
345 |
+ cat >> Makefile <<- EOC |
346 |
+ DISABLE_DKIM=yes |
347 |
+ EOC |
348 |
+ fi |
349 |
+ |
350 |
+ # Per-Recipient-Data-Response |
351 |
+ if ! use prdr; then |
352 |
+ # PRDR is enabled by default |
353 |
+ cat >> Makefile <<- EOC |
354 |
+ DISABLE_PRDR=yes |
355 |
+ EOC |
356 |
+ fi |
357 |
+ |
358 |
+ # Transport post-delivery actions |
359 |
+ if use !tpda && use !dane; then |
360 |
+ # EVENT is enabled by default |
361 |
+ cat >> Makefile <<- EOC |
362 |
+ DISABLE_EVENT=yes |
363 |
+ EOC |
364 |
+ fi |
365 |
+ |
366 |
+ # log to syslog |
367 |
+ if use syslog; then |
368 |
+ local eximlog="${EPREFIX}/var/log/exim/exim_%s.log" |
369 |
+ sed -i \ |
370 |
+ -e "s:LOG_FILE_PATH=${eximlog}:LOG_FILE_PATH=syslog:" \ |
371 |
+ Makefile || die |
372 |
+ cat >> Makefile <<- EOC |
373 |
+ LOG_FILE_PATH=syslog |
374 |
+ EOC |
375 |
+ else |
376 |
+ cat >> Makefile <<- EOC |
377 |
+ LOG_FILE_PATH=${EPREFIX}/var/log/exim/exim_%s.log |
378 |
+ EOC |
379 |
+ fi |
380 |
+ |
381 |
+ # starttls support (ssl) |
382 |
+ if use ssl; then |
383 |
+ if use gnutls; then |
384 |
+ echo "USE_GNUTLS=yes" >> Makefile |
385 |
+ echo "USE_GNUTLS_PC=gnutls $(use dane && echo gnutls-dane)" \ |
386 |
+ >> Makefile |
387 |
+ use pkcs11 || echo "AVOID_GNUTLS_PKCS11=yes" >> Makefile |
388 |
+ else |
389 |
+ echo "USE_OPENSSL=yes" >> Makefile |
390 |
+ echo "USE_OPENSSL_PC=openssl" >> Makefile |
391 |
+ fi |
392 |
+ else |
393 |
+ echo "DISABLE_TLS=yes" >> Makefile |
394 |
+ fi |
395 |
+ |
396 |
+ # TCP wrappers |
397 |
+ if use tcpd; then |
398 |
+ cat >> Makefile <<- EOC |
399 |
+ USE_TCP_WRAPPERS=yes |
400 |
+ EXTRALIBS_EXIM += -lwrap |
401 |
+ EOC |
402 |
+ fi |
403 |
+ |
404 |
+ # Light Mail Transport Protocol |
405 |
+ if use lmtp; then |
406 |
+ cat >> Makefile <<- EOC |
407 |
+ TRANSPORT_LMTP=yes |
408 |
+ EOC |
409 |
+ fi |
410 |
+ |
411 |
+ # embedded Perl |
412 |
+ if use perl; then |
413 |
+ cat >> Makefile <<- EOC |
414 |
+ EXIM_PERL=perl.o |
415 |
+ EOC |
416 |
+ fi |
417 |
+ |
418 |
+ # dlfunc |
419 |
+ if use dlfunc; then |
420 |
+ cat >> Makefile <<- EOC |
421 |
+ EXPAND_DLFUNC=yes |
422 |
+ HAVE_LOCAL_SCAN=yes |
423 |
+ DLOPEN_LOCAL_SCAN=yes |
424 |
+ EOC |
425 |
+ fi |
426 |
+ |
427 |
+ # Proxy Protocol |
428 |
+ if use proxy; then |
429 |
+ cat >> Makefile <<- EOC |
430 |
+ SUPPORT_PROXY=yes |
431 |
+ EOC |
432 |
+ fi |
433 |
+ |
434 |
+ # DANE |
435 |
+ if use !dane; then |
436 |
+ # DANE is enabled by default |
437 |
+ sed -i -e 's:^SUPPORT_DANE=yes:# SUPPORT_DANE=yes:' Makefile || die |
438 |
+ fi |
439 |
+ |
440 |
+ # DMARC |
441 |
+ if use dmarc; then |
442 |
+ cat >> Makefile <<- EOC |
443 |
+ SUPPORT_DMARC=yes |
444 |
+ EXTRALIBS_EXIM += -lopendmarc |
445 |
+ EOC |
446 |
+ fi |
447 |
+ |
448 |
+ # Sender Policy Framework |
449 |
+ if use spf; then |
450 |
+ cat >> Makefile <<- EOC |
451 |
+ SUPPORT_SPF=yes |
452 |
+ EXTRALIBS_EXIM += -lspf2 |
453 |
+ EOC |
454 |
+ fi |
455 |
+ |
456 |
+ # |
457 |
+ # experimental features |
458 |
+ # |
459 |
+ |
460 |
+ # Authenticated Receive Chain |
461 |
+ if use arc; then |
462 |
+ echo "EXPERIMENTAL_ARC=yes">> Makefile |
463 |
+ fi |
464 |
+ |
465 |
+ # Distributed Checksum Clearinghouse |
466 |
+ if use dcc; then |
467 |
+ echo "EXPERIMENTAL_DCC=yes">> Makefile |
468 |
+ fi |
469 |
+ |
470 |
+ # Sender Rewriting Scheme |
471 |
+ if use srs; then |
472 |
+ cat >> Makefile <<- EOC |
473 |
+ EXPERIMENTAL_SRS=yes |
474 |
+ EXTRALIBS_EXIM += -lsrs_alt |
475 |
+ EOC |
476 |
+ fi |
477 |
+ |
478 |
+ # Delivery Sender Notifications extra information in fail message |
479 |
+ if use dsn; then |
480 |
+ cat >> Makefile <<- EOC |
481 |
+ EXPERIMENTAL_DSN_INFO=yes |
482 |
+ EOC |
483 |
+ fi |
484 |
+ |
485 |
+ # |
486 |
+ # authentication (SMTP AUTH) |
487 |
+ # |
488 |
+ |
489 |
+ # standard bits |
490 |
+ cat >> Makefile <<- EOC |
491 |
+ AUTH_SPA=yes |
492 |
+ AUTH_CRAM_MD5=yes |
493 |
+ AUTH_PLAINTEXT=yes |
494 |
+ EOC |
495 |
+ |
496 |
+ # Cyrus SASL |
497 |
+ if use sasl; then |
498 |
+ cat >> Makefile <<- EOC |
499 |
+ CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/run/saslauthd/mux |
500 |
+ AUTH_CYRUS_SASL=yes |
501 |
+ AUTH_LIBS += -lsasl2 |
502 |
+ EOC |
503 |
+ fi |
504 |
+ |
505 |
+ # Dovecot |
506 |
+ if use dovecot-sasl; then |
507 |
+ cat >> Makefile <<- EOC |
508 |
+ AUTH_DOVECOT=yes |
509 |
+ EOC |
510 |
+ fi |
511 |
+ |
512 |
+ # Pluggable Authentication Modules |
513 |
+ if use pam; then |
514 |
+ cat >> Makefile <<- EOC |
515 |
+ SUPPORT_PAM=yes |
516 |
+ AUTH_LIBS += -lpam |
517 |
+ EOC |
518 |
+ fi |
519 |
+ |
520 |
+ # Radius |
521 |
+ if use radius; then |
522 |
+ cat >> Makefile <<- EOC |
523 |
+ RADIUS_CONFIG_FILE=${EPREFIX}/etc/radiusclient/radiusclient.conf |
524 |
+ RADIUS_LIB_TYPE=RADIUSCLIENTNEW |
525 |
+ AUTH_LIBS += -lfreeradius-client |
526 |
+ EOC |
527 |
+ fi |
528 |
+} |
529 |
+ |
530 |
+src_compile() { |
531 |
+ emake CC="$(tc-getCC)" HOSTCC="$(tc-getBUILD_CC)" \ |
532 |
+ AR="$(tc-getAR) cq" RANLIB="$(tc-getRANLIB)" FULLECHO='' |
533 |
+} |
534 |
+ |
535 |
+src_install() { |
536 |
+ cd "${S}"/build-exim-gentoo || die |
537 |
+ dosbin exim |
538 |
+ if use X; then |
539 |
+ dosbin eximon.bin |
540 |
+ dosbin eximon |
541 |
+ fi |
542 |
+ fperms 4755 /usr/sbin/exim |
543 |
+ |
544 |
+ dosym exim /usr/sbin/sendmail |
545 |
+ dosym exim /usr/sbin/rsmtp |
546 |
+ dosym exim /usr/sbin/rmail |
547 |
+ dosym ../sbin/exim /usr/bin/mailq |
548 |
+ dosym ../sbin/exim /usr/bin/newaliases |
549 |
+ dosym ../sbin/sendmail /usr/lib/sendmail |
550 |
+ |
551 |
+ for i in exicyclog exim_dbmbuild exim_dumpdb exim_fixdb exim_lock \ |
552 |
+ exim_tidydb exinext exiwhat exigrep eximstats exiqsumm exiqgrep \ |
553 |
+ convert4r3 convert4r4 exipick |
554 |
+ do |
555 |
+ dosbin $i |
556 |
+ done |
557 |
+ |
558 |
+ dodoc -r "${S}"/doc/. |
559 |
+ doman "${S}"/doc/exim.8 |
560 |
+ use dsn && dodoc "${S}"/README.DSN |
561 |
+ use doc && dodoc "${WORKDIR}"/${PN}-pdf-${PV//rc/RC}/doc/*.pdf |
562 |
+ |
563 |
+ # conf files |
564 |
+ insinto /etc/exim |
565 |
+ newins "${S}"/src/configure.default exim.conf.dist |
566 |
+ if use exiscan-acl; then |
567 |
+ newins "${S}"/src/configure.default exim.conf.exiscan-acl |
568 |
+ fi |
569 |
+ doins "${WORKDIR}"/system_filter.exim |
570 |
+ doins "${FILESDIR}"/auth_conf.sub |
571 |
+ |
572 |
+ pamd_mimic system-auth exim auth account |
573 |
+ |
574 |
+ # headers, #436406 |
575 |
+ if use dlfunc ; then |
576 |
+ # fixup includes so they actually can be found when including |
577 |
+ sed -i \ |
578 |
+ -e '/#include "\(config\|store\|mytypes\).h"/s:"\(.\+\)":<exim/\1>:' \ |
579 |
+ local_scan.h || die |
580 |
+ insinto /usr/include/exim |
581 |
+ doins {config,local_scan}.h ../src/{mytypes,store}.h |
582 |
+ fi |
583 |
+ |
584 |
+ insinto /etc/logrotate.d |
585 |
+ newins "${FILESDIR}/exim.logrotate" exim |
586 |
+ |
587 |
+ newinitd "${FILESDIR}"/exim.rc10 exim |
588 |
+ newconfd "${FILESDIR}"/exim.confd exim |
589 |
+ |
590 |
+ systemd_dounit \ |
591 |
+ "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket} |
592 |
+ systemd_newunit \ |
593 |
+ "${FILESDIR}"/exim_at.service 'exim@.service' |
594 |
+ systemd_newunit \ |
595 |
+ "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service' |
596 |
+ |
597 |
+ diropts -m 0750 -o ${MAILUSER} -g ${MAILGROUP} |
598 |
+ keepdir /var/log/${PN} |
599 |
+} |
600 |
+ |
601 |
+pkg_postinst() { |
602 |
+ if [[ ! -f ${EROOT}/etc/exim/exim.conf ]] ; then |
603 |
+ einfo "${EROOT}/etc/exim/system_filter.exim is a sample system_filter." |
604 |
+ einfo "${EROOT}/etc/exim/auth_conf.sub contains the configuration sub" |
605 |
+ einfo "for using smtp auth." |
606 |
+ einfo "Please create ${EROOT}/etc/exim/exim.conf from" |
607 |
+ einfo " ${EROOT}/etc/exim/exim.conf.dist." |
608 |
+ fi |
609 |
+ if use dmarc ; then |
610 |
+ einfo "DMARC support requires ${EROOT}/etc/exim/opendmarc.tlds" |
611 |
+ einfo "you can populate this file with the contents downloaded from" |
612 |
+ einfo " https://publicsuffix.org/list/public_suffix_list.dat" |
613 |
+ fi |
614 |
+ if use dcc ; then |
615 |
+ einfo "DCC support is experimental, you can find some limited" |
616 |
+ einfo "documentation at the bottom of this prerelease message:" |
617 |
+ einfo " http://article.gmane.org/gmane.mail.exim.devel/3579" |
618 |
+ fi |
619 |
+ use srs && einfo "SRS support is experimental" |
620 |
+ use dsn && einfo "extra information in fail DSN message is experimental" |
621 |
+ elog "The obsolete acl condition 'demime' is removed, the replacements" |
622 |
+ elog "are the ACLs acl_smtp_mime and acl_not_smtp_mime" |
623 |
+} |
624 |
|
625 |
diff --git a/mail-mta/exim/files/exim-4.94-localscan_dlopen.patch b/mail-mta/exim/files/exim-4.94-localscan_dlopen.patch |
626 |
new file mode 100644 |
627 |
index 00000000000..68ff48ac2a3 |
628 |
--- /dev/null |
629 |
+++ b/mail-mta/exim/files/exim-4.94-localscan_dlopen.patch |
630 |
@@ -0,0 +1,269 @@ |
631 |
+diff -ur exim-4.92.orig/src/config.h.defaults exim-4.92/src/config.h.defaults |
632 |
+--- exim-4.92.orig/src/config.h.defaults 2019-01-30 14:59:52.000000000 +0100 |
633 |
++++ exim-4.92/src/config.h.defaults 2019-02-16 18:17:24.547216157 +0100 |
634 |
+@@ -32,6 +32,8 @@ |
635 |
+ |
636 |
+ #define AUTH_VARS 3 |
637 |
+ |
638 |
++#define DLOPEN_LOCAL_SCAN |
639 |
++ |
640 |
+ #define BIN_DIRECTORY |
641 |
+ |
642 |
+ #define CONFIGURE_FILE |
643 |
+Only in exim-4.92/src: config.h.defaults.orig |
644 |
+diff -ur exim-4.92.orig/src/EDITME exim-4.92/src/EDITME |
645 |
+--- exim-4.92.orig/src/EDITME 2019-01-30 14:59:52.000000000 +0100 |
646 |
++++ exim-4.92/src/EDITME 2019-02-16 18:17:24.547216157 +0100 |
647 |
+@@ -824,6 +824,24 @@ |
648 |
+ |
649 |
+ |
650 |
+ #------------------------------------------------------------------------------ |
651 |
++# On systems which support dynamic loading of shared libraries, Exim can |
652 |
++# load a local_scan function specified in its config file instead of having |
653 |
++# to be recompiled with the desired local_scan function. For a full |
654 |
++# description of the API to this function, see the Exim specification. |
655 |
++ |
656 |
++#DLOPEN_LOCAL_SCAN=yes |
657 |
++ |
658 |
++# If you set DLOPEN_LOCAL_SCAN, then you need to include -rdynamic in the |
659 |
++# linker flags. Without it, the loaded .so won't be able to access any |
660 |
++# functions from exim. |
661 |
++ |
662 |
++LFLAGS = -rdynamic |
663 |
++ifeq ($(OSTYPE),Linux) |
664 |
++LFLAGS += -ldl |
665 |
++endif |
666 |
++ |
667 |
++ |
668 |
++#------------------------------------------------------------------------------ |
669 |
+ # The default distribution of Exim contains only the plain text form of the |
670 |
+ # documentation. Other forms are available separately. If you want to install |
671 |
+ # the documentation in "info" format, first fetch the Texinfo documentation |
672 |
+Only in exim-4.92/src: EDITME.orig |
673 |
+diff -ur exim-4.92.orig/src/globals.c exim-4.92/src/globals.c |
674 |
+--- exim-4.92.orig/src/globals.c 2019-01-30 14:59:52.000000000 +0100 |
675 |
++++ exim-4.92/src/globals.c 2019-02-16 18:17:24.549216150 +0100 |
676 |
+@@ -41,6 +41,10 @@ |
677 |
+ |
678 |
+ uschar *no_aliases = NULL; |
679 |
+ |
680 |
++#ifdef DLOPEN_LOCAL_SCAN |
681 |
++uschar *local_scan_path = NULL; |
682 |
++#endif |
683 |
++ |
684 |
+ |
685 |
+ /* For comments on these variables, see globals.h. I'm too idle to |
686 |
+ duplicate them here... */ |
687 |
+Only in exim-4.92/src: globals.c.orig |
688 |
+diff -ur exim-4.92.orig/src/globals.h exim-4.92/src/globals.h |
689 |
+--- exim-4.92.orig/src/globals.h 2019-01-30 14:59:52.000000000 +0100 |
690 |
++++ exim-4.92/src/globals.h 2019-02-16 18:17:24.549216150 +0100 |
691 |
+@@ -152,6 +152,9 @@ |
692 |
+ extern int (*receive_ferror)(void); |
693 |
+ extern BOOL (*receive_smtp_buffered)(void); |
694 |
+ |
695 |
++#ifdef DLOPEN_LOCAL_SCAN |
696 |
++extern uschar *local_scan_path; /* Path to local_scan() library */ |
697 |
++#endif |
698 |
+ |
699 |
+ /* For clearing, saving, restoring address expansion variables. We have to have |
700 |
+ the size of this vector set explicitly, because it is referenced from more than |
701 |
+Only in exim-4.92/src: globals.h.orig |
702 |
+diff -ur exim-4.92.orig/src/local_scan.c exim-4.92/src/local_scan.c |
703 |
+--- exim-4.92.orig/src/local_scan.c 2019-01-30 14:59:52.000000000 +0100 |
704 |
++++ exim-4.92/src/local_scan.c 2019-02-16 18:29:56.832732592 +0100 |
705 |
+@@ -5,61 +5,133 @@ |
706 |
+ /* Copyright (c) University of Cambridge 1995 - 2009 */ |
707 |
+ /* See the file NOTICE for conditions of use and distribution. */ |
708 |
+ |
709 |
++#include "local_scan.h" |
710 |
+ |
711 |
+-/****************************************************************************** |
712 |
+-This file contains a template local_scan() function that just returns ACCEPT. |
713 |
+-If you want to implement your own version, you should copy this file to, say |
714 |
+-Local/local_scan.c, and edit the copy. To use your version instead of the |
715 |
+-default, you must set |
716 |
+- |
717 |
+-HAVE_LOCAL_SCAN=yes |
718 |
+-LOCAL_SCAN_SOURCE=Local/local_scan.c |
719 |
+- |
720 |
+-in your Local/Makefile. This makes it easy to copy your version for use with |
721 |
+-subsequent Exim releases. |
722 |
+- |
723 |
+-For a full description of the API to this function, see the Exim specification. |
724 |
+-******************************************************************************/ |
725 |
+- |
726 |
+- |
727 |
+-/* This is the only Exim header that you should include. The effect of |
728 |
+-including any other Exim header is not defined, and may change from release to |
729 |
+-release. Use only the documented interface! */ |
730 |
+- |
731 |
+-#include "local_scan.h" |
732 |
+- |
733 |
+- |
734 |
+-/* This is a "do-nothing" version of a local_scan() function. The arguments |
735 |
+-are: |
736 |
+- |
737 |
+- fd The file descriptor of the open -D file, which contains the |
738 |
+- body of the message. The file is open for reading and |
739 |
+- writing, but modifying it is dangerous and not recommended. |
740 |
+- |
741 |
+- return_text A pointer to an unsigned char* variable which you can set in |
742 |
+- order to return a text string. It is initialized to NULL. |
743 |
+- |
744 |
+-The return values of this function are: |
745 |
+- |
746 |
+- LOCAL_SCAN_ACCEPT |
747 |
+- The message is to be accepted. The return_text argument is |
748 |
+- saved in $local_scan_data. |
749 |
+- |
750 |
+- LOCAL_SCAN_REJECT |
751 |
+- The message is to be rejected. The returned text is used |
752 |
+- in the rejection message. |
753 |
+- |
754 |
+- LOCAL_SCAN_TEMPREJECT |
755 |
+- This specifies a temporary rejection. The returned text |
756 |
+- is used in the rejection message. |
757 |
+-*/ |
758 |
++#ifdef DLOPEN_LOCAL_SCAN |
759 |
++#include <stdlib.h> |
760 |
++#include <dlfcn.h> |
761 |
++static int (*local_scan_fn)(int fd, uschar **return_text) = NULL; |
762 |
++static int load_local_scan_library(void); |
763 |
++extern uschar *local_scan_path; /* Path to local_scan() library */ |
764 |
++#endif |
765 |
+ |
766 |
+ int |
767 |
+ local_scan(int fd, uschar **return_text) |
768 |
+ { |
769 |
+ fd = fd; /* Keep picky compilers happy */ |
770 |
+ return_text = return_text; |
771 |
+-return LOCAL_SCAN_ACCEPT; |
772 |
++#ifdef DLOPEN_LOCAL_SCAN |
773 |
++/* local_scan_path is defined AND not the empty string */ |
774 |
++if (local_scan_path && *local_scan_path) |
775 |
++ { |
776 |
++ if (!local_scan_fn) |
777 |
++ { |
778 |
++ if (!load_local_scan_library()) |
779 |
++ { |
780 |
++ char *base_msg , *error_msg , *final_msg ; |
781 |
++ int final_length = -1 ; |
782 |
++ |
783 |
++ base_msg=US"Local configuration error - local_scan() library failure\n"; |
784 |
++ error_msg = dlerror() ; |
785 |
++ |
786 |
++ final_length = strlen(base_msg) + strlen(error_msg) + 1 ; |
787 |
++ final_msg = (char*)malloc( final_length*sizeof(char) ) ; |
788 |
++ *final_msg = '\0' ; |
789 |
++ |
790 |
++ strcat( final_msg , base_msg ) ; |
791 |
++ strcat( final_msg , error_msg ) ; |
792 |
++ |
793 |
++ *return_text = final_msg ; |
794 |
++ return LOCAL_SCAN_TEMPREJECT; |
795 |
++ } |
796 |
++ } |
797 |
++ return local_scan_fn(fd, return_text); |
798 |
++ } |
799 |
++else |
800 |
++#endif |
801 |
++ return LOCAL_SCAN_ACCEPT; |
802 |
++} |
803 |
++ |
804 |
++#ifdef DLOPEN_LOCAL_SCAN |
805 |
++ |
806 |
++static int load_local_scan_library(void) |
807 |
++{ |
808 |
++/* No point in keeping local_scan_lib since we'll never dlclose() anyway */ |
809 |
++void *local_scan_lib = NULL; |
810 |
++int (*local_scan_version_fn)(void); |
811 |
++int vers_maj; |
812 |
++int vers_min; |
813 |
++ |
814 |
++local_scan_lib = dlopen(local_scan_path, RTLD_NOW); |
815 |
++if (!local_scan_lib) |
816 |
++ { |
817 |
++ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library open failed - " |
818 |
++ "message temporarily rejected"); |
819 |
++ return FALSE; |
820 |
++ } |
821 |
++ |
822 |
++local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_major"); |
823 |
++if (!local_scan_version_fn) |
824 |
++ { |
825 |
++ dlclose(local_scan_lib); |
826 |
++ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " |
827 |
++ "local_scan_version_major() function - message temporarily rejected"); |
828 |
++ return FALSE; |
829 |
++ } |
830 |
++ |
831 |
++/* The major number is increased when the ABI is changed in a non |
832 |
++ backward compatible way. */ |
833 |
++vers_maj = local_scan_version_fn(); |
834 |
++ |
835 |
++local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_minor"); |
836 |
++if (!local_scan_version_fn) |
837 |
++ { |
838 |
++ dlclose(local_scan_lib); |
839 |
++ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " |
840 |
++ "local_scan_version_minor() function - message temporarily rejected"); |
841 |
++ return FALSE; |
842 |
++ } |
843 |
++ |
844 |
++/* The minor number is increased each time a new feature is added (in a |
845 |
++ way that doesn't break backward compatibility) -- Marc */ |
846 |
++vers_min = local_scan_version_fn(); |
847 |
++ |
848 |
++ |
849 |
++if (vers_maj != LOCAL_SCAN_ABI_VERSION_MAJOR) |
850 |
++ { |
851 |
++ dlclose(local_scan_lib); |
852 |
++ local_scan_lib = NULL; |
853 |
++ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible major" |
854 |
++ "version number, you need to recompile your module for this version" |
855 |
++ "of exim (The module was compiled for version %d.%d and this exim provides" |
856 |
++ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR, |
857 |
++ LOCAL_SCAN_ABI_VERSION_MINOR); |
858 |
++ return FALSE; |
859 |
++ } |
860 |
++else if (vers_min > LOCAL_SCAN_ABI_VERSION_MINOR) |
861 |
++ { |
862 |
++ dlclose(local_scan_lib); |
863 |
++ local_scan_lib = NULL; |
864 |
++ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible minor" |
865 |
++ "version number, you need to recompile your module for this version" |
866 |
++ "of exim (The module was compiled for version %d.%d and this exim provides" |
867 |
++ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR, |
868 |
++ LOCAL_SCAN_ABI_VERSION_MINOR); |
869 |
++ return FALSE; |
870 |
++ } |
871 |
++ |
872 |
++local_scan_fn = dlsym(local_scan_lib, "local_scan"); |
873 |
++if (!local_scan_fn) |
874 |
++ { |
875 |
++ dlclose(local_scan_lib); |
876 |
++ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " |
877 |
++ "local_scan() function - message temporarily rejected"); |
878 |
++ return FALSE; |
879 |
++ } |
880 |
++ |
881 |
++return TRUE; |
882 |
+ } |
883 |
+ |
884 |
++#endif /* DLOPEN_LOCAL_SCAN */ |
885 |
++ |
886 |
+ /* End of local_scan.c */ |
887 |
+diff -ur exim-4.92.orig/src/readconf.c exim-4.92/src/readconf.c |
888 |
+--- exim-4.92.orig/src/readconf.c 2019-01-30 14:59:52.000000000 +0100 |
889 |
++++ exim-4.92/src/readconf.c 2019-02-16 18:18:46.013947455 +0100 |
890 |
+@@ -205,6 +205,9 @@ |
891 |
+ { "local_from_prefix", opt_stringptr, {&local_from_prefix} }, |
892 |
+ { "local_from_suffix", opt_stringptr, {&local_from_suffix} }, |
893 |
+ { "local_interfaces", opt_stringptr, {&local_interfaces} }, |
894 |
++#ifdef DLOPEN_LOCAL_SCAN |
895 |
++ { "local_scan_path", opt_stringptr, {&local_scan_path} }, |
896 |
++#endif |
897 |
+ #ifdef HAVE_LOCAL_SCAN |
898 |
+ { "local_scan_timeout", opt_time, {&local_scan_timeout} }, |
899 |
+ #endif |
900 |
|
901 |
diff --git a/mail-mta/exim/files/exim-4.94-maildir.patch b/mail-mta/exim/files/exim-4.94-maildir.patch |
902 |
new file mode 100644 |
903 |
index 00000000000..a1a728158ac |
904 |
--- /dev/null |
905 |
+++ b/mail-mta/exim/files/exim-4.94-maildir.patch |
906 |
@@ -0,0 +1,13 @@ |
907 |
+--- a/src/configure.default |
908 |
++++ b/src/configure.default |
909 |
+@@ -873,7 +873,9 @@ |
910 |
+ |
911 |
+ local_delivery: |
912 |
+ driver = appendfile |
913 |
+- file = /var/mail/$local_part_data |
914 |
++# file = /var/mail/$local_part_data |
915 |
++ directory = /home/$local_part_data/.maildir |
916 |
++ maildir_format |
917 |
+ delivery_date_add |
918 |
+ envelope_to_add |
919 |
+ return_path_add |