summaryrefslogtreecommitdiff
path: root/mail/courier-imap
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-02-19 18:45:14 +0000
committerjlam <jlam@pkgsrc.org>2008-02-19 18:45:14 +0000
commit780b0551244eff2a5be78acf83fb4ca502953c68 (patch)
tree148b7ba912f2e2e12b433a1833598fd707451338 /mail/courier-imap
parent13d9226fd01cd2982fb75a5af805f7e4747258ab (diff)
downloadpkgsrc-780b0551244eff2a5be78acf83fb4ca502953c68.tar.gz
Update mail/courier-imap to version 4.3.0, which matches the imapd build
from courier-0.58.0. Changes from version 4.2.1 include: + Teach mkimapdcert and mkpop3dcert to generate certificaties and keys using either GNUTLS or OpenSSL tools. * Remove \Draft flag from messages moved to the trash folder upon expunge from the original folder. * Make clock-skew check more reliable.
Diffstat (limited to 'mail/courier-imap')
-rw-r--r--mail/courier-imap/Makefile54
-rw-r--r--mail/courier-imap/distinfo13
-rwxr-xr-xmail/courier-imap/files/courierimap.sh18
-rwxr-xr-xmail/courier-imap/files/courierimaps.sh18
-rwxr-xr-xmail/courier-imap/files/courierpop.sh18
-rwxr-xr-xmail/courier-imap/files/courierpops.sh18
-rw-r--r--mail/courier-imap/options.mk37
-rw-r--r--mail/courier-imap/patches/patch-ad6
-rw-r--r--mail/courier-imap/patches/patch-ak34
-rw-r--r--mail/courier-imap/patches/patch-ao28
10 files changed, 194 insertions, 50 deletions
diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile
index 18944470c0a..a8f8770fc27 100644
--- a/mail/courier-imap/Makefile
+++ b/mail/courier-imap/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.66 2007/10/15 15:37:20 jlam Exp $
+# $NetBSD: Makefile,v 1.67 2008/02/19 18:45:14 jlam Exp $
-DISTNAME= courier-imap-4.2.1
+DISTNAME= courier-imap-4.3.0
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
EXTRACT_SUFX= .tar.bz2
@@ -9,31 +9,28 @@ MAINTAINER= jlam@pkgsrc.org
COMMENT= IMAP server for access to maildir-style mailboxes
HOMEPAGE= http://www.courier-mta.org/imap/
-DEPENDS+= courier-maildir>=0.57.1:../../mail/courier-maildir
-DEPENDS+= couriertcpd>=0.57.1:../../net/couriertcpd
+DEPENDS+= courier-maildir>=0.58.0:../../mail/courier-maildir
+DEPENDS+= couriertcpd>=0.58.0:../../net/couriertcpd
-USE_TOOLS+= env gmake openssl:run perl
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_TOOLS+= env gmake perl
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
-PKG_OPTIONS_VAR= PKG_OPTIONS.courier-imap
-PKG_SUPPORTED_OPTIONS= fam
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mfam)
-. include "../../mk/fam.buildlink3.mk"
-.endif
+.include "options.mk"
.include "../../mail/courier-mta/Makefile.common"
+CONFIGURE_ENV+= CERTTOOL=${COURIER_CERTTOOL:Q}
+CONFIGURE_ENV+= OPENSSL=${COURIER_OPENSSL:Q}
+
CONFIGURE_ARGS+= --datadir=${DATADIR:Q}
CONFIGURE_ARGS+= --libexecdir=${LIBEXECDIR:Q}
-CONFIGURE_ARGS+= --with-mailuser=${ROOT_USER:Q}
+CONFIGURE_ARGS+= --with-mailuser=${REAL_ROOT_USER:Q}
CONFIGURE_ARGS+= --with-piddir=${COURIER_STATEDIR:Q}/tmp
CONFIGURE_ARGS+= --program-transform-name='s/\.rc$$//'
-CONFIGURE_ENV+= OPENSSL=${TOOLS_OPENSSL:Q}
# The rfc1035 and tcpd bits are built and installed by net/couriertcpd.
# However, we still need to build in these directories because there
@@ -62,17 +59,18 @@ RCD_SCRIPTS= courierimap courierimaps courierpop courierpops
SUBST_CLASSES+= courier
SUBST_FILES.courier= imap/imapd-ssl.dist.in imap/imapd.8.in \
- imap/imapd.cnf.in imap/imapd.dist.in \
+ imap/imapd.cnf.openssl.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-ssl.dist.in imap/pop3d.cnf.openssl.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|@mydatadir@|@sysconfdir@|g" \
-e "s|@datadir@/imapd.pem|@sysconfdir@/imapd.pem|g" \
-e "s|@datadir@/imapd.rand|@sysconfdir@/imapd.rand|g" \
-e "s|@datadir@/pop3d.pem|@sysconfdir@/pop3d.pem|g" \
@@ -86,16 +84,16 @@ SUBST_STAGE.courier= pre-configure
.include "../../security/courier-authlib/buildlink3.mk"
post-install:
- ${INSTALL_DATA_DIR} ${EGDIR}
- ${INSTALL_DATA_DIR} ${DOCDIR}/imap
- ${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/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}/imap/imapd.pam ${EGDIR}/imap.authpam
- ${INSTALL_DATA} ${WRKSRC}/imap/pop3d.pam ${EGDIR}/pop3.authpam
+ ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
+ ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}/imap
+ ${INSTALL_DATA} ${WRKSRC}/imap/BUGS.html ${DESTDIR}${DOCDIR}/imap
+ ${INSTALL_DATA} ${WRKSRC}/imap/README.html ${DESTDIR}${DOCDIR}/imap
+ ${INSTALL_DATA} ${WRKSRC}/imap/README.proxy.html ${DESTDIR}${DOCDIR}/imap
+ ${INSTALL_DATA} ${WRKSRC}/imap/courierpop3d.html ${DESTDIR}${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/imapd.html ${DESTDIR}${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/mkimapdcert.html ${DESTDIR}${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/mkpop3dcert.html ${DESTDIR}${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/imap/imapd.pam ${DESTDIR}${EGDIR}/imap.authpam
+ ${INSTALL_DATA} ${WRKSRC}/imap/pop3d.pam ${DESTDIR}${EGDIR}/pop3.authpam
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/courier-imap/distinfo b/mail/courier-imap/distinfo
index f2e351e5585..4d25f65c771 100644
--- a/mail/courier-imap/distinfo
+++ b/mail/courier-imap/distinfo
@@ -1,13 +1,14 @@
-$NetBSD: distinfo,v 1.22 2007/10/15 15:37:21 jlam Exp $
+$NetBSD: distinfo,v 1.23 2008/02/19 18:45:14 jlam Exp $
-SHA1 (courier-imap-4.2.1.tar.bz2) = e21b464680fb8fe2e473966bf6faa19944a68485
-RMD160 (courier-imap-4.2.1.tar.bz2) = 41151ebb892ad26d5ae2efd7e89105b4d7aa721b
-Size (courier-imap-4.2.1.tar.bz2) = 3300749 bytes
+SHA1 (courier-imap-4.3.0.tar.bz2) = b7c091f2bfdd22308ac26724e88b50e7a4f68cb2
+RMD160 (courier-imap-4.3.0.tar.bz2) = 8865d4b139af5f85a08ce5f1b6e1e453d3827120
+Size (courier-imap-4.3.0.tar.bz2) = 3342522 bytes
SHA1 (patch-aa) = 9b60c07f2a8c4c3fea3fac8c22a8386de3f7d53b
-SHA1 (patch-ad) = d027f094eae80f6493380947cd98ed6bb3006d6d
+SHA1 (patch-ad) = 8a80f42a179e34a838317a0aac2d0a811fd47071
SHA1 (patch-ae) = 9d925f4639086af9f6faecd6a2fab2a9ecab670c
SHA1 (patch-af) = 37c54ed8aca2f86ac142f8fa920c217058c5fc29
SHA1 (patch-ag) = 6ddd8b3f6a2cfbab4d814b51552dbf364384cf57
SHA1 (patch-ah) = 1870daea8320cc9748961fc7e37237bd5cde1b3c
-SHA1 (patch-ak) = bdc5a6a25ab5f1c320feda40970073f3a1ef8e17
+SHA1 (patch-ak) = 057df5c41382768a0f221107137412c46200c035
SHA1 (patch-an) = da8ce37a8a4ff57a25325153f1d68b7df865faee
+SHA1 (patch-ao) = f576d11ee217000a7760f153b131ed7a445d48f6
diff --git a/mail/courier-imap/files/courierimap.sh b/mail/courier-imap/files/courierimap.sh
index a456a4c5b3c..2d05cbea636 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.15 2007/09/22 04:42:03 jlam Exp $
+# $NetBSD: courierimap.sh,v 1.16 2008/02/19 18:45:14 jlam Exp $
#
# Courier IMAP services daemon
#
@@ -17,9 +17,25 @@ ctl_command="@PREFIX@/sbin/imapd"
pidfile="@COURIER_STATEDIR@/tmp/imapd.pid"
required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl"
+start_precmd="${name}_prestart"
start_cmd="${name}_doit start"
stop_cmd="${name}_doit stop"
+mkdir_perms()
+{
+ dir="$1"; user="$2"; group="$3"; mode="$4"
+ @TEST@ -d $dir || @MKDIR@ $dir
+ @CHOWN@ $user $dir
+ @CHGRP@ $group $dir
+ @CHMOD@ $mode $dir
+}
+
+courierimap_prestart()
+{
+ mkdir_perms @COURIER_STATEDIR@/tmp \
+ @COURIER_USER@ @COURIER_GROUP@ 0770
+}
+
courierimap_doit()
{
action=$1
diff --git a/mail/courier-imap/files/courierimaps.sh b/mail/courier-imap/files/courierimaps.sh
index 3608a2570f2..0e6bc847054 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.17 2007/09/22 04:42:03 jlam Exp $
+# $NetBSD: courierimaps.sh,v 1.18 2008/02/19 18:45:14 jlam Exp $
#
# Courier IMAP/SSL services daemon
#
@@ -17,9 +17,25 @@ ctl_command="@PREFIX@/sbin/imapd-ssl"
pidfile="@COURIER_STATEDIR@/tmp/imapd-ssl.pid"
required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl"
+start_precmd="${name}_prestart"
start_cmd="${name}_doit start"
stop_cmd="${name}_doit stop"
+mkdir_perms()
+{
+ dir="$1"; user="$2"; group="$3"; mode="$4"
+ @TEST@ -d $dir || @MKDIR@ $dir
+ @CHOWN@ $user $dir
+ @CHGRP@ $group $dir
+ @CHMOD@ $mode $dir
+}
+
+courierimaps_prestart()
+{
+ mkdir_perms @COURIER_STATEDIR@/tmp \
+ @COURIER_USER@ @COURIER_GROUP@ 0770
+}
+
courierimaps_doit()
{
action=$1
diff --git a/mail/courier-imap/files/courierpop.sh b/mail/courier-imap/files/courierpop.sh
index 4dbf9533fd1..e7a6977572c 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.15 2007/09/22 04:42:03 jlam Exp $
+# $NetBSD: courierpop.sh,v 1.16 2008/02/19 18:45:14 jlam Exp $
#
# Courier POP3 services daemon
#
@@ -17,9 +17,25 @@ ctl_command="@PREFIX@/sbin/pop3d"
pidfile="@COURIER_STATEDIR@/tmp/pop3d.pid"
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
+start_precmd="${name}_prestart"
start_cmd="${name}_doit start"
stop_cmd="${name}_doit stop"
+mkdir_perms()
+{
+ dir="$1"; user="$2"; group="$3"; mode="$4"
+ @TEST@ -d $dir || @MKDIR@ $dir
+ @CHOWN@ $user $dir
+ @CHGRP@ $group $dir
+ @CHMOD@ $mode $dir
+}
+
+courierpop_prestart()
+{
+ mkdir_perms @COURIER_STATEDIR@/tmp \
+ @COURIER_USER@ @COURIER_GROUP@ 0770
+}
+
courierpop_doit()
{
action=$1
diff --git a/mail/courier-imap/files/courierpops.sh b/mail/courier-imap/files/courierpops.sh
index 68e672914f4..9946a3f0ec1 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.17 2007/09/22 04:42:03 jlam Exp $
+# $NetBSD: courierpops.sh,v 1.18 2008/02/19 18:45:14 jlam Exp $
#
# Courier POP3/SSL services daemon
#
@@ -17,9 +17,25 @@ ctl_command="@PREFIX@/sbin/pop3d-ssl"
pidfile="@COURIER_STATEDIR@/tmp/pop3d-ssl.pid"
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
+start_precmd="${name}_prestart"
start_cmd="${name}_doit start"
stop_cmd="${name}_doit stop"
+mkdir_perms()
+{
+ dir="$1"; user="$2"; group="$3"; mode="$4"
+ @TEST@ -d $dir || @MKDIR@ $dir
+ @CHOWN@ $user $dir
+ @CHGRP@ $group $dir
+ @CHMOD@ $mode $dir
+}
+
+courierpops_prestart()
+{
+ mkdir_perms @COURIER_STATEDIR@/tmp \
+ @COURIER_USER@ @COURIER_GROUP@ 0770
+}
+
courierpops_doit()
{
action=$1
diff --git a/mail/courier-imap/options.mk b/mail/courier-imap/options.mk
new file mode 100644
index 00000000000..cc7ff8176fd
--- /dev/null
+++ b/mail/courier-imap/options.mk
@@ -0,0 +1,37 @@
+# $NetBSD: options.mk,v 1.1 2008/02/19 18:45:14 jlam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.courier-imap
+PKG_SUPPORTED_OPTIONS= fam
+PKG_OPTIONS_OPTIONAL_GROUPS= tls
+PKG_OPTIONS_GROUP.tls= gnutls ssl
+PKG_SUGGESTED_OPTIONS= ssl
+
+.include "../../mk/bsd.options.mk"
+
+###
+### File Alteration Monitor support. This allows multiple imapd or pop3d
+### processes to be notified of changes to the underlying maildirs instead
+### of needing to poll the maildirs.
+###
+.if !empty(PKG_OPTIONS:Mfam)
+. include "../../mk/fam.buildlink3.mk"
+.endif
+
+###
+### Default to using the OpenSSL or GNUTLS tools for creating certificates.
+###
+.if !empty(PKG_OPTIONS:Mgnutls) || !empty(PKG_OPTIONS:Mssl)
+SUBST_CLASSES+= tls
+SUBST_FILES.tls= imap/mkimapdcert.in imap/mkpop3dcert.in
+SUBST_STAGE.tls= pre-configure
+COURIER_CERTTOOL= ${PREFIX}/bin/certtool
+COURIER_OPENSSL= ${PREFIX}/bin/openssl
+.endif
+.if !empty(PKG_OPTIONS:Mgnutls)
+SUBST_SED.tls= -e "s|@ssllib@|gnutls|g"
+.endif
+.if !empty(PKG_OPTIONS:Mssl)
+USE_TOOLS+= openssl:run
+COURIER_OPENSSL= ${TOOLS_OPENSSL}
+SUBST_SED.tls= -e "s|@ssllib@|openssl|g"
+.endif
diff --git a/mail/courier-imap/patches/patch-ad b/mail/courier-imap/patches/patch-ad
index 484190ab87a..3ac42633587 100644
--- a/mail/courier-imap/patches/patch-ad
+++ b/mail/courier-imap/patches/patch-ad
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.8 2007/10/15 15:37:21 jlam Exp $
+$NetBSD: patch-ad,v 1.9 2008/02/19 18:45:14 jlam Exp $
---- configure.orig Sat Sep 29 14:48:19 2007
+--- configure.orig 2007-11-23 22:20:27.000000000 -0500
+++ configure
-@@ -20490,9 +20490,6 @@ else
+@@ -20576,9 +20576,6 @@ else
fi
diff --git a/mail/courier-imap/patches/patch-ak b/mail/courier-imap/patches/patch-ak
index a6c5ddac9a6..3c2f627891e 100644
--- a/mail/courier-imap/patches/patch-ak
+++ b/mail/courier-imap/patches/patch-ak
@@ -1,12 +1,28 @@
-$NetBSD: patch-ak,v 1.2 2007/10/15 15:37:21 jlam Exp $
+$NetBSD: patch-ak,v 1.3 2008/02/19 18:45:14 jlam Exp $
---- imap/mkimapdcert.in.orig Sun Jul 1 15:54:59 2007
+--- imap/mkimapdcert.in.orig 2007-11-04 15:50:15.000000000 -0500
+++ imap/mkimapdcert.in
-@@ -30,7 +30,6 @@ cleanup() {
- exit 1
- }
+@@ -9,7 +9,13 @@
+ # IMAP over SSL. Normally this script would get called by an automatic
+ # package installation routine.
--cd @mydatadir@
- dd if=@RANDOMV@ of=@mydatadir@/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
+-if test "@ssllib@" = "openssl"
++case "$1" in
++gnutls) ssllib=gnutls ;;
++openssl) ssllib=openssl ;;
++*) ssllib="@ssllib@" ;;
++esac
++
++if test "$ssllib" = "openssl"
+ then
+ test -x @OPENSSL@ || exit 0
+ else
+@@ -36,7 +42,7 @@ cleanup() {
+
+ cd @mydatadir@
+
+-if test "@ssllib@" = "openssl"
++if test "$ssllib" = "openssl"
+ then
+ cp /dev/null @mydatadir@/imapd.pem
+ chmod 600 @mydatadir@/imapd.pem
diff --git a/mail/courier-imap/patches/patch-ao b/mail/courier-imap/patches/patch-ao
new file mode 100644
index 00000000000..4eae4c7716a
--- /dev/null
+++ b/mail/courier-imap/patches/patch-ao
@@ -0,0 +1,28 @@
+$NetBSD: patch-ao,v 1.1 2008/02/19 18:45:14 jlam Exp $
+
+--- imap/mkpop3dcert.in.orig 2007-11-04 15:50:15.000000000 -0500
++++ imap/mkpop3dcert.in
+@@ -9,7 +9,13 @@
+ # POP3 over SSL. Normally this script would get called by an automatic
+ # package installation routine.
+
+-if test "@ssllib@" = "openssl"
++case "$1" in
++gnutls) ssllib="gnutls" ;;
++openssl) ssllib="openssl" ;;
++*) ssllib="@ssllib@" ;;
++esac
++
++if test "$ssllib" = "openssl"
+ then
+ test -x @OPENSSL@ || exit 0
+ else
+@@ -36,7 +42,7 @@ cleanup() {
+
+ cd @mydatadir@
+
+-if test "@ssllib@" = "openssl"
++if test "$ssllib" = "openssl"
+ then
+ cp /dev/null @mydatadir@/pop3d.pem
+ chmod 600 @mydatadir@/pop3d.pem