commit b1f8c07cab2eca19694c488ada7183700e546528
Author: Brian Candler <b.candler@pobox.com>
Date:   Tue Mar 16 10:26:26 2010 +0000

    Refresh courier packages to latest versions

diff --git a/mail/cone/Makefile b/mail/cone/Makefile
index f6ab9d0..c66e8c8 100644
--- a/mail/cone/Makefile
+++ b/mail/cone/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.5 2008/02/20 22:31:06 jlam Exp $
 
-DISTNAME=	cone-0.74
+DISTNAME=	cone-0.81
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
@@ -19,7 +19,6 @@ GCC_REQD+=		3.0	# need Standard C++ Library
 
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=	--without-certdb
 
 # Cone doesn't really need the openssl or c_rehash binaries, but the
 # rootcerts/configure script is written poorly and directly overrides
diff --git a/mail/cone/PLIST b/mail/cone/PLIST
index f147dcc..322f899 100644
--- a/mail/cone/PLIST
+++ b/mail/cone/PLIST
@@ -64,10 +64,11 @@ share/cone/cone06newaccount.html
 share/cone/cone07remoteconfig.html
 share/cone/cone08gpg.html
 share/cone/cone09masterpassword.html
-share/cone/cone10encryption.html
-share/cone/cone11filters.html
-share/cone/cone12addressbook.html
-share/cone/cone13ldapaddressbook.html
+share/cone/cone10certificates.html
+share/cone/cone11encryption.html
+share/cone/cone12filters.html
+share/cone/cone13addressbook.html
+share/cone/cone14ldapaddressbook.html
 share/cone/conn.html
 share/cone/cppnamespace.html
 share/cone/emailaddress.html
diff --git a/mail/cone/distinfo b/mail/cone/distinfo
index 2ad11cf..e4dc2c0 100644
--- a/mail/cone/distinfo
+++ b/mail/cone/distinfo
@@ -1,10 +1,10 @@
 $NetBSD: distinfo,v 1.2 2008/02/20 22:31:06 jlam Exp $
 
-SHA1 (cone-0.74.tar.bz2) = 74a68e8468494bb020da7f7fd4dc3abd1ef67b83
-RMD160 (cone-0.74.tar.bz2) = 30a7d64d04426d975a602999db28e47caaa97e80
-Size (cone-0.74.tar.bz2) = 4150864 bytes
+SHA1 (cone-0.81.tar.bz2) = 0b47812fe30fe8eb6996727a04e4af23786e31c9
+RMD160 (cone-0.81.tar.bz2) = 0a7924727a0df7f219a45ba3c18ddccc7516675d
+Size (cone-0.81.tar.bz2) = 4145317 bytes
 SHA1 (patch-aa) = 379e4875619bda6d7094f906e2cba34f19d879fe
-SHA1 (patch-ab) = 897bec29acdab95f679a3b95195614ae94509e29
+SHA1 (patch-ab) = 930bfc9c310e6a9750cfb1de95cbef17cc8c6854
 SHA1 (patch-ac) = 2a6a8ad9c8cc6773b219bfbefabc11eac31f6cb3
 SHA1 (patch-ad) = 578dde2e725ca4e1b332ad2e9135446534aa3184
 SHA1 (patch-ae) = f11842f29aadd91aaab74dff8583d6b62c06673d
diff --git a/mail/cone/patches/patch-ab b/mail/cone/patches/patch-ab
index 79ef9d6..23cc515 100644
--- a/mail/cone/patches/patch-ab
+++ b/mail/cone/patches/patch-ab
@@ -1,13 +1,13 @@
 $NetBSD: patch-ab,v 1.1.1.1 2007/11/13 18:02:15 jlam Exp $
 
---- curses/configure.orig	Sun Jul 22 00:35:48 2007
-+++ curses/configure
-@@ -5846,7 +5846,7 @@ _ACEOF
+--- curses/configure.orig	2010-03-01 03:54:55.000000000 +0000
++++ curses/configure	2010-03-15 15:25:30.000000000 +0000
+@@ -6318,7 +6318,7 @@
  
  
  
 -for ac_func in glob
 +for ac_func in glob mbrtowc wcrtomb
  do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_func" >&5
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
diff --git a/mail/courier-analog/Makefile b/mail/courier-analog/Makefile
index 8e4f6bc..66c7433 100644
--- a/mail/courier-analog/Makefile
+++ b/mail/courier-analog/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.6 2009/05/19 08:59:20 wiz Exp $
 
-DISTNAME=	courier-analog-0.15
+DISTNAME=	courier-analog-0.16
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
diff --git a/mail/courier-analog/distinfo b/mail/courier-analog/distinfo
index 9a757e8..769ff96 100644
--- a/mail/courier-analog/distinfo
+++ b/mail/courier-analog/distinfo
@@ -1,5 +1,5 @@
 $NetBSD: distinfo,v 1.3 2007/10/15 15:37:29 jlam Exp $
 
-SHA1 (courier-analog-0.15.tar.bz2) = 11c34842e94365c65e9b0da53382f7da5c93cab6
-RMD160 (courier-analog-0.15.tar.bz2) = e4e8423f53cb6d13bcc96cc2a0fe23b5f11926f7
-Size (courier-analog-0.15.tar.bz2) = 69000 bytes
+SHA1 (courier-analog-0.16.tar.bz2) = e1a1b32d40a4203430dca7935a20226e222f0077
+RMD160 (courier-analog-0.16.tar.bz2) = 98dcaa2512759e43c558a4a80cd53291439b7a6c
+Size (courier-analog-0.16.tar.bz2) = 74042 bytes
diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile
index a865774..a21d7eb 100644
--- a/mail/courier-imap/Makefile
+++ b/mail/courier-imap/Makefile
@@ -1,7 +1,6 @@
 # $NetBSD: Makefile,v 1.68 2008/02/21 15:50:29 jlam Exp $
 
-DISTNAME=	courier-imap-4.3.0
-PKGREVISION=	1
+DISTNAME=	courier-imap-4.7.0
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
@@ -10,8 +9,8 @@ MAINTAINER=	jlam@pkgsrc.org
 COMMENT=	IMAP server for access to maildir-style mailboxes
 HOMEPAGE=	http://www.courier-mta.org/imap/
 
-DEPENDS+=	courier-maildir>=0.58.0:../../mail/courier-maildir
-DEPENDS+=	couriertcpd>=0.58.0:../../net/couriertcpd
+DEPENDS+=	courier-maildir>=${COURIER_VERSION}:../../mail/courier-maildir
+DEPENDS+=	couriertcpd>=${COURIER_VERSION}:../../net/couriertcpd
 
 PKG_DESTDIR_SUPPORT=	user-destdir
 
diff --git a/mail/courier-imap/PLIST b/mail/courier-imap/PLIST
index ded8fda..265037a 100644
--- a/mail/courier-imap/PLIST
+++ b/mail/courier-imap/PLIST
@@ -7,18 +7,18 @@ man/man8/courierimapd.8
 man/man8/courierpop3d.8
 man/man8/mkimapdcert.8
 man/man8/mkpop3dcert.8
-sbin/imapd
-sbin/imapd-ssl
+sbin/imapd.rc
+sbin/imapd-ssl.rc
 sbin/mkimapdcert
 sbin/mkpop3dcert
-sbin/pop3d
-sbin/pop3d-ssl
-share/courier/imapd
-share/courier/imapd-ssl
+sbin/pop3d.rc
+sbin/pop3d-ssl.rc
+share/courier/imapd.rc
+share/courier/imapd-ssl.rc
 share/courier/mkimapdcert
 share/courier/mkpop3dcert
-share/courier/pop3d
-share/courier/pop3d-ssl
+share/courier/pop3d.rc
+share/courier/pop3d-ssl.rc
 share/doc/courier/courierpop3d.html
 share/doc/courier/imap/BUGS.html
 share/doc/courier/imap/README.html
diff --git a/mail/courier-imap/distinfo b/mail/courier-imap/distinfo
index 4d25f65..d728f6b 100644
--- a/mail/courier-imap/distinfo
+++ b/mail/courier-imap/distinfo
@@ -1,14 +1,13 @@
 $NetBSD: distinfo,v 1.23 2008/02/19 18:45:14 jlam Exp $
 
-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) = 8a80f42a179e34a838317a0aac2d0a811fd47071
-SHA1 (patch-ae) = 9d925f4639086af9f6faecd6a2fab2a9ecab670c
-SHA1 (patch-af) = 37c54ed8aca2f86ac142f8fa920c217058c5fc29
-SHA1 (patch-ag) = 6ddd8b3f6a2cfbab4d814b51552dbf364384cf57
-SHA1 (patch-ah) = 1870daea8320cc9748961fc7e37237bd5cde1b3c
-SHA1 (patch-ak) = 057df5c41382768a0f221107137412c46200c035
-SHA1 (patch-an) = da8ce37a8a4ff57a25325153f1d68b7df865faee
-SHA1 (patch-ao) = f576d11ee217000a7760f153b131ed7a445d48f6
+SHA1 (courier-imap-4.7.0.tar.bz2) = 9729f3add8692563865da5167cfe88f2227c3968
+RMD160 (courier-imap-4.7.0.tar.bz2) = 2ab1768fb7714cfe291edcc00c96cc276af12782
+Size (courier-imap-4.7.0.tar.bz2) = 3414328 bytes
+SHA1 (patch-aa) = d83a04bd9118fbe57d83b6022ace922e84f93af0
+SHA1 (patch-ad) = 49ed00bf47af7f9a3370c2e68e03ee1a766473e2
+SHA1 (patch-ae) = e61fe4e93f466e1a90981f0c466567417f67d2fb
+SHA1 (patch-af) = ca556cf1b0cfdbbe9dbfea563fb403878feff1bd
+SHA1 (patch-ag) = 12635085d8f00de5c527f8a23e6c73d28dfe706c
+SHA1 (patch-ah) = b9769225547ad0415a7f338e43cce3f8fd7538b7
+SHA1 (patch-ak) = 6102d5bc275cdffdb6385bba634f4310c99617f7
+SHA1 (patch-ao) = 1769d6a526e00ece65f5c0194f201addcb6501f5
diff --git a/mail/courier-imap/patches/patch-aa b/mail/courier-imap/patches/patch-aa
index ec9ee85..d9dfa97 100644
--- a/mail/courier-imap/patches/patch-aa
+++ b/mail/courier-imap/patches/patch-aa
@@ -1,8 +1,10 @@
 $NetBSD: patch-aa,v 1.14 2007/10/15 15:37:21 jlam Exp $
 
---- Makefile.in.orig	Sat Sep 29 14:48:20 2007
-+++ Makefile.in
-@@ -250,9 +250,10 @@ DIST_SUBDIRS = numlib md5 sha1 bdbobj gd
+--- Makefile.in.orig	2009-12-25 22:08:26.000000000 +0000
++++ Makefile.in	2010-03-15 16:10:48.000000000 +0000
+@@ -286,17 +286,18 @@
+ 	rfc1035 rfc2045 liblock maildir makedat libhmac \
+ 	waitlib tcpd rootcerts imap
  
 -sbin_SCRIPTS = sharedindexinstall sharedindexsplit
 +sbin_SCRIPTS = 
@@ -18,12 +20,16 @@ $NetBSD: patch-aa,v 1.14 2007/10/15 15:37:21 jlam Exp $
 +sbinPROGRAMS = 
 +libexecPROGRAMS = imaplogin courierpop3login courierpop3d
  bin_PROGRAMS = @binPROGRAMS_exec@
-@@ -260,3 +261,3 @@ sbin_PROGRAMS = @sbinPROGRAMS_exec@
+ sbin_PROGRAMS = @sbinPROGRAMS_exec@
  libexec_PROGRAMS = @libexecPROGRAMS_exec@
 -man_MANS = couriertcpd.1 deliverquota.8 maildirmake.1 maildiracl.1 imapd.8 mkimapdcert.8 mkpop3dcert.8 maildirkw.1
 +man_MANS = courierimapd.8 courierpop3d.8 mkimapdcert.8 mkpop3dcert.8
  
