Bernd Wurst commited on 2008-03-07 18:56:57
Zeige 13 geänderte Dateien mit 52 Einfügungen und 1656 Löschungen.
| ... | ... |
@@ -10,6 +10,7 @@ AUX mailer.conf 197 RMD160 4229dfa9cf33b275571538211dad33da5ae84048 SHA1 caf0957 |
| 10 | 10 |
AUX norewrite.patch 489 RMD160 1d0bacf702126cc4f8b9d7b07bbc6a9357b7b6e9 SHA1 007059af9ab5d89b36004e590b6a21911515f69b SHA256 526f3742fb43af93811e6e4b3210fda1c611b50ce5abdf3a57a25dfe4f5c38e4 |
| 11 | 11 |
AUX pam-include.patch 1534 RMD160 20456564341339c661ee20efe6b830f9df484b7e SHA1 318d1ae44e946c3809f56476ab02d0f851bc981c SHA256 2f0ea30cffdfec5d0f2ce3aece3e5ea2717ae6d04918210a0b9247a30fc15782 |
| 12 | 12 |
AUX password.dist 247 RMD160 eab211be0b1e3dbd6206f79e993b1d314a24efa3 SHA1 2cdd5bcf561f7267be6f18b731813962030af166 SHA256 46f20a84922d108d39a7c26ad3ba8915326549f46cea811e2384f55a589d38e2 |
| 13 |
+AUX remove-sysconftool.patch 1462 RMD160 e7cf6c03ff92840278eed734ed62920ed5095bfe SHA1 70910e9a4e39b7b9474d8354f67dd344559dadcb SHA256 bcd99b15bffa735a7ce219ddf52f018c3bc630b5b95b928e7ba7652ee3cff298 |
|
| 13 | 14 |
AUX set-mime 741 RMD160 8ed45fb4a0aee168a70cdcab6d17cf1606f85cad SHA1 b8834602c7304d42f3179a8dde43dcc57d0f4972 SHA256 bf15af7c181d517a924cb82854cbce46278e6e28ffb338e2159ba89c386dc74f |
| 14 | 15 |
DIST courier-0.53.2.tar.bz2 6942557 RMD160 a6efce3a8d6572923190ea49ed6085906317ebd8 SHA1 89c6a9a57467adf8c1ac815a5ffacf47e5e694a3 SHA256 0b44e02652084ca4023646ca0cdd3d173dcbadf919e81aa012b42666b3acf726 |
| 15 | 16 |
DIST courier-0.55.1.tar.bz2 7019376 RMD160 43b4e5868a3e450cbc238cae0ba411011c1fa49f SHA1 a4b83a1fa018abd9d32b946b6407764ad2d98993 SHA256 caec49a2fed5c2048ea69fc290dc01402bf0dfc7852d2e1865e35ae15ce1eea6 |
| ... | ... |
@@ -18,6 +19,6 @@ EBUILD courier-0.53.2-r1.ebuild 11567 RMD160 6d0aa51f770a25bc3ed037d92ccad8ed2be |
| 18 | 19 |
EBUILD courier-0.53.2.ebuild 11532 RMD160 576ce689a2bc8fb1f6e4518bbddc5bd1a1fcd453 SHA1 40690f3fe06591582b52e0ee29c28c0a0b1e2da7 SHA256 fb00cdf3c88032f267ed838186b0d6e6b7699ad2354906ec8090ca6fd90cb115 |
| 19 | 20 |
EBUILD courier-0.55.1-r1.ebuild 11574 RMD160 10f8494989c6e3cbf191aee90a1f85c7b9ea9b3d SHA1 4c736ffd0914fb8b25d15e5348ee90a90f26f362 SHA256 80d642b6e32ce96f1fcc51ce2e75dcc376f6fac9f2e545dee0e1af7fa5b84a07 |
| 20 | 21 |
EBUILD courier-0.55.1.ebuild 11538 RMD160 15e23e2c8736ead5b71d502020a266f1712f257e SHA1 5f01c3926aa1fc9d080dd4190c6899c6ed104879 SHA256 253f511eb570d6915fe68c77e55d3ca194e1b4e6ead018dd9c622934ef1f59da |
| 21 |
-EBUILD courier-0.58.0.ebuild 11574 RMD160 10f8494989c6e3cbf191aee90a1f85c7b9ea9b3d SHA1 4c736ffd0914fb8b25d15e5348ee90a90f26f362 SHA256 80d642b6e32ce96f1fcc51ce2e75dcc376f6fac9f2e545dee0e1af7fa5b84a07 |
|
| 22 |
+EBUILD courier-0.58.0.ebuild 10294 RMD160 3dc6938bc0658b35074922ec7c616d77d0cb476d SHA1 990f368b76eb6ab80a9088a277cfeb8bd627360c SHA256 dacdb1641ecce9f59cc996f724e4499072911107f4e7f6c6dfc1f76c48e1adcc |
|
| 22 | 23 |
MISC ChangeLog 27279 RMD160 f86b90f21295d8937e876699d76c595d7ec26b67 SHA1 08ccaeec369c118b4da83d9c683ba46342d0f375 SHA256 4ad3fb711db55f0f3df6561042936f7c9972b586927fa6698ce4e4918009df8d |
| 23 | 24 |
MISC metadata.xml 322 RMD160 44060011d03244f97a8cc9605f0eb0de3631a2e5 SHA1 ca88991053a2eef8c9f1603ce850eff1d145deaa SHA256 1ef3b7121e17952973a7b717155b7e892b40ef64ff22d370bf7d425521df88a0 |
| ... | ... |
@@ -1,341 +0,0 @@ |
| 1 |
-# Copyright 1999-2008 Gentoo Foundation |
|
| 2 |
-# Distributed under the terms of the GNU General Public License v2 |
|
| 3 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.53.2-r1.ebuild,v 1.9 2008/02/03 10:51:33 hollow Exp $ |
|
| 4 |
- |
|
| 5 |
-WANT_AUTOCONF="latest" |
|
| 6 |
-WANT_AUTOMAKE="latest" |
|
| 7 |
- |
|
| 8 |
-inherit eutils flag-o-matic autotools |
|
| 9 |
- |
|
| 10 |
-DESCRIPTION="An MTA designed specifically for maildirs" |
|
| 11 |
-[ -z "${PV/?.??/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 12 |
-[ -z "${PV/?.??.?/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 13 |
-[ -z "${SRC_URI}" ] && SRC_URI="http://www.courier-mta.org/beta/courier/${P%%_pre}.tar.bz2"
|
|
| 14 |
-HOMEPAGE="http://www.courier-mta.org/" |
|
| 15 |
-S="${WORKDIR}/${P%%_pre}"
|
|
| 16 |
- |
|
| 17 |
-SLOT="0" |
|
| 18 |
-LICENSE="GPL-2" |
|
| 19 |
-# not in keywords due to missing dependencies: ~arm ~s390 ~ppc64 |
|
| 20 |
-KEYWORDS="alpha amd64 hppa ia64 ~mips ppc sparc x86" |
|
| 21 |
-IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite mailwrapper fam" |
|
| 22 |
- |
|
| 23 |
-PROVIDE="virtual/mta |
|
| 24 |
- virtual/mda |
|
| 25 |
- virtual/imapd" |
|
| 26 |
- |
|
| 27 |
-DEPEND=" |
|
| 28 |
- >=net-libs/courier-authlib-0.55 |
|
| 29 |
- >=dev-libs/openssl-0.9.6 |
|
| 30 |
- >=sys-libs/gdbm-1.8.0 |
|
| 31 |
- dev-libs/libpcre |
|
| 32 |
- app-misc/mime-types |
|
| 33 |
- fax? ( >=media-libs/netpbm-9.12 virtual/ghostscript >=net-dialup/mgetty-1.1.28 ) |
|
| 34 |
- pam? ( virtual/pam ) |
|
| 35 |
- mysql? ( virtual/mysql ) |
|
| 36 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
|
| 37 |
- postgres? ( >=dev-db/postgresql-7.1.3 ) |
|
| 38 |
- spell? ( virtual/aspell-dict ) |
|
| 39 |
- fam? ( virtual/fam ) |
|
| 40 |
- !mailwrapper? ( !virtual/mta ) |
|
| 41 |
- !virtual/imapd |
|
| 42 |
- !mail-filter/maildrop" |
|
| 43 |
- |
|
| 44 |
-RDEPEND="${DEPEND}
|
|
| 45 |
- dev-lang/perl |
|
| 46 |
- sys-process/procps" |
|
| 47 |
- |
|
| 48 |
-PDEPEND="mailwrapper? ( >=net-mail/mailwrapper-0.2 ) |
|
| 49 |
- pam? ( net-mail/mailbase ) |
|
| 50 |
- crypt? ( >=app-crypt/gnupg-1.0.4 )" |
|
| 51 |
- |
|
| 52 |
-filter-flags '-fomit-frame-pointer' |
|
| 53 |
- |
|
| 54 |
-src_unpack() {
|
|
| 55 |
- use fam || ( |
|
| 56 |
- ewarn "File Alteration Monitor (FAM) is disabled" |
|
| 57 |
- ewarn "courier-imap will fall back to 60 second polls." |
|
| 58 |
- ewarn 'add "fam" to your USE flags to build as usual' |
|
| 59 |
- ebeep 4 |
|
| 60 |
- epause 4 ) |
|
| 61 |
- unpack ${A}
|
|
| 62 |
- cd ${S}
|
|
| 63 |
- use norewrite && epatch ${FILESDIR}/norewrite.patch
|
|
| 64 |
- use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub |
|
| 65 |
- |
|
| 66 |
- epatch "${FILESDIR}/pam-include.patch"
|
|
| 67 |
- |
|
| 68 |
- # disable link to fam. |
|
| 69 |
- epatch ${FILESDIR}/fam-disable-check.patch
|
|
| 70 |
- cd ${S}/maildir
|
|
| 71 |
- eautoreconf |
|
| 72 |
-} |
|
| 73 |
- |
|
| 74 |
-src_compile() {
|
|
| 75 |
- local myconf |
|
| 76 |
- myconf="`use_with ipv6` \ |
|
| 77 |
- `use_with ldap ldapaliasd` `use_enable ldap maildropldap`" |
|
| 78 |
- |
|
| 79 |
- use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf"
|
|
| 80 |
- use spell || myconf="${myconf} --without-ispell"
|
|
| 81 |
- |
|
| 82 |
- myconf="${myconf} --enable-mimetypes=/etc/mime.types"
|
|
| 83 |
- |
|
| 84 |
- myconf="${myconf} $(use_with fam)"
|
|
| 85 |
- |
|
| 86 |
- einfo "Configuring courier: `echo ${myconf} | xargs echo`"
|
|
| 87 |
- |
|
| 88 |
- econf \ |
|
| 89 |
- --prefix=/usr \ |
|
| 90 |
- --disable-root-check \ |
|
| 91 |
- --mandir=/usr/share/man \ |
|
| 92 |
- --sysconfdir=/etc/courier \ |
|
| 93 |
- --libexecdir=/usr/$(get_libdir)/courier \ |
|
| 94 |
- --datadir=/usr/share/courier \ |
|
| 95 |
- --sharedstatedir=/var/lib/courier/com \ |
|
| 96 |
- --localstatedir=/var/lib/courier \ |
|
| 97 |
- --with-piddir=/var/run/courier \ |
|
| 98 |
- --with-authdaemonvar=/var/lib/courier/authdaemon \ |
|
| 99 |
- --with-mailuser=mail \ |
|
| 100 |
- --with-mailgroup=mail \ |
|
| 101 |
- --with-paranoid-smtpext \ |
|
| 102 |
- --with-db=gdbm \ |
|
| 103 |
- --disable-autorenamesent \ |
|
| 104 |
- --cache-file=${S}/configuring.cache \
|
|
| 105 |
- --host=${CHOST} ${myconf} debug=true || die "./configure"
|
|
| 106 |
- sed -e'/^install-perms-local:/a\ sed -e\"s|^|'${D}'|g\" -i permissions.dat' -i Makefile
|
|
| 107 |
- emake || die "Compile problem" |
|
| 108 |
-} |
|
| 109 |
- |
|
| 110 |
-etc_courier() {
|
|
| 111 |
- # Import existing /etc/courier/file if it exists. |
|
| 112 |
- # Add option only if it was not already set or even commented out |
|
| 113 |
- file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`"
|
|
| 114 |
- [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \
|
|
| 115 |
- cp "/etc/courier/${file}" "${D}/etc/courier/${file}"
|
|
| 116 |
- grep -q "${word}" "${D}/etc/courier/${file}" || \
|
|
| 117 |
- echo "${2}" >> "${D}/etc/courier/${file}"
|
|
| 118 |
-} |
|
| 119 |
- |
|
| 120 |
-etc_courier_chg() {
|
|
| 121 |
- file="${1}" ; key="${2}" ; value="${3}" ; section="${4}"
|
|
| 122 |
- [ -z "${section}" ] && section="${2}"
|
|
| 123 |
- grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}"
|
|
| 124 |
- sed -i -e"/\#\#NAME: ${section}/,+20 s|${key}=.*|${key}=\"${value}\"|g" ${file}
|
|
| 125 |
-} |
|
| 126 |
- |
|
| 127 |
-set_maildir() {
|
|
| 128 |
- local f ; local files=$* |
|
| 129 |
- origmaildir='Maildir' |
|
| 130 |
- newmaildir='.maildir' |
|
| 131 |
- for f in ${files} ; do
|
|
| 132 |
- grep -q "${origmaildir}" "${f}" && \
|
|
| 133 |
- elog "Changing ${origmaildir} in ${f} to ${newmaildir}"
|
|
| 134 |
- sed -i -e"/^[^\#]/ s/${origmaildir}/${newmaildir}/g" ${f}
|
|
| 135 |
- done |
|
| 136 |
-} |
|
| 137 |
- |
|
| 138 |
-src_install() {
|
|
| 139 |
- local f |
|
| 140 |
- einfo "Setting up maildirs in the account skeleton ..." |
|
| 141 |
- diropts -m 755 -o root -g root |
|
| 142 |
- dodir /etc/skel |
|
| 143 |
- ${S}/maildir/maildirmake ${D}/etc/skel/.maildir
|
|
| 144 |
- keepdir /etc/skel/.maildir |
|
| 145 |
- |
|
| 146 |
- diropts -o mail -g mail |
|
| 147 |
- keepdir /var/run/courier |
|
| 148 |
- keepdir /var/lib/courier/tmp |
|
| 149 |
- keepdir /var/lib/courier/msgs |
|
| 150 |
- make install DESTDIR=${D} || die "install"
|
|
| 151 |
- make install-configure || die "install-configure" |
|
| 152 |
- |
|
| 153 |
- for dir2keep in `(cd ${D} && find ./var/lib/courier -type d)` ; do
|
|
| 154 |
- keepdir $dir2keep || die "failed running keepdir: $dir2keep" |
|
| 155 |
- done |
|
| 156 |
- |
|
| 157 |
- newinitd ${FILESDIR}/courier-init-r1 courier
|
|
| 158 |
- use fam || sed -i -e's|^.*use famd$||g' ${D}/etc/init.d/courier
|
|
| 159 |
- |
|
| 160 |
- cd ${D}/etc/courier
|
|
| 161 |
- insinto /etc/courier |
|
| 162 |
- newins ${FILESDIR}/apache-sqwebmail.inc apache-sqwebmail.inc
|
|
| 163 |
- |
|
| 164 |
- if use pam ; then |
|
| 165 |
- dodir /etc/pam.d |
|
| 166 |
- rm imapd.authpam pop3d.authpam |
|
| 167 |
- for f in *.authpam ; do mv "${f}" "${D}/etc/pam.d/${f%%.authpam}" ; done
|
|
| 168 |
- fi |
|
| 169 |
- |
|
| 170 |
- for f in *.dist ; do cp ${f} ${f%%.dist} ; done
|
|
| 171 |
- [ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc ) |
|
| 172 |
- set_maildir courierd imapd imapd-ssl pop3d pop3d-ssl sqwebmaild *.dist |
|
| 173 |
- |
|
| 174 |
- ( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
|
| 175 |
- > ${D}/etc/courier/sizelimit
|
|
| 176 |
- etc_courier maildroprc "" |
|
| 177 |
- etc_courier esmtproutes "" |
|
| 178 |
- etc_courier backuprelay "" |
|
| 179 |
- etc_courier locallowercase "" |
|
| 180 |
- etc_courier bofh "opt BOFHBADMIME=accept" |
|
| 181 |
- etc_courier bofh "opt BOFHSPFTRUSTME=1" |
|
| 182 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail" |
|
| 183 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none" |
|
| 184 |
- etc_courier bofh "opt BOFHSPFFROM=all" |
|
| 185 |
- etc_courier bofh "opt BOFHSPFMAILFROM=all" |
|
| 186 |
- etc_courier bofh "#opt BOFHSPFHARDERROR=fail" |
|
| 187 |
- etc_courier esmtpd "BOFHBADMIME=accept" |
|
| 188 |
- etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
|
| 189 |
- etc_courier esmtpd-msa "BOFHBADMIME=accept" |
|
| 190 |
- etc_courier_chg esmtpd ESMTPDSTART YES |
|
| 191 |
- etc_courier_chg esmtpd ESMTPAUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 192 |
- etc_courier_chg esmtpd ESMTPAUTH_WEBADMIN "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 193 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 194 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS_WEBADMIN "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 195 |
- etc_courier_chg esmtpd-msa ESMTPDSTART YES |
|
| 196 |
- etc_courier_chg esmtpd-msa AUTH_REQUIRED 1 |
|
| 197 |
- etc_courier_chg esmtpd-ssl ESMTPDSSLSTART YES |
|
| 198 |
- etc_courier_chg esmtpd-ssl AUTH_REQUIRED 1 |
|
| 199 |
- etc_courier_chg imapd IMAPDSTART YES |
|
| 200 |
- 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" |
|
| 201 |
- 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" |
|
| 202 |
- etc_courier_chg imapd-ssl IMAPDSSLSTART YES |
|
| 203 |
- etc_courier_chg pop3d POP3DSTART YES |
|
| 204 |
- etc_courier_chg pop3d POP3AUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 205 |
- etc_courier_chg pop3d POP3AUTH_TLS "LOGIN PLAIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 206 |
- etc_courier_chg pop3d-ssl POP3DSSLSTART YES |
|
| 207 |
- |
|
| 208 |
- # Fix for a sandbox violation on subsequential merges |
|
| 209 |
- # - ticho@gentoo.org, 2005-07-10 |
|
| 210 |
- rm ${D}/usr/sbin/{pop3d,imapd}{,-ssl}
|
|
| 211 |
- dosym /usr/share/courier/pop3d /usr/sbin/courier-pop3d |
|
| 212 |
- dosym /usr/share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl |
|
| 213 |
- dosym /usr/share/courier/imapd /usr/sbin/courier-imapd |
|
| 214 |
- dosym /usr/share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl |
|
| 215 |
- |
|
| 216 |
- cd ${S}
|
|
| 217 |
- cp imap/README README.imap |
|
| 218 |
- use nls && cp unicode/README README.unicode |
|
| 219 |
- dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
|
| 220 |
- dodoc tcpd/README.couriertls |
|
| 221 |
- echo "See /usr/share/courier/htmldoc/index.html for docs in html format" \ |
|
| 222 |
- >> ${D}/usr/share/doc/${P}/README.htmldocs
|
|
| 223 |
- |
|
| 224 |
- insinto /usr/$(get_libdir)/courier/courier |
|
| 225 |
- insopts -m 755 -o mail -g mail |
|
| 226 |
- doins ${S}/courier/webmaild
|
|
| 227 |
- insinto /etc/courier/webadmin |
|
| 228 |
- insopts -m 400 -o mail -g mail |
|
| 229 |
- doins ${FILESDIR}/password.dist
|
|
| 230 |
- |
|
| 231 |
- # avoid name collisions in /usr/sbin, make webadmin match |
|
| 232 |
- cd ${D}/usr/sbin
|
|
| 233 |
- for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv ${f} courier-${f} ; done
|
|
| 234 |
- sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \ |
|
| 235 |
- -e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \ |
|
| 236 |
- ${D}/usr/share/courier/courierwebadmin/admin-40imap.pl \
|
|
| 237 |
- || ewarn "failed to fix webadmin" |
|
| 238 |
- sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \ |
|
| 239 |
- -e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \ |
|
| 240 |
- ${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl \
|
|
| 241 |
- || ewarn "failed to fix webadmin" |
|
| 242 |
- |
|
| 243 |
- if use mailwrapper ; then |
|
| 244 |
- mv ${D}/usr/bin/sendmail ${D}/usr/bin/sendmail.courier
|
|
| 245 |
- mv ${D}/usr/bin/rmail ${D}/usr/bin/rmail.courier
|
|
| 246 |
- mv ${D}/usr/bin/mailq ${D}/usr/bin/mailq.courier
|
|
| 247 |
- |
|
| 248 |
- mv ${D}/usr/share/man/man1/sendmail.1 \
|
|
| 249 |
- ${D}/usr/share/man/man1/sendmail-courier.1
|
|
| 250 |
- mv ${D}/usr/share/man/man1/mailq.1 \
|
|
| 251 |
- ${D}/usr/share/man/man1/mailq-courier.1
|
|
| 252 |
- mv ${D}/usr/share/man/man1/rmail.1 \
|
|
| 253 |
- ${D}/usr/share/man/man1/rmail-courier.1
|
|
| 254 |
- |
|
| 255 |
- insinto /etc/mail |
|
| 256 |
- doins ${FILESDIR}/mailer.conf
|
|
| 257 |
- else |
|
| 258 |
- dosym /usr/bin/sendmail /usr/sbin/sendmail |
|
| 259 |
- fi |
|
| 260 |
-} |
|
| 261 |
- |
|
| 262 |
-src_test() {
|
|
| 263 |
- addpredict / |
|
| 264 |
- vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
|
| 265 |
- if hasq userpriv ${FEATURES} ; then
|
|
| 266 |
- if ! emake -j1 check; then |
|
| 267 |
- hasq test ${FEATURES} && die "Make check failed. See above for details."
|
|
| 268 |
- hasq test ${FEATURES} || eerror "Make check failed. See above for details."
|
|
| 269 |
- fi |
|
| 270 |
- else |
|
| 271 |
- hasq test ${FEATURES} && eerror "Make check needs FEATURES="userpriv" to work."
|
|
| 272 |
- fi |
|
| 273 |
- SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}"
|
|
| 274 |
-} |
|
| 275 |
- |
|
| 276 |
-pkg_postinst() {
|
|
| 277 |
- use fam && elog "fam daemon is needed for courier-imapd" \ |
|
| 278 |
- || ewarn "courier was built without fam support" |
|
| 279 |
- |
|
| 280 |
- # fix for bug #99334 |
|
| 281 |
- elog "Courier's sendmail is not suid by default, therefore non-root users can't send" |
|
| 282 |
- elog "mail using sendmail. If you need this to work, you should set sendmail suid." |
|
| 283 |
- elog "See also: http://www.courier-mta.org/install.html#suid" |
|
| 284 |
-} |
|
| 285 |
- |
|
| 286 |
-pkg_config() {
|
|
| 287 |
- mailhost=`hostname` |
|
| 288 |
- export mailhost |
|
| 289 |
- |
|
| 290 |
- domainname=`domainname` |
|
| 291 |
- if [ "x$domainname" = "x(none)" ] ; then |
|
| 292 |
- domainname=`echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/"`
|
|
| 293 |
- fi |
|
| 294 |
- export domainname |
|
| 295 |
- |
|
| 296 |
- if [ ${ROOT} = "/" ] ; then
|
|
| 297 |
- file=${ROOT}/etc/courier/locals
|
|
| 298 |
- if [ ! -f ${file} ] ; then
|
|
| 299 |
- echo "localhost" > ${file};
|
|
| 300 |
- echo ${domainname} >> ${file};
|
|
| 301 |
- fi |
|
| 302 |
- file=${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}
|
|
| 303 |
- if [ ! -f ${file} ] ; then
|
|
| 304 |
- echo ${domainname} > ${file}
|
|
| 305 |
- /usr/sbin/makeacceptmailfor |
|
| 306 |
- fi |
|
| 307 |
- |
|
| 308 |
- file=${ROOT}/etc/courier/smtpaccess/${domainname}
|
|
| 309 |
- if [ ! -f ${file} ]
|
|
| 310 |
- then |
|
| 311 |
- netstat -nr | grep "^[1-9]" | while read network gateway netmask rest |
|
| 312 |
- do |
|
| 313 |
- i=1 |
|
| 314 |
- net="" |
|
| 315 |
- TIFS=${IFS}
|
|
| 316 |
- IFS="." |
|
| 317 |
- for o in ${netmask}
|
|
| 318 |
- do |
|
| 319 |
- if [ ${o} == "255" ]
|
|
| 320 |
- then |
|
| 321 |
- [ "_${net}" == "_" ] || net="${net}."
|
|
| 322 |
- t=`echo ${network} | cut -d " " -f ${i}`
|
|
| 323 |
- net="${net}${t}"
|
|
| 324 |
- fi |
|
| 325 |
- i=$((${i} + 1))
|
|
| 326 |
- done |
|
| 327 |
- IFS=${TIFS}
|
|
| 328 |
- echo "doing configuration - relay control for the network ${net} !"
|
|
| 329 |
- echo "${net} allow,RELAYCLIENT" >> ${file}
|
|
| 330 |
- done |
|
| 331 |
- /usr/sbin/makesmtpaccess |
|
| 332 |
- fi |
|
| 333 |
- fi |
|
| 334 |
- |
|
| 335 |
- echo "creating cert for esmtpd-ssl:" |
|
| 336 |
- /usr/sbin/mkesmtpdcert |
|
| 337 |
- echo "creating cert for imapd-ssl:" |
|
| 338 |
- /usr/sbin/mkpop3dcert |
|
| 339 |
- echo "creating cert for pop3d-ssl:" |
|
| 340 |
- /usr/sbin/mkimapdcert |
|
| 341 |
-} |
| ... | ... |
@@ -1,339 +0,0 @@ |
| 1 |
-# Copyright 1999-2008 Gentoo Foundation |
|
| 2 |
-# Distributed under the terms of the GNU General Public License v2 |
|
| 3 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.53.2.ebuild,v 1.19 2008/02/03 10:51:33 hollow Exp $ |
|
| 4 |
- |
|
| 5 |
-WANT_AUTOCONF="latest" |
|
| 6 |
-WANT_AUTOMAKE="latest" |
|
| 7 |
- |
|
| 8 |
-inherit eutils flag-o-matic autotools |
|
| 9 |
- |
|
| 10 |
-DESCRIPTION="An MTA designed specifically for maildirs" |
|
| 11 |
-[ -z "${PV/?.??/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 12 |
-[ -z "${PV/?.??.?/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 13 |
-[ -z "${SRC_URI}" ] && SRC_URI="http://www.courier-mta.org/beta/courier/${P%%_pre}.tar.bz2"
|
|
| 14 |
-HOMEPAGE="http://www.courier-mta.org/" |
|
| 15 |
-S="${WORKDIR}/${P%%_pre}"
|
|
| 16 |
- |
|
| 17 |
-SLOT="0" |
|
| 18 |
-LICENSE="GPL-2" |
|
| 19 |
-# not in keywords due to missing dependencies: ~arm ~s390 ~ppc64 |
|
| 20 |
-KEYWORDS="alpha amd64 hppa ia64 ~mips ppc sparc x86" |
|
| 21 |
-IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite mailwrapper fam" |
|
| 22 |
- |
|
| 23 |
-PROVIDE="virtual/mta |
|
| 24 |
- virtual/mda |
|
| 25 |
- virtual/imapd" |
|
| 26 |
- |
|
| 27 |
-DEPEND=" |
|
| 28 |
- >=net-libs/courier-authlib-0.55 |
|
| 29 |
- >=dev-libs/openssl-0.9.6 |
|
| 30 |
- >=sys-libs/gdbm-1.8.0 |
|
| 31 |
- dev-libs/libpcre |
|
| 32 |
- app-misc/mime-types |
|
| 33 |
- fax? ( >=media-libs/netpbm-9.12 virtual/ghostscript >=net-dialup/mgetty-1.1.28 ) |
|
| 34 |
- pam? ( >=sys-libs/pam-0.75 ) |
|
| 35 |
- mysql? ( virtual/mysql ) |
|
| 36 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
|
| 37 |
- postgres? ( >=dev-db/postgresql-7.1.3 ) |
|
| 38 |
- spell? ( virtual/aspell-dict ) |
|
| 39 |
- fam? ( virtual/fam ) |
|
| 40 |
- !mailwrapper? ( !virtual/mta ) |
|
| 41 |
- !virtual/imapd |
|
| 42 |
- !mail-filter/maildrop" |
|
| 43 |
- |
|
| 44 |
-RDEPEND="${DEPEND}
|
|
| 45 |
- dev-lang/perl |
|
| 46 |
- sys-process/procps" |
|
| 47 |
- |
|
| 48 |
-PDEPEND="mailwrapper? ( >=net-mail/mailwrapper-0.2 ) |
|
| 49 |
- pam? ( net-mail/mailbase ) |
|
| 50 |
- crypt? ( >=app-crypt/gnupg-1.0.4 )" |
|
| 51 |
- |
|
| 52 |
-filter-flags '-fomit-frame-pointer' |
|
| 53 |
- |
|
| 54 |
-src_unpack() {
|
|
| 55 |
- use fam || ( |
|
| 56 |
- ewarn "File Alteration Monitor (FAM) is disabled" |
|
| 57 |
- ewarn "courier-imap will fall back to 60 second polls." |
|
| 58 |
- ewarn 'add "fam" to your USE flags to build as usual' |
|
| 59 |
- ebeep 4 |
|
| 60 |
- epause 4 ) |
|
| 61 |
- unpack ${A}
|
|
| 62 |
- cd ${S}
|
|
| 63 |
- use norewrite && epatch ${FILESDIR}/norewrite.patch
|
|
| 64 |
- use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub |
|
| 65 |
- |
|
| 66 |
- # disable link to fam. |
|
| 67 |
- epatch ${FILESDIR}/fam-disable-check.patch
|
|
| 68 |
- cd ${S}/maildir
|
|
| 69 |
- eautoreconf |
|
| 70 |
-} |
|
| 71 |
- |
|
| 72 |
-src_compile() {
|
|
| 73 |
- local myconf |
|
| 74 |
- myconf="`use_with ipv6` \ |
|
| 75 |
- `use_with ldap ldapaliasd` `use_enable ldap maildropldap`" |
|
| 76 |
- |
|
| 77 |
- use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf"
|
|
| 78 |
- use spell || myconf="${myconf} --without-ispell"
|
|
| 79 |
- |
|
| 80 |
- myconf="${myconf} --enable-mimetypes=/etc/mime.types"
|
|
| 81 |
- |
|
| 82 |
- myconf="${myconf} $(use_with fam)"
|
|
| 83 |
- |
|
| 84 |
- einfo "Configuring courier: `echo ${myconf} | xargs echo`"
|
|
| 85 |
- |
|
| 86 |
- econf \ |
|
| 87 |
- --prefix=/usr \ |
|
| 88 |
- --disable-root-check \ |
|
| 89 |
- --mandir=/usr/share/man \ |
|
| 90 |
- --sysconfdir=/etc/courier \ |
|
| 91 |
- --libexecdir=/usr/$(get_libdir)/courier \ |
|
| 92 |
- --datadir=/usr/share/courier \ |
|
| 93 |
- --sharedstatedir=/var/lib/courier/com \ |
|
| 94 |
- --localstatedir=/var/lib/courier \ |
|
| 95 |
- --with-piddir=/var/run/courier \ |
|
| 96 |
- --with-authdaemonvar=/var/lib/courier/authdaemon \ |
|
| 97 |
- --with-mailuser=mail \ |
|
| 98 |
- --with-mailgroup=mail \ |
|
| 99 |
- --with-paranoid-smtpext \ |
|
| 100 |
- --with-db=gdbm \ |
|
| 101 |
- --disable-autorenamesent \ |
|
| 102 |
- --cache-file=${S}/configuring.cache \
|
|
| 103 |
- --host=${CHOST} ${myconf} debug=true || die "./configure"
|
|
| 104 |
- sed -e'/^install-perms-local:/a\ sed -e\"s|^|'${D}'|g\" -i permissions.dat' -i Makefile
|
|
| 105 |
- emake || die "Compile problem" |
|
| 106 |
-} |
|
| 107 |
- |
|
| 108 |
-etc_courier() {
|
|
| 109 |
- # Import existing /etc/courier/file if it exists. |
|
| 110 |
- # Add option only if it was not already set or even commented out |
|
| 111 |
- file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`"
|
|
| 112 |
- [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \
|
|
| 113 |
- cp "/etc/courier/${file}" "${D}/etc/courier/${file}"
|
|
| 114 |
- grep -q "${word}" "${D}/etc/courier/${file}" || \
|
|
| 115 |
- echo "${2}" >> "${D}/etc/courier/${file}"
|
|
| 116 |
-} |
|
| 117 |
- |
|
| 118 |
-etc_courier_chg() {
|
|
| 119 |
- file="${1}" ; key="${2}" ; value="${3}" ; section="${4}"
|
|
| 120 |
- [ -z "${section}" ] && section="${2}"
|
|
| 121 |
- grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}"
|
|
| 122 |
- sed -i -e"/\#\#NAME: ${section}/,+20 s|${key}=.*|${key}=\"${value}\"|g" ${file}
|
|
| 123 |
-} |
|
| 124 |
- |
|
| 125 |
-set_maildir() {
|
|
| 126 |
- local f ; local files=$* |
|
| 127 |
- origmaildir='Maildir' |
|
| 128 |
- newmaildir='.maildir' |
|
| 129 |
- for f in ${files} ; do
|
|
| 130 |
- grep -q "${origmaildir}" "${f}" && \
|
|
| 131 |
- elog "Changing ${origmaildir} in ${f} to ${newmaildir}"
|
|
| 132 |
- sed -i -e"/^[^\#]/ s/${origmaildir}/${newmaildir}/g" ${f}
|
|
| 133 |
- done |
|
| 134 |
-} |
|
| 135 |
- |
|
| 136 |
-src_install() {
|
|
| 137 |
- local f |
|
| 138 |
- einfo "Setting up maildirs in the account skeleton ..." |
|
| 139 |
- diropts -m 755 -o root -g root |
|
| 140 |
- dodir /etc/skel |
|
| 141 |
- ${S}/maildir/maildirmake ${D}/etc/skel/.maildir
|
|
| 142 |
- keepdir /etc/skel/.maildir |
|
| 143 |
- |
|
| 144 |
- diropts -o mail -g mail |
|
| 145 |
- keepdir /var/run/courier |
|
| 146 |
- keepdir /var/lib/courier/tmp |
|
| 147 |
- keepdir /var/lib/courier/msgs |
|
| 148 |
- make install DESTDIR=${D} || die "install"
|
|
| 149 |
- make install-configure || die "install-configure" |
|
| 150 |
- |
|
| 151 |
- for dir2keep in `(cd ${D} && find ./var/lib/courier -type d)` ; do
|
|
| 152 |
- keepdir $dir2keep || die "failed running keepdir: $dir2keep" |
|
| 153 |
- done |
|
| 154 |
- |
|
| 155 |
- newinitd ${FILESDIR}/courier-init-r1 courier
|
|
| 156 |
- use fam || sed -i -e's|^.*use famd$||g' ${D}/etc/init.d/courier
|
|
| 157 |
- |
|
| 158 |
- cd ${D}/etc/courier
|
|
| 159 |
- insinto /etc/courier |
|
| 160 |
- newins ${FILESDIR}/apache-sqwebmail.inc apache-sqwebmail.inc
|
|
| 161 |
- |
|
| 162 |
- if use pam ; then |
|
| 163 |
- dodir /etc/pam.d |
|
| 164 |
- rm imapd.authpam pop3d.authpam |
|
| 165 |
- for f in *.authpam ; do mv "${f}" "${D}/etc/pam.d/${f%%.authpam}" ; done
|
|
| 166 |
- fi |
|
| 167 |
- |
|
| 168 |
- for f in *.dist ; do cp ${f} ${f%%.dist} ; done
|
|
| 169 |
- [ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc ) |
|
| 170 |
- set_maildir courierd imapd imapd-ssl pop3d pop3d-ssl sqwebmaild *.dist |
|
| 171 |
- |
|
| 172 |
- ( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
|
| 173 |
- > ${D}/etc/courier/sizelimit
|
|
| 174 |
- etc_courier maildroprc "" |
|
| 175 |
- etc_courier esmtproutes "" |
|
| 176 |
- etc_courier backuprelay "" |
|
| 177 |
- etc_courier locallowercase "" |
|
| 178 |
- etc_courier bofh "opt BOFHBADMIME=accept" |
|
| 179 |
- etc_courier bofh "opt BOFHSPFTRUSTME=1" |
|
| 180 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail" |
|
| 181 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none" |
|
| 182 |
- etc_courier bofh "opt BOFHSPFFROM=all" |
|
| 183 |
- etc_courier bofh "opt BOFHSPFMAILFROM=all" |
|
| 184 |
- etc_courier bofh "#opt BOFHSPFHARDERROR=fail" |
|
| 185 |
- etc_courier esmtpd "BOFHBADMIME=accept" |
|
| 186 |
- etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
|
| 187 |
- etc_courier esmtpd-msa "BOFHBADMIME=accept" |
|
| 188 |
- etc_courier_chg esmtpd ESMTPDSTART YES |
|
| 189 |
- etc_courier_chg esmtpd ESMTPAUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 190 |
- etc_courier_chg esmtpd ESMTPAUTH_WEBADMIN "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 191 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 192 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS_WEBADMIN "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 193 |
- etc_courier_chg esmtpd-msa ESMTPDSTART YES |
|
| 194 |
- etc_courier_chg esmtpd-msa AUTH_REQUIRED 1 |
|
| 195 |
- etc_courier_chg esmtpd-ssl ESMTPDSSLSTART YES |
|
| 196 |
- etc_courier_chg esmtpd-ssl AUTH_REQUIRED 1 |
|
| 197 |
- etc_courier_chg imapd IMAPDSTART YES |
|
| 198 |
- 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" |
|
| 199 |
- 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" |
|
| 200 |
- etc_courier_chg imapd-ssl IMAPDSSLSTART YES |
|
| 201 |
- etc_courier_chg pop3d POP3DSTART YES |
|
| 202 |
- etc_courier_chg pop3d POP3AUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 203 |
- etc_courier_chg pop3d POP3AUTH_TLS "LOGIN PLAIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 204 |
- etc_courier_chg pop3d-ssl POP3DSSLSTART YES |
|
| 205 |
- |
|
| 206 |
- # Fix for a sandbox violation on subsequential merges |
|
| 207 |
- # - ticho@gentoo.org, 2005-07-10 |
|
| 208 |
- rm ${D}/usr/sbin/{pop3d,imapd}{,-ssl}
|
|
| 209 |
- dosym /usr/share/courier/pop3d /usr/sbin/courier-pop3d |
|
| 210 |
- dosym /usr/share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl |
|
| 211 |
- dosym /usr/share/courier/imapd /usr/sbin/courier-imapd |
|
| 212 |
- dosym /usr/share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl |
|
| 213 |
- |
|
| 214 |
- cd ${S}
|
|
| 215 |
- cp imap/README README.imap |
|
| 216 |
- use nls && cp unicode/README README.unicode |
|
| 217 |
- dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
|
| 218 |
- dodoc tcpd/README.couriertls |
|
| 219 |
- echo "See /usr/share/courier/htmldoc/index.html for docs in html format" \ |
|
| 220 |
- >> ${D}/usr/share/doc/${P}/README.htmldocs
|
|
| 221 |
- |
|
| 222 |
- insinto /usr/$(get_libdir)/courier/courier |
|
| 223 |
- insopts -m 755 -o mail -g mail |
|
| 224 |
- doins ${S}/courier/webmaild
|
|
| 225 |
- insinto /etc/courier/webadmin |
|
| 226 |
- insopts -m 400 -o mail -g mail |
|
| 227 |
- doins ${FILESDIR}/password.dist
|
|
| 228 |
- |
|
| 229 |
- # avoid name collisions in /usr/sbin, make webadmin match |
|
| 230 |
- cd ${D}/usr/sbin
|
|
| 231 |
- for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv ${f} courier-${f} ; done
|
|
| 232 |
- sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \ |
|
| 233 |
- -e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \ |
|
| 234 |
- ${D}/usr/share/courier/courierwebadmin/admin-40imap.pl \
|
|
| 235 |
- || ewarn "failed to fix webadmin" |
|
| 236 |
- sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \ |
|
| 237 |
- -e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \ |
|
| 238 |
- ${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl \
|
|
| 239 |
- || ewarn "failed to fix webadmin" |
|
| 240 |
- |
|
| 241 |
- if use mailwrapper ; then |
|
| 242 |
- mv ${D}/usr/bin/sendmail ${D}/usr/bin/sendmail.courier
|
|
| 243 |
- mv ${D}/usr/bin/rmail ${D}/usr/bin/rmail.courier
|
|
| 244 |
- mv ${D}/usr/bin/mailq ${D}/usr/bin/mailq.courier
|
|
| 245 |
- |
|
| 246 |
- mv ${D}/usr/share/man/man1/sendmail.1 \
|
|
| 247 |
- ${D}/usr/share/man/man1/sendmail-courier.1
|
|
| 248 |
- mv ${D}/usr/share/man/man1/mailq.1 \
|
|
| 249 |
- ${D}/usr/share/man/man1/mailq-courier.1
|
|
| 250 |
- mv ${D}/usr/share/man/man1/rmail.1 \
|
|
| 251 |
- ${D}/usr/share/man/man1/rmail-courier.1
|
|
| 252 |
- |
|
| 253 |
- insinto /etc/mail |
|
| 254 |
- doins ${FILESDIR}/mailer.conf
|
|
| 255 |
- else |
|
| 256 |
- dosym /usr/bin/sendmail /usr/sbin/sendmail |
|
| 257 |
- fi |
|
| 258 |
-} |
|
| 259 |
- |
|
| 260 |
-src_test() {
|
|
| 261 |
- addpredict / |
|
| 262 |
- vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
|
| 263 |
- if hasq userpriv ${FEATURES} ; then
|
|
| 264 |
- if ! emake -j1 check; then |
|
| 265 |
- hasq test ${FEATURES} && die "Make check failed. See above for details."
|
|
| 266 |
- hasq test ${FEATURES} || eerror "Make check failed. See above for details."
|
|
| 267 |
- fi |
|
| 268 |
- else |
|
| 269 |
- hasq test ${FEATURES} && eerror "Make check needs FEATURES="userpriv" to work."
|
|
| 270 |
- fi |
|
| 271 |
- SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}"
|
|
| 272 |
-} |
|
| 273 |
- |
|
| 274 |
-pkg_postinst() {
|
|
| 275 |
- use fam && elog "fam daemon is needed for courier-imapd" \ |
|
| 276 |
- || ewarn "courier was built without fam support" |
|
| 277 |
- |
|
| 278 |
- # fix for bug #99334 |
|
| 279 |
- elog "Courier's sendmail is not suid by default, therefore non-root users can't send" |
|
| 280 |
- elog "mail using sendmail. If you need this to work, you should set sendmail suid." |
|
| 281 |
- elog "See also: http://www.courier-mta.org/install.html#suid" |
|
| 282 |
-} |
|
| 283 |
- |
|
| 284 |
-pkg_config() {
|
|
| 285 |
- mailhost=`hostname` |
|
| 286 |
- export mailhost |
|
| 287 |
- |
|
| 288 |
- domainname=`domainname` |
|
| 289 |
- if [ "x$domainname" = "x(none)" ] ; then |
|
| 290 |
- domainname=`echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/"`
|
|
| 291 |
- fi |
|
| 292 |
- export domainname |
|
| 293 |
- |
|
| 294 |
- if [ ${ROOT} = "/" ] ; then
|
|
| 295 |
- file=${ROOT}/etc/courier/locals
|
|
| 296 |
- if [ ! -f ${file} ] ; then
|
|
| 297 |
- echo "localhost" > ${file};
|
|
| 298 |
- echo ${domainname} >> ${file};
|
|
| 299 |
- fi |
|
| 300 |
- file=${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}
|
|
| 301 |
- if [ ! -f ${file} ] ; then
|
|
| 302 |
- echo ${domainname} > ${file}
|
|
| 303 |
- /usr/sbin/makeacceptmailfor |
|
| 304 |
- fi |
|
| 305 |
- |
|
| 306 |
- file=${ROOT}/etc/courier/smtpaccess/${domainname}
|
|
| 307 |
- if [ ! -f ${file} ]
|
|
| 308 |
- then |
|
| 309 |
- netstat -nr | grep "^[1-9]" | while read network gateway netmask rest |
|
| 310 |
- do |
|
| 311 |
- i=1 |
|
| 312 |
- net="" |
|
| 313 |
- TIFS=${IFS}
|
|
| 314 |
- IFS="." |
|
| 315 |
- for o in ${netmask}
|
|
| 316 |
- do |
|
| 317 |
- if [ ${o} == "255" ]
|
|
| 318 |
- then |
|
| 319 |
- [ "_${net}" == "_" ] || net="${net}."
|
|
| 320 |
- t=`echo ${network} | cut -d " " -f ${i}`
|
|
| 321 |
- net="${net}${t}"
|
|
| 322 |
- fi |
|
| 323 |
- i=$((${i} + 1))
|
|
| 324 |
- done |
|
| 325 |
- IFS=${TIFS}
|
|
| 326 |
- echo "doing configuration - relay control for the network ${net} !"
|
|
| 327 |
- echo "${net} allow,RELAYCLIENT" >> ${file}
|
|
| 328 |
- done |
|
| 329 |
- /usr/sbin/makesmtpaccess |
|
| 330 |
- fi |
|
| 331 |
- fi |
|
| 332 |
- |
|
| 333 |
- echo "creating cert for esmtpd-ssl:" |
|
| 334 |
- /usr/sbin/mkesmtpdcert |
|
| 335 |
- echo "creating cert for imapd-ssl:" |
|
| 336 |
- /usr/sbin/mkpop3dcert |
|
| 337 |
- echo "creating cert for pop3d-ssl:" |
|
| 338 |
- /usr/sbin/mkimapdcert |
|
| 339 |
-} |
| ... | ... |
@@ -1,341 +0,0 @@ |
| 1 |
-# Copyright 1999-2008 Gentoo Foundation |
|
| 2 |
-# Distributed under the terms of the GNU General Public License v2 |
|
| 3 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.55.1-r1.ebuild,v 1.4 2008/02/03 10:51:33 hollow Exp $ |
|
| 4 |
- |
|
| 5 |
-WANT_AUTOCONF="latest" |
|
| 6 |
-WANT_AUTOMAKE="latest" |
|
| 7 |
- |
|
| 8 |
-inherit eutils flag-o-matic autotools |
|
| 9 |
- |
|
| 10 |
-DESCRIPTION="An MTA designed specifically for maildirs" |
|
| 11 |
-[ -z "${PV/?.??/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 12 |
-[ -z "${PV/?.??.?/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 13 |
-[ -z "${SRC_URI}" ] && SRC_URI="http://www.courier-mta.org/beta/courier/${P%%_pre}.tar.bz2"
|
|
| 14 |
-HOMEPAGE="http://www.courier-mta.org/" |
|
| 15 |
-S="${WORKDIR}/${P%%_pre}"
|
|
| 16 |
- |
|
| 17 |
-SLOT="0" |
|
| 18 |
-LICENSE="GPL-2" |
|
| 19 |
-# not in keywords due to missing dependencies: ~arm ~s390 ~ppc64 |
|
| 20 |
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" |
|
| 21 |
-IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite mailwrapper fam" |
|
| 22 |
- |
|
| 23 |
-PROVIDE="virtual/mta |
|
| 24 |
- virtual/mda |
|
| 25 |
- virtual/imapd" |
|
| 26 |
- |
|
| 27 |
-DEPEND=" |
|
| 28 |
- >=net-libs/courier-authlib-0.59 |
|
| 29 |
- >=dev-libs/openssl-0.9.6 |
|
| 30 |
- >=sys-libs/gdbm-1.8.0 |
|
| 31 |
- dev-libs/libpcre |
|
| 32 |
- app-misc/mime-types |
|
| 33 |
- fax? ( >=media-libs/netpbm-9.12 virtual/ghostscript >=net-dialup/mgetty-1.1.28 ) |
|
| 34 |
- pam? ( virtual/pam ) |
|
| 35 |
- mysql? ( virtual/mysql ) |
|
| 36 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
|
| 37 |
- postgres? ( >=dev-db/postgresql-7.1.3 ) |
|
| 38 |
- spell? ( virtual/aspell-dict ) |
|
| 39 |
- fam? ( virtual/fam ) |
|
| 40 |
- !mailwrapper? ( !virtual/mta ) |
|
| 41 |
- !virtual/imapd |
|
| 42 |
- !mail-filter/maildrop" |
|
| 43 |
- |
|
| 44 |
-RDEPEND="${DEPEND}
|
|
| 45 |
- dev-lang/perl |
|
| 46 |
- sys-process/procps" |
|
| 47 |
- |
|
| 48 |
-PDEPEND="mailwrapper? ( >=net-mail/mailwrapper-0.2 ) |
|
| 49 |
- pam? ( net-mail/mailbase ) |
|
| 50 |
- crypt? ( >=app-crypt/gnupg-1.0.4 )" |
|
| 51 |
- |
|
| 52 |
-filter-flags '-fomit-frame-pointer' |
|
| 53 |
- |
|
| 54 |
-src_unpack() {
|
|
| 55 |
- use fam || ( |
|
| 56 |
- ewarn "File Alteration Monitor (FAM) is disabled" |
|
| 57 |
- ewarn "courier-imap will fall back to 60 second polls." |
|
| 58 |
- ewarn 'add "fam" to your USE flags to build as usual' |
|
| 59 |
- ebeep 4 |
|
| 60 |
- epause 4 ) |
|
| 61 |
- unpack ${A}
|
|
| 62 |
- cd ${S}
|
|
| 63 |
- use norewrite && epatch ${FILESDIR}/norewrite.patch
|
|
| 64 |
- use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub |
|
| 65 |
- |
|
| 66 |
- epatch "${FILESDIR}/pam-include.patch"
|
|
| 67 |
- |
|
| 68 |
- # disable link to fam. |
|
| 69 |
- epatch ${FILESDIR}/fam-disable-check.patch
|
|
| 70 |
- cd ${S}/maildir
|
|
| 71 |
- eautoreconf |
|
| 72 |
-} |
|
| 73 |
- |
|
| 74 |
-src_compile() {
|
|
| 75 |
- local myconf |
|
| 76 |
- myconf="`use_with ipv6` \ |
|
| 77 |
- `use_with ldap ldapaliasd` `use_enable ldap maildropldap`" |
|
| 78 |
- |
|
| 79 |
- use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf"
|
|
| 80 |
- use spell || myconf="${myconf} --without-ispell"
|
|
| 81 |
- |
|
| 82 |
- myconf="${myconf} --enable-mimetypes=/etc/mime.types"
|
|
| 83 |
- |
|
| 84 |
- myconf="${myconf} $(use_with fam)"
|
|
| 85 |
- |
|
| 86 |
- einfo "Configuring courier: `echo ${myconf} | xargs echo`"
|
|
| 87 |
- |
|
| 88 |
- econf \ |
|
| 89 |
- --prefix=/usr \ |
|
| 90 |
- --disable-root-check \ |
|
| 91 |
- --mandir=/usr/share/man \ |
|
| 92 |
- --sysconfdir=/etc/courier \ |
|
| 93 |
- --libexecdir=/usr/$(get_libdir)/courier \ |
|
| 94 |
- --datadir=/usr/share/courier \ |
|
| 95 |
- --sharedstatedir=/var/lib/courier/com \ |
|
| 96 |
- --localstatedir=/var/lib/courier \ |
|
| 97 |
- --with-piddir=/var/run/courier \ |
|
| 98 |
- --with-authdaemonvar=/var/lib/courier/authdaemon \ |
|
| 99 |
- --with-mailuser=mail \ |
|
| 100 |
- --with-mailgroup=mail \ |
|
| 101 |
- --with-paranoid-smtpext \ |
|
| 102 |
- --with-db=gdbm \ |
|
| 103 |
- --disable-autorenamesent \ |
|
| 104 |
- --cache-file=${S}/configuring.cache \
|
|
| 105 |
- --host=${CHOST} ${myconf} debug=true || die "./configure"
|
|
| 106 |
- sed -e'/^install-perms-local:/a\ sed -e\"s|^|'${D}'|g\" -i permissions.dat' -i Makefile
|
|
| 107 |
- emake || die "Compile problem" |
|
| 108 |
-} |
|
| 109 |
- |
|
| 110 |
-etc_courier() {
|
|
| 111 |
- # Import existing /etc/courier/file if it exists. |
|
| 112 |
- # Add option only if it was not already set or even commented out |
|
| 113 |
- file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`"
|
|
| 114 |
- [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \
|
|
| 115 |
- cp "/etc/courier/${file}" "${D}/etc/courier/${file}"
|
|
| 116 |
- grep -q "${word}" "${D}/etc/courier/${file}" || \
|
|
| 117 |
- echo "${2}" >> "${D}/etc/courier/${file}"
|
|
| 118 |
-} |
|
| 119 |
- |
|
| 120 |
-etc_courier_chg() {
|
|
| 121 |
- file="${1}" ; key="${2}" ; value="${3}" ; section="${4}"
|
|
| 122 |
- [ -z "${section}" ] && section="${2}"
|
|
| 123 |
- grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}"
|
|
| 124 |
- sed -i -e"/\#\#NAME: ${section}/,+20 s|${key}=.*|${key}=\"${value}\"|g" ${file}
|
|
| 125 |
-} |
|
| 126 |
- |
|
| 127 |
-set_maildir() {
|
|
| 128 |
- local f ; local files=$* |
|
| 129 |
- origmaildir='Maildir' |
|
| 130 |
- newmaildir='.maildir' |
|
| 131 |
- for f in ${files} ; do
|
|
| 132 |
- grep -q "${origmaildir}" "${f}" && \
|
|
| 133 |
- elog "Changing ${origmaildir} in ${f} to ${newmaildir}"
|
|
| 134 |
- sed -i -e"/^[^\#]/ s/${origmaildir}/${newmaildir}/g" ${f}
|
|
| 135 |
- done |
|
| 136 |
-} |
|
| 137 |
- |
|
| 138 |
-src_install() {
|
|
| 139 |
- local f |
|
| 140 |
- einfo "Setting up maildirs in the account skeleton ..." |
|
| 141 |
- diropts -m 755 -o root -g root |
|
| 142 |
- dodir /etc/skel |
|
| 143 |
- ${S}/maildir/maildirmake ${D}/etc/skel/.maildir
|
|
| 144 |
- keepdir /etc/skel/.maildir |
|
| 145 |
- |
|
| 146 |
- diropts -o mail -g mail |
|
| 147 |
- keepdir /var/run/courier |
|
| 148 |
- keepdir /var/lib/courier/tmp |
|
| 149 |
- keepdir /var/lib/courier/msgs |
|
| 150 |
- make install DESTDIR=${D} || die "install"
|
|
| 151 |
- make install-configure || die "install-configure" |
|
| 152 |
- |
|
| 153 |
- for dir2keep in `(cd ${D} && find ./var/lib/courier -type d)` ; do
|
|
| 154 |
- keepdir $dir2keep || die "failed running keepdir: $dir2keep" |
|
| 155 |
- done |
|
| 156 |
- |
|
| 157 |
- newinitd ${FILESDIR}/courier-init-r1 courier
|
|
| 158 |
- use fam || sed -i -e's|^.*use famd$||g' ${D}/etc/init.d/courier
|
|
| 159 |
- |
|
| 160 |
- cd ${D}/etc/courier
|
|
| 161 |
- insinto /etc/courier |
|
| 162 |
- newins ${FILESDIR}/apache-sqwebmail.inc apache-sqwebmail.inc
|
|
| 163 |
- |
|
| 164 |
- if use pam ; then |
|
| 165 |
- dodir /etc/pam.d |
|
| 166 |
- rm imapd.authpam pop3d.authpam |
|
| 167 |
- for f in *.authpam ; do mv "${f}" "${D}/etc/pam.d/${f%%.authpam}" ; done
|
|
| 168 |
- fi |
|
| 169 |
- |
|
| 170 |
- for f in *.dist ; do cp ${f} ${f%%.dist} ; done
|
|
| 171 |
- [ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc ) |
|
| 172 |
- set_maildir courierd imapd imapd-ssl pop3d pop3d-ssl sqwebmaild *.dist |
|
| 173 |
- |
|
| 174 |
- ( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
|
| 175 |
- > ${D}/etc/courier/sizelimit
|
|
| 176 |
- etc_courier maildroprc "" |
|
| 177 |
- etc_courier esmtproutes "" |
|
| 178 |
- etc_courier backuprelay "" |
|
| 179 |
- etc_courier locallowercase "" |
|
| 180 |
- etc_courier bofh "opt BOFHBADMIME=accept" |
|
| 181 |
- etc_courier bofh "opt BOFHSPFTRUSTME=1" |
|
| 182 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail" |
|
| 183 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none" |
|
| 184 |
- etc_courier bofh "opt BOFHSPFFROM=all" |
|
| 185 |
- etc_courier bofh "opt BOFHSPFMAILFROM=all" |
|
| 186 |
- etc_courier bofh "#opt BOFHSPFHARDERROR=fail" |
|
| 187 |
- etc_courier esmtpd "BOFHBADMIME=accept" |
|
| 188 |
- etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
|
| 189 |
- etc_courier esmtpd-msa "BOFHBADMIME=accept" |
|
| 190 |
- etc_courier_chg esmtpd ESMTPDSTART YES |
|
| 191 |
- etc_courier_chg esmtpd ESMTPAUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 192 |
- etc_courier_chg esmtpd ESMTPAUTH_WEBADMIN "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 193 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 194 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS_WEBADMIN "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 195 |
- etc_courier_chg esmtpd-msa ESMTPDSTART YES |
|
| 196 |
- etc_courier_chg esmtpd-msa AUTH_REQUIRED 1 |
|
| 197 |
- etc_courier_chg esmtpd-ssl ESMTPDSSLSTART YES |
|
| 198 |
- etc_courier_chg esmtpd-ssl AUTH_REQUIRED 1 |
|
| 199 |
- etc_courier_chg imapd IMAPDSTART YES |
|
| 200 |
- 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" |
|
| 201 |
- 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" |
|
| 202 |
- etc_courier_chg imapd-ssl IMAPDSSLSTART YES |
|
| 203 |
- etc_courier_chg pop3d POP3DSTART YES |
|
| 204 |
- etc_courier_chg pop3d POP3AUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 205 |
- etc_courier_chg pop3d POP3AUTH_TLS "LOGIN PLAIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 206 |
- etc_courier_chg pop3d-ssl POP3DSSLSTART YES |
|
| 207 |
- |
|
| 208 |
- # Fix for a sandbox violation on subsequential merges |
|
| 209 |
- # - ticho@gentoo.org, 2005-07-10 |
|
| 210 |
- rm ${D}/usr/sbin/{pop3d,imapd}{,-ssl}
|
|
| 211 |
- dosym /usr/share/courier/pop3d /usr/sbin/courier-pop3d |
|
| 212 |
- dosym /usr/share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl |
|
| 213 |
- dosym /usr/share/courier/imapd /usr/sbin/courier-imapd |
|
| 214 |
- dosym /usr/share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl |
|
| 215 |
- |
|
| 216 |
- cd ${S}
|
|
| 217 |
- cp imap/README README.imap |
|
| 218 |
- use nls && cp unicode/README README.unicode |
|
| 219 |
- dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
|
| 220 |
- dodoc tcpd/README.couriertls |
|
| 221 |
- echo "See /usr/share/courier/htmldoc/index.html for docs in html format" \ |
|
| 222 |
- >> ${D}/usr/share/doc/${P}/README.htmldocs
|
|
| 223 |
- |
|
| 224 |
- insinto /usr/$(get_libdir)/courier/courier |
|
| 225 |
- insopts -m 755 -o mail -g mail |
|
| 226 |
- doins ${S}/courier/webmaild
|
|
| 227 |
- insinto /etc/courier/webadmin |
|
| 228 |
- insopts -m 400 -o mail -g mail |
|
| 229 |
- doins ${FILESDIR}/password.dist
|
|
| 230 |
- |
|
| 231 |
- # avoid name collisions in /usr/sbin, make webadmin match |
|
| 232 |
- cd ${D}/usr/sbin
|
|
| 233 |
- for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv ${f} courier-${f} ; done
|
|
| 234 |
- sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \ |
|
| 235 |
- -e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \ |
|
| 236 |
- ${D}/usr/share/courier/courierwebadmin/admin-40imap.pl \
|
|
| 237 |
- || ewarn "failed to fix webadmin" |
|
| 238 |
- sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \ |
|
| 239 |
- -e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \ |
|
| 240 |
- ${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl \
|
|
| 241 |
- || ewarn "failed to fix webadmin" |
|
| 242 |
- |
|
| 243 |
- if use mailwrapper ; then |
|
| 244 |
- mv ${D}/usr/bin/sendmail ${D}/usr/bin/sendmail.courier
|
|
| 245 |
- mv ${D}/usr/bin/rmail ${D}/usr/bin/rmail.courier
|
|
| 246 |
- mv ${D}/usr/bin/mailq ${D}/usr/bin/mailq.courier
|
|
| 247 |
- |
|
| 248 |
- mv ${D}/usr/share/man/man1/sendmail.1 \
|
|
| 249 |
- ${D}/usr/share/man/man1/sendmail-courier.1
|
|
| 250 |
- mv ${D}/usr/share/man/man1/mailq.1 \
|
|
| 251 |
- ${D}/usr/share/man/man1/mailq-courier.1
|
|
| 252 |
- mv ${D}/usr/share/man/man1/rmail.1 \
|
|
| 253 |
- ${D}/usr/share/man/man1/rmail-courier.1
|
|
| 254 |
- |
|
| 255 |
- insinto /etc/mail |
|
| 256 |
- doins ${FILESDIR}/mailer.conf
|
|
| 257 |
- else |
|
| 258 |
- dosym /usr/bin/sendmail /usr/sbin/sendmail |
|
| 259 |
- fi |
|
| 260 |
-} |
|
| 261 |
- |
|
| 262 |
-src_test() {
|
|
| 263 |
- addpredict / |
|
| 264 |
- vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
|
| 265 |
- if hasq userpriv ${FEATURES} ; then
|
|
| 266 |
- if ! emake -j1 check; then |
|
| 267 |
- hasq test ${FEATURES} && die "Make check failed. See above for details."
|
|
| 268 |
- hasq test ${FEATURES} || eerror "Make check failed. See above for details."
|
|
| 269 |
- fi |
|
| 270 |
- else |
|
| 271 |
- hasq test ${FEATURES} && eerror "Make check needs FEATURES="userpriv" to work."
|
|
| 272 |
- fi |
|
| 273 |
- SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}"
|
|
| 274 |
-} |
|
| 275 |
- |
|
| 276 |
-pkg_postinst() {
|
|
| 277 |
- use fam && elog "fam daemon is needed for courier-imapd" \ |
|
| 278 |
- || ewarn "courier was built without fam support" |
|
| 279 |
- |
|
| 280 |
- # fix for bug #99334 |
|
| 281 |
- elog "Courier's sendmail is not suid by default, therefore non-root users can't send" |
|
| 282 |
- elog "mail using sendmail. If you need this to work, you should set sendmail suid." |
|
| 283 |
- elog "See also: http://www.courier-mta.org/install.html#suid" |
|
| 284 |
-} |
|
| 285 |
- |
|
| 286 |
-pkg_config() {
|
|
| 287 |
- mailhost=`hostname` |
|
| 288 |
- export mailhost |
|
| 289 |
- |
|
| 290 |
- domainname=`domainname` |
|
| 291 |
- if [ "x$domainname" = "x(none)" ] ; then |
|
| 292 |
- domainname=`echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/"`
|
|
| 293 |
- fi |
|
| 294 |
- export domainname |
|
| 295 |
- |
|
| 296 |
- if [ ${ROOT} = "/" ] ; then
|
|
| 297 |
- file=${ROOT}/etc/courier/locals
|
|
| 298 |
- if [ ! -f ${file} ] ; then
|
|
| 299 |
- echo "localhost" > ${file};
|
|
| 300 |
- echo ${domainname} >> ${file};
|
|
| 301 |
- fi |
|
| 302 |
- file=${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}
|
|
| 303 |
- if [ ! -f ${file} ] ; then
|
|
| 304 |
- echo ${domainname} > ${file}
|
|
| 305 |
- /usr/sbin/makeacceptmailfor |
|
| 306 |
- fi |
|
| 307 |
- |
|
| 308 |
- file=${ROOT}/etc/courier/smtpaccess/${domainname}
|
|
| 309 |
- if [ ! -f ${file} ]
|
|
| 310 |
- then |
|
| 311 |
- netstat -nr | grep "^[1-9]" | while read network gateway netmask rest |
|
| 312 |
- do |
|
| 313 |
- i=1 |
|
| 314 |
- net="" |
|
| 315 |
- TIFS=${IFS}
|
|
| 316 |
- IFS="." |
|
| 317 |
- for o in ${netmask}
|
|
| 318 |
- do |
|
| 319 |
- if [ ${o} == "255" ]
|
|
| 320 |
- then |
|
| 321 |
- [ "_${net}" == "_" ] || net="${net}."
|
|
| 322 |
- t=`echo ${network} | cut -d " " -f ${i}`
|
|
| 323 |
- net="${net}${t}"
|
|
| 324 |
- fi |
|
| 325 |
- i=$((${i} + 1))
|
|
| 326 |
- done |
|
| 327 |
- IFS=${TIFS}
|
|
| 328 |
- echo "doing configuration - relay control for the network ${net} !"
|
|
| 329 |
- echo "${net} allow,RELAYCLIENT" >> ${file}
|
|
| 330 |
- done |
|
| 331 |
- /usr/sbin/makesmtpaccess |
|
| 332 |
- fi |
|
| 333 |
- fi |
|
| 334 |
- |
|
| 335 |
- echo "creating cert for esmtpd-ssl:" |
|
| 336 |
- /usr/sbin/mkesmtpdcert |
|
| 337 |
- echo "creating cert for imapd-ssl:" |
|
| 338 |
- /usr/sbin/mkpop3dcert |
|
| 339 |
- echo "creating cert for pop3d-ssl:" |
|
| 340 |
- /usr/sbin/mkimapdcert |
|
| 341 |
-} |
| ... | ... |
@@ -1,339 +0,0 @@ |
| 1 |
-# Copyright 1999-2008 Gentoo Foundation |
|
| 2 |
-# Distributed under the terms of the GNU General Public License v2 |
|
| 3 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.55.1.ebuild,v 1.4 2008/02/03 10:51:33 hollow Exp $ |
|
| 4 |
- |
|
| 5 |
-WANT_AUTOCONF="latest" |
|
| 6 |
-WANT_AUTOMAKE="latest" |
|
| 7 |
- |
|
| 8 |
-inherit eutils flag-o-matic autotools |
|
| 9 |
- |
|
| 10 |
-DESCRIPTION="An MTA designed specifically for maildirs" |
|
| 11 |
-[ -z "${PV/?.??/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 12 |
-[ -z "${PV/?.??.?/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
|
|
| 13 |
-[ -z "${SRC_URI}" ] && SRC_URI="http://www.courier-mta.org/beta/courier/${P%%_pre}.tar.bz2"
|
|
| 14 |
-HOMEPAGE="http://www.courier-mta.org/" |
|
| 15 |
-S="${WORKDIR}/${P%%_pre}"
|
|
| 16 |
- |
|
| 17 |
-SLOT="0" |
|
| 18 |
-LICENSE="GPL-2" |
|
| 19 |
-# not in keywords due to missing dependencies: ~arm ~s390 ~ppc64 |
|
| 20 |
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" |
|
| 21 |
-IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite mailwrapper fam" |
|
| 22 |
- |
|
| 23 |
-PROVIDE="virtual/mta |
|
| 24 |
- virtual/mda |
|
| 25 |
- virtual/imapd" |
|
| 26 |
- |
|
| 27 |
-DEPEND=" |
|
| 28 |
- >=net-libs/courier-authlib-0.59 |
|
| 29 |
- >=dev-libs/openssl-0.9.6 |
|
| 30 |
- >=sys-libs/gdbm-1.8.0 |
|
| 31 |
- dev-libs/libpcre |
|
| 32 |
- app-misc/mime-types |
|
| 33 |
- fax? ( >=media-libs/netpbm-9.12 virtual/ghostscript >=net-dialup/mgetty-1.1.28 ) |
|
| 34 |
- pam? ( >=sys-libs/pam-0.75 ) |
|
| 35 |
- mysql? ( virtual/mysql ) |
|
| 36 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
|
| 37 |
- postgres? ( >=dev-db/postgresql-7.1.3 ) |
|
| 38 |
- spell? ( virtual/aspell-dict ) |
|
| 39 |
- fam? ( virtual/fam ) |
|
| 40 |
- !mailwrapper? ( !virtual/mta ) |
|
| 41 |
- !virtual/imapd |
|
| 42 |
- !mail-filter/maildrop" |
|
| 43 |
- |
|
| 44 |
-RDEPEND="${DEPEND}
|
|
| 45 |
- dev-lang/perl |
|
| 46 |
- sys-process/procps" |
|
| 47 |
- |
|
| 48 |
-PDEPEND="mailwrapper? ( >=net-mail/mailwrapper-0.2 ) |
|
| 49 |
- pam? ( net-mail/mailbase ) |
|
| 50 |
- crypt? ( >=app-crypt/gnupg-1.0.4 )" |
|
| 51 |
- |
|
| 52 |
-filter-flags '-fomit-frame-pointer' |
|
| 53 |
- |
|
| 54 |
-src_unpack() {
|
|
| 55 |
- use fam || ( |
|
| 56 |
- ewarn "File Alteration Monitor (FAM) is disabled" |
|
| 57 |
- ewarn "courier-imap will fall back to 60 second polls." |
|
| 58 |
- ewarn 'add "fam" to your USE flags to build as usual' |
|
| 59 |
- ebeep 4 |
|
| 60 |
- epause 4 ) |
|
| 61 |
- unpack ${A}
|
|
| 62 |
- cd ${S}
|
|
| 63 |
- use norewrite && epatch ${FILESDIR}/norewrite.patch
|
|
| 64 |
- use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub |
|
| 65 |
- |
|
| 66 |
- # disable link to fam. |
|
| 67 |
- epatch ${FILESDIR}/fam-disable-check.patch
|
|
| 68 |
- cd ${S}/maildir
|
|
| 69 |
- eautoreconf |
|
| 70 |
-} |
|
| 71 |
- |
|
| 72 |
-src_compile() {
|
|
| 73 |
- local myconf |
|
| 74 |
- myconf="`use_with ipv6` \ |
|
| 75 |
- `use_with ldap ldapaliasd` `use_enable ldap maildropldap`" |
|
| 76 |
- |
|
| 77 |
- use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf"
|
|
| 78 |
- use spell || myconf="${myconf} --without-ispell"
|
|
| 79 |
- |
|
| 80 |
- myconf="${myconf} --enable-mimetypes=/etc/mime.types"
|
|
| 81 |
- |
|
| 82 |
- myconf="${myconf} $(use_with fam)"
|
|
| 83 |
- |
|
| 84 |
- einfo "Configuring courier: `echo ${myconf} | xargs echo`"
|
|
| 85 |
- |
|
| 86 |
- econf \ |
|
| 87 |
- --prefix=/usr \ |
|
| 88 |
- --disable-root-check \ |
|
| 89 |
- --mandir=/usr/share/man \ |
|
| 90 |
- --sysconfdir=/etc/courier \ |
|
| 91 |
- --libexecdir=/usr/$(get_libdir)/courier \ |
|
| 92 |
- --datadir=/usr/share/courier \ |
|
| 93 |
- --sharedstatedir=/var/lib/courier/com \ |
|
| 94 |
- --localstatedir=/var/lib/courier \ |
|
| 95 |
- --with-piddir=/var/run/courier \ |
|
| 96 |
- --with-authdaemonvar=/var/lib/courier/authdaemon \ |
|
| 97 |
- --with-mailuser=mail \ |
|
| 98 |
- --with-mailgroup=mail \ |
|
| 99 |
- --with-paranoid-smtpext \ |
|
| 100 |
- --with-db=gdbm \ |
|
| 101 |
- --disable-autorenamesent \ |
|
| 102 |
- --cache-file=${S}/configuring.cache \
|
|
| 103 |
- --host=${CHOST} ${myconf} debug=true || die "./configure"
|
|
| 104 |
- sed -e'/^install-perms-local:/a\ sed -e\"s|^|'${D}'|g\" -i permissions.dat' -i Makefile
|
|
| 105 |
- emake || die "Compile problem" |
|
| 106 |
-} |
|
| 107 |
- |
|
| 108 |
-etc_courier() {
|
|
| 109 |
- # Import existing /etc/courier/file if it exists. |
|
| 110 |
- # Add option only if it was not already set or even commented out |
|
| 111 |
- file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`"
|
|
| 112 |
- [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \
|
|
| 113 |
- cp "/etc/courier/${file}" "${D}/etc/courier/${file}"
|
|
| 114 |
- grep -q "${word}" "${D}/etc/courier/${file}" || \
|
|
| 115 |
- echo "${2}" >> "${D}/etc/courier/${file}"
|
|
| 116 |
-} |
|
| 117 |
- |
|
| 118 |
-etc_courier_chg() {
|
|
| 119 |
- file="${1}" ; key="${2}" ; value="${3}" ; section="${4}"
|
|
| 120 |
- [ -z "${section}" ] && section="${2}"
|
|
| 121 |
- grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}"
|
|
| 122 |
- sed -i -e"/\#\#NAME: ${section}/,+20 s|${key}=.*|${key}=\"${value}\"|g" ${file}
|
|
| 123 |
-} |
|
| 124 |
- |
|
| 125 |
-set_maildir() {
|
|
| 126 |
- local f ; local files=$* |
|
| 127 |
- origmaildir='Maildir' |
|
| 128 |
- newmaildir='.maildir' |
|
| 129 |
- for f in ${files} ; do
|
|
| 130 |
- grep -q "${origmaildir}" "${f}" && \
|
|
| 131 |
- elog "Changing ${origmaildir} in ${f} to ${newmaildir}"
|
|
| 132 |
- sed -i -e"/^[^\#]/ s/${origmaildir}/${newmaildir}/g" ${f}
|
|
| 133 |
- done |
|
| 134 |
-} |
|
| 135 |
- |
|
| 136 |
-src_install() {
|
|
| 137 |
- local f |
|
| 138 |
- einfo "Setting up maildirs in the account skeleton ..." |
|
| 139 |
- diropts -m 755 -o root -g root |
|
| 140 |
- dodir /etc/skel |
|
| 141 |
- ${S}/maildir/maildirmake ${D}/etc/skel/.maildir
|
|
| 142 |
- keepdir /etc/skel/.maildir |
|
| 143 |
- |
|
| 144 |
- diropts -o mail -g mail |
|
| 145 |
- keepdir /var/run/courier |
|
| 146 |
- keepdir /var/lib/courier/tmp |
|
| 147 |
- keepdir /var/lib/courier/msgs |
|
| 148 |
- make install DESTDIR=${D} || die "install"
|
|
| 149 |
- make install-configure || die "install-configure" |
|
| 150 |
- |
|
| 151 |
- for dir2keep in `(cd ${D} && find ./var/lib/courier -type d)` ; do
|
|
| 152 |
- keepdir $dir2keep || die "failed running keepdir: $dir2keep" |
|
| 153 |
- done |
|
| 154 |
- |
|
| 155 |
- newinitd ${FILESDIR}/courier-init-r1 courier
|
|
| 156 |
- use fam || sed -i -e's|^.*use famd$||g' ${D}/etc/init.d/courier
|
|
| 157 |
- |
|
| 158 |
- cd ${D}/etc/courier
|
|
| 159 |
- insinto /etc/courier |
|
| 160 |
- newins ${FILESDIR}/apache-sqwebmail.inc apache-sqwebmail.inc
|
|
| 161 |
- |
|
| 162 |
- if use pam ; then |
|
| 163 |
- dodir /etc/pam.d |
|
| 164 |
- rm imapd.authpam pop3d.authpam |
|
| 165 |
- for f in *.authpam ; do mv "${f}" "${D}/etc/pam.d/${f%%.authpam}" ; done
|
|
| 166 |
- fi |
|
| 167 |
- |
|
| 168 |
- for f in *.dist ; do cp ${f} ${f%%.dist} ; done
|
|
| 169 |
- [ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc ) |
|
| 170 |
- set_maildir courierd imapd imapd-ssl pop3d pop3d-ssl sqwebmaild *.dist |
|
| 171 |
- |
|
| 172 |
- ( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
|
| 173 |
- > ${D}/etc/courier/sizelimit
|
|
| 174 |
- etc_courier maildroprc "" |
|
| 175 |
- etc_courier esmtproutes "" |
|
| 176 |
- etc_courier backuprelay "" |
|
| 177 |
- etc_courier locallowercase "" |
|
| 178 |
- etc_courier bofh "opt BOFHBADMIME=accept" |
|
| 179 |
- etc_courier bofh "opt BOFHSPFTRUSTME=1" |
|
| 180 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail" |
|
| 181 |
- etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none" |
|
| 182 |
- etc_courier bofh "opt BOFHSPFFROM=all" |
|
| 183 |
- etc_courier bofh "opt BOFHSPFMAILFROM=all" |
|
| 184 |
- etc_courier bofh "#opt BOFHSPFHARDERROR=fail" |
|
| 185 |
- etc_courier esmtpd "BOFHBADMIME=accept" |
|
| 186 |
- etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
|
| 187 |
- etc_courier esmtpd-msa "BOFHBADMIME=accept" |
|
| 188 |
- etc_courier_chg esmtpd ESMTPDSTART YES |
|
| 189 |
- etc_courier_chg esmtpd ESMTPAUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 190 |
- etc_courier_chg esmtpd ESMTPAUTH_WEBADMIN "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 191 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 192 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS_WEBADMIN "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 193 |
- etc_courier_chg esmtpd-msa ESMTPDSTART YES |
|
| 194 |
- etc_courier_chg esmtpd-msa AUTH_REQUIRED 1 |
|
| 195 |
- etc_courier_chg esmtpd-ssl ESMTPDSSLSTART YES |
|
| 196 |
- etc_courier_chg esmtpd-ssl AUTH_REQUIRED 1 |
|
| 197 |
- etc_courier_chg imapd IMAPDSTART YES |
|
| 198 |
- 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" |
|
| 199 |
- 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" |
|
| 200 |
- etc_courier_chg imapd-ssl IMAPDSSLSTART YES |
|
| 201 |
- etc_courier_chg pop3d POP3DSTART YES |
|
| 202 |
- etc_courier_chg pop3d POP3AUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 203 |
- etc_courier_chg pop3d POP3AUTH_TLS "LOGIN PLAIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 204 |
- etc_courier_chg pop3d-ssl POP3DSSLSTART YES |
|
| 205 |
- |
|
| 206 |
- # Fix for a sandbox violation on subsequential merges |
|
| 207 |
- # - ticho@gentoo.org, 2005-07-10 |
|
| 208 |
- rm ${D}/usr/sbin/{pop3d,imapd}{,-ssl}
|
|
| 209 |
- dosym /usr/share/courier/pop3d /usr/sbin/courier-pop3d |
|
| 210 |
- dosym /usr/share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl |
|
| 211 |
- dosym /usr/share/courier/imapd /usr/sbin/courier-imapd |
|
| 212 |
- dosym /usr/share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl |
|
| 213 |
- |
|
| 214 |
- cd ${S}
|
|
| 215 |
- cp imap/README README.imap |
|
| 216 |
- use nls && cp unicode/README README.unicode |
|
| 217 |
- dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
|
| 218 |
- dodoc tcpd/README.couriertls |
|
| 219 |
- echo "See /usr/share/courier/htmldoc/index.html for docs in html format" \ |
|
| 220 |
- >> ${D}/usr/share/doc/${P}/README.htmldocs
|
|
| 221 |
- |
|
| 222 |
- insinto /usr/$(get_libdir)/courier/courier |
|
| 223 |
- insopts -m 755 -o mail -g mail |
|
| 224 |
- doins ${S}/courier/webmaild
|
|
| 225 |
- insinto /etc/courier/webadmin |
|
| 226 |
- insopts -m 400 -o mail -g mail |
|
| 227 |
- doins ${FILESDIR}/password.dist
|
|
| 228 |
- |
|
| 229 |
- # avoid name collisions in /usr/sbin, make webadmin match |
|
| 230 |
- cd ${D}/usr/sbin
|
|
| 231 |
- for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv ${f} courier-${f} ; done
|
|
| 232 |
- sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \ |
|
| 233 |
- -e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \ |
|
| 234 |
- ${D}/usr/share/courier/courierwebadmin/admin-40imap.pl \
|
|
| 235 |
- || ewarn "failed to fix webadmin" |
|
| 236 |
- sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \ |
|
| 237 |
- -e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \ |
|
| 238 |
- ${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl \
|
|
| 239 |
- || ewarn "failed to fix webadmin" |
|
| 240 |
- |
|
| 241 |
- if use mailwrapper ; then |
|
| 242 |
- mv ${D}/usr/bin/sendmail ${D}/usr/bin/sendmail.courier
|
|
| 243 |
- mv ${D}/usr/bin/rmail ${D}/usr/bin/rmail.courier
|
|
| 244 |
- mv ${D}/usr/bin/mailq ${D}/usr/bin/mailq.courier
|
|
| 245 |
- |
|
| 246 |
- mv ${D}/usr/share/man/man1/sendmail.1 \
|
|
| 247 |
- ${D}/usr/share/man/man1/sendmail-courier.1
|
|
| 248 |
- mv ${D}/usr/share/man/man1/mailq.1 \
|
|
| 249 |
- ${D}/usr/share/man/man1/mailq-courier.1
|
|
| 250 |
- mv ${D}/usr/share/man/man1/rmail.1 \
|
|
| 251 |
- ${D}/usr/share/man/man1/rmail-courier.1
|
|
| 252 |
- |
|
| 253 |
- insinto /etc/mail |
|
| 254 |
- doins ${FILESDIR}/mailer.conf
|
|
| 255 |
- else |
|
| 256 |
- dosym /usr/bin/sendmail /usr/sbin/sendmail |
|
| 257 |
- fi |
|
| 258 |
-} |
|
| 259 |
- |
|
| 260 |
-src_test() {
|
|
| 261 |
- addpredict / |
|
| 262 |
- vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
|
| 263 |
- if hasq userpriv ${FEATURES} ; then
|
|
| 264 |
- if ! emake -j1 check; then |
|
| 265 |
- hasq test ${FEATURES} && die "Make check failed. See above for details."
|
|
| 266 |
- hasq test ${FEATURES} || eerror "Make check failed. See above for details."
|
|
| 267 |
- fi |
|
| 268 |
- else |
|
| 269 |
- hasq test ${FEATURES} && eerror "Make check needs FEATURES="userpriv" to work."
|
|
| 270 |
- fi |
|
| 271 |
- SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}"
|
|
| 272 |
-} |
|
| 273 |
- |
|
| 274 |
-pkg_postinst() {
|
|
| 275 |
- use fam && elog "fam daemon is needed for courier-imapd" \ |
|
| 276 |
- || ewarn "courier was built without fam support" |
|
| 277 |
- |
|
| 278 |
- # fix for bug #99334 |
|
| 279 |
- elog "Courier's sendmail is not suid by default, therefore non-root users can't send" |
|
| 280 |
- elog "mail using sendmail. If you need this to work, you should set sendmail suid." |
|
| 281 |
- elog "See also: http://www.courier-mta.org/install.html#suid" |
|
| 282 |
-} |
|
| 283 |
- |
|
| 284 |
-pkg_config() {
|
|
| 285 |
- mailhost=`hostname` |
|
| 286 |
- export mailhost |
|
| 287 |
- |
|
| 288 |
- domainname=`domainname` |
|
| 289 |
- if [ "x$domainname" = "x(none)" ] ; then |
|
| 290 |
- domainname=`echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/"`
|
|
| 291 |
- fi |
|
| 292 |
- export domainname |
|
| 293 |
- |
|
| 294 |
- if [ ${ROOT} = "/" ] ; then
|
|
| 295 |
- file=${ROOT}/etc/courier/locals
|
|
| 296 |
- if [ ! -f ${file} ] ; then
|
|
| 297 |
- echo "localhost" > ${file};
|
|
| 298 |
- echo ${domainname} >> ${file};
|
|
| 299 |
- fi |
|
| 300 |
- file=${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}
|
|
| 301 |
- if [ ! -f ${file} ] ; then
|
|
| 302 |
- echo ${domainname} > ${file}
|
|
| 303 |
- /usr/sbin/makeacceptmailfor |
|
| 304 |
- fi |
|
| 305 |
- |
|
| 306 |
- file=${ROOT}/etc/courier/smtpaccess/${domainname}
|
|
| 307 |
- if [ ! -f ${file} ]
|
|
| 308 |
- then |
|
| 309 |
- netstat -nr | grep "^[1-9]" | while read network gateway netmask rest |
|
| 310 |
- do |
|
| 311 |
- i=1 |
|
| 312 |
- net="" |
|
| 313 |
- TIFS=${IFS}
|
|
| 314 |
- IFS="." |
|
| 315 |
- for o in ${netmask}
|
|
| 316 |
- do |
|
| 317 |
- if [ ${o} == "255" ]
|
|
| 318 |
- then |
|
| 319 |
- [ "_${net}" == "_" ] || net="${net}."
|
|
| 320 |
- t=`echo ${network} | cut -d " " -f ${i}`
|
|
| 321 |
- net="${net}${t}"
|
|
| 322 |
- fi |
|
| 323 |
- i=$((${i} + 1))
|
|
| 324 |
- done |
|
| 325 |
- IFS=${TIFS}
|
|
| 326 |
- echo "doing configuration - relay control for the network ${net} !"
|
|
| 327 |
- echo "${net} allow,RELAYCLIENT" >> ${file}
|
|
| 328 |
- done |
|
| 329 |
- /usr/sbin/makesmtpaccess |
|
| 330 |
- fi |
|
| 331 |
- fi |
|
| 332 |
- |
|
| 333 |
- echo "creating cert for esmtpd-ssl:" |
|
| 334 |
- /usr/sbin/mkesmtpdcert |
|
| 335 |
- echo "creating cert for imapd-ssl:" |
|
| 336 |
- /usr/sbin/mkpop3dcert |
|
| 337 |
- echo "creating cert for pop3d-ssl:" |
|
| 338 |
- /usr/sbin/mkimapdcert |
|
| 339 |
-} |
| ... | ... |
@@ -50,6 +50,7 @@ PDEPEND="mailwrapper? ( >=net-mail/mailwrapper-0.2 ) |
| 50 | 50 |
crypt? ( >=app-crypt/gnupg-1.0.4 )" |
| 51 | 51 |
|
| 52 | 52 |
filter-flags '-fomit-frame-pointer' |
| 53 |
+filter-ldflags '-Wl,--as-needed' |
|
| 53 | 54 |
|
| 54 | 55 |
src_unpack() {
|
| 55 | 56 |
use fam || ( |
| ... | ... |
@@ -63,12 +64,9 @@ src_unpack() {
|
| 63 | 64 |
use norewrite && epatch ${FILESDIR}/norewrite.patch
|
| 64 | 65 |
use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub |
| 65 | 66 |
|
| 66 |
- epatch "${FILESDIR}/pam-include.patch"
|
|
| 67 |
+ epatch "${FILESDIR}/remove-sysconftool.patch"
|
|
| 67 | 68 |
|
| 68 |
- # disable link to fam. |
|
| 69 |
- epatch ${FILESDIR}/fam-disable-check.patch
|
|
| 70 |
- cd ${S}/maildir
|
|
| 71 |
- eautoreconf |
|
| 69 |
+ _elibtoolize --copy --force || die |
|
| 72 | 70 |
} |
| 73 | 71 |
|
| 74 | 72 |
src_compile() {
|
| ... | ... |
@@ -124,25 +122,9 @@ etc_courier_chg() {
|
| 124 | 122 |
sed -i -e"/\#\#NAME: ${section}/,+20 s|${key}=.*|${key}=\"${value}\"|g" ${file}
|
| 125 | 123 |
} |
| 126 | 124 |
|
| 127 |
-set_maildir() {
|
|
| 128 |
- local f ; local files=$* |
|
| 129 |
- origmaildir='Maildir' |
|
| 130 |
- newmaildir='.maildir' |
|
| 131 |
- for f in ${files} ; do
|
|
| 132 |
- grep -q "${origmaildir}" "${f}" && \
|
|
| 133 |
- elog "Changing ${origmaildir} in ${f} to ${newmaildir}"
|
|
| 134 |
- sed -i -e"/^[^\#]/ s/${origmaildir}/${newmaildir}/g" ${f}
|
|
| 135 |
- done |
|
| 136 |
-} |
|
| 137 | 125 |
|
| 138 | 126 |
src_install() {
|
| 139 | 127 |
local f |
| 140 |
- einfo "Setting up maildirs in the account skeleton ..." |
|
| 141 |
- diropts -m 755 -o root -g root |
|
| 142 |
- dodir /etc/skel |
|
| 143 |
- ${S}/maildir/maildirmake ${D}/etc/skel/.maildir
|
|
| 144 |
- keepdir /etc/skel/.maildir |
|
| 145 |
- |
|
| 146 | 128 |
diropts -o mail -g mail |
| 147 | 129 |
keepdir /var/run/courier |
| 148 | 130 |
keepdir /var/lib/courier/tmp |
| ... | ... |
@@ -168,8 +150,11 @@ src_install() {
|
| 168 | 150 |
fi |
| 169 | 151 |
|
| 170 | 152 |
for f in *.dist ; do cp ${f} ${f%%.dist} ; done
|
| 153 |
+ if use ldap ; then |
|
| 171 | 154 |
[ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc ) |
| 172 |
- set_maildir courierd imapd imapd-ssl pop3d pop3d-ssl sqwebmaild *.dist |
|
| 155 |
+ else |
|
| 156 |
+ rm -f ldapaliasrc |
|
| 157 |
+ fi |
|
| 173 | 158 |
|
| 174 | 159 |
( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
| 175 | 160 |
> ${D}/etc/courier/sizelimit
|
| ... | ... |
@@ -187,23 +172,17 @@ src_install() {
|
| 187 | 172 |
etc_courier esmtpd "BOFHBADMIME=accept" |
| 188 | 173 |
etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
| 189 | 174 |
etc_courier esmtpd-msa "BOFHBADMIME=accept" |
| 190 |
- etc_courier_chg esmtpd ESMTPDSTART YES |
|
| 191 |
- etc_courier_chg esmtpd ESMTPAUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 192 |
- etc_courier_chg esmtpd ESMTPAUTH_WEBADMIN "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 193 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 194 |
- etc_courier_chg esmtpd ESMTPAUTH_TLS_WEBADMIN "PLAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" ESMTPAUTHINFOTLS |
|
| 195 |
- etc_courier_chg esmtpd-msa ESMTPDSTART YES |
|
| 196 |
- etc_courier_chg esmtpd-msa AUTH_REQUIRED 1 |
|
| 197 |
- etc_courier_chg esmtpd-ssl ESMTPDSSLSTART YES |
|
| 198 |
- etc_courier_chg esmtpd-ssl AUTH_REQUIRED 1 |
|
| 199 |
- etc_courier_chg imapd IMAPDSTART YES |
|
| 175 |
+ |
|
| 176 |
+ # Fix SSL (default SSL3 is incompatible with current openssl-clients) |
|
| 177 |
+ # - bernd@bwurst.org, 2008-03-07 |
|
| 178 |
+ etc_courier_chg esmtpd TLS_PROTOCOL SSL23 |
|
| 179 |
+ etc_courier_chg esmtpd-ssl TLS_PROTOCOL SSL23 |
|
| 180 |
+ etc_courier_chg imapd-ssl TLS_PROTOCOL SSL23 |
|
| 181 |
+ etc_courier_chg pop3d-ssl TLS_PROTOCOL SSL23 |
|
| 182 |
+ etc_courier_chg courierd TLS_PROTOCOL SSL23 |
|
| 183 |
+ |
|
| 200 | 184 |
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" |
| 201 | 185 |
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" |
| 202 |
- etc_courier_chg imapd-ssl IMAPDSSLSTART YES |
|
| 203 |
- etc_courier_chg pop3d POP3DSTART YES |
|
| 204 |
- etc_courier_chg pop3d POP3AUTH "LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 205 |
- etc_courier_chg pop3d POP3AUTH_TLS "LOGIN PLAIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256" |
|
| 206 |
- etc_courier_chg pop3d-ssl POP3DSSLSTART YES |
|
| 207 | 186 |
|
| 208 | 187 |
# Fix for a sandbox violation on subsequential merges |
| 209 | 188 |
# - ticho@gentoo.org, 2005-07-10 |
| ... | ... |
@@ -218,8 +197,7 @@ src_install() {
|
| 218 | 197 |
use nls && cp unicode/README README.unicode |
| 219 | 198 |
dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
| 220 | 199 |
dodoc tcpd/README.couriertls |
| 221 |
- echo "See /usr/share/courier/htmldoc/index.html for docs in html format" \ |
|
| 222 |
- >> ${D}/usr/share/doc/${P}/README.htmldocs
|
|
| 200 |
+ mv ${D}/usr/share/courier/htmldoc ${D}/usr/share/doc/${P}/html
|
|
| 223 | 201 |
|
| 224 | 202 |
insinto /usr/$(get_libdir)/courier/courier |
| 225 | 203 |
insopts -m 755 -o mail -g mail |
| ... | ... |
@@ -240,6 +218,9 @@ src_install() {
|
| 240 | 218 |
${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl \
|
| 241 | 219 |
|| ewarn "failed to fix webadmin" |
| 242 | 220 |
|
| 221 |
+ # users should be able to send mail. Could be restricted with suictl. |
|
| 222 |
+ chmod u+s ${D}/usr/bin/sendmail
|
|
| 223 |
+ |
|
| 243 | 224 |
if use mailwrapper ; then |
| 244 | 225 |
mv ${D}/usr/bin/sendmail ${D}/usr/bin/sendmail.courier
|
| 245 | 226 |
mv ${D}/usr/bin/rmail ${D}/usr/bin/rmail.courier
|
| ... | ... |
@@ -276,11 +257,6 @@ src_test() {
|
| 276 | 257 |
pkg_postinst() {
|
| 277 | 258 |
use fam && elog "fam daemon is needed for courier-imapd" \ |
| 278 | 259 |
|| ewarn "courier was built without fam support" |
| 279 |
- |
|
| 280 |
- # fix for bug #99334 |
|
| 281 |
- elog "Courier's sendmail is not suid by default, therefore non-root users can't send" |
|
| 282 |
- elog "mail using sendmail. If you need this to work, you should set sendmail suid." |
|
| 283 |
- elog "See also: http://www.courier-mta.org/install.html#suid" |
|
| 284 | 260 |
} |
| 285 | 261 |
|
| 286 | 262 |
pkg_config() {
|
| ... | ... |
@@ -1 +0,0 @@ |
| 1 |
-opt BOFHBADMIME=accept |
| ... | ... |
@@ -1,184 +0,0 @@ |
| 1 |
-#!/sbin/runscript |
|
| 2 |
-# Portions Copyright 2003 Gentoo Linux |
|
| 3 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/files/courier-init,v 1.6 2005/05/10 10:54:03 swegener Exp $ |
|
| 4 |
-# |
|
| 5 |
-# script originally from Courier distfile original name = courier.sysvinit |
|
| 6 |
-# adapted for Gentoo by Brian Jackson |
|
| 7 |
-# |
|
| 8 |
-# TODO |
|
| 9 |
-# should we update all the .dat/.pem files when the source/config files are |
|
| 10 |
-# newer than the .dat/.pem files? |
|
| 11 |
- |
|
| 12 |
-prefix="/usr" |
|
| 13 |
-exec_prefix="/usr/bin" |
|
| 14 |
-sysconfdir="/etc/courier" |
|
| 15 |
-sbindir="/usr/sbin" |
|
| 16 |
-libexecdir="/usr/lib/courier" |
|
| 17 |
-datadir="/usr/share/courier" |
|
| 18 |
- |
|
| 19 |
-depend() {
|
|
| 20 |
- need net |
|
| 21 |
- [ -d /etc/courier/authlib ] && need courier-authlib |
|
| 22 |
- grep -q "^IMAPDSTART=.*[Yy].*" /etc/courier/imapd && need famd |
|
| 23 |
-} |
|
| 24 |
- |
|
| 25 |
-checkconfig() {
|
|
| 26 |
- |
|
| 27 |
- [ -f ${sysconfdir}/pop3d-ssl ] && . ${sysconfdir}/pop3d-ssl
|
|
| 28 |
- |
|
| 29 |
- # If we do not have a certificate, make one up. |
|
| 30 |
- [ ! -f "${datadir}/pop3d.pem" ] && \
|
|
| 31 |
- ebegin " generating-POP3-SSL-certificate..." && "${sbindir}/mkpop3dcert"
|
|
| 32 |
- |
|
| 33 |
- [ -f ${sysconfdir}/imapd-ssl ] && . ${sysconfdir}/imapd-ssl
|
|
| 34 |
- |
|
| 35 |
- # If we do not have a certificate, make one up. |
|
| 36 |
- [ ! -f ${datadir}/imapd.pem ] && \
|
|
| 37 |
- ebegin " generating-IMAP-SSL-certificate..." && "${sbindir}/mkimapdcert"
|
|
| 38 |
- |
|
| 39 |
- [ -f ${sysconfdir}/esmtpd-ssl ] && . ${sysconfdir}/esmtpd-ssl
|
|
| 40 |
- |
|
| 41 |
- # If we do not have a certificate, make one up. |
|
| 42 |
- [ ! -f ${datadir}/esmtpd.pem ] && \
|
|
| 43 |
- ebegin " generating-ESMTP-SSL-certificate..." && "${sbindir}/mkesmtpdcert"
|
|
| 44 |
- |
|
| 45 |
- # First time after install create aliases.dat and smtpaccess.dat |
|
| 46 |
- |
|
| 47 |
- [ -f ${sysconfdir}/aliases.dat ] || ${sbindir}/makealiases
|
|
| 48 |
- |
|
| 49 |
- [ -f ${sysconfdir}/${ACCESSFILE}.dat ] || ${sbindir}/makesmtpaccess
|
|
| 50 |
- |
|
| 51 |
- [ -f ${sysconfdir}/${ACCESSFILE}.dat ] || ${sbindir}/makesmtpaccess-msa
|
|
| 52 |
-} |
|
| 53 |
- |
|
| 54 |
-start() {
|
|
| 55 |
- # Start daemons. |
|
| 56 |
- ebegin "Starting Courier mail server:" |
|
| 57 |
- |
|
| 58 |
- checkconfig || return 1 |
|
| 59 |
- |
|
| 60 |
- ebegin " Starting courierfilterd" |
|
| 61 |
- ${sbindir}/courierfilter start
|
|
| 62 |
- |
|
| 63 |
- [ ! -d /etc/courier/authlib ] && [ -x ${libexecdir}/authlib/authdaemond ] && \
|
|
| 64 |
- ${libexecdir}/authlib/authdaemond start && ebegin " Starting authdaemond"
|
|
| 65 |
- |
|
| 66 |
- [ -x ${libexecdir}/courier/webmaild ] && \
|
|
| 67 |
- ${libexecdir}/courier/webmaild start && ebegin " Starting webmaild"
|
|
| 68 |
- [ ! -x ${libexecdir}/courier/webmaild ] && [ -x ${libexecdir}/courier/sqwebmaild ] && \
|
|
| 69 |
- ${libexecdir}/courier/sqwebmaild start && ebegin " Starting sqwebmaild"
|
|
| 70 |
- |
|
| 71 |
- [ -x ${sbindir}/courierldapaliasd ] && \
|
|
| 72 |
- ${sbindir}/courierldapaliasd start && ebegin " Starting courierldapaliasd"
|
|
| 73 |
- |
|
| 74 |
- ebegin " Starting courierd" |
|
| 75 |
- ${sbindir}/courier start
|
|
| 76 |
- |
|
| 77 |
- # start esmtpd if so written |
|
| 78 |
- [ -f ${sysconfdir}/esmtpd ] && source ${sysconfdir}/esmtpd
|
|
| 79 |
- case x$ESMTPDSTART in |
|
| 80 |
- x[yY]*) |
|
| 81 |
- ebegin " Starting esmtpd" |
|
| 82 |
- ${sbindir}/esmtpd start
|
|
| 83 |
- ;; |
|
| 84 |
- esac |
|
| 85 |
- |
|
| 86 |
- # start esmtpd-msa if so written |
|
| 87 |
- [ -f ${sysconfdir}/esmtpd-msa ] && source ${sysconfdir}/esmtpd-msa
|
|
| 88 |
- case x$ESMTPDSTART in |
|
| 89 |
- x[yY]*) |
|
| 90 |
- ebegin " Starting esmtpd-msa" |
|
| 91 |
- ${sbindir}/esmtpd-msa start
|
|
| 92 |
- ;; |
|
| 93 |
- esac |
|
| 94 |
- |
|
| 95 |
- # start esmtpd-ssl if so written |
|
| 96 |
- [ -f ${sysconfdir}/esmtpd-ssl ] && source ${sysconfdir}/esmtpd-ssl
|
|
| 97 |
- case x$ESMTPDSSLSTART in |
|
| 98 |
- x[yY]*) |
|
| 99 |
- ebegin " Starting esmtpd-ssl" |
|
| 100 |
- ${sbindir}/esmtpd-ssl start
|
|
| 101 |
- ;; |
|
| 102 |
- esac |
|
| 103 |
- |
|
| 104 |
- # start pop3d if so written |
|
| 105 |
- [ -f ${sysconfdir}/pop3d ] && source ${sysconfdir}/pop3d
|
|
| 106 |
- case x$POP3DSTART in |
|
| 107 |
- x[yY]*) |
|
| 108 |
- ebegin " courier-pop3d" |
|
| 109 |
- ${sbindir}/courier-pop3d start
|
|
| 110 |
- ;; |
|
| 111 |
- esac |
|
| 112 |
- |
|
| 113 |
- # start pop3d-ssl if so written |
|
| 114 |
- [ -f ${sysconfdir}/pop3d-ssl ] && source ${sysconfdir}/pop3d-ssl
|
|
| 115 |
- case x$POP3DSSLSTART in |
|
| 116 |
- x[yY]*) |
|
| 117 |
- ebegin " courier-pop3d-ssl" |
|
| 118 |
- ${sbindir}/courier-pop3d-ssl start
|
|
| 119 |
- ;; |
|
| 120 |
- esac |
|
| 121 |
- |
|
| 122 |
- [ -f ${sysconfdir}/imapd ] && source ${sysconfdir}/imapd
|
|
| 123 |
- case x$IMAPDSTART in |
|
| 124 |
- x[yY]*) |
|
| 125 |
- ebegin " courier-imapd" |
|
| 126 |
- ${sbindir}/courier-imapd start
|
|
| 127 |
- ;; |
|
| 128 |
- esac |
|
| 129 |
- |
|
| 130 |
- [ -f ${sysconfdir}/imapd-ssl ] && source ${sysconfdir}/imapd-ssl
|
|
| 131 |
- case x$IMAPDSSLSTART in |
|
| 132 |
- x[yY]*) |
|
| 133 |
- ebegin " courier-imapd-ssl" |
|
| 134 |
- ${sbindir}/courier-imapd-ssl start
|
|
| 135 |
- ;; |
|
| 136 |
- esac |
|
| 137 |
- |
|
| 138 |
- eend $? |
|
| 139 |
-} |
|
| 140 |
- |
|
| 141 |
-stop() {
|
|
| 142 |
- ebegin "Stopping Courier mail server:" |
|
| 143 |
- |
|
| 144 |
- ebegin " Stopping courier-esmtpd" |
|
| 145 |
- ${sbindir}/esmtpd stop
|
|
| 146 |
- |
|
| 147 |
- ebegin " Stopping courier-esmtpd-msa" |
|
| 148 |
- ${sbindir}/esmtpd-msa stop
|
|
| 149 |
- |
|
| 150 |
- ebegin " Stopping courier-esmtpd-ssl" |
|
| 151 |
- ${sbindir}/esmtpd-ssl stop
|
|
| 152 |
- |
|
| 153 |
- [ -x ${sbindir}/courier-pop3d ] && \
|
|
| 154 |
- ebegin " Stopping courier-pop3d" && ${sbindir}/courier-pop3d stop
|
|
| 155 |
- |
|
| 156 |
- [ -x ${sbindir}/courier-pop3d-ssl ] && \
|
|
| 157 |
- ebegin " Stopping courier-pop3d-ssl" && ${sbindir}/courier-pop3d-ssl stop
|
|
| 158 |
- |
|
| 159 |
- [ -x ${sbindir}/courier-imapd ] && \
|
|
| 160 |
- ebegin " Stopping courier-imapd" && ${sbindir}/courier-imapd stop
|
|
| 161 |
- |
|
| 162 |
- |
|
| 163 |
- [ -x ${sbindir}/courier-imapd-ssl ] && \
|
|
| 164 |
- ebegin " Stopping courier-imapd-ssl" && ${sbindir}/courier-imapd-ssl stop
|
|
| 165 |
- |
|
| 166 |
- ebegin " Stopping courierd" |
|
| 167 |
- ${sbindir}/courier stop
|
|
| 168 |
- |
|
| 169 |
- [ -x ${sbindir}/courierldapaliasd ] && \
|
|
| 170 |
- ( ${sbindir}/courierldapaliasd stop ; ebegin " Stopping courierldapaliasd" )
|
|
| 171 |
- |
|
| 172 |
- [ -x ${libexecdir}/courier/webmaild ] && \
|
|
| 173 |
- ( ${libexecdir}/courier/webmaild stop ; ebegin " Stopping webmaild" )
|
|
| 174 |
- [ ! -x ${libexecdir}/courier/webmaild ] && [ -x ${libexecdir}/courier/sqwebmaild ] && \
|
|
| 175 |
- ( ${libexecdir}/courier/sqwebmaild stop ; ebegin " Stopping sqwebmaild" )
|
|
| 176 |
- |
|
| 177 |
- [ ! -d /etc/courier/authlib ] && [ -x ${libexecdir}/authlib/authdaemond ] && \
|
|
| 178 |
- ( ${libexecdir}/authlib/authdaemond stop ; ebegin " Stopping authdaemond" )
|
|
| 179 |
- |
|
| 180 |
- ${sbindir}/courierfilter stop
|
|
| 181 |
- ebegin " Stopping courierfilterd" |
|
| 182 |
- |
|
| 183 |
- eend $? |
|
| 184 |
-} |
| ... | ... |
@@ -1,36 +0,0 @@ |
| 1 |
---- courier-0.53.2/webmail/sqwebmail-system-auth.pamconf 2007/05/10 05:49:26 1.1 |
|
| 2 |
-+++ courier-0.53.2/webmail/sqwebmail-system-auth.pamconf 2007/05/13 18:19:03 |
|
| 3 |
-@@ -5,10 +5,10 @@ |
|
| 4 |
- # Copyright 1998-2001 Double Precision, Inc. See COPYING for |
|
| 5 |
- # distribution information. |
|
| 6 |
- # |
|
| 7 |
--# This is a sample authpam configuration file that uses pam_stack |
|
| 8 |
--# (circa linux-pam 0.72). |
|
| 9 |
-+# This is a sample authpam configuration file that uses include statements |
|
| 10 |
-+# (circa linux-pam 0.78). |
|
| 11 |
- |
|
| 12 |
- auth required pam_nologin.so |
|
| 13 |
--auth required pam_stack.so service=system-auth |
|
| 14 |
--account required pam_stack.so service=system-auth |
|
| 15 |
--session required pam_stack.so service=system-auth |
|
| 16 |
-+auth include system-auth |
|
| 17 |
-+account include system-auth |
|
| 18 |
-+session include system-auth |
|
| 19 |
---- courier-0.53.2/imap/system-auth.authpam 2007/05/13 19:03:10 1.1 |
|
| 20 |
-+++ courier-0.53.2/imap/system-auth.authpam 2007/05/13 19:04:03 |
|
| 21 |
-@@ -5,10 +5,10 @@ |
|
| 22 |
- # Copyright 1998-2001 Double Precision, Inc. See COPYING for |
|
| 23 |
- # distribution information. |
|
| 24 |
- # |
|
| 25 |
--# This is a sample authpam configuration file that uses pam_stack |
|
| 26 |
--# (circa linux-pam 0.72). |
|
| 27 |
-+# This is a sample authpam configuration file that uses include statements |
|
| 28 |
-+# (circa linux-pam 0.78). |
|
| 29 |
- |
|
| 30 |
- auth required pam_nologin.so |
|
| 31 |
--auth required pam_stack.so service=system-auth |
|
| 32 |
--account required pam_stack.so service=system-auth |
|
| 33 |
--session required pam_stack.so service=system-auth |
|
| 34 |
-+auth include system-auth |
|
| 35 |
-+account include system-auth |
|
| 36 |
-+session include system-auth |
| ... | ... |
@@ -0,0 +1,30 @@ |
| 1 |
+--- orig/configure.in 2008-03-06 13:50:29.000000000 +0100 |
|
| 2 |
++++ new/configure.in 2008-03-06 13:50:39.000000000 +0100 |
|
| 3 |
+@@ -19,7 +19,6 @@ |
|
| 4 |
+ |
|
| 5 |
+ AC_PROG_MAKE_SET |
|
| 6 |
+ AC_PROG_CXX |
|
| 7 |
+-AC_PROG_SYSCONFTOOL |
|
| 8 |
+ AC_PATH_PROGS(SETENV, env) |
|
| 9 |
+ |
|
| 10 |
+ AC_ARG_ENABLE(root-check, [ --disable-root-check Allow build as root (make check will fail)], |
|
| 11 |
+--- orig/Makefile.in 2008-03-06 19:37:53.000000000 +0100 |
|
| 12 |
++++ new/Makefile.in 2008-03-06 19:38:22.000000000 +0100 |
|
| 13 |
+@@ -791,7 +791,6 @@ |
|
| 14 |
+ |
|
| 15 |
+ install-configure: |
|
| 16 |
+ @$(MAKE) -$(MAKEFLAGS) install-perms |
|
| 17 |
+- @SYSCONFTOOL@ `awk ' $$5 == "config" && $$1 ~ /\.dist$$/ { print $$1 }' <permissions.dat`
|
|
| 18 |
+ |
|
| 19 |
+ install-webadmin-password: |
|
| 20 |
+ @stty -echo ; echo -n "Password: " ; read P; stty echo ; echo "" ; echo $$P >@sysconfdir@/webadmin/password && chown @mailuser@ @sysconfdir@/webadmin/password && chgrp @mailgroup@ @sysconfdir@/webadmin/password && chmod 400 @sysconfdir@/webadmin/password |
|
| 21 |
+--- orig/Makefile.am 2008-03-06 19:39:06.000000000 +0100 |
|
| 22 |
++++ new/Makefile.am 2008-03-06 19:39:21.000000000 +0100 |
|
| 23 |
+@@ -160,7 +160,6 @@ |
|
| 24 |
+ |
|
| 25 |
+ install-configure: |
|
| 26 |
+ @$(MAKE) -$(MAKEFLAGS) install-perms |
|
| 27 |
+- @SYSCONFTOOL@ `awk ' $$5 == "config" && $$1 ~ /\.dist$$/ { print $$1 }' <permissions.dat`
|
|
| 28 |
+ |
|
| 29 |
+ install-webadmin-password: |
|
| 30 |
+ @stty -echo ; echo -n "Password: " ; read P; stty echo ; echo "" ; echo $$P >@sysconfdir@/webadmin/password && chown @mailuser@ @sysconfdir@/webadmin/password && chgrp @mailgroup@ @sysconfdir@/webadmin/password && chmod 400 @sysconfdir@/webadmin/password |
| ... | ... |
@@ -1,28 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
-# this has to be called with a list of configuration files to apply the |
|
| 3 |
-# changes |
|
| 4 |
-# example: ./set-mime /etc/courier/esmtpd /etc/courier/esmtpd-ssl |
|
| 5 |
- |
|
| 6 |
-files=$* |
|
| 7 |
- |
|
| 8 |
-chk_badmime='##NAME: BOFHBADMIME:0' |
|
| 9 |
-pos_badmime='##NAME: NOADDMSGID:0' |
|
| 10 |
-ins_badmime='\ |
|
| 11 |
-##NAME: BOFHBADMIME:0\ |
|
| 12 |
-#\ |
|
| 13 |
-# set BOFHBADMIME\ |
|
| 14 |
-# to \"reject\" to return mail with invalid MIME header\ |
|
| 15 |
-# to \"wrap\" to wrap mail with invalid MIME header in an attachmant\ |
|
| 16 |
-# to \"accept\" to pass mail with invalid MIME header untouched\ |
|
| 17 |
-\ |
|
| 18 |
-BOFHBADMIME=accept\ |
|
| 19 |
-' |
|
| 20 |
- |
|
| 21 |
-for f in ${files}
|
|
| 22 |
-do |
|
| 23 |
- if ! grep -q "${chk_badmime}" "${f}"
|
|
| 24 |
- then |
|
| 25 |
- echo "adding parameter ${chk_badmime} to ${f}"
|
|
| 26 |
- cat ${f} | sed -e"/${pos_badmime}/ i ${ins_badmime}" > "${f}.tmp" && mv -f "${f}.tmp" "${f}"
|
|
| 27 |
- fi |
|
| 28 |
-done |
|
| 29 | 0 |