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