%global version 2.4.22
%global rpmrelease 2
# betarelease is either 0 or something like beta1
%global betarelease 0

%global name cyrus-imapd

# ********************** BUILD TIME OPTIONS START **********************

# To modify parameters, edit the .spec file or build like this:
# rpmbuild --rebuild --define='BDB 1' cyrus-imapd-2.x.x-x.src.rpm

# use saslauth group
%{!?SASLGROUP: %global SASLGROUP 0}
# use preforking cyrus.conf
%{!?PREFORK: %global PREFORK 1}
# enable Netscape hack (recommended)
%{!?NETSCAPEHACK: %global NETSCAPEHACK 1}
# enable IDLED support
%{!?IDLED: %global IDLED 1}
# enable SNMP support
%{!?SNMP: %global SNMP 0}
# include autocreate feature
%{!?AUTOCREATE: %global AUTOCREATE 1}
# include groupcache feature
%{!?GROUPCACHE: %global GROUPCACHE 1}
# don't check for RFC compliant line termination (bare newlines)
%{!?NO_BARE_NL: %global NO_BARE_NL 0}
# used syslog facility for logging
%{!?SYSLOGFACILITY: %global SYSLOGFACILITY MAIL}
# enable MYSQL support
%{!?MYSQL: %global MYSQL 0}
# enable PGSQL support
%{!?PGSQL: %global PGSQL 0}
# enable BDB support
%{!?BDB: %global BDB 0}
# enable SETPROCTITLE support
%{!?SETPROCTITLE: %global SETPROCTITLE 1}

# ********************** BUILD TIME OPTIONS END ************************

%global _acversion 2.71
%global _m4version 1.4.18
%global _use_internal_dependency_generator 0
%global _rhrelease %(eval %{__cat} /etc/redhat-release)

%if %{BDB}
# do we use db3 or db4 ? If we have db4, assume db4, otherwise db3.
%global _dbver %(eval "rpm -q --quiet db4 && echo db4 || echo db3")
%global _dbrpmver %(eval "rpm -q %{_dbver}")
%endif

# old distributions do not have perl_vendor* defined
%{!?perl_vendorarch: %global perl_vendorarch %(eval "$(%{__perl} -V:installvendorarch)"; echo $installvendorarch)}
%{!?perl_vendorlib: %global perl_vendorlib %(eval "$(%{__perl} -V:installvendorlib)"; echo $installvendorlib)}

%global _withldap %(eval "rpm -q --requires openldap | %{__grep} -q ^libsasl2 && echo 1 || echo 0")
# disable -debuginfo package generation
#define debug_package %{nil}
# do we have filesystem with pki location '/etc/pki'?
%global _use_etc_pki %(eval rpm --quiet -qf /etc/pki 2> /dev/null && echo 1 || echo 0 )
%if %{_use_etc_pki}
%global _certs_dir %{_sysconfdir}/pki/tls/certs
%global _pki_dir %{_sysconfdir}/pki/%{name}
%else
%global _certs_dir %{_datadir}/ssl/certs
%global _pki_dir %{_datadir}/ssl/certs
%endif
%global _ssl_pem_file %{_pki_dir}/%{name}.pem
# do we have new pam without pam_stack
%global use_pam_include %(eval [ $(rpm -q --queryformat '%{VERSION}' pam | %{__sed} -e "s/\\.//g") -ge 80 ] && echo 1 || echo 0 )
%global uid 76
%if %{SASLGROUP}
%global gid 76
%global _saslgroup saslauth
%endif
%global _cyrususer cyrus
%global _cyrusgroup mail
%global _vardata %{_var}/lib/imap
%global _spooldata %{_var}/spool/imap
%global _cyrexecdir %{_exec_prefix}/lib/%{name}
%global _confdir master/conf
%global _contribdir doc/contrib
%if %{PREFORK}
%global _cyrusconf %{_confdir}/prefork.conf
%else
%global _cyrusconf %{_confdir}/normal.conf
%endif

Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support
Name: %{name}
Version: %{version}
%if %{betarelease}
Release: 0.%{betarelease}_%{rpmrelease}%{?dist}
%else
Release: %{rpmrelease}%{?dist}
%endif
License: BSD
Group: System Environment/Daemons
URL: http://www.cyrusimap.org/
Packager: Simon Matter <simon.matter@invoca.ch>
Vendor: Invoca Systems
Distribution: Invoca Linux Server
%if %{betarelease}
Source0: http://www.cyrusimap.org/releases/snapshots/%{name}-%{version}%{betarelease}.tar.gz
%else
Source0: https://github.com/cyrusimap/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
%endif
Source1: http://ftp.gnu.org/gnu/autoconf/autoconf-%{_acversion}.tar.gz
Source2: http://ftp.gnu.org/gnu/m4/m4-%{_m4version}.tar.bz2
Source3: cyrus-deliver-wrapper.c
Source4: cyrus-user-procmailrc.template
Source5: cyrus-imapd.logrotate
Source6: cyrus-imapd.imap-2.3.x-conf
Source7: cyrus-imapd.pam-config_stack
Source8: cyrus-imapd.pam-config_include
Source9: http://oss.netfarm.it/download/skiplist.py
Source10: cyrus-imapd-skipfix.sh
Source11: cyrus-imapd.init
Source12: cyrus-imapd.sysconfig
Source13: cyrus-imapd.cvt_cyrusdb_all
Source14: cyrus-imapd.magic
Source15: http://clement.hermann.free.fr/scripts/Cyrus/imapcreate.pl
Source16: http://eu.dl.sourceforge.net/cyrus-utils/cyrus_ldap_quota.pl
Source17: ftp://kalamazoolinux.org/pub/projects/awilliam/cyrus/batchreconstruct
Source18: ftp://kalamazoolinux.org/pub/projects/awilliam/cyrus/bsd2cyrus
Source19: ftp://kalamazoolinux.org/pub/projects/awilliam/cyrus/cpmsg
Source20: ftp://kalamazoolinux.org/pub/projects/awilliam/cyrus/folderxfer
Source21: ftp://kalamazoolinux.org/pub/projects/awilliam/cyrus/inboxfer
Source22: http://email.uoa.gr/download/cyrus/cyrus_sharedbackup/cyrus_sharedbackup-0.1.tar.gz
Source23: cyrus-imapd-README.RPM
Source24: cyrus-imapd-README.HOWTO-recover-mailboxes.db
Source25: cyrus-imapd.cron-daily
Source26: cyrus-procmailrc
Source27: cyrus-imapd-procmail+cyrus.mc
Source28: cyrus-imapd.rpm_set_permissions
Source29: cyrus-imapd-sendmail-8.12.9-cyrusv2.m4
Source30: cyrus-imapd-README.contrib
Source31: cyrus-imapd-README.groupcache
Source32: cyrus-imapd.upd_groupcache
Source33: cyrus-imapd-README.skiplist_recovery
Source34: cyrus-imapd-README.performance-tips
Source35: cyrus-imapd-README.notify_sms
Source36: cyrus-imapd.archive_mboxlist
Source37: cyrus-imapd.run_all_instances
Source38: cyrus-imapd.add_instance
Source39: cyrus-imapd.del_instance
Source40: cyrus-imapd-README.multi-instance
Source41: http://www.ietf.org/rfc/rfc4314.txt
Patch0: cyrus-imapd-2.2.12-no_transfig.patch
Patch1: cyrus-imapd-2.4.20-notify_sms.patch
Patch2: cyrus-imapd-2.1.16-getrlimit.patch
Patch3: http://www.oakton.edu/user/3/jwade/cyrus/cyrus-imapd-2.1.3/cyrus-imapd-2.4.11beta1-flock.patch
Patch4: cyrus-imapd-2.3.11-groupcache.patch
Patch5: cyrus-imapd-2.4.17-config_defaults.patch
Patch6: cyrus-imapd-2.4.17-volatile.patch
Patch7: cyrus-imapd-2.3.11-mkimap.patch
Patch8: cyrus-imapd-2.4.14-authid_normalize.patch
Patch9: cyrus-imapd-2.4.10-appenddomain.patch
Patch10: cyrus-imapd-2.4.4-statuscache_verbosity.patch
Patch11: cyrus-imapd-2.3.12-skiplist_verbosity.patch
Patch12: sieve-min.diff
Patch13: cyrus-imapd-2.4.10-user_deny_verbosity.patch
Patch14: cyrus-imapd-2.3.16-sieve_port.patch
Patch15: cyrus-imapd-2.4.6-expire_config.patch
Patch16: cyrus-imapd-2.3.7-nobarenewlinescheck.patch
Patch17: http://pkgs.fedoraproject.org/cgit/cyrus-imapd.git/plain/cyrus-imapd-2.4.12-debugopt.patch
Patch18: cyrus-imapd-2.4.18-statuscache_volatile.patch
Patch19: cyrus-imapd-2.4.17-tlscache_volatile.patch
Patch20: cyrus-imapd-2.4.19-cyrus_mkdir.patch
Patch21: cyrus-imapd-2.4.20-lmtptarget.patch
Patch90: http://www.vx.sk/download/patches/cyrus-imapd/cyrus-imapd-2.4.19-autocreate-0.10-0.patch
Patch91: http://www.vx.sk/download/patches/cyrus-imapd/cyrus-imapd-2.4.18-autosieve-0.6.0.patch
Patch92: cyrus-imapd-2.4.20-autosieve-CVE-2019-19783.patch
# patches >= 100 are / will be fixed in SCM
Patch100: https://github.com/cyrusimap/cyrus-imapd/commit/c532115a11eb1742ff53ed821685d8d975e2af0f.patch
Patch101: https://github.com/cyrusimap/cyrus-imapd/commit/7c3156bb511b6b84413eead1ffd99bd818bb9b71.patch
Patch102: https://github.com/cyrusimap/cyrus-imapd/commit/d415da7ae571c3854550564a1764e763cc83c921.patch
Patch103: https://github.com/cyrusimap/cyrus-imapd/commit/f63695609c88a3f76129499bb49fb82e8155fb32.patch
Patch104: https://github.com/cyrusimap/cyrus-imapd/commit/833c22bd7de5bbb591c2cb3705c9983b6d2b1fee.patch
# patches >= 1000 are for private build tools
Patch1000: m4-1.4.18-glibc-change-work-around.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: cyrus-sasl-devel >= 2.1.17-1, %{__perl}
BuildRequires: openssl-devel, pkgconfig, pcre-devel, krb5-devel
BuildRequires: flex, bison, groff >= 1.15-8, automake, sed, findutils
BuildRequires: zlib-devel, redhat-rpm-config
BuildRequires: perl(ExtUtils::MakeMaker)
%if %{_withldap}
BuildRequires: openldap-devel
%endif
%if %{SNMP}
BuildRequires: net-snmp-devel
%ifarch %{ix86} x86_64
BuildRequires: lm_sensors-devel
%endif
%endif
%if %{MYSQL}
BuildRequires: mysql-devel
%endif
%if %{PGSQL}
BuildRequires: postgresql-devel
%endif
%if %{BDB}
BuildRequires: %{_dbver}-devel
Requires: %{_dbver}-utils
%endif
Requires(pre,postun): /sbin/service
Requires(post): e2fsprogs, /sbin/chkconfig, /sbin/service, %{__perl}, grep, findutils
Requires(preun): /sbin/chkconfig, /sbin/service
Requires: %{name}-utils = %{version}-%{release}
Requires: cyrus-sasl >= 2.1.17, file >= 3.35-1
Requires: sed, grep, diffutils, findutils, logrotate
Obsoletes: %{name}-murder, %{name}-nntp

%description
The %{name} package contains the core of the Cyrus IMAP server.
It is a scaleable enterprise mail system designed for use from
small to large enterprise environments using standards-based
internet mail technologies.

A full Cyrus IMAP implementation allows a seamless mail and bulletin
board environment to be set up across multiple servers. It differs from
other IMAP server implementations in that it is run on "sealed"
servers, where users are not normally permitted to log in and have no
system account on the server. The mailbox database is stored in parts
of the filesystem that are private to the Cyrus IMAP server. All user
access to mail is through software using the IMAP, POP3 or KPOP
protocols. It also includes support for virtual domains, NNTP,
mailbox annotations, and much more. The private mailbox database design
gives the server large advantages in efficiency, scalability and
administratability. Multiple concurrent read/write connections to the
same mailbox are permitted. The server supports access control lists on
mailboxes and storage quotas on mailbox hierarchies.

