1 |
commit: 416a8ad88987bf8480d2c5afc9db8af864b21e98 |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 10 15:42:40 2021 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 10 15:42:40 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=416a8ad8 |
7 |
|
8 |
net-mail/dovecot: cleanup |
9 |
|
10 |
Bug: https://bugs.gentoo.org/763525 |
11 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
12 |
Signed-off-by: Eray Aslan <eras <AT> gentoo.org> |
13 |
|
14 |
net-mail/dovecot/Manifest | 2 - |
15 |
net-mail/dovecot/dovecot-2.3.11.3-r1.ebuild | 296 -------------------- |
16 |
net-mail/dovecot/dovecot-2.3.11.3-r2.ebuild | 297 --------------------- |
17 |
net-mail/dovecot/dovecot-2.3.11.3.ebuild | 290 -------------------- |
18 |
net-mail/dovecot/dovecot-2.3.13.ebuild | 293 -------------------- |
19 |
.../dovecot/files/dovecot-2.3.11.3-apop-fix.patch | 60 ----- |
20 |
.../dovecot/files/dovecot-fix-search-crash.patch | 91 ------- |
21 |
net-mail/dovecot/metadata.xml | 1 - |
22 |
8 files changed, 1330 deletions(-) |
23 |
|
24 |
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest |
25 |
index 6a734d6a21c..4e94ee8000e 100644 |
26 |
--- a/net-mail/dovecot/Manifest |
27 |
+++ b/net-mail/dovecot/Manifest |
28 |
@@ -1,4 +1,2 @@ |
29 |
-DIST dovecot-2.3-pigeonhole-0.5.11.tar.gz 1912411 BLAKE2B ed35cbae5ea2c1da24a1a255c1fc943b9a8c35280840ea42c1b5f83ea327872bb83ae8901696abfe3b0d27dfd6c11d3fb1661614fad54eeab9d700b5f0b7b13a SHA512 793d93edc50192c52654e2f7244d3e01aaa4e69f786e3ecfcd658a4ab26a5099cc5319cb93221150db4ce94bc4515ffb38115b1d0eeb6e052b956efec680b33d |
30 |
DIST dovecot-2.3-pigeonhole-0.5.13.tar.gz 1908839 BLAKE2B 37fbd9d9b41ca1893c19ac546dd9b272b361752c70eed0596bbb743cd8c30d942427d5814ab551bb39eb844c7bd05074bb49b11a6b81747e2fc535b0f9993f14 SHA512 fcbc13d71af4e6dd4e34192484e203d755e5015da76a4774b11a79182b2baad36cab5a471346093111ace36a7775dfe8294555f8b777786dde386820b3ec5cd3 |
31 |
-DIST dovecot-2.3.11.3.tar.gz 7353412 BLAKE2B 0067989b35fe29c0d23f6ca25712a87fa69608cc4ee6081d9eb929d63e7a586ccc0d86fcdbe1aac67aea9f2678ab0e150f053667817b08f4a7246947bb812fdb SHA512 d83e52a7faab918a8e6f6257acc5936b81733c10489affd042c3a043cb842db060286cba9978be378e4958e9ac2e60b55ce289d7f3a88df08e7637e4785e23bb |
32 |
DIST dovecot-2.3.13.tar.gz 7456073 BLAKE2B 6cf3e7d9c6cf90279e0d72782cca88a11617f3f08e3c27da7948f46b8796575e42c776323cd56bc4208474831d4480afcac35ebe0b74d99db40acd4cda2279be SHA512 758a169fba8925637ed18fa7522a6f06c9fe01a1707b1ca0d0a4d8757c578a8e117c91733e8314403839f9a484bbcac71ce3532c82379eb583b480756d556a95 |
33 |
|
34 |
diff --git a/net-mail/dovecot/dovecot-2.3.11.3-r1.ebuild b/net-mail/dovecot/dovecot-2.3.11.3-r1.ebuild |
35 |
deleted file mode 100644 |
36 |
index 9712daf5d27..00000000000 |
37 |
--- a/net-mail/dovecot/dovecot-2.3.11.3-r1.ebuild |
38 |
+++ /dev/null |
39 |
@@ -1,296 +0,0 @@ |
40 |
-# Copyright 1999-2020 Gentoo Authors |
41 |
-# Distributed under the terms of the GNU General Public License v2 |
42 |
- |
43 |
-EAPI=7 |
44 |
- |
45 |
-# do not add a ssl USE flag. ssl is mandatory |
46 |
-SSL_DEPS_SKIP=1 |
47 |
-inherit autotools ssl-cert systemd toolchain-funcs |
48 |
- |
49 |
-MY_P="${P/_/.}" |
50 |
-#MY_S="${PN}-ce-${PV}" |
51 |
-major_minor="$(ver_cut 1-2)" |
52 |
-sieve_version="0.5.11" |
53 |
-if [[ ${PV} == *_rc* ]] ; then |
54 |
- rc_dir="rc/" |
55 |
-else |
56 |
- rc_dir="" |
57 |
-fi |
58 |
-SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz |
59 |
- sieve? ( |
60 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
61 |
- ) |
62 |
- managesieve? ( |
63 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
64 |
- ) " |
65 |
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
66 |
-HOMEPAGE="https://www.dovecot.org/" |
67 |
- |
68 |
-SLOT="0" |
69 |
-LICENSE="LGPL-2.1 MIT" |
70 |
-KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
71 |
- |
72 |
-IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail" |
73 |
-IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib zstd" |
74 |
-IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve rpc selinux sieve solr static-libs suid tcpd textcat unwind" |
75 |
- |
76 |
-IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" |
77 |
- |
78 |
-DEPEND="argon2? ( dev-libs/libsodium ) |
79 |
- bzip2? ( app-arch/bzip2 ) |
80 |
- caps? ( sys-libs/libcap ) |
81 |
- kerberos? ( virtual/krb5 ) |
82 |
- ldap? ( net-nds/openldap ) |
83 |
- lua? ( dev-lang/lua:0= ) |
84 |
- lucene? ( >=dev-cpp/clucene-2.3 ) |
85 |
- lzma? ( app-arch/xz-utils ) |
86 |
- lz4? ( app-arch/lz4 ) |
87 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
88 |
- pam? ( sys-libs/pam ) |
89 |
- postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) |
90 |
- rpc? ( net-libs/libtirpc net-libs/rpcsvc-proto ) |
91 |
- selinux? ( sec-policy/selinux-dovecot ) |
92 |
- solr? ( net-misc/curl dev-libs/expat ) |
93 |
- sqlite? ( dev-db/sqlite:* ) |
94 |
- !libressl? ( dev-libs/openssl:0= ) |
95 |
- libressl? ( dev-libs/libressl:0= ) |
96 |
- suid? ( acct-group/mail ) |
97 |
- tcpd? ( sys-apps/tcp-wrappers ) |
98 |
- textcat? ( app-text/libexttextcat ) |
99 |
- unwind? ( sys-libs/libunwind ) |
100 |
- vpopmail? ( net-mail/vpopmail ) |
101 |
- zlib? ( sys-libs/zlib ) |
102 |
- zstd? ( app-arch/zstd ) |
103 |
- virtual/libiconv |
104 |
- dev-libs/icu:=" |
105 |
- |
106 |
-RDEPEND="${DEPEND} |
107 |
- acct-group/dovecot |
108 |
- acct-group/dovenull |
109 |
- acct-user/dovecot |
110 |
- acct-user/dovenull |
111 |
- net-mail/mailbase" |
112 |
- |
113 |
-PATCHES=( |
114 |
- "${FILESDIR}/${P}"-apop-fix.patch |
115 |
- "${FILESDIR}/${PN}"-unwind-generic.patch |
116 |
- ) |
117 |
- |
118 |
-pkg_setup() { |
119 |
- if use managesieve && ! use sieve; then |
120 |
- ewarn "managesieve USE flag selected but sieve USE flag unselected" |
121 |
- ewarn "sieve USE flag will be turned on" |
122 |
- fi |
123 |
-} |
124 |
- |
125 |
-src_prepare() { |
126 |
- default |
127 |
- # bug 657108 |
128 |
- #elibtoolize |
129 |
- eautoreconf |
130 |
-} |
131 |
- |
132 |
-src_configure() { |
133 |
- local conf="" |
134 |
- |
135 |
- if use postgres || use mysql || use sqlite; then |
136 |
- conf="${conf} --with-sql" |
137 |
- fi |
138 |
- |
139 |
- # turn valgrind tests off. Bug #340791 |
140 |
- VALGRIND=no econf \ |
141 |
- --with-rundir="${EPREFIX}/run/dovecot" \ |
142 |
- --with-statedir="${EPREFIX}/var/lib/dovecot" \ |
143 |
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ |
144 |
- --without-stemmer \ |
145 |
- --disable-rpath \ |
146 |
- --without-libbsd \ |
147 |
- --with-icu \ |
148 |
- --with-ssl \ |
149 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
150 |
- $( use_with argon2 sodium ) \ |
151 |
- $( use_with bzip2 bzlib ) \ |
152 |
- $( use_with caps libcap ) \ |
153 |
- $( use_with kerberos gssapi ) \ |
154 |
- $( use_with lua ) \ |
155 |
- $( use_with ldap ) \ |
156 |
- $( use_with lucene ) \ |
157 |
- $( use_with lz4 ) \ |
158 |
- $( use_with lzma ) \ |
159 |
- $( use_with mysql ) \ |
160 |
- $( use_with pam ) \ |
161 |
- $( use_with postgres pgsql ) \ |
162 |
- $( use_with sqlite ) \ |
163 |
- $( use_with solr ) \ |
164 |
- $( use_with tcpd libwrap ) \ |
165 |
- $( use_with textcat ) \ |
166 |
- $( use_with unwind libunwind ) \ |
167 |
- $( use_with vpopmail ) \ |
168 |
- $( use_with zlib ) \ |
169 |
- $( use_with zstd ) \ |
170 |
- $( use_enable static-libs static ) \ |
171 |
- ${conf} |
172 |
- |
173 |
- if use sieve || use managesieve ; then |
174 |
- # The sieve plugin needs this file to be build to determine the plugin |
175 |
- # directory and the list of libraries to link to. |
176 |
- emake dovecot-config |
177 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
178 |
- econf \ |
179 |
- $( use_enable static-libs static ) \ |
180 |
- --localstatedir="${EPREFIX}/var" \ |
181 |
- --enable-shared \ |
182 |
- --with-dovecot="${S}" \ |
183 |
- $( use_with managesieve ) |
184 |
- fi |
185 |
-} |
186 |
- |
187 |
-src_compile() { |
188 |
- default |
189 |
- if use sieve || use managesieve ; then |
190 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
191 |
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
192 |
- fi |
193 |
-} |
194 |
- |
195 |
-src_test() { |
196 |
- default |
197 |
- if use sieve || use managesieve ; then |
198 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
199 |
- default |
200 |
- fi |
201 |
-} |
202 |
- |
203 |
-src_install() { |
204 |
- default |
205 |
- |
206 |
- # insecure: |
207 |
- # use suid && fperms u+s /usr/libexec/dovecot/deliver |
208 |
- # better: |
209 |
- if use suid;then |
210 |
- einfo "Changing perms to allow deliver to be suided" |
211 |
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda" |
212 |
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda" |
213 |
- fi |
214 |
- |
215 |
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot |
216 |
- |
217 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
218 |
- |
219 |
- dodoc AUTHORS NEWS README TODO |
220 |
- dodoc doc/*.{txt,cnf,xml,sh} |
221 |
- docinto example-config |
222 |
- dodoc doc/example-config/*.{conf,ext} |
223 |
- docinto example-config/conf.d |
224 |
- dodoc doc/example-config/conf.d/*.{conf,ext} |
225 |
- docinto wiki |
226 |
- dodoc doc/wiki/* |
227 |
- doman doc/man/*.{1,7} |
228 |
- |
229 |
- # Create the dovecot.conf file from the dovecot-example.conf file that |
230 |
- # the dovecot folks nicely left for us.... |
231 |
- local conf="${ED}/etc/dovecot/dovecot.conf" |
232 |
- local confd="${ED}/etc/dovecot/conf.d" |
233 |
- |
234 |
- insinto /etc/dovecot |
235 |
- doins doc/example-config/*.{conf,ext} |
236 |
- insinto /etc/dovecot/conf.d |
237 |
- doins doc/example-config/conf.d/*.{conf,ext} |
238 |
- fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext |
239 |
- rm -f "${confd}/../README" |
240 |
- |
241 |
- # .maildir is the Gentoo default |
242 |
- local mail_location="maildir:~/.maildir" |
243 |
- sed -i -e \ |
244 |
- "s|#mail_location =|mail_location = ${mail_location}|" \ |
245 |
- "${confd}/10-mail.conf" \ |
246 |
- || die "failed to update mail location settings in 10-mail.conf" |
247 |
- |
248 |
- # We're using pam files (imap and pop3) provided by mailbase |
249 |
- if use pam; then |
250 |
- sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
251 |
- "${confd}/auth-system.conf.ext" \ |
252 |
- || die "failed to update PAM settings in auth-system.conf.ext" |
253 |
- # mailbase does not provide a sieve pam file |
254 |
- use managesieve && dosym imap /etc/pam.d/sieve |
255 |
- sed -i -e \ |
256 |
- 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
257 |
- "${confd}/10-auth.conf" \ |
258 |
- || die "failed to update PAM settings in 10-auth.conf" |
259 |
- fi |
260 |
- |
261 |
- # Disable ipv6 if necessary |
262 |
- if ! use ipv6; then |
263 |
- sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
264 |
- || die "failed to update listen settings in dovecot.conf" |
265 |
- fi |
266 |
- |
267 |
- # Update ssl cert locations |
268 |
- sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
269 |
- || die "ssl conf failed" |
270 |
- sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
271 |
- -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
272 |
- "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
273 |
- |
274 |
- # Install SQL configuration |
275 |
- if use mysql || use postgres; then |
276 |
- sed -i -e \ |
277 |
- 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
278 |
- "${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
279 |
- 10-auth.conf" |
280 |
- fi |
281 |
- |
282 |
- # Install LDAP configuration |
283 |
- if use ldap; then |
284 |
- sed -i -e \ |
285 |
- 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
286 |
- "${confd}/10-auth.conf" \ |
287 |
- || die "failed to update ldap settings in 10-auth.conf" |
288 |
- fi |
289 |
- |
290 |
- if use vpopmail; then |
291 |
- sed -i -e \ |
292 |
- 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ |
293 |
- "${confd}/10-auth.conf" \ |
294 |
- || die "failed to update vpopmail settings in 10-auth.conf" |
295 |
- fi |
296 |
- |
297 |
- if use sieve || use managesieve ; then |
298 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
299 |
- emake DESTDIR="${ED}" install |
300 |
- sed -i -e \ |
301 |
- 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
302 |
- || die "failed to update sieve settings in 15-lda.conf" |
303 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
304 |
- docinto example-config/conf.d |
305 |
- dodoc doc/example-config/conf.d/*.conf |
306 |
- insinto /etc/dovecot/conf.d |
307 |
- doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf |
308 |
- use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
309 |
- docinto sieve/rfc |
310 |
- dodoc doc/rfc/*.txt |
311 |
- docinto sieve/devel |
312 |
- dodoc doc/devel/DESIGN |
313 |
- docinto plugins |
314 |
- dodoc doc/plugins/*.txt |
315 |
- docinto extensions |
316 |
- dodoc doc/extensions/*.txt |
317 |
- docinto locations |
318 |
- dodoc doc/locations/*.txt |
319 |
- doman doc/man/*.{1,7} |
320 |
- fi |
321 |
- |
322 |
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete |
323 |
-} |
324 |
- |
325 |
-pkg_postinst() { |
326 |
- # Let's not make a new certificate if we already have one |
327 |
- if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
328 |
- -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
329 |
- einfo "Creating SSL certificate" |
330 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
331 |
- install_cert /etc/ssl/dovecot/server |
332 |
- fi |
333 |
- |
334 |
- elog "Please read https://doc.dovecot.org/installation_guide/upgrading/ for upgrade notes." |
335 |
-} |
336 |
|
337 |
diff --git a/net-mail/dovecot/dovecot-2.3.11.3-r2.ebuild b/net-mail/dovecot/dovecot-2.3.11.3-r2.ebuild |
338 |
deleted file mode 100644 |
339 |
index 8c6836bd9cb..00000000000 |
340 |
--- a/net-mail/dovecot/dovecot-2.3.11.3-r2.ebuild |
341 |
+++ /dev/null |
342 |
@@ -1,297 +0,0 @@ |
343 |
-# Copyright 1999-2020 Gentoo Authors |
344 |
-# Distributed under the terms of the GNU General Public License v2 |
345 |
- |
346 |
-EAPI=7 |
347 |
- |
348 |
-# do not add a ssl USE flag. ssl is mandatory |
349 |
-SSL_DEPS_SKIP=1 |
350 |
-inherit autotools ssl-cert systemd toolchain-funcs |
351 |
- |
352 |
-MY_P="${P/_/.}" |
353 |
-#MY_S="${PN}-ce-${PV}" |
354 |
-major_minor="$(ver_cut 1-2)" |
355 |
-sieve_version="0.5.11" |
356 |
-if [[ ${PV} == *_rc* ]] ; then |
357 |
- rc_dir="rc/" |
358 |
-else |
359 |
- rc_dir="" |
360 |
-fi |
361 |
-SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz |
362 |
- sieve? ( |
363 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
364 |
- ) |
365 |
- managesieve? ( |
366 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
367 |
- ) " |
368 |
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
369 |
-HOMEPAGE="https://www.dovecot.org/" |
370 |
- |
371 |
-SLOT="0" |
372 |
-LICENSE="LGPL-2.1 MIT" |
373 |
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 s390 ~sparc x86" |
374 |
- |
375 |
-IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail" |
376 |
-IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib zstd" |
377 |
-IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve rpc selinux sieve solr static-libs suid tcpd textcat unwind" |
378 |
- |
379 |
-IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" |
380 |
- |
381 |
-DEPEND="argon2? ( dev-libs/libsodium ) |
382 |
- bzip2? ( app-arch/bzip2 ) |
383 |
- caps? ( sys-libs/libcap ) |
384 |
- kerberos? ( virtual/krb5 ) |
385 |
- ldap? ( net-nds/openldap ) |
386 |
- lua? ( dev-lang/lua:0= ) |
387 |
- lucene? ( >=dev-cpp/clucene-2.3 ) |
388 |
- lzma? ( app-arch/xz-utils ) |
389 |
- lz4? ( app-arch/lz4 ) |
390 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
391 |
- pam? ( sys-libs/pam ) |
392 |
- postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) |
393 |
- rpc? ( net-libs/libtirpc net-libs/rpcsvc-proto ) |
394 |
- selinux? ( sec-policy/selinux-dovecot ) |
395 |
- solr? ( net-misc/curl dev-libs/expat ) |
396 |
- sqlite? ( dev-db/sqlite:* ) |
397 |
- !libressl? ( dev-libs/openssl:0= ) |
398 |
- libressl? ( dev-libs/libressl:0= ) |
399 |
- suid? ( acct-group/mail ) |
400 |
- tcpd? ( sys-apps/tcp-wrappers ) |
401 |
- textcat? ( app-text/libexttextcat ) |
402 |
- unwind? ( sys-libs/libunwind ) |
403 |
- vpopmail? ( net-mail/vpopmail ) |
404 |
- zlib? ( sys-libs/zlib ) |
405 |
- zstd? ( app-arch/zstd ) |
406 |
- virtual/libiconv |
407 |
- dev-libs/icu:=" |
408 |
- |
409 |
-RDEPEND="${DEPEND} |
410 |
- acct-group/dovecot |
411 |
- acct-group/dovenull |
412 |
- acct-user/dovecot |
413 |
- acct-user/dovenull |
414 |
- net-mail/mailbase" |
415 |
- |
416 |
-PATCHES=( |
417 |
- "${FILESDIR}/${P}"-apop-fix.patch |
418 |
- "${FILESDIR}/${PN}"-unwind-generic.patch |
419 |
- "${FILESDIR}/${PN}"-fix-search-crash.patch |
420 |
- ) |
421 |
- |
422 |
-pkg_setup() { |
423 |
- if use managesieve && ! use sieve; then |
424 |
- ewarn "managesieve USE flag selected but sieve USE flag unselected" |
425 |
- ewarn "sieve USE flag will be turned on" |
426 |
- fi |
427 |
-} |
428 |
- |
429 |
-src_prepare() { |
430 |
- default |
431 |
- # bug 657108 |
432 |
- #elibtoolize |
433 |
- eautoreconf |
434 |
-} |
435 |
- |
436 |
-src_configure() { |
437 |
- local conf="" |
438 |
- |
439 |
- if use postgres || use mysql || use sqlite; then |
440 |
- conf="${conf} --with-sql" |
441 |
- fi |
442 |
- |
443 |
- # turn valgrind tests off. Bug #340791 |
444 |
- VALGRIND=no econf \ |
445 |
- --with-rundir="${EPREFIX}/run/dovecot" \ |
446 |
- --with-statedir="${EPREFIX}/var/lib/dovecot" \ |
447 |
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ |
448 |
- --without-stemmer \ |
449 |
- --disable-rpath \ |
450 |
- --without-libbsd \ |
451 |
- --with-icu \ |
452 |
- --with-ssl \ |
453 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
454 |
- $( use_with argon2 sodium ) \ |
455 |
- $( use_with bzip2 bzlib ) \ |
456 |
- $( use_with caps libcap ) \ |
457 |
- $( use_with kerberos gssapi ) \ |
458 |
- $( use_with lua ) \ |
459 |
- $( use_with ldap ) \ |
460 |
- $( use_with lucene ) \ |
461 |
- $( use_with lz4 ) \ |
462 |
- $( use_with lzma ) \ |
463 |
- $( use_with mysql ) \ |
464 |
- $( use_with pam ) \ |
465 |
- $( use_with postgres pgsql ) \ |
466 |
- $( use_with sqlite ) \ |
467 |
- $( use_with solr ) \ |
468 |
- $( use_with tcpd libwrap ) \ |
469 |
- $( use_with textcat ) \ |
470 |
- $( use_with unwind libunwind ) \ |
471 |
- $( use_with vpopmail ) \ |
472 |
- $( use_with zlib ) \ |
473 |
- $( use_with zstd ) \ |
474 |
- $( use_enable static-libs static ) \ |
475 |
- ${conf} |
476 |
- |
477 |
- if use sieve || use managesieve ; then |
478 |
- # The sieve plugin needs this file to be build to determine the plugin |
479 |
- # directory and the list of libraries to link to. |
480 |
- emake dovecot-config |
481 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
482 |
- econf \ |
483 |
- $( use_enable static-libs static ) \ |
484 |
- --localstatedir="${EPREFIX}/var" \ |
485 |
- --enable-shared \ |
486 |
- --with-dovecot="${S}" \ |
487 |
- $( use_with managesieve ) |
488 |
- fi |
489 |
-} |
490 |
- |
491 |
-src_compile() { |
492 |
- default |
493 |
- if use sieve || use managesieve ; then |
494 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
495 |
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
496 |
- fi |
497 |
-} |
498 |
- |
499 |
-src_test() { |
500 |
- default |
501 |
- if use sieve || use managesieve ; then |
502 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
503 |
- default |
504 |
- fi |
505 |
-} |
506 |
- |
507 |
-src_install() { |
508 |
- default |
509 |
- |
510 |
- # insecure: |
511 |
- # use suid && fperms u+s /usr/libexec/dovecot/deliver |
512 |
- # better: |
513 |
- if use suid;then |
514 |
- einfo "Changing perms to allow deliver to be suided" |
515 |
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda" |
516 |
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda" |
517 |
- fi |
518 |
- |
519 |
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot |
520 |
- |
521 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
522 |
- |
523 |
- dodoc AUTHORS NEWS README TODO |
524 |
- dodoc doc/*.{txt,cnf,xml,sh} |
525 |
- docinto example-config |
526 |
- dodoc doc/example-config/*.{conf,ext} |
527 |
- docinto example-config/conf.d |
528 |
- dodoc doc/example-config/conf.d/*.{conf,ext} |
529 |
- docinto wiki |
530 |
- dodoc doc/wiki/* |
531 |
- doman doc/man/*.{1,7} |
532 |
- |
533 |
- # Create the dovecot.conf file from the dovecot-example.conf file that |
534 |
- # the dovecot folks nicely left for us.... |
535 |
- local conf="${ED}/etc/dovecot/dovecot.conf" |
536 |
- local confd="${ED}/etc/dovecot/conf.d" |
537 |
- |
538 |
- insinto /etc/dovecot |
539 |
- doins doc/example-config/*.{conf,ext} |
540 |
- insinto /etc/dovecot/conf.d |
541 |
- doins doc/example-config/conf.d/*.{conf,ext} |
542 |
- fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext |
543 |
- rm -f "${confd}/../README" |
544 |
- |
545 |
- # .maildir is the Gentoo default |
546 |
- local mail_location="maildir:~/.maildir" |
547 |
- sed -i -e \ |
548 |
- "s|#mail_location =|mail_location = ${mail_location}|" \ |
549 |
- "${confd}/10-mail.conf" \ |
550 |
- || die "failed to update mail location settings in 10-mail.conf" |
551 |
- |
552 |
- # We're using pam files (imap and pop3) provided by mailbase |
553 |
- if use pam; then |
554 |
- sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
555 |
- "${confd}/auth-system.conf.ext" \ |
556 |
- || die "failed to update PAM settings in auth-system.conf.ext" |
557 |
- # mailbase does not provide a sieve pam file |
558 |
- use managesieve && dosym imap /etc/pam.d/sieve |
559 |
- sed -i -e \ |
560 |
- 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
561 |
- "${confd}/10-auth.conf" \ |
562 |
- || die "failed to update PAM settings in 10-auth.conf" |
563 |
- fi |
564 |
- |
565 |
- # Disable ipv6 if necessary |
566 |
- if ! use ipv6; then |
567 |
- sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
568 |
- || die "failed to update listen settings in dovecot.conf" |
569 |
- fi |
570 |
- |
571 |
- # Update ssl cert locations |
572 |
- sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
573 |
- || die "ssl conf failed" |
574 |
- sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
575 |
- -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
576 |
- "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
577 |
- |
578 |
- # Install SQL configuration |
579 |
- if use mysql || use postgres; then |
580 |
- sed -i -e \ |
581 |
- 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
582 |
- "${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
583 |
- 10-auth.conf" |
584 |
- fi |
585 |
- |
586 |
- # Install LDAP configuration |
587 |
- if use ldap; then |
588 |
- sed -i -e \ |
589 |
- 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
590 |
- "${confd}/10-auth.conf" \ |
591 |
- || die "failed to update ldap settings in 10-auth.conf" |
592 |
- fi |
593 |
- |
594 |
- if use vpopmail; then |
595 |
- sed -i -e \ |
596 |
- 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ |
597 |
- "${confd}/10-auth.conf" \ |
598 |
- || die "failed to update vpopmail settings in 10-auth.conf" |
599 |
- fi |
600 |
- |
601 |
- if use sieve || use managesieve ; then |
602 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
603 |
- emake DESTDIR="${ED}" install |
604 |
- sed -i -e \ |
605 |
- 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
606 |
- || die "failed to update sieve settings in 15-lda.conf" |
607 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
608 |
- docinto example-config/conf.d |
609 |
- dodoc doc/example-config/conf.d/*.conf |
610 |
- insinto /etc/dovecot/conf.d |
611 |
- doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf |
612 |
- use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
613 |
- docinto sieve/rfc |
614 |
- dodoc doc/rfc/*.txt |
615 |
- docinto sieve/devel |
616 |
- dodoc doc/devel/DESIGN |
617 |
- docinto plugins |
618 |
- dodoc doc/plugins/*.txt |
619 |
- docinto extensions |
620 |
- dodoc doc/extensions/*.txt |
621 |
- docinto locations |
622 |
- dodoc doc/locations/*.txt |
623 |
- doman doc/man/*.{1,7} |
624 |
- fi |
625 |
- |
626 |
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete |
627 |
-} |
628 |
- |
629 |
-pkg_postinst() { |
630 |
- # Let's not make a new certificate if we already have one |
631 |
- if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
632 |
- -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
633 |
- einfo "Creating SSL certificate" |
634 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
635 |
- install_cert /etc/ssl/dovecot/server |
636 |
- fi |
637 |
- |
638 |
- elog "Please read https://doc.dovecot.org/installation_guide/upgrading/ for upgrade notes." |
639 |
-} |
640 |
|
641 |
diff --git a/net-mail/dovecot/dovecot-2.3.11.3.ebuild b/net-mail/dovecot/dovecot-2.3.11.3.ebuild |
642 |
deleted file mode 100644 |
643 |
index a698c9698b9..00000000000 |
644 |
--- a/net-mail/dovecot/dovecot-2.3.11.3.ebuild |
645 |
+++ /dev/null |
646 |
@@ -1,290 +0,0 @@ |
647 |
-# Copyright 1999-2020 Gentoo Authors |
648 |
-# Distributed under the terms of the GNU General Public License v2 |
649 |
- |
650 |
-EAPI=7 |
651 |
- |
652 |
-# do not add a ssl USE flag. ssl is mandatory |
653 |
-SSL_DEPS_SKIP=1 |
654 |
-inherit autotools ssl-cert systemd toolchain-funcs |
655 |
- |
656 |
-MY_P="${P/_/.}" |
657 |
-#MY_S="${PN}-ce-${PV}" |
658 |
-major_minor="$(ver_cut 1-2)" |
659 |
-sieve_version="0.5.11" |
660 |
-if [[ ${PV} == *_rc* ]] ; then |
661 |
- rc_dir="rc/" |
662 |
-else |
663 |
- rc_dir="" |
664 |
-fi |
665 |
-SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz |
666 |
- sieve? ( |
667 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
668 |
- ) |
669 |
- managesieve? ( |
670 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
671 |
- ) " |
672 |
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
673 |
-HOMEPAGE="https://www.dovecot.org/" |
674 |
- |
675 |
-SLOT="0" |
676 |
-LICENSE="LGPL-2.1 MIT" |
677 |
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 s390 ~sparc x86" |
678 |
- |
679 |
-IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail" |
680 |
-IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib" |
681 |
-IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat unwind" |
682 |
- |
683 |
-IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" |
684 |
- |
685 |
-DEPEND="argon2? ( dev-libs/libsodium ) |
686 |
- bzip2? ( app-arch/bzip2 ) |
687 |
- caps? ( sys-libs/libcap ) |
688 |
- kerberos? ( virtual/krb5 ) |
689 |
- ldap? ( net-nds/openldap ) |
690 |
- lua? ( dev-lang/lua:0= ) |
691 |
- lucene? ( >=dev-cpp/clucene-2.3 ) |
692 |
- lzma? ( app-arch/xz-utils ) |
693 |
- lz4? ( app-arch/lz4 ) |
694 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
695 |
- pam? ( sys-libs/pam ) |
696 |
- postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) |
697 |
- selinux? ( sec-policy/selinux-dovecot ) |
698 |
- solr? ( net-misc/curl dev-libs/expat ) |
699 |
- sqlite? ( dev-db/sqlite:* ) |
700 |
- !libressl? ( dev-libs/openssl:0= ) |
701 |
- libressl? ( dev-libs/libressl:0= ) |
702 |
- suid? ( acct-group/mail ) |
703 |
- tcpd? ( sys-apps/tcp-wrappers ) |
704 |
- textcat? ( app-text/libexttextcat ) |
705 |
- unwind? ( sys-libs/libunwind ) |
706 |
- vpopmail? ( net-mail/vpopmail ) |
707 |
- zlib? ( sys-libs/zlib ) |
708 |
- virtual/libiconv |
709 |
- dev-libs/icu:=" |
710 |
- |
711 |
-RDEPEND="${DEPEND} |
712 |
- acct-group/dovecot |
713 |
- acct-group/dovenull |
714 |
- acct-user/dovecot |
715 |
- acct-user/dovenull |
716 |
- net-mail/mailbase" |
717 |
- |
718 |
-PATCHES=( "${FILESDIR}"/${P}-apop-fix.patch ) |
719 |
- |
720 |
-pkg_setup() { |
721 |
- if use managesieve && ! use sieve; then |
722 |
- ewarn "managesieve USE flag selected but sieve USE flag unselected" |
723 |
- ewarn "sieve USE flag will be turned on" |
724 |
- fi |
725 |
-} |
726 |
- |
727 |
-src_prepare() { |
728 |
- default |
729 |
- # bug 657108 |
730 |
- elibtoolize |
731 |
- #eautoreconf |
732 |
-} |
733 |
- |
734 |
-src_configure() { |
735 |
- local conf="" |
736 |
- |
737 |
- if use postgres || use mysql || use sqlite; then |
738 |
- conf="${conf} --with-sql" |
739 |
- fi |
740 |
- |
741 |
- # turn valgrind tests off. Bug #340791 |
742 |
- VALGRIND=no econf \ |
743 |
- --with-rundir="${EPREFIX}/run/dovecot" \ |
744 |
- --with-statedir="${EPREFIX}/var/lib/dovecot" \ |
745 |
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ |
746 |
- --without-stemmer \ |
747 |
- --disable-rpath \ |
748 |
- --without-libbsd \ |
749 |
- --with-icu \ |
750 |
- --with-ssl \ |
751 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
752 |
- $( use_with argon2 sodium ) \ |
753 |
- $( use_with bzip2 bzlib ) \ |
754 |
- $( use_with caps libcap ) \ |
755 |
- $( use_with kerberos gssapi ) \ |
756 |
- $( use_with lua ) \ |
757 |
- $( use_with ldap ) \ |
758 |
- $( use_with lucene ) \ |
759 |
- $( use_with lz4 ) \ |
760 |
- $( use_with lzma ) \ |
761 |
- $( use_with mysql ) \ |
762 |
- $( use_with pam ) \ |
763 |
- $( use_with postgres pgsql ) \ |
764 |
- $( use_with sqlite ) \ |
765 |
- $( use_with solr ) \ |
766 |
- $( use_with tcpd libwrap ) \ |
767 |
- $( use_with textcat ) \ |
768 |
- $( use_with unwind libunwind ) \ |
769 |
- $( use_with vpopmail ) \ |
770 |
- $( use_with zlib ) \ |
771 |
- $( use_enable static-libs static ) \ |
772 |
- ${conf} |
773 |
- |
774 |
- if use sieve || use managesieve ; then |
775 |
- # The sieve plugin needs this file to be build to determine the plugin |
776 |
- # directory and the list of libraries to link to. |
777 |
- emake dovecot-config |
778 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
779 |
- econf \ |
780 |
- $( use_enable static-libs static ) \ |
781 |
- --localstatedir="${EPREFIX}/var" \ |
782 |
- --enable-shared \ |
783 |
- --with-dovecot="${S}" \ |
784 |
- $( use_with managesieve ) |
785 |
- fi |
786 |
-} |
787 |
- |
788 |
-src_compile() { |
789 |
- default |
790 |
- if use sieve || use managesieve ; then |
791 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
792 |
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
793 |
- fi |
794 |
-} |
795 |
- |
796 |
-src_test() { |
797 |
- default |
798 |
- if use sieve || use managesieve ; then |
799 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
800 |
- default |
801 |
- fi |
802 |
-} |
803 |
- |
804 |
-src_install() { |
805 |
- default |
806 |
- |
807 |
- # insecure: |
808 |
- # use suid && fperms u+s /usr/libexec/dovecot/deliver |
809 |
- # better: |
810 |
- if use suid;then |
811 |
- einfo "Changing perms to allow deliver to be suided" |
812 |
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda" |
813 |
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda" |
814 |
- fi |
815 |
- |
816 |
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot |
817 |
- |
818 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
819 |
- |
820 |
- dodoc AUTHORS NEWS README TODO |
821 |
- dodoc doc/*.{txt,cnf,xml,sh} |
822 |
- docinto example-config |
823 |
- dodoc doc/example-config/*.{conf,ext} |
824 |
- docinto example-config/conf.d |
825 |
- dodoc doc/example-config/conf.d/*.{conf,ext} |
826 |
- docinto wiki |
827 |
- dodoc doc/wiki/* |
828 |
- doman doc/man/*.{1,7} |
829 |
- |
830 |
- # Create the dovecot.conf file from the dovecot-example.conf file that |
831 |
- # the dovecot folks nicely left for us.... |
832 |
- local conf="${ED}/etc/dovecot/dovecot.conf" |
833 |
- local confd="${ED}/etc/dovecot/conf.d" |
834 |
- |
835 |
- insinto /etc/dovecot |
836 |
- doins doc/example-config/*.{conf,ext} |
837 |
- insinto /etc/dovecot/conf.d |
838 |
- doins doc/example-config/conf.d/*.{conf,ext} |
839 |
- fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext |
840 |
- rm -f "${confd}/../README" |
841 |
- |
842 |
- # .maildir is the Gentoo default |
843 |
- local mail_location="maildir:~/.maildir" |
844 |
- sed -i -e \ |
845 |
- "s|#mail_location =|mail_location = ${mail_location}|" \ |
846 |
- "${confd}/10-mail.conf" \ |
847 |
- || die "failed to update mail location settings in 10-mail.conf" |
848 |
- |
849 |
- # We're using pam files (imap and pop3) provided by mailbase |
850 |
- if use pam; then |
851 |
- sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
852 |
- "${confd}/auth-system.conf.ext" \ |
853 |
- || die "failed to update PAM settings in auth-system.conf.ext" |
854 |
- # mailbase does not provide a sieve pam file |
855 |
- use managesieve && dosym imap /etc/pam.d/sieve |
856 |
- sed -i -e \ |
857 |
- 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
858 |
- "${confd}/10-auth.conf" \ |
859 |
- || die "failed to update PAM settings in 10-auth.conf" |
860 |
- fi |
861 |
- |
862 |
- # Disable ipv6 if necessary |
863 |
- if ! use ipv6; then |
864 |
- sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
865 |
- || die "failed to update listen settings in dovecot.conf" |
866 |
- fi |
867 |
- |
868 |
- # Update ssl cert locations |
869 |
- sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
870 |
- || die "ssl conf failed" |
871 |
- sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
872 |
- -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
873 |
- "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
874 |
- |
875 |
- # Install SQL configuration |
876 |
- if use mysql || use postgres; then |
877 |
- sed -i -e \ |
878 |
- 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
879 |
- "${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
880 |
- 10-auth.conf" |
881 |
- fi |
882 |
- |
883 |
- # Install LDAP configuration |
884 |
- if use ldap; then |
885 |
- sed -i -e \ |
886 |
- 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
887 |
- "${confd}/10-auth.conf" \ |
888 |
- || die "failed to update ldap settings in 10-auth.conf" |
889 |
- fi |
890 |
- |
891 |
- if use vpopmail; then |
892 |
- sed -i -e \ |
893 |
- 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ |
894 |
- "${confd}/10-auth.conf" \ |
895 |
- || die "failed to update vpopmail settings in 10-auth.conf" |
896 |
- fi |
897 |
- |
898 |
- if use sieve || use managesieve ; then |
899 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
900 |
- emake DESTDIR="${ED}" install |
901 |
- sed -i -e \ |
902 |
- 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
903 |
- || die "failed to update sieve settings in 15-lda.conf" |
904 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
905 |
- docinto example-config/conf.d |
906 |
- dodoc doc/example-config/conf.d/*.conf |
907 |
- insinto /etc/dovecot/conf.d |
908 |
- doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf |
909 |
- use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
910 |
- docinto sieve/rfc |
911 |
- dodoc doc/rfc/*.txt |
912 |
- docinto sieve/devel |
913 |
- dodoc doc/devel/DESIGN |
914 |
- docinto plugins |
915 |
- dodoc doc/plugins/*.txt |
916 |
- docinto extensions |
917 |
- dodoc doc/extensions/*.txt |
918 |
- docinto locations |
919 |
- dodoc doc/locations/*.txt |
920 |
- doman doc/man/*.{1,7} |
921 |
- fi |
922 |
- |
923 |
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete |
924 |
-} |
925 |
- |
926 |
-pkg_postinst() { |
927 |
- # Let's not make a new certificate if we already have one |
928 |
- if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
929 |
- -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
930 |
- einfo "Creating SSL certificate" |
931 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
932 |
- install_cert /etc/ssl/dovecot/server |
933 |
- fi |
934 |
- |
935 |
- elog "Please read https://doc.dovecot.org/installation_guide/upgrading/ for upgrade notes." |
936 |
-} |
937 |
|
938 |
diff --git a/net-mail/dovecot/dovecot-2.3.13.ebuild b/net-mail/dovecot/dovecot-2.3.13.ebuild |
939 |
deleted file mode 100644 |
940 |
index cfaa9df4477..00000000000 |
941 |
--- a/net-mail/dovecot/dovecot-2.3.13.ebuild |
942 |
+++ /dev/null |
943 |
@@ -1,293 +0,0 @@ |
944 |
-# Copyright 1999-2021 Gentoo Authors |
945 |
-# Distributed under the terms of the GNU General Public License v2 |
946 |
- |
947 |
-EAPI=7 |
948 |
- |
949 |
-LUA_COMPAT=( lua5-{1..3} ) |
950 |
- |
951 |
-# do not add a ssl USE flag. ssl is mandatory |
952 |
-SSL_DEPS_SKIP=1 |
953 |
-inherit autotools lua-single ssl-cert systemd toolchain-funcs |
954 |
- |
955 |
-MY_P="${P/_/.}" |
956 |
-#MY_S="${PN}-ce-${PV}" |
957 |
-major_minor="$(ver_cut 1-2)" |
958 |
-sieve_version="0.5.13" |
959 |
-if [[ ${PV} == *_rc* ]] ; then |
960 |
- rc_dir="rc/" |
961 |
-else |
962 |
- rc_dir="" |
963 |
-fi |
964 |
-SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz |
965 |
- sieve? ( |
966 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
967 |
- ) |
968 |
- managesieve? ( |
969 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
970 |
- ) " |
971 |
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
972 |
-HOMEPAGE="https://www.dovecot.org/" |
973 |
- |
974 |
-SLOT="0" |
975 |
-LICENSE="LGPL-2.1 MIT" |
976 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
977 |
- |
978 |
-IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite" |
979 |
-IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib zstd" |
980 |
-IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve rpc selinux sieve solr static-libs suid tcpd textcat unwind" |
981 |
- |
982 |
-IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" |
983 |
- |
984 |
-REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" |
985 |
- |
986 |
-DEPEND="argon2? ( dev-libs/libsodium ) |
987 |
- bzip2? ( app-arch/bzip2 ) |
988 |
- caps? ( sys-libs/libcap ) |
989 |
- kerberos? ( virtual/krb5 ) |
990 |
- ldap? ( net-nds/openldap ) |
991 |
- lua? ( ${LUA_DEPS} ) |
992 |
- lucene? ( >=dev-cpp/clucene-2.3 ) |
993 |
- lzma? ( app-arch/xz-utils ) |
994 |
- lz4? ( app-arch/lz4 ) |
995 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
996 |
- pam? ( sys-libs/pam ) |
997 |
- postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) |
998 |
- rpc? ( net-libs/libtirpc net-libs/rpcsvc-proto ) |
999 |
- selinux? ( sec-policy/selinux-dovecot ) |
1000 |
- solr? ( net-misc/curl dev-libs/expat ) |
1001 |
- sqlite? ( dev-db/sqlite:* ) |
1002 |
- !libressl? ( dev-libs/openssl:0= ) |
1003 |
- libressl? ( dev-libs/libressl:0= ) |
1004 |
- suid? ( acct-group/mail ) |
1005 |
- tcpd? ( sys-apps/tcp-wrappers ) |
1006 |
- textcat? ( app-text/libexttextcat ) |
1007 |
- unwind? ( sys-libs/libunwind ) |
1008 |
- zlib? ( sys-libs/zlib ) |
1009 |
- zstd? ( app-arch/zstd ) |
1010 |
- virtual/libiconv |
1011 |
- dev-libs/icu:=" |
1012 |
- |
1013 |
-RDEPEND="${DEPEND} |
1014 |
- acct-group/dovecot |
1015 |
- acct-group/dovenull |
1016 |
- acct-user/dovecot |
1017 |
- acct-user/dovenull |
1018 |
- net-mail/mailbase" |
1019 |
- |
1020 |
-PATCHES=( |
1021 |
- "${FILESDIR}/${PN}"-autoconf-lua-version.patch |
1022 |
- "${FILESDIR}/${PN}"-unwind-generic.patch |
1023 |
- "${FILESDIR}/${PN}"-socket-name-too-long.patch |
1024 |
- ) |
1025 |
- |
1026 |
-pkg_setup() { |
1027 |
- use lua && lua-single_pkg_setup |
1028 |
- if use managesieve && ! use sieve; then |
1029 |
- ewarn "managesieve USE flag selected but sieve USE flag unselected" |
1030 |
- ewarn "sieve USE flag will be turned on" |
1031 |
- fi |
1032 |
-} |
1033 |
- |
1034 |
-src_prepare() { |
1035 |
- default |
1036 |
- # bug 657108 |
1037 |
- #elibtoolize |
1038 |
- eautoreconf |
1039 |
-} |
1040 |
- |
1041 |
-src_configure() { |
1042 |
- local conf="" |
1043 |
- |
1044 |
- if use postgres || use mysql || use sqlite; then |
1045 |
- conf="${conf} --with-sql" |
1046 |
- fi |
1047 |
- |
1048 |
- # turn valgrind tests off. Bug #340791 |
1049 |
- VALGRIND=no LUAPC="${ELUA}" econf \ |
1050 |
- --with-rundir="${EPREFIX}/run/dovecot" \ |
1051 |
- --with-statedir="${EPREFIX}/var/lib/dovecot" \ |
1052 |
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ |
1053 |
- --without-stemmer \ |
1054 |
- --disable-rpath \ |
1055 |
- --without-libbsd \ |
1056 |
- --with-icu \ |
1057 |
- --with-ssl \ |
1058 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
1059 |
- $( use_with argon2 sodium ) \ |
1060 |
- $( use_with bzip2 bzlib ) \ |
1061 |
- $( use_with caps libcap ) \ |
1062 |
- $( use_with kerberos gssapi ) \ |
1063 |
- $( use_with lua ) \ |
1064 |
- $( use_with ldap ) \ |
1065 |
- $( use_with lucene ) \ |
1066 |
- $( use_with lz4 ) \ |
1067 |
- $( use_with lzma ) \ |
1068 |
- $( use_with mysql ) \ |
1069 |
- $( use_with pam ) \ |
1070 |
- $( use_with postgres pgsql ) \ |
1071 |
- $( use_with sqlite ) \ |
1072 |
- $( use_with solr ) \ |
1073 |
- $( use_with tcpd libwrap ) \ |
1074 |
- $( use_with textcat ) \ |
1075 |
- $( use_with unwind libunwind ) \ |
1076 |
- $( use_with zlib ) \ |
1077 |
- $( use_with zstd ) \ |
1078 |
- $( use_enable static-libs static ) \ |
1079 |
- ${conf} |
1080 |
- |
1081 |
- if use sieve || use managesieve ; then |
1082 |
- # The sieve plugin needs this file to be build to determine the plugin |
1083 |
- # directory and the list of libraries to link to. |
1084 |
- emake dovecot-config |
1085 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
1086 |
- econf \ |
1087 |
- $( use_enable static-libs static ) \ |
1088 |
- --localstatedir="${EPREFIX}/var" \ |
1089 |
- --enable-shared \ |
1090 |
- --with-dovecot="${S}" \ |
1091 |
- $( use_with managesieve ) |
1092 |
- fi |
1093 |
-} |
1094 |
- |
1095 |
-src_compile() { |
1096 |
- default |
1097 |
- if use sieve || use managesieve ; then |
1098 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
1099 |
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
1100 |
- fi |
1101 |
-} |
1102 |
- |
1103 |
-src_test() { |
1104 |
- default |
1105 |
- if use sieve || use managesieve ; then |
1106 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
1107 |
- default |
1108 |
- fi |
1109 |
-} |
1110 |
- |
1111 |
-src_install() { |
1112 |
- default |
1113 |
- |
1114 |
- # insecure: |
1115 |
- # use suid && fperms u+s /usr/libexec/dovecot/deliver |
1116 |
- # better: |
1117 |
- if use suid;then |
1118 |
- einfo "Changing perms to allow deliver to be suided" |
1119 |
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda" |
1120 |
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda" |
1121 |
- fi |
1122 |
- |
1123 |
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot |
1124 |
- |
1125 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
1126 |
- |
1127 |
- dodoc AUTHORS NEWS README TODO |
1128 |
- dodoc doc/*.{txt,cnf,xml,sh} |
1129 |
- docinto example-config |
1130 |
- dodoc doc/example-config/*.{conf,ext} |
1131 |
- docinto example-config/conf.d |
1132 |
- dodoc doc/example-config/conf.d/*.{conf,ext} |
1133 |
- docinto wiki |
1134 |
- dodoc doc/wiki/* |
1135 |
- doman doc/man/*.{1,7} |
1136 |
- |
1137 |
- # Create the dovecot.conf file from the dovecot-example.conf file that |
1138 |
- # the dovecot folks nicely left for us.... |
1139 |
- local conf="${ED}/etc/dovecot/dovecot.conf" |
1140 |
- local confd="${ED}/etc/dovecot/conf.d" |
1141 |
- |
1142 |
- insinto /etc/dovecot |
1143 |
- doins doc/example-config/*.{conf,ext} |
1144 |
- insinto /etc/dovecot/conf.d |
1145 |
- doins doc/example-config/conf.d/*.{conf,ext} |
1146 |
- fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext |
1147 |
- rm -f "${confd}/../README" |
1148 |
- |
1149 |
- # .maildir is the Gentoo default |
1150 |
- local mail_location="maildir:~/.maildir" |
1151 |
- sed -i -e \ |
1152 |
- "s|#mail_location =|mail_location = ${mail_location}|" \ |
1153 |
- "${confd}/10-mail.conf" \ |
1154 |
- || die "failed to update mail location settings in 10-mail.conf" |
1155 |
- |
1156 |
- # We're using pam files (imap and pop3) provided by mailbase |
1157 |
- if use pam; then |
1158 |
- sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
1159 |
- "${confd}/auth-system.conf.ext" \ |
1160 |
- || die "failed to update PAM settings in auth-system.conf.ext" |
1161 |
- # mailbase does not provide a sieve pam file |
1162 |
- use managesieve && dosym imap /etc/pam.d/sieve |
1163 |
- sed -i -e \ |
1164 |
- 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
1165 |
- "${confd}/10-auth.conf" \ |
1166 |
- || die "failed to update PAM settings in 10-auth.conf" |
1167 |
- fi |
1168 |
- |
1169 |
- # Disable ipv6 if necessary |
1170 |
- if ! use ipv6; then |
1171 |
- sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
1172 |
- || die "failed to update listen settings in dovecot.conf" |
1173 |
- fi |
1174 |
- |
1175 |
- # Update ssl cert locations |
1176 |
- sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
1177 |
- || die "ssl conf failed" |
1178 |
- sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
1179 |
- -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
1180 |
- "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
1181 |
- |
1182 |
- # Install SQL configuration |
1183 |
- if use mysql || use postgres; then |
1184 |
- sed -i -e \ |
1185 |
- 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
1186 |
- "${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
1187 |
- 10-auth.conf" |
1188 |
- fi |
1189 |
- |
1190 |
- # Install LDAP configuration |
1191 |
- if use ldap; then |
1192 |
- sed -i -e \ |
1193 |
- 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
1194 |
- "${confd}/10-auth.conf" \ |
1195 |
- || die "failed to update ldap settings in 10-auth.conf" |
1196 |
- fi |
1197 |
- |
1198 |
- if use sieve || use managesieve ; then |
1199 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
1200 |
- emake DESTDIR="${ED}" install |
1201 |
- sed -i -e \ |
1202 |
- 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
1203 |
- || die "failed to update sieve settings in 15-lda.conf" |
1204 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
1205 |
- docinto example-config/conf.d |
1206 |
- dodoc doc/example-config/conf.d/*.conf |
1207 |
- insinto /etc/dovecot/conf.d |
1208 |
- doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf |
1209 |
- use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
1210 |
- docinto sieve/rfc |
1211 |
- dodoc doc/rfc/*.txt |
1212 |
- docinto sieve/devel |
1213 |
- dodoc doc/devel/DESIGN |
1214 |
- docinto plugins |
1215 |
- dodoc doc/plugins/*.txt |
1216 |
- docinto extensions |
1217 |
- dodoc doc/extensions/*.txt |
1218 |
- docinto locations |
1219 |
- dodoc doc/locations/*.txt |
1220 |
- doman doc/man/*.{1,7} |
1221 |
- fi |
1222 |
- |
1223 |
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete |
1224 |
-} |
1225 |
- |
1226 |
-pkg_postinst() { |
1227 |
- # Let's not make a new certificate if we already have one |
1228 |
- if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
1229 |
- -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
1230 |
- einfo "Creating SSL certificate" |
1231 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
1232 |
- install_cert /etc/ssl/dovecot/server |
1233 |
- fi |
1234 |
- |
1235 |
- elog "Please read https://doc.dovecot.org/installation_guide/upgrading/ for upgrade notes." |
1236 |
-} |
1237 |
|
1238 |
diff --git a/net-mail/dovecot/files/dovecot-2.3.11.3-apop-fix.patch b/net-mail/dovecot/files/dovecot-2.3.11.3-apop-fix.patch |
1239 |
deleted file mode 100644 |
1240 |
index 667b4829f1c..00000000000 |
1241 |
--- a/net-mail/dovecot/files/dovecot-2.3.11.3-apop-fix.patch |
1242 |
+++ /dev/null |
1243 |
@@ -1,60 +0,0 @@ |
1244 |
-From 3c5917d1abee8f4af43b5016ddb897154912eb8d Mon Sep 17 00:00:00 2001 |
1245 |
-From: Aki Tuomi <aki.tu...@××××××××××××.com> |
1246 |
-Date: Thu, 13 Aug 2020 19:13:49 +0300 |
1247 |
-Subject: [PATCH 2/2] auth: test-mech - Fix type mismatch |
1248 |
- |
1249 |
---- |
1250 |
- src/auth/test-mech.c | 4 ++-- |
1251 |
- 1 file changed, 2 insertions(+), 2 deletions(-) |
1252 |
- |
1253 |
-diff --git a/src/auth/test-mech.c b/src/auth/test-mech.c |
1254 |
-index 0a030a2be0..0a22ff46d0 100644 |
1255 |
---- a/src/auth/test-mech.c |
1256 |
-+++ b/src/auth/test-mech.c |
1257 |
-@@ -192,7 +192,7 @@ static void test_mech_handle_challenge(struct auth_request *request, |
1258 |
- } |
1259 |
- |
1260 |
- static inline const unsigned char * |
1261 |
--test_mech_construct_apop_challenge(unsigned int connect_uid, unsigned long *len_r) |
1262 |
-+test_mech_construct_apop_challenge(unsigned int connect_uid, size_t *len_r) |
1263 |
- { |
1264 |
- string_t *apop_challenge = t_str_new(128); |
1265 |
- |
1266 |
-@@ -323,7 +323,7 @@ static void test_mechs(void) |
1267 |
- struct test_case *test_case = &tests[running_test]; |
1268 |
- const struct mech_module *mech = test_case->mech; |
1269 |
- struct auth_request *request; |
1270 |
-- const char *testname = t_strdup_printf("auth mech %s %d/%lu", |
1271 |
-+ const char *testname = t_strdup_printf("auth mech %s %d/%zu", |
1272 |
- mech->mech_name, |
1273 |
- running_test+1, |
1274 |
- N_ELEMENTS(tests)); |
1275 |
--- |
1276 |
-2.11.0 |
1277 |
- |
1278 |
-From 47ebfeef07d0908ba6b66344b0f630a21b81bcab Mon Sep 17 00:00:00 2001 |
1279 |
-From: Aki Tuomi <aki.tu...@××××××××××××.com> |
1280 |
-Date: Thu, 13 Aug 2020 19:13:04 +0300 |
1281 |
-Subject: [PATCH 1/2] auth: test-mech - Fix APOP challenge format |
1282 |
- |
1283 |
---- |
1284 |
- src/auth/test-mech.c | 4 ++-- |
1285 |
- 1 file changed, 2 insertions(+), 2 deletions(-) |
1286 |
- |
1287 |
-diff --git a/src/auth/test-mech.c b/src/auth/test-mech.c |
1288 |
-index cf05370035..0a030a2be0 100644 |
1289 |
---- a/src/auth/test-mech.c |
1290 |
-+++ b/src/auth/test-mech.c |
1291 |
-@@ -196,8 +196,8 @@ test_mech_construct_apop_challenge(unsigned int connect_uid, unsigned long *len_ |
1292 |
- { |
1293 |
- string_t *apop_challenge = t_str_new(128); |
1294 |
- |
1295 |
-- str_printfa(apop_challenge,"<%lx.%u.%"PRIdTIME_T"", (unsigned long) getpid(), |
1296 |
-- connect_uid, process_start_time+10); |
1297 |
-+ str_printfa(apop_challenge,"<%lx.%lx.%"PRIxTIME_T".", (unsigned long)getpid(), |
1298 |
-+ (unsigned long)connect_uid, process_start_time+10); |
1299 |
- str_append_data(apop_challenge, "\0testuser\0responseoflen16-", 26); |
1300 |
- *len_r = apop_challenge->used; |
1301 |
- return apop_challenge->data; |
1302 |
--- |
1303 |
-2.11.0 |
1304 |
|
1305 |
diff --git a/net-mail/dovecot/files/dovecot-fix-search-crash.patch b/net-mail/dovecot/files/dovecot-fix-search-crash.patch |
1306 |
deleted file mode 100644 |
1307 |
index 860c070a433..00000000000 |
1308 |
--- a/net-mail/dovecot/files/dovecot-fix-search-crash.patch |
1309 |
+++ /dev/null |
1310 |
@@ -1,91 +0,0 @@ |
1311 |
-gentoo bug #756094 |
1312 |
- |
1313 |
-From a668d767a710ca18ab6e7177d8e8be22a6b024fb Mon Sep 17 00:00:00 2001 |
1314 |
-From: Timo Sirainen <timo.sirainen@××××××××××××.com> |
1315 |
-Date: Mon, 31 Aug 2020 20:38:42 +0300 |
1316 |
-Subject: [PATCH] lib-mail: message_parser_init_from_parts() - Fix crash if |
1317 |
- MIME boundaries don't end |
1318 |
- |
1319 |
-If the last "boundary--" doens't exist, the parsing assert-crashed at |
1320 |
-deinit. This mainly happened when searching mails. |
1321 |
- |
1322 |
-Fixes: |
1323 |
-Panic: file message-parser.c: line 175 (message_part_finish): assertion failed: (ctx->nested_parts_count > 0) |
1324 |
---- |
1325 |
- src/lib-mail/message-parser.c | 13 ++++++++----- |
1326 |
- src/lib-mail/test-message-parser.c | 21 ++++++++++++++++++++- |
1327 |
- 2 files changed, 28 insertions(+), 6 deletions(-) |
1328 |
- |
1329 |
-diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c |
1330 |
-index 011dea9050..8baf622e59 100644 |
1331 |
---- a/src/lib-mail/message-parser.c |
1332 |
-+++ b/src/lib-mail/message-parser.c |
1333 |
-@@ -138,6 +138,7 @@ message_part_append(struct message_parser_ctx *ctx) |
1334 |
- struct message_part *parent = ctx->part; |
1335 |
- struct message_part *part; |
1336 |
- |
1337 |
-+ i_assert(!ctx->preparsed); |
1338 |
- i_assert(parent != NULL); |
1339 |
- i_assert((parent->flags & (MESSAGE_PART_FLAG_MULTIPART | |
1340 |
- MESSAGE_PART_FLAG_MESSAGE_RFC822)) != 0); |
1341 |
-@@ -171,12 +172,14 @@ static void message_part_finish(struct message_parser_ctx *ctx) |
1342 |
- { |
1343 |
- struct message_part **const *parent_next_partp; |
1344 |
- |
1345 |
-- i_assert(ctx->nested_parts_count > 0); |
1346 |
-- ctx->nested_parts_count--; |
1347 |
-+ if (!ctx->preparsed) { |
1348 |
-+ i_assert(ctx->nested_parts_count > 0); |
1349 |
-+ ctx->nested_parts_count--; |
1350 |
- |
1351 |
-- parent_next_partp = array_back(&ctx->next_part_stack); |
1352 |
-- array_pop_back(&ctx->next_part_stack); |
1353 |
-- ctx->next_part = *parent_next_partp; |
1354 |
-+ parent_next_partp = array_back(&ctx->next_part_stack); |
1355 |
-+ array_pop_back(&ctx->next_part_stack); |
1356 |
-+ ctx->next_part = *parent_next_partp; |
1357 |
-+ } |
1358 |
- |
1359 |
- message_size_add(&ctx->part->parent->body_size, &ctx->part->body_size); |
1360 |
- message_size_add(&ctx->part->parent->body_size, &ctx->part->header_size); |
1361 |
-diff --git a/src/lib-mail/test-message-parser.c b/src/lib-mail/test-message-parser.c |
1362 |
-index 13984f939e..a00f0d6200 100644 |
1363 |
---- a/src/lib-mail/test-message-parser.c |
1364 |
-+++ b/src/lib-mail/test-message-parser.c |
1365 |
-@@ -178,9 +178,10 @@ static void test_message_parser_small_blocks(void) |
1366 |
- static void test_message_parser_stop_early(void) |
1367 |
- { |
1368 |
- struct message_parser_ctx *parser; |
1369 |
-- struct istream *input; |
1370 |
-+ struct istream *input, *input2; |
1371 |
- struct message_part *parts; |
1372 |
- struct message_block block; |
1373 |
-+ const char *error; |
1374 |
- unsigned int i; |
1375 |
- pool_t pool; |
1376 |
- int ret; |
1377 |
-@@ -198,6 +199,24 @@ static void test_message_parser_stop_early(void) |
1378 |
- &block)) > 0) ; |
1379 |
- test_assert(ret == 0); |
1380 |
- message_parser_deinit(&parser, &parts); |
1381 |
-+ |
1382 |
-+ /* test preparsed - first re-parse everything with a stream |
1383 |
-+ that sees EOF at this position */ |
1384 |
-+ input2 = i_stream_create_from_data(test_msg, i); |
1385 |
-+ parser = message_parser_init(pool, input2, &set_empty); |
1386 |
-+ while ((ret = message_parser_parse_next_block(parser, |
1387 |
-+ &block)) > 0) ; |
1388 |
-+ test_assert(ret == -1); |
1389 |
-+ message_parser_deinit(&parser, &parts); |
1390 |
-+ |
1391 |
-+ /* now parse from the parts */ |
1392 |
-+ i_stream_seek(input2, 0); |
1393 |
-+ parser = message_parser_init_from_parts(parts, input2, &set_empty); |
1394 |
-+ while ((ret = message_parser_parse_next_block(parser, |
1395 |
-+ &block)) > 0) ; |
1396 |
-+ test_assert(ret == -1); |
1397 |
-+ test_assert(message_parser_deinit_from_parts(&parser, &parts, &error) == 0); |
1398 |
-+ i_stream_unref(&input2); |
1399 |
- } |
1400 |
- |
1401 |
- i_stream_unref(&input); |
1402 |
|
1403 |
diff --git a/net-mail/dovecot/metadata.xml b/net-mail/dovecot/metadata.xml |
1404 |
index cf7190b460e..ba9b0131ea1 100644 |
1405 |
--- a/net-mail/dovecot/metadata.xml |
1406 |
+++ b/net-mail/dovecot/metadata.xml |
1407 |
@@ -9,7 +9,6 @@ |
1408 |
<flag name="argon2">Add support for ARGON2 password schemes</flag> |
1409 |
<flag name="managesieve">Add managesieve protocol support</flag> |
1410 |
<flag name="sieve">Add sieve support</flag> |
1411 |
- <flag name="vpopmail">Add vpopmail support</flag> |
1412 |
<flag name="lucene">Add lucene full text search (FTS) support using <pkg>dev-cpp/clucene</pkg></flag> |
1413 |
<flag name="lzma">Add support for lzma (de)compression</flag> |
1414 |
<flag name="rpc">Add support for NFS quotas</flag> |