summaryrefslogtreecommitdiff
path: root/mail/courier-imap
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-04-28 18:15:20 +0000
committerjlam <jlam@pkgsrc.org>2006-04-28 18:15:20 +0000
commit62c264453a3952560fb5ce5bd8a0ce9c131a2a2f (patch)
tree4602cb178e08fd2c0234df003db61f5597052875 /mail/courier-imap
parent391391511b32be6c37664f655dfe7457b9742cda (diff)
downloadpkgsrc-62c264453a3952560fb5ce5bd8a0ce9c131a2a2f.tar.gz
Update mail/courier-imap to 4.1.0. Changes from version 4.0.6 include:
+ Install some more of the HTML documentation in the location expected by courier-mta. + Moved the default locations for the imapd and pop3d SSL certificates into ${PKG_SYSCONFDIR}. These paths may be changed directly in the imapd-ssl and pop3d-ssl configuration files by modifying TLS_CERTFILE. * New capability to control announcements of IMAP ACL support when starting imapd. * Optimization: Skip going through the motions of outputting the results of a SORT if the number of sorted messages is 0. * Have CREATE and RENAME also create courierimapuidlist. * Log total bytes sent/received in IMAP and POP3 sessions.
Diffstat (limited to 'mail/courier-imap')
-rw-r--r--mail/courier-imap/DEINSTALL10
-rw-r--r--mail/courier-imap/INSTALL38
-rw-r--r--mail/courier-imap/Makefile69
-rw-r--r--mail/courier-imap/PLIST16
-rw-r--r--mail/courier-imap/distinfo13
-rwxr-xr-xmail/courier-imap/files/courierimap.sh35
-rwxr-xr-xmail/courier-imap/files/courierimaps.sh51
-rwxr-xr-xmail/courier-imap/files/courierpop.sh35
-rwxr-xr-xmail/courier-imap/files/courierpops.sh51
-rw-r--r--mail/courier-imap/patches/patch-aa12
-rw-r--r--mail/courier-imap/patches/patch-ad6
-rw-r--r--mail/courier-imap/patches/patch-ak12
12 files changed, 200 insertions, 148 deletions
diff --git a/mail/courier-imap/DEINSTALL b/mail/courier-imap/DEINSTALL
index 3cc31ac4528..88a72993be1 100644
--- a/mail/courier-imap/DEINSTALL
+++ b/mail/courier-imap/DEINSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: DEINSTALL,v 1.6 2005/02/18 22:12:46 jlam Exp $
+# $NetBSD: DEINSTALL,v 1.7 2006/04/28 18:15:20 jlam Exp $
case ${STAGE} in
DEINSTALL)
@@ -8,10 +8,10 @@ DEINSTALL)
#
if ${TEST} -x ./+FILES; then
for file in \
+ ${PKG_SYSCONFDIR}/imapd.pem \
${PKG_SYSCONFDIR}/imapd.rand \
- ${PKG_SYSCONFDIR}/pop3d.rand \
- @SSLCERTS@/imapd.pem \
- @SSLCERTS@/pop3d.pem
+ ${PKG_SYSCONFDIR}/pop3d.pem \
+ ${PKG_SYSCONFDIR}/pop3d.rand
do
${ECHO} "# FILE: $file . /dev/null" >> ./+FILES
done
@@ -19,7 +19,7 @@ DEINSTALL)
;;
POST-DEINSTALL)
- couriersslcache="@VARBASE@/couriersslcache"
+ couriersslcache="@COURIER_STATEDIR@/couriersslcache"
if ${TEST} -f "$couriersslcache"; then
# Unconditionally remove the SSL cache file.
${ECHO} "Removing Courier SSL cache file:"
diff --git a/mail/courier-imap/INSTALL b/mail/courier-imap/INSTALL
new file mode 100644
index 00000000000..c1cb26deff7
--- /dev/null
+++ b/mail/courier-imap/INSTALL
@@ -0,0 +1,38 @@
+# $NetBSD: INSTALL,v 1.4 2006/04/28 18:15:20 jlam Exp $
+
+case ${STAGE} in
+POST-INSTALL)
+ TLS_CERTFILE=
+ oldcert="@SSLCERT@/imapd.pem"
+ newcert="@PKG_SYSCONFDIR@/imapd.pem"
+ if ${TEST} -f @PKG_SYSCONFDIR@/imapd-ssl; then
+ . @PKG_SYSCONFDIR@/imapd-ssl
+ if "$TLS_CERTFILE" != "$newcert"; then
+ imapdmsg="$oldcert -> $newcert"
+ fi
+ fi
+ TLS_CERTFILE=
+ oldcert="@SSLCERT@/pop3d.pem"
+ newcert="@PKG_SYSCONFDIR@/pop3d.pem"
+ if ${TEST} -f @PKG_SYSCONFDIR@/pop3d-ssl; then
+ . @PKG_SYSCONFDIR@/pop3d-ssl
+ if "$TLS_CERTFILE" != "$newcert"; then
+ pop3dmsg="$oldcert -> $newcert"
+ fi
+ fi
+ if ${TEST} -n "$imapdmsg" -o -n "$pop3dmsg"; then
+ ${CAT} << EOF
+===========================================================================
+
+If you are upgrading Courier-IMAP from a previous version, please note
+that the default locations of the SSL certificates for the IMAP and
+POP3 servers have moved:
+
+ $imapdmsg
+ $pop3dmsg
+
+===========================================================================
+EOF
+ fi
+ ;;
+esac
diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile
index 86514b63b8b..eda6baae610 100644
--- a/mail/courier-imap/Makefile
+++ b/mail/courier-imap/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.52 2006/04/22 09:22:10 rillig Exp $
+# $NetBSD: Makefile,v 1.53 2006/04/28 18:15:20 jlam Exp $
-DISTNAME= courier-imap-4.0.6
-PKGREVISION= 1
+DISTNAME= courier-imap-4.1.0
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
EXTRACT_SUFX= .tar.bz2
@@ -10,7 +9,7 @@ MAINTAINER= jlam@pkgsrc.org
COMMENT= IMAP server for access to maildir-style mailboxes
HOMEPAGE= http://www.courier-mta.org/imap/
-DEPENDS+= courier-maildir>=0.52.1:../../mail/courier-maildir
+DEPENDS+= courier-maildir>=0.53.1:../../mail/courier-maildir
USE_TOOLS+= env gmake perl
USE_LANGUAGES= c c++
@@ -20,51 +19,49 @@ PKG_SUPPORTED_OPTIONS+= fam
# PKGNAME is a parameter to the following file
PKGNAME= ${DISTNAME}
-.include "../../mail/courier-maildir/Makefile.common"
+.include "../../mail/courier-mta/Makefile.common"
-CONFIGURE_ARGS+= --datadir=${PREFIX}/share/courier
-CONFIGURE_ARGS+= --libexecdir=${PREFIX}/libexec/courier
+CONFIGURE_ARGS+= --datadir=${DATADIR:Q}
+CONFIGURE_ARGS+= --libexecdir=${LIBEXECDIR:Q}
CONFIGURE_ARGS+= --with-mailuser=${ROOT_USER:Q}
-CONFIGURE_ARGS+= --with-piddir=${VARBASE}/run
+CONFIGURE_ARGS+= --with-piddir=${VARBASE:Q}/run
CONFIGURE_ARGS+= --program-transform-name='s/\.rc$$//'
-CONFIGURE_ENV+= OPENSSL=${SSLBASE}/bin/openssl
+CONFIGURE_ENV+= OPENSSL=${SSLBASE:Q}/bin/openssl
-INSTALL_AM_MAKEFLAGS= sysconfdir=${EGDIR}
+INSTALL_AM_MAKEFLAGS= sysconfdir=${EGDIR:Q}
INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} AM_MAKEFLAGS=${INSTALL_AM_MAKEFLAGS:Q}
-GEN_FILES= imapd imapd-ssl pop3d pop3d-ssl
-SSLCNF_FILES= imapd.cnf pop3d.cnf
+# Used in ${PKGDIR}/INSTALL
FILES_SUBST+= SSLCERTS=${SSLCERTS:Q}
-FILES_SUBST+= GEN_FILES=${GEN_FILES:Q}
-MAKE_DIRS= ${VARBASE}/run
-CONF_FILES_PERMS= # empty
-.for FILE in ${GEN_FILES}
-CONF_FILES+= ${EGDIR}/${FILE}.dist ${PKG_SYSCONFDIR}/${FILE}
-.endfor
-.for FILE in ${SSLCNF_FILES}
-CONF_FILES_PERMS+= ${EGDIR}/${FILE} ${PKG_SYSCONFDIR}/${FILE} \
- ${ROOT_USER} ${ROOT_GROUP} 0600
+REQD_DIRS+= ${DATADIR} ${DOCDIR} ${EGDIR} ${LIBEXECDIR}
+MAKE_DIRS+= ${VARBASE}/run ${COURIER_STATEDIR}
+
+.for _file_ in imapd.cnf imapd.dist imapd-ssl.dist \
+ pop3d.cnf pop3d.dist pop3d-ssl.dist
+CONF_FILES_PERMS+= ${EGDIR}/${_file_} \
+ ${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \
+ ${COURIER_FILE_PERMS}
.endfor
RCD_SCRIPTS= courierimap courierimaps courierpop courierpops
SUBST_CLASSES+= courier
-SUBST_MESSAGE.courier= Convert to match courier-mta expectations.
-SUBST_FILES.courier= imap/imapd.dist.in imap/imapd-ssl.dist.in \
- imap/pop3d.dist.in imap/pop3d-ssl.dist.in \
- imap/imapd.cnf.in imap/pop3d.cnf.in \
- imap/mkimapdcert.in imap/mkpop3dcert.in \
- imap/imapd.8.in imap/courierpop3d.8.in \
- imapd-ssl.rc.in imapd.rc.in \
- pop3d-ssl.rc.in pop3d.rc.in
+SUBST_FILES.courier= imap/imapd-ssl.dist.in imap/imapd.8.in \
+ imap/imapd.cnf.in imap/imapd.dist.in \
+ imap/mkimapdcert.8.in imap/mkimapdcert.html.in \
+ imap/mkimapdcert.in imapd-ssl.rc.in imapd.rc.in
+SUBST_FILES.courier+= imap/courierpop3d.8.in imap/mkpop3dcert.8.in \
+ imap/mkpop3dcert.html.in imap/mkpop3dcert.in \
+ imap/pop3d-ssl.dist.in imap/pop3d.cnf.in \
+ imap/pop3d.dist.in pop3d-ssl.rc.in pop3d.rc.in
SUBST_SED.courier= -e "s|^IMAPDSTART=.*|IMAPDSTART=YES|g" \
-e "s|^IMAPDSSLSTART=.*|IMAPDSSLSTART=YES|g" \
-e "s|^POP3DSTART=.*|POP3DSTART=YES|g" \
-e "s|^POP3DSSLSTART=.*|POP3DSSLSTART=YES|g" \
- -e "s|@datadir@/imapd.pem|${SSLCERTS}/imapd.pem|g" \
+ -e "s|@datadir@/imapd.pem|@sysconfdir@/imapd.pem|g" \
-e "s|@datadir@/imapd.rand|@sysconfdir@/imapd.rand|g" \
- -e "s|@datadir@/pop3d.pem|${SSLCERTS}/pop3d.pem|g" \
+ -e "s|@datadir@/pop3d.pem|@sysconfdir@/pop3d.pem|g" \
-e "s|@datadir@/pop3d.rand|@sysconfdir@/pop3d.rand|g" \
-e "s|@libexecdir@/couriertcpd|@sbindir@/couriertcpd|g" \
-e "s|@sbindir@/imaplogin|@libexecdir@/imaplogin|g" \
@@ -81,7 +78,13 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/imap/BUGS.html ${DOCDIR}/imap
${INSTALL_DATA} ${WRKSRC}/imap/README.html ${DOCDIR}/imap
${INSTALL_DATA} ${WRKSRC}/imap/README.proxy.html ${DOCDIR}/imap
- ${INSTALL_DATA} ${WRKSRC}/imap/imapd.pam ${EGDIR}/imap.pam
- ${INSTALL_DATA} ${WRKSRC}/imap/pop3d.pam ${EGDIR}/pop3.pam
+ ${INSTALL_DATA} ${WRKSRC}/imap/courierpop3d.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/imapd.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/mkimapdcert.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/mkpop3dcert.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/tcpd/couriertcpd.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/tcpd/couriertls.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/imapd.pam ${EGDIR}/imap.authpam
+ ${INSTALL_DATA} ${WRKSRC}/imap/pop3d.pam ${EGDIR}/pop3.authpam
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/courier-imap/PLIST b/mail/courier-imap/PLIST
index 25de2ee3f86..efadfc1c316 100644
--- a/mail/courier-imap/PLIST
+++ b/mail/courier-imap/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2005/05/03 15:35:51 wiz Exp $
+@comment $NetBSD: PLIST,v 1.14 2006/04/28 18:15:20 jlam Exp $
bin/couriertls
bin/imapd
libexec/courier/courierpop3d
@@ -22,14 +22,20 @@ share/courier/mkimapdcert
share/courier/mkpop3dcert
share/courier/pop3d
share/courier/pop3d-ssl
+share/doc/courier/courierpop3d.html
+share/doc/courier/couriertcpd.html
+share/doc/courier/couriertls.html
share/doc/courier/imap/BUGS.html
share/doc/courier/imap/README.html
share/doc/courier/imap/README.proxy.html
-share/examples/courier/imap.pam
+share/doc/courier/imapd.html
+share/doc/courier/mkimapdcert.html
+share/doc/courier/mkpop3dcert.html
+share/examples/courier/imap.authpam
share/examples/courier/imapd-ssl.dist
share/examples/courier/imapd.cnf
share/examples/courier/imapd.dist
-share/examples/courier/pop3.pam
+share/examples/courier/pop3.authpam
share/examples/courier/pop3d-ssl.dist
share/examples/courier/pop3d.cnf
share/examples/courier/pop3d.dist
@@ -37,8 +43,4 @@ share/examples/rc.d/courierimap
share/examples/rc.d/courierimaps
share/examples/rc.d/courierpop
share/examples/rc.d/courierpops
-@unexec ${RMDIR} -p %D/share/examples/courier 2>/dev/null || ${TRUE}
@dirrm share/doc/courier/imap
-@unexec ${RMDIR} -p %D/share/doc/courier 2>/dev/null || ${TRUE}
-@unexec ${RMDIR} -p %D/share/courier 2>/dev/null || ${TRUE}
-@unexec ${RMDIR} -p %D/libexec/courier 2>/dev/null || ${TRUE}
diff --git a/mail/courier-imap/distinfo b/mail/courier-imap/distinfo
index 7f172ee189a..1aada47348a 100644
--- a/mail/courier-imap/distinfo
+++ b/mail/courier-imap/distinfo
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.16 2005/10/20 20:26:23 jlam Exp $
+$NetBSD: distinfo,v 1.17 2006/04/28 18:15:20 jlam Exp $
-SHA1 (courier-imap-4.0.6.tar.bz2) = d7fee884cc0015586459c511dbe03bc2a8466c7f
-RMD160 (courier-imap-4.0.6.tar.bz2) = 4006c5ec4db6b2adac393e2ebdf9ee99af3a8b2a
-Size (courier-imap-4.0.6.tar.bz2) = 3157577 bytes
-SHA1 (patch-aa) = 78ab9871154ad1fa7b21b54faed64071e0c6a960
-SHA1 (patch-ad) = 0496410af5b01cad01ca4967bf98405c6d5b0863
+SHA1 (courier-imap-4.1.0.tar.bz2) = c479dd4e42c2b6c108d879670853e99f7f851699
+RMD160 (courier-imap-4.1.0.tar.bz2) = fd27a2ed380bb465cccb10addbc1d6c28d57856e
+Size (courier-imap-4.1.0.tar.bz2) = 3211530 bytes
+SHA1 (patch-aa) = 5a28095f0f6309cd16f6fde46b0047ebec2fd073
+SHA1 (patch-ad) = c23fdfcf1a37fb828850c9fbf3b9d0c8a9eb6f9e
SHA1 (patch-ae) = 9d925f4639086af9f6faecd6a2fab2a9ecab670c
SHA1 (patch-af) = 37c54ed8aca2f86ac142f8fa920c217058c5fc29
SHA1 (patch-ag) = 6ddd8b3f6a2cfbab4d814b51552dbf364384cf57
SHA1 (patch-ah) = 1870daea8320cc9748961fc7e37237bd5cde1b3c
+SHA1 (patch-ak) = 8919d48a0bc8093f30e2cc8316ff242752bcbc4a
diff --git a/mail/courier-imap/files/courierimap.sh b/mail/courier-imap/files/courierimap.sh
index 911fcb9c8d4..a88958bdd8d 100755
--- a/mail/courier-imap/files/courierimap.sh
+++ b/mail/courier-imap/files/courierimap.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: courierimap.sh,v 1.11 2005/02/18 22:12:46 jlam Exp $
+# $NetBSD: courierimap.sh,v 1.12 2006/04/28 18:15:20 jlam Exp $
#
# Courier IMAP services daemon
#
@@ -16,7 +16,6 @@ command="@PREFIX@/sbin/couriertcpd"
ctl_command="@PREFIX@/sbin/imapd"
pidfile="@VARBASE@/run/imapd.pid"
required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl"
-required_vars="authdaemond"
start_cmd="courier_doit start"
stop_cmd="courier_doit stop"
@@ -24,37 +23,29 @@ stop_cmd="courier_doit stop"
courier_doit()
{
action=$1
- case ${action} in
+ case $action in
start)
- for _f in $required_vars; do
- eval _value=\$${_f}
- case $_value in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- ;;
- *)
- @ECHO@ 1>&2 "$0: WARNING: \$${_f} is not set"
- if [ -z $rc_force ]; then
- return 1
- fi
- ;;
- esac
- done
for f in $required_files; do
if [ ! -r "$f" ]; then
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
- if [ -z $rc_force ]; then
- return 1
- fi
+ return 1
fi
done
- @ECHO@ "Starting ${name}."
+
+ . @PKG_SYSCONFDIR@/imapd
+
+ case x$IMAPDSTART in
+ x[yY]*)
+ @ECHO@ "Starting ${name}."
+ ${ctl_command} $action
+ ;;
+ esac
;;
stop)
@ECHO@ "Stopping ${name}."
+ ${ctl_command} $action
;;
esac
-
- ${ctl_command} ${action}
}
load_rc_config $name
diff --git a/mail/courier-imap/files/courierimaps.sh b/mail/courier-imap/files/courierimaps.sh
index 42208791e68..7ca8f41982d 100755
--- a/mail/courier-imap/files/courierimaps.sh
+++ b/mail/courier-imap/files/courierimaps.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: courierimaps.sh,v 1.12 2005/03/01 01:42:36 jlam Exp $
+# $NetBSD: courierimaps.sh,v 1.13 2006/04/28 18:15:20 jlam Exp $
#
# Courier IMAP/SSL services daemon
#
@@ -16,7 +16,6 @@ command="@PREFIX@/sbin/couriertcpd"
ctl_command="@PREFIX@/sbin/imapd-ssl"
pidfile="@VARBASE@/run/imapd-ssl.pid"
required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl"
-required_vars="authdaemond"
start_cmd="courier_doit start"
stop_cmd="courier_doit stop"
@@ -24,37 +23,45 @@ stop_cmd="courier_doit stop"
courier_doit()
{
action=$1
- case ${action} in
+ case $action in
start)
- for _f in $required_vars; do
- eval _value=\$${_f}
- case $_value in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- ;;
- *)
- @ECHO@ 1>&2 "$0: WARNING: \$${_f} is not set"
- if [ -z $rc_force ]; then
- return 1
- fi
- ;;
- esac
- done
for f in $required_files; do
if [ ! -r "$f" ]; then
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
- if [ -z $rc_force ]; then
- return 1
- fi
+ return 1
fi
done
- @ECHO@ "Starting ${name}."
+
+ . @PKG_SYSCONFDIR@/imapd
+ . @PKG_SYSCONFDIR@/imapd-ssl
+
+ f="$TLS_CERTFILE"
+ if [ -z "$f" ]; then
+ @ECHO@ 1>&2 "$0: WARNING: TLS_CERTFILE is empty"
+ return 1
+ fi
+ if [ ! -f "$f" ] && \
+ [ "$f" = "@PKG_SYSCONFDIR@/imapd.pem ]; then
+ @ECHO@ "Generating IMAP SSL certificate in $f."
+ @PREFIX@/sbin/mkimapdcert >/dev/null 2>&1
+ fi
+ if [ ! -r "$f" ]; then
+ @ECHO@ 1>&2 "$0: WARNING: $f is not readable"
+ return 1
+ fi
+
+ case x$IMAPDSSLSTART in
+ x[yY]*)
+ @ECHO@ "Starting ${name}."
+ ${ctl_command} $action
+ ;;
+ esac
;;
stop)
@ECHO@ "Stopping ${name}."
+ ${ctl_command} $action
;;
esac
-
- ${ctl_command} ${action}
}
load_rc_config $name
diff --git a/mail/courier-imap/files/courierpop.sh b/mail/courier-imap/files/courierpop.sh
index ecfde58c271..ec35f107012 100755
--- a/mail/courier-imap/files/courierpop.sh
+++ b/mail/courier-imap/files/courierpop.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: courierpop.sh,v 1.11 2005/02/18 22:12:46 jlam Exp $
+# $NetBSD: courierpop.sh,v 1.12 2006/04/28 18:15:20 jlam Exp $
#
# Courier POP3 services daemon
#
@@ -16,7 +16,6 @@ command="@PREFIX@/sbin/couriertcpd"
ctl_command="@PREFIX@/sbin/pop3d"
pidfile="@VARBASE@/run/pop3d.pid"
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
-required_vars="authdaemond"
start_cmd="courier_doit start"
stop_cmd="courier_doit stop"
@@ -24,37 +23,29 @@ stop_cmd="courier_doit stop"
courier_doit()
{
action=$1
- case ${action} in
+ case $action in
start)
- for _f in $required_vars; do
- eval _value=\$${_f}
- case $_value in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- ;;
- *)
- @ECHO@ 1>&2 "$0: WARNING: \$${_f} is not set"
- if [ -z $rc_force ]; then
- return 1
- fi
- ;;
- esac
- done
for f in $required_files; do
if [ ! -r "$f" ]; then
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
- if [ -z $rc_force ]; then
- return 1
- fi
+ return 1
fi
done
- @ECHO@ "Starting ${name}."
+
+ . @PKG_SYSCONFDIR@/pop3d
+
+ case x$POP3DSTART in
+ x[yY]*)
+ @ECHO@ "Starting ${name}."
+ ${ctl_command} $action
+ ;;
+ esac
;;
stop)
@ECHO@ "Stopping ${name}."
+ ${ctl_command} $action
;;
esac
-
- ${ctl_command} ${action}
}
load_rc_config $name
diff --git a/mail/courier-imap/files/courierpops.sh b/mail/courier-imap/files/courierpops.sh
index 537ebf18744..359baa6da9e 100755
--- a/mail/courier-imap/files/courierpops.sh
+++ b/mail/courier-imap/files/courierpops.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: courierpops.sh,v 1.12 2005/03/01 01:42:36 jlam Exp $
+# $NetBSD: courierpops.sh,v 1.13 2006/04/28 18:15:20 jlam Exp $
#
# Courier POP3/SSL services daemon
#
@@ -16,7 +16,6 @@ command="@PREFIX@/sbin/couriertcpd"
ctl_command="@PREFIX@/sbin/pop3d-ssl"
pidfile="@VARBASE@/run/pop3d-ssl.pid"
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
-required_vars="authdaemond"
start_cmd="courier_doit start"
stop_cmd="courier_doit stop"
@@ -24,37 +23,45 @@ stop_cmd="courier_doit stop"
courier_doit()
{
action=$1
- case ${action} in
+ case $action in
start)
- for _f in $required_vars; do
- eval _value=\$${_f}
- case $_value in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- ;;
- *)
- @ECHO@ 1>&2 "$0: WARNING: \$${_f} is not set"
- if [ -z $rc_force ]; then
- return 1
- fi
- ;;
- esac
- done
for f in $required_files; do
if [ ! -r "$f" ]; then
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
- if [ -z $rc_force ]; then
- return 1
- fi
+ return 1
fi
done
- @ECHO@ "Starting ${name}."
+
+ . @PKG_SYSCONFDIR@/pop3d
+ . @PKG_SYSCONFDIR@/pop3d-ssl
+
+ f="$TLS_CERTFILE"
+ if [ -z "$f" ]; then
+ @ECHO@ 1>&2 "$0: WARNING: TLS_CERTFILE is empty"
+ return 1
+ fi
+ if [ ! -f "$f" ] && \
+ [ "$f" = "@PKG_SYSCONFDIR@/pop3d.pem ]; then
+ @ECHO@ "Generating POP3 SSL certificate in $f."
+ @PREFIX@/sbin/mkpop3dcert >/dev/null 2>&1
+ fi
+ if [ ! -r "$f" ]; then
+ @ECHO@ 1>&2 "$0: WARNING: $f is not readable"
+ return 1
+ fi
+
+ case x$POP3DSSLSTART in
+ x[yY]*)
+ @ECHO@ "Starting ${name}."
+ ${ctl_command} $action
+ ;;
+ esac
;;
stop)
@ECHO@ "Stopping ${name}."
+ ${ctl_command} $action
;;
esac
-
- ${ctl_command} ${action}
}
load_rc_config $name
diff --git a/mail/courier-imap/patches/patch-aa b/mail/courier-imap/patches/patch-aa
index 1275b387f49..3f1a0b7acc3 100644
--- a/mail/courier-imap/patches/patch-aa
+++ b/mail/courier-imap/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.11 2005/08/11 00:04:01 jlam Exp $
+$NetBSD: patch-aa,v 1.12 2006/04/28 18:15:20 jlam Exp $
---- Makefile.in.orig 2005-07-23 09:33:42.000000000 -0400
+--- Makefile.in.orig 2006-02-25 12:16:41.000000000 -0500
+++ Makefile.in
@@ -246,10 +246,11 @@ DIST_SUBDIRS = numlib md5 sha1 bdbobj gd
@@ -28,7 +28,7 @@ $NetBSD: patch-aa,v 1.11 2005/08/11 00:04:01 jlam Exp $
-libexec_SCRIPTS = imapd.rc imapd-ssl.rc pop3d.rc pop3d-ssl.rc
+libexec_SCRIPTS =
HTML2TXT = links -dump -no-numbering
-@@ -1019,7 +1020,7 @@ sharedindexsplit: maildir/sharedindexspl
+@@ -1031,7 +1032,7 @@ sharedindexsplit: maildir/sharedindexspl
-pop3login$(EXEEXT): imap/pop3login$(EXEEXT)
- cp imap/pop3login$(EXEEXT) .
@@ -40,7 +40,7 @@ $NetBSD: patch-aa,v 1.11 2005/08/11 00:04:01 jlam Exp $
+courierpop3d$(EXEEXT): imap/pop3d$(EXEEXT)
+ cp imap/pop3d$(EXEEXT) ./$@
-@@ -1067,4 +1068,7 @@ maildirkw.1: maildir/maildirkw.1
+@@ -1079,4 +1080,7 @@ maildirkw.1: maildir/maildirkw.1
-imapd.8: imap/imapd.8
- cp imap/imapd.8 .
@@ -50,12 +50,12 @@ $NetBSD: patch-aa,v 1.11 2005/08/11 00:04:01 jlam Exp $
+courierpop3d.8: imap/courierpop3d.8
+ cp imap/courierpop3d.8 .
-@@ -1097,3 +1101,3 @@ install-exec-local:
+@@ -1109,3 +1113,3 @@ install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(sbindir)
- for f in mkimapdcert mkpop3dcert ; \
+ for f in imapd-ssl imapd mkimapdcert mkpop3dcert pop3d pop3d-ssl ; \
do rm -f $(DESTDIR)$(sbindir)/$$f ; \
-@@ -1103,17 +1107,4 @@ install-exec-local:
+@@ -1115,17 +1119,4 @@ install-exec-local:
install-exec-hook:
- chmod 444 $(DESTDIR)$(sysconfdir)/quotawarnmsg.example
- mkdir -p $(DESTDIR)$(sysconfdir)/shared
diff --git a/mail/courier-imap/patches/patch-ad b/mail/courier-imap/patches/patch-ad
index 5d792cc46b0..375b3ce7908 100644
--- a/mail/courier-imap/patches/patch-ad
+++ b/mail/courier-imap/patches/patch-ad
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.6 2005/08/11 00:04:01 jlam Exp $
+$NetBSD: patch-ad,v 1.7 2006/04/28 18:15:20 jlam Exp $
---- configure.orig 2005-07-23 09:33:43.000000000 -0400
+--- configure.orig 2006-02-25 12:16:40.000000000 -0500
+++ configure
-@@ -20405,9 +20405,6 @@ else
+@@ -20892,9 +20892,6 @@ else
ac_configure_args="$ac_configure_args --with-authchangepwdir=/var/tmp/dev/null"
fi;
diff --git a/mail/courier-imap/patches/patch-ak b/mail/courier-imap/patches/patch-ak
new file mode 100644
index 00000000000..6ab2df9673e
--- /dev/null
+++ b/mail/courier-imap/patches/patch-ak
@@ -0,0 +1,12 @@
+$NetBSD: patch-ak,v 1.1 2006/04/28 18:15:20 jlam Exp $
+
+--- imap/mkimapdcert.in.orig 2005-06-29 14:01:17.000000000 -0400
++++ imap/mkimapdcert.in
+@@ -30,7 +30,6 @@ cleanup() {
+ exit 1
+ }
+
+-cd @datadir@
+ dd if=@RANDOMV@ of=@datadir@/imapd.rand count=1 2>/dev/null
+ @OPENSSL@ req -new -x509 -days 365 -nodes \
+ -config @sysconfdir@/imapd.cnf -out @datadir@/imapd.pem -keyout @datadir@/imapd.pem || cleanup