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