SHA256
1
0
forked from pool/courier-imap
courier-imap/courier-imap.spec
Christian Wittmer ca74594a78 Accepting request 747954 from home:adkorte:branches:server:mail
- update to 5.0.8
  * Update documentation in the imapd and pop3d ssl config flies.
- update to 5.0.7
  * pop3dserver.c (do_retr): Use the new MIME_UNICODE_MESSAGE_TYPE
    setting to set the type of the wrapped MIME attachment.
- update to 5.0.6
  * pop3dserver.c: Fix parsing of pop3d file cache, on some
    architectures.
  * tcpd/libcouriertls.c: Ignore unreadable cert files.
- update to 5.0.5
  * fetch.c: Send an alert about a Unicode messages to a non-Unicode
    client at most once per IMAP session.
- update to 5.0.4
  * pop3dserver.c: Deal with MS Outlook's broken implementation of
    RFC 6856.
- update to 5.0.3
  * pop3dserver.c (calcsize): Fix spurious flagging of non-UTF8
    messages as UTF-8.
    To fix existing mailboxes with erroneously-flagged messages. In
    each mailbox, if its existing courierpop3dsizelist file starts with
    /3 [followed by additional data]
    Only if the first line in courierpop3dsizelist starts with /3, then
    execute:
    perl -p -i -e 's/:\d+$/:0/' courierpop3dsizelist
  * pop3dserver.c (readpop3dlist): Be able to update
    courierpop3dsizelist from version 2 to 3 in place.
    (do_retr): Instead of returning an ERR to a non-Unicode client,
    handle Unicode messages by wrapping them as an attachment.
- update to 5.0.2
  * configure.ac: Additional changes to how Unicode messages are
    handled with non-Unicode clients: disclaim all warranties, still
    report an error, but provide the raw message content, as is.
- update to 5.0.1
  * Provide an substitute message to IMAP clients that did not enable
    UTF-8.
  * couriertls: additional fixes.
  * couriertls: option to use a separate file for the SSL certificate's
    private key, as an alternative to the combined keyfile+certificate.
- update to 5.0.0
  * pop3dserver.c: update Courier-IMAP to support UTF8 POP3. Update
    version of the courierpop3dsizelist cache file.
  * courier-imap, sqwebmail: update Courier-IMAP to support UTF8 IMAP.
    Convert maildir folders to use UTF-8 for folder names. Add
    --checkutf8 and --convutf8 options to maildirmake to convert
    pre-UTF8 maildirs to UTF8 maildirs, a mandatory upgrade procedure.
  * waitlib/configure.ac: Fix typo.
  * libs/tcpd/starttls.c (main): Add -user option. Additional fixes
    to startup script to have couriertls drop root privileges.
  * libs/tcpd/tlsclient.h: add username option, used in couriertls_start
    to set the child process's uid and gid.
  * imaplogin.c (starttls): Set username option for couriertls
  * pop3login.c (starttls): Set username option for couriertls
  * imapd-ssl.dist, pop3d-ssl.dist: Use separate imap and pop3 session
    cache files. Startup script: remove/set ownership and permsission
    on the imap and pop3 session cache files.
  * libs/tcpd/libcouriergnutls.c: Remove usage of deprecated OpenPGP
    API. Tag the "Unexpected SSL connection shutdown" with the "DEBUG"
    label just like the OpenSSL version does.
  * libs/tcpd/starttls.c: If TCPREMOTEIP is set, prepend it to error
    messages.
- delete reproducible.patch (upstreamed)
- add courier-imap.keyring for source verification
- cleanup spec

OBS-URL: https://build.opensuse.org/request/show/747954
OBS-URL: https://build.opensuse.org/package/show/server:mail/courier-imap?expand=0&rev=87
2020-01-31 21:39:22 +00:00

228 lines
8.8 KiB
RPMSpec