-@@ -271,5 +272,5 @@ EXTRA_DIST = 00README.NOW.OR.SUFFER READ
+ # Added by sysconftoolize: $Id: Makefile.am,v 1.124 2009/12/25 22:08:20 mrsam Exp $
+ 
+@@ -307,9 +308,9 @@
+ EXTRA_DIST = 00README.NOW.OR.SUFFER README README.cygwin COPYING.GPL \
+ 	NEWS.html $(TEMPLFILES) pgpkeys.txt sysconftool
  sysconf_DATA = imapd.dist imapd-ssl.dist pop3d.dist pop3d-ssl.dist \
 -	imapd.cnf pop3d.cnf quotawarnmsg.example
 +	imapd.cnf pop3d.cnf
@@ -31,7 +37,11 @@ $NetBSD: patch-aa,v 1.14 2007/10/15 15:37:21 jlam Exp $
 -libexec_SCRIPTS = imapd.rc imapd-ssl.rc pop3d.rc pop3d-ssl.rc
 +libexec_SCRIPTS = 
  HTML2TXT = links -dump -no-numbering -no-references
-@@ -1045,7 +1046,7 @@ sharedindexsplit: maildir/sharedindexspl
+ 
+ # NOTE: when using a complex directory hierarchy it is only necessary to
+@@ -1223,11 +1224,11 @@
+ sharedindexsplit: maildir/sharedindexsplit
+ 	cp maildir/sharedindexsplit .
  
 -pop3login$(EXEEXT): imap/pop3login$(EXEEXT)
 -	cp imap/pop3login$(EXEEXT) .
@@ -43,7 +53,11 @@ $NetBSD: patch-aa,v 1.14 2007/10/15 15:37:21 jlam Exp $
 +courierpop3d$(EXEEXT): imap/pop3d$(EXEEXT)
 +	cp imap/pop3d$(EXEEXT) ./$@
  
-@@ -1093,4 +1094,7 @@ maildirkw.1: maildir/maildirkw.1
+ makedatprog$(EXEEXT): makedat/makedatprog$(EXEEXT)
+ 	cp makedat/makedatprog$(EXEEXT) .
+@@ -1271,8 +1272,11 @@
+ maildirkw.1: maildir/maildirkw.1
+ 	cp $(srcdir)/maildir/maildirkw.1 .
  
 -imapd.8: imap/imapd.8
 -	cp imap/imapd.8 .
@@ -53,15 +67,21 @@ $NetBSD: patch-aa,v 1.14 2007/10/15 15:37:21 jlam Exp $
 +courierpop3d.8: imap/courierpop3d.8
 +	cp imap/courierpop3d.8 .
  
-@@ -1120,6 +1124,4 @@ install-exec-local:
+ mkimapdcert: imap/mkimapdcert
+ 	cp imap/mkimapdcert .
+@@ -1298,37 +1302,21 @@
+ install-exec-local:
+ 	$(mkinstalldirs) $(DESTDIR)$(databindir)
  	$(mkinstalldirs) $(DESTDIR)$(bindir)
 -	test ! -x tcpd/couriertls || $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) \
 -		tcpd/couriertls $(DESTDIR)$(bindir)/couriertls
  	$(mkinstalldirs) $(DESTDIR)$(sbindir)
 -	for f in mkimapdcert mkpop3dcert ; \
-+	for f in imapd-ssl imapd mkimapdcert mkpop3dcert pop3d pop3d-ssl ; \
++	for f in imapd-ssl.rc imapd.rc mkimapdcert mkpop3dcert pop3d.rc pop3d-ssl.rc ; \
  		do rm -f $(DESTDIR)$(sbindir)/$$f ; \
-@@ -1129,17 +1131,4 @@ install-exec-local:
+ 		$(LN_S) $(databindir)/$$f $(DESTDIR)$(sbindir)/$$f ; done
+ 	$(mkinstalldirs) $(DESTDIR)$(localstatedir)
+ 
  install-exec-hook:
 -	chmod 444 $(DESTDIR)$(sysconfdir)/quotawarnmsg.example
 -	mkdir -p $(DESTDIR)$(sysconfdir)/shared
@@ -79,7 +99,12 @@ $NetBSD: patch-aa,v 1.14 2007/10/15 15:37:21 jlam Exp $
 -		$(INSTALL_DATA) $(srcdir)/imap/pop3d.pam \
 -		$(DESTDIR)/etc/pam.d/pop3 || exit 1
  	for f in $(man_MANS); do chmod a+r $(DESTDIR)$(mandir)/*/$$f; done
-@@ -1150,3 +1139,2 @@ uninstall-local:
+ 	@echo "Do not forget to run make install-configure"
+ 
+ uninstall-local:
+ 	for f in mkimapdcert mkpop3dcert ; \
  		do rm -f $(DESTDIR)$(sbindir)/$$f ; done
 -	rm -f $(DESTDIR)$(bindir)/couriertls
  
+ INSTALL.txt: INSTALL.html
+ 	$(HTML2TXT) INSTALL.html >INSTALL.txt
diff --git a/mail/courier-imap/patches/patch-ad b/mail/courier-imap/patches/patch-ad
index 3ac4263..f877213 100644
--- a/mail/courier-imap/patches/patch-ad
+++ b/mail/courier-imap/patches/patch-ad
@@ -1,8 +1,8 @@
 $NetBSD: patch-ad,v 1.9 2008/02/19 18:45:14 jlam Exp $
 
---- configure.orig	2007-11-23 22:20:27.000000000 -0500
-+++ configure
-@@ -20576,9 +20576,6 @@ else
+--- configure.orig	2009-12-25 22:08:26.000000000 +0000
++++ configure	2010-03-15 16:10:48.000000000 +0000
+@@ -12377,9 +12377,6 @@
  fi
  
  
diff --git a/mail/courier-imap/patches/patch-ae b/mail/courier-imap/patches/patch-ae
index 1bdb713..222239f 100644
--- a/mail/courier-imap/patches/patch-ae
+++ b/mail/courier-imap/patches/patch-ae
@@ -1,8 +1,8 @@
 $NetBSD: patch-ae,v 1.8 2005/08/11 00:04:01 jlam Exp $
 
---- imapd-ssl.rc.in.orig	2005-07-01 21:13:56.000000000 -0400
-+++ imapd-ssl.rc.in
-@@ -9,6 +9,7 @@ prefix=@prefix@
+--- imapd-ssl.rc.in.orig	2005-07-02 02:13:56.000000000 +0100
++++ imapd-ssl.rc.in	2010-03-15 16:10:48.000000000 +0000
+@@ -9,6 +9,7 @@
  exec_prefix=@exec_prefix@
  bindir=@bindir@
  libexecdir=@libexecdir@
@@ -10,7 +10,7 @@ $NetBSD: patch-ae,v 1.8 2005/08/11 00:04:01 jlam Exp $
  
  if test ! -f @sysconfdir@/imapd
  then
-@@ -40,6 +41,7 @@ start)
+@@ -40,6 +41,7 @@
  		exec_prefix=@exec_prefix@ ;
  		bindir=@bindir@ ;
  		libexecdir=@libexecdir@ ;
diff --git a/mail/courier-imap/patches/patch-af b/mail/courier-imap/patches/patch-af
index bc8923d..deb8991 100644
--- a/mail/courier-imap/patches/patch-af
+++ b/mail/courier-imap/patches/patch-af
@@ -1,8 +1,8 @@
 $NetBSD: patch-af,v 1.8 2005/08/11 00:04:01 jlam Exp $
 
---- imapd.rc.in.orig	2005-07-01 21:13:56.000000000 -0400
-+++ imapd.rc.in
-@@ -9,6 +9,7 @@ prefix=@prefix@
+--- imapd.rc.in.orig	2008-05-04 14:12:47.000000000 +0100
++++ imapd.rc.in	2010-03-15 16:13:30.000000000 +0000
+@@ -9,6 +9,7 @@
  exec_prefix=@exec_prefix@
  bindir=@bindir@
  libexecdir=@libexecdir@
@@ -10,11 +10,11 @@ $NetBSD: patch-af,v 1.8 2005/08/11 00:04:01 jlam Exp $
  
  if test ! -f @sysconfdir@/imapd
  then
-@@ -40,6 +41,7 @@ start)
+@@ -40,6 +41,7 @@
  			exec_prefix=@exec_prefix@ ;
  			bindir=@bindir@ ;
  			libexecdir=@libexecdir@ ;
 +			sbindir=@sbindir@ ;
- 				. @sysconfdir@/imapd ; \
  				. @sysconfdir@/imapd-ssl ; \
+ 				. @sysconfdir@/imapd ; \
  		IMAP_STARTTLS=$IMAPDSTARTTLS ; \
diff --git a/mail/courier-imap/patches/patch-ag b/mail/courier-imap/patches/patch-ag
index b6853df..6de91d6 100644
--- a/mail/courier-imap/patches/patch-ag
+++ b/mail/courier-imap/patches/patch-ag
@@ -1,8 +1,8 @@
 $NetBSD: patch-ag,v 1.8 2005/08/11 00:04:01 jlam Exp $
 
---- pop3d-ssl.rc.in.orig	2005-07-01 21:13:56.000000000 -0400
-+++ pop3d-ssl.rc.in
-@@ -9,6 +9,7 @@ prefix=@prefix@
+--- pop3d-ssl.rc.in.orig	2005-07-02 02:13:56.000000000 +0100
++++ pop3d-ssl.rc.in	2010-03-15 16:10:48.000000000 +0000
+@@ -9,6 +9,7 @@
  exec_prefix=@exec_prefix@
  bindir=@bindir@
  libexecdir=@libexecdir@
@@ -10,7 +10,7 @@ $NetBSD: patch-ag,v 1.8 2005/08/11 00:04:01 jlam Exp $
  
  if test ! -f @sysconfdir@/pop3d
  then
-@@ -33,6 +34,7 @@ start)
+@@ -33,6 +34,7 @@
  		exec_prefix=@exec_prefix@ ;
  		bindir=@bindir@ ;
  		libexecdir=@libexecdir@ ;
diff --git a/mail/courier-imap/patches/patch-ah b/mail/courier-imap/patches/patch-ah
index 5add83b..4512ef9 100644
--- a/mail/courier-imap/patches/patch-ah
+++ b/mail/courier-imap/patches/patch-ah
@@ -1,8 +1,8 @@
 $NetBSD: patch-ah,v 1.7 2005/08/11 00:04:01 jlam Exp $
 
---- pop3d.rc.in.orig	2005-07-01 21:13:56.000000000 -0400
-+++ pop3d.rc.in
-@@ -9,6 +9,7 @@ prefix=@prefix@
+--- pop3d.rc.in.orig	2008-05-04 14:12:47.000000000 +0100
++++ pop3d.rc.in	2010-03-15 16:13:54.000000000 +0000
+@@ -9,6 +9,7 @@
  exec_prefix=@exec_prefix@
  bindir=@bindir@
  libexecdir=@libexecdir@
@@ -10,11 +10,11 @@ $NetBSD: patch-ah,v 1.7 2005/08/11 00:04:01 jlam Exp $
  
  if test ! -f @sysconfdir@/pop3d
  then
-@@ -32,6 +33,7 @@ start)
+@@ -32,6 +33,7 @@
  		exec_prefix=@exec_prefix@ ;
  		bindir=@bindir@ ;
  		libexecdir=@libexecdir@ ;
 +		sbindir=@sbindir@ ;
- 		. @sysconfdir@/pop3d ; \
  		. @sysconfdir@/pop3d-ssl ; \
+ 		. @sysconfdir@/pop3d ; \
  		PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
diff --git a/mail/courier-imap/patches/patch-ak b/mail/courier-imap/patches/patch-ak
index 3c2f627..d622ba2 100644
--- a/mail/courier-imap/patches/patch-ak
+++ b/mail/courier-imap/patches/patch-ak
@@ -1,7 +1,7 @@
 $NetBSD: patch-ak,v 1.3 2008/02/19 18:45:14 jlam Exp $
 
---- imap/mkimapdcert.in.orig	2007-11-04 15:50:15.000000000 -0500
-+++ imap/mkimapdcert.in
+--- imap/mkimapdcert.in.orig	2007-11-04 20:49:58.000000000 +0000
++++ imap/mkimapdcert.in	2010-03-15 16:10:48.000000000 +0000
 @@ -9,7 +9,13 @@
  # IMAP over SSL.  Normally this script would get called by an automatic
  # package installation routine.
@@ -17,7 +17,7 @@ $NetBSD: patch-ak,v 1.3 2008/02/19 18:45:14 jlam Exp $
  then
  	test -x @OPENSSL@ || exit 0
  else
-@@ -36,7 +42,7 @@ cleanup() {
+@@ -36,7 +42,7 @@
  
  cd @mydatadir@
  
diff --git a/mail/courier-imap/patches/patch-an b/mail/courier-imap/patches/patch-an
deleted file mode 100644
index e868e8c..0000000
--- a/mail/courier-imap/patches/patch-an
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-an,v 1.1 2007/10/15 15:37:21 jlam Exp $
-
---- imap/mailboxlist.c.orig	Fri Jul 27 02:41:01 2007
-+++ imap/mailboxlist.c
-@@ -347,9 +347,11 @@ static void folder_entry(char *folder, c
- 	if (!need_add_folders && !need_add_hier)
- 		return; /* Nothing to do */
- 
-+	{
- 	CHECK_RIGHTSM(folder, have_rights, ACL_LOOKUP);
- 	if (!have_rights[0])
- 		return;
-+	}
- 
- 	if (need_add_folders)
- 		(void) add_hier(folders, folder);
diff --git a/mail/courier-imap/patches/patch-ao b/mail/courier-imap/patches/patch-ao
index 4eae4c7..2387eb6 100644
--- a/mail/courier-imap/patches/patch-ao
+++ b/mail/courier-imap/patches/patch-ao
@@ -1,7 +1,7 @@
 $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