The Cyrus IMAP server supports the IMAP4rev1 protocol described
in RFC 3501. IMAP4rev1 has been approved as a proposed standard.
It supports any authentication mechanism available from the SASL
library, imaps/pop3s/nntps (IMAP/POP3/NNTP encrypted using SSL and
TLSv1) can be used for security. The server supports single instance
store where possible when an email message is addressed to multiple
recipients, SIEVE provides server side email filtering.

%package utils
Group: Applications/System
Summary: Cyrus IMAP server administration utilities
Requires(pre): /usr/sbin/groupadd, /usr/sbin/useradd
Requires(post): grep, make, openssl
Requires(postun): /usr/sbin/userdel, /usr/sbin/groupdel, grep
Obsoletes: %{name}-perl, perl-Cyrus

%description utils
The %{name}-utils package contains administrative tools for the
Cyrus IMAP server. It can be installed on systems other than the
one running the server.

%package devel
Group: Development/Libraries
Summary: Cyrus IMAP server development files
Provides: %{name}-static = %{version}-%{release}

%description devel
The %{name}-devel package contains header files and libraries
necessary for developing applications which use the imclient library.

%prep
%if %{betarelease}
%setup -q -a 1 -a 2 -n %{name}-%{version}%{betarelease}
%else
%setup -q -a 1 -a 2 -n %{name}-%{version}
%endif

# preserve dist options
%{__cp} -a lib/imapoptions lib/imapoptions.dist

# apply SCM patches first, other patches my depend on them
%patch100 -p1 -b .c532115a11eb1742ff53ed821685d8d975e2af0f
%patch101 -p1 -b .7c3156bb511b6b84413eead1ffd99bd818bb9b71
%patch102 -p1 -b .d415da7ae571c3854550564a1764e763cc83c921
%patch103 -p1 -b .f63695609c88a3f76129499bb49fb82e8155fb32
%patch104 -p1 -b .833c22bd7de5bbb591c2cb3705c9983b6d2b1fee

# apply private build tools patches
# m4
%patch1000 -p0 -b .glibc-change-work-around

# do all other patches
%patch0 -p1 -b .no_transfig
%patch1 -p1 -b .notify_sms
%patch2 -p1 -b .getrlimit
%patch3 -p1 -b .flock
%if %{GROUPCACHE}
%patch4 -p1 -b .groupcache
%endif
%patch5 -p1 -b .config_defaults
%patch6 -p1 -b .volatile
%patch7 -p1
%patch8 -p1 -b .authid_normalize
%patch9 -p1 -b .appenddomain
%patch10 -p1 -b .statuscache_verbosity
%patch11 -p1 -b .skiplist_verbosity
%patch12 -p1 -b .sieve-min
%patch13 -p1 -b .user_deny_verbosity
%patch14 -p1 -b .sieve_port
%patch15 -p1 -b .expire_config
%if %{NO_BARE_NL}
%patch16 -p1 -b .nobarenewlinescheck
%endif
%patch17 -p1 -b .debugopt
%patch18 -p1 -b .statuscache_volatile
%patch19 -p1 -b .tlscache_volatile
%patch20 -p1 -b .cyrus_mkdir
%patch21 -p1 -b .lmtptarget
%if %{AUTOCREATE}
%patch90 -p1 -b .autocreate
%patch91 -p1 -b .autosieve
%patch92 -p1 -b .autosieve-CVE-2019-19783
%endif

# preserve timestamp of the files for different builds
find . -type f -mtime -1 -exec touch -r %{SOURCE0} {} \;

%build
# build and use private build tools
buildtools=$(pwd)/buildtools-instroot
PATH=${buildtools}/bin:${PATH}
# m4
pushd m4-%{_m4version}
  ./configure --prefix=${buildtools}
  %{__make} all install
popd
# autoconf
pushd autoconf-%{_acversion}
  ./configure --prefix=${buildtools}
  %{__make} all install
popd

%{__aclocal} -I cmulocal
%{__autoheader} --force
%{__autoconf} --force

CPPFLAGS="-I%{_includedir}/et"; export CPPFLAGS
CFLAGS="%{optflags} -fPIC -fno-strict-aliasing"; export CFLAGS
CCDLFLAGS="-rdynamic"; export CCDLFLAGS
LDFLAGS="-Wl,-z,relro,-z,now"; export LDFLAGS

if pkg-config openssl; then
  CPPFLAGS="$CPPFLAGS $(pkg-config --cflags-only-I openssl)"; export CPPFLAGS
  CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"; export CFLAGS
  LDFLAGS="$LDFLAGS $(pkg-config --libs-only-L openssl)"; export LDFLAGS
fi

if pcre-config --version; then
  CPPFLAGS="$CPPFLAGS $(pcre-config --cflags-posix)"; export CPPFLAGS
  CFLAGS="$CFLAGS $(pcre-config --cflags-posix)"; export CFLAGS
  LDFLAGS="$LDFLAGS $(pcre-config --libs-posix)"; export LDFLAGS
fi

%ifnarch ppc ppc64
LDFLAGS="$LDFLAGS -pie"; export LDFLAGS
%endif

%if %{SETPROCTITLE}
CFLAGS="$CFLAGS -DUSE_SETPROCTITLE"; export CFLAGS
%endif

%{configure} \
%if %{NETSCAPEHACK}
  --enable-netscapehack \
%endif
%if %{IDLED}
  --enable-idled \
%endif
%if %{_withldap}
  --with-ldap \
%endif
%if %{SNMP}
  --with-snmp \
%else
  --without-snmp \
%endif
%if %{MYSQL}
  --with-mysql \
  --with-mysql-libdir=%{_libdir}/mysql \
  --with-mysql-incdir=%{_includedir}/mysql \
%endif
%if %{PGSQL}
  --with-pgsql=%{_includedir}/pgsql \
%endif
%if %{BDB}
  --with-bdb-incdir=%{_includedir}/%{_dbver} \
%else
  --without-bdb \
%endif
  --enable-murder \
  --enable-replication \
  --enable-nntp \
  --with-perl=%{__perl} \
  --with-cyrus-prefix=%{_cyrexecdir} \
  --with-service-path=%{_cyrexecdir} \
  --with-extraident="Invoca-RPM-%{rpmrelease}" \
  --with-syslogfacility=%{SYSLOGFACILITY} \
  --without-libwrap \
  --disable-static

%{__make} clean
%{__make} -C man -f Makefile.dist
%{__make} -C doc -f Makefile.dist
%{__make}
%{__make} -C notifyd notifytest
%{__cc} $CFLAGS -DLIBEXECDIR=\"%{_cyrexecdir}\" -Wall -o deliver-wrapper %{SOURCE3}

# modify docs master --> cyrus-master
pushd man
  %{__perl} -pi -e "s@master\(8\)@cyrus-master(8)@" $(ls *5 *8)
popd
pushd doc
  %{__perl} -pi -e "s@master@cyrus-master@g;" man.html
popd
pushd doc/man
  %{__perl} -pi -e "s@master\(8\)@cyrus-master(8)@;" $(ls *html)
popd

# modify path in perl scripts
%{__perl} -pi -e "s@/usr/local/bin/perl@%{__perl}@" $(find . -type f -name "*.pl")

# fix permissions on perl programs
find . -type f -name "*.pl" -exec %{__chmod} 0755 {} \;

# cleanup of doc dir
find doc perl -depth -name CVS -type d -exec %{__rm} -rf {} \;
find doc perl -name .cvsignore -type f -exec %{__rm} -f {} \;
find doc -name "*~" -type f -exec %{__rm} -f {} \;
find doc -name "*.html.*" -type f -exec %{__rm} -f {} \;
%{__rm} -f doc/Makefile.dist*
%{__rm} -f doc/text/htmlstrip.c
find doc -type f -exec %{__chmod} 0644 {} \;

# create README.buildoptions
%{__cat} << EOF >> doc/README.buildoptions
This RPM has been built on %{_rhrelease} using the following options:

use saslauth group
SASLGROUP       : %{SASLGROUP}

use preforking cyrus.conf
PREFORK         : %{PREFORK}

enable Netscape hack (recommended)
NETSCAPEHACK    : %{NETSCAPEHACK}

enable IDLED support
IDLED           : %{IDLED}

enable SNMP support
SNMP            : %{SNMP}

include autocreate feature
AUTOCREATE      : %{AUTOCREATE}

include groupcache feature
GROUPCACHE      : %{GROUPCACHE}

include nobarenewlinescheck patch
NO_BARE_NL      : %{NO_BARE_NL}

used syslog facility for logging
SYSLOGFACILITY  : %{SYSLOGFACILITY}

enable MYSQL support
MYSQL           : %{MYSQL}

enable PGSQL support
PGSQL           : %{PGSQL}

enable BDB support
BDB             : %{BDB}

%if %{BDB}
Berkeley DB version
(autodetected)  : %{_dbrpmver}

%endif
enable LDAP support
(autodetected)  : %{_withldap}


To modify parameters, edit the .spec file or build like this:
rpmbuild --rebuild --define='BDB 1' %{name}-%{version}-%{release}.src.rpm
EOF

%{__install} -m 0644 -p %{SOURCE23}     doc/README.RPM
%{__install} -m 0644 -p %{SOURCE24}     doc/README.HOWTO-recover-mailboxes.db
%if %{GROUPCACHE}
%{__install} -m 0644 -p %{SOURCE31}     doc/README.groupcache
%endif
%{__install} -m 0644 -p %{SOURCE33}     doc/README.skiplist_recovery
%{__install} -m 0644 -p %{SOURCE34}     doc/README.performance-tips
%{__install} -m 0644 -p %{SOURCE35}     doc/README.notify_sms
%{__install} -m 0644 -p %{SOURCE40}     doc/README.multi-instance
%{__install} -d doc/m4
%{__install} -m 0644 -p %{SOURCE26}     doc/m4/cyrus-procmailrc
%{__install} -m 0644 -p %{SOURCE4}      doc/m4/cyrus-user-procmailrc.template
%{__install} -m 0644 -p %{SOURCE27}     doc/m4/%{name}-procmail+cyrus.mc
%{__install} -m 0644 -p %{SOURCE29}     doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
%{__install} -d doc/rfc
%{__install} -m 0644 -p %{SOURCE41}     doc/rfc/rfc4314.txt
%if %{AUTOCREATE}
%{__install} -m 0644 -p README.autocreate      doc/
%{__install} -m 0644 -p README.autosievefolder doc/
%endif

# modify lmtp socket path in .conf files
%{__perl} -pi -e "s@/var/imap/@%{_vardata}/@" %{_confdir}/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4

