Update to latest version of courier-authlib and courier-imap.
A lot of bugs (security related too) has been fixed.
I would like to have some comments and some reports for this by anyone.
 Cheers & Thanks
  Giovanni
Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/courier-authlib/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile    15 May 2008 14:16:41 -0000      1.9
+++ Makefile    15 Jun 2009 13:43:29 -0000
@@ -6,12 +6,12 @@ COMMENT-mysql=                mysql authentication mod
 COMMENT-pgsql=         pgsql authentication module for courier-authLib
 COMMENT-userdb=                userdb authentication module for courier-authLib
 
-DISTNAME=              courier-authlib-0.58
-PKGNAME-main=          ${DISTNAME}p3
-PKGNAME-ldap=          ${DISTNAME:S/lib-/lib-ldap-/}p4
-PKGNAME-mysql=         ${DISTNAME:S/lib-/lib-mysql-/}p2
-PKGNAME-pgsql=         ${DISTNAME:S/lib-/lib-pgsql-/}p2
-PKGNAME-userdb=                ${DISTNAME:S/lib-/lib-userdb-/}p3
+DISTNAME=              courier-authlib-0.62.2
+PKGNAME-main=          ${DISTNAME}
+PKGNAME-ldap=          ${DISTNAME:S/lib-/lib-ldap-/}
+PKGNAME-mysql=         ${DISTNAME:S/lib-/lib-mysql-/}
+PKGNAME-pgsql=         ${DISTNAME:S/lib-/lib-pgsql-/}
+PKGNAME-userdb=                ${DISTNAME:S/lib-/lib-userdb-/}
 
 SHARED_LIBS +=  courierauth          0.0      # .0.0
 SHARED_LIBS +=  courierauthsasl      0.0      # .0.0
@@ -76,6 +76,7 @@ FLAVOR?=
 PSEUDO_FLAVORS=                no_ldap no_mysql no_pgsql no_userdb
 
 WANTLIB-main=          c
