From 49551189e58c4c03f6b88a48ba1ee58ae864a203d767cea926adeceef3b7ba93 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 1 Sep 2009 22:10:28 +0000 Subject: [PATCH] Accepting request 18563 from server:mail Copy from server:mail/courier-imap based on submit request 18563 from user hennevogel OBS-URL: https://build.opensuse.org/request/show/18563 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/courier-imap?expand=0&rev=18 --- courier-imap-4.0.6.diff | 56 ----- courier-imap-4.1.1.diff | 147 ------------ courier-imap-4.4.1.tar.bz2 | 3 - courier-imap-4.5.0-LDFLAGS.patch | 246 +++++++++++++++++++ courier-imap-4.5.0-sbindir.patch | 42 ++++ courier-imap-4.5.0.tar.bz2 | 3 + courier-imap-ssl.init | 79 +++++-- courier-imap.changes | 64 +++++ courier-imap.init | 63 ++++- courier-imap.spec | 392 ++++++++++--------------------- courier-pop-ssl.init | 71 ++++-- courier-pop.init | 61 ++++- 12 files changed, 699 insertions(+), 528 deletions(-) delete mode 100644 courier-imap-4.0.6.diff delete mode 100644 courier-imap-4.1.1.diff delete mode 100644 courier-imap-4.4.1.tar.bz2 create mode 100644 courier-imap-4.5.0-LDFLAGS.patch create mode 100644 courier-imap-4.5.0-sbindir.patch create mode 100644 courier-imap-4.5.0.tar.bz2 diff --git a/courier-imap-4.0.6.diff b/courier-imap-4.0.6.diff deleted file mode 100644 index 82bdb0a..0000000 --- a/courier-imap-4.0.6.diff +++ /dev/null @@ -1,56 +0,0 @@ ---- bdbobj/Makefile.in -+++ bdbobj/Makefile.in -@@ -225,7 +225,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 ---- gdbmobj/Makefile.in -+++ gdbmobj/Makefile.in -@@ -226,7 +226,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 ---- imap/imapd-ssl.dist.in -+++ imap/imapd-ssl.dist.in -@@ -102,7 +102,7 @@ - ##NAME: COURIERTLS:0 - # - --COURIERTLS=@bindir@/couriertls -+COURIERTLS=@sbindir@/couriertls - - ##NAME: TLS_PROTOCOL:0 - # ---- imap/imapd.8.in -+++ imap/imapd.8.in -@@ -17,9 +17,9 @@ - imapd - Courier-IMAP server - .SH "SYNOPSIS" - .HP 25 --\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} - .HP 19 --\fB@prefix@/bin/imapd\fR {\./Maildir} -+\fB@prefix@/sbin/imapd\fR {\./Maildir} - .SH "DESCRIPTION" - .PP - ---- imap/pop3d-ssl.dist.in -+++ imap/pop3d-ssl.dist.in -@@ -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 - # diff --git a/courier-imap-4.1.1.diff b/courier-imap-4.1.1.diff deleted file mode 100644 index 5863417..0000000 --- a/courier-imap-4.1.1.diff +++ /dev/null @@ -1,147 +0,0 @@ ---- imap/imapd-ssl.dist.in -+++ imap/imapd-ssl.dist.in -@@ -254,7 +254,7 @@ - # - # This is an experimental feature. - --TLS_CERTFILE=@mydatadir@/imapd.pem -+TLS_CERTFILE=@sysconfdir@/imapd.pem - - ##NAME: TLS_TRUSTCERTS:0 - # ---- imap/mkimapdcert.in -+++ imap/mkimapdcert.in -@@ -18,19 +18,19 @@ - - prefix="@prefix@" - --if test -f @mydatadir@/imapd.pem -+if test -f @sysconfdir@/imapd.pem - then -- echo "@mydatadir@/imapd.pem already exists." -+ echo "@sysconfdir@/imapd.pem already exists." - exit 1 - fi - - umask 077 - - cleanup() { -- rm -f @mydatadir@/imapd.pem -- rm -f @mydatadir@/imapd.rand -- rm -f @mydatadir@/imapd.key -- rm -f @mydatadir@/imapd.cert -+ rm -f @sysconfdir@/imapd.pem -+ rm -f @sysconfdir@/imapd.rand -+ rm -f @sysconfdir@/imapd.key -+ rm -f @sysconfdir@/imapd.cert - exit 1 - } - -@@ -38,21 +38,21 @@ - - if test "@ssllib@" = "openssl" - then -- cp /dev/null @mydatadir@/imapd.pem -- chmod 600 @mydatadir@/imapd.pem -- chown @mailuser@ @mydatadir@/imapd.pem -+ cp /dev/null @sysconfdir@/imapd.pem -+ chmod 600 @sysconfdir@/imapd.pem -+ chown @mailuser@ @sysconfdir@/imapd.pem - -- dd if=@RANDOMV@ of=@mydatadir@/imapd.rand count=1 2>/dev/null -+ dd if=@RANDOMV@ of=@sysconfdir@/imapd.rand count=1 2>/dev/null - @OPENSSL@ req -new -x509 -days 365 -nodes \ -- -config @sysconfdir@/imapd.cnf -out @mydatadir@/imapd.pem -keyout @mydatadir@/imapd.pem || cleanup -- @OPENSSL@ gendh -rand @mydatadir@/imapd.rand 512 >>@mydatadir@/imapd.pem || cleanup -- @OPENSSL@ x509 -subject -dates -fingerprint -noout -in @mydatadir@/imapd.pem || cleanup -- rm -f @mydatadir@/imapd.rand -+ -config @sysconfdir@/imapd.cnf -out @sysconfdir@/imapd.pem -keyout @sysconfdir@/imapd.pem || cleanup -+ @OPENSSL@ gendh -rand @sysconfdir@/imapd.rand 512 >>@sysconfdir@/imapd.pem || cleanup -+ @OPENSSL@ x509 -subject -dates -fingerprint -noout -in @sysconfdir@/imapd.pem || cleanup -+ rm -f @sysconfdir@/imapd.rand - else -- cp /dev/null @mydatadir@/imapd.key -- chmod 600 @mydatadir@/imapd.key -- cp /dev/null @mydatadir@/imapd.cert -- chmod 600 @mydatadir@/imapd.cert -+ cp /dev/null @sysconfdir@/imapd.key -+ chmod 600 @sysconfdir@/imapd.key -+ cp /dev/null @sysconfdir@/imapd.cert -+ chmod 600 @sysconfdir@/imapd.cert - - @CERTTOOL@ --generate-privkey --outfile imapd.key - @CERTTOOL@ --generate-self-signed --load-privkey imapd.key --outfile imapd.cert --template @sysconfdir@/imapd.cnf ---- imap/mkpop3dcert.in -+++ imap/mkpop3dcert.in -@@ -18,41 +18,41 @@ - - prefix="@prefix@" - --if test -f @mydatadir@/pop3d.pem -+if test -f @sysconfdir@/pop3d.pem - then -- echo "@mydatadir@/pop3d.pem already exists." -+ echo "@sysconfdir@/pop3d.pem already exists." - exit 1 - fi - - umask 077 - - cleanup() { -- rm -f @mydatadir@/pop3d.pem -- rm -f @mydatadir@/pop3d.rand -- rm -f @mydatadir@/pop3d.key -- rm -f @mydatadir@/pop3d.cert -+ rm -f @sysconfdir@/pop3d.pem -+ rm -f @sysconfdir@/pop3d.rand -+ rm -f @sysconfdir@/pop3d.key -+ rm -f @sysconfdir@/pop3d.cert - exit 1 - } - --cd @mydatadir@ -+cd @sysconfdir@ - - if test "@ssllib@" = "openssl" - then -- cp /dev/null @mydatadir@/pop3d.pem -- chmod 600 @mydatadir@/pop3d.pem -- chown @mailuser@ @mydatadir@/pop3d.pem -+ cp /dev/null @sysconfdir@/pop3d.pem -+ chmod 600 @sysconfdir@/pop3d.pem -+ chown @mailuser@ @sysconfdir@/pop3d.pem - -- dd if=@RANDOMV@ of=@mydatadir@/pop3d.rand count=1 2>/dev/null -+ dd if=@RANDOMV@ of=@sysconfdir@/pop3d.rand count=1 2>/dev/null - @OPENSSL@ req -new -x509 -days 365 -nodes \ -- -config @sysconfdir@/pop3d.cnf -out @mydatadir@/pop3d.pem -keyout @mydatadir@/pop3d.pem || cleanup -- @OPENSSL@ gendh -rand @mydatadir@/pop3d.rand 512 >>@mydatadir@/pop3d.pem || cleanup -- @OPENSSL@ x509 -subject -dates -fingerprint -noout -in @mydatadir@/pop3d.pem || cleanup -- rm -f @mydatadir@/pop3d.rand -+ -config @sysconfdir@/pop3d.cnf -out @sysconfdir@/pop3d.pem -keyout @sysconfdir@/pop3d.pem || cleanup -+ @OPENSSL@ gendh -rand @sysconfdir@/pop3d.rand 512 >>@sysconfdir@/pop3d.pem || cleanup -+ @OPENSSL@ x509 -subject -dates -fingerprint -noout -in @sysconfdir@/pop3d.pem || cleanup -+ rm -f @sysconfdir@/pop3d.rand - else -- cp /dev/null @mydatadir@/pop3d.key -- chmod 600 @mydatadir@/pop3d.key -- cp /dev/null @mydatadir@/pop3d.cert -- chmod 600 @mydatadir@/pop3d.cert -+ cp /dev/null @sysconfdir@/pop3d.key -+ chmod 600 @sysconfdir@/pop3d.key -+ cp /dev/null @sysconfdir@/pop3d.cert -+ chmod 600 @sysconfdir@/pop3d.cert - - @CERTTOOL@ --generate-privkey --outfile pop3d.key - @CERTTOOL@ --generate-self-signed --load-privkey pop3d.key --outfile pop3d.cert --template @sysconfdir@/pop3d.cnf ---- imap/pop3d-ssl.dist.in -+++ imap/pop3d-ssl.dist.in -@@ -241,7 +241,7 @@ - # - # This is an experimental feature. - --TLS_CERTFILE=@mydatadir@/pop3d.pem -+TLS_CERTFILE=@sysconfdir@/pop3d.pem - - ##NAME: TLS_TRUSTCERTS:0 - # diff --git a/courier-imap-4.4.1.tar.bz2 b/courier-imap-4.4.1.tar.bz2 deleted file mode 100644 index 8240725..0000000 --- a/courier-imap-4.4.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7cff71f0aaf34ea8dc6823550dadf62def4f616b750548bf0512f12d1b4725f -size 3383036 diff --git a/courier-imap-4.5.0-LDFLAGS.patch b/courier-imap-4.5.0-LDFLAGS.patch new file mode 100644 index 0000000..48edd2b --- /dev/null +++ b/courier-imap-4.5.0-LDFLAGS.patch @@ -0,0 +1,246 @@ +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 diff --git a/courier-imap-4.5.0-sbindir.patch b/courier-imap-4.5.0-sbindir.patch new file mode 100644 index 0000000..7a8b003 --- /dev/null +++ b/courier-imap-4.5.0-sbindir.patch @@ -0,0 +1,42 @@ +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 + # diff --git a/courier-imap-4.5.0.tar.bz2 b/courier-imap-4.5.0.tar.bz2 new file mode 100644 index 0000000..61e1f5f --- /dev/null +++ b/courier-imap-4.5.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d7de2ba6d5f7fa2e7ac4bfeb053055e127234c3442a09f36aa5dd71b9f44ffa +size 3565751 diff --git a/courier-imap-ssl.init b/courier-imap-ssl.init index 9816c8b..8a79721 100644 --- a/courier-imap-ssl.init +++ b/courier-imap-ssl.init @@ -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 @@ TLS_CACHEFILE="" 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 diff --git a/courier-imap.changes b/courier-imap.changes index d761ad2..dc0b5ab 100644 --- a/courier-imap.changes +++ b/courier-imap.changes @@ -1,3 +1,67 @@ +------------------------------------------------------------------- +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-* + ------------------------------------------------------------------- Tue Sep 16 15:43:41 CEST 2008 - hvogel@suse.de diff --git a/courier-imap.init b/courier-imap.init index ded8e18..f03ea41 100644 --- a/courier-imap.init +++ b/courier-imap.init @@ -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 @@ test -x $IMAP_BIN || exit 5 . /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 diff --git a/courier-imap.spec b/courier-imap.spec index f5e04b9..17a572c 100644 --- a/courier-imap.spec +++ b/courier-imap.spec @@ -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,298 +31,172 @@ Source4: courier-imap.init 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 -* Tue Sep 16 2008 hvogel@suse.de -- Fix init scripts without ssl to not include ssl config files - [bnc#420972] -* Fri Sep 12 2008 hvogel@suse.de -- Fix protocol names in firewall service files [bnc#425216] -* Mon Sep 08 2008 hvogel@suse.de -- update to 4.4.1 - * Update descriptions of maildir quotas - * Use the couriertls library to invoke couriertls. SASL - authentication did not correctly handle the special case of "=" - passed as the initial response to indicate an empty initial - response. Switch to the new auth_sasl_ex() API. - * Check the environment variables for subject fields set by - couriertls. Advertise the AUTH EXTERNAL capability, if they - are set. - * Optimize IMAP keyword implementation. Faster results in exchange - for a concurrency tradeoff if two concurrent sessions attempt to - update keywords for the same message at the same time - * Backslashed special characters in address names weren't being - dequoted correctly - * Add a timeout to the POP3 login stage - * Fix SSL initialization - * Fix TLS session caching -* Mon Apr 14 2008 aj@suse.de -- Remove executable permissions from README files. -* Wed Apr 02 2008 hvogel@suse.de -- update to version 4.3.1 - * make SSL23 default tls protocol - * update description of SSL/TLS-related settings - * introduce IMAP_MAILBOX_SANITY_CHECK - * Explicitly make stderr line-buffered - * Suppress spurious error message in imap.c -- fix some rpmlint warnings -* Thu Jan 17 2008 mskibbe@suse.de -- update to version 4.3.0 which - o Fix some Bugs - o Fix SSL session caching bug - o Make skew check more reliable - o code cleanup -* Wed Nov 21 2007 mskibbe@suse.de -- Bug 342601 - courier-imap rc and config bugs -* Fri Nov 16 2007 mskibbe@suse.de -- Bug 341267 - courier-imap-ssl configuration problems -* Mon Oct 22 2007 sbrabec@suse.cz -- Use correct SuSEfirewall2 rule directory. -* Wed Apr 25 2007 mskibbe@suse.de -- update to version 4.1.3 which includes: - o fix memory leak - o checks for malloc failures - o updated man pages - o cleaned up configure script - o bug fixes -* Mon Apr 23 2007 mskibbe@suse.de -- SuSEfirewall2 service file installed in wrong dir/broken - (#266949) -* Thu Mar 29 2007 rguenther@suse.de -- add procps BuildRequries because of interesting configure checks -* Mon Mar 26 2007 rguenther@suse.de -- add gdbm-devel BuildRequires -* Wed Mar 14 2007 mskibbe@suse.de -- fam has no address, rejected by xinetd, when called from - courier-imap (#253437) -* Fri Mar 02 2007 mskibbe@suse.de -- courier : Support for FATE #300687: Ports for SuSEfirewall added - via packages (#250575) -- fix file list -- update to version 2.1.2 which - o Clarify some error messages - o Try to log bandwidth usage before getting killed by a signal - o Fix many compiler warnings - o Fix segfault if non-cert files were found in the cert dir - o Added koi8-u character set -* Mon Feb 12 2007 mskibbe@suse.de -- fix mkpop3dcert and mkimapdcert. Now they use pem files from - /etc/courier-imap/ -* Mon Feb 05 2007 mskibbe@suse.de -- Courier generates certificates in /usr/share/courier-imap - (#241937) -* Mon Jan 22 2007 mskibbe@suse.de -- checkproc uses -p parameter not as specified in man page - (#230806) -* Mon Sep 11 2006 tpatzig@suse.de -- Add Conflict to qpopper -* Tue Aug 01 2006 mskibbe@suse.de -- update to version 4.1.1 which - o fixed some compiler warnings - o fix segfault if non-cert files were found in the cert dir - o Added koi8-u character set - o fix quota calculations on 32 bit platforms with 64 bit off_t - o Don't assume that connect() of a non-blocking socket always - fails with INPROGRESS -* Wed Jan 25 2006 mls@suse.de -- converted neededforbuild to BuildRequires -* Tue Dec 06 2005 kukuk@suse.de -- Don't link static -* Mon Nov 14 2005 kukuk@suse.de -- Add postfix to nfb to fix location of sendmail [#133327] -* Wed Nov 02 2005 kukuk@suse.de -- Update to version 4.0.6 -* Fri Sep 23 2005 kukuk@suse.de -- Fix imapd and pop3d init scripte for SSL connections [#113213] -* Mon Sep 19 2005 kukuk@suse.de -- Update to version 4.0.5 -* Fri Aug 26 2005 kukuk@suse.de -- Rename courier-pop3* init scripts to courier-pop* to be - LSB conform -- Source imapd-ssl and pop3-ssl from init scripts [#113213], - use correct SSLPIDFILE variable and add path to checkproc -* Wed Aug 03 2005 kukuk@suse.de -- Update to version 4.0.4 -* Thu Jul 21 2005 kukuk@suse.de -- Use Maildir from config file [#94231] -- If user removed PIDFILE entry from config file, set default - one [#85845] -* Thu Nov 18 2004 kukuk@suse.de -- Update to release 3.0.8 -* Mon Nov 15 2004 kukuk@suse.de -- Use common-* PAM config files for imap and pop3 -* Mon Sep 06 2004 kukuk@suse.de -- Fix permission of /usr/lib/courier-imap/authlib/authdaemond.ldap - [#44721] -* Mon Aug 16 2004 kukuk@suse.de -- Update to bug fix release 3.0.7 -* Wed May 12 2004 kukuk@suse.de -- Update to 3.0.3 -* Thu Mar 25 2004 mmj@suse.de -- Add postfix to # neededforbuild -* Wed Mar 17 2004 kukuk@suse.de -- Update to 3.0.2: vpopmail password fixes, filesystem/ACL fixes -* Mon Mar 08 2004 kukuk@suse.de -- Update to official 3.0.0 release -* Mon Feb 09 2004 kukuk@suse.de -- Update to official 2.2.1 release -* Sat Jan 10 2004 adrian@suse.de -- build as user -* Fri Aug 29 2003 kukuk@suse.de -- Add conflict with imap package -* Tue Aug 26 2003 kukuk@suse.de -- Fix typo in spec file -- Update to 2.1.1 -* Sun Aug 03 2003 aj@suse.de -- Package sysconftool also. -* Fri Aug 01 2003 kukuk@suse.de -- Rename imapd.8 to courier-imapd.8 to resolve file conflicts. -* Wed Jul 30 2003 kukuk@suse.de -- Initial version diff --git a/courier-pop-ssl.init b/courier-pop-ssl.init index 156806a..bab00ff 100644 --- a/courier-pop-ssl.init +++ b/courier-pop-ssl.init @@ -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 @@ TLS_CACHEFILE="" 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 @@ case "$1" in . /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 diff --git a/courier-pop.init b/courier-pop.init index a42ae4c..7e49a23 100644 --- a/courier-pop.init +++ b/courier-pop.init @@ -29,62 +29,103 @@ test -x $POP3_BIN || exit 5 . /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