# enable/disable idled in .conf files to prevent error messages
%if %{IDLED}
  %{__perl} -pi -e "s/#  idled/  idled/" %{_confdir}/*.conf
%else
  %{__perl} -pi -e "s/  idled/#  idled/" %{_confdir}/*.conf
%endif

%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

pushd perl/imap
  %{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
popd
pushd perl/sieve/managesieve
  %{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
popd
%{__make}        install DESTDIR=%{buildroot} INSTALL="install -p" PREFIX=%{_prefix} mandir=%{_mandir}
%{__make} -C man install DESTDIR=%{buildroot} INSTALL="install -p" PREFIX=%{_prefix} mandir=%{_mandir}

%{__install} -m 2755 -p deliver-wrapper         %{buildroot}%{_cyrexecdir}/
%{__install} -m 0755 -p imtest/imtest           %{buildroot}%{_bindir}/
%{__install} -m 0755 -p notifyd/notifytest      %{buildroot}%{_bindir}/
%{__install} -m 0755 -p perl/imap/cyradm        %{buildroot}%{_bindir}/

# install tools
%{__rm} -f tools/*.orig
for tool in tools/*; do
  test -f ${tool} && %{__install} -m 0755 -p ${tool} %{buildroot}%{_cyrexecdir}/
done

# create directories
%{__install} -d \
  %{buildroot}%{_sysconfdir}/{logrotate.d,pam.d,sysconfig,cron.daily} \
  %{buildroot}%{_initrddir} \
  %{buildroot}%{_libdir}/sasl \
  %{buildroot}%{_spooldata}/stage. \
  %{buildroot}%{_vardata}/{user,quota,log,msg,socket,db,db.backup1,db.backup2,sieve,sync,rpm,backup,meta,volatile} \
%if %{_withldap}
  %{buildroot}%{_vardata}/ptclient \
%endif
  %{buildroot}%{_datadir}/%{name}/rpm \
  %{buildroot}%{_cyrexecdir}/rpm \
  %{buildroot}%{_pki_dir} \
  %{_contribdir}

# install additional files
%{__install} -m 0755 -p %{SOURCE13}   %{buildroot}%{_cyrexecdir}/rpm/cvt_cyrusdb_all
%if %{GROUPCACHE}
%{__install} -m 0755 -p %{SOURCE32}   %{buildroot}%{_cyrexecdir}/rpm/upd_groupcache
%endif
%{__install} -m 0755 -p %{SOURCE28}   %{buildroot}%{_cyrexecdir}/rpm/rpm_set_permissions
%{__install} -m 0755 -p %{SOURCE36}   %{buildroot}%{_cyrexecdir}/rpm/archive_mboxlist
%{__install} -m 0755 -p %{SOURCE37}   %{buildroot}%{_cyrexecdir}/rpm/run_all_instances
%{__install} -m 0755 -p %{SOURCE38}   %{buildroot}%{_cyrexecdir}/rpm/add_instance
%{__install} -m 0755 -p %{SOURCE39}   %{buildroot}%{_cyrexecdir}/rpm/del_instance
pushd %{buildroot}%{_cyrexecdir}
for script in rpm/*; do
  %{__ln_s} $script .
done
popd
%{__install} -m 0644 -p %{SOURCE14}   %{buildroot}%{_datadir}/%{name}/rpm/magic
%{__install} -m 0644 -p %{SOURCE15}   %{_contribdir}/imapcreate
%{__install} -m 0644 -p %{SOURCE16}   %{_contribdir}/cyrus_ldap_quota
%{__install} -m 0644 -p %{SOURCE17}   %{_contribdir}/batchreconstruct
%{__install} -m 0644 -p %{SOURCE18}   %{_contribdir}/bsd2cyrus
%{__install} -m 0644 -p %{SOURCE19}   %{_contribdir}/cpmsg
%{__install} -m 0644 -p %{SOURCE20}   %{_contribdir}/folderxfer
%{__install} -m 0644 -p %{SOURCE21}   %{_contribdir}/inboxfer
%{__install} -m 0644 -p %{SOURCE22}   %{_contribdir}/
%{__install} -m 0644 -p %{SOURCE30}   %{_contribdir}/README
%{__install} -m 0644 -p %{SOURCE9}    %{_contribdir}/
%{__install} -m 0644 -p %{SOURCE10}   %{_contribdir}/skipfix.sh

# install config files
%{__install} -m 0644 -p %{_cyrusconf} %{buildroot}%{_sysconfdir}/cyrus.conf
%{__install} -m 0644 -p %{SOURCE6}    %{buildroot}%{_sysconfdir}/imapd.conf
%{__install} -m 0644 -p %{SOURCE12}   %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -m 0644 -p %{SOURCE5}    %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -m 0755 -p %{SOURCE25}   %{buildroot}%{_sysconfdir}/cron.daily/%{name}
%{__install} -m 0755 -p %{SOURCE11}   %{buildroot}%{_initrddir}/%{name}
%if %{use_pam_include}
%global pam_cfg %{SOURCE8}
%else
%global pam_cfg %{SOURCE7}
%endif
%{__install} -m 0644 -p %{pam_cfg}    %{buildroot}%{_sysconfdir}/pam.d/pop
%{__install} -m 0644 -p %{pam_cfg}    %{buildroot}%{_sysconfdir}/pam.d/imap
%{__install} -m 0644 -p %{pam_cfg}    %{buildroot}%{_sysconfdir}/pam.d/sieve
%{__install} -m 0644 -p %{pam_cfg}    %{buildroot}%{_sysconfdir}/pam.d/mupdate
%{__install} -m 0644 -p %{pam_cfg}    %{buildroot}%{_sysconfdir}/pam.d/lmtp
%{__install} -m 0644 -p %{pam_cfg}    %{buildroot}%{_sysconfdir}/pam.d/nntp
%{__install} -m 0644 -p %{pam_cfg}    %{buildroot}%{_sysconfdir}/pam.d/csync

# install templates
%{__install} -d doc/conf
%{__install} -m 0644 -p %{_confdir}/*.conf doc/conf/

# generate imapd.conf.*
%{__cp} -a lib/imapoptions lib/imapoptions.default
for config in dist default; do
  { %{__grep} "^\{\ " lib/imapoptions.${config} | \
    cut -d"," -f1,2 | \
    %{__sed} \
      -e "s@^{\ \"@@g" \
      -e "s@\",\ @: @" \
      -e "s@\ NULL@@" \
      -e "s@\ \"@ @" \
      -e "s@\ \"@@" \
      -e "s@\"\$@@" | \
    sort
  } > %{buildroot}%{_datadir}/%{name}/rpm/imapd.conf.${config}
done

# generate db.cfg
{ %{__grep} "^\{\ " lib/imapoptions | \
  %{__grep} "_db" | \
  %{__sed} \
    -e "s@^{\ \"@@g" \
    -e "s@\",\ @=@" \
    -e "s@NULL@\"\"@" | \
  cut -d"," -f1 | \
  sort
  echo sieve_version=\"$(%{__grep} "^#define\ SIEVE_VERSION\ " sieve/sieve_interface.h | cut -d"\"" -f2 | %{__sed} -e "s@\ @_@g")\"
} > %{buildroot}%{_datadir}/%{name}/rpm/db.cfg

# generate build.cfg
{ echo with_idled=\"%{IDLED}\"
  echo with_snmp=\"%{SNMP}\"
  echo with_groupcache=\"%{GROUPCACHE}\"
  echo with_syslogfacility=\"%{SYSLOGFACILITY}\"
  echo with_mysql=\"%{MYSQL}\"
  echo with_pgsql=\"%{PGSQL}\"
  echo with_ldap=\"%{_withldap}\"
  echo with_bdb=\"%{BDB}\"
} > %{buildroot}%{_datadir}/%{name}/rpm/build.cfg

# create the ghost pem file
touch %{buildroot}%{_ssl_pem_file}
%if %{_use_etc_pki}
# change config file so ssl certificates are under /etc rather than /usr/share
# preserve timestamp of the files
%{__cp} -a %{buildroot}%{_sysconfdir}/imapd.conf %{buildroot}%{_sysconfdir}/imapd.conf.pki.$$
%{__perl} -pi -e \
's@/usr/share/ssl/certs/%{name}.pem@%{_ssl_pem_file}@g; \
 s@/usr/share/ssl/certs/ca-bundle.crt@%{_certs_dir}/ca-bundle.crt@' \
 %{buildroot}%{_sysconfdir}/imapd.conf.pki.$$
%{__perl} -pi -e \
's@/usr/share/ssl/certs/@%{_certs_dir}/@g' \
 %{buildroot}%{_sysconfdir}/imapd.conf.pki.$$
touch -r %{buildroot}%{_sysconfdir}/imapd.conf %{buildroot}%{_sysconfdir}/imapd.conf.pki.$$
%{__mv} -f %{buildroot}%{_sysconfdir}/imapd.conf.pki.$$ %{buildroot}%{_sysconfdir}/imapd.conf
%endif

# rename 'master' binary and manpage to avoid crash with postfix
%{__mv} -f %{buildroot}%{_cyrexecdir}/master         %{buildroot}%{_cyrexecdir}/cyrus-master
%{__mv} -f %{buildroot}%{_mandir}/man8/master.8      %{buildroot}%{_mandir}/man8/cyrus-master.8
%{__mv} -f doc/man/master.8.html                     doc/man/cyrus-master.8.html
%{__perl} -pi -e 's/master/cyrus-master/g'           %{buildroot}%{_mandir}/man8/cyrus-master.8
%{__perl} -pi -e 's/cyrus-cyrus/cyrus/g'             %{buildroot}%{_mandir}/man8/cyrus-master.8
%{__perl} -pi -e 's/Master/Cyrus-master/g'           %{buildroot}%{_mandir}/man8/cyrus-master.8
%{__perl} -pi -e 's/MASTER/CYRUS-MASTER/g'           %{buildroot}%{_mandir}/man8/cyrus-master.8
%{__perl} -pi -e 's/master/cyrus-master/g'           doc/man/cyrus-master.8.html
%{__perl} -pi -e 's/cyrus-cyrus/cyrus/g'             doc/man/cyrus-master.8.html
%{__perl} -pi -e 's/Master/Cyrus-master/g'           doc/man/cyrus-master.8.html
%{__perl} -pi -e 's/MASTER/CYRUS-MASTER/g'           doc/man/cyrus-master.8.html

# rename 'fetchnews' binary and manpage to avoid crash with leafnode
%{__mv} -f %{buildroot}%{_cyrexecdir}/fetchnews      %{buildroot}%{_cyrexecdir}/cyrfetchnews
%{__mv} -f %{buildroot}%{_mandir}/man8/fetchnews.8   %{buildroot}%{_mandir}/man8/cyrfetchnews.8
%{__mv} -f doc/man/fetchnews.8.html                  doc/man/cyrfetchnews.8.html
%{__perl} -pi -e 's/fetchnews/cyrfetchnews/g'        %{buildroot}%{_mandir}/man8/cyrfetchnews.8
%{__perl} -pi -e 's/Fetchnews/Cyrfetchnews/g'        %{buildroot}%{_mandir}/man8/cyrfetchnews.8
%{__perl} -pi -e 's/FETCHNEWS/CYRFETCHNEWS/g'        %{buildroot}%{_mandir}/man8/cyrfetchnews.8
%{__perl} -pi -e 's/fetchnews/cyrfetchnews/g'        doc/man/cyrfetchnews.8.html
%{__perl} -pi -e 's/Fetchnews/Cyrfetchnews/g'        doc/man/cyrfetchnews.8.html
%{__perl} -pi -e 's/FETCHNEWS/CYRFETCHNEWS/g'        doc/man/cyrfetchnews.8.html

# remove installed but not packaged files
%{__rm} -f %{buildroot}%{_cyrexecdir}/not-mkdep
%{__rm} -f %{buildroot}%{_cyrexecdir}/config2header*
%{__rm} -f %{buildroot}%{_cyrexecdir}/config2man

%{__rm} -f %{buildroot}%{_cyrexecdir}/proxyd
%{__ln_s} imapd %{buildroot}%{_cyrexecdir}/proxyd
%{__rm} -f %{buildroot}%{_cyrexecdir}/pop3proxyd
%{__ln_s} pop3d %{buildroot}%{_cyrexecdir}/pop3proxyd
%{__rm} -f %{buildroot}%{_cyrexecdir}/lmtpproxyd
%{__ln_s} lmtpd %{buildroot}%{_cyrexecdir}/lmtpproxyd

find %{buildroot}%{_libdir} -type f -name "perllocal.pod" -exec %{__rm} -f {} \;
find %{buildroot}%{perl_vendorarch} -type f -name ".packlist" -exec %{__rm} -f {} \;
find %{buildroot}%{perl_vendorarch} -type f -name "*.bs" -exec %{__rm} -f {} \;
find %{buildroot}%{perl_vendorarch} -type f -name "*.pm.*" -exec %{__rm} -f {} \;

# fix permissions
find %{buildroot}%{perl_vendorarch} -type f -name "*.so" -exec %{__chmod} 0755 {} \;
%{__chmod} -R u+w %{buildroot}%{perl_vendorarch}
%{__chmod} -R u+w %{buildroot}%{_mandir}
%{__chmod} 0644 perl/imap/examples/*

%if !%{IDLED}
%{__rm} -f %{buildroot}%{_mandir}/man8/idled.8*
%{__rm} -f doc/man/idled.8.html
%endif
%{__rm} -f doc/text/Makefile
%{__rm} -f %{buildroot}%{_mandir}/man8/syncnews.8*
%{__rm} -f doc/man/syncnews.8.html

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%pre
for INSTANCE in %{_initrddir}/%{name}*; do
  INSTANCE=${INSTANCE##*/}
  INSTANCE=${INSTANCE/%{name}}
  CYRUSCONF=/etc/cyrus${INSTANCE}.conf
  IMAPDCONF=/etc/imapd${INSTANCE}.conf
  if [ -n "$INSTANCE" ]; then
    [ -L /etc/rc.d/init.d/%{name}${INSTANCE} ] || continue
  fi
  [ -f $CYRUSCONF ] || continue
  [ -f $IMAPDCONF ] || continue
  # let postun know whether cyrus-imapd was running
  if [ -f /var/lock/subsys/%{name}${INSTANCE} ]; then
    /sbin/service %{name}${INSTANCE} stop > /dev/null 2>&1 || :
    touch /var/lock/subsys/%{name}${INSTANCE}
  fi