+--- imap/mkpop3dcert.in.orig	2007-11-04 20:49:58.000000000 +0000
++++ imap/mkpop3dcert.in	2010-03-15 16:10:48.000000000 +0000
 @@ -9,7 +9,13 @@
  # POP3 over SSL.  Normally this script would get called by an automatic
  # package installation routine.
@@ -17,7 +17,7 @@ $NetBSD: patch-ao,v 1.1 2008/02/19 18:45:14 jlam Exp $
  then
  	test -x @OPENSSL@ || exit 0
  else
-@@ -36,7 +42,7 @@ cleanup() {
+@@ -36,7 +42,7 @@
  
  cd @mydatadir@
  
diff --git a/mail/courier-maildir/distinfo b/mail/courier-maildir/distinfo
index 62bebfa..290453b 100644
--- a/mail/courier-maildir/distinfo
+++ b/mail/courier-maildir/distinfo
@@ -1,5 +1,5 @@
 $NetBSD: distinfo,v 1.12 2008/02/19 18:45:18 jlam Exp $
 
-SHA1 (courier-0.58.0.tar.bz2) = 964d81e6de5390678c9f10dddbc176273b925f6d
-RMD160 (courier-0.58.0.tar.bz2) = 940fb7967d154aeeb462691beb508155b3df4e29
-Size (courier-0.58.0.tar.bz2) = 7123136 bytes
+SHA1 (courier-0.64.1.tar.bz2) = c8b81a2deb87ce07c74033fae807a498e4958e52
+RMD160 (courier-0.64.1.tar.bz2) = f7a0733ab2c4f8e0743bbe8b0fb4c44a5d75ceec
+Size (courier-0.64.1.tar.bz2) = 7131375 bytes
diff --git a/mail/courier-mta/Makefile b/mail/courier-mta/Makefile
index c07bc4d..d20eb9e 100644
--- a/mail/courier-mta/Makefile
+++ b/mail/courier-mta/Makefile
@@ -2,7 +2,6 @@
 
 DISTNAME=	courier-${COURIER_VERSION}
 PKGNAME=	${DISTNAME:S/-/-mta-/}
-PKGREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
@@ -15,7 +14,7 @@ HOMEPAGE=	http://www.courier-mta.org/
 
 DEPENDS+=	courier-maildir>=${COURIER_VERSION}:../../mail/courier-maildir
 DEPENDS+=	couriertcpd>=${COURIER_VERSION}:../../net/couriertcpd
-DEPENDS+=	maildrop>=2.0.4nb3:../../mail/maildrop
+DEPENDS+=	maildrop>=2.4.2:../../mail/maildrop
 
 PKG_DESTDIR_SUPPORT=	user-destdir
 USE_TOOLS+=		gmake perl:run
@@ -45,7 +44,6 @@ CONFIGURE_ARGS+=	--with-mailgid=${PKG_GID.${COURIER_GROUP}}
 CONFIGURE_ARGS+=	--with-paranoid-smtpext
 CONFIGURE_ARGS+=	--with-piddir=${COURIER_STATEDIR:Q}/tmp
 CONFIGURE_ARGS+=	--with-transport=${COURIER_TRANSPORTS:M*:Q}
-CONFIGURE_ARGS+=	--without-certdb
 
 # This argument is actually here just to make the "webmail" configure
 # script work.  The value is not actually used since in reality, we are
diff --git a/mail/courier-mta/Makefile.common b/mail/courier-mta/Makefile.common
index affb87e..7737959 100644
--- a/mail/courier-mta/Makefile.common
+++ b/mail/courier-mta/Makefile.common
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile.common,v 1.10 2009/05/19 08:59:20 wiz Exp $
 
-COURIER_VERSION=	0.58.0
+COURIER_VERSION=	0.64.1
 LICENSE=		gnu-gpl-v3
 
 .include "../../mk/bsd.prefs.mk"
diff --git a/mail/courier-mta/distinfo b/mail/courier-mta/distinfo
index 7fb411c..2e16d3f 100644
--- a/mail/courier-mta/distinfo
+++ b/mail/courier-mta/distinfo
@@ -1,20 +1,19 @@
 $NetBSD: distinfo,v 1.12 2010/01/09 22:16:20 heinz Exp $
 
-SHA1 (courier-0.58.0.tar.bz2) = 964d81e6de5390678c9f10dddbc176273b925f6d
-RMD160 (courier-0.58.0.tar.bz2) = 940fb7967d154aeeb462691beb508155b3df4e29
-Size (courier-0.58.0.tar.bz2) = 7123136 bytes
-SHA1 (patch-aa) = 3f5465bd153d51f1dd6ed2f7849c098957afec2e
-SHA1 (patch-ab) = 133f2b48bdff76568b89e51908734a7e29cf9e03
-SHA1 (patch-ac) = 3db182c84827d53af35ea45b7296b98ecf0579d8
-SHA1 (patch-ad) = faa1d2f21f55550efa631c25435fefee5b235bf2
-SHA1 (patch-ae) = e52ab2f6a4e253dc4a28291db6744ea2593f2fc3
-SHA1 (patch-af) = a3bcc672fc05e05497d7408c1a96ad52226aee01
-SHA1 (patch-ag) = 1bedd756d9932365896da82704941cdbc06e1dfd
-SHA1 (patch-ah) = 78e0db8d5319d985d7e8aec4c1240561fead3a00
-SHA1 (patch-ai) = 1337870d95bb46882980553ffba6ec6956bc9147
-SHA1 (patch-aj) = cf666ac5c05e9fb5aef9c23d534edefa745ab547
-SHA1 (patch-al) = 1c7935b46b7affafa86e4a858ba6a79b7fbebbc5
-SHA1 (patch-an) = 1c78baf7fc393b013c47745b914571aff94f1497
-SHA1 (patch-ax) = ed01509d1868b92e80ec98e320ac285345584e31
-SHA1 (patch-ay) = 499f46a7116da4f7adfa6e7c2d7e4e4856174a9f
-SHA1 (patch-az) = fbe1667536989486e62ecdb50a74cb3c38e3fb0d
+SHA1 (courier-0.64.1.tar.bz2) = c8b81a2deb87ce07c74033fae807a498e4958e52
+RMD160 (courier-0.64.1.tar.bz2) = f7a0733ab2c4f8e0743bbe8b0fb4c44a5d75ceec
+Size (courier-0.64.1.tar.bz2) = 7131375 bytes
+SHA1 (patch-aa) = 2b1c2ac86bbc8486856d6c49a69fa77fe91c5f1e
+SHA1 (patch-ab) = 1a48bece146e8149b78d8da8d8c65a27a7c3cd93
+SHA1 (patch-ac) = e15ef04e1a55b085f0781fdd2b2ef30c66ccd3d5
+SHA1 (patch-ad) = 2147dfac7b8e5243ea1ae286e9377352ae4323cd
+SHA1 (patch-ae) = 73603c88ed3e69a9b12ec3c0fd9a2ca2f4777752
+SHA1 (patch-af) = 863b7af8c063bc3a3ba50dee587f14c38aa49134
+SHA1 (patch-ag) = db79cea2e42067832abb152d861c9c0e079d3d82
+SHA1 (patch-ah) = 3b53d220e1eabf5a5132d6e9be8425d96cbd0ee0
+SHA1 (patch-ai) = a745bdde788449754442b1abdecdcf097c3ccb07
+SHA1 (patch-aj) = b6f542395105a327de489cdfdbf58315bd58cc7d
+SHA1 (patch-al) = cabe31c18324299b9e8f54186b7ec61b6c5fe4b4
+SHA1 (patch-an) = e5cbab7ff59f9054d29318f964647dcffcab46c4
+SHA1 (patch-ax) = 50280a5ea7471460a35525e4eee967b8700ab518
+SHA1 (patch-ay) = 2878d08d9b2beef6c83fe34686f7a7ed9e1c2fdb
diff --git a/mail/courier-mta/patches/patch-aa b/mail/courier-mta/patches/patch-aa
index 6957c39..54b2437 100644
--- a/mail/courier-mta/patches/patch-aa
+++ b/mail/courier-mta/patches/patch-aa
@@ -1,8 +1,8 @@
 $NetBSD: patch-aa,v 1.5 2008/02/19 18:45:24 jlam Exp $
 
---- courier/Makefile.in.orig	2007-11-23 22:26:43.000000000 -0500
-+++ courier/Makefile.in
-@@ -46,16 +46,16 @@ build_triplet = @build@
+--- courier/Makefile.in.orig	2010-01-09 21:17:16.000000000 +0000
++++ courier/Makefile.in	2010-03-15 13:23:24.000000000 +0000
+@@ -47,16 +47,16 @@
  host_triplet = @host@
  target_triplet = @target@
  pkglibexec_PROGRAMS = aliasexp$(EXEEXT) aliascombine$(EXEEXT) \
@@ -24,16 +24,15 @@ $NetBSD: patch-aa,v 1.5 2008/02/19 18:45:24 jlam Exp $
  	@EXTRASBIN@ $(am__empty)
  cmdlib_PROGRAMS = submitmkdir$(EXEEXT) courierd$(EXEEXT) @EXTRACMDLIB@
  subdir = .
-@@ -433,7 +433,7 @@ BUILT_SOURCES = prefix.h exec_prefix.h s
+@@ -477,29 +477,26 @@
  	uidgid.h configargs.h sort.h webmlmdhandlerslist.H
  RFCERRTXTIN = rfcerrheader.txt
  RFCERRTXTNOIN = rfcerr2045.txt rfcerr2046.txt rfcerr2047.txt
 -extrapkglib = makedatprog courierpop3login pcpd
 +extrapkglib = 
- pkglibexecdir = $(libexecdir)/courier
  webmaildir = $(libexecdir)/courier/webmail
  webmail_SOURCES = 
-@@ -441,22 +441,19 @@ sqwebmaild_SOURCES = 
+ sqwebmaild_SOURCES = 
  
  # Don't forget to change perms.sh.in, if webmailimagedir moves.
  webmailimagedir = $(datadir)/sqwebmail/images
@@ -62,7 +61,7 @@ $NetBSD: patch-aa,v 1.5 2008/02/19 18:45:24 jlam Exp $
  
  mlmdatadir = $(datadir)/couriermlm
  mlmdata_DATA = \
-@@ -512,7 +509,7 @@ mlmdata_DATA = \
+@@ -555,7 +552,7 @@
  	webmlmsublist.tmpl.html \
  	webmlm.tmpl.html
  
@@ -71,7 +70,7 @@ $NetBSD: patch-aa,v 1.5 2008/02/19 18:45:24 jlam Exp $
  cmdlibdir = @libexecdir@/courier
  
  # Subdirectories
-@@ -1673,6 +1670,12 @@ couriertls$(EXEEXT): ../tcpd/couriertls$
+@@ -1896,6 +1893,12 @@
  courierpop3login$(EXEEXT): ../imap/pop3login$(EXEEXT)
  	cp -f ../imap/pop3login$(EXEEXT) courierpop3login$(EXEEXT)
  
@@ -84,7 +83,7 @@ $NetBSD: patch-aa,v 1.5 2008/02/19 18:45:24 jlam Exp $
  sort.h:
  	echo '#define SORT "$(SORT)"' >sort.h
  
-@@ -1828,39 +1831,21 @@ dist-hook:
+@@ -2051,39 +2054,21 @@
  
  install-exec-hook:
  	for d in $(bindir) $(sbindir) $(libexecdir) $(libexecdir)/courier \
@@ -126,7 +125,7 @@ $NetBSD: patch-aa,v 1.5 2008/02/19 18:45:24 jlam Exp $
  	test -f $(DESTDIR)$(sysconfdir)/enablefiltering && exit 0; \
  		echo esmtp >$(DESTDIR)$(sysconfdir)/enablefiltering
  	test -f $(DESTDIR)$(sysconfdir)/aliases/system && exit 0; \
-@@ -1872,10 +1857,6 @@ install-data-hook:
+@@ -2095,10 +2080,6 @@
  	rm -f $(DESTDIR)$(bindir)/rmail
  	$(LN_S) sendmail $(DESTDIR)$(bindir)/rmail
  	-$(mkinstalldirs) $(DESTDIR)@mandir@/man8
diff --git a/mail/courier-mta/patches/patch-ab b/mail/courier-mta/patches/patch-ab
index 5b82665..a3e5516 100644
--- a/mail/courier-mta/patches/patch-ab
+++ b/mail/courier-mta/patches/patch-ab
@@ -1,21 +1,8 @@
 $NetBSD: patch-ab,v 1.5 2010/01/09 22:16:20 heinz Exp $
 
-  first hunk: make option "--without-ldapaliasd" work (see patch-az)
-
---- courier/configure.orig	2007-11-24 03:26:42.000000000 +0000
-+++ courier/configure
-@@ -21071,7 +21071,9 @@ LIBS="$saveLIBS"
- 
- # Check whether --with-ldapaliasd was given.
- if test "${with_ldapaliasd+set}" = set; then
--  withval=$with_ldapaliasd; ldapaliasd="$withval"; ldapaliasd="yes"
-+  withval=$with_ldapaliasd; ldapaliasd="$withval"
-+else
-+  ldapaliasd="yes"
- fi
- 
- 
-@@ -22366,9 +22368,9 @@ done
+--- courier/configure.orig	2010-01-09 21:15:30.000000000 +0000
++++ courier/configure	2010-03-15 13:25:54.000000000 +0000
+@@ -18398,9 +18398,9 @@
  
  if test "$testmode" = "0"
  then
diff --git a/mail/courier-mta/patches/patch-ac b/mail/courier-mta/patches/patch-ac
index c3f3ca5..6ea71b2 100644
--- a/mail/courier-mta/patches/patch-ac
+++ b/mail/courier-mta/patches/patch-ac
@@ -1,8 +1,8 @@
 $NetBSD: patch-ac,v 1.5 2008/02/19 18:45:24 jlam Exp $
 
---- courier/doc/Makefile.in.orig	2007-11-17 19:48:53.000000000 -0500
-+++ courier/doc/Makefile.in
-@@ -151,7 +151,7 @@ top_srcdir = @top_srcdir@
+--- courier/doc/Makefile.in.orig	2010-01-09 21:17:18.000000000 +0000
++++ courier/doc/Makefile.in	2010-03-15 13:22:49.000000000 +0000
+@@ -169,7 +169,7 @@
  version = @version@
  htmldocdir = @datadir@/htmldoc
  CLEANFILES = permissions.dat
@@ -11,7 +11,7 @@ $NetBSD: patch-ac,v 1.5 2008/02/19 18:45:24 jlam Exp $
  		draft-varshavchik-exdata-smtpext.txt \
  		draft-varshavchik-verp-smtpext.txt \
  		draft-varshavchik-security-smtpext.txt \
-@@ -189,66 +189,38 @@ htmlin = \
+@@ -207,67 +207,38 @@
  		courier.html \
  		courierldapaliasd.html \
  		couriermlm.html \
@@ -63,7 +63,8 @@ $NetBSD: patch-ac,v 1.5 2008/02/19 18:45:24 jlam Exp $
 -man1 = sendmail.1 preline.1 maildirmake.1 cancelmsg.1 lockmail.1 maildrop.1 \
 -	mailq.1 mailbot.1 makemime.1 mimegpg.1 maildiracl.1 \
 -	makedat.1 reformail.1 reformime.1 couriermlm.1 testmxlookup.1 \
--	dot-forward.1 couriertls.1 couriertcpd.1 maildirkw.1 webmlmd.1
+-	dot-forward.1 couriertls.1 couriertcpd.1 maildirkw.1 \
+-	webmlmd.1
 -
 -man5 = dot-courier.5 maildir.5
 -man7 = localmailfilter.7 maildirquota.7 maildropgdbm.7 maildropfilter.7 \
@@ -83,21 +84,21 @@ $NetBSD: patch-ac,v 1.5 2008/02/19 18:45:24 jlam Exp $
 -	mkesmtpdcert.8 mkimapdcert.8 mkpop3dcert.8 \
 +	mkesmtpdcert.8 \
  	makealiases.8 makepercentrelay.8 makesmtpaccess.8 \
--	pop3d.8 submit.8 imapd.8
+-	pop3d.8 pop3d-ssl.8 submit.8 imapd.8
 +	submit.8
  
  BUILT_SOURCES = \
  	aliaslookup.html aliaslookup.8 \
-@@ -275,7 +247,7 @@ BUILT_SOURCES = \
+@@ -294,7 +265,7 @@
  	webmlmd.html.in webmlmd.1.in
  
- EXTRA_DIST = $(nohtmlin) $(BUILT_SOURCES)
+ EXTRA_DIST = $(nohtmlin) $(BUILT_SOURCES) dotforward.1 pop3d-ssl.8
 -man_LINKS = $(man8dir)/courierpop3login.8 \
 +man_LINKS = \
  	$(man1dir)/rmail.1 $(man1dir)/dotforward.1 \
  	$(man8dir)/makesmtpaccess-msa.8 \
  	$(man8dir)/esmtpd-msa.8
-@@ -1156,8 +1128,7 @@ preline.1: preline.1.in
+@@ -1215,8 +1186,7 @@
  
  install-man-extra:
  	cd $(DESTDIR)$(man8dir) ; \
diff --git a/mail/courier-mta/patches/patch-ad b/mail/courier-mta/patches/patch-ad
index ab90ca3..87cc6ad 100644
--- a/mail/courier-mta/patches/patch-ad
+++ b/mail/courier-mta/patches/patch-ad
@@ -1,8 +1,8 @@
 $NetBSD: patch-ad,v 1.4 2008/02/19 18:45:24 jlam Exp $
 
---- courier/filters/Makefile.in.orig	2007-11-17 19:49:01.000000000 -0500
-+++ courier/filters/Makefile.in
-@@ -236,11 +236,12 @@ SUBDIRS = libfilter perlfilter
+--- courier/filters/Makefile.in.orig	2010-01-09 21:17:24.000000000 +0000
++++ courier/filters/Makefile.in	2010-03-15 13:18:07.000000000 +0000
+@@ -283,11 +283,12 @@
  CLEANFILES = $(htmldoc_DATA) $(man_MANS) filtersocketdir.h filteractivedir.h \
  	pidfile.h permissions.dat
  
@@ -16,7 +16,7 @@ $NetBSD: patch-ad,v 1.4 2008/02/19 18:45:24 jlam Exp $
  filtersocketdir = $(localstatedir)/filters
  allfiltersocketdir = $(localstatedir)/allfilters
  filterconfdir = $(sysconfdir)/filters
-@@ -931,16 +932,12 @@ install-exec-hook:
+@@ -1083,16 +1084,12 @@
  install-data-hook:
  	-$(mkinstalldirs) $(DESTDIR)$(filtersocketdir)
  	-$(mkinstalldirs) $(DESTDIR)$(allfiltersocketdir)
diff --git a/mail/courier-mta/patches/patch-ae b/mail/courier-mta/patches/patch-ae
index dc23360..15003ad 100644
--- a/mail/courier-mta/patches/patch-ae
+++ b/mail/courier-mta/patches/patch-ae
@@ -1,8 +1,8 @@
 $NetBSD: patch-ae,v 1.2 2007/08/10 17:57:04 jlam Exp $
 
---- courier/filters/filterctl.in.orig	2004-01-31 23:46:27.000000000 -0500
-+++ courier/filters/filterctl.in
-@@ -11,8 +11,9 @@ libexecdir="@libexecdir@"
+--- courier/filters/filterctl.in.orig	2004-02-01 04:46:27.000000000 +0000
++++ courier/filters/filterctl.in	2010-03-15 13:18:07.000000000 +0000
+@@ -11,8 +11,9 @@
  sysconfdir="@sysconfdir@"
  localstatedir="@localstatedir@"
  piddir="@piddir@"
diff --git a/mail/courier-mta/patches/patch-af b/mail/courier-mta/patches/patch-af
index f69f6e5..548cf74 100644
--- a/mail/courier-mta/patches/patch-af
+++ b/mail/courier-mta/patches/patch-af
@@ -1,8 +1,8 @@
 $NetBSD: patch-af,v 1.3 2007/10/15 15:37:14 jlam Exp $
 
---- courier/filters/perlfilter/Makefile.in.orig	Sat Jul 21 20:31:15 2007
-+++ courier/filters/perlfilter/Makefile.in
-@@ -207,7 +207,8 @@ top_srcdir = @top_srcdir@
+--- courier/filters/perlfilter/Makefile.in.orig	2010-01-09 21:17:33.000000000 +0000
++++ courier/filters/perlfilter/Makefile.in	2010-03-15 13:18:07.000000000 +0000
+@@ -234,7 +234,8 @@
  EXTRA_DIST = perlfilter-wrapper.pl perlfilter-example.pl
  BUILT_SOURCES = filtersocketdir.h wrapperpl.h xsinit.c
  CLEANFILES = $(BUILT_SOURCES) permissions.dat
diff --git a/mail/courier-mta/patches/patch-ag b/mail/courier-mta/patches/patch-ag
index 042c246..be8a5d3 100644
--- a/mail/courier-mta/patches/patch-ag
+++ b/mail/courier-mta/patches/patch-ag
@@ -1,7 +1,7 @@
 $NetBSD: patch-ag,v 1.3 2008/02/19 18:45:24 jlam Exp $
 
---- courier/module.esmtp/mkesmtpdcert.in.orig	2007-11-04 16:17:03.000000000 -0500
-+++ courier/module.esmtp/mkesmtpdcert.in
+--- courier/module.esmtp/mkesmtpdcert.in.orig	2007-11-04 21:17:03.000000000 +0000
++++ courier/module.esmtp/mkesmtpdcert.in	2010-03-15 13:18:07.000000000 +0000
 @@ -9,7 +9,13 @@
  # ESMTP STARTTLS.  Normally this script would get called by an automatic
  # package installation routine.
@@ -17,7 +17,7 @@ $NetBSD: patch-ag,v 1.3 2008/02/19 18:45:24 jlam Exp $
  then
  	test -x @OPENSSL@ || exit 0
  else
-@@ -32,7 +38,7 @@ cleanup() {
+@@ -32,7 +38,7 @@
  
  cd @mydatadir@
  
diff --git a/mail/courier-mta/patches/patch-ah b/mail/courier-mta/patches/patch-ah
index c09df25..1b1c482 100644
--- a/mail/courier-mta/patches/patch-ah
+++ b/mail/courier-mta/patches/patch-ah
@@ -1,8 +1,8 @@
 $NetBSD: patch-ah,v 1.2 2007/08/10 17:57:05 jlam Exp $
 
---- courier/module.local/deliver.c.orig	2006-05-28 11:29:52.000000000 -0400
-+++ courier/module.local/deliver.c
-@@ -635,7 +635,7 @@ static int docommand(const char *extensi
+--- courier/module.local/deliver.c.orig	2010-01-13 01:32:02.000000000 +0000
++++ courier/module.local/deliver.c	2010-03-15 13:18:07.000000000 +0000
+@@ -649,7 +649,7 @@
  		const char *defaultmail,
  		int recursion_level)
  {
@@ -11,7 +11,7 @@ $NetBSD: patch-ah,v 1.2 2007/08/10 17:57:05 jlam Exp $
  const char *p;
  const char *hostp;
  pid_t	pid;
-@@ -727,7 +727,9 @@ const char *shell=getenv("SHELL");
+@@ -741,7 +741,9 @@
  	envs[17]=courier_malloc(strlen(shell)
  				+sizeof("SHELL="));
  	strcat(strcpy(envs[17], "SHELL="), shell);
diff --git a/mail/courier-mta/patches/patch-ai b/mail/courier-mta/patches/patch-ai
index 0df8e49..9dcf28d 100644
--- a/mail/courier-mta/patches/patch-ai
+++ b/mail/courier-mta/patches/patch-ai
@@ -1,8 +1,8 @@
 $NetBSD: patch-ai,v 1.4 2008/02/19 18:45:24 jlam Exp $
 
---- courier/module.local/local.c.orig	2007-10-16 22:04:01.000000000 -0400
-+++ courier/module.local/local.c
-@@ -747,6 +747,8 @@ const char *quota;
+--- courier/module.local/local.c	2007-10-17 03:04:01.000000000 +0100
++++ courier/module.local/local.c	2010-03-15 13:18:07.000000000 +0000
+@@ -747,6 +747,8 @@
  					strlen(argv[7])), "SENDER="),
  					argv[7]));
  
