2007-01-16 00:07:58 +01:00
|
|
|
#
|
2011-05-01 22:45:00 +02:00
|
|
|
# spec file for package courier-imap
|
2007-01-16 00:07:58 +01:00
|
|
|
#
|
2019-07-22 02:14:29 +02:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:07:58 +01:00
|
|
|
#
|
2008-10-13 16:17:32 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-01-16 00:07:58 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-04-07 17:20:24 +02:00
|
|
|
|
2007-01-16 00:07:58 +01:00
|
|
|
Name: courier-imap
|
|
|
|
Summary: An IMAP and POP3 Server for Maildir MTAs
|
2019-07-22 02:14:29 +02:00
|
|
|
License: GPL-3.0-or-later
|
2007-01-16 00:07:58 +01:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
2017-12-04 15:22:21 +01:00
|
|
|
Version: 4.18.2
|
2012-09-21 13:57:28 +02:00
|
|
|
Release: 0
|
2009-11-16 17:49:42 +01:00
|
|
|
Url: http://www.courier-mta.org/imap/
|
2012-09-21 13:57:28 +02:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
2013-01-17 00:35:07 +01:00
|
|
|
Source1: %{name}-%{version}.tar.bz2.sig
|
|
|
|
Source2: pop3.pamd
|
|
|
|
Source3: imap.pamd
|
2014-03-15 23:52:41 +01:00
|
|
|
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
|
2013-01-17 00:35:07 +01:00
|
|
|
Patch0: %{name}-sbindir.patch
|
|
|
|
Patch2: %{name}-ulimit_conf.patch
|
2015-08-05 03:50:05 +02:00
|
|
|
### Patch for upstream:
|
|
|
|
## fixes typo in Makefile.am
|
|
|
|
Patch3: %{name}-Makefile.patch
|
2019-02-06 10:18:30 +01:00
|
|
|
# PATCH-FIX-UPSTEAM https://github.com/svarshavchik/courier-libs/pull/10
|
|
|
|
Patch4: reproducible.patch
|
2007-01-16 00:07:58 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2009-09-02 00:10:28 +02:00
|
|
|
%if 0%{?suse_version} > 910
|
|
|
|
BuildRequires: audit-libs
|
|
|
|
%endif
|
2017-12-04 15:22:21 +01:00
|
|
|
BuildRequires: courier-authlib-devel >= 0.68
|
|
|
|
BuildRequires: courier-unicode-devel >= 2.0
|
2012-09-21 13:57:28 +02:00
|
|
|
BuildRequires: db-devel
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?suse_version} >= 1220
|
2014-01-09 10:56:37 +01:00
|
|
|
BuildRequires: gamin-devel
|
2014-03-15 23:52:41 +01:00
|
|
|
%else
|
|
|
|
BuildRequires: fam-devel
|
|
|
|
%endif
|
2012-09-21 13:57:28 +02:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gdbm-devel
|
|
|
|
BuildRequires: libstdc++-devel
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: postfix
|
|
|
|
BuildRequires: procps
|
|
|
|
BuildRequires: zlib-devel
|
2010-07-21 10:07:09 +02:00
|
|
|
# openssl itself for /usr/bin/openssl configure check
|
|
|
|
BuildRequires: openssl
|
2009-09-02 00:10:28 +02:00
|
|
|
Conflicts: imap qpopper cyrus-imapd
|
2017-12-04 15:22:21 +01:00
|
|
|
Requires: courier-authlib >= 0.68
|
2012-09-21 13:57:28 +02:00
|
|
|
Requires: fam-server
|
|
|
|
Requires: gdbm
|
|
|
|
Requires: openssl
|
2007-01-16 00:07:58 +01:00
|
|
|
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?suse_version} >= 1210
|
2019-06-17 07:43:09 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2014-03-15 23:52:41 +01:00
|
|
|
%{?systemd_requires}
|
|
|
|
%define has_systemd 1
|
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:07:58 +01:00
|
|
|
%description
|
2009-09-02 00:10:28 +02:00
|
|
|
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.
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2009-09-02 00:10:28 +02:00
|
|
|
%setup -n %{name}-%{version}
|
2012-09-21 13:57:28 +02:00
|
|
|
%patch0
|
2007-11-21 22:13:50 +01:00
|
|
|
%patch2
|
2015-08-05 03:50:05 +02:00
|
|
|
%patch3
|
2019-02-06 10:18:30 +01:00
|
|
|
%patch4 -p1
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
%build
|
2009-09-02 00:10:28 +02:00
|
|
|
%configure \
|
|
|
|
--libexecdir=%{_prefix}/lib/%{name} \
|
|
|
|
--datadir=%{_datadir}/%{name} \
|
|
|
|
--sysconfdir=%{_sysconfdir}/courier \
|
|
|
|
--sharedstatedir=%{_sharedstatedir}/%{name} \
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
--with-piddir=/run \
|
|
|
|
%else
|
2009-09-02 00:10:28 +02:00
|
|
|
--with-piddir=%{_localstatedir}/run \
|
2014-03-15 23:52:41 +01:00
|
|
|
%endif
|
2011-05-01 22:45:00 +02:00
|
|
|
--disable-static \
|
2007-01-16 00:07:58 +01:00
|
|
|
--disable-root-check \
|
|
|
|
--enable-unicode \
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
--with-authdaemonvar=/run/courier-authlib \
|
|
|
|
%else
|
2011-09-22 01:13:58 +02:00
|
|
|
--with-authdaemonvar=%{_localstatedir}/run/courier-authlib \
|
2014-03-15 23:52:41 +01:00
|
|
|
%endif
|
2010-07-21 10:07:09 +02:00
|
|
|
--with-certdb=%{_sysconfdir}/ssl/certs \
|
2010-09-21 23:39:34 +02:00
|
|
|
--with-certsdir=%{_sysconfdir}/ssl/private \
|
2009-09-02 00:10:28 +02:00
|
|
|
--enable-workarounds-for-imap-client-bugs
|
2011-05-01 22:45:00 +02:00
|
|
|
%{__make} %{_smp_mflags}
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
%install
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__make} install DESTDIR=%{buildroot}
|
2007-01-16 00:07:58 +01:00
|
|
|
# Move daemons into sbin
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__mv} %{buildroot}%{_prefix}/bin/{couriertls,imapd,pop3d} %{buildroot}%{_prefix}/sbin/
|
2007-01-16 00:07:58 +01:00
|
|
|
# Rename imapd.8 to courier-imapd.8
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__mv} %{buildroot}%{_mandir}/man8/imapd.8 %{buildroot}%{_mandir}/man8/%{name}d.8
|
2007-01-16 00:07:58 +01:00
|
|
|
# Install PAM config files
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__install} -D -m 644 $RPM_SOURCE_DIR/pop3.pamd %{buildroot}/etc/pam.d/pop3
|
|
|
|
%{__install} -D -m 644 $RPM_SOURCE_DIR/imap.pamd %{buildroot}/etc/pam.d/imap
|
2007-01-16 00:07:58 +01:00
|
|
|
# Install init scripts
|
2017-03-04 18:49:08 +01:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
|
|
|
|
%{__ln_s} -f service %{buildroot}%{_prefix}/sbin/rccourier-$i
|
|
|
|
done
|
|
|
|
%else
|
2007-01-16 00:07:58 +01:00
|
|
|
for i in imap imap-ssl pop pop-ssl ; do
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__install} -D -m 0755 $RPM_SOURCE_DIR/courier-$i.init %{buildroot}/etc/init.d/courier-$i
|
|
|
|
%{__ln_s} -f /etc/init.d/courier-$i %{buildroot}%{_prefix}/sbin/rccourier-$i
|
|
|
|
done
|
2017-03-04 18:49:08 +01:00
|
|
|
%endif
|
2014-03-15 23:52:41 +01:00
|
|
|
# Install service files
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
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
|
2007-01-16 00:07:58 +01:00
|
|
|
done
|
2014-03-15 23:52:41 +01:00
|
|
|
%endif
|
2007-01-16 00:07:58 +01:00
|
|
|
# Remove original init scripts, will not work longer
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__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
|
2007-01-16 00:07:58 +01:00
|
|
|
#
|
|
|
|
# Fix imapd.dist
|
|
|
|
#
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__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
|
2007-01-16 00:07:58 +01:00
|
|
|
# For %doc macro
|
2013-11-13 08:51:30 +01:00
|
|
|
%{__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
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__install} -D -m 0755 sysconftool %{buildroot}%{_datadir}/%{name}/sysconftool
|
|
|
|
%{__chmod} 755 %{buildroot}%{_datadir}/%{name}/sysconftool
|
|
|
|
%{__cat} >%{buildroot}%{_datadir}/%{name}/configlist <<EOF
|
2009-09-02 00:10:28 +02:00
|
|
|
%{_sysconfdir}/courier/imapd.dist
|
|
|
|
%{_sysconfdir}/courier/imapd-ssl.dist
|
|
|
|
%{_sysconfdir}/courier/pop3d.dist
|
|
|
|
%{_sysconfdir}/courier/pop3d-ssl.dist
|
2007-01-16 00:07:58 +01:00
|
|
|
EOF
|
2014-03-15 23:52:41 +01:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
|
|
|
|
%service_add_pre courier-$i.service
|
|
|
|
done
|
|
|
|
%endif
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
%preun
|
2017-03-04 18:49:08 +01:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
|
|
|
|
%service_del_preun courier-$i.service
|
|
|
|
done
|
|
|
|
%else
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
for i in imap imap-ssl pop pop-ssl; do
|
2009-09-02 00:10:28 +02:00
|
|
|
%stop_on_removal courier-$i
|
|
|
|
done
|
2014-03-15 23:52:41 +01:00
|
|
|
%endif
|
|
|
|
%endif
|
2007-01-16 00:07:58 +01:00
|
|
|
if [ "$1" = "0" ]; then
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__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
|
2007-01-16 00:07:58 +01:00
|
|
|
fi
|
2009-09-02 00:10:28 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
%{_datadir}/%{name}/sysconftool `%{__cat} %{_datadir}/%{name}/configlist` >/dev/null
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
|
|
|
|
%service_add_post courier-$i.service
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:07:58 +01:00
|
|
|
%postun
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
|
|
|
|
%service_del_postun courier-$i.service
|
|
|
|
done
|
2017-03-04 18:49:08 +01:00
|
|
|
%else
|
|
|
|
for i in imap imap-ssl pop pop-ssl; do
|
|
|
|
%restart_on_update courier-$i
|
|
|
|
done
|
|
|
|
%insserv_cleanup
|
2014-03-15 23:52:41 +01:00
|
|
|
%endif
|
2009-09-02 00:10:28 +02:00
|
|
|
|
|
|
|
%clean
|
2014-03-15 23:52:41 +01:00
|
|
|
%{__rm} -rf %{buildroot}
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,755)
|
2013-11-13 08:51:30 +01:00
|
|
|
%doc AUTHORS libs/imap/ChangeLog COPYING* libs/imap/BUGS README README.imap README.maildirquota README.proxy
|
2007-01-16 00:07:58 +01:00
|
|
|
%doc README.sharedfolders
|
2017-03-04 18:49:08 +01:00
|
|
|
%if !0%{?has_systemd}
|
2009-09-02 00:10:28 +02:00
|
|
|
%attr(755,root,root) /etc/init.d/courier-*
|
2017-03-04 18:49:08 +01:00
|
|
|
%endif
|
2009-09-02 00:10:28 +02:00
|
|
|
%config %attr(644,root,root) /etc/pam.d/imap
|
|
|
|
%config %attr(644,root,root) /etc/pam.d/pop3
|
|
|
|
%dir %{_sysconfdir}/courier
|
2015-08-05 03:50:05 +02:00
|
|
|
%dir %{_sysconfdir}/courier/imapaccess
|
|
|
|
%dir %{_sysconfdir}/courier/shared
|
|
|
|
%dir %{_sysconfdir}/courier/shared.tmp
|
|
|
|
%config %attr(600,root,root) %{_sysconfdir}/courier/imapd*
|
2009-09-02 00:10:28 +02:00
|
|
|
%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
|
2014-03-15 23:52:41 +01:00
|
|
|
%dir %{_datadir}/%{name}/
|
|
|
|
%{_datadir}/%{name}/*
|
2007-01-16 00:07:58 +01:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_mandir}/man?/*
|
2014-03-15 23:52:41 +01:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{_unitdir}/courier-*.service
|
|
|
|
%endif
|
2008-01-17 22:21:18 +01:00
|
|
|
|
2007-03-12 11:54:29 +01:00
|
|
|
%changelog
|