From f399fd8b34c0ad8a0925c5393eaa901b2d227e99 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Tue, 5 Jan 2021 12:33:04 +0100 Subject: [PATCH 1/2] Revert "configure.ac: Finish removing vpopmail support" This reverts commit 7c14211f94ef1d4682f040f7c417ee0041ad0007. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index aa6e9e644..b78610b2c 100644 --- a/configure.ac +++ b/configure.ac @@ -548,6 +548,7 @@ DOVECOT_WANT_MYSQL DOVECOT_WANT_SODIUM DOVECOT_WANT_SQLITE DOVECOT_WANT_CASSANDRA +DOVECOT_WANT_VPOPMAIL DOVECOT_SQL -- 2.26.2 From 75ca536cb0c2816cc0e03db6024ca59f3e7c2db5 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Tue, 5 Jan 2021 12:33:13 +0100 Subject: [PATCH 2/2] Revert "auth: Remove vpopmail user & pass db support" This reverts commit d3d02fdd7104fd4b6b8d6565c8f4910944979e23. --- configure.ac | 16 ++ doc/example-config/conf.d/10-auth.conf | 3 +- doc/example-config/conf.d/Makefile.am | 1 + .../conf.d/auth-vpopmail.conf.ext | 17 ++ m4/want_vpopmail.m4 | 33 +++ src/auth/Makefile.am | 5 +- src/auth/db-checkpassword.c | 12 + src/auth/passdb-vpopmail.c | 229 ++++++++++++++++++ src/auth/passdb.c | 2 + src/auth/userdb-vpopmail.c | 202 +++++++++++++++ src/auth/userdb-vpopmail.h | 17 ++ src/auth/userdb.c | 2 + src/master/main.c | 6 + 13 files changed, 543 insertions(+), 2 deletions(-) create mode 100644 doc/example-config/conf.d/auth-vpopmail.conf.ext create mode 100644 m4/want_vpopmail.m4 create mode 100644 src/auth/passdb-vpopmail.c create mode 100644 src/auth/userdb-vpopmail.c create mode 100644 src/auth/userdb-vpopmail.h diff --git a/configure.ac b/configure.ac index b78610b2c..925d4bc15 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,22 @@ AS_HELP_STRING([--with-libunwind], [Build with libunwind support (auto)]), 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]), diff --git a/doc/example-config/conf.d/10-auth.conf b/doc/example-config/conf.d/10-auth.conf index 3e9c4e4dc..1b139d8c0 100644 --- a/doc/example-config/conf.d/10-auth.conf +++ b/doc/example-config/conf.d/10-auth.conf @@ -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 @@ auth_mechanisms = plain #!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 --git a/doc/example-config/conf.d/Makefile.am b/doc/example-config/conf.d/Makefile.am index d5d509def..35ff25ad5 100644 --- a/doc/example-config/conf.d/Makefile.am +++ b/doc/example-config/conf.d/Makefile.am @@ -11,6 +11,7 @@ example_DATA = \ 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 --git a/doc/example-config/conf.d/auth-vpopmail.conf.ext b/doc/example-config/conf.d/auth-vpopmail.conf.ext new file mode 100644 index 000000000..f2da976bd --- /dev/null +++ b/doc/example-config/conf.d/auth-vpopmail.conf.ext @@ -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=