done

%post
/sbin/chkconfig --add %{name}

# force synchronous updates, usually only on ext2 filesystems
for i in %{_vardata} %{_spooldata}
do
  if [ $(find $i -maxdepth 0 -printf %%F) = "ext2" ]; then
    chattr -R +S $i 2> /dev/null
  fi
done

# "ctl_deliver -E" is deprecated, now is "cyr_expire -E"
if %{__grep} -q "ctl_deliver *-E" %{_sysconfdir}/cyrus.conf; then
  %{__perl} -pi -e "s/ctl_deliver *-E/cyr_expire -E/" %{_sysconfdir}/cyrus.conf
fi

# prevent idled related errors to show up
%if %{IDLED}
  if %{__grep} -q "^#  idled" %{_sysconfdir}/cyrus.conf; then
    %{__perl} -pi -e "s/^#  idled/  idled/" %{_sysconfdir}/cyrus.conf
  fi
%else
  if %{__grep} -q "^  idled" %{_sysconfdir}/cyrus.conf; then
    %{__perl} -pi -e "s/^  idled/#  idled/" %{_sysconfdir}/cyrus.conf
  fi
%endif

%if %{_use_etc_pki}
# change existing config so ssl certificates are under /etc rather than /usr/share
# preserve timestamp of the files
if %{__grep} -q "\/usr\/share\/ssl\/certs\/" %{_sysconfdir}/imapd.conf; then
  %{__cp} -a %{_sysconfdir}/imapd.conf %{_sysconfdir}/imapd.conf.pki.$$
  %{__perl} -pi -e \
  's@/usr/share/ssl/certs/%{name}.pem@%{_ssl_pem_file}@g; \
   s@/usr/share/ssl/certs/ca-bundle.crt@%{_certs_dir}/ca-bundle.crt@' \
   %{_sysconfdir}/imapd.conf.pki.$$
  %{__perl} -pi -e \
  's@/usr/share/ssl/certs/@%{_certs_dir}/@g' \
   %{_sysconfdir}/imapd.conf.pki.$$
  touch -r %{_sysconfdir}/imapd.conf %{_sysconfdir}/imapd.conf.pki.$$
  %{__mv} -f %{_sysconfdir}/imapd.conf.pki.$$ %{_sysconfdir}/imapd.conf
fi
%endif

%preun
if [ $1 -eq 0 ]; then
  for INSTANCE in %{_initrddir}/%{name}*; do
    INSTANCE=${INSTANCE##*/}
    INSTANCE=${INSTANCE/%{name}}
    CYRUSCONF=/etc/cyrus${INSTANCE}.conf
    IMAPDCONF=/etc/imapd${INSTANCE}.conf
    if [ -n "$INSTANCE" ]; then
      [ -L /etc/rc.d/init.d/%{name}${INSTANCE} ] || continue
    fi
    [ -f $CYRUSCONF ] || continue
    [ -f $IMAPDCONF ] || continue
    /sbin/service %{name}${INSTANCE} stop > /dev/null 2>&1 || :
    /sbin/chkconfig --del %{name}${INSTANCE}
    %{__rm} -f %{_vardata}${INSTANCE}/socket/* 2> /dev/null
%if %{_withldap}
    %{__rm} -f %{_vardata}${INSTANCE}/ptclient/ptsock 2> /dev/null
%endif
  done
fi

%postun
if [ $1 -ge 1 ]; then
  for INSTANCE in %{_initrddir}/%{name}*; do
    INSTANCE=${INSTANCE##*/}
    INSTANCE=${INSTANCE/%{name}}
    CYRUSCONF=/etc/cyrus${INSTANCE}.conf
    IMAPDCONF=/etc/imapd${INSTANCE}.conf
    if [ -n "$INSTANCE" ]; then
      [ -L /etc/rc.d/init.d/%{name}${INSTANCE} ] || continue
    fi
    [ -f $CYRUSCONF ] || continue
    [ -f $IMAPDCONF ] || continue
    /sbin/service %{name}${INSTANCE} condrestart > /dev/null 2>&1 || :
  done
fi

%pre utils
# create 'cyrus' user on target host
%if %{SASLGROUP}
getent group %{_saslgroup} > /dev/null || %{_sbindir}/groupadd -g %{gid} -r %{_saslgroup} 2> /dev/null || :
getent passwd %{_cyrususer} > /dev/null || \
  %{_sbindir}/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
  -G %{_saslgroup} -s /bin/bash -u %{uid} -r %{_cyrususer} 2> /dev/null || :
%else
getent passwd %{_cyrususer} > /dev/null || \
  %{_sbindir}/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
  -s /bin/bash -u %{uid} -r %{_cyrususer} 2> /dev/null || :
%endif

%post utils
# create SSL certificates
exec > /dev/null 2> /dev/null
%if %{_use_etc_pki}
# if the certificate is only in the old location, move it to the new location
if [ -f %{_datadir}/ssl/certs/%{name}.pem -a ! -f %{_ssl_pem_file} ]; then
%{__mv} %{_datadir}/ssl/certs/%{name}.pem %{_ssl_pem_file}
fi
%endif
if [ ! -f %{_ssl_pem_file} ]; then
pushd %{_certs_dir}
umask 0077
%{__cat} << EOF | %{__make} %{name}.pem
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
localhost.localdomain
root@localhost.localdomain
EOF
%{__chown} root.%{_cyrusgroup} %{name}.pem
%{__chmod} 640 %{name}.pem
%if %{_use_etc_pki}
%{__mv} %{name}.pem %{_ssl_pem_file}
%endif
popd
fi

# add service entries as needed
if ! %{__grep} -q ^lmtp %{_sysconfdir}/services; then
  echo -e 'lmtp\t\t24/tcp\t\t\t\t# LMTP Mail Delivery' >> %{_sysconfdir}/services
  echo -e 'lmtp\t\t24/udp\t\t\t\t# LMTP Mail Delivery' >> %{_sysconfdir}/services
fi
if ! %{__grep} -q ^nntps %{_sysconfdir}/services; then
  echo -e 'nntps\t\t563/tcp\t\t\t\t# NNTP over SSL' >> %{_sysconfdir}/services
  echo -e 'nntps\t\t563/udp\t\t\t\t# NNTP over SSL' >> %{_sysconfdir}/services
fi
if ! %{__grep} -q ^pop3s %{_sysconfdir}/services; then
  echo -e 'pop3s\t\t995/tcp\t\t\t\t# POP-3 over SSL' >> %{_sysconfdir}/services
  echo -e 'pop3s\t\t995/udp\t\t\t\t# POP-3 over SSL' >> %{_sysconfdir}/services
fi
if ! %{__grep} -q ^imaps %{_sysconfdir}/services; then
  echo -e 'imaps\t\t993/tcp\t\t\t\t# IMAP over SSL' >> %{_sysconfdir}/services
  echo -e 'imaps\t\t993/udp\t\t\t\t# IMAP over SSL' >> %{_sysconfdir}/services
fi
if ! %{__grep} -q ^csync %{_sysconfdir}/services; then
  echo -e 'csync\t\t2005/tcp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
  echo -e 'csync\t\t2005/udp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
fi
if ! %{__grep} -q ^mupdate %{_sysconfdir}/services; then
  echo -e 'mupdate\t\t3905/tcp\t\t\t# Mailbox Update (MUPDATE) protocol' >> %{_sysconfdir}/services
  echo -e 'mupdate\t\t3905/udp\t\t\t# Mailbox Update (MUPDATE) protocol' >> %{_sysconfdir}/services
fi
if ! %{__grep} -q ^sieve %{_sysconfdir}/services; then
  echo -e 'sieve\t\t4190/tcp\t\t\t# ManageSieve Protocol' >> %{_sysconfdir}/services
fi
if ! %{__grep} -q ^fud %{_sysconfdir}/services; then
  echo -e 'fud\t\t4201/udp\t\t\t# Cyrus IMAP FUD Daemon' >> %{_sysconfdir}/services
fi

%postun utils
if [ $1 = 0 ]; then
  %{_sbindir}/userdel %{_cyrususer} 2> /dev/null || :
%if %{SASLGROUP}
  if [ "$(%{__grep} ^%{_saslgroup}: %{_sysconfdir}/group | cut -d: -f4-)" = "" ]; then
    %{_sbindir}/groupdel %{_saslgroup} 2> /dev/null || :
  fi
%endif
fi

