Hello community,
here is the log from the commit of package courier-imap for openSUSE:Factory
checked in at Wed Sep 2 00:10:25 CEST 2009.
--------
--- courier-imap/courier-imap.changes 2008-09-16 15:47:39.000000000 +0200
+++ courier-imap/courier-imap.changes 2009-08-24 14:15:56.000000000 +0200
@@ -1,0 +2,64 @@
+Thu Aug 20 18:40:15 CEST 2009 - chris@computersalat.de
+
+- cleanup spec file
+ o removed all #---- lines
+ o added configure macro
+- merge .spec with o:F
+- merge .changes with o:F
+
+-------------------------------------------------------------------
+Thu Aug 20 18:22:26 CEST 2009 - opensuse@cboltz.de
+
+- read ssl config files in non-ssl initscripts if TLS is enabled
+ [bnc#420972#c2]
+
+-------------------------------------------------------------------
+Tue Jul 7 13:49:32 CEST 2009 - chris@computersalat.de
+
+- fixed self prov error (imap)
+
+-------------------------------------------------------------------
+Sun May 24 02:44:35 CEST 2009 - chris@computersalat.de
+
+- new version 4.5.0
+ o Documentation refresh.
+ o pop3dserver.c: s/POP3_STLS/POP3_TLS/, for correct logging.
+ o imaprefs.c (dorefcreate): Clean up usage of rfc822_threadsearchmsg().
+ A malloc() failure wasn't checked correctly.
+ o rfc2045/rfc2045_fromfd.c: Optimize header parsing.
+ o search.c: Empty MIME entities would always match any SEARCH. Reported
+ by Dmitry Osipov.
+ o tcpd/configure.in: --without-gnutls forces suppression of GnuTLS when
+ OpenSSL is not present.
+ o tcpd/libcouriergnutls.c (tls_connect): Fix client certificate request
+ settings.
+ o tcpd/libcouriergnutls.c (set_cert): Add support for certificates
+ signed by an intermediate CA.
+ o imapwrite.c (write_error_exit): Dump fatal errors to stderr.
+- new sbindir (failed), LDFLAGS (hunk) patch
+- some spec fixes
+ o updated header
+ o updated description
+ o added ChangeLog, README.proxy
+ o fixed init install (0755)
+ o conflicts with cyrus-imapd
+- fixed init scripts
+ o removed X-United stuff
+- rpmlint stuff
+ o install-no-mkdir-buildroot
+ o removed old Obsoletes
+ o fixed non-conffile-in-etc
+
+-------------------------------------------------------------------
+Sun May 24 00:55:12 CEST 2009 - chris@computersalat.de
+
+- fixed differences of changelog
+ o my fault, added changes to spec, now fixed :)
+
+-------------------------------------------------------------------
+Sat Nov 15 15:22:56 CEST 2008 - chris@computersalat.de
+
+- some rpmlint stuff
+ o modified post: insserv courier-*
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
courier-imap-4.0.6.diff
courier-imap-4.1.1.diff
courier-imap-4.4.1.tar.bz2
New:
----
courier-imap-4.5.0-LDFLAGS.patch
courier-imap-4.5.0-sbindir.patch
courier-imap-4.5.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ courier-imap.spec ++++++
--- /var/tmp/diff_new_pack.1WjbNE/_old 2009-09-01 23:59:01.000000000 +0200
+++ /var/tmp/diff_new_pack.1WjbNE/_new 2009-09-01 23:59:01.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package courier-imap (Version 4.4.1)
+# spec file for package courier-imap (Version 4.5.0)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,21 +15,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
Name: courier-imap
-BuildRequires: courier-authlib-devel fam-devel gcc-c++ gdbm-devel libstdc++-devel openssl openssl-devel postfix procps
-Requires: fam-server
-Url: http://www.courier-mta.org/imap/
Summary: An IMAP and POP3 Server for Maildir MTAs
-Version: 4.4.1
-Release: 1
+Url: http://www.courier-mta.org/imap/
License: GPL v2 or later
-Conflicts: imap qpopper
Group: Productivity/Networking/Email/Servers
-Obsoletes: %{name}-ldap
-Provides: %{name}-ldap
+Version: 4.5.0
+Release: 1
Source: %{name}-%{version}.tar.bz2
Source1: pop3.pamd
Source2: imap.pamd
@@ -37,152 +31,172 @@
Source5: courier-imap-ssl.init
Source6: courier-pop.init
Source7: courier-pop-ssl.init
-Source8: %name.firewall
-Source9: %name-ssl.firewall
-Patch: %{name}-4.0.6.diff
-Patch1: %{name}-4.1.1.diff
+Source8: %{name}.firewall
+Source9: %{name}-ssl.firewall
+Patch: %{name}-4.5.0-sbindir.patch
+Patch1: %{name}-4.5.0-LDFLAGS.patch
Patch2: %{name}-ulimit_conf.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Prefix: /usr
-%define _sysconfdir /etc/courier
-%define _localstatedir /var/run
-%define authdaemondir %{_localstatedir}/authdaemon.courier-imap
-PreReq: coreutils
+%if 0%{?suse_version} > 910
+BuildRequires: audit-libs
+%endif
+BuildRequires: courier-authlib-devel >= 0.61
+BuildRequires: db-devel fam-devel gcc-c++ gdbm-devel libstdc++-devel
+BuildRequires: ncurses-devel openssl-devel postfix procps zlib-devel
+Conflicts: imap qpopper cyrus-imapd
+Requires: courier-authlib >= 0.61
+Requires: fam-server gdbm openssl
%description
-Courier-IMAP is a lightweight server that provides IMAP access to
-maildir mailboxes. It supports folders, custom authentication modules,
-and virtual mailboxes. A compatible POP3 server is also provided. The
-source code is based on the IMAP module in the Courier Mail Server, but
-this build is independently repackaged to work with any other MTA that
-delivers to maildir format mailboxes.
-
+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
-%patch
-%patch1
+%setup -n %{name}-%{version}
+%patch -p1
+%patch1 -p1
%patch2
%build
-%{suse_update_config}
-export CFLAGS="$RPM_OPT_FLAGS"
-./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
- --datadir=%{_datadir}/courier-imap \
- --libdir=%{_libdir} --libexecdir=%{_prefix}/lib/courier-imap \
- --localstatedir=%{_localstatedir} \
- --sharedstatedir=%{_sharedstatedir}/courier-imap --mandir=%{_mandir} \
- --infodir=%{_infodir} --with-piddir=/var/run \
+%configure \
+ --libexecdir=%{_prefix}/lib/%{name} \
+ --datadir=%{_datadir}/%{name} \
+ --sysconfdir=%{_sysconfdir}/courier \
+ --sharedstatedir=%{_sharedstatedir}/%{name} \
+ --with-piddir=%{_localstatedir}/run \
--disable-root-check \
--enable-unicode \
- --with-authdaemonvar=%{authdaemondir} \
- --enable-workarounds-for-imap-client-bugs \
- --host=%{_host} --build=%{_build} --target=%{_target_platform} \
-make
-#make check
+ --with-authdaemonvar=%{_localstatedir}/run/authdaemon.%{name} \
+ --enable-workarounds-for-imap-client-bugs
+%{__make} %{?jobs:-j%jobs}
%install
-make install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install DESTDIR=$RPM_BUILD_ROOT
# Move daemons into sbin
-mv $RPM_BUILD_ROOT%{_prefix}/bin/{couriertls,imapd,pop3d} $RPM_BUILD_ROOT%{_prefix}/sbin/
+%{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/{couriertls,imapd,pop3d} $RPM_BUILD_ROOT%{_prefix}/sbin/
# Rename imapd.8 to courier-imapd.8
-mv $RPM_BUILD_ROOT%{_mandir}/man8/imapd.8 $RPM_BUILD_ROOT%{_mandir}/man8/courier-imapd.8
+%{__mv} $RPM_BUILD_ROOT%{_mandir}/man8/imapd.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}d.8
# Install PAM config files
-mkdir -p $RPM_BUILD_ROOT/etc/pam.d
-install -m 644 $RPM_SOURCE_DIR/pop3.pamd $RPM_BUILD_ROOT/etc/pam.d/pop3
-install -m 644 $RPM_SOURCE_DIR/imap.pamd $RPM_BUILD_ROOT/etc/pam.d/imap
+%{__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
# Install init scripts
-mkdir -p $RPM_BUILD_ROOT/etc/init.d
for i in imap imap-ssl pop pop-ssl ; do
- install -m 644 $RPM_SOURCE_DIR/courier-$i.init $RPM_BUILD_ROOT/etc/init.d/courier-$i
- ln -sf /etc/init.d/courier-$i $RPM_BUILD_ROOT%{_prefix}/sbin/rccourier-$i
+ %{__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
done
# Remove original init scripts, will not work longer
-rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/imapd.rc
-rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/imapd-ssl.rc
-rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/pop3d.rc
-rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/pop3d-ssl.rc
+%{__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
#
# Fix imapd.dist
#
-%{__sed} -i -e 's/^IMAPDSTART=.*/IMAPDSTART=YES/' \
- $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
-%{__sed} -i -e 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' \
- $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
-%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
-%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
-%{__sed} -i -e 's/^POP3DSTART=.*/POP3DSTART=YES/' \
- $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
-%{__sed} -i -e 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' \
- $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
-%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
-%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
+%{__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
+%{__sed} -i -e 's/^MAXPERIP=.*/MAXPERIP=10/' $RPM_BUILD_ROOT%{_sysconfdir}/courier/imapd.dist
+%{__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
# For %doc macro
-install -m 644 imap/README README.imap
-install -m 644 maildir/README.maildirquota.txt README.maildirquota
-install -m 644 maildir/README.sharedfolders.txt README.sharedfolders
-install -d $RPM_BUILD_ROOT%{_datadir}/courier-imap
-install -m 755 sysconftool $RPM_BUILD_ROOT%{_datadir}/courier-imap/sysconftool
-cat >$RPM_BUILD_ROOT%{_datadir}/courier-imap/configlist <$RPM_BUILD_ROOT%{_datadir}/%{name}/configlist </dev/null
+%{__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
%preun
-%stop_on_removal courier-imap courier-imap-ssl courier-pop courier-pop-ssl
+for i in imap imap-ssl pop pop-ssl ; do
+ %stop_on_removal courier-$i
+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
+ %{__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
-exit 0
+
+%post
+%{_datadir}/%{name}/sysconftool `%{__cat} %{_datadir}/%{name}/configlist` >/dev/null
+
+%preun
+for i in imap imap-ssl pop pop-ssl ; do
+ %stop_on_removal courier-$i
+done
%postun
-%restart_on_update courier-imap courier-imap-ssl courier-pop courier-pop-ssl
+for i in imap imap-ssl pop pop-ssl ; do
+ %restart_on_update courier-$i
+done
%insserv_cleanup
-exit 0
+
+%clean
+%{__rm} -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,755)
-%doc AUTHORS COPYING imap/BUGS README README.imap README.maildirquota
+%doc AUTHORS ChangeLog COPYING imap/BUGS README README.imap README.maildirquota README.proxy
%doc README.sharedfolders
-%attr(755 root,root) /etc/init.d/courier-*
-%attr(644,root,root) /etc/pam.d/imap
-%attr(644,root,root) /etc/pam.d/pop3
-%dir %{_sysconfdir}
-%config %{_sysconfdir}/imap*
-%config %{_sysconfdir}/pop3*
-%config %{_sysconfdir}/quotawarnmsg.example
-%dir %{_prefix}/lib/courier-imap
-%{_prefix}/lib/courier-imap/makedatprog
-%{_prefix}/lib/courier-imap/couriertcpd
+%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
%{_bindir}/*
%{_sbindir}/*
%{_mandir}/man?/*
-%dir %{_datadir}/courier-imap/
-%{_datadir}/courier-imap/*
-%config /etc/sysconfig/SuSEfirewall2.d/services/%name
-%config /etc/sysconfig/SuSEfirewall2.d/services/%name-ssl
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+%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
%changelog
++++++ courier-imap-4.5.0-LDFLAGS.patch ++++++
diff -ruN courier-imap-4.5.0-orig/bdbobj/Makefile.in courier-imap-4.5.0/bdbobj/Makefile.in
--- courier-imap-4.5.0-orig/bdbobj/Makefile.in 2009-02-15 21:32:16.000000000 +0000
+++ courier-imap-4.5.0/bdbobj/Makefile.in 2009-05-23 23:32:58.804205116 +0000
@@ -228,7 +228,6 @@
@FOUND_DB_TRUE@testbdb_SOURCES = $(TESTBDBSOURCES)
@FOUND_DB_TRUE@testbdb_DEPENDENCIES = libbdbobj.la
@FOUND_DB_TRUE@testbdb_LDADD = libbdbobj.la
-@FOUND_DB_TRUE@testbdb_LDFLAGS = -static
@FOUND_DB_FALSE@noinst_SCRIPTS = notfound
EXTRA_DIST = $(LIBDBOBJSOURCES) $(TESTBDBSOURCES) testsuite testsuite.txt
all: config.h
diff -ruN courier-imap-4.5.0-orig/gdbmobj/Makefile.in courier-imap-4.5.0/gdbmobj/Makefile.in
--- courier-imap-4.5.0-orig/gdbmobj/Makefile.in 2009-02-15 21:32:21.000000000 +0000
+++ courier-imap-4.5.0/gdbmobj/Makefile.in 2009-05-23 23:32:58.804205116 +0000
@@ -229,7 +229,6 @@
@FOUND_GDBM_TRUE@testgdbm_SOURCES = $(TESTGDBMSOURCES)
@FOUND_GDBM_TRUE@testgdbm_DEPENDENCIES = libgdbmobj.la
@FOUND_GDBM_TRUE@testgdbm_LDADD = libgdbmobj.la
-@FOUND_GDBM_TRUE@testgdbm_LDFLAGS = -static
@FOUND_GDBM_FALSE@noinst_SCRIPTS = notfound
EXTRA_DIST = $(LIBGDBMSOURCES) $(TESTGDBMSOURCES) testsuite testsuite.txt
all: config.h
diff -ruN courier-imap-4.5.0-orig/imap/Makefile.in courier-imap-4.5.0/imap/Makefile.in
--- courier-imap-4.5.0-orig/imap/Makefile.in 2009-05-10 12:35:56.000000000 +0000
+++ courier-imap-4.5.0/imap/Makefile.in 2009-05-23 23:32:58.808205296 +0000
@@ -296,7 +296,6 @@
libimaplogin_la_LIBADD = ../tcpd/libspipe.la ../tcpd/libtlsclient.la \
../numlib/libnumlib.la
-libimaplogin_la_LDFLAGS = -static
libimapd_la_SOURCES = mainloop.c imaptoken.c imaptoken.h imapwrite.c \
imapwrite.h capability.c externalauth.c smap.c smapsnapshot.c
@@ -304,7 +303,6 @@
../rfc822/librfc822.la ../liblock/liblock.la ../numlib/libnumlib.la \
../unicode/libunicode.la
-libimapd_la_LDFLAGS = -static
imaplogin_SOURCES = imaplogin.c authenticate_auth.c proxy.c proxy.h
imaplogin_DEPENDENCIES = libimapd.la libimaplogin.la
imaplogin_LDADD = libimapd.la libimaplogin.la \
@@ -334,7 +332,6 @@
../numlib/libnumlib.la
libpop3d_la_DEPENDENCIES = $(libpop3d_la_LIBADD)
-libpop3d_la_LDFLAGS = -static
pop3d_SOURCES = pop3dserver.c pop3dcapa.c
pop3d_DEPENDENCIES = libpop3d.la
pop3d_LDADD = libpop3d.la @LDAUTH@ -lcourierauth
diff -ruN courier-imap-4.5.0-orig/libhmac/Makefile.in courier-imap-4.5.0/libhmac/Makefile.in
--- courier-imap-4.5.0-orig/libhmac/Makefile.in 2009-02-15 21:32:32.000000000 +0000
+++ courier-imap-4.5.0/libhmac/Makefile.in 2009-05-23 23:32:58.808205296 +0000
@@ -217,11 +217,9 @@
md5hmactest_SOURCES = md5hmactest.c
md5hmactest_DEPENDENCIES = libhmac.la @hashlibs@
md5hmactest_LDADD = $(md5hmactest_DEPENDENCIES)
-md5hmactest_LDFLAGS = -static
sha1hmactest_SOURCES = sha1hmactest.c
sha1hmactest_DEPENDENCIES = libhmac.la @hashlibs@
sha1hmactest_LDADD = $(sha1hmactest_DEPENDENCIES)
-sha1hmactest_LDFLAGS = -static
EXTRA_DIST = md5hmactest.txt sha1hmactest.txt
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff -ruN courier-imap-4.5.0-orig/liblock/Makefile.in courier-imap-4.5.0/liblock/Makefile.in
--- courier-imap-4.5.0-orig/liblock/Makefile.in 2009-02-15 21:32:37.000000000 +0000
+++ courier-imap-4.5.0/liblock/Makefile.in 2009-05-23 23:32:58.812205476 +0000
@@ -223,7 +223,6 @@
lockmail_SOURCES = lockmail.c
lockmail_DEPENDENCIES = liblock.la ../numlib/libnumlib.la
lockmail_LDADD = liblock.la ../numlib/libnumlib.la
-lockmail_LDFLAGS = -static
noinst_DATA = lockmail.html lockmail.1
EXTRA_DIST = lockfcntl.c lockflock.c locklockf.c locktest.c $(noinst_DATA)
all: config.h
diff -ruN courier-imap-4.5.0-orig/maildir/Makefile.in courier-imap-4.5.0/maildir/Makefile.in
--- courier-imap-4.5.0-orig/maildir/Makefile.in 2009-02-15 21:32:42.000000000 +0000
+++ courier-imap-4.5.0/maildir/Makefile.in 2009-05-23 23:32:58.812205476 +0000
@@ -317,7 +317,6 @@
../numlib/libnumlib.la
deliverquota_LDADD = libmaildir.la ../rfc822/librfc822.la ../numlib/libnumlib.la
-deliverquota_LDFLAGS = -static
maildirmake_SOURCES = maildirmake.c
maildirmake_DEPENDENCIES = libmaildir.la ../numlib/libnumlib.la \
../rfc822/librfc822.la
@@ -325,15 +324,12 @@
maildirmake_LDADD = libmaildir.la ../numlib/libnumlib.la \
../rfc822/librfc822.la
-maildirmake_LDFLAGS = -static
testmaildirfilter_SOURCES = maildirfiltertypelist.h testmaildirfilter.c
testmaildirfilter_DEPENDENCIES = libmaildir.la ../numlib/libnumlib.la
testmaildirfilter_LDADD = libmaildir.la ../numlib/libnumlib.la @LIBPCRE@
-testmaildirfilter_LDFLAGS = -static
maildirkwtest_SOURCES = maildirkwtest.c
maildirkwtest_LDADD = libmaildir.la
maildirkwtest_DEPENDENCIES = libmaildir.la
-maildirkwtest_LDFLAGS = -static
maildirkw_SOURCES = maildirkw.c
maildirkw_LDADD = libmaildir.la ../liblock/liblock.la ../numlib/libnumlib.la \
`cat maildir.libdeps`
@@ -341,7 +337,6 @@
maildirkw_DEPENDENCIES = libmaildir.la ../liblock/liblock.la \
../numlib/libnumlib.la maildir.libdeps
-maildirkw_LDFLAGS = -static
maildiracl = maildiracl.c
maildiracl_LDADD = libmaildir.la ../liblock/liblock.la ../numlib/libnumlib.la \
`cat maildir.libdeps`
@@ -349,7 +344,6 @@
maildiracl_DEPENDENCIES = libmaildir.la ../liblock/liblock.la \
../numlib/libnumlib.la maildir.libdeps
-maildiracl_LDFLAGS = -static
maildiraclttest_SOURCES = testmaildiraclt.c
maildiraclttest_LDADD = libmaildir.la ../liblock/liblock.la \
../numlib/libnumlib.la `cat maildir.libdeps`
@@ -357,7 +351,6 @@
maildiraclttest_DEPENDENCIES = libmaildir.la ../liblock/liblock.la \
../numlib/libnumlib.la maildir.libdeps
-maildiraclttest_LDFLAGS = -static
EXTRA_DIST = README.maildirquota.html README.maildirquota.txt \
README.imapkeywords.html \
README.maildirfilter.html \
diff -ruN courier-imap-4.5.0-orig/makedat/Makefile.in courier-imap-4.5.0/makedat/Makefile.in
--- courier-imap-4.5.0-orig/makedat/Makefile.in 2009-02-15 21:32:47.000000000 +0000
+++ courier-imap-4.5.0/makedat/Makefile.in 2009-05-23 23:32:58.812205476 +0000
@@ -205,7 +205,6 @@
makedatprog_SOURCES = makedatprog.c
makedatprog_DEPENDENCIES = @dblibrary@
makedatprog_LDADD = @dblibrary@
-makedatprog_LDFLAGS = -static
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff -ruN courier-imap-4.5.0-orig/md5/Makefile.in courier-imap-4.5.0/md5/Makefile.in
--- courier-imap-4.5.0-orig/md5/Makefile.in 2009-02-15 21:32:52.000000000 +0000
+++ courier-imap-4.5.0/md5/Makefile.in 2009-05-23 23:32:58.816205656 +0000
@@ -213,7 +213,6 @@
md5test_SOURCES = md5test.c
md5test_DEPENDENCIES = libmd5.la
md5test_LDADD = libmd5.la
-md5test_LDFLAGS = -static
EXTRA_DIST = md5test.txt hmac.c
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff -ruN courier-imap-4.5.0-orig/rfc1035/Makefile.in courier-imap-4.5.0/rfc1035/Makefile.in
--- courier-imap-4.5.0-orig/rfc1035/Makefile.in 2009-02-15 21:33:07.000000000 +0000
+++ courier-imap-4.5.0/rfc1035/Makefile.in 2009-05-23 23:32:58.816205656 +0000
@@ -244,7 +244,6 @@
testlookup_LDADD = librfc1035.a ../soxwrap/libsoxwrap.a ../md5/libmd5.la \
../random128/librandom128.la `cat ../soxwrap/soxlibs.dep`
-testlookup_LDFLAGS = -static
EXTRA_DIST = testsuite.txt
testspf_SOURCES = testspf.c
testspf_DEPENDENCIES = librfc1035.a ../md5/libmd5.la \
@@ -255,7 +254,6 @@
../random128/librandom128.la ../soxwrap/libsoxwrap.a \
`cat ../soxwrap/soxlibs.dep`
-testspf_LDFLAGS = -static
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff -ruN courier-imap-4.5.0-orig/rfc2045/Makefile.in courier-imap-4.5.0/rfc2045/Makefile.in
--- courier-imap-4.5.0-orig/rfc2045/Makefile.in 2009-02-15 21:33:12.000000000 +0000
+++ courier-imap-4.5.0/rfc2045/Makefile.in 2009-05-23 23:32:58.820205836 +0000
@@ -254,15 +254,12 @@
@UNICODE_LIB@ ../numlib/libnumlib.la
reformime_DEPENDENCIES = $(reformime_LDADD)
-reformime_LDFLAGS = -static
makemime_SOURCES = makemime.c
makemime_LDADD = ../rfc822/libencode.la ../rfc822/librfc822.la librfc2045.la @UNICODE_LIB@ ../numlib/libnumlib.la
makemime_DEPENDENCIES = $(makemime_LDADD)
-makemime_LDFLAGS = -static
headercheck_SOURCES = headercheck.c
headercheck_LDADD = librfc2045.la ../rfc822/librfc822.la ../numlib/libnumlib.la
headercheck_DEPENDENCIES = $(headercheck_LDADD)
-headercheck_LDFLAGS = -static
all: $(BUILT_SOURCES) rfc2045_config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff -ruN courier-imap-4.5.0-orig/rfc822/Makefile.in courier-imap-4.5.0/rfc822/Makefile.in
--- courier-imap-4.5.0-orig/rfc822/Makefile.in 2009-02-15 21:33:18.000000000 +0000
+++ courier-imap-4.5.0/rfc822/Makefile.in 2009-05-23 23:32:58.820205836 +0000
@@ -229,11 +229,9 @@
testsuite_SOURCES = testsuite.c
testsuite_DEPENDENCIES = librfc822.la
testsuite_LDADD = librfc822.la
-testsuite_LDFLAGS = -static
reftest_SOURCES = reftest.c imaprefs.h
reftest_DEPENDENCIES = librfc822.la
reftest_LDADD = librfc822.la
-reftest_LDFLAGS = -static
EXTRA_DIST = testsuite.txt reftest.txt $(BUILT_SOURCES)
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff -ruN courier-imap-4.5.0-orig/sha1/Makefile.in courier-imap-4.5.0/sha1/Makefile.in
--- courier-imap-4.5.0-orig/sha1/Makefile.in 2009-05-09 22:57:56.000000000 +0000
+++ courier-imap-4.5.0/sha1/Makefile.in 2009-05-23 23:32:58.824206016 +0000
@@ -213,7 +213,6 @@
testsuite_SOURCES = testsuite.c
testsuite_DEPENDENCIES = libsha1.la
testsuite_LDADD = $(testsuite_DEPENDENCIES)
-testsuite_LDFLAGS = -static
EXTRA_DIST = testsuite.txt hmac.c
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff -ruN courier-imap-4.5.0-orig/tcpd/Makefile.in courier-imap-4.5.0/tcpd/Makefile.in
--- courier-imap-4.5.0-orig/tcpd/Makefile.in 2009-02-15 21:33:32.000000000 +0000
+++ courier-imap-4.5.0/tcpd/Makefile.in 2009-05-23 23:32:58.824206016 +0000
@@ -286,11 +286,9 @@
../md5/libmd5.la ../random128/librandom128.la \
$(couriertcpd_t:%=-Wl,%)
-couriertcpd_LDFLAGS = -static
tlscachetest_SOURCES = tlscachetest.c
tlscachetest_DEPENDENCIES = ../numlib/libnumlib.la ../liblock/liblock.la
tlscachetest_LDADD = ../numlib/libnumlib.la ../liblock/liblock.la
-tlscachetest_LDFLAGS = -static
libspipe_la_SOURCES = spipe.c spipe.h
couriertls_SOURCES = starttls.c argparse.c argparse.h
couriertls_t = @soxdep@
@@ -304,7 +302,6 @@
../numlib/libnumlib.la ../liblock/liblock.la \
../soxwrap/libsoxwrap.a $(couriertls_t:%=-Wl,%)
-couriertls_LDFLAGS = -static
libcouriertlsopenssl_la_SOURCES = libcouriertls.c libcouriertls.h tlsinfo.c
libcouriertlsopenssl_la_LIBADD = @openssldep@
libcouriertlsgnutls_la_SOURCES = libcouriergnutls.c tlsinfo.c
diff -ruN courier-imap-4.5.0-orig/unicode/Makefile.in courier-imap-4.5.0/unicode/Makefile.in
--- courier-imap-4.5.0-orig/unicode/Makefile.in 2009-02-15 21:33:37.000000000 +0000
+++ courier-imap-4.5.0/unicode/Makefile.in 2009-05-23 23:32:58.828206195 +0000
@@ -230,7 +230,6 @@
unicode_info_SOURCES = unicodeinfo.c
unicode_info_DEPENDENCIES = libunicode.la
unicode_info_LDADD = libunicode.la
-unicode_info_LDFLAGS = -static
ISO8859CFILES = iso88591.c iso88592.c iso88593.c iso88594.c iso88595.c\
iso88596.c iso88597.c iso88598.c iso88599.c iso885910.c iso885913.c\
iso885914.c iso885915.c
++++++ courier-imap-4.5.0-sbindir.patch ++++++
diff -ruN courier-imap-4.5.0-orig/imap/imapd.8.in courier-imap-4.5.0/imap/imapd.8.in
--- courier-imap-4.5.0-orig/imap/imapd.8.in 2009-05-10 14:49:43.000000000 +0000
+++ courier-imap-4.5.0/imap/imapd.8.in 2009-05-23 23:29:28.286737791 +0000
@@ -174,11 +174,11 @@
.SH "Synopsis"
.fam C
.HP \w'\fB@libexecdir@/couriertcpd\fR\ 'u
-\fB@libexecdir@/couriertcpd\fR {couriertcpd\ options} {@prefix@/sbin/imaplogin} [\fImodules\fR...] {@prefix@/bin/imapd} {\&./Maildir}
+\fB@libexecdir@/couriertcpd\fR {couriertcpd\ options} {@prefix@/sbin/imaplogin} [\fImodules\fR...] {@prefix@/sbin/imapd} {\&./Maildir}
.fam
.fam C
-.HP \w'\fB@prefix@/bin/imapd\fR\ 'u
-\fB@prefix@/bin/imapd\fR {\&./Maildir}
+.HP \w'\fB@prefix@/sbin/imapd\fR\ 'u
+\fB@prefix@/sbin/imapd\fR {\&./Maildir}
.fam
.SH "DESCRIPTION"
.PP
diff -ruN courier-imap-4.5.0-orig/imap/imapd-ssl.dist.in courier-imap-4.5.0/imap/imapd-ssl.dist.in
--- courier-imap-4.5.0-orig/imap/imapd-ssl.dist.in 2008-07-12 20:17:24.000000000 +0000
+++ courier-imap-4.5.0/imap/imapd-ssl.dist.in 2009-05-23 23:29:50.251725614 +0000
@@ -102,7 +102,7 @@
##NAME: COURIERTLS:0
#
-COURIERTLS=@bindir@/couriertls
+COURIERTLS=@sbindir@/couriertls
##NAME: TLS_PROTOCOL:0
#
diff -ruN courier-imap-4.5.0-orig/imap/pop3d-ssl.dist.in courier-imap-4.5.0/imap/pop3d-ssl.dist.in
--- courier-imap-4.5.0-orig/imap/pop3d-ssl.dist.in 2008-07-12 20:17:25.000000000 +0000
+++ courier-imap-4.5.0/imap/pop3d-ssl.dist.in 2009-05-23 23:30:09.800604775 +0000
@@ -87,7 +87,7 @@
# at your own risk. Only the basic SSL/TLS functionality is known to be
# working. Keep this in mind as you play with the following variables.
-COURIERTLS=@bindir@/couriertls
+COURIERTLS=@sbindir@/couriertls
##NAME: TLS_PROTOCOL:0
#
++++++ courier-imap-4.4.1.tar.bz2 -> courier-imap-4.5.0.tar.bz2 ++++++
++++ 230893 lines of diff (skipped)
++++++ courier-imap-ssl.init ++++++
--- /var/tmp/diff_new_pack.1WjbNE/_old 2009-09-01 23:59:06.000000000 +0200
+++ /var/tmp/diff_new_pack.1WjbNE/_new 2009-09-01 23:59:07.000000000 +0200
@@ -9,7 +9,9 @@
### BEGIN INIT INFO
# Provides: courier-imap-ssl
# Required-Start: $syslog $remote_fs courier-authdaemon
+# Should-Start:
# Required-Stop: $syslog $remote_fs
+# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Courier-IMAP server for SSL connections
@@ -31,80 +33,113 @@
test "$MAILDIRPATH" == "" && MAILDIRPATH=Maildir
test "$PIDFILE" == "" && PIDFILE=/var/run/imapd.pid
test "$SSLPIDFILE" == "" && SSLPIDFILE=/var/run/imapd-ssl.pid
+LOCKFILE=${SSLPIDFILE}.lock
# Reset status of this service
rc_reset
+# our version of check_proc
+#IN: $PIDFILE $LOCKFILE
+check_proc(){
+ # check for process
+ ps auxw | grep -v grep | grep $1 >/dev/null
+ RET=$?
+ if [ $RET = "1" ]; then
+ if [ -f $1 ]; then
+ ERR=1
+ elif [ -f $2 ]; then
+ ERR=2
+ else
+ ERR=3
+ fi
+ else
+ ERR=$RET
+ fi
+ STATUS=$ERR
+ return $STATUS
+}
+
case "$1" in
start)
- /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
+ /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
echo -n "Starting Courier-IMAP (SSL)"
if test ! -f $TLS_CERTFILE
- then
+ then
echo -n " generating-SSL-certificate..."
- /usr/sbin/mkimapdcert >/dev/null
- if( test $? -gt 0 )
- then
- echo "problem with mkimapdcert"
- exit 1
- fi
- fi
- if test "$TLS_CACHEFILE" != ""
- then
+ /usr/sbin/mkimapdcert >/dev/null 2>&1
+ fi
+ if test "$TLS_CACHEFILE" != ""
+ then
rm -f $TLS_CACHEFILE
- fi
+ fi
umask $IMAP_UMASK
ulimit -v $IMAP_ULIMITD
/usr/bin/env - /bin/sh -c " set -a ;
. /etc/courier/imapd ; \
. /etc/courier/imapd-ssl ; \
- IMAP_TLS=1;\
+ IMAP_TLS=1; export IMAP_TLS; \
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
/usr/sbin/courierlogger -pid=$SSLPIDFILE -start $SSLLOGGEROPTS \
/usr/lib/courier-imap/couriertcpd -address=$SSLADDRESS \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP $TCPDOPTS \
$SSLPORT $COURIERTLS -server -tcpd /usr/sbin/imaplogin \
$IMAP_BIN ${MAILDIRPATH}"
+
+ # Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down Courier-IMAP (SSL)"
/usr/sbin/courierlogger -pid=$SSLPIDFILE -stop
+
+ # Remember status and be verbose
rc_status -v
rm -f $SSLPIDFILE{,.lock}
;;
try-restart)
$0 status >/dev/null && $0 restart
+
+ # Remember status
rc_status
;;
restart)
$0 stop
$0 start
+
+ # Remember status
rc_status
;;
force-reload)
echo -n "Reload Courier-IMAP (SSL)"
$0 stop && $0 start
+
+ # Remember status
rc_status
;;
reload)
echo -n "Reload Courier-IMAP (SSL)"
rc_failed 3
+
+ # Remember status and be verbose
rc_status -v
;;
status)
echo -n "Checking for Courier-IMAP (SSL)"
- /sbin/checkproc -k -p $PIDFILE /usr/sbin/courierlogger
- if [ $? -eq 7 ]; then
- rc_failed 3
- fi;
- rc_status -v
- ;;
- probe)
- test /etc/courier/imapd -nt $SSLPIDFILE && echo restart
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Status has a slightly different for the status command:
+ # 0 - service running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running
+ check_proc "$SSLPIDFILE" "$LOCKFILE"
+
+ # Remeber status and be verbose
+ rc_status -v
;;
*)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
++++++ courier-imap.init ++++++
--- /var/tmp/diff_new_pack.1WjbNE/_old 2009-09-01 23:59:07.000000000 +0200
+++ /var/tmp/diff_new_pack.1WjbNE/_new 2009-09-01 23:59:07.000000000 +0200
@@ -9,7 +9,9 @@
### BEGIN INIT INFO
# Provides: courier-imap
# Required-Start: $syslog $remote_fs courier-authdaemon
+# Should-Start:
# Required-Stop: $syslog $remote_fs
+# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Courier-IMAP server
@@ -27,64 +29,105 @@
. /etc/courier/imapd
test "$MAILDIRPATH" == "" && MAILDIRPATH=Maildir
test "$PIDFILE" == "" && PIDFILE=/var/run/imapd.pid
+LOCKFILE=${PIDFILE}.lock
# Reset status of this service
rc_reset
+# our version of check_proc
+#IN: $PIDFILE $LOCKFILE
+check_proc(){
+ # check for process
+ ps auxw | grep -v grep | grep $1 >/dev/null
+ RET=$?
+ if [ $RET = "1" ]; then
+ if [ -f $1 ]; then
+ ERR=1
+ elif [ -f $2 ]; then
+ ERR=2
+ else
+ ERR=3
+ fi
+ else
+ ERR=$RET
+ fi
+ STATUS=$ERR
+ return $STATUS
+}
+
case "$1" in
start)
- /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
+ /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
echo -n "Starting Courier-IMAP "
umask $IMAP_UMASK
ulimit -v $IMAP_ULIMITD
/usr/bin/env - /bin/sh -c " set -a ;
. /etc/courier/imapd ; \
+ grep IMAPDSTARTTLS=NO /etc/courier/imapd-ssl &>/dev/null || . /etc/courier/imapd-ssl ; \
+ IMAP_STARTTLS=$IMAPDSTARTTLS ; export IMAP_STARTTLS ; \
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
+ TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
/usr/sbin/courierlogger -pid=$PIDFILE -start $LOGGEROPTS \
/usr/lib/courier-imap/couriertcpd -address=$ADDRESS \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP $TCPDOPTS \
$PORT /usr/sbin/imaplogin \
$IMAP_BIN ${MAILDIRPATH}"
+
+ # Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down Courier-IMAP "
/usr/sbin/courierlogger -pid=$PIDFILE -stop
+
+ # Remember status and be verbose
rc_status -v
rm -f $PIDFILE{,.lock}
;;
try-restart)
$0 status >/dev/null && $0 restart
+
+ # Remember status
rc_status
;;
restart)
$0 stop
$0 start
+
+ # Remember status
rc_status
;;
force-reload)
echo -n "Reload Courier-IMAP "
$0 stop && $0 start
+
+ # Remember status
rc_status
;;
reload)
echo -n "Reload Courier-IMAP "
rc_failed 3
+
+ # Remember status and be verbose
rc_status -v
;;
status)
echo -n "Checking for Courier-IMAP "
- /sbin/checkproc -k -p $PIDFILE /usr/sbin/courierlogger
- if [ $? -eq 7 ]; then
- rc_failed 3
- fi;
- rc_status -v
- ;;
- probe)
- test /etc/courier/imapd -nt $PIDFILE && echo restart
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Status has a slightly different for the status command:
+ # 0 - service running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running
+ check_proc "$PIDFILE" "$LOCKFILE"
+
+ # Remember status and be verbose
+ rc_status -v
;;
*)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
++++++ courier-pop-ssl.init ++++++
--- /var/tmp/diff_new_pack.1WjbNE/_old 2009-09-01 23:59:07.000000000 +0200
+++ /var/tmp/diff_new_pack.1WjbNE/_new 2009-09-01 23:59:07.000000000 +0200
@@ -9,7 +9,9 @@
### BEGIN INIT INFO
# Provides: courier-pop-ssl
# Required-Start: $syslog $remote_fs courier-authdaemon
+# Should-Start:
# Required-Stop: $syslog $remote_fs
+# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Courier-POP3 server for SSL connections
@@ -31,23 +33,40 @@
test "$MAILDIRPATH" == "" && MAILDIRPATH=Maildir
test "$PIDFILE" == "" && PIDFILE=/var/run/pop3d.pid
test "$SSLPIDFILE" == "" && PIDFILE=/var/run/pop3d-ssl.pid
+LOCKFILE=${SSLPIDFILE}.lock
# Reset status of this service
rc_reset
+# our version of check_proc
+#IN: $PIDFILE $LOCKFILE
+check_proc(){
+ # check for process
+ ps auxw | grep -v grep | grep $1 >/dev/null
+ RET=$?
+ if [ $RET = "1" ]; then
+ if [ -f $1 ]; then
+ ERR=1
+ elif [ -f $2 ]; then
+ ERR=2
+ else
+ ERR=3
+ fi
+ else
+ ERR=$RET
+ fi
+ STATUS=$ERR
+ return $STATUS
+}
+
case "$1" in
start)
- /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
+ /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
echo -n "Starting Courier-POP3 (SSL)"
if test ! -f $TLS_CERTFILE
then
echo -n " generating-SSL-certificate..."
/usr/sbin/mkpop3dcert >/dev/null 2>&1
- if( test $? -gt 0 )
- then
- echo "problem with mkpop3dcert"
- exit 1
- fi
fi
if test "$TLS_CACHEFILE" != ""
then
@@ -59,51 +78,67 @@
. /etc/courier/pop3d-ssl ; \
POP3_TLS=1; POP3_STARTTLS=NO; POP3_TLS_REQUIRED=0; \
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
- /usr/sbin/courierlogger -pid=$SSLPIDFILE -start $LOGGEROPTS \
+ /usr/sbin/courierlogger -pid=$SSLPIDFILE -start $SSLLOGGEROPTS \
/usr/lib/courier-imap/couriertcpd -address=$SSLADDRESS \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP $TCPDOPTS \
- $SSLPORT $COURIERTLS -server -tcpd \
- /usr/sbin/pop3login $POP3_BIN ${MAILDIRPATH}"
+ $SSLPORT $COURIERTLS -server -tcpd /usr/sbin/pop3login \
+ $POP3_BIN ${MAILDIRPATH}"
+
+ # Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down Courier-POP3 (SSL)"
/usr/sbin/courierlogger -pid=$SSLPIDFILE -stop
+
+ # Remember status and be verbose
rc_status -v
rm -f $SSLPIDFILE{,.lock}
;;
try-restart)
$0 status >/dev/null && $0 restart
+
+ # Remeber status
rc_status
;;
restart)
$0 stop
$0 start
+
+ # Remeber status
rc_status
;;
force-reload)
echo -n "Reload Courier-POP3 (SSL)"
$0 stop && $0 start
+
+ # Remeber status
rc_status
;;
reload)
echo -n "Reload Courier-POP3 (SSL)"
rc_failed 3
+
+ # Remember status and be verbose
rc_status -v
;;
status)
echo -n "Checking for Courier-POP3 (SSL)"
- /sbin/checkproc -k -p $PIDFILE /usr/sbin/courierlogger
- if [ $? -eq 7 ]; then
- rc_failed 3
- fi;
- rc_status -v
- ;;
- probe)
- test /etc/courier/pop3d -nt $SSLPIDFILE && echo restart
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Status has a slightly different for the status command:
+ # 0 - service running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running
+ check_proc "$SSLPIDFILE" "$LOCKFILE"
+
+ #Remeber status and be verbose
+ rc_status -v
;;
*)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
++++++ courier-pop.init ++++++
--- /var/tmp/diff_new_pack.1WjbNE/_old 2009-09-01 23:59:07.000000000 +0200
+++ /var/tmp/diff_new_pack.1WjbNE/_new 2009-09-01 23:59:07.000000000 +0200
@@ -29,62 +29,103 @@
. /etc/courier/pop3d
test "$MAILDIRPATH" == "" && MAILDIRPATH=Maildir
test "$PIDFILE" == "" && PIDFILE=/var/run/pop3d.pid
+LOCKFILE=${PIDFILE}.lock
# Reset status of this service
rc_reset
+# our version of check_proc
+#IN: $PIDFILE $LOCKFILE
+check_proc(){
+ # check for process
+ ps auxw | grep -v grep | grep $1 >/dev/null
+ RET=$?
+ if [ $RET = "1" ]; then
+ if [ -f $1 ]; then
+ ERR=1
+ elif [ -f $2 ]; then
+ ERR=2
+ else
+ ERR=3
+ fi
+ else
+ ERR=$RET
+ fi
+ STATUS=$ERR
+ return $STATUS
+}
+
case "$1" in
start)
- /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
+ /etc/init.d/courier-authdaemon status > /dev/null || /etc/init.d/courier-authdaemon start
echo -n "Starting Courier-POP3 "
/usr/bin/env - /bin/sh -c " set -a ;
. /etc/courier/pop3d ; \
+ grep POP3_STARTTLS=NO /etc/courier/pop3d-ssl &>/dev/null || . /etc/courier/pop3d-ssl ; \
+ POP3_STARTTLS=$POP3_STARTTLS ; export POP3_STARTTLS ; \
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
+ TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
/usr/sbin/courierlogger -pid=$PIDFILE -start $LOGGEROPTS \
/usr/lib/courier-imap/couriertcpd -address=$ADDRESS \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP $TCPDOPTS \
$PORT /usr/sbin/pop3login \
$POP3_BIN ${MAILDIRPATH}"
+
+ # Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down Courier-POP3 "
/usr/sbin/courierlogger -pid=$PIDFILE -stop
+
+ # Remember status and be verbose
rc_status -v
rm -f $PIDFILE{,.lock}
;;
try-restart)
$0 status >/dev/null && $0 restart
+
+ # Remember status
rc_status
;;
restart)
$0 stop
$0 start
+
+ # Remember status
rc_status
;;
force-reload)
echo -n "Reload Courier-POP3 "
$0 stop && $0 start
+
+ # Remember status
rc_status
;;
reload)
echo -n "Reload Courier-POP3 "
rc_failed 3
+
+ # Remember status and be verbose
rc_status -v
;;
status)
echo -n "Checking for Courier-POP3 "
- /sbin/checkproc -k -p $PIDFILE /usr/sbin/courierlogger
- if [ $? -eq 7 ]; then
- rc_failed 3
- fi;
- rc_status -v
- ;;
- probe)
- test /etc/courier/pop3d -nt $PIDFILE && echo restart
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Status has a slightly different for the status command:
+ # 0 - service running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running
+ check_proc "$PIDFILE" "$LOCKFILE"
+
+ #Remeber status and be verbose
+ rc_status -v
;;
*)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org