diff --git a/mail/courier-mta/patches/patch-aj b/mail/courier-mta/patches/patch-aj
index d90614b..f8b0f35 100644
--- a/mail/courier-mta/patches/patch-aj
+++ b/mail/courier-mta/patches/patch-aj
@@ -1,8 +1,8 @@
 $NetBSD: patch-aj,v 1.5 2008/02/19 18:45:24 jlam Exp $
 
---- courier/perms.sh.in.orig	2007-07-01 11:36:31.000000000 -0400
-+++ courier/perms.sh.in
-@@ -11,119 +11,41 @@ exec_prefix="@exec_prefix@"
+--- ../courier-0.64.1.orig/courier/perms.sh.in	2007-06-30 23:07:21.000000000 +0100
++++ courier/perms.sh.in	2010-03-15 13:18:07.000000000 +0000
+@@ -11,119 +11,41 @@
  datarootdir="@datarootdir@"
  
  PERMS="
@@ -122,7 +122,7 @@ $NetBSD: patch-aj,v 1.5 2008/02/19 18:45:24 jlam Exp $
  @datadir@/couriermlm		755
  
  @datadir@/couriermlm/adminrequest.tmpl	644
-@@ -191,11 +113,20 @@ do
+@@ -191,11 +113,20 @@
  	if test "$USER" = ""
  	then
  		USER="@mailuser@"