#
# spec file for package courier-imap
#
# Copyright (c) 2019 SUSE LLC.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: courier-imap
Version: 5.0.8
Release: 0
Summary: An IMAP and POP3 Server for Maildir MTAs
License: GPL-3.0-or-later
Group: Productivity/Networking/Email/Servers
URL: https://www.courier-mta.org/imap/
Source0: https://downloads.sourceforge.net/project/courier/imap/%{version}/%{name}-%{version}.tar.bz2
Source1: https://downloads.sourceforge.net/project/courier/imap/%{version}/%{name}-%{version}.tar.bz2.sig
Source2: pop3.pamd
Source3: imap.pamd
# Keyring downloaded from https://www.courier-mta.org/KEYS.bin#/%{name}.keyring
Source4: %{name}.keyring
Source11: courier-imap.init
Source12: courier-imap-ssl.init
Source13: courier-pop.init
Source14: courier-pop-ssl.init
Source15: courier-imap.service
Source16: courier-imap-ssl.service
Source17: courier-imap-gencert.service
Source18: courier-pop.service
Source19: courier-pop-ssl.service
Source20: courier-pop-gencert.service
Patch0: %{name}-sbindir.patch
Patch2: %{name}-ulimit_conf.patch
### Patch for upstream:
## fixes typo in Makefile.am
Patch3: %{name}-Makefile.patch
BuildRequires: audit-libs
BuildRequires: courier-authlib-devel >= 0.68
BuildRequires: courier-unicode-devel >= 2.0
BuildRequires: db-devel
BuildRequires: gamin-devel
BuildRequires: gcc-c++
BuildRequires: gdbm-devel
BuildRequires: libidn-devel
BuildRequires: libstdc++-devel
BuildRequires: ncurses-devel
# openssl itself for /usr/bin/openssl configure check
BuildRequires: postfix
BuildRequires: procps
BuildRequires: zlib-devel
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(systemd)
Requires: courier-authlib >= 0.68
Requires: fam-server
Requires: gdbm
Requires: openssl
Conflicts: cyrus-imapd
Conflicts: imap
Conflicts: qpopper
%{?systemd_requires}
%description
Courier-IMAP is a fast, scalable, enterprise IMAP server that uses
Maildirs. Many E-mail service providers use Courier-IMAP to easy handle
hundreds of thousands of mail accounts. With its built-in IMAP and POP3
aggregation proxy, Courier-IMAP has practically infinite horizontal
scalability. In a proxy configuration, a pool of Courier servers service
initial IMAP and POP3 connections from clients. They wait to receive the
client's log in request, look up the server that actually holds this mail
account's mailbox, and establish a proxy connection to the server, all in
a single, seamless process. Mail accounts can be moved between different
servers, to achieve optimum resource usage.
The only practical limitation on Courier-IMAP is available network and I/O
bandwidth. If you are new to Courier-IMAP, this may sound a bit
intimidating. But you do not need to tackle everything at once. Start by
taking small, easy steps. Your first step will be to set up a small
Courier-IMAP server, using it like any other traditional IMAP service, on
a single server. After you gain experience and become comfortable with
Courier, you can then begin exploring its advanced features.
This is the same IMAP server that's included in the Courier mail server,
but configured as a standalone IMAP server that can be used with other
mail servers - such as Qmail, Exim, or Postfix - that deliver to maildirs.
If you already have Courier installed, you do not need to download this
version. If you install this version, you must remove it if you later
install the entire Courier server.
%prep
%setup -q
%patch0
%patch2
%patch3
%build
%configure \
--with-notice=unicode \
--libexecdir=%{_prefix}/lib/%{name} \
--datadir=%{_datadir}/%{name} \
--sysconfdir=%{_sysconfdir}/courier \
--sharedstatedir=%{_sharedstatedir}/%{name} \
--with-piddir=%{_rundir} \
--disable-static \
--disable-root-check \
--enable-unicode \
--with-notice=unicode \
--with-authdaemonvar=%{_rundir}/courier-authlib \
--with-certdb=%{_sysconfdir}/ssl/certs \
--with-certsdir=%{_sysconfdir}/ssl/private \
--enable-workarounds-for-imap-client-bugs
make %{?_smp_mflags}
%install
%make_install
# Move daemons into sbin
mv %{buildroot}%{_bindir}/{couriertls,imapd,pop3d} %{buildroot}%{_sbindir}/
# Rename imapd.8 to courier-imapd.8
mv %{buildroot}%{_mandir}/man8/imapd.8 %{buildroot}%{_mandir}/man8/%{name}d.8
# Install PAM config files
install -D -m 644 $RPM_SOURCE_DIR/pop3.pamd %{buildroot}%{_sysconfdir}/pam.d/pop3
install -D -m 644 $RPM_SOURCE_DIR/imap.pamd %{buildroot}%{_sysconfdir}/pam.d/imap
# Install init scripts
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
ln -s -f service %{buildroot}%{_sbindir}/rccourier-$i
done
# Install service files
for j in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
install -D -m 0644 $RPM_SOURCE_DIR/courier-$j.service %{buildroot}/%{_unitdir}/courier-$j.service
done
# Remove original init scripts, will not work longer
rm %{buildroot}%{_prefix}/lib/%{name}/imapd.rc
rm %{buildroot}%{_prefix}/lib/%{name}/imapd-ssl.rc
rm %{buildroot}%{_prefix}/lib/%{name}/pop3d.rc
rm %{buildroot}%{_prefix}/lib/%{name}/pop3d-ssl.rc
#
# Fix imapd.dist
#
sed -i -e 's/^IMAPDSTART=.*/IMAPDSTART=YES/' %{buildroot}%{_sysconfdir}/courier/imapd.dist
sed -i -e 's/^ADDRESS=.*/ADDRESS=127.0.0.1/' %{buildroot}%{_sysconfdir}/courier/imapd.dist
sed -i -e 's/^MAXPERIP=.*/MAXPERIP=20/' %{buildroot}%{_sysconfdir}/courier/imapd.dist
sed -i -e 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' %{buildroot}%{_sysconfdir}/courier/imapd-ssl.dist
#sed -i -e 's/^#\ \+\(TLS_CIPHER_LIST=.*\)/\1/' %{buildroot}%{_sysconfdir}/courier/imapd-ssl.dist
sed -i -e 's/^POP3DSTART=.*/POP3DSTART=YES/' %{buildroot}%{_sysconfdir}/courier/pop3d.dist
sed -i -e 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' %{buildroot}%{_sysconfdir}/courier/pop3d-ssl.dist
#sed -i -e 's/^#\ \+\(TLS_CIPHER_LIST=.*\)/\1/' %{buildroot}%{_sysconfdir}/courier/pop3d-ssl.dist
# For %doc macro
install -m 0644 libs/imap/ChangeLog ChangeLog
install -m 0644 libs/imap/README README.imap
install -m 0644 libs/imap/README.proxy README.proxy
install -m 0644 libs/maildir/README.maildirquota.txt README.maildirquota
install -m 0644 libs/maildir/README.sharedfolders.txt README.sharedfolders
install -D -m 0755 sysconftool %{buildroot}%{_datadir}/%{name}/sysconftool
chmod 755 %{buildroot}%{_datadir}/%{name}/sysconftool
cat >%{buildroot}%{_datadir}/%{name}/configlist <<EOF
%{_sysconfdir}/courier/imapd.dist
%{_sysconfdir}/courier/imapd-ssl.dist
%{_sysconfdir}/courier/pop3d.dist
%{_sysconfdir}/courier/pop3d-ssl.dist
EOF
%pre
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_add_pre courier-$i.service
done
%preun
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_del_preun courier-$i.service
done
if [ "$1" = "0" ]; then
rm -f %{_localstatedir}/couriersslcache
rm -f %{_localstatedir}/imapd.pid
rm -f %{_localstatedir}/imapd-ssl.pid
rm -f %{_localstatedir}/imapd.pid.lock
rm -f %{_localstatedir}/imapd-ssl.pid.lock
rm -f %{_localstatedir}/pop3d.pid
rm -f %{_localstatedir}/pop3d-ssl.pid
rm -f %{_localstatedir}/pop3d.pid.lock
rm -f %{_localstatedir}/pop3d-ssl.pid.lock
fi
%post
%{_datadir}/%{name}/sysconftool `cat %{_datadir}/%{name}/configlist` >/dev/null
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_add_post courier-$i.service
done
%postun
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_del_postun courier-$i.service
done
%files
%defattr(-,root,root,755)
%license COPYING*
%doc AUTHORS libs/imap/ChangeLog libs/imap/BUGS README README.imap README.maildirquota README.proxy
%doc README.sharedfolders
%config %attr(644,root,root) %{_sysconfdir}/pam.d/imap
%config %attr(644,root,root) %{_sysconfdir}/pam.d/pop3
%dir %{_sysconfdir}/courier
%dir %{_sysconfdir}/courier/imapaccess
%dir %{_sysconfdir}/courier/shared
%dir %{_sysconfdir}/courier/shared.tmp
%config %attr(600,root,root) %{_sysconfdir}/courier/imapd*
%config %attr(600,root,root) %{_sysconfdir}/courier/pop3*
%config %{_sysconfdir}/courier/quotawarnmsg.example
%dir %{_prefix}/lib/%{name}
%{_prefix}/lib/%{name}/makedatprog
%{_prefix}/lib/%{name}/couriertcpd
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/*
%{_bindir}/*
%{_sbindir}/*
%{_mandir}/man?/*
%{_unitdir}/courier-*.service
%changelog