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
|
|
|
#
|
2013-01-17 00:35:07 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products 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
|
2012-09-21 13:57:28 +02:00
|
|
|
License: GPL-3.0
|
2007-01-16 00:07:58 +01:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
2013-01-17 00:35:07 +01:00
|
|
|
Version: 4.12.0
|
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
|
2007-01-16 00:07:58 +01:00
|
|
|
Source4: courier-imap.init
|
|
|
|
Source5: courier-imap-ssl.init
|
|
|
|
Source6: courier-pop.init
|
|
|
|
Source7: courier-pop-ssl.init
|
2009-09-02 00:10:28 +02:00
|
|
|
Source8: %{name}.firewall
|
|
|
|
Source9: %{name}-ssl.firewall
|
2013-01-17 00:35:07 +01:00
|
|
|
Patch0: %{name}-sbindir.patch
|
|
|
|
Patch2: %{name}-ulimit_conf.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
|
2010-03-07 10:55:16 +01:00
|
|
|
BuildRequires: courier-authlib-devel >= 0.62
|
2012-09-21 13:57:28 +02:00
|
|
|
BuildRequires: db-devel
|
|
|
|
BuildRequires: fam-devel
|
|
|
|
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
|
|
|
|
Requires: courier-authlib >= 0.61
|
2012-09-21 13:57:28 +02:00
|
|
|
Requires: fam-server
|
|
|
|
Requires: gdbm
|
|
|
|
Requires: openssl
|
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
|
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} \
|
|
|
|
--with-piddir=%{_localstatedir}/run \
|
2011-05-01 22:45:00 +02:00
|
|
|
--disable-static \
|
2007-01-16 00:07:58 +01:00
|
|
|
--disable-root-check \
|
|
|
|
--enable-unicode \
|
2011-09-22 01:13:58 +02:00
|
|
|
--with-authdaemonvar=%{_localstatedir}/run/courier-authlib \
|
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
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
2007-01-16 00:07:58 +01:00
|
|
|
# Move daemons into sbin
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/{couriertls,imapd,pop3d} $RPM_BUILD_ROOT%{_prefix}/sbin/
|
2007-01-16 00:07:58 +01:00
|
|
|
# Rename imapd.8 to courier-imapd.8
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__mv} $RPM_BUILD_ROOT%{_mandir}/man8/imapd.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}d.8
|
2007-01-16 00:07:58 +01:00
|
|
|
# Install PAM config files
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__install} -D -m 644 $RPM_SOURCE_DIR/pop3.pamd $RPM_BUILD_ROOT/etc/pam.d/pop3
|
|
|
|
%{__install} -D -m 644 $RPM_SOURCE_DIR/imap.pamd $RPM_BUILD_ROOT/etc/pam.d/imap
|
2007-01-16 00:07:58 +01:00
|
|
|
# Install init scripts
|
|
|
|
for i in imap imap-ssl pop pop-ssl ; do
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__install} -D -m 0755 $RPM_SOURCE_DIR/courier-$i.init $RPM_BUILD_ROOT/etc/init.d/courier-$i
|
|
|
|
%{__ln_s} -f /etc/init.d/courier-$i $RPM_BUILD_ROOT%{_prefix}/sbin/rccourier-$i
|
2007-01-16 00:07:58 +01:00
|
|
|
done
|
|
|
|
# Remove original init scripts, will not work longer
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/imapd.rc
|
|
|
|
%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/imapd-ssl.rc
|
|
|
|
%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/pop3d.rc
|
|
|
|
%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/pop3d-ssl.rc
|
2007-01-16 00:07:58 +01:00
|
|
|
#
|
|
|
|
# Fix imapd.dist
|
|
|
|
#
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__sed} -i -e 's/^IMAPDSTART=.*/IMAPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/imapd.dist
|
|
|
|
%{__sed} -i -e 's/^ADDRESS=.*/ADDRESS=127.0.0.1/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/imapd.dist
|
2009-11-16 17:49:42 +01:00
|
|
|
%{__sed} -i -e 's/^MAXPERIP=.*/MAXPERIP=20/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/imapd.dist
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__sed} -i -e 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/imapd-ssl.dist
|
|
|
|
%{__sed} -i -e 's/^#\ \+\(TLS_CIPHER_LIST=.*\)/\1/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/imapd-ssl.dist
|
|
|
|
%{__sed} -i -e 's/^POP3DSTART=.*/POP3DSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/pop3d.dist
|
|
|
|
%{__sed} -i -e 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/pop3d-ssl.dist
|
|
|
|
%{__sed} -i -e 's/^#\ \+\(TLS_CIPHER_LIST=.*\)/\1/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/pop3d-ssl.dist
|
2007-01-16 00:07:58 +01:00
|
|
|
# For %doc macro
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__install} -m 0644 imap/ChangeLog ChangeLog
|
|
|
|
%{__install} -m 0644 imap/README README.imap
|
|
|
|
%{__install} -m 0644 imap/README.proxy README.proxy
|
|
|
|
%{__install} -m 0644 maildir/README.maildirquota.txt README.maildirquota
|
|
|
|
%{__install} -m 0644 maildir/README.sharedfolders.txt README.sharedfolders
|
|
|
|
%{__install} -D -m 0755 sysconftool $RPM_BUILD_ROOT%{_datadir}/%{name}/sysconftool
|
|
|
|
%{__chmod} 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/sysconftool
|
|
|
|
%{__cat} >$RPM_BUILD_ROOT%{_datadir}/%{name}/configlist <<EOF
|
|
|
|
%{_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
|
2007-03-12 11:54:29 +01:00
|
|
|
#firewall script
|
2009-09-02 00:10:28 +02:00
|
|
|
%{__install} -D -m 644 %{S:8} $RPM_BUILD_ROOT%{_sysconfdir}/SuSEfirewall2.d/services/%{name}
|
|
|
|
%{__install} -D -m 644 %{S:9} $RPM_BUILD_ROOT%{_sysconfdir}/SuSEfirewall2.d/services/%{name}-ssl
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
%preun
|
2009-09-02 00:10:28 +02:00
|
|
|
for i in imap imap-ssl pop pop-ssl ; do
|
|
|
|
%stop_on_removal courier-$i
|
|
|
|
done
|
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
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
%postun
|
2009-09-02 00:10:28 +02:00
|
|
|
for i in imap imap-ssl pop pop-ssl ; do
|
|
|
|
%restart_on_update courier-$i
|
|
|
|
done
|
2007-01-16 00:07:58 +01:00
|
|
|
%insserv_cleanup
|
2009-09-02 00:10:28 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
%{__rm} -rf $RPM_BUILD_ROOT
|
2007-01-16 00:07:58 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,755)
|
2011-05-01 22:45:00 +02:00
|
|
|
%doc AUTHORS imap/ChangeLog COPYING* imap/BUGS README README.imap README.maildirquota README.proxy
|
2007-01-16 00:07:58 +01:00
|
|
|
%doc README.sharedfolders
|
2009-09-02 00:10:28 +02:00
|
|
|
%attr(755,root,root) /etc/init.d/courier-*
|
|
|
|
%config %attr(644,root,root) /etc/pam.d/imap
|
|
|
|
%config %attr(644,root,root) /etc/pam.d/pop3
|
|
|
|
%dir %{_sysconfdir}/courier
|
|
|
|
%config %attr(600,root,root) %{_sysconfdir}/courier/imap*
|
|
|
|
%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
|
2007-01-16 00:07:58 +01:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_mandir}/man?/*
|
2009-09-02 00:10:28 +02:00
|
|
|
%dir %{_datadir}/%{name}/
|
|
|
|
%{_datadir}/%{name}/*
|
|
|
|
%dir %{_sysconfdir}/SuSEfirewall2.d
|
|
|
|
%dir %{_sysconfdir}/SuSEfirewall2.d/services
|
|
|
|
%config %{_sysconfdir}/SuSEfirewall2.d/services/%{name}
|
|
|
|
%config %{_sysconfdir}/SuSEfirewall2.d/services/%{name}-ssl
|
2008-01-17 22:21:18 +01:00
|
|
|
|
2007-03-12 11:54:29 +01:00
|
|
|
%changelog
|