@@ -143,7 +143,7 @@ $NetBSD: patch-aj,v 1.5 2008/02/19 18:45:24 jlam Exp $
  	fi
  
  	case $FILE in
-@@ -216,26 +147,7 @@ do
+@@ -216,26 +147,7 @@
  	echo $FILE $MODE $USER $GROUP $SPECIAL
  done
  
diff --git a/mail/courier-mta/patches/patch-al b/mail/courier-mta/patches/patch-al
index 8f0e06b..b5fbf5b 100644
--- a/mail/courier-mta/patches/patch-al
+++ b/mail/courier-mta/patches/patch-al
@@ -1,8 +1,8 @@
 $NetBSD: patch-al,v 1.2 2007/10/15 15:37:14 jlam Exp $
 
---- courier/courier.c.orig	Wed Jul 18 02:32:34 2007
-+++ courier/courier.c
-@@ -200,7 +200,7 @@ int main(int argc, char **argv)
+--- courier/courier.c.orig	2007-07-21 21:43:12.000000000 +0100
++++ courier/courier.c	2010-03-15 13:18:07.000000000 +0000
+@@ -200,7 +200,7 @@
  #endif
  				execl( DATADIR "/courierctl.start",
  					"courierctl.start", (char *)0);
diff --git a/mail/courier-mta/patches/patch-an b/mail/courier-mta/patches/patch-an
index 1dab76a..1c2e445 100644
--- a/mail/courier-mta/patches/patch-an
+++ b/mail/courier-mta/patches/patch-an
@@ -1,7 +1,7 @@
 $NetBSD: patch-an,v 1.3 2007/10/15 15:37:15 jlam Exp $
 
---- courier/webmlmd.C.orig	Thu Jul  5 01:47:38 2007
-+++ courier/webmlmd.C
+--- courier/webmlmd.C.orig	2009-11-08 18:14:47.000000000 +0000
++++ courier/webmlmd.C	2010-03-15 13:18:07.000000000 +0000
 @@ -22,6 +22,7 @@
  #include	<string.h>
  #include	<signal.h>
@@ -10,11 +10,10 @@ $NetBSD: patch-an,v 1.3 2007/10/15 15:37:15 jlam Exp $
  #include	<sys/types.h>
  #include	<sys/stat.h>
  #include        <sys/socket.h>
-@@ -40,6 +41,39 @@
- #include	<fstream>
+@@ -41,6 +42,39 @@
  #include	<sstream>
  #include	<map>
-+
+ 
 +#if defined(__FreeBSD_version) && (__FreeBSD_version < 500029)
 +#include	<cwchar>
 +namespace std {
@@ -47,6 +46,7 @@ $NetBSD: patch-an,v 1.3 2007/10/15 15:37:15 jlam Exp $
 +	};
 +}
 +#endif
- 
++
  #include	"cmlm.h"
  #include	"cmlmcmdmisc.h"
+ #include	"webmlmd.H"
diff --git a/mail/courier-mta/patches/patch-ax b/mail/courier-mta/patches/patch-ax
index c71e668..4f98172 100644
--- a/mail/courier-mta/patches/patch-ax
+++ b/mail/courier-mta/patches/patch-ax
@@ -1,8 +1,8 @@
 $NetBSD: patch-ax,v 1.1 2008/02/19 18:45:24 jlam Exp $
 
---- courier/module.esmtp/Makefile.in.orig	2007-11-17 19:49:38.000000000 -0500
-+++ courier/module.esmtp/Makefile.in
-@@ -870,17 +870,11 @@ install-data-local:
+--- courier/module.esmtp/Makefile.in.orig	2010-01-09 21:17:54.000000000 +0000
++++ courier/module.esmtp/Makefile.in	2010-03-15 13:18:07.000000000 +0000
+@@ -955,17 +955,11 @@
  	test -f $(DESTDIR)$(sbindir)/courieresmtpd && exit 0; $(mkinstalldirs) $(DESTDIR)$(sbindir) || :; rm -f $(DESTDIR)$(sbindir)/courieresmtpd && $(LN_S) $(moduledir)/courieresmtpd $(DESTDIR)$(sbindir)/courieresmtpd
  	-$(mkinstalldirs) $(DESTDIR)$(bindir)
  	test -f $(DESTDIR)$(bindir)/addcr && exit 0; rm -f $(DESTDIR)$(bindir)/addcr && $(LN_S) $(moduledir)/addcr $(DESTDIR)$(bindir)/addcr
diff --git a/mail/courier-mta/patches/patch-ay b/mail/courier-mta/patches/patch-ay
index 87ee493..6bfdc95 100644
--- a/mail/courier-mta/patches/patch-ay
+++ b/mail/courier-mta/patches/patch-ay
@@ -1,8 +1,8 @@
 $NetBSD: patch-ay,v 1.1 2008/02/19 18:45:24 jlam Exp $
 
---- webadmin/Makefile.in.orig	2007-11-17 19:53:34.000000000 -0500
-+++ webadmin/Makefile.in
-@@ -603,9 +603,6 @@ uninstall-am: uninstall-webadminDATA uni
+--- webadmin/Makefile.in.orig	2010-01-09 21:20:37.000000000 +0000
++++ webadmin/Makefile.in	2010-03-15 13:18:07.000000000 +0000
+@@ -679,9 +679,6 @@
  
  
  install-exec-hook:
diff --git a/mail/courier-mta/patches/patch-az b/mail/courier-mta/patches/patch-az
deleted file mode 100644
index 7ae71be..0000000
--- a/mail/courier-mta/patches/patch-az
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-az,v 1.1 2010/01/09 22:16:20 heinz Exp $
-
-   wrong syntax prevents valid ACTION-IF-NOT-GIVEN, so "--without-ldapaliasd"
-   cannot work.
-   Reported upstream in http://sourceforge.net/mailarchive/message.php?msg_name=20100109205111.GB703%40silence.h.kh-22.de
-
---- courier/configure.in.orig	2007-11-24 03:25:52.000000000 +0000
-+++ courier/configure.in
-@@ -267,7 +267,8 @@ AC_CHECK_FUNC(ldap_search_st, HAVE_LDAP=
- LIBS="$saveLIBS"
- 
- AC_ARG_WITH(ldapaliasd, [ --without-ldapaliasd ],
--			ldapaliasd="$withval"; ldapaliasd="yes")
-+			ldapaliasd="$withval",
-+			ldapaliasd="yes")
- 
- if test "$ldapaliasd" = "no"
- then
diff --git a/mail/maildrop/Makefile b/mail/maildrop/Makefile
index 2e0162c..8a6fe22 100644
--- a/mail/maildrop/Makefile
+++ b/mail/maildrop/Makefile
@@ -1,7 +1,6 @@
 # $NetBSD: Makefile,v 1.48 2008/02/19 18:45:28 jlam Exp $
 
-DISTNAME=	maildrop-2.0.4
-PKGREVISION=	3
+DISTNAME=	maildrop-2.4.3
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
@@ -12,7 +11,7 @@ HOMEPAGE=	http://www.courier-mta.org/maildrop/
 
 PKG_DESTDIR_SUPPORT=	user-destdir
 
-DEPENDS+=	courier-maildir>=0.58.0:../../mail/courier-maildir
+DEPENDS+=	courier-maildir>=${COURIER_VERSION}:../../mail/courier-maildir
 
 USE_TOOLS+=		gmake perl
 USE_TOOLS+=		cat:run		# used by makedat(1)
diff --git a/mail/maildrop/PLIST b/mail/maildrop/PLIST
index ede69b9..e8ecc69 100644
--- a/mail/maildrop/PLIST
+++ b/mail/maildrop/PLIST
@@ -7,6 +7,7 @@ bin/makemime
 bin/reformail
 bin/reformime
 libexec/courier/makedatprog
+libexec/courier/makedat
 man/man1/lockmail.1
 man/man1/mailbot.1
 man/man1/maildrop.1
@@ -17,7 +18,6 @@ man/man1/reformime.1
 man/man7/maildropex.7
 man/man7/maildropfilter.7
 man/man7/maildropgdbm.7
-share/courier/makedat
 share/doc/courier/README.postfix
 share/doc/courier/lockmail.html
 share/doc/courier/mailbot.html
diff --git a/mail/maildrop/distinfo b/mail/maildrop/distinfo
index 091bcb8..a841ea4 100644
--- a/mail/maildrop/distinfo
+++ b/mail/maildrop/distinfo
@@ -1,9 +1,8 @@
 $NetBSD: distinfo,v 1.13 2007/08/27 22:33:19 jlam Exp $
 
-SHA1 (maildrop-2.0.4.tar.bz2) = df2755c1d0e00d19506b0659e59bf5d4756cce17
-RMD160 (maildrop-2.0.4.tar.bz2) = 9c0a349879cc0791ad01e5bae04b680de3a7a606
-Size (maildrop-2.0.4.tar.bz2) = 2286125 bytes
-SHA1 (patch-aa) = 294f05cf64f8ada8b18f6e555a93149850d93933
-SHA1 (patch-ab) = c863a21be30ee0808c6bc4cafd9a8775015a727e
-SHA1 (patch-ac) = b2f4f054b4fda15e110d7813d1e092660f018493
-SHA1 (patch-ad) = e3ce0e564df467d7af0266df0467b382cbc8c831
+SHA1 (maildrop-2.4.3.tar.bz2) = 17bd59a02c1d1eeab2ab4969286a8fe5ab4d3914
+RMD160 (maildrop-2.4.3.tar.bz2) = caae902775c6fb3470d3d9eba70b220d50ad17e8
+Size (maildrop-2.4.3.tar.bz2) = 2413480 bytes
+SHA1 (patch-aa) = de069f144a51da393aad84cae50b285ca1588612
+SHA1 (patch-ab) = 57ed04757660c05eda91570aeeed5214150987ab
+SHA1 (patch-ac) = ed2b4469e2558b05e3ec01a8fd47631d607cf04d
diff --git a/mail/maildrop/patches/patch-aa b/mail/maildrop/patches/patch-aa
index 2fc9f4b..152a1d7 100644
--- a/mail/maildrop/patches/patch-aa
+++ b/mail/maildrop/patches/patch-aa
@@ -1,39 +1,61 @@
 $NetBSD: patch-aa,v 1.7 2007/08/10 17:57:09 jlam Exp $
 
