diff -ruN dovecot.orig/Makefile dovecot/Makefile --- dovecot.orig/Makefile 2021-01-06 15:58:35.000000000 +0100 +++ dovecot/Makefile 2021-01-30 11:58:26.905674000 +0100 @@ -21,6 +21,7 @@ LIB_DEPENDS= libzstd.so:archivers/zstd USES= cpe iconv libtool pkgconfig ssl +USES+= autoreconf gettext-tools USE_RC_SUBR= dovecot GNU_CONFIGURE= yes @@ -36,7 +37,7 @@ USERS= dovecot dovenull GROUPS= ${USERS} -OPTIONS_DEFINE= LIBSODIUM LIBWRAP LUA LZ4 DOCS EXAMPLES +OPTIONS_DEFINE= LIBSODIUM LIBWRAP LUA LZ4 VPOPMAIL DOCS EXAMPLES OPTIONS_DEFAULT=GSSAPI_NONE LIBWRAP OPTIONS_SUB= yes @@ -48,6 +49,7 @@ OPTIONS_SINGLE_GSSAPI= GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT LZ4_DESC= LZ4 compression support +VPOPMAIL_DESC= vpopmail support (deprecated) DB_DESC= Database support CDB_DESC= CDB database support @@ -76,6 +78,10 @@ LZ4_CONFIGURE_WITH= lz4 LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 +VPOPMAIL_BUILD_DEPENDS= vpopmail>=0:mail/vpopmail +VPOPMAIL_CONFIGURE_WITH=vpopmail +VPOPMAIL_EXTRA_PATCHES= ${FILESDIR}/vpopmail.patch + # Databases CDB_CONFIGURE_WITH= cdb CDB_LIB_DEPENDS= libcdb.so:databases/tinycdb @@ -135,16 +141,14 @@ s,sysconfdir=/etc,sysconfdir=${PREFIX}/etc,g' \ ${WRKSRC}/doc/example-config/*.conf ${WRKSRC}/doc/example-config/conf.d/* \ ${WRKSRC}/doc/example-config/*.conf.ext - @${REINPLACE_CMD} -e '/^LIBS =/s/$$/ @LTLIBICONV@/' \ - ${WRKSRC}/src/lib-mail/Makefile.in # Install the sample config files into ETCDIR/example-config/ @${REINPLACE_CMD} -e '/^exampledir =/s|\$$(docdir)|${ETCDIR}|' \ - ${WRKSRC}/doc/example-config/Makefile.in \ - ${WRKSRC}/doc/example-config/conf.d/Makefile.in + ${WRKSRC}/doc/example-config/Makefile.am \ + ${WRKSRC}/doc/example-config/conf.d/Makefile.am post-patch-LUA-on: @${REINPLACE_CMD} -e '/^libdovecot_lua_la_DEPENDENCIES =/ s|LUA_LIBS|true|' \ - ${WRKSRC}/src/lib-lua/Makefile.in + ${WRKSRC}/src/lib-lua/Makefile.am post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} diff -ruN dovecot.orig/files/patch-configure dovecot/files/patch-configure --- dovecot.orig/files/patch-configure 2021-01-29 10:30:02.000000000 +0100 +++ dovecot/files/patch-configure 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ ---- configure.orig 2020-12-22 13:27:02 UTC -+++ configure -@@ -26053,7 +26053,7 @@ fi - $as_echo "$with_lua" >&6; } - - if test "x$with_lua" != "xno"; then : -- for LUAPC in lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua; do -+ for LUAPC in lua5.4 lua-5.4 lua54 lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua; do - - pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5 -@@ -29355,13 +29355,13 @@ fi - - - if test $want_stemmer != no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sb_stemmer_new in -lstemmer" >&5 --$as_echo_n "checking for sb_stemmer_new in -lstemmer... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sb_stemmer_new in -lclucene-contribs-lib" >&5 -+$as_echo_n "checking for sb_stemmer_new in -lclucene-contribs-lib... " >&6; } - if ${ac_cv_lib_stemmer_sb_stemmer_new+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lstemmer $LIBS" -+LIBS="-lclucene-contribs-lib $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - diff -ruN dovecot.orig/files/patch-m4_want__lua.m4 dovecot/files/patch-m4_want__lua.m4 --- dovecot.orig/files/patch-m4_want__lua.m4 1970-01-01 01:00:00.000000000 +0100 +++ dovecot/files/patch-m4_want__lua.m4 2021-01-30 08:46:23.025227000 +0100 @@ -0,0 +1,11 @@ +--- m4/want_lua.m4.orig 2021-01-30 07:45:48 UTC ++++ m4/want_lua.m4 +@@ -13,7 +13,7 @@ AC_DEFUN([DOVECOT_WANT_LUA],[ + AC_MSG_RESULT([$with_lua]) + + AS_IF([test "x$with_lua" != "xno"], +- [for LUAPC in lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua; do ++ [for LUAPC in lua5.4 lua-5.4 lua54 lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua; do + PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [ + AC_DEFINE([HAVE_LUA], [1], [Define to 1 if you have lua]) + with_lua=yes diff -ruN dovecot.orig/files/patch-m4_want__stemmer.m4 dovecot/files/patch-m4_want__stemmer.m4 --- dovecot.orig/files/patch-m4_want__stemmer.m4 1970-01-01 01:00:00.000000000 +0100 +++ dovecot/files/patch-m4_want__stemmer.m4 2021-01-30 10:19:12.913236000 +0100 @@ -0,0 +1,10 @@ +--- m4/want_stemmer.m4.orig 2021-01-30 09:18:08 UTC ++++ m4/want_stemmer.m4 +@@ -1,6 +1,6 @@ + AC_DEFUN([DOVECOT_WANT_STEMMER], [ + if test $want_stemmer != no; then +- AC_CHECK_LIB(stemmer, sb_stemmer_new, [ ++ AC_CHECK_LIB(clucene-contribs-lib, sb_stemmer_new, [ + have_fts_stemmer=yes + AC_DEFINE(HAVE_FTS_STEMMER,, [Define if you want stemming support for FTS]) + ], [ diff -ruN dovecot.orig/files/patch-plugins_fts-lucene_Makefile.in dovecot/files/patch-plugins_fts-lucene_Makefile.in --- dovecot.orig/files/patch-plugins_fts-lucene_Makefile.in 2020-03-23 23:07:58.000000000 +0100 +++ dovecot/files/patch-plugins_fts-lucene_Makefile.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ ---- src/plugins/fts-lucene/Makefile.in.orig -+++ src/plugins/fts-lucene/Makefile.in -@@ -516,7 +516,7 @@ - module_LTLIBRARIES = \ - lib21_fts_lucene_plugin.la - --@BUILD_FTS_STEMMER_TRUE@STEMMER_LIBS = -lstemmer -+@BUILD_FTS_STEMMER_TRUE@STEMMER_LIBS = -lclucene-contribs-lib - @BUILD_FTS_STEMMER_TRUE@SHOWBALL_SOURCES = Snowball.cc - @BUILD_FTS_EXTTEXTCAT_FALSE@@BUILD_FTS_TEXTCAT_TRUE@TEXTCAT_LIBS = -ltextcat - @BUILD_FTS_EXTTEXTCAT_TRUE@TEXTCAT_LIBS = $(LIBEXTTEXTCAT_LIBS) diff -ruN dovecot.orig/files/patch-src_lib-fts_Makefile.am dovecot/files/patch-src_lib-fts_Makefile.am --- dovecot.orig/files/patch-src_lib-fts_Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ dovecot/files/patch-src_lib-fts_Makefile.am 2021-01-30 10:22:16.828669000 +0100 @@ -0,0 +1,11 @@ +--- src/lib-fts/Makefile.am.orig 2021-01-30 09:21:54 UTC ++++ src/lib-fts/Makefile.am +@@ -55,7 +55,7 @@ $(srcdir)/word-break-data.c: $(srcdir)/word-properties + + + if BUILD_FTS_STEMMER +-STEMMER_LIBS = -lstemmer ++STEMMER_LIBS = -lclucene-contribs-lib + endif + + if BUILD_FTS_EXTTEXTCAT diff -ruN dovecot.orig/files/patch-src_lib-fts_Makefile.in dovecot/files/patch-src_lib-fts_Makefile.in --- dovecot.orig/files/patch-src_lib-fts_Makefile.in 2020-03-23 23:07:58.000000000 +0100 +++ dovecot/files/patch-src_lib-fts_Makefile.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ ---- src/lib-fts/Makefile.in.orig -+++ src/lib-fts/Makefile.in -@@ -549,7 +549,7 @@ - word-break-data.c \ - stopwords/stopwords_malformed.txt - --@BUILD_FTS_STEMMER_TRUE@STEMMER_LIBS = -lstemmer -+@BUILD_FTS_STEMMER_TRUE@STEMMER_LIBS = -lclucene-contribs-lib - @BUILD_FTS_EXTTEXTCAT_FALSE@@BUILD_FTS_TEXTCAT_TRUE@TEXTCAT_LIBS = -ltextcat - @BUILD_FTS_EXTTEXTCAT_TRUE@TEXTCAT_LIBS = $(LIBEXTTEXTCAT_LIBS) - @BUILD_LIBICU_TRUE@ICU_SOURCES = fts-icu.c diff -ruN dovecot.orig/files/patch-src_plugins_fts-lucene_Makefile.am dovecot/files/patch-src_plugins_fts-lucene_Makefile.am --- dovecot.orig/files/patch-src_plugins_fts-lucene_Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ dovecot/files/patch-src_plugins_fts-lucene_Makefile.am 2021-01-30 10:21:18.988000000 +0100 @@ -0,0 +1,11 @@ +--- src/plugins/fts-lucene/Makefile.am.orig 2021-01-30 09:20:40 UTC ++++ src/plugins/fts-lucene/Makefile.am +@@ -20,7 +20,7 @@ module_LTLIBRARIES = \ + lib21_fts_lucene_plugin.la + + if BUILD_FTS_STEMMER +-STEMMER_LIBS = -lstemmer ++STEMMER_LIBS = -lclucene-contribs-lib + SHOWBALL_SOURCES = Snowball.cc + endif + diff -ruN dovecot.orig/files/vpopmail.patch dovecot/files/vpopmail.patch --- dovecot.orig/files/vpopmail.patch 1970-01-01 01:00:00.000000000 +0100 +++ dovecot/files/vpopmail.patch 2021-01-29 14:26:44.553820000 +0100 @@ -0,0 +1,695 @@ +diff -ruN ../dovecot-2.3.13.orig/configure.ac ./configure.ac +--- ../dovecot-2.3.13.orig/configure.ac 2020-12-22 14:26:52.000000000 +0100 ++++ ./configure.ac 2021-01-29 14:26:35.068783000 +0100 +@@ -91,6 +91,22 @@ + TEST_WITH(libunwind, $withval), + want_libunwind=auto) + ++AC_ARG_WITH(vpopmail, ++AS_HELP_STRING([--with-vpopmail], [Build with vpopmail support (auto)]), ++ if test x$withval = xno; then ++ want_vpopmail=no ++ else ++ if test x$withval = xyes || test x$withval = xauto; then ++ vpopmail_home="`echo ~vpopmail`" ++ want_vpopmail=$withval ++ else ++ vpopmail_home="$withval" ++ want_vpopmail=yes ++ fi ++ fi, [ ++ want_vpopmail=no ++ ]) ++ + # Berkeley DB support is more or less broken. Disabled for now. + #AC_ARG_WITH(db, + #AS_HELP_STRING([--with-db], [Build with Berkeley DB support]), +@@ -548,6 +564,7 @@ + DOVECOT_WANT_SODIUM + DOVECOT_WANT_SQLITE + DOVECOT_WANT_CASSANDRA ++DOVECOT_WANT_VPOPMAIL + + DOVECOT_SQL + +diff -ruN ../dovecot-2.3.13.orig/doc/example-config/conf.d/10-auth.conf ./doc/example-config/conf.d/10-auth.conf +--- ../dovecot-2.3.13.orig/doc/example-config/conf.d/10-auth.conf 2020-12-22 14:26:52.000000000 +0100 ++++ ./doc/example-config/conf.d/10-auth.conf 2021-01-29 13:21:19.267469000 +0100 +@@ -10,7 +10,7 @@ + #disable_plaintext_auth = yes + + # Authentication cache size (e.g. 10M). 0 means it's disabled. Note that +-# bsdauth and PAM require cache_key to be set for caching to be used. ++# bsdauth, PAM and vpopmail require cache_key to be set for caching to be used. + #auth_cache_size = 0 + # Time to live for cached data. After TTL expires the cached record is no + # longer used, *except* if the main database lookup returns internal failure. +@@ -124,4 +124,5 @@ + #!include auth-ldap.conf.ext + #!include auth-passwdfile.conf.ext + #!include auth-checkpassword.conf.ext ++#!include auth-vpopmail.conf.ext + #!include auth-static.conf.ext +diff -ruN ../dovecot-2.3.13.orig/doc/example-config/conf.d/Makefile.am ./doc/example-config/conf.d/Makefile.am +--- ../dovecot-2.3.13.orig/doc/example-config/conf.d/Makefile.am 2020-12-22 14:26:52.000000000 +0100 ++++ ./doc/example-config/conf.d/Makefile.am 2021-01-29 13:21:19.268070000 +0100 +@@ -11,6 +11,7 @@ + auth-sql.conf.ext \ + auth-static.conf.ext \ + auth-system.conf.ext \ ++ auth-vpopmail.conf.ext \ + 10-auth.conf \ + 10-director.conf \ + 10-logging.conf \ +diff -ruN ../dovecot-2.3.13.orig/doc/example-config/conf.d/auth-vpopmail.conf.ext ./doc/example-config/conf.d/auth-vpopmail.conf.ext +--- ../dovecot-2.3.13.orig/doc/example-config/conf.d/auth-vpopmail.conf.ext 1970-01-01 01:00:00.000000000 +0100 ++++ ./doc/example-config/conf.d/auth-vpopmail.conf.ext 2021-01-29 13:24:12.341999000 +0100 +@@ -0,0 +1,17 @@ ++# Authentication for vpopmail users. Included from 10-auth.conf. ++# ++# ++ ++passdb { ++ driver = vpopmail ++ ++ # [cache_key=] [webmail=] ++ args = ++} ++ ++userdb { ++ driver = vpopmail ++ ++ # [quota_template=