%files
%defattr(-,root,root,-)
%doc COPYRIGHT README
%doc doc/*
%config(noreplace) %{_sysconfdir}/cyrus.conf
%config(noreplace) %{_sysconfdir}/imapd.conf
%attr(0755,root,root) %config %{_initrddir}/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/pam.d/pop
%config(noreplace) %{_sysconfdir}/pam.d/imap
%config(noreplace) %{_sysconfdir}/pam.d/sieve
%config(noreplace) %{_sysconfdir}/pam.d/lmtp
%config(noreplace) %{_sysconfdir}/pam.d/mupdate
%config(noreplace) %{_sysconfdir}/pam.d/csync
%config(noreplace) %{_sysconfdir}/pam.d/nntp
%attr(0755,root,root) %config %{_sysconfdir}/cron.daily/%{name}
%dir %{_cyrexecdir}
%attr(0755,root,root) %{_cyrexecdir}/arbitron
%attr(0755,root,root) %{_cyrexecdir}/arbitronsort.pl
%attr(0755,root,root) %{_cyrexecdir}/chk_cyrus
%attr(0755,root,root) %{_cyrexecdir}/convert-sieve.pl
%attr(0755,root,root) %{_cyrexecdir}/ctl_cyrusdb
%attr(0755,root,root) %{_cyrexecdir}/ctl_deliver
%attr(0755,root,root) %{_cyrexecdir}/ctl_mboxlist
%attr(0755,root,root) %{_cyrexecdir}/cvt_cyrusdb
%attr(0755,root,root) %{_cyrexecdir}/cyr_dbtool
%attr(0755,root,root) %{_cyrexecdir}/cyr_df
%attr(0755,root,root) %{_cyrexecdir}/cyr_expire
%attr(0755,root,root) %{_cyrexecdir}/cyr_sequence
%attr(0755,root,root) %{_cyrexecdir}/cyr_synclog
%attr(0755,root,root) %{_cyrexecdir}/cyr_userseen
%attr(0755,root,root) %{_cyrexecdir}/cyrdump
%attr(0755,root,root) %{_cyrexecdir}/cyrus-master
%attr(0755,root,root) %{_cyrexecdir}/deliver
%attr(0755,root,root) %{_cyrexecdir}/dohash
%attr(0755,root,root) %{_cyrexecdir}/fud
%attr(0755,root,root) %{_cyrexecdir}/imapd
%attr(0755,root,root) %{_cyrexecdir}/ipurge
%attr(0755,root,root) %{_cyrexecdir}/lmtpd
%attr(0755,root,root) %{_cyrexecdir}/masssievec
%attr(0755,root,root) %{_cyrexecdir}/mbexamine
%attr(0755,root,root) %{_cyrexecdir}/mbpath
%attr(0755,root,root) %{_cyrexecdir}/migrate-metadata
%attr(0755,root,root) %{_cyrexecdir}/mkimap
%attr(0755,root,root) %{_cyrexecdir}/mknewsgroups
%attr(0755,root,root) %{_cyrexecdir}/notifyd
%attr(0755,root,root) %{_cyrexecdir}/pop3d
%attr(0755,root,root) %{_cyrexecdir}/quota
%attr(0755,root,root) %{_cyrexecdir}/reconstruct
%attr(0755,root,root) %{_cyrexecdir}/rehash
%attr(0755,root,root) %{_cyrexecdir}/sievec
%attr(0755,root,root) %{_cyrexecdir}/sieved
%attr(0755,root,root) %{_cyrexecdir}/smmapd
%attr(0755,root,root) %{_cyrexecdir}/squatter
%attr(0755,root,root) %{_cyrexecdir}/timsieved
%attr(0755,root,root) %{_cyrexecdir}/tls_prune
%attr(0755,root,root) %{_cyrexecdir}/translatesieve
%attr(0755,root,root) %{_cyrexecdir}/undohash
%attr(0755,root,root) %{_cyrexecdir}/unexpunge
%attr(0755,root,root) %{_cyrexecdir}/upgradesieve
%if %{IDLED}
%attr(0755,root,root) %{_cyrexecdir}/idled
%endif
%if %{AUTOCREATE}
%attr(0755,root,root) %{_cyrexecdir}/compile_sieve
%endif
%attr(0755,root,root) %{_cyrexecdir}/mupdate
%attr(0755,root,root) %{_cyrexecdir}/mupdate-loadgen.pl
%{_cyrexecdir}/proxyd
%{_cyrexecdir}/pop3proxyd
%{_cyrexecdir}/lmtpproxyd
%attr(0755,root,root) %{_cyrexecdir}/sync_client
%attr(0755,root,root) %{_cyrexecdir}/sync_reset
%attr(0755,root,root) %{_cyrexecdir}/sync_server
%attr(0755,root,root) %{_cyrexecdir}/cyrfetchnews
%attr(0755,root,root) %{_cyrexecdir}/nntpd
%if %{_withldap}
%attr(0755,root,root) %{_cyrexecdir}/ptdump
%attr(0755,root,root) %{_cyrexecdir}/ptexpire
%attr(0755,root,root) %{_cyrexecdir}/ptloader
%endif
%attr(2755,%{_cyrususer},%{_cyrusgroup}) %{_cyrexecdir}/deliver-wrapper
%dir %{_cyrexecdir}/rpm
%attr(0755,root,root) %{_cyrexecdir}/rpm/cvt_cyrusdb_all
%attr(0755,root,root) %{_cyrexecdir}/rpm/archive_mboxlist
%attr(0755,root,root) %{_cyrexecdir}/rpm/run_all_instances
%attr(0755,root,root) %{_cyrexecdir}/rpm/add_instance
%attr(0755,root,root) %{_cyrexecdir}/rpm/del_instance
%if %{GROUPCACHE}
%attr(0755,root,root) %{_cyrexecdir}/rpm/upd_groupcache
%endif
%attr(0755,root,root) %{_cyrexecdir}/rpm/rpm_set_permissions
%{_cyrexecdir}/cvt_cyrusdb_all
%{_cyrexecdir}/archive_mboxlist
%{_cyrexecdir}/run_all_instances
%{_cyrexecdir}/add_instance
%{_cyrexecdir}/del_instance
%if %{GROUPCACHE}
%{_cyrexecdir}/upd_groupcache
%endif
%{_cyrexecdir}/rpm_set_permissions
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/socket
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/user
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/quota
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/log
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/msg
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/db
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/db.backup1
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/db.backup2
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/sieve
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/sync
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/rpm
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/backup
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/meta
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/volatile
%if %{_withldap}
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/ptclient
%endif
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_spooldata}
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_spooldata}/stage.
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/rpm
%{_datadir}/%{name}/rpm/*
%{_mandir}/man5/*
%{_mandir}/man8/*

%files utils
%defattr(-,root,root,-)
%doc perl/imap/README
%doc perl/imap/Changes
%doc perl/imap/examples
%attr(0755,root,root) %{_bindir}/*
%dir %{perl_vendorarch}/Cyrus
%dir %{perl_vendorarch}/Cyrus/IMAP
%dir %{perl_vendorarch}/Cyrus/SIEVE
%dir %{perl_vendorarch}/auto/Cyrus
%dir %{perl_vendorarch}/auto/Cyrus/IMAP
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve
%{perl_vendorarch}/Cyrus/*.pm
%{perl_vendorarch}/Cyrus/*/*.pm
%attr(0755,root,root) %{perl_vendorarch}/auto/Cyrus/*/*.so
%attr(0755,root,root) %{perl_vendorarch}/auto/Cyrus/*/*/*.so
%{_mandir}/man1/*
%{_mandir}/man3/Cyrus*
%if %{_use_etc_pki}
%dir %{_pki_dir}
%endif
%attr(0640,root,%{_cyrusgroup}) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_ssl_pem_file}

%files devel
%defattr(-,root,root,-)
%{_includedir}/cyrus
%{_libdir}/lib*.a
%{_mandir}/man3/imclient.3*

%changelog
* Wed Sep 01 2021 Simon Matter <simon.matter@invoca.ch> 2.4.22-2
- add patches including fixes for CVE-2021-33582

* Tue Mar 09 2021 Simon Matter <simon.matter@invoca.ch> 2.4.22-1
- upgrade to 2.4.22
- update private autoconf to 2.71

* Fri Jan 22 2021 Simon Matter <simon.matter@invoca.ch> 2.4.21-2
- add patches from https://github.com/cyrusimap/cyrus-imapd/pull/3312
- update private autoconf to 2.70

* Wed Aug 19 2020 Simon Matter <simon.matter@invoca.ch> 2.4.21-1
- upgrade to 2.4.21

* Fri May 22 2020 Simon Matter <simon.matter@invoca.ch> 2.4.20-4
- add support for EL8
- hide distribution in extra identity string
- build without libwrap

* Mon Dec 16 2019 Simon Matter <simon.matter@invoca.ch> 2.4.20-3
- add patch autosieve-CVE-2019-19783

* Tue Jan 08 2019 Simon Matter <simon.matter@invoca.ch> 2.4.20-2
- fix init script to work with undefined ${NETWORKING}

* Mon Aug 21 2017 Simon Matter <simon.matter@invoca.ch> 2.4.20-1
- upgrade to 2.4.20
- add lmtptarget mailbox annotation patch by Stephen Grier, see
  https://lists.andrew.cmu.edu/pipermail/info-cyrus/2010-May/033006.html

* Fri Jun 30 2017 Simon Matter <simon.matter@invoca.ch> 2.4.19-2
- add latest commit from 2.4 branch
- update private m4 version 1.4.18

* Wed May 24 2017 Simon Matter <simon.matter@invoca.ch> 2.4.19-1
- upgrade to 2.4.19

* Mon Feb 20 2017 Simon Matter <simon.matter@invoca.ch> 2.4.18-2
- fix pki location for EL7

* Mon Aug 10 2015 Simon Matter <simon.matter@invoca.ch> 2.4.18-1
- upgrade to 2.4.18
- update private autoconf to 2.69
- add private m4 version 1.4.17

* Fri Jan 10 2014 Simon Matter <simon.matter@invoca.ch> 2.4.17-7
- add patch to make nntp work correctly

* Fri Jan 04 2013 Simon Matter <simon.matter@invoca.ch> 2.4.17-6
- add support for {configdirectory} in paths
- fix multi instance support to work with tmpfs
- disable statuscache in default config
- add {configdirectory}/volatile directory which could be mounted on tmpfs
- put statuscache and tlscache db to volatile

* Thu Jan 03 2013 Simon Matter <simon.matter@invoca.ch> 2.4.17-5
- add patch to put statuscache db to tmpfs
- add patch to put tlscache db to tmpfs
- add patch to make cyrus_mkdir and absolute db paths work
- update cvt_cyrusdb_all to 1.4.0

* Wed Jan 02 2013 Simon Matter <simon.matter@invoca.ch> 2.4.17-4
- disable statuscache in default config

* Wed Jan 02 2013 Simon Matter <simon.matter@invoca.ch> 2.4.17-3
- link binaries with -Wl,-z,relro,-z,now
- add debugopt patch

* Tue Dec 11 2012 Simon Matter <simon.matter@invoca.ch> 2.4.17-2
- add patch to fix segfaults with statuscache enabled, fixes #3757

* Fri Dec 07 2012 Simon Matter <simon.matter@invoca.ch> 2.4.17-1
- upgrade to 2.4.17
- update private autoconf to 2.65
- add private m4 version 1.4.13

* Thu Apr 19 2012 Simon Matter <simon.matter@invoca.ch> 2.4.16-1
- upgrade to 2.4.16

* Tue Mar 13 2012 Simon Matter <simon.matter@invoca.ch> 2.4.14-1
- upgrade to 2.4.14

* Sat Dec 31 2011 Simon Matter <simon.matter@invoca.ch> 2.4.13-1
- upgrade to 2.4.13

* Mon Oct 10 2011 Simon Matter <simon.matter@invoca.ch> 2.4.12-2
- remove LISTEXT compile option (Wolfgang Breyha)
- don't remove user_deny.db on update if it is empty (Wolfgang Breyha)
- add SETPROCTITLE compile option (Wolfgang Breyha)

* Wed Oct 05 2011 Simon Matter <simon.matter@invoca.ch> 2.4.12-1
- upgrade to 2.4.12

* Thu Sep 08 2011 Simon Matter <simon.matter@invoca.ch> 2.4.11-1
- upgrade to 2.4.11

* Tue Aug 30 2011 Simon Matter <simon.matter@invoca.ch> 2.4.11-0.beta1_2
- add flock patch again

* Sat Aug 13 2011 Simon Matter <simon.matter@invoca.ch> 2.4.11-0.beta1_1
- upgrade to 2.4.11beta1

* Wed Aug 10 2011 Simon Matter <simon.matter@invoca.ch> 2.4.10-4
- add more permissions fixes for EL6

* Thu Aug 04 2011 Simon Matter <simon.matter@invoca.ch> 2.4.10-3
- remove USEPIE variable
- rediff some patches to apply without fuzz

* Fri Jul 15 2011 Simon Matter <simon.matter@invoca.ch> 2.4.10-2
- add patch to fix quota legacy bugs (Bron Gondwana)
- add patch to fix quota sync when message appears on both sides (Greg Banks)

* Tue Jul 05 2011 Simon Matter <simon.matter@invoca.ch> 2.4.10-1
- upgrade to 2.4.10

* Wed Jun 22 2011 Simon Matter <simon.matter@invoca.ch> 2.4.9-1
- upgrade to 2.4.9

* Wed Apr 13 2011 Simon Matter <simon.matter@invoca.ch> 2.4.8-1
- upgrade to 2.4.8

* Wed Apr 06 2011 Simon Matter <simon.matter@invoca.ch> 2.4.7-2
- add patch to prevent loosing mail on rename, fixes #3434

* Wed Mar 30 2011 Simon Matter <simon.matter@invoca.ch> 2.4.7-1
- upgrade to 2.4.7

* Tue Feb 22 2011 Simon Matter <simon.matter@invoca.ch> 2.4.6-5
- update lmtp_strict_rfc2821 patch

* Thu Feb 17 2011 Simon Matter <simon.matter@invoca.ch> 2.4.6-4
- add patch to prevent us from becoming a backscatter source
- add dist tag
- add patch to fix a typo in configure.in

* Thu Jan 20 2011 Simon Matter <simon.matter@invoca.ch> 2.4.6-3
- add patch to improve handling of internaldate

* Wed Jan 19 2011 Simon Matter <simon.matter@invoca.ch> 2.4.6-2
- add unofficial autocreate patches
- add create_proc_dir patch
- add patch to put proc and lock on tmpfs

* Tue Jan 18 2011 Simon Matter <simon.matter@invoca.ch> 2.4.6-1
- cosmetic spec changes
- remove condstore annotation from descriptions

* Fri Jan 14 2011 Simon Matter <simon.matter@invoca.ch> 2.4.6-0.9
- implements package improvements for the 2.4.x branch

* Mon Dec 20 2010 Simon Matter <simon.matter@invoca.ch> 2.4.6-0
- upgrade to 2.4.6

* Mon Nov 29 2010 Simon Matter <simon.matter@invoca.ch> 2.4.5-1
- upgrade to 2.4.5

* Thu Nov 25 2010 Simon Matter <simon.matter@invoca.ch> 2.4.4-1
- upgrade to 2.4.4

* Tue Nov 23 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-9
- add patch to fix all URLs

* Tue Sep 21 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-8
- update URL and download addresses

* Fri Sep 17 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-7
- add provides static to -devel sub-package
- add .a files to -devel again

* Wed Jul 28 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-6
- change sieve port to official IANA port 4190
- fix scripts to run with cyrus user having /sbin/nologin as shell

* Thu Jun 17 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-5
- fix build with mysql enabled, thanks Alberto Ferrer for reporting it

* Fri Apr 30 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-4
- add QoS patch from CVS

* Tue Apr 13 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-3
- add sync_client_tls_capability_response patch
- remove user_deny.db on update if it is empty
- integrate perl into utils subpackage

* Mon Apr 12 2010 Simon Matter <simon.matter@invoca.ch> 2.3.16-2
- add the RedHat/Fedora hack to user_deny patch
- remove .a files from -devel

* Mon Dec 21 2009 Simon Matter <simon.matter@invoca.ch> 2.3.16-1
- upgrade to 2.3.16

* Wed Sep 16 2009 Simon Matter <simon.matter@invoca.ch> 2.3.15-4
- add sieve_lengths patch by Bron Gondwana

* Mon Sep 14 2009 Simon Matter <simon.matter@invoca.ch> 2.3.15-3
- add sieve_bo patch
- add track_idling_state patch by Bron Gondwana

* Thu Sep 10 2009 Simon Matter <simon.matter@invoca.ch> 2.3.15-2
- add oldzlib patch by Bron Gondwana, remove zlib hacks

* Wed Sep 09 2009 Simon Matter <simon.matter@invoca.ch> 2.3.15-1
- upgrade to 2.3.15

* Wed Sep 09 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-10
- add idled_bdb patch by Bron Gondwana
- force patch fuzz factor to 2 to make newer systems happy

* Thu Sep 03 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-9
- add sieve_security patch, thanks Bron Gondwana for taking care

* Tue Jun 23 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-8
- add cyrusdb manpage patch from RedHat package
- fix timestamps on patched source files to make verify on -debuginfo happy

* Fri Jun 19 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-7
- add sasl_encode64 patch to fix security issues with cyrus-sasl < 2.1.23
- add -fno-strict-aliasing to CFLAGS

* Fri May 29 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-6
- add lmtp_fix patch

* Thu May 28 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-5
- fix multi-instance scripts again

* Wed May 27 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-4
- add cosmetic changes to scripts
- add closedir patch
- add flat_mailboxes_performance_deficiency patch
- update clean-shutdown patch

* Tue May 26 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-3
- add some sanity checks to multi-instance support

* Wed Apr 08 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-2
- don't strip binaries as suggested by Sebastian Hagedorn, let
  those with very old distributions live with unstripped binaries

* Wed Mar 25 2009 Simon Matter <simon.matter@invoca.ch> 2.3.14-1
- upgrade to 2.3.14

* Wed Jan 14 2009 Simon Matter <simon.matter@invoca.ch> 2.3.13-5
- add realloc_for_quotas patch

* Wed Dec 10 2008 Simon Matter <simon.matter@invoca.ch> 2.3.13-4
- add copy-cachelen patch by Bron Gondwana

* Fri Dec 05 2008 Simon Matter <simon.matter@invoca.ch> 2.3.13-3
- add truncate-length patch by Bron Gondwana

* Mon Nov 24 2008 Simon Matter <simon.matter@invoca.ch> 2.3.13-2
- add sieve-mindays patch

* Tue Oct 21 2008 Simon Matter <simon.matter@invoca.ch> 2.3.13-1
- upgrade to 2.3.13
- add mysql and pgsql support as build time options, disabled by default

* Wed Oct 01 2008 Simon Matter <simon.matter@invoca.ch> 2.3.12p2-5
- install perl modules into vendorarch to make build work on Fedora 9

* Tue Sep 30 2008 Simon Matter <simon.matter@invoca.ch> 2.3.12p2-4
- add inifiniteloop patch

* Mon Sep 29 2008 Simon Matter <simon.matter@invoca.ch> 2.3.12p2-3
- add multi-instance support
- move rpm specific scripts to /usr/lib/cyrus-imapd/rpm/
- add proxyd, pop3proxyd and lmtpproxyd as symlinks

* Wed Sep 03 2008 Simon Matter <simon.matter@invoca.ch> 2.3.12p2-2
- add 8 patches from fastmail.fm
- implement SIGQUIT handling in init script

* Fri Apr 25 2008 Simon Matter <simon.matter@invoca.ch> 2.3.12p2-1
- upgrade to 2.3.12p2

* Thu Apr 24 2008 Simon Matter <simon.matter@invoca.ch> 2.3.12p1-1
- upgrade to 2.3.12p1

* Wed Apr 23 2008 Simon Matter <simon.matter@invoca.ch> 2.3.12-1
- upgrade to 2.3.12
- add support for statuscache feature and enable it by default

* Fri Apr 04 2008 Simon Matter <simon.matter@invoca.ch> 2.3.11-7
- add renamesafety patch by Bron Gondwana

* Thu Apr 03 2008 Simon Matter <simon.matter@invoca.ch> 2.3.11-6
- make quick option in init script configurable, suggestion by Raphael Jaffey

* Tue Mar 25 2008 Simon Matter <simon.matter@invoca.ch> 2.3.11-5
- add reconstruct patch, fixes #3028

* Tue Feb 26 2008 Simon Matter <simon.matter@invoca.ch> 2.3.11-4
- add rpm directory to mkimap

* Fri Feb 08 2008 Simon Matter <simon.matter@invoca.ch> 2.3.11-3
- include latest official autocreate patches
- add ctlcyrusdb-quota patch by Bron Gondwana
- add reconstruct-rewrite patch by David Carter
- add cyr_expire_sasl patch by Wolfgang Breyha

* Thu Feb 07 2008 Simon Matter <simon.matter@invoca.ch> 2.3.11-2
- cvt_cyrusdb_all: add ability to handle tabs in imapd.conf, thank
  you Franz Knipp for the patch
- cvt_cyrusdb_all: handle missing options in imapd.conf correctly

* Tue Dec 11 2007 Simon Matter <simon.matter@invoca.ch> 2.3.11-1
- upgrade to 2.3.11

* Thu Nov 29 2007 Simon Matter <simon.matter@invoca.ch> 2.3.10-5
- add ability to handle "@include" options in imapd.conf, thank
  you Tim Bannister for the patch

* Mon Nov 19 2007 Simon Matter <simon.matter@invoca.ch> 2.3.10-4
- add stuck_ssl_processes patch

* Thu Nov 15 2007 Simon Matter <simon.matter@invoca.ch> 2.3.10-3
- add delayed_delete patch to enable mailbox deletion without
  allowusermoves enabled

* Tue Nov 13 2007 Simon Matter <simon.matter@invoca.ch> 2.3.10-2
- add skiplist patches by Bron Gondwana

* Thu Nov 01 2007 Simon Matter <simon.matter@invoca.ch> 2.3.10-1
- update to 2.3.10
- remove rmquota+deletemailbox patch

* Wed Sep 12 2007 Simon Matter <simon.matter@invoca.ch> 2.3.9-3.4
- update pcreposix patch
- add dbtool-transaction patch

* Tue Sep 11 2007 Simon Matter <simon.matter@invoca.ch> 2.3.9-3.3
- add a number of patches which are now in CVS

* Tue Aug 28 2007 Simon Matter <simon.matter@invoca.ch> 2.3.9-3
- update nobarenewlinescheck patch
- change prereq on cyrus-imapd-utils to requires
- move pem ghost file to -utils package

* Mon Aug 27 2007 Simon Matter <simon.matter@invoca.ch> 2.3.9-2
- require at least cyrus-sasl 2.1.19

* Thu Aug 23 2007 Simon Matter <simon.matter@invoca.ch> 2.3.9-1
- update to 2.3.9

* Wed Aug 08 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-10
- add mbdump patch, fixes #2917

* Tue Jul 03 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-9
- add disable-referral patch

* Sun Jul 01 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-8
- add mupdate_unified patch, fixes #2914
- add ctl_mboxlist_unified patch, fixes #2915

* Thu Apr 26 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-7
- add redhat-rpm-config as buildreq where needed

* Thu Apr 12 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-6
- add pcreposix patch from FastMail.FM as build time option

* Fri Mar 23 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-5
- add cyrusdb_berkeley patch

* Thu Feb 22 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-4
- add new rmquota+deletemailbox patch, it's still maintained

* Wed Feb 14 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-3.3
- update to official autocreate/sieve patches

* Mon Feb 12 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-3.1
- add patch to support BDB4.5

* Sat Feb 10 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-3
- fix handling of lock file in init script

* Fri Feb 09 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-2
- add cyr_dbtool manpage patch
- remove empty html directory

* Thu Feb 08 2007 Simon Matter <simon.matter@invoca.ch> 2.3.8-1
- update to 2.3.8
- remove rmquota+deletemailbox patch, it is not maintained anymore
- add patch to fix build with gcc-2.9x

* Tue Jan 23 2007 Simon Matter <simon.matter@invoca.ch> 2.3.7-11.1
- add build_warning patch

* Tue Dec 19 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-11
- add expire patch

* Wed Dec 13 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-10
- move private autotools stuff to build stage
- fix usage of seq(1) in scripts

* Wed Dec 13 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-9
- add binary-multiappend patch from CVS

* Mon Nov 27 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-8
- add messagesizecheck patch by Bron Gondwana
- update private autoconf to 2.61

* Wed Oct 18 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-7
- add unexpunge_crash patch
- add lmtpproxy_crash patch

* Mon Oct 16 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-6
- update appenddomain patch
- use more macros in the spec file

* Tue Oct 03 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-5
- add appenddomain patch, suggested by Kendrick Vargas and Andre Henry
- update private autoconf to 2.60

* Fri Aug 25 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-4
- use _initrddir macro
- only buildrequire lm_sensors on i386 and x86_64, since it is not
  available elsewhere
- change mode of perl .so files to 755 instead of 555
- rename perl-Cyrus to cyrus-imapd-perl to be consistent with rest
  of package (the cyrus modules are not part of cpan)
- remove prereq's in favour of newly added requires(...)

* Thu Aug 10 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-3
- add ldap patch

* Fri Jul 14 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-2
- update notify_sms patch

* Tue Jul 11 2006 Simon Matter <simon.matter@invoca.ch> 2.3.7-1
- update to 2.3.7, officially called BETA-quality release

* Mon Jul 03 2006 Simon Matter <simon.matter@invoca.ch> 2.3.6-3
- add delete_sig_10 patch

* Fri Jun 16 2006 Simon Matter <simon.matter@invoca.ch> 2.3.6-2
- add updates from CVS20060616

* Thu May 25 2006 Simon Matter <simon.matter@invoca.ch> 2.3.6-1
- update to 2.3.6, officially called BETA-quality release

* Thu May 25 2006 Simon Matter <simon.matter@invoca.ch> 2.3.5-0.2
- update to 2.3.5, officially called BETA-quality release
- add modseq patch

* Wed May 24 2006 Simon Matter <simon.matter@invoca.ch> 2.3.4-1
- update to 2.3.4, officially called BETA-quality release

* Fri May 19 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-7
- add fix_acl_check patch from CVS

* Tue Apr 25 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-6
- replace 64bit_quota by pop3_last_login patch

* Mon Apr 24 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-5
- add 64bit_quota patch

* Sat Apr 22 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-4
- add mupdate patch

* Thu Apr 20 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-3
- fix pam configuration for pam >= 0.80

* Wed Apr 12 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-2
- update deleteacl_invalid_identifier_fix patch

* Thu Mar 09 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-1.2
- update autocreate and autosieve patches

* Fri Mar 03 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-1.1
- update URL

* Tue Feb 28 2006 Simon Matter <simon.matter@invoca.ch> 2.3.3-1
- update to 2.3.3, officially called BETA-quality release

* Tue Feb 28 2006 Simon Matter <simon.matter@invoca.ch> 2.3.2-0.1
- update to 2.3.2, officially called BETA-quality release
- add cyrusdb_berkeley patch

* Tue Feb 21 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-3.3
- add skipfix utility to contrib

* Tue Feb 14 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-3.2
- add README.performance-tips

* Mon Feb 13 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-3.1
- update to CVS 20060213 patch
- add meta directory which can be used as metapartition

* Thu Feb 09 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-3
- add CVS 20060209 patch

* Wed Jan 25 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-2
- add backend_sigsegv patch
- add replication_policycheck patch

* Mon Jan 23 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-1
- update to official autocreate and autosievefolder patches

* Thu Jan 19 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.18
- update rpm_set_permissions script
- add snmp support as build time option, disabled by default
  because it doesn't build on older distributions

* Wed Jan 18 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.15
- add make_md5 patch

* Mon Jan 16 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.13
- add autosievefolder patch
- add rmquota+deletemailbox patch
- change default path for make_md5, add md5 directory

* Fri Jan 13 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.10
- spec file cleanup
- add more cvt_cyrusdb_all fixes
- fix pre/post scripts
- fix requirements
- add patch to set Invoca RPM config defaults
- add sync directory used for replication
- add autocreate patch

* Thu Jan 12 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.8
- update cvt_cyrusdb_all script
- build db.cfg on the fly

* Thu Jan 05 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.5
- create ptclient directory if ldap enabled

* Wed Jan 04 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.4
- build without ldap support if openldap is linked against SASLv1

* Tue Jan 03 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.3
- fix ldap support

* Mon Jan 02 2006 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.2
- add openldap-devel to buildprereq, build with ldap support

* Wed Dec 21 2005 Simon Matter <simon.matter@invoca.ch> 2.3.1-0.1
- update to 2.3.1, officially called BETA-quality release

* Fri Dec 16 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.4
- add skiplist.py to contrib/
- port authid_normalize patch

* Thu Dec 15 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.3
- reintroduce subpackage utils, fix requirements
- move some utils to %{_bindir}/

* Wed Dec 14 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.2
- integrate subpackages murder, nntp, replication, utils

* Tue Dec 13 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.1
- update to 2.3.0, officially called BETA-quality release
- add replication subpackage

* Fri Dec 09 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-15.1
- add missing automake to buildprereq
- change package description

* Tue Dec 06 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-15
- update cvt_cyrusdb_all script
- update autocreate patches

* Mon Dec 05 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-14
- update cvt_cyrusdb_all script

* Mon Nov 14 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-13
- add 64bit quota support backported from 2.3

* Fri Nov 11 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-12
- add quickstart/stop option to init script to bypass db import/export
- add authid_normalize patch
- add allow_auth_plain_proxying patch
- update gcc4 patch
- remove useless fdatasync patch
- add private autoconf used for build, remove autoconf dependency
- generate correct docs including man pages
- remove unneeded files from doc directory

* Fri Nov 04 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-11
- add mupdate thread-safe patch

* Mon Oct 24 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-9.4
- add spool patch, which is already fixed in CVS

* Tue Aug 30 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-9.2
- pull in CPPFLAGS and LDFLAGS from openssl's pkg-config data, if it exists

* Wed Aug 24 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-9.1
- add timsieved_reset_sasl_conn patch

* Mon Aug 22 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-9
- cosmetic changes in pre and post scripts

* Fri Aug 19 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-8
- add more pki dir fixes for inplace upgrades

* Thu Aug 18 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-7
- include requirement for Berkeley DB utils

* Thu Aug 18 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-6
- fix recovery problems with db4, which do not exist with db3
- fix logic for handling ssl certs
- remove initlog from init script

* Wed Aug 17 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-5
- add notifytest to the distribution
- add functionality to convert all berkeley databases to skiplist
  on shutdown and convert them back as needed on startup. This should
  solve the upgrade problems with Berkeley databases.

* Tue Aug 16 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-4.14
- add gcc4 patch
- determine and handle pki directory for openssl correctly
- add skiplist recovery docs
- add notify_sms patch

* Mon Jul 18 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-4.10
- update cvt_cyrusdb_all script
- update autocreate patches

* Fri Jul 15 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-4.9
- add patch to remove ACLs with invalid identifier
- update cvt_cyrusdb_all script

* Sat Jun 18 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-4.1
- update munge8bit patch

* Wed Jun 08 2005 Simon Matter <simon.matter@invoca.ch> 2.2.12-4
- updated seenstate patch

* Thu Jun 02 2005 Simon Matter <simon.matter@invoca.ch>
- removed nolinkimapspool patch, added singleinstancestore patch instead

* Thu Jun 02 2005 Simon Matter <simon.matter@invoca.ch>
- added nolinkimapspool patch
- fix debug_package macro, it was still being expanded,
  comments don't hide macro expansion
- change license field to BSD, its not exact BSD, but BSD is the closest

* Mon Mar 07 2005 Simon Matter <simon.matter@invoca.ch>
- updated rmquota+deletemailbox patches

* Mon Feb 14 2005 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.12
- updated autocreate and autosievefolder patches

* Sat Feb 05 2005 Simon Matter <simon.matter@invoca.ch>
- updated autosievefolder patch

* Tue Feb 01 2005 Simon Matter <simon.matter@invoca.ch>
- remove special ownership and permissions from deliver
- enable deliver-wrapper per default
- enable OutlookExpress seenstate patch per default

* Wed Jan 19 2005 Simon Matter <simon.matter@invoca.ch>
- updated autocreate patch

* Fri Jan 14 2005 Simon Matter <simon.matter@invoca.ch>
- spec file cleanup

* Tue Jan 11 2005 Simon Matter <simon.matter@invoca.ch>
- updated autocreate patch

* Fri Jan 07 2005 Simon Matter <simon.matter@invoca.ch>
- moved contrib dir into doc, made scripts not executable

* Thu Jan 06 2005 Simon Matter <simon.matter@invoca.ch>
- added more fixes to the autocreate patch
- don't use %_libdir for %_cyrexecdir, it's a mess on x86_64
- don't use %_libdir for symlinks
- remove %_libdir pachtes
- change pam configs to work on x86_64
- changed default build option for IDLED to on
- changed rpm_set_permissions to honor partitions in /etc/imapd.conf

* Tue Jan 04 2005 Simon Matter <simon.matter@invoca.ch>
- updated autocreate patch

* Mon Dec 20 2004 Simon Matter <simon.matter@invoca.ch>
- remove idled docs when disabled, fixes RedHat's bug #142345

* Fri Dec 17 2004 Simon Matter <simon.matter@invoca.ch>
- removed allnumeric patch, not needed anymore
- made groupcache a compile time option
- rename nntp's pam service, fixes RedHat's bug #142672

* Thu Dec 16 2004 Simon Matter <simon.matter@invoca.ch>
- updated groupcache patch
- updated cvt_cyrusdb_all to use runuser instead of su if available
- added upd_groupcache tool

* Wed Dec 15 2004 Simon Matter <simon.matter@invoca.ch>
- added groupfile patch to help those using nss_ldap

* Thu Dec 02 2004 Simon Matter <simon.matter@invoca.ch>
- modified config directives and removed verify options

* Wed Nov 24 2004 Simon Matter <simon.matter@invoca.ch>
- updated autocreate patches

* Wed Nov 24 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.10

* Tue Nov 23 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.9

* Fri Nov 19 2004 Simon Matter <simon.matter@invoca.ch>
- changed scripts to use runuser instead of su if available

* Thu Nov 18 2004 Simon Matter <simon.matter@invoca.ch>
- changed requirement for file >= 3.35-1 from BuildPrereq to
  Requires, fixes RedHat's bug #124991
- added acceptinvalidfrom patch to fix RedHat's bug #137705

* Tue Aug 03 2004 Simon Matter <simon.matter@invoca.ch>
- fixed symlinks for x86_64, now uses the _libdir macro
  reported by John Dennis, fixes RedHat's bug #128964
- removed obsoletes tag, fixes RedHat's bugs #127448, #129274

* Thu Jul 29 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.8

* Thu Jul 29 2004 Simon Matter <simon.matter@invoca.ch>
- updated autocreate and autosieve patches
- made authorization a compile time option
- added sieve-bc_eval patch

* Tue Jul 27 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.7
- modified autocreate patch or 2.2.7
- removed snmpargs patch which was needed for RedHat 6.2

* Tue Jul 13 2004 Simon Matter <simon.matter@invoca.ch>
- added mboxlist / mboxname patches from CVS

* Tue Jul 06 2004 Simon Matter <simon.matter@invoca.ch>
- updated rmquota+deletemailbox patch

* Wed Jun 30 2004 Simon Matter <simon.matter@invoca.ch>
- added quota patches from CVS

* Fri Jun 25 2004 Simon Matter <simon.matter@invoca.ch>
- updated autocreate patch

* Fri Jun 18 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.6

* Fri Jun 11 2004 Simon Matter <simon.matter@invoca.ch>
- updated autocreate and autosieve patches

* Tue Jun 01 2004 Simon Matter <simon.matter@invoca.ch>
- updated autocreate, autosieve and rmquota patches
- fixed rmquota patch to build on gcc v3.3.x
- added lmtp_sieve patch

* Sat May 29 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.5

* Fri May 28 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.5 pre-release

* Mon May 24 2004 Simon Matter <simon.matter@invoca.ch>
- added hash patch to fix a sig11 problem
- added noncritical typo patch

* Fri May 21 2004 Simon Matter <simon.matter@invoca.ch>
- include OutlookExpress seenstate patch
- fixed allnumeric patch

* Thu May 20 2004 Simon Matter <simon.matter@invoca.ch>
- don't enable cyrus-imapd per default
- rename fetchnews to cyrfetchnews to avoid namespace conflicts with leafnode
- replace fetchnews with cyrfetchnews in man pages
- replace master with cyrus-master in man pages

* Tue May 18 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.4

* Fri Apr 30 2004 Simon Matter <simon.matter@invoca.ch>
- Don't provides: imap

* Wed Mar 17 2004 Simon Matter <simon.matter@invoca.ch>
- fix init script

* Thu Mar 04 2004 Simon Matter <simon.matter@invoca.ch>
- strip binaries

* Tue Mar 02 2004 Simon Matter <simon.matter@invoca.ch>
- add more SELinux fixes

* Wed Feb 25 2004 Simon Matter <simon.matter@invoca.ch>
- add makedepend to path, thank you Andreas Piesk for reporting it

* Mon Feb 23 2004 Dan Walsh <dwalsh@redhat.com>
- change su within init script to get input from /dev/null
  this prevents hang when running in SELinux
- don't use -fpie as default, it breaks different distributions

* Thu Feb 19 2004 Simon Matter <simon.matter@invoca.ch>
- merged in most changes from Karsten Hopp's RedHat package
- fixed permissions of files in contrib, thank you
  Edward Rudd for reporting it.
- modified snmp patch to make it build on RedHat 6.2 again

* Tue Feb 03 2004 Karsten Hopp <karsten@redhat.de>
- switch to Simon Matter's cyrus-imapd package, which has
  some major improvements over the old Red Hat package.
  - configdirectory moved from /var/imap to /var/lib/imap
  - sasl_pwcheck_method changed to saslauthd
- needed to delete package/vendor tags for buildsystem.
- added USEPIE variable for linking with -fpie flag
- removed rpath from linker arguments
- removed email header from README.HOWTO-recover-mailboxes
- added lib64 patch
- use CFLAGS from specfile in imtest subdir
- disable -pie on ppc for now

* Tue Feb 03 2004 Simon Matter <simon.matter@invoca.ch>
- added tls_ca_file: to imapd.conf
- updated autocreate patch which fixes a small sig11 problem

* Thu Jan 29 2004 Simon Matter <simon.matter@invoca.ch>
- convert sieve scripts to UTF-8 only if sievec failed before
- add note to the readme about limiting loggin on busy servers
- added build time option to chose the syslog facility

* Wed Jan 28 2004 Simon Matter <simon.matter@invoca.ch>
- sieve scripts are now converted to UTF-8 with cvt_cyrusdb_all

* Tue Jan 27 2004 Simon Matter <simon.matter@invoca.ch>
- fixed problems with masssievec
- lots of small fixes in the init scripts

* Fri Jan 23 2004 Simon Matter <simon.matter@invoca.ch>
- updated auto db converting functionality
- added auto masssievec functionality

* Thu Jan 22 2004 Simon Matter <simon.matter@invoca.ch>
- updated autocreate/autosievefolder patches

* Fri Jan 16 2004 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.3

* Wed Jan 14 2004 Simon Matter <simon.matter@invoca.ch>
- number of mailbox list dumps can now be configured

* Thu Jan 01 2004 Simon Matter <simon.matter@invoca.ch>
- updated autosievefolder patch

* Thu Dec 18 2003 Simon Matter <simon.matter@invoca.ch>
- updated autocreate/autosievefolder/rmquota patches

* Tue Oct 28 2003 Simon Matter <simon.matter@invoca.ch>
- updated to 2.2.2-BETA

* Tue Aug 05 2003 Simon Matter <simon.matter@invoca.ch>
- add sendmail m4 macro, some people were looking for it
- just one source for pam default configuration (they were all the same)
- added /etc/pam.d/lmtp
- added build support for RedHat Beta severn

* Wed Jul 30 2003 Simon Matter <simon.matter@invoca.ch>
- updated autocreate patch to 0.8.1
- removed creation of spool/config dirs, not needed anymore
- added cyrus_sharedbackup to contrib

* Fri Jul 18 2003 Simon Matter <simon.matter@invoca.ch>
- modified for 2.2.1-BETA

* Wed Jul 09 2003 Simon Matter <simon.matter@invoca.ch>
- modified rpm_set_permissions script

* Mon Jul 07 2003 Simon Matter <simon.matter@invoca.ch>
- changed permissions on config and spool dirs
- modified init script

* Thu Jul 03 2003 Simon Matter <simon.matter@invoca.ch>
- upgraded to 2.1.14
- removed now obsolete forcedowncase patch
- use --with-extraident to add extra version information
- updated munge8bit patch

* Wed Jun 04 2003 Simon Matter <simon.matter@invoca.ch>
- added RedHat 2.1ES support to the perlhack detection

* Tue May 20 2003 Simon Matter <simon.matter@invoca.ch>
- upgraded autocreate patch

* Fri May 09 2003 Simon Matter <simon.matter@invoca.ch>
- upgraded autocreate patch
- modified init script

* Mon May 05 2003 Simon Matter <simon.matter@invoca.ch>
- upgraded to 2.1.13
- replaced commands with macros, cleaned up spec file

* Fri May 02 2003 Simon Matter <simon.matter@invoca.ch>
- added murder subpackage
- changed exec path to /usr/lib/cyrus-imapd

* Thu May 01 2003 Simon Matter <simon.matter@invoca.ch>
- included modified munge8bit patch again

* Tue Apr 29 2003 Simon Matter <simon.matter@invoca.ch>
- added new 8bit header patch
- upgraded IPv6 patch
- upgraded autocreate patch to 0.7

* Mon Apr 28 2003 Simon Matter <simon.matter@invoca.ch>
- added new autocreate patch

* Mon Mar 31 2003 H-E Sandstrom <hes@mailcore.net>
- added munge8bit patch

* Mon Mar 24 2003 Simon Matter <simon.matter@invoca.ch>
- added createonpost fix patch

* Thu Mar 20 2003 Simon Matter <simon.matter@invoca.ch>
- added functionality to patch the IPv6 patch on the fly if
  autoconf > 2.13, we can now use newer autoconf again.

* Tue Mar 18 2003 Paul Bender <pbender@qualcomm.com>
- fixed spec file so that autoconf 2.13 will always be used,
  since the IPv6 patch requires autoconf <= 2.13

* Fri Mar 14 2003 Simon Matter <simon.matter@invoca.ch>
- fixed problems with new file package

* Thu Mar 13 2003 Simon Matter <simon.matter@invoca.ch>
- added kerberos include for RedHat Beta phoebe 2
- added Henrique's forcedowncase patch

* Mon Mar 03 2003 Simon Matter <simon.matter@invoca.ch>
- corrected imapd.conf

* Sat Mar 01 2003 Simon Matter <simon.matter@invoca.ch>
- added note about lmtp socket in sendmail
- added flock patches

* Fri Feb 07 2003 Simon Matter <simon.matter@invoca.ch>
- added build time option for fulldirhash

* Wed Feb 05 2003 Simon Matter <simon.matter@invoca.ch>
- added IPV6 patch to source rpm
- fixed build on RedHat 6.2

* Tue Feb 04 2003 Simon Matter <simon.matter@invoca.ch>
- update to 2.1.12
- added logrotate entry for /var/log/auth.log
- modified init script to use builtin daemon mode

* Fri Jan 10 2003 Simon Matter <simon.matter@invoca.ch>
- small change in mboxlist backup script

* Fri Jan 10 2003 Simon Matter <simon.matter@invoca.ch>
- fixed a cosmetic bug in cvt_cyrusdb_all
- added cron.daily job to backup mailboxes.db

* Mon Jan 06 2003 Simon Matter <simon.matter@invoca.ch>
- add more entries to /etc/services

* Wed Jan 01 2003 Simon Matter <simon.matter@invoca.ch>
- include snmpargs patch for build on RedHat 6.2
- added build support for RedHat 6.2

* Mon Dec 30 2002 Simon Matter <simon.matter@invoca.ch>
- removed autoconf hack, not needed anymore
- enabled build on RedHat Beta Phoebe
- added services entry for lmtp
- cleanup spec file

* Thu Dec 26 2002 Simon Matter <simon.matter@invoca.ch>
- removed BuildPrereq for e2fsprogs-devel

* Thu Dec 12 2002 Simon Matter <simon.matter@invoca.ch>
- modified RedHat release detection
- added BuildPrereq for file

* Thu Dec 05 2002 Simon Matter <simon.matter@invoca.ch>
- upgraded to cyrus-imapd 2.1.11
- upgrade IPV6 patch to 20021205

* Thu Nov 28 2002 Simon Matter <simon.matter@invoca.ch>
- Fixed some default attributes

* Thu Nov 28 2002 Troels Arvin <troels@arvin.dk>
- Explicitly changed files-section to
   - use defattr for simple (root-owned 0644) files
   - explictly set root as user/group owner where
     the user/group ownership was previously indicated
     as "-"; this allows building valid packages without
     having to being root when building

* Mon Nov 25 2002 Simon Matter <simon.matter@invoca.ch>
- changed default build option for IDLED to off
- included some useful info in README.*

* Thu Nov 21 2002 Simon Matter <simon.matter@invoca.ch>
- added build time option for IDLED, thank you Roland Pope

* Tue Nov 19 2002 Simon Matter <simon.matter@invoca.ch>
- fixed spec to really use fdatasync patch
- added createonpost patch

* Thu Nov 14 2002 Simon Matter <simon.matter@invoca.ch>
- upgraded to cyrus-imapd 2.1.10
- build without IPv6 support by default

* Tue Nov 12 2002 Simon Matter <simon.matter@invoca.ch>
- fixed db detection in .spec

* Mon Oct 21 2002 Simon Matter <simon.matter@invoca.ch>
- updated cvt_cyrusdb_all script

* Fri Oct 18 2002 Simon Matter <simon.matter@invoca.ch>
- added fdatasync patch

* Thu Oct 03 2002 Simon Matter <simon.matter@invoca.ch>
- add RPM version 4.1 compatibility, which means remove installed
  but not packaged files

* Wed Sep 18 2002 Simon Matter <simix@datacomm.ch>
- added auto db converting functionality
- changed default for MBOXLIST_DB and SEEN_DB to skiplist

* Mon Sep 16 2002 Simon Matter <simix@datacomm.ch>
- remove creation of cyrus user at build time
- added scripts from ftp://kalamazoolinux.org/pub/projects/awilliam/cyrus/

* Mon Sep 02 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.9

* Fri Aug 30 2002 Simon Matter <simix@datacomm.ch>
- included extra ident string

* Thu Aug 29 2002 Simon Matter <simix@datacomm.ch>
- modified path in deliver-wrapper, thank you Richard L. Phipps
- added RedHat 2.1AS support to the perlhack detection
- added build time option to force syncronous updates on ext3

* Wed Aug 28 2002 Simon Matter <simix@datacomm.ch>
- added updated IPv6 patch from Hajimu UMEMOTO

* Wed Aug 28 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.8

* Thu Aug 22 2002 Simon Matter <simix@datacomm.ch>
- included IPv6 patch from Hajimu UMEMOTO

* Wed Aug 21 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.7 because of wrong version info

* Wed Aug 21 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.6

* Mon Aug 19 2002 Simon Matter <simix@datacomm.ch>
- change db version detection, thank you Chris for reporting

* Tue Aug 13 2002 Simon Matter <simix@datacomm.ch>
- fixed autoconf detection

* Mon Aug 12 2002 Simon Matter <simix@datacomm.ch>
- included support for different autoconf versions
- modified the perl build and install process
- made some .spec changes to build on RedHat 7.x and limbo

* Fri Aug 09 2002 Simon Matter <simix@datacomm.ch>
- included sieve matching patch

* Thu Jun 27 2002 Simon Matter <simix@datacomm.ch>
- fixed %post script where %F was expanded to file.file

* Wed Jun 26 2002 Simon Matter <simix@datacomm.ch>
- fixed missing man page

* Tue Jun 25 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.5

* Mon Jun 24 2002 Simon Matter <simix@datacomm.ch>
- added compile time parameters to configure the package based on
  the idea from Luca Olivetti <luca@olivetti.cjb.net>
- make deliver-wrapper a compile time option

* Thu May 02 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.4

* Mon Apr 22 2002 Simon Matter <simix@datacomm.ch>
- small initscript fix

* Fri Mar 08 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.3
- removed some stuff that was cleaned up in the sources
- added compile time options for db backends

* Wed Mar 06 2002 Simon Matter <simix@datacomm.ch>
- removed requires perl-File-Temp for utils package, it's in the RedHat
  perl RPM now

* Fri Feb 22 2002 Simon Matter <simix@datacomm.ch>
- removed deliverdb/db

* Wed Feb 20 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.2

* Mon Feb 11 2002 Simon Matter <simix@datacomm.ch>
- changed sasl_mech_list: PLAIN in /etc/imapd.conf
- added sieve to /etc/pam.d

* Fri Feb 08 2002 Simon Matter <simix@datacomm.ch>
- added requires perl-File-Temp for utils package

* Wed Feb 06 2002 Simon Matter <simix@datacomm.ch>
- added some %dir flags
- removed /usr/lib/sasl/Cyrus.conf
- added conf templates
- build time option for usage of saslauth group

* Tue Feb 05 2002 Simon Matter <simix@datacomm.ch>
- upgraded to cyrus-imapd 2.1.1
- dependency of cyrus-sasl >= 2.1.0-1

* Sun Feb 03 2002 Simon Matter <simix@datacomm.ch>
- saslauth group is only deleted on uninstall if there is no other
  member in this group

* Sat Feb 02 2002 Simon Matter <simix@datacomm.ch>
- changed start/stop level in init file

* Tue Jan 29 2002 Simon Matter <simix@datacomm.ch>
- dependency of cyrus-sasl >= 1.5.24-22
- dotstuffing patch for sendmail calls made by sieve for outgoing
  mails
- patch for ability to force ipurge to traverse personal folders

* Mon Jan 28 2002 Simon Matter <simix@datacomm.ch>
- minor spec file changes

* Sat Jan 19 2002 Simon Matter <simix@datacomm.ch>
- changed default auth to pam
- remove several %dir from %files sections
- change from /usr/lib/cyrus -> /usr/libexec/cyrus
- rename source files to something like cyrus...
- added rehash tool
- changed to hashed spool

* Fri Jan 18 2002 Simon Matter <simix@datacomm.ch>
- fixed init script
- fixed %post section in spec

* Thu Jan 17 2002 Simon Matter <simix@datacomm.ch>
- ready for first build

* Wed Jan 09 2002 Simon Matter <simix@datacomm.ch>
- initial package, with help from other packages out there