---- Makefile.in.orig	2007-04-22 11:24:04.000000000 -0400
-+++ Makefile.in
-@@ -249,15 +249,12 @@ DELIVERQUOTAHTMLSOURCE = maildirquota.ht
- @INSTALL_DELIVERQUOTA_TRUE@DELIVERQUOTAHTML = $(DELIVERQUOTAHTMLSOURCE)
- @INSTALL_DELIVERQUOTA_FALSE@DELIVERQUOTAMAN = 
- @INSTALL_DELIVERQUOTA_TRUE@DELIVERQUOTAMAN = maildirquota.7 deliverquota.8
+--- Makefile.in.orig	2010-02-24 22:51:39.000000000 +0000
++++ Makefile.in	2010-03-15 14:04:35.000000000 +0000
+@@ -293,16 +293,14 @@
+ 	maildroptips.txt COPYING.GPL manpage.css pgpkeys.txt
+ 
+ scriptdir = $(pkgdatadir)/scripts
+-DELIVERQUOTAHTMLSOURCE = maildirquota.html deliverquota.html
+-DELIVERQUOTAHTML = $(DELIVERQUOTAHTMLSOURCE)
+-DELIVERQUOTAMAN = maildirquota.7 deliverquota.8
 -MAILDROPHTML = lockmail.html maildirmake.html maildropex.html \
 -	maildir.html \
++DELIVERQUOTAHTMLSOURCE = 
++DELIVERQUOTAHTML = 
++DELIVERQUOTAMAN = 
 +MAILDROPHTML = lockmail.html maildropex.html \
  	maildropfilter.html maildropgdbm.html maildrop.html mailbot.html \
  	makemime.html reformail.html reformime.html
  
 -MAILDROPMAN = lockmail.1 maildirmake.1 maildrop.1 mailbot.1 maildropex.7 \
 -	maildir.5 \
--	maildropfilter.7 maildropgdbm.7 makemime.1 reformail.1 reformime.1 \
--	maildirquota.7 deliverquota.8
 +MAILDROPMAN = lockmail.1 maildrop.1 mailbot.1 maildropex.7 \
-+	maildropfilter.7 maildropgdbm.7 makemime.1 reformail.1 reformime.1
+ 	maildropfilter.7 maildropgdbm.7 makemime.1 reformail.1 reformime.1
  
  EXTRA_LTLIBRARIES = librfc822.la librfc2045.la
- @DEVEL_TRUE@DEVEL_MAN = rfc822.3 rfc2045.3
-@@ -1084,11 +1081,12 @@ install-maildrop:
+@@ -1139,12 +1137,12 @@
+ #  Create a soft link from bindir/deliverquota to libdir/bin/deliverquota
+ 
+ install-deliverquota:
+-	$(mkinstalldirs) $(DESTDIR)$(bindir)
+-	$(INSTALL_PROGRAM) maildir/deliverquota $(DESTDIR)$(bindir)/deliverquota
+-	cd $(DESTDIR)$(bindir); rm -f maildrop.deliverquota
++#	$(mkinstalldirs) $(DESTDIR)$(bindir)
++#	$(INSTALL_PROGRAM) maildir/deliverquota $(DESTDIR)$(bindir)/deliverquota
++#	cd $(DESTDIR)$(bindir); rm -f maildrop.deliverquota
+ 
+ uninstall-deliverquota:
+-	rm -f $(DESTDIR)$(bindir)/deliverquota
++#	rm -f $(DESTDIR)$(bindir)/deliverquota
+ 
+ install-data-local: install-man install-deliverquota install-maildrop
+ 
+@@ -1172,13 +1170,14 @@
  		$(INSTALL_PROGRAM) maildrop/$$f $(DESTDIR)$(bindir)/$$f ; \
  	done
  	$(INSTALL_PROGRAM) liblock/lockmail $(DESTDIR)$(bindir)/lockmail
 -	$(INSTALL_PROGRAM) maildir/maildirmake $(DESTDIR)$(bindir)/maildirmake
  	$(INSTALL_PROGRAM) rfc2045/reformime $(DESTDIR)$(bindir)/reformime
  	$(INSTALL_PROGRAM) rfc2045/makemime $(DESTDIR)$(bindir)/makemime
--	$(INSTALL_PROGRAM) makedat/makedatprog $(DESTDIR)$(bindir)/makedatprog
--	$(INSTALL_SCRIPT)  makedat/makedat     $(DESTDIR)$(bindir)/makedat
-+	$(INSTALL_PROGRAM) makedat/makedatprog $(DESTDIR)$(libexecdir)/makedatprog
-+	$(INSTALL_SCRIPT)  makedat/makedat     $(DESTDIR)$(datadir)/makedat
-+	rm -f $(DESTDIR)$(bindir)/makedat
-+	$(LN_S) $(datadir)/makedat $(DESTDIR)$(bindir)/makedat
+ 	test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+-		$(INSTALL_PROGRAM) makedat/makedatprog $(DESTDIR)$(bindir)/makedatprog
++		$(INSTALL_PROGRAM) makedat/makedatprog $(DESTDIR)$(libexecdir)/makedatprog
+ 	test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+-		$(INSTALL_SCRIPT)  makedat/makedat     $(DESTDIR)$(bindir)/makedat
++		$(INSTALL_SCRIPT)  makedat/makedat     $(DESTDIR)$(libexecdir)/makedat; \
++		rm -f $(DESTDIR)$(bindir)/makedat; \
++		$(LN_S) $(libexecdir)/makedat $(DESTDIR)$(bindir)/makedat
  	. maildrop/uidgid ; test -z "$$gid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chgrp $$gid maildrop lockmail
  	. maildrop/uidgid ; test -z "$$uid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chown $$uid maildrop lockmail && chmod 755 maildrop lockmail
  
diff --git a/mail/maildrop/patches/patch-ab b/mail/maildrop/patches/patch-ab
index 8ac611c..3de5a62 100644
--- a/mail/maildrop/patches/patch-ab
+++ b/mail/maildrop/patches/patch-ab
@@ -1,8 +1,8 @@
 $NetBSD: patch-ab,v 1.4 2007/08/10 17:57:09 jlam Exp $
 
---- maildrop/configure.orig	2007-04-22 11:24:25.000000000 -0400
-+++ maildrop/configure
-@@ -21562,7 +21562,7 @@ fi
+--- maildrop/configure.orig	2010-02-24 22:51:59.000000000 +0000
++++ maildrop/configure	2010-03-15 13:50:43.000000000 +0000
+@@ -19066,7 +19066,7 @@
  test "x$prefix" = xNONE && prefix=$ac_default_prefix
  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  
@@ -11,7 +11,7 @@ $NetBSD: patch-ab,v 1.4 2007/08/10 17:57:09 jlam Exp $
  then
  #
  # This version of maildrop is integrated into Courier mail server
