diff options
author | Tobias Scherbaum <dertobi123@gentoo.org> | 2009-02-16 19:04:38 +0000 |
---|---|---|
committer | Tobias Scherbaum <dertobi123@gentoo.org> | 2009-02-16 19:04:38 +0000 |
commit | c96c62baea95b91b2424795215a2c28547a711c4 (patch) | |
tree | 67162fcea936d1a3a92ebd8971024a3c2a9dcae0 /net-mail/cyrus-imapd | |
parent | Cleanup (diff) | |
download | gentoo-2-c96c62baea95b91b2424795215a2c28547a711c4.tar.gz gentoo-2-c96c62baea95b91b2424795215a2c28547a711c4.tar.bz2 gentoo-2-c96c62baea95b91b2424795215a2c28547a711c4.zip |
Cleanup
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'net-mail/cyrus-imapd')
13 files changed, 14 insertions, 1742 deletions
diff --git a/net-mail/cyrus-imapd/ChangeLog b/net-mail/cyrus-imapd/ChangeLog index f050fd143bab..25c1d6d021ea 100644 --- a/net-mail/cyrus-imapd/ChangeLog +++ b/net-mail/cyrus-imapd/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for net-mail/cyrus-imapd # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/ChangeLog,v 1.132 2009/02/16 18:52:34 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/ChangeLog,v 1.133 2009/02/16 19:04:37 dertobi123 Exp $ + + 16 Feb 2009; Tobias Scherbaum <dertobi123@gentoo.org> + -files/cyrus-imapd-2.3.8-drac_with_autocreate.patch, + -files/kolab/2.3.12_p2/cyradm_annotations.patch, + -files/kolab/2.3.12_p2/folder-names.patch, + -files/kolab/2.3.12_p2/annotations2.patch, + -files/kolab/2.3.12_p2/groups.patch, + -files/cyrus-imapd-2.3.11-drac_with_autocreate.patch, + -files/kolab/2.3.12_p2/logging.patch, + -files/kolab/2.3.12_p2/timsieved_starttls-sendcaps.patch, + -files/kolab/2.3.12_p2/uid.patch, -cyrus-imapd-2.3.9-r1.ebuild, + -cyrus-imapd-2.3.11.ebuild, -cyrus-imapd-2.3.12_p2.ebuild: + Cleanup 16 Feb 2009; Tobias Scherbaum <dertobi123@gentoo.org> cyrus-imapd-2.3.13.ebuild: diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.3.11.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.3.11.ebuild deleted file mode 100644 index e86de7b2417c..000000000000 --- a/net-mail/cyrus-imapd/cyrus-imapd-2.3.11.ebuild +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.11.ebuild,v 1.5 2008/03/15 23:14:05 halcy0n Exp $ - -inherit autotools eutils ssl-cert fixheadtails pam - -DESCRIPTION="The Cyrus IMAP Server." -HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/" -SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz - mirror://gentoo/${P}-uoa.tbz2" -LIBWRAP_PATCH_VER="2.2" -DRAC_PATCH_VER="2.3.11" -AUTOCREATE_PATCH_VER="0.10-0" -AUTOSIEVE_PATCH_VER="0.6.0" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" -IUSE="autocreate autosieve drac idled kerberos nntp pam replication snmp ssl tcpd" - -PROVIDE="virtual/imapd" -RDEPEND=">=sys-libs/db-3.2 - >=dev-libs/cyrus-sasl-2.1.13 - pam? ( - virtual/pam - >=net-mail/mailbase-1 - ) - kerberos? ( virtual/krb5 ) - snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 ) - ssl? ( >=dev-libs/openssl-0.9.6 ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - drac? ( >=mail-client/drac-1.12-r1 ) - nntp? ( !net-nntp/leafnode )" - -DEPEND="$RDEPEND - sys-devel/libtool - >=sys-devel/autoconf-2.58 - sys-devel/automake" - -RDEPEND="$RDEPEND - !virtual/imapd" - -new_net-snmp_check() { - # tcpd USE flag check. Bug #68254. - if use tcpd ; then - if has_version net-analyzer/net-snmp && ! built_with_use net-analyzer/net-snmp tcpd ; then - eerror "You are emerging this package with USE=\"tcpd\"" - eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"-tcpd\"" - fail_msg - fi - else - if has_version net-analyzer/net-snmp && built_with_use net-analyzer/net-snmp tcpd ; then - eerror "You are emerging this package with USE=\"-tcpd\"" - eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"tcpd\"" - fail_msg - fi - fi - # DynaLoader check. Bug #67411 - - if [ -x "$(type -p net-snmp-config)" ]; then - einfo "$(type -p net-snmp-config) is found and executable." - NSC_AGENTLIBS="$(net-snmp-config --agent-libs)" - einfo "NSC_AGENTLIBS=\""${NSC_AGENTLIBS}"\"" - if [ -z "$NSC_AGENTLIBS" ]; then - eerror "NSC_AGENTLIBS is null" - einfo "please report this to bugs.gentoo.org" - fi - for i in ${NSC_AGENTLIBS}; do - # check for the DynaLoader path. - if [ "$(expr "$i" : '.*\(DynaLoader\)')" == "DynaLoader" ] ; then - DYNALOADER_PATH="$i" - einfo "DYNALOADER_PATH=\""${DYNALOADER_PATH}"\"" - if [[ ! -f "${DYNALOADER_PATH}" ]]; then - eerror "\""${DYNALOADER_PATH}"\" is not found." - einfo "Have you upgraded \"perl\" after" - einfo "you emerged \"net-snmp\". Please re-emerge" - einfo "\"net-snmp\" then try again. Bug #67411." - die "\""${DYNALOADER_PATH}"\" is not found." - fi - fi - done - else - eerror "\"net-snmp-config\" not found or not executable!" - die "You have \"net-snmp\" installed but \"net-snmp-config\" is not found or not executable. Please re-emerge \"net-snmp\" and try again!" - fi -} - -fail_msg() { - eerror "enable "snmp" USE flag for this package requires" - eerror "that net-analyzer/net-snmp and this package both build with" - eerror "\"tcpd\" or \"-tcpd\". Bug #68254" - die "sanity check failed." -} - -pkg_setup() { - use snmp && new_net-snmp_check - enewuser cyrus -1 -1 /usr/cyrus mail -} - -src_unpack() { - unpack ${A} && cd "${S}" - - ht_fix_file "${S}"/imap/xversion.sh - - # Fix prestripped binaries - epatch "${FILESDIR}/${PN}-strip.patch" - - # Unsupported UoA patch. Bug #112912 . - # http://email.uoa.gr/projects/cyrus/autocreate/ - if use autocreate ; then - epatch "${WORKDIR}/${P}-autocreate-${AUTOCREATE_PATCH_VER}.diff" - use drac \ - && epatch "${FILESDIR}/${PN}-${DRAC_PATCH_VER}-drac_with_autocreate.patch" \ - && epatch "${S}/contrib/drac_auth.patch" - else - use drac && epatch "${S}/contrib/drac_auth.patch" - fi - - # Unsupported UoA patch. Bug #133187 . - # http://email.uoa.gr/projects/cyrus/autosievefolder/ - use autosieve && epatch "${WORKDIR}/${P}-autosieve-${AUTOSIEVE_PATCH_VER}.diff" - - # Add libwrap defines as we don't have a dynamicly linked library. - use tcpd && epatch "${FILESDIR}/${PN}-${LIBWRAP_PATCH_VER}-libwrap.patch" - - # Fix master(8)->cyrusmaster(8) manpage. - for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do - sed -i -e 's:master\.8:cyrusmaster.8:g' \ - -e 's:master(8):cyrusmaster(8):g' \ - "${i}" || die "sed failed" || die "sed failed" - done - mv man/master.8 man/cyrusmaster.8 || die "mv failed" - sed -i -e "s:MASTER:CYRUSMASTER:g" \ - -e "s:Master:Cyrusmaster:g" \ - -e "s:master:cyrusmaster:g" \ - man/cyrusmaster.8 || die "sed failed" - - # Recreate configure. - WANT_AUTOCONF="2.5" - AT_M4DIR="cmulocal" eautoreconf - - # When linking with rpm, you need to link with more libraries. - sed -i -e "s:lrpm:lrpm -lrpmio -lrpmdb:" configure || die "sed failed" -} - -src_compile() { - local myconf - myconf="${myconf} $(use_with drac)" - myconf="${myconf} $(use_with ssl openssl)" - myconf="${myconf} $(use_with snmp ucdsnmp)" - myconf="${myconf} $(use_with tcpd libwrap)" - myconf="${myconf} $(use_enable kerberos gssapi) $(use_enable kerberos krb5afspts)" - myconf="${myconf} $(use_enable idled)" - myconf="${myconf} $(use_enable nntp nntp)" - myconf="${myconf} $(use_enable replication)" - - if use kerberos; then - myconf="${myconf} --with-auth=krb5" - else - myconf="${myconf} --with-auth=unix" - fi - - econf \ - --enable-murder \ - --enable-listext \ - --enable-netscapehack \ - --with-extraident=Gentoo \ - --with-service-path=/usr/lib/cyrus \ - --with-cyrus-user=cyrus \ - --with-cyrus-group=mail \ - --with-com_err=yes \ - --without-perl \ - --disable-cyradm \ - ${myconf} || die "econf failed" - - # needed for parallel make. Bug #72352. - cd "${S}"/imap - emake xversion.h || die "emake xversion.h failed" - - cd "${S}" - emake || die "compile problem" -} - -src_install() { - dodir /usr/bin /usr/lib - for subdir in master imap imtest timsieved notifyd sieve; do - make -C "${subdir}" DESTDIR="${D}" install || die "make install failed" - done - - # Link master to cyrusmaster (postfix has a master too) - dosym /usr/lib/cyrus/master /usr/lib/cyrus/cyrusmaster - - if ! use nntp ; then - rm man/fetchnews.8 man/syncnews.8 man/nntpd.8 man/nntptest.1 - rm "${D}"/usr/bin/nntptest - fi - - doman man/*.[0-8] - dodoc COPYRIGHT README* - dohtml doc/*.html doc/murder.png - cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html" - cp -r contrib tools "${D}/usr/share/doc/${PF}" - find "${D}/usr/share/doc" -name CVS -print0 | xargs -0 rm -rf - - insinto /etc - doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf" - - newinitd "${FILESDIR}/cyrus.rc6" cyrus - newconfd "${FILESDIR}/cyrus.confd" cyrus - newpamd "${FILESDIR}/cyrus.pam-include" sieve - - for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do - keepdir "/var/${subdir}" - fowners cyrus:mail "/var/${subdir}" - fperms 0750 "/var/${subdir}" - done - for subdir in imap/{user,quota,sieve} spool/imap ; do - for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do - keepdir "/var/${subdir}/${i}" - fowners cyrus:mail "/var/${subdir}/${i}" - fperms 0750 "/var/${subdir}/${i}" - done - done -} - -pkg_postinst() { - # do not install server.{key,pem) if they are exist. - use ssl && { - if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then - install_cert /etc/ssl/cyrus/server - chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem} - fi - } - - if df -T /var/imap | grep -q ' ext[23] ' ; then - ebegin "Making /var/imap/user/* and /var/imap/quota/* synchronous." - chattr +S /var/imap/{user,quota}{,/*} - eend $? - fi - - if df -T /var/spool/imap | grep -q ' ext[23] ' ; then - ebegin "Making /var/spool/imap/* synchronous." - chattr +S /var/spool/imap{,/*} - eend $? - fi - - ewarn "If the queue directory of the mail daemon resides on an ext2" - ewarn "or ext3 filesystem you need to set it manually to update" - ewarn "synchronously. E.g. 'chattr +S /var/spool/mqueue'." - echo - - elog "For correct logging add the following to /etc/syslog.conf:" - elog " local6.* /var/log/imapd.log" - elog " auth.debug /var/log/auth.log" - echo - - elog "You have to add user cyrus to the sasldb2. Do this with:" - elog " saslpasswd2 cyrus" -} diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.3.12_p2.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.3.12_p2.ebuild deleted file mode 100644 index e47a0b79d4dd..000000000000 --- a/net-mail/cyrus-imapd/cyrus-imapd-2.3.12_p2.ebuild +++ /dev/null @@ -1,263 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.12_p2.ebuild,v 1.1 2008/06/04 18:56:56 dertobi123 Exp $ - -inherit autotools eutils ssl-cert fixheadtails pam - -MY_P=${P/_/} - -DESCRIPTION="The Cyrus IMAP Server." -HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/" -SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${MY_P}.tar.gz" -LIBWRAP_PATCH_VER="2.2" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" -IUSE="drac idled kerberos kolab nntp pam replication snmp ssl tcpd" - -PROVIDE="virtual/imapd" -RDEPEND=">=sys-libs/db-3.2 - >=dev-libs/cyrus-sasl-2.1.13 - pam? ( - virtual/pam - >=net-mail/mailbase-1 - ) - kerberos? ( virtual/krb5 ) - snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 ) - ssl? ( >=dev-libs/openssl-0.9.6 ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - drac? ( >=mail-client/drac-1.12-r1 ) - nntp? ( !net-nntp/leafnode ) - kolab? ( net-nds/openldap )" - -DEPEND="$RDEPEND - sys-devel/libtool - >=sys-devel/autoconf-2.58 - sys-devel/automake" - -RDEPEND="$RDEPEND - !virtual/imapd" - -new_net-snmp_check() { - # tcpd USE flag check. Bug #68254. - if use tcpd ; then - if has_version net-analyzer/net-snmp && ! built_with_use net-analyzer/net-snmp tcpd ; then - eerror "You are emerging this package with USE=\"tcpd\"" - eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"-tcpd\"" - fail_msg - fi - else - if has_version net-analyzer/net-snmp && built_with_use net-analyzer/net-snmp tcpd ; then - eerror "You are emerging this package with USE=\"-tcpd\"" - eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"tcpd\"" - fail_msg - fi - fi - # DynaLoader check. Bug #67411 - - if [ -x "$(type -p net-snmp-config)" ]; then - einfo "$(type -p net-snmp-config) is found and executable." - NSC_AGENTLIBS="$(net-snmp-config --agent-libs)" - einfo "NSC_AGENTLIBS=\""${NSC_AGENTLIBS}"\"" - if [ -z "$NSC_AGENTLIBS" ]; then - eerror "NSC_AGENTLIBS is null" - einfo "please report this to bugs.gentoo.org" - fi - for i in ${NSC_AGENTLIBS}; do - # check for the DynaLoader path. - if [ "$(expr "$i" : '.*\(DynaLoader\)')" == "DynaLoader" ] ; then - DYNALOADER_PATH="$i" - einfo "DYNALOADER_PATH=\""${DYNALOADER_PATH}"\"" - if [[ ! -f "${DYNALOADER_PATH}" ]]; then - eerror "\""${DYNALOADER_PATH}"\" is not found." - einfo "Have you upgraded \"perl\" after" - einfo "you emerged \"net-snmp\". Please re-emerge" - einfo "\"net-snmp\" then try again. Bug #67411." - die "\""${DYNALOADER_PATH}"\" is not found." - fi - fi - done - else - eerror "\"net-snmp-config\" not found or not executable!" - die "You have \"net-snmp\" installed but \"net-snmp-config\" is not found or not executable. Please re-emerge \"net-snmp\" and try again!" - fi -} - -fail_msg() { - eerror "enable "snmp" USE flag for this package requires" - eerror "that net-analyzer/net-snmp and this package both build with" - eerror "\"tcpd\" or \"-tcpd\". Bug #68254" - die "sanity check failed." -} - -pkg_setup() { - use snmp && new_net-snmp_check - enewuser cyrus -1 -1 /usr/cyrus mail -} - -S=${WORKDIR}/${MY_P} - -src_unpack() { - unpack ${A} && cd "${S}" - - ht_fix_file "${S}"/imap/xversion.sh - - # Fix prestripped binaries - epatch "${FILESDIR}/${PN}-strip.patch" - - if use drac ; then - epatch "${S}/contrib/drac_auth.patch" - fi - - # KOLAB support - if use kolab ; then - EPATCH_SOURCE="${FILESDIR}/kolab/${PV}" EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" epatch - # These files are being created automatically and need to be updated - # # after the patches used above - rm -f lib/imapopts.h lib/imapopts.c - fi - - # Add libwrap defines as we don't have a dynamicly linked library. - use tcpd && epatch "${FILESDIR}/${PN}-${LIBWRAP_PATCH_VER}-libwrap.patch" - - # Fix master(8)->cyrusmaster(8) manpage. - for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do - sed -i -e 's:master\.8:cyrusmaster.8:g' \ - -e 's:master(8):cyrusmaster(8):g' \ - "${i}" || die "sed failed" || die "sed failed" - done - mv man/master.8 man/cyrusmaster.8 || die "mv failed" - sed -i -e "s:MASTER:CYRUSMASTER:g" \ - -e "s:Master:Cyrusmaster:g" \ - -e "s:master:cyrusmaster:g" \ - man/cyrusmaster.8 || die "sed failed" - - # Recreate configure. - WANT_AUTOCONF="2.5" - AT_M4DIR="cmulocal" eautoreconf - - # When linking with rpm, you need to link with more libraries. - sed -i -e "s:lrpm:lrpm -lrpmio -lrpmdb:" configure || die "sed failed" - - if use kolab ; then - sed -i -e "s/{LIB_SASL}/{LIB_SASL} -lldap -llber /" configure || die "sed failed" - fi -} - -src_compile() { - local myconf - myconf="${myconf} $(use_with drac)" - myconf="${myconf} $(use_with ssl openssl)" - myconf="${myconf} $(use_with snmp ucdsnmp)" - myconf="${myconf} $(use_with tcpd libwrap)" - myconf="${myconf} $(use_enable kerberos gssapi) $(use_enable kerberos krb5afspts)" - myconf="${myconf} $(use_enable idled)" - myconf="${myconf} $(use_enable nntp nntp)" - myconf="${myconf} $(use_enable replication)" - - if use kerberos; then - myconf="${myconf} --with-auth=krb5" - else - myconf="${myconf} --with-auth=unix" - fi - - econf \ - --enable-murder \ - --enable-listext \ - --enable-netscapehack \ - --with-extraident=Gentoo \ - --with-service-path=/usr/lib/cyrus \ - --with-cyrus-user=cyrus \ - --with-cyrus-group=mail \ - --with-com_err=yes \ - --without-perl \ - --disable-cyradm \ - ${myconf} || die "econf failed" - - # needed for parallel make. Bug #72352. - cd "${S}"/imap - emake xversion.h || die "emake xversion.h failed" - - # -j1 for #222529 - cd "${S}" - emake -j1 || die "compile problem" -} - -src_install() { - dodir /usr/bin /usr/lib - for subdir in master imap imtest timsieved notifyd sieve; do - make -C "${subdir}" DESTDIR="${D}" install || die "make install failed" - done - - # Link master to cyrusmaster (postfix has a master too) - dosym /usr/lib/cyrus/master /usr/lib/cyrus/cyrusmaster - - if ! use nntp ; then - rm man/fetchnews.8 man/syncnews.8 man/nntpd.8 man/nntptest.1 - rm "${D}"/usr/bin/nntptest - fi - - doman man/*.[0-8] - dodoc COPYRIGHT README* - dohtml doc/*.html doc/murder.png - cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html" - cp -r contrib tools "${D}/usr/share/doc/${PF}" - find "${D}/usr/share/doc" -name CVS -print0 | xargs -0 rm -rf - - insinto /etc - doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf" - - newinitd "${FILESDIR}/cyrus.rc6" cyrus - newconfd "${FILESDIR}/cyrus.confd" cyrus - newpamd "${FILESDIR}/cyrus.pam-include" sieve - - for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do - keepdir "/var/${subdir}" - fowners cyrus:mail "/var/${subdir}" - fperms 0750 "/var/${subdir}" - done - for subdir in imap/{user,quota,sieve} spool/imap ; do - for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do - keepdir "/var/${subdir}/${i}" - fowners cyrus:mail "/var/${subdir}/${i}" - fperms 0750 "/var/${subdir}/${i}" - done - done -} - -pkg_postinst() { - # do not install server.{key,pem) if they are exist. - use ssl && { - if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then - install_cert /etc/ssl/cyrus/server - chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem} - fi - } - - if df -T /var/imap | grep -q ' ext2 ' ; then - ebegin "Making /var/imap/user/* and /var/imap/quota/* synchronous." - chattr +S /var/imap/{user,quota}{,/*} - eend $? - fi - - if df -T /var/spool/imap | grep -q ' ext2 ' ; then - ebegin "Making /var/spool/imap/* synchronous." - chattr +S /var/spool/imap{,/*} - eend $? - fi - - ewarn "If the queue directory of the mail daemon resides on an ext2" - ewarn "filesystem you need to set it manually to update" - ewarn "synchronously. E.g. 'chattr +S /var/spool/mqueue'." - echo - - elog "For correct logging add the following to /etc/syslog.conf:" - elog " local6.* /var/log/imapd.log" - elog " auth.debug /var/log/auth.log" - echo - - elog "You have to add user cyrus to the sasldb2. Do this with:" - elog " saslpasswd2 cyrus" -} diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r1.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r1.ebuild deleted file mode 100644 index 5266492641e2..000000000000 --- a/net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r1.ebuild +++ /dev/null @@ -1,256 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r1.ebuild,v 1.11 2008/03/15 23:14:05 halcy0n Exp $ - -inherit autotools eutils ssl-cert fixheadtails pam - -DESCRIPTION="The Cyrus IMAP Server." -HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/" -SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz - mirror://gentoo/${P}-uoa.tbz2" -LIBWRAP_PATCH_VER="2.2" -DRAC_PATCH_VER="2.3.8" -AUTOCREATE_PATCH_VER="0.10-0" -AUTOSIEVE_PATCH_VER="0.6.0" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="amd64 hppa ppc ppc64 sparc x86" -IUSE="autocreate autosieve drac idled kerberos nntp pam replication snmp ssl tcpd" - -PROVIDE="virtual/imapd" -RDEPEND=">=sys-libs/db-3.2 - >=dev-libs/cyrus-sasl-2.1.13 - pam? ( - virtual/pam - >=net-mail/mailbase-1 - ) - kerberos? ( virtual/krb5 ) - snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 ) - ssl? ( >=dev-libs/openssl-0.9.6 ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - drac? ( >=mail-client/drac-1.12-r1 )" - -DEPEND="$RDEPEND - sys-devel/libtool - >=sys-devel/autoconf-2.58 - sys-devel/automake" - -RDEPEND="$RDEPEND - !virtual/imap" - -new_net-snmp_check() { - # tcpd USE flag check. Bug #68254. - if use tcpd ; then - if has_version net-analyzer/net-snmp && ! built_with_use net-analyzer/net-snmp tcpd ; then - eerror "You are emerging this package with USE=\"tcpd\"" - eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"-tcpd\"" - fail_msg - fi - else - if has_version net-analyzer/net-snmp && built_with_use net-analyzer/net-snmp tcpd ; then - eerror "You are emerging this package with USE=\"-tcpd\"" - eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"tcpd\"" - fail_msg - fi - fi - # DynaLoader check. Bug #67411 - - if [ -x "$(type -p net-snmp-config)" ]; then - einfo "$(type -p net-snmp-config) is found and executable." - NSC_AGENTLIBS="$(net-snmp-config --agent-libs)" - einfo "NSC_AGENTLIBS=\""${NSC_AGENTLIBS}"\"" - if [ -z "$NSC_AGENTLIBS" ]; then - eerror "NSC_AGENTLIBS is null" - einfo "please report this to bugs.gentoo.org" - fi - for i in ${NSC_AGENTLIBS}; do - # check for the DynaLoader path. - if [ "$(expr "$i" : '.*\(DynaLoader\)')" == "DynaLoader" ] ; then - DYNALOADER_PATH="$i" - einfo "DYNALOADER_PATH=\""${DYNALOADER_PATH}"\"" - if [[ ! -f "${DYNALOADER_PATH}" ]]; then - eerror "\""${DYNALOADER_PATH}"\" is not found." - einfo "Have you upgraded \"perl\" after" - einfo "you emerged \"net-snmp\". Please re-emerge" - einfo "\"net-snmp\" then try again. Bug #67411." - die "\""${DYNALOADER_PATH}"\" is not found." - fi - fi - done - else - eerror "\"net-snmp-config\" not found or not executable!" - die "You have \"net-snmp\" installed but \"net-snmp-config\" is not found or not executable. Please re-emerge \"net-snmp\" and try again!" - fi -} - -fail_msg() { - eerror "enable "snmp" USE flag for this package requires" - eerror "that net-analyzer/net-snmp and this package both build with" - eerror "\"tcpd\" or \"-tcpd\". Bug #68254" - die "sanity check failed." -} - -pkg_setup() { - use snmp && new_net-snmp_check - enewuser cyrus -1 -1 /usr/cyrus mail -} - -src_unpack() { - unpack ${A} && cd "${S}" - - ht_fix_file "${S}"/imap/xversion.sh - - # Fix prestripped binaries - epatch "${FILESDIR}/${PN}-strip.patch" - - # Parallel make fix - epatch "${FILESDIR}"/${PN}-parallel.patch - - # Unsupported UoA patch. Bug #112912 . - # http://email.uoa.gr/projects/cyrus/autocreate/ - if use autocreate ; then - epatch "${WORKDIR}/${P}-autocreate-${AUTOCREATE_PATCH_VER}.diff" - use drac \ - && epatch "${FILESDIR}/${PN}-${DRAC_PATCH_VER}-drac_with_autocreate.patch" \ - && epatch "${S}/contrib/drac_auth.patch" - else - use drac && epatch "${S}/contrib/drac_auth.patch" - fi - - # Unsupported UoA patch. Bug #133187 . - # http://email.uoa.gr/projects/cyrus/autosievefolder/ - use autosieve && epatch "${WORKDIR}/${P}-autosieve-${AUTOSIEVE_PATCH_VER}.diff" - - # Add libwrap defines as we don't have a dynamicly linked library. - use tcpd && epatch "${FILESDIR}/${PN}-${LIBWRAP_PATCH_VER}-libwrap.patch" - - # Fix master(8)->cyrusmaster(8) manpage. - for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do - sed -i -e 's:master\.8:cyrusmaster.8:g' \ - -e 's:master(8):cyrusmaster(8):g' \ - "${i}" || die "sed failed" || die "sed failed" - done - mv man/master.8 man/cyrusmaster.8 || die "mv failed" - sed -i -e "s:MASTER:CYRUSMASTER:g" \ - -e "s:Master:Cyrusmaster:g" \ - -e "s:master:cyrusmaster:g" \ - man/cyrusmaster.8 || die "sed failed" - - # Recreate configure. - WANT_AUTOCONF="2.5" - eautoreconf - - # When linking with rpm, you need to link with more libraries. - sed -i -e "s:lrpm:lrpm -lrpmio -lrpmdb:" configure || die "sed failed" -} - -src_compile() { - local myconf - myconf="${myconf} $(use_with drac)" - myconf="${myconf} $(use_with ssl openssl)" - myconf="${myconf} $(use_with snmp ucdsnmp)" - myconf="${myconf} $(use_with tcpd libwrap)" - myconf="${myconf} $(use_enable kerberos gssapi) $(use_enable kerberos krb5afspts)" - myconf="${myconf} $(use_enable idled)" - myconf="${myconf} $(use_enable nntp nntp)" - myconf="${myconf} $(use_enable replication)" - - if use kerberos; then - myconf="${myconf} --with-auth=krb5" - else - myconf="${myconf} --with-auth=unix" - fi - - econf \ - --enable-murder \ - --enable-listext \ - --enable-netscapehack \ - --with-extraident=Gentoo \ - --with-service-path=/usr/lib/cyrus \ - --with-cyrus-user=cyrus \ - --with-cyrus-group=mail \ - --with-com_err=yes \ - --without-perl \ - --disable-cyradm \ - ${myconf} || die "econf failed" - - # needed for parallel make. Bug #72352. - cd "${S}"/imap - emake xversion.h || die "emake xversion.h failed" - - cd "${S}" - emake || die "compile problem" -} - -src_install() { - dodir /usr/bin /usr/lib - for subdir in master imap imtest timsieved notifyd sieve; do - make -C "${subdir}" DESTDIR="${D}" install || die "make install failed" - done - - # Link master to cyrusmaster (postfix has a master too) - dosym /usr/lib/cyrus/master /usr/lib/cyrus/cyrusmaster - - doman man/*.[0-8] - dodoc COPYRIGHT README* - dohtml doc/*.html doc/murder.png - cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html" - cp -r contrib tools "${D}/usr/share/doc/${PF}" - find "${D}/usr/share/doc" -name CVS -print0 | xargs -0 rm -rf - - insinto /etc - doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf" - - newinitd "${FILESDIR}/cyrus.rc6" cyrus - newconfd "${FILESDIR}/cyrus.confd" cyrus - newpamd "${FILESDIR}/cyrus.pam-include" sieve - - for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do - keepdir "/var/${subdir}" - fowners cyrus:mail "/var/${subdir}" - fperms 0750 "/var/${subdir}" - done - for subdir in imap/{user,quota,sieve} spool/imap ; do - for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do - keepdir "/var/${subdir}/${i}" - fowners cyrus:mail "/var/${subdir}/${i}" - fperms 0750 "/var/${subdir}/${i}" - done - done -} - -pkg_postinst() { - # do not install server.{key,pem) if they are exist. - use ssl && { - if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then - install_cert /etc/ssl/cyrus/server - chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem} - fi - } - - if df -T /var/imap | grep -q ' ext[23] ' ; then - ebegin "Making /var/imap/user/* and /var/imap/quota/* synchronous." - chattr +S /var/imap/{user,quota}{,/*} - eend $? - fi - - if df -T /var/spool/imap | grep -q ' ext[23] ' ; then - ebegin "Making /var/spool/imap/* synchronous." - chattr +S /var/spool/imap{,/*} - eend $? - fi - - ewarn "If the queue directory of the mail daemon resides on an ext2" - ewarn "or ext3 filesystem you need to set it manually to update" - ewarn "synchronously. E.g. 'chattr +S /var/spool/mqueue'." - echo - - elog "For correct logging add the following to /etc/syslog.conf:" - elog " local6.* /var/log/imapd.log" - elog " auth.debug /var/log/auth.log" - echo - - elog "You have to add user cyrus to the sasldb2. Do this with:" - elog " saslpasswd2 cyrus" -} diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.11-drac_with_autocreate.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.11-drac_with_autocreate.patch deleted file mode 100644 index 5e7929d7b439..000000000000 --- a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.11-drac_with_autocreate.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- contrib/drac_auth.patch.orig 2008-01-02 20:22:53.244043151 +0100 -+++ contrib/drac_auth.patch 2008-01-02 20:23:42.858474159 +0100 -@@ -107,23 +107,23 @@ - DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@ - - @@ -201,17 +202,17 @@ -- imapd: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE) -+ imapd: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE) - $(CC) $(LDFLAGS) -o imapd \ - $(SERVICE) $(IMAPDOBJS) mutex_fake.o \ --- libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) -+- libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) - -- imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE) -+ imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE) - $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imapd.pure \ - $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \ --- $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) -+- $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) - -- imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE) -+ imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE) - $(QUANTIFY) $(QUANTOPT) $(CC) $(LDFLAGS) -o imapd.quant \ - $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \ --- $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) -+- $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) - - mupdate: mupdate.o mupdate-slave.o mupdate-client.o mutex_pthread.o tls.o \ - libimap.a $(DEPLIBS) -@@ -131,8 +131,8 @@ - pop3d: pop3d.o proxy.o backend.o tls.o mutex_fake.o libimap.a \ - $(DEPLIBS) $(SERVICE) - $(CC) $(LDFLAGS) -o pop3d pop3d.o proxy.o backend.o tls.o $(SERVICE) \ --- mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) -+- mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) - - nntpd: nntpd.o proxy.o backend.o index.o smtpclient.o spool.o tls.o \ - mutex_fake.o nntp_err.o libimap.a $(DEPLIBS) $(SERVICE) diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-drac_with_autocreate.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-drac_with_autocreate.patch deleted file mode 100644 index 3b57e952d262..000000000000 --- a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-drac_with_autocreate.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- contrib/drac_auth.patch.orig 2007-07-28 12:10:05.253222371 +0200 -+++ contrib/drac_auth.patch 2007-07-28 12:12:51.105920502 +0200 -@@ -107,23 +107,23 @@ - DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@ - - @@ -202,17 +203,17 @@ -- imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE) -+ imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE) - $(CC) $(LDFLAGS) -o imapd \ - $(SERVICE) $(IMAPDOBJS) mutex_fake.o \ --- libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) -+- libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) - -- imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE) -+ imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE) - $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imapd.pure \ - $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \ --- $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) -+- $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) - -- imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE) -+ imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE) - $(QUANTIFY) $(QUANTOPT) $(CC) $(LDFLAGS) -o imapd.quant \ - $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \ --- $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) $(DRAC_LIBS) -+- $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) $(DRAC_LIBS) - - mupdate: mupdate.o mupdate-slave.o mupdate-client.o mutex_pthread.o tls.o \ - libimap.a $(DEPLIBS) -@@ -131,8 +131,8 @@ - pop3d: pop3d.o proxy.o backend.o tls.o mutex_fake.o libimap.a \ - $(DEPLIBS) $(SERVICE) - $(CC) $(LDFLAGS) -o pop3d pop3d.o proxy.o backend.o tls.o $(SERVICE) \ --- mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) --+ mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) -+- mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -++ mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) - - nntpd: nntpd.o proxy.o backend.o index.o smtpclient.o spool.o tls.o \ - mutex_fake.o nntp_err.o libimap.a $(DEPLIBS) $(SERVICE) diff --git a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/annotations2.patch b/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/annotations2.patch deleted file mode 100644 index 87fa920fc08f..000000000000 --- a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/annotations2.patch +++ /dev/null @@ -1,356 +0,0 @@ -Provides a new version of annotation support for the cyrus imapd server [Version: 2.3.9] - -diff -r 321cda1d6136 imap/annotate.c ---- a/imap/annotate.c Tue Apr 22 10:44:56 2008 +0200 -+++ b/imap/annotate.c Tue Apr 22 10:47:04 2008 +0200 -@@ -90,6 +90,8 @@ int (*proxy_fetch_func)(const char *serv - struct strlist *attribute_pat) = NULL; - int (*proxy_store_func)(const char *server, const char *mbox_pat, - struct entryattlist *entryatts) = NULL; -+ -+void init_annotation_definitions(); - - /* String List Management */ - /* -@@ -237,6 +239,8 @@ void annotatemore_init(int myflags, - if (store_func) { - proxy_store_func = store_func; - } -+ -+ init_annotation_definitions(); - } - - void annotatemore_open(char *fname) -@@ -1832,6 +1836,224 @@ const struct annotate_st_entry mailbox_r - { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL } - }; - -+struct annotate_st_entry_list *server_entries_list = NULL; -+struct annotate_st_entry_list *mailbox_rw_entries_list = NULL; -+ -+enum { -+ ANNOTATION_SCOPE_SERVER = 1, -+ ANNOTATION_SCOPE_MAILBOX = 2 -+}; -+ -+const struct annotate_attrib annotation_scope_names[] = -+{ -+ { "server", ANNOTATION_SCOPE_SERVER }, -+ { "mailbox", ANNOTATION_SCOPE_MAILBOX }, -+ { NULL, 0 } -+}; -+ -+const struct annotate_attrib annotation_proxy_type_names[] = -+{ -+ { "proxy", PROXY_ONLY }, -+ { "backend", BACKEND_ONLY }, -+ { "proxy_and_backend", PROXY_AND_BACKEND }, -+ { NULL, 0 } -+}; -+ -+const struct annotate_attrib attribute_type_names[] = -+{ -+ { "content-type", ATTRIB_TYPE_CONTENTTYPE }, -+ { "string", ATTRIB_TYPE_STRING }, -+ { "boolean", ATTRIB_TYPE_BOOLEAN }, -+ { "uint", ATTRIB_TYPE_UINT }, -+ { "int", ATTRIB_TYPE_INT }, -+ { NULL, 0 } -+}; -+ -+#define ANNOT_DEF_MAXLINELEN 1024 -+ -+int table_lookup(const struct annotate_attrib *table, -+ char* name, -+ size_t namelen, -+ char* errmsg) -+/* search in table for the value given by name and namelen (name is null-terminated, -+ but possibly more than just the key). errmsg is used to hint the user where we failed */ -+{ -+ char errbuf[ANNOT_DEF_MAXLINELEN*2]; -+ int entry; -+ -+ for (entry = 0; table[entry].name && -+ (strncasecmp(table[entry].name, name, namelen) -+ || table[entry].name[namelen] != '\0'); entry++); -+ -+ if (! table[entry].name) { -+ sprintf(errbuf, "invalid %s at '%s'", errmsg, name); -+ fatal(errbuf, EC_CONFIG); -+ } -+ return table[entry].entry; -+} -+ -+char *consume_comma(char* p) -+ /* advance beyond the next ',', skipping whitespace, fail if next non-space is no comma */ -+{ -+ char errbuf[ANNOT_DEF_MAXLINELEN*2]; -+ -+ for (; *p && isspace(*p); p++); -+ if (*p != ',') { -+ sprintf(errbuf, "',' expected, '%s' found parsing annotation definition", -+ p); -+ fatal(errbuf, EC_CONFIG); -+ } -+ p++; -+ for (; *p && isspace(*p); p++); -+ -+ return p; -+} -+ -+int parse_table_lookup_bitmask(const struct annotate_attrib *table, -+ char** s, -+ char* errmsg) -+ /* parses strings of the form value1 [ value2 [ ... ]] -+ value1 is mapped via table to ints and the result ored -+ whitespace is allowed between value names and punctuation -+ the field must end in '\0' or ',' -+ s is advanced to '\0' or ',' -+ on error errmsg is used to identify item to be parsed -+ */ -+{ -+ char errbuf[ANNOT_DEF_MAXLINELEN*2]; -+ int result = 0; -+ char *p, *p2; -+ -+ p = *s; -+ do { -+ p2 = p; -+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++); -+ result |= table_lookup(table, p2, p-p2, errmsg); -+ for (; *p && isspace(*p); p++); -+ } while (*p && *p != ','); -+ -+ *s = p; -+ return result; -+} -+ -+void init_annotation_definitions() -+{ -+ char *p, *p2, *tmp; -+ const char *filename; -+ char aline[ANNOT_DEF_MAXLINELEN]; -+ char errbuf[ANNOT_DEF_MAXLINELEN*2]; -+ struct annotate_st_entry_list *se, *me; -+ struct annotate_st_entry *ae; -+ int i; -+ FILE* f; -+ -+ /* NOTE: we assume # static entries > 0 */ -+ server_entries_list = xmalloc(sizeof(struct annotate_st_entry_list)); -+ mailbox_rw_entries_list = xmalloc(sizeof(struct annotate_st_entry_list)); -+ se = server_entries_list; -+ me = mailbox_rw_entries_list; -+ /* copy static entries into list */ -+ for (i = 0; server_entries[i].name;i++) { -+ se->entry = &server_entries[i]; -+ if (server_entries[i+1].name) { -+ se->next = xmalloc(sizeof(struct annotate_st_entry_list)); -+ se = se->next; -+ } -+ } -+ /* copy static entries into list */ -+ for (i = 0; mailbox_rw_entries[i].name;i++) { -+ me->entry = &mailbox_rw_entries[i]; -+ if (mailbox_rw_entries[i+1].name) { -+ me->next = xmalloc(sizeof(struct annotate_st_entry_list)); -+ me = me->next; -+ } -+ } -+ -+ /* parse config file */ -+ filename = config_getstring(IMAPOPT_ANNOTATION_DEFINITIONS); -+ -+ if (! filename) { -+ se->next = NULL; -+ me->next = NULL; -+ return; -+ } -+ -+ f = fopen(filename,"r"); -+ if (! f) { -+ sprintf(errbuf, "could not open annotation definiton %s", filename); -+ fatal(errbuf, EC_CONFIG); -+ } -+ -+ while (fgets(aline, sizeof(aline), f)) { -+ // remove leading space, skip blank lines and comments -+ for (p = aline; *p && isspace(*p); p++); -+ if (!*p || *p == '#') continue; -+ -+ // note, we only do the most basic validity checking and may -+ // be more restrictive than neccessary -+ -+ ae = xmalloc(sizeof(struct annotate_st_entry)); -+ -+ p2 = p; -+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++); -+ // TV-TODO: should test for empty -+ ae->name = xstrndup(p2, p-p2); -+ -+ p = consume_comma(p); -+ -+ p2 = p; -+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++); -+ -+ if (table_lookup(annotation_scope_names, p2, p-p2, -+ "annotation scope")==ANNOTATION_SCOPE_SERVER) { -+ se->next = xmalloc(sizeof(struct annotate_st_entry_list)); -+ se = se->next; -+ se->entry = ae; -+ } -+ else { -+ me->next = xmalloc(sizeof(struct annotate_st_entry_list)); -+ me = me->next; -+ me->entry = ae; -+ } -+ -+ p = consume_comma(p); -+ p2 = p; -+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++); -+ ae->type = table_lookup(attribute_type_names, p2, p-p2, -+ "attribute type"); -+ -+ p = consume_comma(p); -+ ae->proxytype = parse_table_lookup_bitmask(annotation_proxy_type_names, -+ &p, -+ "annotation proxy type"); -+ -+ p = consume_comma(p); -+ ae->attribs = parse_table_lookup_bitmask(annotation_attributes, -+ &p, -+ "annotation attributes"); -+ -+ p = consume_comma(p); -+ p2 = p; -+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++); -+ tmp = xstrndup(p2, p-p2); -+ ae->acl = cyrus_acl_strtomask(tmp); -+ free(tmp); -+ -+ for (; *p && isspace(*p); p++); -+ if (*p) { -+ sprintf(errbuf, "junk at end of line: '%s'", p); -+ fatal(errbuf, EC_CONFIG); -+ } -+ -+ ae->set = annotation_set_todb; -+ ae->rock = NULL; -+ } -+ -+ fclose(f); -+ se->next = NULL; -+ me->next = NULL; -+} -+ - int annotatemore_store(char *mailbox, - struct entryattlist *l, - struct namespace *namespace, -@@ -1843,7 +2065,7 @@ int annotatemore_store(char *mailbox, - struct entryattlist *e = l; - struct attvaluelist *av; - struct storedata sdata; -- const struct annotate_st_entry *entries; -+ const struct annotate_st_entry_list *entries, *currententry; - time_t now = time(0); - - memset(&sdata, 0, sizeof(struct storedata)); -@@ -1854,45 +2076,45 @@ int annotatemore_store(char *mailbox, - - if (!mailbox[0]) { - /* server annotations */ -- entries = server_entries; -+ entries = server_entries_list; - } - else { - /* mailbox annotation(s) */ -- entries = mailbox_rw_entries; -+ entries = mailbox_rw_entries_list; - } - - /* Build a list of callbacks for storing the annotations */ - while (e) { -- int entrycount, attribs; -+ int attribs; - struct annotate_st_entry_list *nentry = NULL; - - /* See if we support this entry */ -- for (entrycount = 0; -- entries[entrycount].name; -- entrycount++) { -- if (!strcmp(e->entry, entries[entrycount].name)) { -+ for (currententry = entries; -+ currententry; -+ currententry = currententry->next) { -+ if (!strcmp(e->entry, currententry->entry->name)) { - break; - } - } -- if (!entries[entrycount].name) { -+ if (!currententry) { - /* unknown annotation */ - return IMAP_PERMISSION_DENIED; - } - - /* Add this entry to our list only if it - applies to our particular server type */ -- if ((entries[entrycount].proxytype != PROXY_ONLY) -+ if ((currententry->entry->proxytype != PROXY_ONLY) - || proxy_store_func) { - nentry = xzmalloc(sizeof(struct annotate_st_entry_list)); - nentry->next = sdata.entry_list; -- nentry->entry = &(entries[entrycount]); -+ nentry->entry = currententry->entry; - nentry->shared.modifiedsince = now; - nentry->priv.modifiedsince = now; - sdata.entry_list = nentry; - } - - /* See if we are allowed to set the given attributes. */ -- attribs = entries[entrycount].attribs; -+ attribs = currententry->entry->attribs; - av = e->attvalues; - while (av) { - const char *value; -@@ -1902,7 +2124,7 @@ int annotatemore_store(char *mailbox, - goto cleanup; - } - value = annotate_canon_value(av->value, -- entries[entrycount].type); -+ currententry->entry->type); - if (!value) { - r = IMAP_ANNOTATION_BADVALUE; - goto cleanup; -@@ -1928,7 +2150,7 @@ int annotatemore_store(char *mailbox, - goto cleanup; - } - value = annotate_canon_value(av->value, -- entries[entrycount].type); -+ currententry->entry->type); - if (!value) { - r = IMAP_ANNOTATION_BADVALUE; - goto cleanup; -@@ -2110,3 +2332,10 @@ int annotatemore_delete(const char *mbox - - return annotatemore_rename(mboxname, NULL, NULL, NULL); - } -+ -+/* This file contains code Copyright (c) 2006 by Thomas Viehmann. -+ * You may distribute source code or binaries under the conditions -+ * conditions given in the CMU license, provided this note stays intact -+ * in the distributed source. If you want to distribute my code without -+ * this notice, do contact me at <tv@beamnet.de>. -+ */ -diff -r 321cda1d6136 lib/imapoptions ---- a/lib/imapoptions Tue Apr 22 10:44:56 2008 +0200 -+++ b/lib/imapoptions Tue Apr 22 10:47:04 2008 +0200 -@@ -172,6 +172,9 @@ are listed with ``<none>''. - /* Should non-admin users be allowed to set ACLs for the 'anyone' - user on their mailboxes? In a large organization this can cause - support problems, but it's enabled by default. */ -+ -+{ "annotation_definitions", NULL, STRING } -+/* File containing annotation definitions. */ - - { "auth_mech", "unix", STRINGLIST("unix", "pts", "krb", "krb5")} - /* The authorization mechanism to use. */ diff --git a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/cyradm_annotations.patch b/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/cyradm_annotations.patch deleted file mode 100644 index 2167f7f21874..000000000000 --- a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/cyradm_annotations.patch +++ /dev/null @@ -1,83 +0,0 @@ -Allows to use arbitrary annotations with the cyradm tool. - -diff -r a07884e259c3 doc/man/cyradm.1.html ---- a/doc/man/cyradm.1.html Thu Oct 25 08:24:39 2007 +0200 -+++ b/doc/man/cyradm.1.html Thu Oct 25 08:29:40 2007 +0200 -@@ -241,6 +241,13 @@ The currently supported attributes are:< - <dd> - <p>Sets an email address to which messages injected into the server via NNTP - will be sent.</p> -+</dd> -+</li> -+<dt><strong><a NAME="item__2fexplicit_2fannotation"><code>/explicit/annotation</code></a></strong> -+ -+<dd> -+<p>Sets the annotation <em>/explicit/annotation</em> -+on <em>mailbox</em> to <em>value</em>.</p> - </dd> - </li> - <dt><strong><a name="item_sharedseen"><code>sharedseen</code></a></strong> -diff -r a07884e259c3 perl/imap/IMAP/Admin.pm ---- a/perl/imap/IMAP/Admin.pm Thu Oct 25 08:24:39 2007 +0200 -+++ b/perl/imap/IMAP/Admin.pm Thu Oct 25 08:29:40 2007 +0200 -@@ -796,11 +796,11 @@ sub mboxconfig { - return undef; - } - -- if(!exists($values{$entry})) { -- $self->{error} = "Unknown parameter $entry"; -- } -- -- $entry = $values{$entry}; -+ if(exists($values{$entry})) { -+ $entry = $values{$entry}; -+ } else { -+ $self->{error} = "Unknown parameter $entry" unless substr($entry,0,1) eq "/"; -+ } - - my ($rc, $msg); - -diff -r a07884e259c3 perl/imap/IMAP/Shell.pm ---- a/perl/imap/IMAP/Shell.pm Thu Oct 25 08:24:39 2007 +0200 -+++ b/perl/imap/IMAP/Shell.pm Thu Oct 25 08:29:40 2007 +0200 -@@ -126,7 +126,7 @@ my %builtins = (exit => - [\&_sc_info, '[mailbox]', - 'display mailbox/server metadata'], - mboxcfg => -- [\&_sc_mboxcfg, 'mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value', -+ [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value', - 'configure mailbox'], - mboxconfig => 'mboxcfg', - reconstruct => -@@ -1436,7 +1436,7 @@ sub _sc_mboxcfg { - while (defined ($opt = shift(@argv))) { - last if $opt eq '--'; - if ($opt =~ /^-/) { -- die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value\n"; -+ die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat|/<explicit annotation>] value\n"; - } - else { - push(@nargv, $opt); -@@ -1445,7 +1445,7 @@ sub _sc_mboxcfg { - } - push(@nargv, @argv); - if (@nargv < 2) { -- die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value\n"; -+ die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat|/<explicit annotation>] value\n"; - } - if (!$cyrref || !$$cyrref) { - die "mboxconfig: no connection to server\n"; -diff -r a07884e259c3 perl/imap/cyradm.sh ---- a/perl/imap/cyradm.sh Thu Oct 25 08:24:39 2007 +0200 -+++ b/perl/imap/cyradm.sh Thu Oct 25 08:29:40 2007 +0200 -@@ -241,6 +241,10 @@ mailboxes). - - Indicates that the mailbox should have a squat index created for it. - -+=item C</explicit/annotation> -+ -+Sets the annotation I</explicit/annotation> on I<mailbox> to I<value>. -+ - =back - - =item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname> diff --git a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/folder-names.patch b/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/folder-names.patch deleted file mode 100644 index df55a3c174c6..000000000000 --- a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/folder-names.patch +++ /dev/null @@ -1,20 +0,0 @@ -Modifies the set of accepted characters in folder names for the cyrus imapd server [Version: 2.3.9] - -diff -r a83b43bb79a3 imap/mboxname.c ---- a/imap/mboxname.c Tue Dec 11 11:22:14 2007 +0100 -+++ b/imap/mboxname.c Tue Dec 11 11:22:22 2007 +0100 -@@ -712,8 +712,13 @@ int mboxname_netnewscheck(char *name) - /* - * Apply site policy restrictions on mailbox names. - * Restrictions are hardwired for now. -- */ -+ -+ * original definition - #define GOODCHARS " +,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~" -+ */ -+ -+#define GOODCHARS " #$%'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~" -+ - int mboxname_policycheck(char *name) - { - unsigned i; diff --git a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/groups.patch b/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/groups.patch deleted file mode 100644 index 9e987f590698..000000000000 --- a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/groups.patch +++ /dev/null @@ -1,220 +0,0 @@ -Allows to use a file other than /etc/groups for group definitions within the cyrus imapd server [Version: 2.3.9] - -diff -r 5f6f7a246f32 lib/auth_unix.c ---- a/lib/auth_unix.c Tue Dec 11 11:20:37 2007 +0100 -+++ b/lib/auth_unix.c Tue Dec 11 11:22:01 2007 +0100 -@@ -48,12 +48,133 @@ - #include <stdlib.h> - #include <pwd.h> - #include <grp.h> -+#include <stdio.h> - #include <ctype.h> - #include <string.h> - - #include "auth.h" - #include "libcyr_cfg.h" - #include "xmalloc.h" -+ -+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -+/* -+ * __getgrent.c - This file is part of the libc-8086/grp package for ELKS, -+ * Copyright (C) 1995, 1996 Nat Friedman <ndf@linux.mit.edu>. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Library General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Library General Public License for more details. -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this library; if not, write to the Free -+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#include <unistd.h> -+#include <string.h> -+#include <errno.h> -+ -+static struct group *__getgrent(int grp_fd, char *line_buff, char **members) -+{ -+ short line_index; -+ short buff_size; -+ static struct group group; -+ register char *ptr; -+ char *field_begin; -+ short member_num; -+ char *endptr; -+ int line_len; -+ -+ /* We use the restart label to handle malformatted lines */ -+ restart: -+ line_index = 0; -+ buff_size = 256; -+ -+ line_buff = realloc(line_buff, buff_size); -+ while (1) { -+ if ((line_len = read(grp_fd, line_buff + line_index, -+ buff_size - line_index)) <= 0) { -+ return NULL; -+ } -+ field_begin = strchr(line_buff, '\n'); -+ if (field_begin != NULL) { -+ lseek(grp_fd, -+ (long) (1 + field_begin - -+ (line_len + line_index + line_buff)), SEEK_CUR); -+ *field_begin = '\0'; -+ if (*line_buff == '#' || *line_buff == ' ' -+ || *line_buff == '\n' || *line_buff == '\t') -+ goto restart; -+ break; -+ } else { -+ /* Allocate some more space */ -+ line_index = buff_size; -+ buff_size += 256; -+ line_buff = realloc(line_buff, buff_size); -+ } -+ } -+ -+ /* Now parse the line */ -+ group.gr_name = line_buff; -+ ptr = strchr(line_buff, ':'); -+ if (ptr == NULL) -+ goto restart; -+ *ptr++ = '\0'; -+ -+ group.gr_passwd = ptr; -+ ptr = strchr(ptr, ':'); -+ if (ptr == NULL) -+ goto restart; -+ *ptr++ = '\0'; -+ -+ field_begin = ptr; -+ ptr = strchr(ptr, ':'); -+ if (ptr == NULL) -+ goto restart; -+ *ptr++ = '\0'; -+ -+ group.gr_gid = (gid_t) strtoul(field_begin, &endptr, 10); -+ if (*endptr != '\0') -+ goto restart; -+ -+ member_num = 0; -+ field_begin = ptr; -+ -+ if (members != NULL) -+ free(members); -+ members = (char **) malloc((member_num + 1) * sizeof(char *)); -+ for ( ; field_begin && *field_begin != '\0'; field_begin = ptr) { -+ if ((ptr = strchr(field_begin, ',')) != NULL) -+ *ptr++ = '\0'; -+ members[member_num++] = field_begin; -+ members = (char **) realloc(members, -+ (member_num + 1) * sizeof(char *)); -+ } -+ members[member_num] = NULL; -+ -+ group.gr_mem = members; -+ return &group; -+} -+ -+static char *line_buff = NULL; -+static char **members = NULL; -+ -+struct group *fgetgrent(FILE *file) -+{ -+ if (file == NULL) { -+ errno = EINTR; -+ return NULL; -+ } -+ return __getgrent(fileno(file), line_buff, members); -+} -+#endif /* __FreeBSD__ */ - - struct auth_state { - char userid[81]; -@@ -142,6 +263,25 @@ static char allowedchars[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - -+static struct group* fgetgrnam(const char* name) -+{ -+ struct group *grp; -+ FILE *groupfile; -+ -+ groupfile = fopen("/etc/imapd.group", "r"); -+ if (!groupfile) groupfile = fopen("/etc/group", "r"); -+ if (groupfile) { -+ while ((grp = fgetgrent(groupfile))) { -+ if (strcasecmp(grp->gr_name, name) == 0) { -+ fclose(groupfile); -+ return grp; -+ } -+ } -+ } -+ if (groupfile) fclose(groupfile); -+ return NULL; -+} -+ - /* - * Convert 'identifier' into canonical form. - * Returns a pointer to a static buffer containing the canonical form -@@ -177,7 +317,7 @@ size_t len; - */ - - if (!strncmp(retbuf, "group:", 6)) { -- grp = getgrnam(retbuf+6); -+ grp = fgetgrnam(retbuf+6); - if (!grp) return 0; - strcpy(retbuf+6, grp->gr_name); - return retbuf; -@@ -228,6 +368,7 @@ static struct auth_state *mynewstate(con - int ret, ngroups = 10; - #else - char **mem; -+ FILE *groupfile; - #endif - - identifier = mycanonifyid(identifier, 0); -@@ -283,20 +424,23 @@ err: - if (groupids) free(groupids); - - #else /* !HAVE_GETGROUPLIST */ -- setgrent(); -- while ((grp = getgrent())) { -- for (mem = grp->gr_mem; *mem; mem++) { -- if (!strcmp(*mem, identifier)) break; -- } -- -- if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) { -- newstate->ngroups++; -- newstate->group = (char **)xrealloc((char *)newstate->group, -- newstate->ngroups * sizeof(char *)); -- newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name); -- } -- } -- endgrent(); -+ groupfile = fopen("/etc/imapd.group", "r"); -+ if (!groupfile) groupfile = fopen("/etc/group", "r"); -+ if (groupfile) { -+ while ((grp = fgetgrent(groupfile))) { -+ for (mem = grp->gr_mem; *mem; mem++) { -+ if (!strcasecmp(*mem, identifier)) break; -+ } -+ -+ if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) { -+ newstate->ngroups++; -+ newstate->group = (char **)xrealloc((char *)newstate->group, -+ newstate->ngroups * sizeof(char *)); -+ newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name); -+ } -+ } -+ fclose(groupfile); -+ } - #endif /* HAVE_GETGROUPLIST */ - - return newstate; diff --git a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/logging.patch b/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/logging.patch deleted file mode 100644 index c0bd2faec033..000000000000 --- a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/logging.patch +++ /dev/null @@ -1,58 +0,0 @@ -Provides improved logging for the cyrus imapd server [Version: 2.3.9] - -diff -r 6162fc947b22 imap/append.c ---- a/imap/append.c Tue Dec 11 11:22:03 2007 +0100 -+++ b/imap/append.c Tue Dec 11 11:22:13 2007 +0100 -@@ -648,6 +648,9 @@ int append_fromstage(struct appendstate - - /* ok, we've successfully added a message */ - as->quota_used += message_index.size; -+ -+ syslog(LOG_DEBUG, "append_fromstage: message %d added to %s", -+ message_index.uid, mailbox->name ); - - return 0; - } -diff -r 6162fc947b22 imap/imapd.c ---- a/imap/imapd.c Tue Dec 11 11:22:03 2007 +0100 -+++ b/imap/imapd.c Tue Dec 11 11:22:13 2007 +0100 -@@ -3509,17 +3509,19 @@ void cmd_close(char *tag) - if (!r) sync_log_mailbox(imapd_mailbox->name); - } - -+ if (r) { -+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r)); -+ } -+ else { -+ prot_printf(imapd_out, "%s OK %s\r\n", tag, -+ error_message(IMAP_OK_COMPLETED)); -+ syslog(LOG_DEBUG, "cmd_expunge: user %s, mailbox %s, sequence %s", -+ imapd_userid, imapd_mailbox->name, "''"); -+ } -+ - index_closemailbox(imapd_mailbox); - mailbox_close(imapd_mailbox); - imapd_mailbox = 0; -- -- if (r) { -- prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r)); -- } -- else { -- prot_printf(imapd_out, "%s OK %s\r\n", tag, -- error_message(IMAP_OK_COMPLETED)); -- } - } - - /* -diff -r 6162fc947b22 imap/mailbox.c ---- a/imap/mailbox.c Tue Dec 11 11:22:03 2007 +0100 -+++ b/imap/mailbox.c Tue Dec 11 11:22:13 2007 +0100 -@@ -2520,6 +2520,8 @@ int mailbox_expunge(struct mailbox *mail - *(fname->tail)++ = '/'; - fname->len++; - for (msgno = 0; msgno < numdeleted; msgno++) { -+ syslog(LOG_DEBUG, "mailbox_expunge: removing mail %s:%d", -+ mailbox->name, deleted[msgno]); - mailbox_message_get_fname(mailbox, deleted[msgno], - fname->tail, - sizeof(fname->buf) - fname->len); diff --git a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/timsieved_starttls-sendcaps.patch b/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/timsieved_starttls-sendcaps.patch deleted file mode 100644 index 48524e9df5c8..000000000000 --- a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/timsieved_starttls-sendcaps.patch +++ /dev/null @@ -1,19 +0,0 @@ -This patch was downloaded from https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/timsieved/parser.c.diff?r1=1.44;r2=1.45 -(minus the CVS keywords) - -It should be reverse-applied with patch -p2 -R to work around the kontact -behaviour described in kolab/issue2443 (kontact aborts sieve when imapd sends -capabilities after starttls) and can be dropped as soon as kontact has a way -to work with old and new cyrus imapd servers. - ---- a/timsieved/parser.c 2007/11/26 20:23:06 1.44 -+++ b/timsieved/parser.c 2007/12/10 14:47:08 1.45 -@@ -861,7 +861,7 @@ static int cmd_starttls(struct protstrea - - starttls_done = 1; - -- return capabilities(sieved_out, sieved_saslconn, starttls_done, authenticated); -+ return result; - } - #else - static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in) diff --git a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/uid.patch b/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/uid.patch deleted file mode 100644 index a0444635a7fa..000000000000 --- a/net-mail/cyrus-imapd/files/kolab/2.3.12_p2/uid.patch +++ /dev/null @@ -1,115 +0,0 @@ -Allows login by uid rather than the mail address on the cyrus imapd server [Version: 2.3.9] - -diff -r d62bf3b0902d configure ---- a/configure Thu Oct 25 08:30:57 2007 +0200 -+++ b/configure Thu Oct 25 08:31:06 2007 +0200 -@@ -18119,7 +18119,7 @@ done - done - - IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}" --IMAP_LIBS="${LIB_SASL} ${LIBS}" -+IMAP_LIBS="${LIB_SASL} -lldap -llber ${LIBS}" - - - -diff -r d62bf3b0902d imap/global.c ---- a/imap/global.c Thu Oct 25 08:30:57 2007 +0200 -+++ b/imap/global.c Thu Oct 25 08:31:06 2007 +0200 -@@ -52,6 +52,9 @@ - #include <netinet/in.h> - #include <sys/stat.h> - -+#include <ldap.h> -+#include <lber.h> -+ - #if HAVE_UNISTD_H - # include <unistd.h> - #endif -@@ -362,6 +365,18 @@ char *canonify_userid(char *user, char * - char *domain = NULL; - int len = strlen(user); - char buf[81]; -+ const char *uri; -+ const char *base; -+ const char *binddn; -+ const char *bindpw; -+ struct timeval timeout; -+ char filter[255]; -+ LDAP *handle; -+ LDAPMessage *res; -+ LDAPMessage *entry; -+ char ** vals; -+ -+ int rc; - - /* check for domain */ - if (config_virtdomains && -@@ -380,6 +395,47 @@ char *canonify_userid(char *user, char * - } - - if (config_virtdomains) { -+ if (config_virtdomains == IMAP_ENUM_VIRTDOMAINS_LDAP) { -+ uri = config_getstring(IMAPOPT_LDAP_URI); -+ base = config_getstring(IMAPOPT_LDAP_BASE); -+ binddn = config_getstring(IMAPOPT_LDAP_BIND_DN); -+ bindpw = config_getstring(IMAPOPT_LDAP_PASSWORD); -+ timeout.tv_sec = config_getint(IMAPOPT_LDAP_TIME_LIMIT); -+ timeout.tv_usec = 0; -+ sprintf(filter, "(uid=%s)", user); -+ rc = ldap_initialize(&handle, uri); -+ if (rc != LDAP_SUCCESS) { -+ syslog(LOG_ERR, "ldap_initialize failed (%s)", uri); -+ } else { -+ rc = ldap_simple_bind_s(handle, binddn, bindpw); -+ if (rc != LDAP_SUCCESS) { -+ syslog(LOG_ERR, "ldap_simple_bind() failed %d (%s)", rc, ldap_err2string(rc)); -+ } else { -+ rc = ldap_search_st(handle, base, LDAP_SCOPE_SUBTREE, filter, NULL, 0, &timeout, &res); -+ if (rc != LDAP_SUCCESS) { -+ syslog(LOG_ERR, "ldap_search_st failed %d (%s)", rc, ldap_err2string(rc)); -+ } else { -+ if ( (entry = ldap_first_entry(handle, res)) != NULL ) { -+ // read mail attribute from entry -+ if ( (vals = ldap_get_values(handle, entry, "mail")) ) { -+ if (strchr(vals[0], '@')) { -+ static char buf[81]; /* same size as in auth_canonifyid */ -+ strncpy( buf, vals[0], sizeof(buf) ); -+ buf[80] = '\0'; /* make sure it's null-terminated */ -+ ldap_value_free( vals ); -+ ldap_msgfree( res ); -+ ldap_unbind_s(handle); /* also frees handle */ -+ return auth_canonifyid( buf, 0) ; -+ } -+ ldap_value_free( vals ); -+ } -+ } -+ ldap_msgfree( res ); -+ } -+ } -+ ldap_unbind_s(handle); /* also frees handle */ -+ } -+ } - if (domain) { - if (config_defdomain && !strcasecmp(config_defdomain, domain+1)) { - *domain = '\0'; /* trim the default domain */ -@@ -392,7 +448,7 @@ char *canonify_userid(char *user, char * - user = buf; - } - } -- else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID) { -+ else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID && config_virtdomains != IMAP_ENUM_VIRTDOMAINS_LDAP) { - socklen_t salen; - int error; - struct sockaddr_storage localaddr; -diff -r d62bf3b0902d lib/imapoptions ---- a/lib/imapoptions Thu Oct 25 08:30:57 2007 +0200 -+++ b/lib/imapoptions Thu Oct 25 08:31:06 2007 +0200 -@@ -1034,7 +1034,7 @@ are listed with ``<none>''. - mailbox hierarchy. The default is to use the netnews separator - character '.'. */ - --{ "virtdomains", "off", ENUM("off", "userid", "on") } -+{ "virtdomains", "off", ENUM("off", "userid", "ldap", "on") } - /* Enable virtual domain support. If enabled, the user's domain will - be determined by splitting a fully qualified userid at the last '@' - or '%' symbol. If the userid is unqualified, and the virtdomains |