+
 LIB_DEPENDS-main=      ltdl::devel/libtool,-ltdl
 
 WANTLIB-ldap=          crypto ssl asn1 com_err gssapi krb5
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/courier-authlib/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo    5 Apr 2007 16:20:01 -0000       1.2
+++ distinfo    15 Jun 2009 13:43:29 -0000
@@ -1,5 +1,5 @@
-MD5 (courier-authlib-0.58.tar.bz2) = +2kVWNYRyxka5qgwAvAZWw==
-RMD160 (courier-authlib-0.58.tar.bz2) = ZHRhJJbNKH8pTH9SI56oU8ROSqE=
-SHA1 (courier-authlib-0.58.tar.bz2) = i9qzwuc0zI9HIwkk7GOLo2CakqE=
-SHA256 (courier-authlib-0.58.tar.bz2) = 
2HfMbGXpBHHslBDFznr0Z7pb6zkiuc+/K/aqJPa9x60=
-SIZE (courier-authlib-0.58.tar.bz2) = 2006735
+MD5 (courier-authlib-0.62.2.tar.bz2) = i2l0Wxyxka5fdDuHWK0v+Q==
+RMD160 (courier-authlib-0.62.2.tar.bz2) = wPTzKZQFb4A08wBVz+VSONE3oso=
+SHA1 (courier-authlib-0.62.2.tar.bz2) = 3Ela1sVMJxSD1IYuCXiGIdhmKak=
+SHA256 (courier-authlib-0.62.2.tar.bz2) = 
jOdW31fH9MCSGf6ccLT35gAqLg+/nec/MEwisxY4fFA=
+SIZE (courier-authlib-0.62.2.tar.bz2) = 2233216
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_in   15 Jun 2009 13:43:29 -0000
@@ -0,0 +1,64 @@
+$OpenBSD$
+--- Makefile.in.orig   Wed Feb  4 00:39:56 2009
++++ Makefile.in        Fri Jun 12 19:52:14 2009
+@@ -453,7 +453,7 @@ CLEANFILES = authldaprc.h authmysqlrc.h authdaemonrc.h
+ 
+ DISTCLEANFILES = dbobj.config README_authlib.html
+ commonlibdep = libcourierauthcommon.la
+-commonldflags = -module -rpath $(pkglibdir) -export-symbols-regex 
'courier_auth.*_init' -avoid-version
++commonldflags = -module -rpath $(pkglibdir) -export-symbols-regex 
'courier_auth.*_init'
+ commonlibadd = libcourierauthcommon.la
+ libcourierauthcommon_t = @CRYPTLIBS@
+ libcourierauthcommon_la_SOURCES = \
+@@ -468,7 +468,7 @@ libcourierauthcommon_la_SOURCES = \
+ 
+ libcourierauthcommon_la_DEPENDENCIES = libcourierauth.la
+ libcourierauthcommon_la_LIBADD = libcourierauth.la
+-libcourierauthcommon_la_LDFLAGS = $(libcourierauthcommon_t:%=-Wl,%) 
-avoid-version
++libcourierauthcommon_la_LDFLAGS = $(libcourierauthcommon_t:%=-Wl,%)
+ 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 authdaemonlib
+ libcourierauth_la_LIBADD = libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la 
numlib/libnumlib.la \
+       random128/librandom128.la rfc822/libencode.la
+ 
+-libcourierauth_la_LDFLAGS = @NETLIBS@ -avoid-version
++libcourierauth_la_LDFLAGS = @NETLIBS@
+ 
+ # The userdb module
+ libauthuserdb_t = userdb/libuserdb.la @dblibrary@ @LIBGDBM@ @LIBDB@
+@@ -569,7 +569,7 @@ libcourierauthsasl_la_SOURCES = \
+       authsaslfrombase64.c authsasltobase64.c
+ 
+ libcourierauthsasl_la_LIBADD = libcourierauth.la
+-libcourierauthsasl_la_LDFLAGS = -export-symbols-regex 
'^auth_sasl|auth_sasl_ex$$' -avoid-version
++libcourierauthsasl_la_LDFLAGS = -export-symbols-regex 
'^auth_sasl|auth_sasl_ex$$'
+ libcourierauthsaslclient_la_SOURCES = courierauthsaslclient.h \
+       authsaslclient.c authsaslclient.h authsaslclientcram.c \
+       authsaslclientcrammd5.c authsaslclientcramsha1.c \
+@@ -578,7 +578,7 @@ libcourierauthsaslclient_la_SOURCES = courierauthsaslc
+       authsaslfrombase64.c authsasltobase64.c
+ 
+ libcourierauthsaslclient_la_LIBADD = libcourierauth.la
+-libcourierauthsaslclient_la_LDFLAGS = -export-symbols-regex 
'^auth_sasl_client$$' -avoid-version
++libcourierauthsaslclient_la_LDFLAGS = -export-symbols-regex 
'^auth_sasl_client$$'
+ include_HEADERS = courier_auth_config.h courierauth.h courierauthsasl.h \
+       courierauthsaslclient.h courierauthdebug.h
+ 
+@@ -1659,7 +1659,6 @@ install-exec-hook:
+                               $(DESTDIR)$(sbindir)/userdbpw ; \
+               $(INSTALL_SCRIPT) userdb-test-cram-md5.pl \
+                               $(DESTDIR)$(sbindir)/userdb-test-cram-md5
+-      for f in $(pkglib_LTLIBRARIES); do . ./$$f; rm -f 
$(DESTDIR)$(pkglibdir)/$$dlname.0 $(DESTDIR)$(pkglibdir)/$$dlname.0.0; ln -s 
$$dlname $(DESTDIR)$(pkglibdir)/$$dlname.0; done
+ 
+ uninstall-hook: uninstall-authldaprc uninstall-authdaemonrc 
uninstall-authmysqlrc uninstall-authpgsqlrc
+       rm -f $(DESTDIR)$(pkglibexecdir)/authdaemond
+@@ -1670,7 +1669,6 @@ uninstall-hook: uninstall-authldaprc uninstall-authdae
+                               $(DESTDIR)$(sbindir)/userdb \
+                               $(DESTDIR)$(sbindir)/userdbpw \
+                               $(DESTDIR)$(sbindir)/userdb-test-cram-md5
+-      for f in $(pkglib_LTLIBRARIES); do . ./$$f; rm -f 
$(DESTDIR)$(pkglibdir)/$$dlname.0; done
+ 
+ authlib.html: authlib.html.in
+       CONFIG_FILES=authlib.html CONFIG_HEADERS= $(SHELL) ./config.status
Index: patches/patch-authldap_h
===================================================================
RCS file: /cvs/ports/mail/courier-authlib/patches/patch-authldap_h,v
retrieving revision 1.2
diff -u -p -r1.2 patch-authldap_h
--- patches/patch-authldap_h    25 Jun 2007 12:12:26 -0000      1.2
+++ patches/patch-authldap_h    15 Jun 2009 13:43:29 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-authldap_h,v 1.2 2007/06/25 12:12:26 espie Exp $
 --- authldap.h.orig    Thu Oct 21 02:10:49 2004
-+++ authldap.h Mon Jun 25 12:56:17 2007
++++ authldap.h Mon May 18 18:21:47 2009
 @@ -1,6 +1,8 @@
  #ifndef       authldap_h
  #define       authldap_h