-@@ -21699,7 +21699,7 @@ SPOOLDIR="$DIR"
+@@ -19203,7 +19203,7 @@
  
  get_spooldir() {
  
@@ -20,7 +20,7 @@ $NetBSD: patch-ab,v 1.4 2007/08/10 17:57:09 jlam Exp $
  then
  	MBOX_RESET_GID=1
  	SPOOLDIR="./Maildir"
-@@ -21767,7 +21767,7 @@ if test "${with_default_maildrop+set}" =
+@@ -19270,7 +19270,7 @@
  else
    # Courier defaults to ./Maildir
  
diff --git a/mail/maildrop/patches/patch-ac b/mail/maildrop/patches/patch-ac
index caddf9a..90de177 100644
--- a/mail/maildrop/patches/patch-ac
+++ b/mail/maildrop/patches/patch-ac
@@ -1,8 +1,8 @@
 $NetBSD: patch-ac,v 1.3 2007/08/27 22:33:19 jlam Exp $
 
---- maildrop/main.C.orig	2006-10-01 20:03:37.000000000 -0400
-+++ maildrop/main.C
-@@ -576,7 +576,7 @@ uid_t	my_u=getuid();
+--- maildrop/main.C.orig	2010-01-15 03:51:46.000000000 +0000
++++ maildrop/main.C	2010-03-15 13:50:43.000000000 +0000
+@@ -575,7 +575,7 @@
  	if (!found)
  	{
  #if HAVE_COURIER
@@ -11,7 +11,7 @@ $NetBSD: patch-ac,v 1.3 2007/08/27 22:33:19 jlam Exp $
  #endif
  		{
  			my_pw=getpwuid(my_u);
-@@ -628,6 +628,14 @@ Buffer	value;
+@@ -635,6 +635,14 @@
  	{
  	const char *p;
  
@@ -26,7 +26,7 @@ $NetBSD: patch-ac,v 1.3 2007/08/27 22:33:19 jlam Exp $
  		if ((p=getenv("HOME")) && *p)
  			maildrop.init_home=p;
  
-@@ -652,6 +660,8 @@ Buffer	value;
+@@ -659,6 +667,8 @@
  
  		if ((p=getenv("MAILDIRQUOTA")) && *p)
  			maildrop.init_quota=p;
diff --git a/mail/maildrop/patches/patch-ad b/mail/maildrop/patches/patch-ad
deleted file mode 100644
index 4684d6e..0000000
--- a/mail/maildrop/patches/patch-ad
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2007/08/10 17:57:09 jlam Exp $
-
---- configure.orig	2007-04-22 11:24:05.000000000 -0400
-+++ configure
-@@ -20529,7 +20529,8 @@ esac
- 
- 
- 
--if test "$maildirquota" = "1"; then
-+# deliverquota is installed by pkgsrc/mail/courier-maildir.
-+if false && test "$maildirquota" = "1"; then
-   INSTALL_DELIVERQUOTA_TRUE=
-   INSTALL_DELIVERQUOTA_FALSE='#'
- else
diff --git a/mail/sqwebmail/Makefile b/mail/sqwebmail/Makefile
index fbf4629..1345259 100644
--- a/mail/sqwebmail/Makefile
+++ b/mail/sqwebmail/Makefile
@@ -1,7 +1,6 @@
 # $NetBSD: Makefile,v 1.63 2008/02/19 18:45:32 jlam Exp $
 
-DISTNAME=	sqwebmail-5.2.0
-PKGREVISION=	2
+DISTNAME=	sqwebmail-5.4.0
 CATEGORIES=	mail www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
@@ -10,8 +9,8 @@ MAINTAINER=	jlam@pkgsrc.org
 COMMENT=	Webmail CGI for access to maildir-style mailboxes
 HOMEPAGE=	http://www.courier-mta.org/sqwebmail/
 
-DEPENDS+=	courier-maildir>=0.58.0:../../mail/courier-maildir
-DEPENDS+=	maildrop>=2.0.4nb3:../../mail/maildrop
+DEPENDS+=	courier-maildir>=${COURIER_VERSION}:../../mail/courier-maildir
+DEPENDS+=	maildrop>=2.4.2:../../mail/maildrop
 
 PKG_DESTDIR_SUPPORT=	user-destdir
 
diff --git a/mail/sqwebmail/PLIST b/mail/sqwebmail/PLIST
index ccbdb0f..0956c5e 100644
--- a/mail/sqwebmail/PLIST
+++ b/mail/sqwebmail/PLIST
@@ -5,7 +5,7 @@ libexec/courier/sqwebmaild
 libexec/courier/sqwebpasswd
 libexec/courier/webmail/webmail
 man/man1/mimegpg.1
-sbin/webmaild
+sbin/webmaild.rc
 sbin/webgpg
 share/courier/sqwebmail/cleancache.pl
 share/courier/sqwebmail/html/en
diff --git a/mail/sqwebmail/distinfo b/mail/sqwebmail/distinfo
index 50e6588..575dfba 100644
--- a/mail/sqwebmail/distinfo
+++ b/mail/sqwebmail/distinfo
@@ -1,11 +1,11 @@
 $NetBSD: distinfo,v 1.20 2007/10/15 15:38:52 jlam Exp $
 
-SHA1 (sqwebmail-5.2.0.tar.bz2) = 3032f673e9033c7d26a30bc50e24f2897e7ea22d
-RMD160 (sqwebmail-5.2.0.tar.bz2) = b0ba837df30605e6f337c3f0b04200d14bd618cc
-Size (sqwebmail-5.2.0.tar.bz2) = 3926342 bytes
-SHA1 (patch-aa) = 1f25c41ecdf0378f8ee57a9531f787c58ed7d37a
-SHA1 (patch-ad) = ae222755e2291636c3d8b9f5328b3001cf713ddc
-SHA1 (patch-ah) = 762491372570553cc00af0e0d5198b728707eccb
-SHA1 (patch-ai) = def2f4d30bf5f15ea78f401f3c4ca2f2ec8c0ad2
-SHA1 (patch-aj) = fe79e0bdec04d29514c77a7110369f1ded76af77
-SHA1 (patch-am) = d5e654e23473fc3ff613020b0ec99f6eba7b99ea
+SHA1 (sqwebmail-5.4.0.tar.bz2) = e341830c3274b601cd9a029724a59e6e5538cca4
+RMD160 (sqwebmail-5.4.0.tar.bz2) = 83de8c5ba549a349861179497671279228954506
+Size (sqwebmail-5.4.0.tar.bz2) = 3897688 bytes
+SHA1 (patch-aa) = 08ac77d19d732cf8a2327d2cb74d76f99783b3c5
+SHA1 (patch-ad) = eaf467a109d4e3b129f9e250eac6b77b0984d2fc
+SHA1 (patch-ah) = 15e4fac76676c68f3da5613c1bb3565daaa78455
+SHA1 (patch-ai) = 86fc9da78fbbcf9bb940c7ef8fa3df2d2517d3d0
+SHA1 (patch-aj) = 7c5c13458d67cd7a5ee310bb07f6842c85df8fe8
+SHA1 (patch-am) = 158203dbb8e71f665c535365c2119700fdebb578
diff --git a/mail/sqwebmail/patches/patch-aa b/mail/sqwebmail/patches/patch-aa
index 822cc3d..2ff6b83 100644
--- a/mail/sqwebmail/patches/patch-aa
+++ b/mail/sqwebmail/patches/patch-aa
@@ -1,8 +1,8 @@
 $NetBSD: patch-aa,v 1.9 2007/10/15 15:38:52 jlam Exp $
 
---- Makefile.in.orig	Sat Sep 29 14:52:57 2007
-+++ Makefile.in
-@@ -244,19 +244,19 @@ EXTRA_DIST = INSTALL.html README NEWS RE
+--- Makefile.in.orig	2009-12-25 22:04:50.000000000 +0000
++++ Makefile.in	2010-03-15 16:21:13.000000000 +0000
+@@ -283,18 +283,19 @@
  
  scriptbindir = $(sbindir)
  scriptbin_SCRIPTS = \
@@ -10,7 +10,6 @@ $NetBSD: patch-aa,v 1.9 2007/10/15 15:38:52 jlam Exp $
 +	webmaild.rc
  
 -pkglibPROGRAMS = maildirmake deliverquota reformime makemime pcpd
--pkglibexecdir = $(libexecdir)/sqwebmail
 +pkglibPROGRAMS = pcpd
 +pkglibexecdir = $(libexecdir)/courier
  pkglibexec_PROGRAMS = @pkglibPROGRAMS_exec@
@@ -28,7 +27,7 @@ $NetBSD: patch-aa,v 1.9 2007/10/15 15:38:52 jlam Exp $
  @HAVE_HTMLPAGES_TRUE@NEWS_SOURCE = html/index2.html
  all: config.h
  	$(MAKE) $(AM_MAKEFLAGS) all-recursive
-@@ -836,6 +836,9 @@ uninstall-am: uninstall-libexecSCRIPTS u
+@@ -975,6 +976,9 @@
  sqwebmaild.dist: sqwebmail/sqwebmaild.dist
  	cp sqwebmail/sqwebmaild.dist .
  
@@ -38,7 +37,7 @@ $NetBSD: patch-aa,v 1.9 2007/10/15 15:38:52 jlam Exp $
  pcpd: pcp/pcpd
  	cp pcp/pcpd .
  
-@@ -871,7 +874,7 @@ install-exec-local:
+@@ -1010,7 +1014,7 @@
  	$(mkinstalldirs) $(DESTDIR)$(cgibindir)
  	test -w $(DESTDIR)$(cgibindir) || exit 0; \
  		$(INSTALL_PROGRAM) sqwebmail/sqwebmail \
diff --git a/mail/sqwebmail/patches/patch-ad b/mail/sqwebmail/patches/patch-ad
index 1f0c1b2..3027783 100644
--- a/mail/sqwebmail/patches/patch-ad
+++ b/mail/sqwebmail/patches/patch-ad
@@ -1,8 +1,8 @@
 $NetBSD: patch-ad,v 1.10 2007/10/15 15:38:52 jlam Exp $
 
---- sqwebmail/Makefile.in.orig	Sat Sep 29 14:53:23 2007
-+++ sqwebmail/Makefile.in
-@@ -1012,7 +1012,7 @@ install-perms-local: install-perms-cache
+--- sqwebmail/Makefile.in.orig	2009-12-25 22:05:22.000000000 +0000
++++ sqwebmail/Makefile.in	2010-03-15 16:18:41.000000000 +0000
+@@ -1143,7 +1143,7 @@
  
  htmllibdir.h: config.status
  	echo '#define HTMLLIBDIR "@htmldir@"' >htmllibdir.h
@@ -11,7 +11,7 @@ $NetBSD: patch-ad,v 1.10 2007/10/15 15:38:52 jlam Exp $
  	echo '#define CALENDARMODE "$(sysconfdir)/calendarmode"' >>htmllibdir.h
  	echo '#define LOGINDOMAINLIST "$(sysconfdir)/logindomainlist"' >>htmllibdir.h
  	echo '#define MAXMSGSIZE @MAXMSGSIZE@' >>htmllibdir.h
-@@ -1020,7 +1020,7 @@ htmllibdir.h: config.status
+@@ -1151,7 +1151,7 @@
  	echo '#define SOCKDIR "$(localstatedir)"' >>htmllibdir.h
  	echo '#define SHAREDINDEXFILE "$(sysconfdir)/shared/index"' >>htmllibdir.h
  	echo '#define SQWEBPASSWD "$(pkglibexecdir)/sqwebpasswd"' >>htmllibdir.h
@@ -20,7 +20,7 @@ $NetBSD: patch-ad,v 1.10 2007/10/15 15:38:52 jlam Exp $
  		; then \
  		echo '#define HOSTNAMEFILE "$(sysconfdir)/defaultdomain"' >>htmllibdir.h \
  		; echo '#define MAKEMIME "$(bindir)/makemime"' >>htmllibdir.h \
-@@ -1057,9 +1057,6 @@ install-perms-cache:
+@@ -1188,9 +1188,6 @@
  	@echo "@cachedir@ 700 @cacheowner@ bin" >>permissions.dat
  
  cache-reminder:
diff --git a/mail/sqwebmail/patches/patch-ah b/mail/sqwebmail/patches/patch-ah
index 8ea7cd5..6f2e067 100644
--- a/mail/sqwebmail/patches/patch-ah
+++ b/mail/sqwebmail/patches/patch-ah
@@ -1,8 +1,8 @@
 $NetBSD: patch-ah,v 1.6 2007/10/15 15:38:52 jlam Exp $
 
---- sqwebmail/configure.orig	Sat Sep 29 14:53:22 2007
-+++ sqwebmail/configure
-@@ -19893,7 +19893,7 @@ fi
+--- sqwebmail/configure.orig	2009-12-25 22:05:22.000000000 +0000
++++ sqwebmail/configure	2010-03-15 16:18:41.000000000 +0000
+@@ -12502,7 +12502,7 @@
  
  
  
diff --git a/mail/sqwebmail/patches/patch-ai b/mail/sqwebmail/patches/patch-ai
index 121bf9a..60728fe 100644
--- a/mail/sqwebmail/patches/patch-ai
+++ b/mail/sqwebmail/patches/patch-ai
@@ -1,8 +1,8 @@
 $NetBSD: patch-ai,v 1.3 2005/08/11 00:03:51 jlam Exp $
 
---- sqwebmaild.rc.in.orig	2005-07-05 08:37:46.000000000 -0400
-+++ sqwebmaild.rc.in
-@@ -28,7 +28,7 @@ startpcp() {
+--- sqwebmaild.rc.in.orig	2005-07-05 13:37:46.000000000 +0100
++++ sqwebmaild.rc.in	2010-03-15 16:18:41.000000000 +0000
+@@ -28,7 +28,7 @@
  		libexecdir=${libexecdir} ;
  		. @sysconfdir@/sqwebmaild ; \
  		@courierlogger@ -pid=${PIDFILE}.pcp $LOGGEROPTS -start \
@@ -11,7 +11,7 @@ $NetBSD: patch-ai,v 1.3 2005/08/11 00:03:51 jlam Exp $
  		;;
  	*)
  		;;
-@@ -46,7 +46,7 @@ start)
+@@ -46,7 +46,7 @@
  		libexecdir=${libexecdir} ;
  		. @sysconfdir@/sqwebmaild ; \
  		@courierlogger@ -pid=${PIDFILE} $LOGGEROPTS -start \
diff --git a/mail/sqwebmail/patches/patch-aj b/mail/sqwebmail/patches/patch-aj
index e4064bc..a4b5e26 100644
--- a/mail/sqwebmail/patches/patch-aj
+++ b/mail/sqwebmail/patches/patch-aj
@@ -1,8 +1,8 @@
 $NetBSD: patch-aj,v 1.7 2007/10/15 15:38:52 jlam Exp $
 
---- INSTALL.html.orig	Mon Sep  3 16:05:20 2007
-+++ INSTALL.html
-@@ -809,7 +809,7 @@ BrowserMatch "MSIE" nokeepalive downgrad
+--- INSTALL.html.orig	2009-11-14 22:10:43.000000000 +0000
++++ INSTALL.html	2010-03-15 16:18:41.000000000 +0000
+@@ -820,7 +820,7 @@
    configuration files are installed in
    <code>/usr/lib/sqwebmail</code> (the default).</p>
  
diff --git a/mail/sqwebmail/patches/patch-am b/mail/sqwebmail/patches/patch-am
index f85bee8..d16facf 100644
--- a/mail/sqwebmail/patches/patch-am
+++ b/mail/sqwebmail/patches/patch-am
@@ -1,8 +1,8 @@
 $NetBSD: patch-am,v 1.2 2007/10/15 15:38:52 jlam Exp $
 
---- pcp/configure.orig	Sun Jul 22 01:27:29 2007
-+++ pcp/configure
-@@ -28669,14 +28669,15 @@ LIBS="$saveLIBS"
+--- pcp/configure.orig	2009-11-22 14:45:37.000000000 +0000
++++ pcp/configure	2010-03-15 16:18:41.000000000 +0000
+@@ -21456,14 +21456,15 @@
  echo $NETLIBS >pcp.libs
  
  
@@ -19,4 +19,4 @@ $NetBSD: patch-am,v 1.2 2007/10/15 15:38:52 jlam Exp $
 +SENDIT="$sysconfdir/sendit.sh"
  
  
- { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+ { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
diff --git a/meta-pkgs/courier/Makefile b/meta-pkgs/courier/Makefile
index 2d12878..30da91f 100644
--- a/meta-pkgs/courier/Makefile
+++ b/meta-pkgs/courier/Makefile
@@ -14,7 +14,7 @@ META_PACKAGE=	yes
 # COURIER_VERSION should match the variable of the same name found in
 # pkgsrc/mail/courier-mta/Makefile.common.
 #
-COURIER_VERSION=	0.58.0
+COURIER_VERSION=	0.64.1
 
 # The following packages are built from the same Courier sources and
 # should match in version number:
@@ -30,13 +30,13 @@ DEPENDS+=	courier-mta>=${COURIER_VERSION}:../../mail/courier-mta
 #
 #	mail/maildrop, mail/courier-imap, mail/sqwebmail
 #
-DEPENDS+=	maildrop>=2.0.4nb3:../../mail/maildrop
-DEPENDS+=	courier-imap>=4.3.0:../../mail/courier-imap
-DEPENDS+=	sqwebmail>=5.2.0nb2:../../mail/sqwebmail
+DEPENDS+=	maildrop>=2.4.2:../../mail/maildrop
+DEPENDS+=	courier-imap>=4.7.0:../../mail/courier-imap
+DEPENDS+=	sqwebmail>=5.4.0:../../mail/sqwebmail
 
 # We tack on courier-analog because its version is somewhat tied to the
 # log format of the current Courier release.
 #
-DEPENDS+=	courier-analog>=0.15:../../mail/courier-analog
+DEPENDS+=	courier-analog>=0.16:../../mail/courier-analog
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/net/couriertcpd/Makefile b/net/couriertcpd/Makefile
index b235ea7..b28c9b4 100644
--- a/net/couriertcpd/Makefile
+++ b/net/couriertcpd/Makefile
@@ -2,7 +2,6 @@
 
 DISTNAME=	courier-${COURIER_VERSION}
 PKGNAME=	${DISTNAME:S/-/tcpd-/}
-PKGREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
diff --git a/net/couriertcpd/distinfo b/net/couriertcpd/distinfo
index a880cf2..e6688a5 100644
--- a/net/couriertcpd/distinfo
+++ b/net/couriertcpd/distinfo
@@ -1,5 +1,5 @@
 $NetBSD: distinfo,v 1.8 2008/02/19 18:45:41 jlam Exp $
 
-SHA1 (courier-0.58.0.tar.bz2) = 964d81e6de5390678c9f10dddbc176273b925f6d
-RMD160 (courier-0.58.0.tar.bz2) = 940fb7967d154aeeb462691beb508155b3df4e29
-Size (courier-0.58.0.tar.bz2) = 7123136 bytes
+SHA1 (courier-0.64.1.tar.bz2) = c8b81a2deb87ce07c74033fae807a498e4958e52
+RMD160 (courier-0.64.1.tar.bz2) = f7a0733ab2c4f8e0743bbe8b0fb4c44a5d75ceec
+Size (courier-0.64.1.tar.bz2) = 7131375 bytes
diff --git a/security/courier-authlib/Makefile b/security/courier-authlib/Makefile
index 90044a8..303b83f 100644
--- a/security/courier-authlib/Makefile
+++ b/security/courier-authlib/Makefile
@@ -2,8 +2,7 @@
 
 .include "Makefile.common"
 
-DISTNAME=	courier-authlib-0.62.2
-PKGREVISION=	1
+DISTNAME=	courier-authlib-0.63.0
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=	.tar.bz2
diff --git a/security/courier-authlib/distinfo b/security/courier-authlib/distinfo
index 5d842e2..d091e9f 100644
--- a/security/courier-authlib/distinfo
+++ b/security/courier-authlib/distinfo
@@ -1,7 +1,7 @@
 $NetBSD: distinfo,v 1.13 2009/07/02 12:23:44 obache Exp $
 
-SHA1 (courier-authlib-0.62.2.tar.bz2) = dc495ad6c54c271483d4862e09788621d86629a9
-RMD160 (courier-authlib-0.62.2.tar.bz2) = c0f4f32994056f8034f30055cfe55238d137a2ca
-Size (courier-authlib-0.62.2.tar.bz2) = 2233216 bytes
-SHA1 (patch-aa) = 6984af03cce59cee3987526d5c87bb71c8eac635
-SHA1 (patch-ab) = 0f3d86e9bd296c9abc044917656495fd8584bc08
+SHA1 (courier-authlib-0.63.0.tar.bz2) = c0877274de8b58ec4c7a41cfd87ad9b37c408304
+RMD160 (courier-authlib-0.63.0.tar.bz2) = 4528672a11895c9d705340523e578284e40b5dea
+Size (courier-authlib-0.63.0.tar.bz2) = 2817119 bytes
+SHA1 (patch-aa) = aba8c500f3998c1f3d683c384e94c84356120374
+SHA1 (patch-ab) = a3d5f5cba53e8eb2010df1dc00c135ad1b674ac7
diff --git a/security/courier-authlib/patches/patch-aa b/security/courier-authlib/patches/patch-aa
index e6300a6..a667f07 100644
--- a/security/courier-authlib/patches/patch-aa
+++ b/security/courier-authlib/patches/patch-aa
@@ -1,8 +1,8 @@
 $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
 
---- Makefile.in.orig	2009-02-03 23:39:56.000000000 +0000
-+++ Makefile.in
-@@ -453,7 +453,7 @@ CLEANFILES = authldaprc.h authmysqlrc.h 
+--- Makefile.in.orig	2009-12-25 21:53:45.000000000 +0000
++++ Makefile.in	2010-03-15 11:50:28.000000000 +0000
+@@ -511,7 +511,7 @@
  
  DISTCLEANFILES = dbobj.config README_authlib.html
  commonlibdep = libcourierauthcommon.la
@@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  commonlibadd = libcourierauthcommon.la
  libcourierauthcommon_t = @CRYPTLIBS@
  libcourierauthcommon_la_SOURCES = \
-@@ -468,7 +468,7 @@ libcourierauthcommon_la_SOURCES = \
+@@ -527,7 +527,7 @@
  
  libcourierauthcommon_la_DEPENDENCIES = libcourierauth.la
  libcourierauthcommon_la_LIBADD = libcourierauth.la
@@ -20,7 +20,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  libcourierauth_la_SOURCES = authdaemon.c authdaemonlib.c preauthdaemon.c \
  	authmoduser2.c authmoduser3.c debug.c \
  	courierauthdebug.h \
-@@ -477,7 +477,7 @@ libcourierauth_la_SOURCES = authdaemon.c
+@@ -536,7 +536,7 @@
  libcourierauth_la_LIBADD = libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la numlib/libnumlib.la \
  	random128/librandom128.la rfc822/libencode.la
  
@@ -29,7 +29,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  
  # The userdb module
  libauthuserdb_t = userdb/libuserdb.la @dblibrary@ @LIBGDBM@ @LIBDB@
-@@ -569,7 +569,7 @@ libcourierauthsasl_la_SOURCES = \
+@@ -629,7 +629,7 @@
  	authsaslfrombase64.c authsasltobase64.c
  
  libcourierauthsasl_la_LIBADD = libcourierauth.la
@@ -38,7 +38,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  libcourierauthsaslclient_la_SOURCES = courierauthsaslclient.h \
  	authsaslclient.c authsaslclient.h authsaslclientcram.c \
  	authsaslclientcrammd5.c authsaslclientcramsha1.c \
-@@ -578,7 +578,7 @@ libcourierauthsaslclient_la_SOURCES = co
+@@ -638,7 +638,7 @@
  	authsaslfrombase64.c authsasltobase64.c
  
  libcourierauthsaslclient_la_LIBADD = libcourierauth.la
@@ -47,7 +47,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  include_HEADERS = courier_auth_config.h courierauth.h courierauthsasl.h \
  	courierauthsaslclient.h courierauthdebug.h
  
-@@ -609,9 +609,9 @@ authdaemondprog_DEPENDENCIES = libcourie
+@@ -669,9 +669,9 @@
  
  authdaemondprog_LDADD = $(LIBLTDL) libcourierauthcommon.la liblock/liblock.la \
  	libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la \
@@ -59,7 +59,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  authdaemontest_SOURCES = authdaemontest.c
  authdaemontest_DEPENDENCIES = libcourierauthcommon.la
  authdaemontest_LDADD = libcourierauthcommon.la @NETLIBS@
-@@ -1517,14 +1517,14 @@ uninstall-man: uninstall-man1 uninstall-
+@@ -1689,14 +1689,14 @@
  authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h
  
  @HAVE_AUTHPGSQL_TRUE@install-authpgsqlrc:
@@ -79,7 +79,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  
  @HAVE_AUTHPGSQL_FALSE@install-authpgsqlrc:
  @HAVE_AUTHPGSQL_FALSE@	@:
-@@ -1533,19 +1533,19 @@ authpgsqllib.lo: authpgsqllib.c authpgsq
+@@ -1705,19 +1705,19 @@
  @HAVE_AUTHPGSQL_FALSE@	@:
  
  authpgsqlrc.h:
@@ -105,7 +105,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  
  @HAVE_LDAP_FALSE@install-authldaprc:
  @HAVE_LDAP_FALSE@	@:
-@@ -1554,19 +1554,19 @@ authldaplib.lo: authldaplib.c authldaprc
+@@ -1726,19 +1726,19 @@
  @HAVE_LDAP_FALSE@	@:
  
  authldaprc.h:
@@ -131,7 +131,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  
  @HAVE_AUTHMYSQL_FALSE@install-authmysqlrc:
  @HAVE_AUTHMYSQL_FALSE@	@:
-@@ -1575,27 +1575,27 @@ authmysqllib.lo: authmysqllib.c authmysq
+@@ -1747,27 +1747,27 @@
  @HAVE_AUTHMYSQL_FALSE@	@:
  
  authmysqlrc.h:
@@ -168,7 +168,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  	echo "#define AUTHDAEMONPID AUTHDAEMONVAR \"/pid\"" >>authdaemonrc.h
  	echo "#define AUTHDAEMONSOCK AUTHDAEMONVAR \"/socket\"" >>authdaemonrc.h
  	echo "#define AUTHDAEMONLOCK AUTHDAEMONVAR \"/lock\"" >>authdaemonrc.h
-@@ -1613,20 +1613,20 @@ authchangepwdir.h: config.status
+@@ -1785,20 +1785,20 @@
  	echo '#define AUTHCHANGEPWDIR "$(pkglibexecdir)"' >authchangepwdir.h
  
  sbindir.h: config.status
@@ -193,7 +193,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  
  dist-hook:
  	for f in $(BUILT1) ; do rm -f $(distdir)/$$f; done
-@@ -1642,10 +1642,10 @@ install-exec-hook:
+@@ -1814,10 +1814,10 @@
  	$(mkinstalldirs) $(DESTDIR)$(sbindir) || :
  	$(mkinstalldirs) $(DESTDIR)$(pkglibexecdir) || :
  	$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) authdaemondprog $(DESTDIR)$(pkglibexecdir)/authdaemond
@@ -208,7 +208,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  	test "@LIBAUTHUSERDB@" = "" && exit 0 ;\
  		$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) makedat/makedatprog \
  				$(DESTDIR)$(pkglibexecdir)/makedatprog ; \
-@@ -1659,7 +1659,6 @@ install-exec-hook:
+@@ -1831,7 +1831,6 @@
  				$(DESTDIR)$(sbindir)/userdbpw ; \
  		$(INSTALL_SCRIPT) userdb-test-cram-md5.pl \
  				$(DESTDIR)$(sbindir)/userdb-test-cram-md5
@@ -216,7 +216,7 @@ $NetBSD: patch-aa,v 1.7 2009/07/02 12:23:44 obache Exp $
  
  uninstall-hook: uninstall-authldaprc uninstall-authdaemonrc uninstall-authmysqlrc uninstall-authpgsqlrc
  	rm -f $(DESTDIR)$(pkglibexecdir)/authdaemond
-@@ -1751,13 +1750,13 @@ README_authlib.html: README_authlib.html
+@@ -1930,13 +1929,13 @@
  authdaemond.o: authdaemonrc.h authdaemond.c
  
  install-migrate: authmigrate
diff --git a/security/courier-authlib/patches/patch-ab b/security/courier-authlib/patches/patch-ab
index d7f393e..8cd3ba8 100644
--- a/security/courier-authlib/patches/patch-ab
+++ b/security/courier-authlib/patches/patch-ab
@@ -1,8 +1,8 @@
 $NetBSD: patch-ab,v 1.6 2009/07/02 12:23:44 obache Exp $
 
---- configure.orig	2009-02-03 23:39:55.000000000 +0000
-+++ configure
-@@ -23578,7 +23578,7 @@ done
+--- configure.orig	2009-12-25 21:53:45.000000000 +0000
++++ configure	2010-03-15 11:50:34.000000000 +0000
+@@ -17617,7 +17617,7 @@
  test -n "$PG_CONFIG" || PG_CONFIG="pg_config"
  
  
@@ -11,7 +11,7 @@ $NetBSD: patch-ab,v 1.6 2009/07/02 12:23:44 obache Exp $
  
  # Check whether --with-pgsql-libs was given.
  if test "${with_pgsql_libs+set}" = set; then
-@@ -25365,7 +25365,7 @@ rm -f authdaemonrc.h authldaprc.h authmy
+@@ -19439,7 +19439,7 @@
  
  result=""
  
@@ -20,7 +20,7 @@ $NetBSD: patch-ab,v 1.6 2009/07/02 12:23:44 obache Exp $
  then
  	$COURIERCONFIG >conftest.out || exit 1
  	sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1
-@@ -25377,7 +25377,7 @@ then
+@@ -19451,7 +19451,7 @@
  	result=" (from courier-config)"
  fi
  
