Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/dovecot/Makefile,v
retrieving revision 1.101
retrieving revision 1.104
diff -u -a -r1.101 -r1.104
--- Makefile	21 Jul 2008 09:33:18 -0000	1.101
+++ Makefile	4 Sep 2008 08:35:43 -0000	1.104
@@ -1,17 +1,17 @@
-# $OpenBSD: Makefile,v 1.101 2008/07/21 09:33:18 brad Exp $
+# $OpenBSD: Makefile,v 1.104 2008/09/04 08:35:43 brad Exp $
 
 SHARED_ONLY=	Yes
 
 COMMENT-server= compact IMAP/POP3 server
-COMMENT-sieve=	sieve mail filtering for Dovecot
+COMMENT-sieve=	Sieve mail filtering for Dovecot
 
-V_MAJOR=	1.0
-V_DOVECOT=	1.0.15
-V_SIEVE=	1.0.3
+V_MAJOR=	1.1
+V_DOVECOT=	1.1.3
+V_SIEVE=	1.1.5
 
 PKGNAME=	dovecot-${V_DOVECOT}
-PKGNAME-server=	dovecot-${V_DOVECOT}p1
-PKGNAME-sieve=	dovecot-sieve-${V_SIEVE}
+PKGNAME-server=	dovecot-${V_DOVECOT}
+FULLPKGNAME-sieve= dovecot-sieve-${V_SIEVE}
 
 DISTNAME=	dovecot-${V_DOVECOT}
 CATEGORIES=	mail
@@ -31,10 +31,11 @@
 PERMIT_DISTFILES_CDROM=	Yes
 PERMIT_DISTFILES_FTP=	Yes
 
-WANTLIB-server=		c crypto gssapi krb5 ssl z
-WANTLIB-sieve=
+WANTLIB-server=		c crypto gssapi krb5 rpcsvc ssl z
+WANTLIB-sieve=		c
 
 MODULES=	converters/libiconv
+LIB_DEPENDS+=	bz2::archivers/bzip2
 
 MULTI_PACKAGES=	-server
 SUBPACKAGE?=	-server
@@ -43,19 +44,17 @@
 FLAVORS=	ldap mysql postgresql sqlite
 FLAVOR?=
 
+CFLAGS+=	-I/usr/include/kerberosV -I${LOCALBASE}/include
+
 USE_LIBTOOL=		Yes
 AUTOCONF_VERSION=	2.61
 CONFIGURE_STYLE=	autoconf
 CONFIGURE_ARGS+=	--localstatedir=/var \
-			--with-ioloop=kqueue \
-			--with-ssl=openssl \
-			--with-ssldir=/etc/ssl \
 			--with-gssapi \
-			--without-pam \
-			--without-shadow \
-			--without-vpopmail
-CONFIGURE_ENV=		CFLAGS="${CFLAGS} -I/usr/include/kerberosV -I${LOCALBASE}/include" \
-			LDFLAGS="-L${LOCALBASE}/lib"
+			--with-pam=no \
+			--with-shadow=no \
+			--with-vpopmail=no
+CONFIGURE_ENV=		LDFLAGS="-L${LOCALBASE}/lib"
 
 .if !${FLAVOR:L:Mno_sieve}
 MULTI_PACKAGES+=	-sieve
@@ -95,7 +94,7 @@
 .endif
 
 pre-build:
-	@perl -pi -e s#_PREFIX_#\${PREFIX}#g ${WRKSRC}/dovecot-example.conf
+	@${SUBST_CMD} ${WRKSRC}/dovecot-example.conf
 
 .if !${FLAVOR:L:Mno_sieve}
 post-build:
