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