@@ -8,5 +8,5 @@ $OpenBSD: patch-authldap_h,v 1.2 2007/06
 +#define LDAP_DEPRECATED 1
 +
  /*
- ** $Id: patch-authldap_h,v 1.2 2007/06/25 12:12:26 espie Exp $
+ ** $Id: authldap.h,v 1.6 2004/10/21 00:10:49 mrsam Exp $
  **
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/mail/courier-authlib/patches/patch-configure,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-configure
--- patches/patch-configure     3 Nov 2006 11:45:31 -0000       1.1.1.1
+++ patches/patch-configure     15 Jun 2009 13:43:29 -0000
@@ -1,24 +1,20 @@
 $OpenBSD: patch-configure,v 1.1.1.1 2006/11/03 11:45:31 mbalmer Exp $
---- configure.orig     Fri Jan  6 20:38:09 2006
-+++ configure  Fri Jan  6 20:39:31 2006
-@@ -25688,8 +25688,8 @@ if test -x "$COURIERCONFIG"
- then
+--- configure.orig     Wed Feb  4 00:39:55 2009
++++ configure  Mon May 18 18:24:00 2009
+@@ -25370,7 +25370,7 @@ then
        $COURIERCONFIG >conftest.out || exit 1
        sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1
--      . conftest2.out
+       . ./conftest2.out
 -      rm -f conftest.out conftest2.out
-+      . ./conftest2.out
 +      rm -f ./conftest.out ./conftest2.out
  
        cmailuser="$mailuser"
        cmailgroup="$mailgroup"
-@@ -25700,8 +25700,8 @@ if test -x "$bindir/courierauthconfig"
- then
+@@ -25382,7 +25382,7 @@ then
        $bindir/courierauthconfig --configfiles >conftest.out || exit 1
        sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1
--      . conftest2.out
+       . ./conftest2.out
 -      rm -f conftest.out conftest2.out
-+      . ./conftest2.out
 +      rm -f ./conftest.out ./conftest2.out
  
        cmailuser="$mailuser"
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/mail/courier-authlib/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main      23 Dec 2006 10:30:20 -0000      1.2
+++ pkg/PLIST-main      15 Jun 2009 13:43:29 -0000
@@ -4,7 +4,7 @@
 @newgroup _courier:571
 @newuser _courier:571:571:daemon:Courier Mail Server:/var/empty:/sbin/nologin
 %%SHARED%%
-bin/courierauthconfig
+...@bin bin/courierauthconfig
 include/courier_auth_config.h
 include/courierauth.h
 include/courierauthdebug.h
@@ -24,7 +24,7 @@ include/courierauthsaslclient.h
 @comment lib/libcourierauthsaslclient.a
 @comment lib/libcourierauthsaslclient.la
 libexec/courier-authlib/
-libexec/courier-authlib/authdaemond
+...@bin libexec/courier-authlib/authdaemond
 libexec/courier-authlib/authmigrate
 libexec/courier-authlib/authsystem.passwd
 libexec/courier-authlib/sysconftool
@@ -38,12 +38,13 @@ libexec/courier-authlib/sysconftool
 @man man/man3/auth_login.3
 @man man/man3/auth_passwd.3
 @man man/man3/auth_sasl.3
+...@man man/man3/auth_sasl_ex.3
 @man man/man3/authlib.3
 sbin/authdaemond
-sbin/authenumerate
-sbin/authpasswd
-sbin/authtest
-sbin/courierlogger
+...@bin sbin/authenumerate
+...@bin sbin/authpasswd
+...@bin sbin/authtest
+...@bin sbin/courierlogger
 share/doc/courier-authlib/
 share/doc/courier-authlib/COPYING
 share/doc/courier-authlib/COPYING.GPL
Index: pkg/PLIST-userdb
===================================================================
RCS file: /cvs/ports/mail/courier-authlib/pkg/PLIST-userdb,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST-userdb
--- pkg/PLIST-userdb    3 Nov 2006 11:45:31 -0000       1.1.1.1
+++ pkg/PLIST-userdb    15 Jun 2009 13:43:29 -0000
@@ -2,7 +2,7 @@
 %%SHARED%%
 @comment lib/libauthuserdb.a
 @comment lib/libauthuserdb.la
-libexec/courier-authlib/makedatprog
+...@bin libexec/courier-authlib/makedatprog
 @comment @man man/man8/makeuserdb.8
 @comment @man man/man8/userdb.8
 @comment @man man/man8/userdbpw.8
@@ -10,5 +10,4 @@ sbin/makeuserdb
 sbin/pw2userdb
 sbin/userdb
 sbin/userdb-test-cram-md5
-sbin/userdbpw
-sbin/vchkpw2userdb
+...@bin sbin/userdbpw
Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/courier-imap/Makefile,v
retrieving revision 1.54
diff -u -p -r1.54 Makefile
--- Makefile    18 Jul 2007 11:49:14 -0000      1.54
+++ Makefile    15 Jun 2009 13:44:13 -0000
@@ -3,10 +3,9 @@
 COMMENT-main=          imap server for maildir format mailboxes
 COMMENT-pop3=          pop3 server for maildir format mailboxes
 
-V=                     4.1.1
+V=                     4.5.0
 DISTNAME=              courier-imap-${V}
-PKGNAME-main=          ${DISTNAME}p2
-FULLPKGNAME-pop3=      courier-pop3-${V}p0
+FULLPKGNAME-pop3=      courier-pop3-${V}
 
 CATEGORIES=            mail
 
@@ -97,9 +96,9 @@ CNFFILES=             etc/courier/imapd-ssl.dist et
 
 post-extract:
        @perl -pi -e 's,\...@datadir\@\/imapd.rand,\/dev\/arandom,g' \
-           ${WRKSRC}/imap/imapd.cnf.in
+           ${WRKSRC}/imap/imapd.cnf.openssl.in
        @perl -pi -e 's,\...@datadir\@\/imapd.rand,\/dev\/arandom,g' \
-           ${WRKSRC}/imap/pop3d.cnf.in
+           ${WRKSRC}/imap/pop3d.cnf.openssl.in
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/courier
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/courier-imap/distinfo,v
retrieving revision 1.10
diff -u -p -r1.10 distinfo
--- distinfo    5 Apr 2007 16:20:01 -0000       1.10
+++ distinfo    15 Jun 2009 13:44:13 -0000
@@ -1,5 +1,5 @@
-MD5 (courier-imap-4.1.1.tar.bz2) = 9COmCdnM4Nzxk8rGTrTL3Q==
-RMD160 (courier-imap-4.1.1.tar.bz2) = 5/TA18uwzPBhwx3hsLI4fsnYcIQ=
-SHA1 (courier-imap-4.1.1.tar.bz2) = UF81qKfW9VudYk5UR4W8dYcAE1w=
-SHA256 (courier-imap-4.1.1.tar.bz2) = 
lunuruZNss8vSqllg5Lnt5d77p9DSvHoWQa9cl18ggE=
-SIZE (courier-imap-4.1.1.tar.bz2) = 3211569
+MD5 (courier-imap-4.5.0.tar.bz2) = 2jVyUyW6yuog97wWqHFyKw==
+RMD160 (courier-imap-4.5.0.tar.bz2) = 61PllSHWyHmebChUYli3fe1nviw=
+SHA1 (courier-imap-4.5.0.tar.bz2) = 6YKK5/aIC1RtTUMWlSompdpkDBI=
+SHA256 (courier-imap-4.5.0.tar.bz2) = 
PX3ium1ff6LnrEv+sFMFXhJyNMNEKgnzaqXdcbn0T/o=
+SIZE (courier-imap-4.5.0.tar.bz2) = 3565751
Index: patches/patch-imap_imapd-ssl_dist_in
===================================================================
RCS file: /cvs/ports/mail/courier-imap/patches/patch-imap_imapd-ssl_dist_in,v
retrieving revision 1.5
diff -u -p -r1.5 patch-imap_imapd-ssl_dist_in
--- patches/patch-imap_imapd-ssl_dist_in        3 Nov 2006 16:19:56 -0000       
1.5
+++ patches/patch-imap_imapd-ssl_dist_in        15 Jun 2009 13:44:13 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-imap_imapd-ssl_dist_in,v 1.5 2006/11/03 16:19:56 mbalmer Exp $
---- imap/imapd-ssl.dist.in.orig        Mon Aug  1 00:38:00 2005
-+++ imap/imapd-ssl.dist.in     Mon Aug  1 00:39:51 2005
+--- imap/imapd-ssl.dist.in.orig        Sat Jul 12 22:17:24 2008
++++ imap/imapd-ssl.dist.in     Mon Jun 15 15:26:36 2009
 @@ -72,13 +72,13 @@ SSLLOGGEROPTS="-name=imapd-ssl"
  #
  #  Whether or not to start IMAP over SSL on simap port:
@@ -17,16 +17,16 @@ $OpenBSD: patch-imap_imapd-ssl_dist_in,v
  
  ##NAME: IMAP_TLS_REQUIRED:1
  #
-@@ -153,7 +153,7 @@ TLS_STARTTLS_PROTOCOL=TLS1
- # servers, and is optional for SSL/TLS clients.  TLS_CERTFILE is usually
- # treated as confidential, and must not be world-readable.
+@@ -260,7 +260,7 @@ TLS_CERTS=X509
  #
--tls_certfi...@datadir@/imapd.pem
+ # This is an experimental feature.
+ 
+-tls_certfi...@mydatadir@/imapd.pem
 +TLS_CERTFILE=/etc/ssl/private/imapd.pem
  
  ##NAME: TLS_TRUSTCERTS:0
  #
-@@ -194,8 +194,8 @@ TLS_VERIFYPEER=NONE
+@@ -322,8 +322,8 @@ TLS_VERIFYPEER=NONE
  # problems with SSL clients.  Disable SSL caching by commenting out the
  # following settings:
  
Index: patches/patch-imap_imaplogin_c
===================================================================
RCS file: /cvs/ports/mail/courier-imap/patches/patch-imap_imaplogin_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-imap_imaplogin_c
--- patches/patch-imap_imaplogin_c      3 Nov 2006 16:19:56 -0000       1.1
+++ patches/patch-imap_imaplogin_c      15 Jun 2009 13:44:13 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-imap_imaplogin_c,v 1.1 2006/11/03 16:19:56 mbalmer Exp $
---- imap/imaplogin.c.orig      Sat Aug  6 15:39:08 2005
-+++ imap/imaplogin.c   Sat Aug  6 15:39:52 2005
-@@ -247,7 +247,7 @@ int login_callback(struct authinfo *ainf
+--- imap/imaplogin.c.orig      Sun Jun 29 22:18:36 2008
++++ imap/imaplogin.c   Mon Jun 15 15:25:07 2009
+@@ -235,7 +235,7 @@ int login_callback(struct authinfo *ainfo, void *dummy
                                        execl(imapd, imapd,
                                              ainfo->maildir ?
                                              ainfo->maildir:defaultmaildir,
Index: patches/patch-imap_mkimapdcert_in
===================================================================
RCS file: /cvs/ports/mail/courier-imap/patches/patch-imap_mkimapdcert_in,v
retrieving revision 1.6
diff -u -p -r1.6 patch-imap_mkimapdcert_in
--- patches/patch-imap_mkimapdcert_in   3 Nov 2006 16:19:56 -0000       1.6
+++ patches/patch-imap_mkimapdcert_in   15 Jun 2009 13:44:13 -0000
@@ -1,46 +1,66 @@
 $OpenBSD: patch-imap_mkimapdcert_in,v 1.6 2006/11/03 16:19:56 mbalmer Exp $
---- imap/mkimapdcert.in.orig   Mon Aug  1 00:35:38 2005
-+++ imap/mkimapdcert.in        Mon Aug  1 00:37:31 2005
-@@ -12,28 +12,29 @@
- test -x @OPENSSL@ || exit 0
+--- imap/mkimapdcert.in.orig   Sun Nov  4 21:49:58 2007
++++ imap/mkimapdcert.in        Mon Jun 15 15:30:20 2009
+@@ -17,42 +17,43 @@ else
+ fi
  
  prefix="@prefix@"
 +SSLDIR="/etc/ssl/private"
  
--if test -f @datadir@/imapd.pem
+-if test -f @mydatadir@/imapd.pem
 +if test -f ${SSLDIR}/imapd.pem
  then
--      echo "@datadir@/imapd.pem already exists."
+-      echo "@mydatadir@/imapd.pem already exists."
 +      echo "${SSLDIR}/imapd.pem already exists."
        exit 1
  fi
  
  umask 077
--cp /dev/null @datadir@/imapd.pem
--chmod 600 @datadir@/imapd.pem
--chown @mailuser@ @datadir@/imapd.pem
-+cp /dev/null ${SSLDIR}/imapd.pem
-+chmod 600 ${SSLDIR}/imapd.pem
-+chown @mailuser@ ${SSLDIR}/imapd.pem
  
  cleanup() {
--      rm -f @datadir@/imapd.pem
--      rm -f @datadir@/imapd.rand
+-      rm -f @mydatadir@/imapd.pem
+-      rm -f @mydatadir@/imapd.rand
+-      rm -f @mydatadir@/imapd.key
+-      rm -f @mydatadir@/imapd.cert
 +      rm -f ${SSLDIR}/imapd.pem
 +      rm -f ${SSLDIR}/imapd.rand
++      rm -f ${SSLDIR}/imapd.key
++      rm -f ${SSLDIR}/imapd.cert
        exit 1
  }
  
--cd @datadir@
--dd i...@randomv@ o...@datadir@/imapd.rand count=1 2>/dev/null
+-cd @mydatadir@
 +cd ${SSLDIR}
-+dd i...@randomv@ of=${SSLDIR}/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
-...@openssl@ gendh -rand @datadir@/imapd.rand 512 >>@datadir@/imapd.pem || 
cleanup
-...@openssl@ x509 -subject -dates -fingerprint -noout -in @datadir@/imapd.pem 
|| cleanup
--rm -f @datadir@/imapd.rand
-+      -config @sysconfdir@/imapd.cnf -out ${SSLDIR}/imapd.pem -keyout 
${SSLDIR}/imapd.pem || cleanup
-...@openssl@ gendh -rand ${SSLDIR}/imapd.rand 512 >>${SSLDIR}/imapd.pem || 
cleanup
-...@openssl@ x509 -subject -dates -fingerprint -noout -in ${SSLDIR}/imapd.pem 
|| cleanup
-+rm -f ${SSLDIR}/imapd.rand
+ 
+ if test "@ssllib@" = "openssl"
+ then
+-      cp /dev/null @mydatadir@/imapd.pem
+-      chmod 600 @mydatadir@/imapd.pem
+-      chown @mailuser@ @mydatadir@/imapd.pem
++      cp /dev/null ${SSLDIR}/imapd.pem
++      chmod 600 ${SSLDIR}/imapd.pem
++      chown @mailuser@ ${SSLDIR}/imapd.pem
+ 
+-      dd i...@randomv@ o...@mydatadir@/imapd.rand count=1 2>/dev/null
++      dd i...@randomv@ of=${SSLDIR}/imapd.rand count=1 2>/dev/null
+       @OPENSSL@ req -new -x509 -days 365 -nodes \
+-                -config @sysconfdir@/imapd.cnf -out @mydatadir@/imapd.pem 
-keyout @mydatadir@/imapd.pem || cleanup
+-      @OPENSSL@ gendh -rand @mydatadir@/imapd.rand 512 
>>@mydatadir@/imapd.pem || cleanup
+-      @OPENSSL@ x509 -subject -dates -fingerprint -noout -in 
@mydatadir@/imapd.pem || cleanup
+-      rm -f @mydatadir@/imapd.rand
++                -config @sysconfdir@/imapd.cnf -out ${SSLDIR}/imapd.pem 
-keyout ${SSLDIR}/imapd.pem || cleanup
++      @OPENSSL@ gendh -rand ${SSLDIR}/imapd.rand 512 >>${SSLDIR}/imapd.pem || 
cleanup
++      @OPENSSL@ x509 -subject -dates -fingerprint -noout -in 
${SSLDIR}/imapd.pem || cleanup
++      rm -f ${SSLDIR}/imapd.rand
+ else
+-      cp /dev/null @mydatadir@/imapd.key
+-      chmod 600 @mydatadir@/imapd.key
+-      cp /dev/null @mydatadir@/imapd.cert
+-      chmod 600 @mydatadir@/imapd.cert
++      cp /dev/null ${SSLDIR}/imapd.key
++      chmod 600 ${SSLDIR}/imapd.key
++      cp /dev/null ${SSLDIR}/imapd.cert
++      chmod 600 ${SSLDIR}/imapd.cert
+ 
+       @CERTTOOL@ --generate-privkey --outfile imapd.key
+       @CERTTOOL@ --generate-self-signed --load-privkey imapd.key --outfile 
imapd.cert --template @sysconfdir@/imapd.cnf
Index: patches/patch-imap_mkpop3dcert_in
===================================================================
RCS file: /cvs/ports/mail/courier-imap/patches/patch-imap_mkpop3dcert_in,v
retrieving revision 1.3
diff -u -p -r1.3 patch-imap_mkpop3dcert_in
--- patches/patch-imap_mkpop3dcert_in   3 Nov 2006 16:19:56 -0000       1.3
+++ patches/patch-imap_mkpop3dcert_in   15 Jun 2009 13:44:13 -0000
@@ -1,44 +1,66 @@
 $OpenBSD: patch-imap_mkpop3dcert_in,v 1.3 2006/11/03 16:19:56 mbalmer Exp $
---- imap/mkpop3dcert.in.orig   Mon Aug  1 00:30:56 2005
-+++ imap/mkpop3dcert.in        Mon Aug  1 00:35:05 2005
-@@ -12,27 +12,28 @@
- test -x @OPENSSL@ || exit 0
+--- imap/mkpop3dcert.in.orig   Sun Nov  4 21:49:58 2007
++++ imap/mkpop3dcert.in        Mon Jun 15 15:31:09 2009
+@@ -17,42 +17,43 @@ else
+ fi
  
  prefix="@prefix@"
-+SSLDIR=/etc/ssl/private
++SSLDIR="/etc/ssl/private"
  
--if test -f @datadir@/pop3d.pem
+-if test -f @mydatadir@/pop3d.pem
 +if test -f ${SSLDIR}/pop3d.pem
  then
--      echo "@datadir@/pop3d.pem already exists."
+-      echo "@mydatadir@/pop3d.pem already exists."
 +      echo "${SSLDIR}/pop3d.pem already exists."
        exit 1
  fi
  
  umask 077
--cp /dev/null @datadir@/pop3d.pem
--chmod 600 @datadir@/pop3d.pem
--chown @mailuser@ @datadir@/pop3d.pem
-+cp /dev/null ${SSLDIR}/pop3d.pem
-+chmod 600 ${SSLDIR}/pop3d.pem
-+chown @mailuser@ ${SSLDIR}/pop3d.pem
  
  cleanup() {
--      rm -f @datadir@/pop3d.pem
--      rm -f @datadir@/pop3d.rand
+-      rm -f @mydatadir@/pop3d.pem
+-      rm -f @mydatadir@/pop3d.rand
+-      rm -f @mydatadir@/pop3d.key
+-      rm -f @mydatadir@/pop3d.cert
 +      rm -f ${SSLDIR}/pop3d.pem
 +      rm -f ${SSLDIR}/pop3d.rand
++      rm -f ${SSLDIR}/pop3d.key
++      rm -f ${SSLDIR}/pop3d.cert
        exit 1
  }
  
--dd i...@randomv@ o...@datadir@/pop3d.rand count=1 2>/dev/null
-+dd i...@randomv@ of=${SSLDIR}/pop3d.rand count=1 2>/dev/null
- @OPENSSL@ req -new -x509 -days 365 -nodes \
--      -config @sysconfdir@/pop3d.cnf -out @datadir@/pop3d.pem -keyout 
@datadir@/pop3d.pem || cleanup
-...@openssl@ gendh -rand @datadir@/pop3d.rand 512 >>@datadir@/pop3d.pem || 
cleanup
-...@openssl@ x509 -subject -dates -fingerprint -noout -in @datadir@/pop3d.pem 
|| cleanup
--rm -f @datadir@/pop3d.rand
-+      -config @sysconfdir@/pop3d.cnf -out ${SSLDIR}/pop3d.pem -keyout 
${SSLDIR}/pop3d.pem || cleanup
-...@openssl@ gendh -rand ${SSLDIR}/pop3d.rand 512 >>${SSLDIR}/pop3d.pem || 
cleanup
-...@openssl@ x509 -subject -dates -fingerprint -noout -in ${SSLDIR}/pop3d.pem 
|| cleanup
-+rm -f ${SSLDIR}/pop3d.rand
+-cd @mydatadir@
++cd ${SSLDIR}
+ 
+ if test "@ssllib@" = "openssl"
+ then
+-      cp /dev/null @mydatadir@/pop3d.pem
+-      chmod 600 @mydatadir@/pop3d.pem
+-      chown @mailuser@ @mydatadir@/pop3d.pem
++      cp /dev/null ${SSLDIR}/pop3d.pem
++      chmod 600 ${SSLDIR}/pop3d.pem
++      chown @mailuser@ ${SSLDIR}/pop3d.pem
+ 
+-      dd i...@randomv@ o...@mydatadir@/pop3d.rand count=1 2>/dev/null
++      dd i...@randomv@ of=${SSLDIR}/pop3d.rand count=1 2>/dev/null
+       @OPENSSL@ req -new -x509 -days 365 -nodes \
+-                -config @sysconfdir@/pop3d.cnf -out @mydatadir@/pop3d.pem 
-keyout @mydatadir@/pop3d.pem || cleanup
+-      @OPENSSL@ gendh -rand @mydatadir@/pop3d.rand 512 
>>@mydatadir@/pop3d.pem || cleanup
+-      @OPENSSL@ x509 -subject -dates -fingerprint -noout -in 
@mydatadir@/pop3d.pem || cleanup
+-      rm -f @mydatadir@/pop3d.rand
++                -config @sysconfdir@/pop3d.cnf -out ${SSLDIR}/pop3d.pem 
-keyout ${SSLDIR}/pop3d.pem || cleanup
++      @OPENSSL@ gendh -rand ${SSLDIR}/pop3d.rand 512 >>${SSLDIR}/pop3d.pem || 
cleanup
++      @OPENSSL@ x509 -subject -dates -fingerprint -noout -in 
${SSLDIR}/pop3d.pem || cleanup
++      rm -f ${SSLDIR}/pop3d.rand
+ else
+-      cp /dev/null @mydatadir@/pop3d.key
+-      chmod 600 @mydatadir@/pop3d.key
+-      cp /dev/null @mydatadir@/pop3d.cert
+-      chmod 600 @mydatadir@/pop3d.cert
++      cp /dev/null ${SSLDIR}/pop3d.key
++      chmod 600 ${SSLDIR}/pop3d.key
++      cp /dev/null ${SSLDIR}/pop3d.cert
++      chmod 600 ${SSLDIR}/pop3d.cert
+ 
+       @CERTTOOL@ --generate-privkey --outfile pop3d.key
+       @CERTTOOL@ --generate-self-signed --load-privkey pop3d.key --outfile 
pop3d.cert --template @sysconfdir@/pop3d.cnf
Index: patches/patch-imap_pop3d-ssl_dist_in
===================================================================
RCS file: /cvs/ports/mail/courier-imap/patches/patch-imap_pop3d-ssl_dist_in,v
retrieving revision 1.5
diff -u -p -r1.5 patch-imap_pop3d-ssl_dist_in
--- patches/patch-imap_pop3d-ssl_dist_in        3 Nov 2006 16:19:56 -0000       
1.5
+++ patches/patch-imap_pop3d-ssl_dist_in        15 Jun 2009 13:44:13 -0000
@@ -1,16 +1,16 @@
 $OpenBSD: patch-imap_pop3d-ssl_dist_in,v 1.5 2006/11/03 16:19:56 mbalmer Exp $
---- imap/pop3d-ssl.dist.in.orig        Mon Aug  1 00:27:59 2005
-+++ imap/pop3d-ssl.dist.in     Mon Aug  1 00:30:03 2005
-@@ -140,7 +140,7 @@ TLS_STARTTLS_PROTOCOL=TLS1
- # servers, and is optional for SSL/TLS clients.  TLS_CERTFILE is usually
- # treated as confidential, and must not be world-readable.
+--- imap/pop3d-ssl.dist.in.orig        Sat Jul 12 22:17:25 2008
++++ imap/pop3d-ssl.dist.in     Mon Jun 15 15:31:54 2009
+@@ -248,7 +248,7 @@ TLS_CERTS=X509
  #
--tls_certfi...@datadir@/pop3d.pem
+ # This is an experimental feature.
+ 
+-tls_certfi...@mydatadir@/pop3d.pem
 +TLS_CERTFILE=/etc/ssl/private/pop3d.pem
  
  ##NAME: TLS_TRUSTCERTS:0
  #
-@@ -180,8 +180,8 @@ TLS_VERIFYPEER=NONE
+@@ -308,8 +308,8 @@ TLS_VERIFYPEER=NONE
  # problems with SSL clients.  Disable SSL caching by commenting out the
  # following settings:
  
Index: patches/patch-imap_pop3login_c
===================================================================
RCS file: /cvs/ports/mail/courier-imap/patches/patch-imap_pop3login_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-imap_pop3login_c
--- patches/patch-imap_pop3login_c      3 Nov 2006 16:19:56 -0000       1.1
+++ patches/patch-imap_pop3login_c      15 Jun 2009 13:44:13 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-imap_pop3login_c,v 1.1 2006/11/03 16:19:56 mbalmer Exp $
---- imap/pop3login.c.orig      Sat Aug  6 15:40:34 2005
-+++ imap/pop3login.c   Sat Aug  6 15:40:50 2005
-@@ -229,7 +229,7 @@ static int login_callback(struct authinf
+--- imap/pop3login.c.orig      Sun Jun 29 22:18:36 2008
++++ imap/pop3login.c   Mon Jun 15 15:25:07 2009
+@@ -213,7 +213,7 @@ static int login_callback(struct authinfo *ainfo, void
                                execl(pop3d, pop3d,
                                      ainfo->maildir ?
                                      ainfo->maildir:defaultmaildir,
Index: patches/patch-tcpd_libcouriertls_c
===================================================================
RCS file: /cvs/ports/mail/courier-imap/patches/patch-tcpd_libcouriertls_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-tcpd_libcouriertls_c
--- patches/patch-tcpd_libcouriertls_c  3 Nov 2006 16:19:56 -0000       1.1
+++ patches/patch-tcpd_libcouriertls_c  15 Jun 2009 13:44:13 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-tcpd_libcouriertls_c,v 1.1 2006/11/03 16:19:56 mbalmer Exp $
---- tcpd/libcouriertls.c.orig  Fri Dec 30 18:46:37 2005
-+++ tcpd/libcouriertls.c       Fri Dec 30 18:45:27 2005
-@@ -671,7 +671,7 @@ static int get_func(void *rec, size_t re
+--- tcpd/libcouriertls.c.orig  Sun Jul 13 16:27:33 2008
++++ tcpd/libcouriertls.c       Mon Jun 15 15:25:07 2009
+@@ -814,7 +814,7 @@ static int get_func(void *rec, size_t recsize,
        time_t timeout;
        size_t session_id_len;
  
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/mail/courier-imap/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main      22 Jun 2007 07:34:45 -0000      1.2
+++ pkg/PLIST-main      15 Jun 2009 13:44:13 -0000
@@ -1,19 +1,19 @@
 @comment $OpenBSD: PLIST-main,v 1.2 2007/06/22 07:34:45 mbalmer Exp $
-...@pkgpath ${BASE_PKGPATH}
 @conflict imap-uw-*
 @conflict courier-utils-*
+...@pkgpath ${BASE_PKGPATH}
 @newgroup _courier:571
 @newuser _courier:571:571:daemon:Courier Mail Server:/var/empty:/sbin/nologin
-bin/couriertls
-bin/deliverquota
-bin/imapd
-bin/maildiracl
-bin/maildirkw
-bin/maildirmake
-libexec/couriertcpd
+...@bin bin/couriertls
+...@bin bin/deliverquota
+...@bin bin/imapd
+...@bin bin/maildiracl
+...@bin bin/maildirkw
+...@bin bin/maildirmake
+...@bin libexec/couriertcpd
 libexec/imapd-ssl.rc
 libexec/imapd.rc
-libexec/makedatprog
+...@bin libexec/makedatprog
 @man man/man1/couriertcpd.1
 @man man/man1/maildiracl.1
 @man man/man1/maildirkw.1
@@ -21,7 +21,7 @@ libexec/makedatprog
 @man man/man8/deliverquota.8
 @man man/man8/imapd.8
 @man man/man8/mkimapdcert.8
-sbin/imaplogin
+...@bin sbin/imaplogin
 sbin/mkimapdcert
 sbin/sharedindexinstall
 sbin/sharedindexsplit
Index: pkg/PLIST-pop3
===================================================================
RCS file: /cvs/ports/mail/courier-imap/pkg/PLIST-pop3,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST-pop3
--- pkg/PLIST-pop3      3 Nov 2006 16:20:58 -0000       1.5
+++ pkg/PLIST-pop3      15 Jun 2009 13:44:13 -0000
@@ -1,12 +1,12 @@
 @comment $OpenBSD: PLIST-pop3,v 1.5 2006/11/03 16:20:58 mbalmer Exp $
 @newgroup _courier:571
 @newuser _courier:571:571:daemon:Courier Mail Server:/var/empty:/sbin/nologin
-bin/pop3d
+...@bin bin/pop3d
 libexec/pop3d-ssl.rc
 libexec/pop3d.rc
 @man man/man8/mkpop3dcert.8
 sbin/mkpop3dcert
-sbin/pop3login
+...@bin sbin/pop3login
 @mode 600
 share/examples/courier/pop3d-ssl.dist
 @sample ${SYSCONFDIR}/pop3d-ssl

Reply via email to