1 |
commit: 01e1690ff11369c6890a023b83b5125592a5a2b1 |
2 |
Author: Hanno <hanno <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 3 09:45:59 2019 +0000 |
4 |
Commit: Hanno Boeck <hanno <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 3 09:45:59 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01e1690f |
7 |
|
8 |
mail-mta/courier: Version bump. |
9 |
|
10 |
Change permission of ldapaliasrc (#394417). |
11 |
Change mysql dependency (#665918). |
12 |
Switch to EAPI 7. |
13 |
Use upstream default libexecdir. |
14 |
Warn about Unicode maildir changes. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/394417 |
17 |
Closes: https://bugs.gentoo.org/665918 |
18 |
Closes: https://bugs.gentoo.org/671042 |
19 |
Signed-off-by: Hanno Boeck <hanno <AT> gentoo.org> |
20 |
Package-Manager: Portage-2.3.53, Repoman-2.3.12 |
21 |
|
22 |
mail-mta/courier/Manifest | 1 + |
23 |
mail-mta/courier/courier-1.0.5.ebuild | 314 ++++++++++++++++++++++++++++++++++ |
24 |
2 files changed, 315 insertions(+) |
25 |
|
26 |
diff --git a/mail-mta/courier/Manifest b/mail-mta/courier/Manifest |
27 |
index 9606e063cdd..0b56ddc92ff 100644 |
28 |
--- a/mail-mta/courier/Manifest |
29 |
+++ b/mail-mta/courier/Manifest |
30 |
@@ -1,3 +1,4 @@ |
31 |
DIST courier-0.75.0.tar.bz2 6970339 BLAKE2B 2c2f9900ab0370eff8b1a62759295e2d0598153075ea9a2f832d59272c5a21d5ab912fc852c7e75d7510d5ddf2d1484e830e6bf57c6952839f8688f174b6f27d SHA512 37e66329f157e18176d4ac8c5e814be78e80ff7dec234886bec8dce2ae5c58ac68bc18e07c739295c25fae8ec778b162bab505d85ea0998db7192d52c47e7bc6 |
32 |
DIST courier-0.76.4.tar.bz2 7237424 BLAKE2B 7dbfb43cef75ed5187e044130c6cb793848791956a8531fcc54ae7a444e475c16219816c2ad7834e3b5349cf945f59023f0b9e2415c7c64352b5aa71eaf00bbd SHA512 6350ef5e30bd1e4921350bf3a09de0b56513530852c93f9a06e23625e49ae09d7ff26558da1f816a5bb492579afb5c1cbcf7573199bf898a039cd3607e847c30 |
33 |
DIST courier-0.78.2.tar.bz2 7379529 BLAKE2B 5ba1ef013e513b269746999b2dd75f37fe8a9f1d87a51b61db1a8100c9a5cd022039462c235d35a95cf14ac5c406becf0f5d4f9344462e862045dc7333b7a0b7 SHA512 376de08cbaf9c2c74cd79e5d42680d8d6c31ecf0b0ef014f4152aa857224ba3e6d9e0f91b5097d15dcb5de9a5603a4707bc9b78902a5934c0a0ca68b74212055 |
34 |
+DIST courier-1.0.5.tar.bz2 7465054 BLAKE2B 55e9ba2a85889e7210652475149f4d3e687fd63a27b44a5a16c888b2f60bb18c4156e3344792585fed2ee3d81770e79c55ce5791842c255b8701bad5d2f8af4e SHA512 99a8e98633da99abd1f6f4e24328d4655526d51dc9fc03ffcb9c1e0cce0e608dedb2ac9511829af4487ff5af4618500d6fbbee26568f2a05e3c9d3cf3b48b2a5 |
35 |
|
36 |
diff --git a/mail-mta/courier/courier-1.0.5.ebuild b/mail-mta/courier/courier-1.0.5.ebuild |
37 |
new file mode 100644 |
38 |
index 00000000000..ac78da64e52 |
39 |
--- /dev/null |
40 |
+++ b/mail-mta/courier/courier-1.0.5.ebuild |
41 |
@@ -0,0 +1,314 @@ |
42 |
+# Copyright 1999-2019 Gentoo Authors |
43 |
+# Distributed under the terms of the GNU General Public License v2 |
44 |
+ |
45 |
+EAPI=7 |
46 |
+inherit eutils flag-o-matic multilib |
47 |
+ |
48 |
+DESCRIPTION="An MTA designed specifically for maildirs" |
49 |
+SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" |
50 |
+HOMEPAGE="http://www.courier-mta.org/" |
51 |
+SLOT="0" |
52 |
+LICENSE="GPL-2" |
53 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" |
54 |
+IUSE="postgres ldap libressl mysql pam nls ipv6 spell fax crypt norewrite \ |
55 |
+ fam web webmail gnutls" |
56 |
+REQUIRED_USE="?? ( gnutls libressl )" |
57 |
+ |
58 |
+DEPEND=" |
59 |
+ >=net-libs/courier-authlib-0.69.0-r1 |
60 |
+ >=net-libs/courier-unicode-2.1 |
61 |
+ !gnutls? ( !libressl? ( dev-libs/openssl:0= ) ) |
62 |
+ libressl? ( dev-libs/libressl:= ) |
63 |
+ gnutls? ( net-libs/gnutls ) |
64 |
+ >=sys-libs/gdbm-1.8.0 |
65 |
+ dev-libs/libpcre |
66 |
+ app-misc/mime-types |
67 |
+ fax? ( >=media-libs/netpbm-9.12 app-text/ghostscript-gpl >=net-dialup/mgetty-1.1.28 ) |
68 |
+ pam? ( virtual/pam ) |
69 |
+ mysql? ( dev-db/mysql-connector-c ) |
70 |
+ ldap? ( >=net-nds/openldap-1.2.11 ) |
71 |
+ postgres? ( dev-db/postgresql:= ) |
72 |
+ spell? ( app-text/aspell ) |
73 |
+ fam? ( virtual/fam ) |
74 |
+ !mail-filter/maildrop |
75 |
+ !mail-mta/esmtp |
76 |
+ !mail-mta/exim |
77 |
+ !mail-mta/mini-qmail |
78 |
+ !mail-mta/msmtp |
79 |
+ !mail-mta/netqmail |
80 |
+ !mail-mta/nullmailer |
81 |
+ !mail-mta/postfix |
82 |
+ !mail-mta/qmail-ldap |
83 |
+ !mail-mta/sendmail |
84 |
+ !mail-mta/ssmtp |
85 |
+ !mail-mta/opensmtpd |
86 |
+ !net-mail/dot-forward |
87 |
+ !sys-apps/ucspi-tcp |
88 |
+ " |
89 |
+ |
90 |
+RDEPEND="${DEPEND} |
91 |
+ dev-lang/perl |
92 |
+ sys-process/procps" |
93 |
+ |
94 |
+# get rid of old style virtual/imapd - bug 350792 |
95 |
+# all blockers really needed? |
96 |
+RDEPEND="${RDEPEND} |
97 |
+ !net-mail/bincimap |
98 |
+ !net-mail/courier-imap |
99 |
+ !net-mail/cyrus-imapd |
100 |
+ !net-mail/uw-imap" |
101 |
+ |
102 |
+PDEPEND="pam? ( net-mail/mailbase ) |
103 |
+ crypt? ( >=app-crypt/gnupg-1.0.4 )" |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ use norewrite && epatch "${FILESDIR}/norewrite.patch" |
107 |
+ default |
108 |
+} |
109 |
+ |
110 |
+src_configure() { |
111 |
+ filter-flags '-fomit-frame-pointer' |
112 |
+ |
113 |
+ local myconf |
114 |
+ myconf="" |
115 |
+ |
116 |
+ use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf" |
117 |
+ |
118 |
+ econf ${myconf} \ |
119 |
+ $(use_with fam) \ |
120 |
+ $(use_with ipv6) \ |
121 |
+ $(use_with spell ispell) \ |
122 |
+ $(use_with ldap ldapaliasd) \ |
123 |
+ $(use_enable ldap maildroldap) \ |
124 |
+ $(use_with gnutls) \ |
125 |
+ --with-notice=unicode \ |
126 |
+ --enable-mimetypes=/etc/mime.types \ |
127 |
+ --prefix=/usr \ |
128 |
+ --disable-root-check \ |
129 |
+ --mandir=/usr/share/man \ |
130 |
+ --sysconfdir=/etc/courier \ |
131 |
+ --datadir=/usr/share/courier \ |
132 |
+ --sharedstatedir=/var/lib/courier/com \ |
133 |
+ --localstatedir=/var/lib/courier \ |
134 |
+ --with-piddir=/var/run/courier \ |
135 |
+ --with-authdaemonvar=/var/lib/courier/authdaemon \ |
136 |
+ --with-mailuser=mail \ |
137 |
+ --with-mailgroup=mail \ |
138 |
+ --with-paranoid-smtpext \ |
139 |
+ --with-db=gdbm \ |
140 |
+ --disable-autorenamesent \ |
141 |
+ --cache-file="${S}/configuring.cache" \ |
142 |
+ --host="${CHOST}" debug=true || die "./configure" |
143 |
+ sed -e'/^install-perms-local:/a\ sed -e\"s|^|'"${D}"'|g\" -i permissions.dat' -i Makefile |
144 |
+} |
145 |
+ |
146 |
+src_compile() { |
147 |
+ default |
148 |
+} |
149 |
+ |
150 |
+etc_courier() { |
151 |
+ # Import existing /etc/courier/file if it exists. |
152 |
+ # Add option only if it was not already set or even commented out |
153 |
+ file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`" |
154 |
+ [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \ |
155 |
+ cp "/etc/courier/${file}" "${D}/etc/courier/${file}" |
156 |
+ grep -q "${word}" "${D}/etc/courier/${file}" || \ |
157 |
+ echo "${2}" >> "${D}/etc/courier/${file}" |
158 |
+} |
159 |
+ |
160 |
+etc_courier_chg() { |
161 |
+ file="${1}" ; key="${2}" ; value="${3}" ; section="${4}" |
162 |
+ [ -z "${section}" ] && section="${2}" |
163 |
+ grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}" |
164 |
+ sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file} |
165 |
+} |
166 |
+ |
167 |
+src_install() { |
168 |
+ local f |
169 |
+ diropts -o mail -g mail |
170 |
+ keepdir /var/lib/courier/tmp |
171 |
+ keepdir /var/lib/courier/msgs |
172 |
+ make install DESTDIR="${D}" || die "install" |
173 |
+ make install-configure || die "install-configure" |
174 |
+ |
175 |
+ # init script takes care of this |
176 |
+ rm -rf "${D}/var/run" |
177 |
+ |
178 |
+ # Get rid of files we dont want |
179 |
+ if ! use webmail ; then |
180 |
+ rm -rf "${D}/usr/$(get_libdir)/courier/courier/webmail" \ |
181 |
+ "${D}/usr/$(get_libdir)/courier/courier/sqwebmaild" \ |
182 |
+ "${D}/usr/share/courier/sqwebmail/" \ |
183 |
+ "${D}/usr/sbin/webmaild" \ |
184 |
+ "${D}/usr/sbin/webgpg" \ |
185 |
+ "${D}/etc/courier/webmail.authpam" \ |
186 |
+ "${D}/var/lib/courier/webmail-logincache" \ |
187 |
+ "${D}"/etc/courier/sqwebmaild* |
188 |
+ fi |
189 |
+ |
190 |
+ if ! use web ; then |
191 |
+ rm -rf "${D}/usr/share/courier/courierwebadmin/" \ |
192 |
+ "${D}/etc/courier/webadmin" |
193 |
+ fi |
194 |
+ |
195 |
+ for dir2keep in $(cd "${D}" && find ./var/lib/courier -type d) ; do |
196 |
+ keepdir "$dir2keep" || die "failed running keepdir: $dir2keep" |
197 |
+ done |
198 |
+ |
199 |
+ newinitd "${FILESDIR}/courier-init-r4" "courier" |
200 |
+ use fam || sed -i -e's|^.*use famd$||g' "${D}/etc/init.d/courier" |
201 |
+ |
202 |
+ cd "${D}/etc/courier" |
203 |
+ if use webmail ; then |
204 |
+ insinto /etc/courier |
205 |
+ newins "${FILESDIR}/apache-sqwebmail.inc" apache-sqwebmail.inc |
206 |
+ fi |
207 |
+ |
208 |
+ for f in *.dist ; do cp "${f}" "${f%%.dist}" ; done |
209 |
+ if use ldap ; then |
210 |
+ [ -e ldapaliasrc ] && ( chown root:mail ldapaliasrc ; chmod 640 ldapaliasrc ) |
211 |
+ else |
212 |
+ rm -f ldapaliasrc |
213 |
+ fi |
214 |
+ |
215 |
+ ( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
216 |
+ > "${D}/etc/courier/sizelimit" |
217 |
+ etc_courier maildroprc "" |
218 |
+ etc_courier esmtproutes "" |
219 |
+ etc_courier backuprelay "" |
220 |
+ etc_courier locallowercase "" |
221 |
+ etc_courier bofh "opt BOFHBADMIME=accept" |
222 |
+ etc_courier bofh "opt BOFHSPFTRUSTME=1" |
223 |
+ etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail" |
224 |
+ etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none" |
225 |
+ etc_courier bofh "opt BOFHSPFFROM=all" |
226 |
+ etc_courier bofh "opt BOFHSPFMAILFROM=all" |
227 |
+ etc_courier bofh "#opt BOFHSPFHARDERROR=fail" |
228 |
+ etc_courier esmtpd "BOFHBADMIME=accept" |
229 |
+ etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
230 |
+ etc_courier esmtpd-msa "BOFHBADMIME=accept" |
231 |
+ |
232 |
+ use fam && etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE" |
233 |
+ use fam || etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256" |
234 |
+ |
235 |
+ # Fix for a sandbox violation on subsequential merges |
236 |
+ # - ticho@g.o, 2005-07-10 |
237 |
+ dosym ../share/courier/pop3d /usr/sbin/courier-pop3d |
238 |
+ dosym ../share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl |
239 |
+ dosym ../share/courier/imapd /usr/sbin/courier-imapd |
240 |
+ dosym ../share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl |
241 |
+ |
242 |
+ cd "${S}" |
243 |
+ cp imap/README README.imap |
244 |
+ use nls && cp unicode/README README.unicode |
245 |
+ dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
246 |
+ dodoc libs/tcpd/README.couriertls |
247 |
+ mv "${D}/usr/share/courier/htmldoc" "${D}/usr/share/doc/${PF}/html" |
248 |
+ |
249 |
+ if use webmail ; then |
250 |
+ insinto /usr/$(get_libdir)/courier/courier |
251 |
+ insopts -m 755 -o mail -g mail |
252 |
+ doins "${S}/courier/webmaild" |
253 |
+ fi |
254 |
+ |
255 |
+ if use web ; then |
256 |
+ insinto /etc/courier/webadmin |
257 |
+ insopts -m 400 -o mail -g mail |
258 |
+ doins "${FILESDIR}/password.dist" |
259 |
+ fi |
260 |
+ |
261 |
+ # avoid name collisions in /usr/sbin, make webadmin match |
262 |
+ cd "${D}/usr/sbin" |
263 |
+ for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv "${f}" "courier-${f}" ; done |
264 |
+ if use web ; then |
265 |
+ sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \ |
266 |
+ -e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \ |
267 |
+ "${D}/usr/share/courier/courierwebadmin/admin-40imap.pl" \ |
268 |
+ || ewarn "failed to fix webadmin" |
269 |
+ sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \ |
270 |
+ -e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \ |
271 |
+ "${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl" \ |
272 |
+ || ewarn "failed to fix webadmin" |
273 |
+ fi |
274 |
+ |
275 |
+ # users should be able to send mail. Could be restricted with suictl. |
276 |
+ chmod u+s "${D}/usr/bin/sendmail" |
277 |
+ |
278 |
+ dosym ../bin/sendmail /usr/sbin/sendmail |
279 |
+} |
280 |
+ |
281 |
+src_test() { |
282 |
+ if [ `whoami` != 'root' ]; then |
283 |
+ emake -j1 check || die "Make check failed." |
284 |
+ else |
285 |
+ einfo "make check skipped, can't run as root." |
286 |
+ einfo "You can enable it with FEATURES=\"userpriv\"" |
287 |
+ fi |
288 |
+} |
289 |
+ |
290 |
+pkg_postinst() { |
291 |
+ use fam && elog "fam daemon is needed for courier-imapd" \ |
292 |
+ || ewarn "courier was built without fam support" |
293 |
+ |
294 |
+ ewarn "If you are updating from pre-1.0 courier versions to" |
295 |
+ ewarn "1.x versions you may need to update your maildir's" |
296 |
+ ewarn "to the new Unicode format, see also:" |
297 |
+ ewarn "https://www.courier-mta.org/maildirmake.html" |
298 |
+} |
299 |
+ |
300 |
+pkg_config() { |
301 |
+ mailhost="$(hostname)" |
302 |
+ export mailhost |
303 |
+ |
304 |
+ domainname="$(domainname)" |
305 |
+ if [ "x$domainname" = "x(none)" ] ; then |
306 |
+ domainname="$(echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/")" |
307 |
+ fi |
308 |
+ export domainname |
309 |
+ |
310 |
+ if [ "${ROOT}" = "/" ] ; then |
311 |
+ file="${ROOT}/etc/courier/locals" |
312 |
+ if [ ! -f "${file}" ] ; then |
313 |
+ echo "localhost" > "${file}"; |
314 |
+ echo "${domainname}" >> "${file}"; |
315 |
+ fi |
316 |
+ file="${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}" |
317 |
+ if [ ! -f "${file}" ] ; then |
318 |
+ echo "${domainname}" > "${file}" |
319 |
+ /usr/sbin/makeacceptmailfor |
320 |
+ fi |
321 |
+ |
322 |
+ file="${ROOT}/etc/courier/smtpaccess/${domainname}" |
323 |
+ if [ ! -f "${file}" ] |
324 |
+ then |
325 |
+ netstat -nr | grep "^[1-9]" | while read network gateway netmask rest |
326 |
+ do |
327 |
+ i=1 |
328 |
+ net="" |
329 |
+ TIFS="${IFS}" |
330 |
+ IFS="." |
331 |
+ for o in "${netmask}" |
332 |
+ do |
333 |
+ if [ "${o}" == "255" ] |
334 |
+ then |
335 |
+ [ "_${net}" == "_" ] || net="${net}." |
336 |
+ t="$(echo "${network}" | cut -d " " -f ${i})" |
337 |
+ net="${net}${t}" |
338 |
+ fi |
339 |
+ i="$((${i} + 1))" |
340 |
+ done |
341 |
+ IFS="${TIFS}" |
342 |
+ echo "doing configuration - relay control for the network ${net} !" |
343 |
+ echo "${net} allow,RELAYCLIENT" >> ${file} |
344 |
+ done |
345 |
+ /usr/sbin/makesmtpaccess |
346 |
+ fi |
347 |
+ fi |
348 |
+ |
349 |
+ echo "creating cert for esmtpd-ssl:" |
350 |
+ /usr/sbin/mkesmtpdcert |
351 |
+ echo "creating cert for imapd-ssl:" |
352 |
+ /usr/sbin/mkpop3dcert |
353 |
+ echo "creating cert for pop3d-ssl:" |
354 |
+ /usr/sbin/mkimapdcert |
355 |
+} |