@@ -112,8 +111,10 @@
 	${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh \
 		${PREFIX}/sbin/dovecot-mkcert.sh
 .if !${FLAVOR:L:Mno_sieve}
+	cd ${SIEVE_DIR}/src/libsieve && ${INSTALL_PROGRAM} {sievec,sieved} \
+		${PREFIX}/libexec/dovecot
 	${INSTALL_DATA} \
-		${SIEVE_DIR}/src/.libs/lib90_cmusieve_plugin.so \
+		${SIEVE_DIR}/src/.libs/lib90_cmusieve_plugin.{a,la,so} \
 		${PREFIX}/lib/dovecot/lda
 .endif
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/dovecot/distinfo,v
retrieving revision 1.59
retrieving revision 1.61
diff -u -a -r1.59 -r1.61
--- distinfo	22 Jun 2008 18:36:46 -0000	1.59
+++ distinfo	4 Sep 2008 08:35:43 -0000	1.61
@@ -1,10 +1,10 @@
-MD5 (dovecot-1.0.15.tar.gz) = qjnBHBjfa5W2TU8E15PXeg==
-MD5 (dovecot-sieve-1.0.3.tar.gz) = y+Q2GJn/tNnLYhUctEQntg==
-RMD160 (dovecot-1.0.15.tar.gz) = 2ILj2+1gy8us3LYCPQwSIToNNaw=
-RMD160 (dovecot-sieve-1.0.3.tar.gz) = tXWhGB+yOJpH20zdKBWkei/jC5E=
-SHA1 (dovecot-1.0.15.tar.gz) = Th9A43Rh+EhFnfnd6AkJf+9Gw3Y=
-SHA1 (dovecot-sieve-1.0.3.tar.gz) = SPZ8M8CGicUKJUvG+u7LpAfRIpQ=
-SHA256 (dovecot-1.0.15.tar.gz) = K02HINX1ho1X3ylDUO4PWo0nI+mTfase6iCER4rOlZc=
-SHA256 (dovecot-sieve-1.0.3.tar.gz) = P54jq8ZOeucDQxRLmiD42lCqEC49m4V3Td2KwNFID+E=
-SIZE (dovecot-1.0.15.tar.gz) = 1783347
-SIZE (dovecot-sieve-1.0.3.tar.gz) = 455806
+MD5 (dovecot-1.1.3.tar.gz) = ED/w/7S8s38iwnd5VT5IvA==
+MD5 (dovecot-sieve-1.1.5.tar.gz) = tDYt7+P8GIZduM+OHJQLEw==
+RMD160 (dovecot-1.1.3.tar.gz) = 73WbAcDoCj1tkjQYnJfUeOl4XBA=
+RMD160 (dovecot-sieve-1.1.5.tar.gz) = glqOwH1JUn2FUctfP4a2OP3br70=
+SHA1 (dovecot-1.1.3.tar.gz) = pGpL2z1vuG10RYweN1z3H/RQMYk=
+SHA1 (dovecot-sieve-1.1.5.tar.gz) = ZyrfCi8WJ9lvl/xj/srwJN2fekI=
+SHA256 (dovecot-1.1.3.tar.gz) = 4H1S5tYaZTZyxRc9bSf+EZlwx5JHjLvSO4f5/fwME8c=
+SHA256 (dovecot-sieve-1.1.5.tar.gz) = 7B6pQxHV+2y13X5FFyh4Svs5UhpqWA9kC00hFVBaXd8=
+SIZE (dovecot-1.1.3.tar.gz) = 2306933
+SIZE (dovecot-sieve-1.1.5.tar.gz) = 468913
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/mail/dovecot/patches/patch-Makefile_in,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -a -r1.18 -r1.19
--- patches/patch-Makefile_in	22 Jun 2008 18:36:46 -0000	1.18
+++ patches/patch-Makefile_in	20 Aug 2008 02:07:04 -0000	1.19
@@ -1,7 +1,7 @@
-$OpenBSD: patch-Makefile_in,v 1.18 2008/06/22 18:36:46 brad Exp $
---- Makefile.in.orig	Sat Jun 21 09:12:39 2008
-+++ Makefile.in	Sat Jun 21 16:19:23 2008
-@@ -648,7 +648,7 @@ install-data: install-data-recursive
+$OpenBSD: patch-Makefile_in,v 1.19 2008/08/20 02:07:04 brad Exp $
+--- Makefile.in.orig	Wed Jul 23 19:47:07 2008
++++ Makefile.in	Mon Jul 28 09:16:14 2008
+@@ -664,7 +664,7 @@ install-data: install-data-recursive
  uninstall: uninstall-recursive
  
  install-am: all-am
Index: patches/patch-configure_in
===================================================================
RCS file: /cvs/ports/mail/dovecot/patches/patch-configure_in,v
retrieving revision 1.11
retrieving revision 1.13
diff -u -a -r1.11 -r1.13
--- patches/patch-configure_in	28 Apr 2008 09:51:10 -0000	1.11
+++ patches/patch-configure_in	4 Sep 2008 08:35:43 -0000	1.13
@@ -1,31 +1,43 @@
-$OpenBSD: patch-configure_in,v 1.11 2008/04/28 09:51:10 bernd Exp $
---- configure.in.orig	Sun Mar  9 11:45:25 2008
-+++ configure.in	Fri Apr 25 12:32:06 2008
-@@ -12,6 +12,7 @@ AC_PROG_CPP
+$OpenBSD: patch-configure_in,v 1.13 2008/09/04 08:35:43 brad Exp $
+--- configure.in.orig	Sat Aug 30 09:19:44 2008
++++ configure.in	Tue Sep  2 03:13:05 2008
+@@ -13,6 +13,7 @@ AC_PROG_CXX # lucene plugin needs this
  AC_HEADER_STDC
  AC_C_INLINE
  AC_PROG_LIBTOOL
 +LIBS="${LIBS} -liconv"
  AM_ICONV
  
- AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h \
-@@ -1471,33 +1472,14 @@ fi
+ AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \
+@@ -1744,74 +1745,15 @@ fi
  
  have_gssapi=no
- if test $want_gssapi = yes; then
+ if test $want_gssapi != no; then
 -	AC_CHECK_PROG(KRB5CONFIG, krb5-config, YES, NO)
 -	if test $KRB5CONFIG = YES; then
--		# we have a kludgy check here to check that we have
--		# version >= v1.3. Although this doesn't work right with
--		# non-MIT kerberos versioning..
--		if `krb5-config --version|grep -v '1\.2' > /dev/null`; then
--			AUTH_LIBS="$AUTH_LIBS `krb5-config --libs gssapi`"
--			AUTH_CFLAGS="$AUTH_CFLAGS `krb5-config --cflags gssapi`"
+-		if ! krb5-config --version gssapi 2>/dev/null > /dev/null; then
+-		  # krb5-config doesn't support gssapi.
+-		  KRB5_LIBS="`krb5-config --libs`"
+-		  KRB5_CFLAGS=`krb5-config --cflags`
+-		  AC_CHECK_LIB(gss, gss_acquire_cred, [
+-		    # Solaris
+-		    KRB5_LIBS="$KRB5_LIBS -lgss"
+-		  ], [
+-		    # failed
+-		    KRB5_LIBS=
+-		  ], $KRB5_LIBS)
+-		else
+-		  KRB5_LIBS=`krb5-config --libs gssapi`
+-		  KRB5_CFLAGS=`krb5-config --cflags gssapi`
+-		fi
+-		if test "$KRB5_LIBS" != ""; then
+-			AC_SUBST(KRB5_LIBS)
+-			AC_SUBST(KRB5_CFLAGS)
 -			
 -			# Although krb5-config exists, all systems still don't
 -			# have gssapi.h
 -			old_CFLAGS=$CFLAGS
--			CFLAGS="$CFLAGS `krb5-config --cflags gssapi`"
+-			CFLAGS="$CFLAGS $KRB5_CFLAGS"
 -			AC_CHECK_HEADER([gssapi/gssapi.h], [
 -				AC_DEFINE(HAVE_GSSAPI_GSSAPI_H,, GSSAPI headers in gssapi/gssapi.h)
 -				have_gssapi=yes
@@ -36,18 +48,48 @@
 -			])
 -			if test $have_gssapi = yes; then
 -				AC_DEFINE(HAVE_GSSAPI,, Build with GSSAPI support)
+-				AC_CHECK_HEADERS(gssapi/gssapi_ext.h gssapi_krb5.h gssapi/gssapi_krb5.h)
+-				AC_CHECK_LIB(gss, __gss_userok, [
+-					AC_DEFINE(HAVE___GSS_USEROK,,
+-						Define if you have __gss_userok())
+-					KRB5_LIBS="$KRB5_LIBS -lgss"
+-				],, $KRB5_LIBS)
+-
+-				# MIT has a #define for Heimdal acceptor_identity, but it's way too
+-				# difficult to test for it..
+-				old_LIBS=$LIBS
+-				LIBS="$LIBS $KRB5_LIBS"
+-				AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity krb5_gss_register_acceptor_identity)
+-				LIBS=$old_LIBS
+-
+-				if test x$want_gssapi_plugin != xyes; then
+-				  AUTH_LIBS="$AUTH_LIBS $KRB5_LIBS"
+-				  AUTH_CFLAGS="$AUTH_CFLAGS $KRB5_CFLAGS"
+-				  AC_DEFINE(BUILTIN_GSSAPI,, GSSAPI support is built in)
+-				else
+-				  have_gssapi_plugin=yes
+-				fi
+-			else
+-			  if test $want_gssapi = yes; then
+-			    AC_ERROR([Can't build with GSSAPI support: gssapi.h not found])
+-			  fi
 -			fi
 -			CFLAGS=$old_CFLAGS
 -		fi
+-	else
+-	  if test $want_gssapi = yes; then
+-	    AC_ERROR([Can't build with GSSAPI support: krb5-config not found])
+-	  fi
 -	fi
-+	# no krb5-config on OpenBSD, suck in the necessary libs and includes
++	# no krb5-config on OpenBSD, bring in the necessary libs and includes
 +	# manually
 +	AC_CHECK_HEADER([kerberosV/gssapi.h], [
 +		AC_DEFINE(HAVE_GSSAPI,, Build with GSSAPI support)
 +		AC_DEFINE(HAVE_GSSAPI_H,, Build with GSSAPI support)
++		AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY,, Have the gsskrb5_register_acceptor_identity function)
 +		have_gssapi=yes
 +	])
 +	AUTH_LIBS="$LIBS -lkrb5 -lgssapi -lcrypto"
  fi
+ AM_CONDITIONAL(GSSAPI_PLUGIN, test "$have_gssapi_plugin" = "yes")
  
- if test $want_sia = yes; then
Index: patches/patch-dovecot-example_conf
===================================================================
RCS file: /cvs/ports/mail/dovecot/patches/patch-dovecot-example_conf,v
retrieving revision 1.41
retrieving revision 1.43
diff -u -a -r1.41 -r1.43
--- patches/patch-dovecot-example_conf	3 Jun 2008 00:16:51 -0000	1.41
+++ patches/patch-dovecot-example_conf	23 Aug 2008 20:13:39 -0000	1.43
@@ -1,6 +1,6 @@
-$OpenBSD: patch-dovecot-example_conf,v 1.41 2008/06/03 00:16:51 sthen Exp $
---- dovecot-example.conf.orig	Tue May 27 07:48:26 2008
-+++ dovecot-example.conf	Mon Jun  2 16:52:45 2008
+$OpenBSD: patch-dovecot-example_conf,v 1.43 2008/08/23 20:13:39 brad Exp $
+--- dovecot-example.conf.orig	Fri Jul 11 19:14:14 2008
++++ dovecot-example.conf	Sat Aug 23 16:09:00 2008
 @@ -10,13 +10,12 @@
  # value inside quotes, eg.: key = "# char and trailing whitespace  "
  
@@ -19,7 +19,14 @@
  
  # Protocols we want to be serving: imap imaps pop3 pop3s
  # If you only want to use dovecot-auth, you can set this to "none".
-@@ -45,7 +44,7 @@
+@@ -38,13 +37,13 @@
+ #     listen = *:10100
+ #     ..
+ #   }
+-#listen = *
++listen = *, [::]
+ 
+ # Disable LOGIN command and all other plaintext authentications unless
  # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
  # matches the local IP (ie. you're connecting from the same computer), the
  # connection is considered secure and plaintext authentication is allowed.
@@ -28,7 +35,7 @@
  
  # Should all IMAP and POP3 processes be killed when Dovecot master process
  # shuts down. Setting this to "no" means that Dovecot can be upgraded without
-@@ -91,7 +90,7 @@
+@@ -90,7 +89,7 @@
  # dropping root privileges, so keep the key file unreadable by anyone but
  # root. Included doc/mkcert.sh can be used to easily generate self-signed
  # certificate, just make sure to update the domains in dovecot-openssl.cnf
@@ -37,7 +44,7 @@
  #ssl_key_file = /etc/ssl/private/dovecot.pem
  
  # If key file is password protected, give the password here. Alternatively
-@@ -128,7 +127,7 @@
+@@ -132,7 +131,7 @@
  # which login needs to be able to connect to. The sockets are created when
  # running as root, so you don't have to worry about permissions. Note that
  # everything in this directory is deleted when Dovecot is started.
@@ -46,7 +53,7 @@
  
  # chroot login process to the login_dir. Only reason not to do this is if you
  # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
-@@ -138,7 +137,7 @@
+@@ -142,7 +141,7 @@
  # and don't use it anywhere else. The user must also belong to a group where
  # only it has access, it's used to control access for authentication process.
  # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
@@ -55,16 +62,19 @@
  
  # Set max. process size in megabytes. If you don't use
  # login_process_per_connection you might need to grow this.
-@@ -293,7 +292,7 @@
+@@ -305,8 +304,9 @@
+ #mail_log_max_lines_per_sec = 10
  
- # Don't write() to mmaped files. This is required for some operating systems
- # which use separate caches for them, such as OpenBSD.
--#mmap_no_write = no
-+mmap_no_write = yes
- 
- # Rely on O_EXCL to work when creating dotlock files. The default is to use
- # hard linking. O_EXCL makes the dotlocking faster, but it doesn't always
-@@ -451,7 +450,7 @@
+ # Don't use mmap() at all. This is required if you store indexes to shared
+-# filesystems (NFS or clustered filesystem).
+-#mmap_disable = no
++# filesystems (NFS or clustered filesystem) or for some operating systems
++# which use a separate cache for mmap, such as OpenBSD.
++mmap_disable = yes
+ 
+ # Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL
+ # since version 3, so this should be safe to use nowadays by default.
+@@ -447,7 +447,7 @@
  # locking methods as well. Some operating systems don't allow using some of
  # them simultaneously.
  #mbox_read_locks = fcntl
@@ -73,81 +83,72 @@
  
  # Maximum time in seconds to wait for lock (all of them) before aborting.
  #mbox_lock_timeout = 300
-@@ -506,19 +505,19 @@
+@@ -502,19 +502,19 @@
  
  protocol imap {
    # Login executable location.
 -  #login_executable = /usr/libexec/dovecot/imap-login
-+  #login_executable = _PREFIX_/libexec/dovecot/imap-login
++  #login_executable = ${PREFIX}/libexec/dovecot/imap-login
  
    # IMAP executable location. Changing this allows you to execute other
    # binaries before the imap process is executed.
    #
    # This would write rawlogs into ~/dovecot.rawlog/ directory:
 -  #   mail_executable = /usr/libexec/dovecot/rawlog /usr/libexec/dovecot/imap
-+  #   mail_executable = _PREFIX_/libexec/dovecot/rawlog _PREFIX_/libexec/dovecot/imap
++  #   mail_executable = ${PREFIX}/libexec/dovecot/rawlog ${PREFIX}/libexec/dovecot/imap
    #
    # This would attach gdb into the imap process and write backtraces into
    # /tmp/gdbhelper.* files:
 -  #   mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap
-+  #   mail_executable = _PREFIX_/libexec/dovecot/gdbhelper _PREFIX_/libexec/dovecot/imap
++  #   mail_executable = ${PREFIX}/libexec/dovecot/gdbhelper ${PREFIX}/libexec/dovecot/imap
    #
 -  #mail_executable = /usr/libexec/dovecot/imap
-+  #mail_executable = _PREFIX_/libexec/dovecot/imap
++  #mail_executable = ${PREFIX}/libexec/dovecot/imap
  
    # Maximum IMAP command line length in bytes. Some clients generate very long
    # command lines with huge mailboxes, so you may need to raise this if you get
-@@ -528,7 +527,7 @@ protocol imap {
+@@ -528,7 +528,7 @@ protocol imap {
    # Support for dynamically loadable plugins. mail_plugins is a space separated
    # list of plugins to load.
    #mail_plugins = 
 -  #mail_plugin_dir = /usr/lib/dovecot/imap
-+  #mail_plugin_dir = _PREFIX_/lib/dovecot/imap
++  #mail_plugin_dir = ${PREFIX}/lib/dovecot/imap
  
    # Send IMAP capabilities in greeting message. This makes it unnecessary for
    # clients to request it with CAPABILITY command, so it saves one round-trip.
-@@ -562,7 +561,7 @@ protocol imap {
+@@ -562,7 +562,7 @@ protocol imap {
    #     but not both. Thunderbird separates these two by forcing server to
    #     accept '/' suffix in mailbox names in subscriptions list.
    # The list is space-separated.
--  #imap_client_workarounds = outlook-idle
-+  imap_client_workarounds = delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
+-  #imap_client_workarounds = 
++  imap_client_workarounds = delay-newmail netscape-eoh tb-extra-mailbox-sep
  }
    
  ##
-@@ -571,11 +570,11 @@ protocol imap {
+@@ -571,11 +571,11 @@ protocol imap {
  
  protocol pop3 {
    # Login executable location.
 -  #login_executable = /usr/libexec/dovecot/pop3-login
-+  #login_executable = _PREFIX_/libexec/dovecot/pop3-login
++  #login_executable = ${PREFIX}/libexec/dovecot/pop3-login
  
    # POP3 executable location. See IMAP's mail_executable above for examples
    # how this could be changed.
 -  #mail_executable = /usr/libexec/dovecot/pop3
-+  #mail_executable = _PREFIX_/libexec/dovecot/pop3
++  #mail_executable = ${PREFIX}/libexec/dovecot/pop3
  
    # Don't try to set mails non-recent or seen with POP3 sessions. This is
    # mostly intended to reduce disk I/O. With maildir it doesn't move files
-@@ -620,7 +619,7 @@ protocol pop3 {
-   # installations. %08Xu%08Xv will be the new default, so use it for new
-   # installations.
-   #
--  #pop3_uidl_format = 
-+  pop3_uidl_format = %08Xu%08Xv
- 
-   # POP3 logout format string:
-   #  %t - number of TOP commands
-@@ -635,7 +634,7 @@ protocol pop3 {
+@@ -635,7 +635,7 @@ protocol pop3 {
    # Support for dynamically loadable plugins. mail_plugins is a space separated
    # list of plugins to load.
    #mail_plugins = 
 -  #mail_plugin_dir = /usr/lib/dovecot/pop3
-+  #mail_plugin_dir = _PREFIX_/lib/dovecot/pop3
++  #mail_plugin_dir = ${PREFIX}/lib/dovecot/pop3
  
    # Workarounds for various client bugs:
    #   outlook-no-nuls:
-@@ -645,7 +644,7 @@ protocol pop3 {
+@@ -645,7 +645,7 @@ protocol pop3 {
    #     Outlook Express and Netscape Mail breaks if end of headers-line is
    #     missing. This option simply sends it if it's missing.
    # The list is space-separated.
@@ -156,39 +157,44 @@
  }
  
  ##
-@@ -663,10 +662,10 @@ protocol lda {
+@@ -663,7 +663,7 @@ protocol lda {
    # Support for dynamically loadable plugins. mail_plugins is a space separated
    # list of plugins to load.
    #mail_plugins = 
 -  #mail_plugin_dir = /usr/lib/dovecot/lda
-+  #mail_plugin_dir = _PREFIX_/lib/dovecot/lda
++  #mail_plugin_dir = ${PREFIX}/lib/dovecot/lda
+ 
+   # If user is over quota, return with temporary failure instead of
+   # bouncing the mail.
+@@ -677,7 +677,7 @@ protocol lda {
+   #deliver_log_format = msgid=%m: %$
  
    # Binary to use for sending mails.
 -  #sendmail_path = /usr/lib/sendmail
 +  #sendmail_path = /usr/sbin/sendmail
  
-   # UNIX socket path to master authentication server to find users.
-   #auth_socket_path = /var/run/dovecot/auth-master
-@@ -677,7 +676,7 @@ protocol lda {
+   # Human readable error message for rejection mails. Use can use variables:
+   #  %n = CRLF, %r = reason, %s = subject, %t = recipient
+@@ -692,7 +692,7 @@ protocol lda {
  ##
  
  # Executable location
 -#auth_executable = /usr/libexec/dovecot/dovecot-auth
-+#auth_executable = _PREFIX_/libexec/dovecot/dovecot-auth
++#auth_executable = ${PREFIX}/libexec/dovecot/dovecot-auth
  
  # Set max. process size in megabytes.
  #auth_process_size = 256
-@@ -793,7 +792,7 @@ auth default {
+@@ -825,7 +825,7 @@ auth default {
    # database (passwd usually), you can use static userdb.
    # REMEMBER: You'll need /etc/pam.d/dovecot file created for PAM
    # authentication to actually work. <doc/wiki/PasswordDatabase.PAM.txt>
 -  passdb pam {
 +  #passdb pam {
-     # [blocking=yes] [session=yes] [setcred=yes]
+     # [session=yes] [setcred=yes] [failure_show_msg=yes]
      # [cache_key=<key>] [<service name>]
      #
-@@ -826,7 +825,7 @@ auth default {
-     #   args = session=yes *
+@@ -854,7 +854,7 @@ auth default {
+     #   args = session=yes %Ls
      #   args = cache_key=%u dovecot
      #args = dovecot
 -  }
@@ -196,7 +202,7 @@
  
    # System users (NSS, /etc/passwd, or similiar)
    # In many systems nowadays this uses Name Service Switch, which is
-@@ -846,10 +845,10 @@ auth default {
+@@ -874,10 +874,10 @@ auth default {
  
    # PAM-like authentication for OpenBSD.
    # <doc/wiki/PasswordDatabase.BSDAuth.txt>
Index: patches/patch-src_lib-mail_rfc822-parser_c
===================================================================
RCS file: patches/patch-src_lib-mail_rfc822-parser_c
diff -N patches/patch-src_lib-mail_rfc822-parser_c
--- patches/patch-src_lib-mail_rfc822-parser_c	21 Jul 2008 09:33:18 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_lib-mail_rfc822-parser_c,v 1.1 2008/07/21 09:33:18 brad Exp $
---- src/lib-mail/rfc822-parser.c.orig	Mon Jul 21 01:54:49 2008
-+++ src/lib-mail/rfc822-parser.c	Mon Jul 21 01:55:24 2008
-@@ -261,6 +261,8 @@ int rfc822_parse_phrase(struct rfc822_parser_context *
- 	   obs-phrase = word *(word / "." / CFWS)
- 	*/
- 
-+	if (ctx->data == ctx->end)
-+		return 0;
- 	if (*ctx->data == '.')
- 		return -1;
- 
Index: patches/patch-src_lib-storage_index_maildir_maildir-storage_c
===================================================================
RCS file: patches/patch-src_lib-storage_index_maildir_maildir-storage_c
diff -N patches/patch-src_lib-storage_index_maildir_maildir-storage_c
--- patches/patch-src_lib-storage_index_maildir_maildir-storage_c	21 Jul 2008 09:37:36 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-src_lib-storage_index_maildir_maildir-storage_c,v 1.5 2008/07/21 09:37:36 brad Exp $
---- src/lib-storage/index/maildir/maildir-storage.c.orig	Mon Jul 21 01:57:58 2008
-+++ src/lib-storage/index/maildir/maildir-storage.c	Mon Jul 21 01:58:53 2008
-@@ -663,6 +663,10 @@ static int maildir_create_shared(struct index_storage 
- 		umask(old_mask);
- 		return -1;
- 	}
-+	if (chown(dir, (uid_t)-1, gid) < 0) {
-+		mail_storage_set_critical(storage,
-+					  "chown(%s) failed: %m", dir);
-+	}
- 	for (i = 0; i < N_MAILDIR_SUBDIRS; i++) {
- 		path = t_strconcat(dir, "/", maildir_subdirs[i], NULL);
- 		if (chown(path, (uid_t)-1, gid) < 0) {
Index: patches/patch-src_lib-storage_index_maildir_maildir-sync_c
===================================================================
RCS file: patches/patch-src_lib-storage_index_maildir_maildir-sync_c
diff -N patches/patch-src_lib-storage_index_maildir_maildir-sync_c
--- patches/patch-src_lib-storage_index_maildir_maildir-sync_c	2 Jul 2008 23:00:10 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_lib-storage_index_maildir_maildir-sync_c,v 1.1 2008/07/02 23:00:10 brad Exp $
---- src/lib-storage/index/maildir/maildir-sync.c.orig	Wed Jul  2 13:59:08 2008
-+++ src/lib-storage/index/maildir/maildir-sync.c	Wed Jul  2 13:59:45 2008
-@@ -257,7 +257,7 @@ int maildir_filename_get_flags(struct maildir_keywords
- 	array_clear(keywords_r);
- 	*flags_r = 0;
- 
--	info = strchr(fname, MAILDIR_INFO_SEP);
-+	info = strrchr(fname, MAILDIR_INFO_SEP);
- 	if (info == NULL || info[1] != '2' || info[2] != MAILDIR_FLAGS_SEP)
- 		return 0;
- 
Index: patches/patch-src_lib_failures_c
===================================================================
RCS file: patches/patch-src_lib_failures_c
diff -N patches/patch-src_lib_failures_c
--- patches/patch-src_lib_failures_c	21 Jul 2008 09:37:36 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$OpenBSD: patch-src_lib_failures_c,v 1.1 2008/07/21 09:37:36 brad Exp $
---- src/lib/failures.c.orig	Tue Dec 11 13:52:08 2007
-+++ src/lib/failures.c	Mon Jul 21 02:03:52 2008
-@@ -376,9 +376,15 @@ void i_set_failure_file(const char *path, const char *
- 
- static int internal_handler(char log_type, const char *format, va_list args)
- {
-+	static int recursed = 0;
- 	string_t *str;
- 	int ret;
- 
-+	if (recursed != 0)
-+		return -1;
-+
-+	recursed++;
-+
- 	t_push();
- 	str = t_str_new(512);
- 	str_append_c(str, 1);
-@@ -388,6 +394,7 @@ static int internal_handler(char log_type, const char 
- 	ret = write_full(2, str_data(str), str_len(str));
- 	t_pop();
- 
-+	recursed--;
- 	return ret;
- }
- 
Index: pkg/DESCR-server
===================================================================
RCS file: /cvs/ports/mail/dovecot/pkg/DESCR-server,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -a -r1.2 -r1.3
--- pkg/DESCR-server	22 Mar 2007 06:59:13 -0000	1.2
+++ pkg/DESCR-server	4 Sep 2008 08:35:43 -0000	1.3
@@ -6,7 +6,6 @@
 accessing the mailboxes directly.
 
 Flavors:
-
          ldap - Build with LDAP support as an authentication source
         mysql - Build with MySQL support as an authentication source
    postgresql - Build with PostgreSQL support as an authentication source
Index: pkg/PLIST-server
===================================================================
RCS file: /cvs/ports/mail/dovecot/pkg/PLIST-server,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -a -r1.10 -r1.11
--- pkg/PLIST-server	22 Jun 2008 18:36:46 -0000	1.10
+++ pkg/PLIST-server	20 Aug 2008 02:07:04 -0000	1.11
@@ -1,8 +1,9 @@
-@comment $OpenBSD: PLIST-server,v 1.10 2008/06/22 18:36:46 brad Exp $
+@comment $OpenBSD: PLIST-server,v 1.11 2008/08/20 02:07:04 brad Exp $
 @pkgpath ${BASE_PKGPATH}
 @newgroup _dovecot:518
 @newuser _dovecot:518:_dovecot:daemon:Dovecot Account:/nonexistent:/sbin/nologin
 lib/dovecot/
+lib/dovecot/auth/
 lib/dovecot/imap/
 lib/dovecot/imap/lib01_acl_plugin.so
 lib/dovecot/imap/lib02_lazy_expunge_plugin.so
@@ -12,16 +13,21 @@
 lib/dovecot/imap/lib11_imap_quota_plugin.so
 lib/dovecot/imap/lib11_trash_plugin.so
 lib/dovecot/imap/lib20_convert_plugin.so
+lib/dovecot/imap/lib20_expire_plugin.so
+lib/dovecot/imap/lib20_fts_plugin.so
 lib/dovecot/imap/lib20_mail_log_plugin.so
-@comment lib/dovecot/imap/lib20_zlib_plugin.a
-@comment lib/dovecot/imap/lib20_zlib_plugin.la
+lib/dovecot/imap/lib20_mbox_snarf_plugin.so
 lib/dovecot/imap/lib20_zlib_plugin.so
+lib/dovecot/imap/lib21_fts_squat_plugin.so
 lib/dovecot/lda/
 lib/dovecot/lda/lib01_acl_plugin.so
 lib/dovecot/lda/lib10_quota_plugin.so
 lib/dovecot/lda/lib11_trash_plugin.so
 lib/dovecot/lda/lib20_convert_plugin.so
+lib/dovecot/lda/lib20_expire_plugin.so
+lib/dovecot/lda/lib20_fts_plugin.so
 lib/dovecot/lda/lib20_mail_log_plugin.so
+lib/dovecot/lda/lib21_fts_squat_plugin.so
 @comment lib/dovecot/lib01_acl_plugin.a
 @comment lib/dovecot/lib01_acl_plugin.la
 lib/dovecot/lib01_acl_plugin.so
@@ -37,24 +43,48 @@
 @comment lib/dovecot/lib20_convert_plugin.a
 @comment lib/dovecot/lib20_convert_plugin.la
 lib/dovecot/lib20_convert_plugin.so
+@comment lib/dovecot/lib20_expire_plugin.a
+@comment lib/dovecot/lib20_expire_plugin.la
+lib/dovecot/lib20_expire_plugin.so
+@comment lib/dovecot/lib20_fts_plugin.a
+@comment lib/dovecot/lib20_fts_plugin.la
+lib/dovecot/lib20_fts_plugin.so
 @comment lib/dovecot/lib20_mail_log_plugin.a
 @comment lib/dovecot/lib20_mail_log_plugin.la
 lib/dovecot/lib20_mail_log_plugin.so
+@comment lib/dovecot/lib20_mbox_snarf_plugin.a
+@comment lib/dovecot/lib20_mbox_snarf_plugin.la
+lib/dovecot/lib20_mbox_snarf_plugin.so
+@comment lib/dovecot/lib20_zlib_plugin.a
+@comment lib/dovecot/lib20_zlib_plugin.la
+lib/dovecot/lib20_zlib_plugin.so
+@comment lib/dovecot/lib21_fts_squat_plugin.a
+@comment lib/dovecot/lib21_fts_squat_plugin.la
+lib/dovecot/lib21_fts_squat_plugin.so
 lib/dovecot/pop3/
 lib/dovecot/pop3/lib02_lazy_expunge_plugin.so
 lib/dovecot/pop3/lib10_quota_plugin.so
 lib/dovecot/pop3/lib20_convert_plugin.so
+lib/dovecot/pop3/lib20_expire_plugin.so
+lib/dovecot/pop3/lib20_fts_plugin.so
 lib/dovecot/pop3/lib20_mail_log_plugin.so
+lib/dovecot/pop3/lib20_mbox_snarf_plugin.so
+lib/dovecot/pop3/lib20_zlib_plugin.so
+lib/dovecot/pop3/lib21_fts_squat_plugin.so
 libexec/dovecot/
 @bin libexec/dovecot/checkpassword-reply
+@bin libexec/dovecot/convert-tool
 @bin libexec/dovecot/deliver
 @bin libexec/dovecot/dict
 @bin libexec/dovecot/dovecot-auth
+@bin libexec/dovecot/expire-tool
 @bin libexec/dovecot/gdbhelper
 @bin libexec/dovecot/idxview
 @bin libexec/dovecot/imap
 @bin libexec/dovecot/imap-login
+@bin libexec/dovecot/listview
 @bin libexec/dovecot/logview
+@bin libexec/dovecot/maildirlock
 @bin libexec/dovecot/pop3
 @bin libexec/dovecot/pop3-login
 @bin libexec/dovecot/rawlog
@@ -79,6 +109,7 @@
 share/doc/dovecot/wiki/Authentication.Kerberos.txt
 share/doc/dovecot/wiki/Authentication.MasterUsers.txt
 share/doc/dovecot/wiki/Authentication.Mechanisms.DigestMD5.txt
+share/doc/dovecot/wiki/Authentication.Mechanisms.NTLM.txt
 share/doc/dovecot/wiki/Authentication.Mechanisms.Winbind.txt
 share/doc/dovecot/wiki/Authentication.Mechanisms.txt
 share/doc/dovecot/wiki/Authentication.MultipleDatabases.txt
@@ -93,6 +124,7 @@
 share/doc/dovecot/wiki/CompilingSource.txt
 share/doc/dovecot/wiki/Debugging.Authentication.txt
 share/doc/dovecot/wiki/Debugging.ProcessTracing.txt
+share/doc/dovecot/wiki/Debugging.Rawlog.txt
 share/doc/dovecot/wiki/Debugging.Thunderbird.txt
 share/doc/dovecot/wiki/Design.AuthProcess.txt
 share/doc/dovecot/wiki/Design.Indexes.Cache.txt
@@ -106,7 +138,10 @@
 share/doc/dovecot/wiki/FindMailLocation.txt
 share/doc/dovecot/wiki/FinishBasicConfiguration.txt
 share/doc/dovecot/wiki/HowTo.EximAndDovecotSASL.txt
+share/doc/dovecot/wiki/HowTo.PopBSMTPAndDovecot.txt
+share/doc/dovecot/wiki/HowTo.PopRelay.txt
 share/doc/dovecot/wiki/HowTo.PostfixAndDovecotSASL.txt
+share/doc/dovecot/wiki/HowTo.Rootless.txt
 share/doc/dovecot/wiki/HowTo.SimpleVirtualInstall.txt
 share/doc/dovecot/wiki/HowTo.txt
 share/doc/dovecot/wiki/IndexFiles.txt
@@ -136,12 +171,15 @@
 share/doc/dovecot/wiki/MailboxFormat.mbox.txt
 share/doc/dovecot/wiki/MailboxFormat.mbx.txt
 share/doc/dovecot/wiki/MailboxFormat.txt
+share/doc/dovecot/wiki/ManageSieve.txt
 share/doc/dovecot/wiki/MboxLocking.txt
 share/doc/dovecot/wiki/MboxProblems.txt
+share/doc/dovecot/wiki/Migration.BincIMAP.txt
 share/doc/dovecot/wiki/Migration.Courier.txt
 share/doc/dovecot/wiki/Migration.Cyrus.txt
 share/doc/dovecot/wiki/Migration.Linuxconf.txt
 share/doc/dovecot/wiki/Migration.MailFormat.txt
+share/doc/dovecot/wiki/Migration.Teapop.txt
 share/doc/dovecot/wiki/Migration.UW.txt
 share/doc/dovecot/wiki/Migration.Vm-pop3d.txt
 share/doc/dovecot/wiki/Migration.txt
@@ -170,17 +208,14 @@
 share/doc/dovecot/wiki/Plugins.MailLog.txt
 share/doc/dovecot/wiki/Plugins.Trash.txt
 share/doc/dovecot/wiki/Plugins.txt
-share/doc/dovecot/wiki/PopBSMTPAndDovecot.txt
-share/doc/dovecot/wiki/PopRelay.txt
 share/doc/dovecot/wiki/PostLoginScripting.txt
 share/doc/dovecot/wiki/QuickConfiguration.txt
+share/doc/dovecot/wiki/Quota.1.1.txt
 share/doc/dovecot/wiki/Quota.Dict.txt
 share/doc/dovecot/wiki/Quota.Dirsize.txt
 share/doc/dovecot/wiki/Quota.FS.txt
 share/doc/dovecot/wiki/Quota.Maildir.txt
-share/doc/dovecot/wiki/Quota.New.txt
 share/doc/dovecot/wiki/Quota.txt
-share/doc/dovecot/wiki/Rootless.txt
 share/doc/dovecot/wiki/RunningDovecot.txt
 share/doc/dovecot/wiki/SSL.CertificateClientImporting.txt
 share/doc/dovecot/wiki/SSL.CertificateCreation.txt
@@ -189,6 +224,7 @@
 share/doc/dovecot/wiki/Sasl.txt
 share/doc/dovecot/wiki/SecurityTuning.txt
 share/doc/dovecot/wiki/SharedMailboxes.txt
+share/doc/dovecot/wiki/ShellEasyConf.txt
 share/doc/dovecot/wiki/SystemUsers.txt
 share/doc/dovecot/wiki/TestInstallation.txt
 share/doc/dovecot/wiki/TestPop3Installation.txt
Index: pkg/PLIST-sieve
===================================================================
RCS file: /cvs/ports/mail/dovecot/pkg/PLIST-sieve,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -a -r1.2 -r1.3
--- pkg/PLIST-sieve	15 Jan 2007 08:12:40 -0000	1.2
+++ pkg/PLIST-sieve	20 Aug 2008 02:07:04 -0000	1.3
@@ -1,2 +1,6 @@
-@comment $OpenBSD: PLIST-sieve,v 1.2 2007/01/15 08:12:40 jakob Exp $
+@comment $OpenBSD: PLIST-sieve,v 1.3 2008/08/20 02:07:04 brad Exp $
+@comment lib/dovecot/lda/lib90_cmusieve_plugin.a
+@comment lib/dovecot/lda/lib90_cmusieve_plugin.la
 lib/dovecot/lda/lib90_cmusieve_plugin.so
+@bin libexec/dovecot/sievec
+@bin libexec/dovecot/sieved
