aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@debian.org>2025-04-25 17:59:57 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-04-26 18:03:03 +0200
commit66aeda7f653cfb72731fe7ff2925d7291158500f (patch)
treec00ab59def64caace0cbe7a3c747f18f71f6649b
parent8f11b2625b98831a591a73c8928d62c1df11aadb (diff)
Port tests and documentation to Dovecot 2.4.
See https://doc.dovecot.org/main/installation/upgrade/2.3-to-2.4.html .
-rw-r--r--benchmark/dovecot.conf29
-rwxr-xr-xbenchmark/run39
-rw-r--r--doc/benchmark.md4
-rw-r--r--doc/development.md69
-rw-r--r--doc/getting-started.md21
-rw-r--r--doc/interimap.1.md2
-rw-r--r--doc/multi-account.md25
-rw-r--r--tests/auth-logindisabled/remote.conf4
-rw-r--r--tests/condstore/t4
-rw-r--r--tests/config/dovecot/imapd.conf7
-rw-r--r--tests/config/dovecot/lmtpd.conf4
-rw-r--r--tests/config/dovecot/ssl.conf6
-rw-r--r--tests/db-upgrade-0-1/t4
-rw-r--r--tests/delete/t14
-rw-r--r--tests/delimiter-change/t4
-rw-r--r--tests/ignore-mailbox/t8
-rw-r--r--tests/largeint/t36
-rw-r--r--tests/list-mailbox/t2
-rw-r--r--tests/list-reference/t6
-rw-r--r--tests/list-select-opts/t16
-rw-r--r--tests/pullimap/t12
-rw-r--r--tests/rename-exists-db/t8
-rw-r--r--tests/rename-exists-local/t6
-rw-r--r--tests/rename-exists-remote/t6
-rw-r--r--tests/rename-inferiors/t4
-rw-r--r--tests/rename-simple/t2
-rw-r--r--tests/repair/t26
-rw-r--r--tests/resume/t24
-rwxr-xr-xtests/run28
-rw-r--r--tests/split-set/t8
-rw-r--r--tests/starttls-injection/remote.conf4
-rw-r--r--tests/starttls-logindisabled/remote.conf4
-rw-r--r--tests/starttls/t4
-rw-r--r--tests/sync-live-multi/local.conf40
-rw-r--r--tests/sync-live-multi/t22
-rw-r--r--tests/sync-live/t10
-rw-r--r--tests/sync-mailbox-list/t20
-rw-r--r--tests/tls-pin-fingerprint/t4
-rw-r--r--tests/tls-rsa+ecdsa/remote.conf4
-rw-r--r--tests/tls-rsa+ecdsa/t12
-rw-r--r--tests/tls-sni/remote.conf4
-rw-r--r--tests/tls-sni/t8
-rw-r--r--tests/tls-verify-peer/t7
-rw-r--r--tests/tls/t4
44 files changed, 307 insertions, 268 deletions
diff --git a/benchmark/dovecot.conf b/benchmark/dovecot.conf
index 55301d9..68cc40e 100644
--- a/benchmark/dovecot.conf
+++ b/benchmark/dovecot.conf
@@ -1,15 +1,20 @@
+dovecot_config_version = 2.4.0
+dovecot_storage_version = 2.4.0
+
log_path = /dev/shm/mail.log
-mail_home = /dev/shm/vmail/%u
-mail_location = mdbox:~/mail
+mail_home = /dev/shm/vmail/%{user | username | lower}
+mail_driver = mdbox
+mail_path = ~/mail
+mailbox_list_index = yes
ssl = no
listen = 127.0.0.1
-namespace {
+namespace inbox {
inbox = yes
separator = /
}
-# https://wiki.dovecot.org/HowTo/Rootless
+# https://doc.dovecot.org/latest/core/config/rootless.html#rootless-installation
base_dir = /dev/shm/dovecot/run
default_internal_user = nobody
default_internal_group = nogroup
@@ -25,20 +30,18 @@ service stats {
chroot =
}
-passdb {
- args = scheme=PLAIN username_format=%u /dev/shm/dovecot/users
+passdb passwd-file {
driver = passwd-file
+ default_password_scheme = plain
+ passwd_file_path = /dev/shm/dovecot/users
}
-userdb {
- args = username_format=%u /dev/shm/dovecot/users
+userdb passwd-file {
driver = passwd-file
+ passwd_file_path = /dev/shm/dovecot/users
}
-protocols = imap
-
-mail_plugins = zlib
-protocol imap {
- mail_plugins = imap_zlib
+protocols {
+ imap = yes
}
service imap-login {
diff --git a/benchmark/run b/benchmark/run
index 650270a..dd30bdc 100755
--- a/benchmark/run
+++ b/benchmark/run
@@ -140,15 +140,19 @@ jail /usr/sbin/dovecot -c"/dev/shm/dovecot/config"
install -onobody -gnogroup -m0600 /dev/null \
"$ROOTDIR/dev/shm/dovecot/users"
PASSWORD="$(xxd -l16 -p </dev/urandom)"
-printf "%s:%s:::::\\n" "user" "$PASSWORD" \
+printf "%s:%s::::%s:\\n" "user" "$PASSWORD" "/dev/shm/vmail/user" \
>"$ROOTDIR/dev/shm/dovecot/users"
# install user configuration for Dovecot, interimap, and offlineimap
cat >"$ROOTDIR/dev/shm/nobody/.dovecot.conf" <<-EOF
+ dovecot_config_version = 2.4.0
+ dovecot_storage_version = 2.4.0
log_path = /dev/null
- mail_home = /dev/shm/nobody
- mail_location = maildir:~/Maildir
ssl = no
+ mail_home = /dev/shm/nobody
+ mail_driver = maildir
+ mail_path = ~/Maildir
+ mailbox_list_index = yes
EOF
install -onobody -gnogroup -Dm0700 --directory \
@@ -222,18 +226,19 @@ prepare() {
done
# convert to mdbox
- jail doveadm -c"/dev/shm/dovecot/config" -omail_location="maildir:~/maildir" \
- sync "mdbox:~/mail.back"
+ jail doveadm -c"/dev/shm/dovecot/config" -omail_driver="maildir" -omail_path="~/maildir" \
+ sync --no-userdb-lookup "mdbox:~/mail.back"
jail rm -rf -- "$maildir"
# expunge 20% and purge
for m in "${!MAILBOXES[@]}"; do
n="${MAILBOXES["$m"]}"
seqs="$(shuf -n $((n/5)) -i"1-$n")"
- jail doveadm -c"/dev/shm/dovecot/config" -omail_location="mdbox:~/mail.back" \
- expunge mailbox "$m" "${seqs//$'\n'/,}"
+ jail doveadm -c"/dev/shm/dovecot/config" -omail_driver="mdbox" -omail_path="~/mail.back" \
+ expunge --no-userdb-lookup mailbox "$m" "${seqs//$'\n'/,}"
done
- jail doveadm -c"/dev/shm/dovecot/config" -omail_location="mdbox:~/mail.back" purge
+ jail doveadm -c"/dev/shm/dovecot/config" -omail_driver="mdbox" -omail_path="~/mail.back" \
+ purge --no-userdb-lookup
}
# populate a clientn from backup mailstore mdbox:~/mail.back (copied to
@@ -250,8 +255,8 @@ populate() {
# force dovecot to index and compute the state, otherwise the first
# thing to query might be disadvantaged
- jail doveadm -c"/dev/shm/dovecot/config" index "INBOX"
- jail doveadm -c"/dev/shm/dovecot/config" mailbox status "all" "*" >/dev/null
+ jail doveadm -c"/dev/shm/dovecot/config" index --no-userdb-lookup "INBOX" 2>/dev/null
+ jail doveadm -c"/dev/shm/dovecot/config" mailbox status --no-userdb-lookup "all" "*" >/dev/null
u="local"
# initial configuration
@@ -395,9 +400,9 @@ activity2() {
deliver "mailbox2" <"$ROOTDIR/tmp/msg2"
deliver "mailbox3" <"$ROOTDIR/tmp/msg3"
# intentionally modify the remote only because not all local backend speak IMAP
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox "mailbox3" "1:2"
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox "mailbox4" "1,3"
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox "mailbox5" "*"
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox "mailbox3" "1:2"
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox "mailbox4" "1,3"
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox "mailbox5" "*"
}
for n in 100 1000 10000; do
@@ -489,14 +494,14 @@ while [ $(date +%s) -lt $timeout ]; do
n="$(shuf -n1 -i1-100)"
if [ $n -le 5 ]; then
# expunge a random message on the remote
- read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search all | shuf -n1)
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox-guid "$guid" uid "$uid"
+ read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search --no-userdb-lookup all | shuf -n1)
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox-guid "$guid" uid "$uid"
fi
n="$(shuf -n1 -i1-100)"
if [ $n -le 10 ]; then
# mark a random message as seen
- read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search all | shuf -n1)
- jail doveadm -c"/dev/shm/dovecot/config" flags add "\\Seen" mailbox-guid "$guid" uid "$uid"
+ read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search --no-userdb-lookup all | shuf -n1)
+ jail doveadm -c"/dev/shm/dovecot/config" flags add --no-userdb-lookup "\\Seen" mailbox-guid "$guid" uid "$uid"
fi
sleep $step
done
diff --git a/doc/benchmark.md b/doc/benchmark.md
index f2f6cda..3b58e10 100644
--- a/doc/benchmark.md
+++ b/doc/benchmark.md
@@ -48,8 +48,8 @@ by placing packet counters on the interface.
[OfflineIMAP]: https://www.offlineimap.org/
[benchmark-script]: https://git.guilhem.org/interimap/plain/benchmark/run
[Dovecot]: https://dovecot.org
-[dbox]: https://doc.dovecot.org/admin_manual/mailbox_formats/dbox/
-[maildir]: https://doc.dovecot.org/admin_manual/mailbox_formats/maildir/
+[dbox]: https://doc.dovecot.org/latest/core/config/mailbox_formats/dbox.html
+[maildir]: https://doc.dovecot.org/latest/core/config/mailbox_formats/maildir.html
-----------------------------------------------------------------------
diff --git a/doc/development.md b/doc/development.md
index 0fe54f4..f739dc0 100644
--- a/doc/development.md
+++ b/doc/development.md
@@ -15,14 +15,18 @@ Dovecot configuration
=====================
Create a file `$BASEDIR/dovecot.conf`, which will be used as
-configuration for the various Dovecot commands (the system configuration
-will be skipped).
+configuration for the various Dovecot 2.4 commands (the system
+configuration will be skipped).
$ cat >"$BASEDIR/dovecot.conf" <<-EOF
- log_path = "$BASEDIR/dovecot.log"
- ssl = no
- mail_home = "$BASEDIR/%u"
- mail_location = maildir:~/Mail
+ dovecot_config_version = 2.4.0
+ dovecot_storage_version = 2.4.0
+ log_path = "$BASEDIR/dovecot.log"
+ ssl = no
+
+ mail_home = "$BASEDIR/%{user | username | lower}"
+ mail_driver = maildir
+ mail_path = ~/Mail
EOF
Here are some details on the above:
@@ -36,18 +40,17 @@ Here are some details on the above:
`mail_home`
: Dovecot needs the name of the user to (pre-)authenticate. It is shown
- in the greeting line, and also used in [`%`-variable] expansion.
+ in the greeting line, and also used in [settings variables] expansion.
Several [`doveadm`(1)] sub-commands have a `-u` (or `-d`) option which
- can be used to determine the username. When this option is not set,
- the username is taken from the `USER` environment variable. If that
- environment variable is unset as well, then the return string of
- [`getlogin`(3)] is used.
+ can be used to determine the username. To avoid performing the userdb
+ lookup one can pass `--no-userdb-lookup` instead, in which case the
+ username is taken from the `USER` environment variable.
Similarly, the user's home directory is used in (`~`- and)
- [`%`-variable] expansion. It's taken from the `HOME` environment
- variable when the `mail_home` setting is left unset in the Dovecot
- configuration (and not overridden by the [user database][User
- Databases].
+ [settings variables] expansion. It's taken from the `HOME`
+ environment variable when the `mail_home` setting is left unset in
+ the Dovecot configuration (and not overridden by the
+ [user database][User Databases].
`mail_home` can therefore be left unset if the `HOME` environment
variable is consistently set to `$BASEDIR/$USER`. However it's
@@ -55,14 +58,17 @@ Here are some details on the above:
command run in a non-curated environment might mess up with your own
mail storage…
-`mail_location`
+`mail_driver`
- : The user's mail storage resides — in [Maildir] format — in a directory
- `Mail` under their home directory. This is enough if you're fine with
- the default IMAP hierarchy delimiter (which depends on the mail format)
- is used, and if you need a single [IMAP namespace][RFC 2342]. For more
- complex setups you'll need one or more [`namespace {…}` block][Dovecot
- Namespaces].
+ : Use the [Maildir] format for mail storage..
+
+`mail_path`:
+
+ : The user's mail storage resides in a directory `Mail` under their
+ home directory. This is enough if you're fine with the default IMAP
+ hierarchy delimiter (which depends on the mail format) is used, and
+ if you need a single [IMAP namespace][RFC 2342]. For more complex
+ setups you'll need one or more [`namespace {…}` block][Dovecot Namespaces].
Mail storage access
===================
@@ -88,7 +94,7 @@ the latter to create a mailbox `foo`, add a sample message to it, and
finally mark it as `\Seen`.
$ env -i PATH="/usr/bin:/bin" USER="testuser" \
- doveadm -c "$BASEDIR/dovecot.conf" mailbox create "foo"
+ doveadm -c "$BASEDIR/dovecot.conf" mailbox create --no-userdb-lookup "foo"
<!-- -->
$ env -i PATH="/usr/bin:/bin" USER="testuser" HOME="$BASEDIR/testuser" \
doveadm -c "$BASEDIR/dovecot.conf" exec dovecot-lda -e -m "foo" <<-EOF
@@ -102,7 +108,7 @@ finally mark it as `\Seen`.
EOF
<!-- -->
$ env -i PATH="/usr/bin:/bin" USER="testuser" \
- doveadm -c "$BASEDIR/dovecot.conf" flags add "\\Seen" mailbox "foo" "*"
+ doveadm -c "$BASEDIR/dovecot.conf" flags add --no-userdb-lookup "\\Seen" mailbox "foo" "*"
Normally [`dovecot-lda`(1)][Dovecot LDA] tries to do a userdb lookup in
order to determine the user's home directory. Since we didn't configure
@@ -193,14 +199,13 @@ recursively remove the directory `$BASEDIR`.
[IMAP4rev1]: https://tools.ietf.org/html/rfc3501
[Dovecot]: https://dovecot.org
-[Dovecot Logging]: https://doc.dovecot.org/admin_manual/logging/
-[Dovecot LDA]: https://doc.dovecot.org/configuration_manual/protocols/lda/
-[`getlogin`(3)]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html
-[User Databases]: https://doc.dovecot.org/configuration_manual/authentication/user_databases_userdb/
-[Maildir]: https://doc.dovecot.org/configuration_manual/mail_location/Maildir/
+[Dovecot Logging]: https://doc.dovecot.org/latest/core/admin/logging.html#dovecot-logging
+[Dovecot LDA]: https://doc.dovecot.org/latest/core/config/delivery/lda.html
+[User Databases]: https://doc.dovecot.org/latest/core/config/auth/userdb.html
+[Maildir]: https://doc.dovecot.org/latest/core/config/mailbox_formats/maildir.html
[RFC 2342]: https://tools.ietf.org/html/rfc2342
-[Dovecot Namespaces]: https://doc.dovecot.org/configuration_manual/namespace/
+[Dovecot Namespaces]: https://doc.dovecot.org/latest/core/config/namespaces.html
[`interimap`(1)]: interimap.1.html
[`pullimap`(1)]: pullimap.1.html
-[`doveadm`(1)]: https://wiki.dovecot.org/Tools/Doveadm
-[`%`-variable]: https://doc.dovecot.org/configuration_manual/config_file/config_variables/
+[`doveadm`(1)]: https://doc.dovecot.org/latest/core/man/doveadm.1.html
+[settings variables]: https://doc.dovecot.org/latest/core/settings/variables.html
diff --git a/doc/getting-started.md b/doc/getting-started.md
index 7a77a6b..e89eb19 100644
--- a/doc/getting-started.md
+++ b/doc/getting-started.md
@@ -84,7 +84,7 @@ mailbox delivery) then don't disable them, and modify Dovecot's system
wide configuration instead. Same thing if your mail client isn't able
to spawn a command for IMAP communication, and instead insists on
connecting to a network socket (in that case you'll even need to
-configure [user authentication](https://doc.dovecot.org/configuration_manual/authentication/)
+configure [user authentication](https://doc.dovecot.org/latest/core/config/auth/overview.html)
for the IMAP service, which is out of scope for the present document).
Run the following command to terminate and disable the system-wide
@@ -94,14 +94,19 @@ Dovecot processes.
Create a new directory `$XDG_CONFIG_HOME/dovecot` holding the local
-Dovecot configuration:
+Dovecot 2.4 configuration:
$ install -m0700 -vd ${XDG_CONFIG_HOME:-~/.config}/dovecot
<!-- -->
$ cat >${XDG_CONFIG_HOME:-~/.config}/dovecot/dovecot.conf <<-EOF
+ dovecot_config_version = 2.4.0
+ dovecot_storage_version = 2.4.0
+
ssl = no
- mail_location = maildir:~/Mail
- namespace {
+ mail_home = /home/%{user | username | lower}
+ mail_driver = maildir
+ mail_path = ~/Mail
+ namespace inbox {
inbox = yes
separator = /
}
@@ -114,9 +119,9 @@ Some remarks on the above:
* Messages will be stored in Maildir format under `~/Mail`. Ensure
the directory is either *empty* or *doesn't exist* before
continuing! You may want to choose a different
- [format](https://doc.dovecot.org/admin_manual/mailbox_formats/)
- here, or simply append `:LAYOUT=fs` to the `mail_location` value in
- order to use a nicer (File System like) Maildir layout.
+ [format](https://doc.dovecot.org/latest/core/config/mailbox_formats/overview.html)
+ here, or simply set `mailbox_list_layout = fs` in order to use a
+ nicer (File System like) Maildir layout.
* The `separator` setting defines the IMAP hierarchy delimiter. This
is orthogonal to the Maildir layout delimiter, and you can safely
change it later (even on an existing mail store). Popular hierarchy
@@ -282,7 +287,7 @@ Manual
[IMAP4rev1]: https://tools.ietf.org/html/rfc3501
[INI file]: https://en.wikipedia.org/wiki/INI_file
[`interimap`(1)]: interimap.1.html
-[LMTP server]: https://doc.dovecot.org/configuration_manual/protocols/lmtp_server/
+[LMTP server]: https://doc.dovecot.org/latest/core/config/delivery/lmtp.html
[Maildir]: https://en.wikipedia.org/wiki/Maildir
[mbox]: https://en.wikipedia.org/wiki/Mbox
[MTA]: https://en.wikipedia.org/wiki/Message_transfer_agent
diff --git a/doc/interimap.1.md b/doc/interimap.1.md
index 2d588ae..18b3581 100644
--- a/doc/interimap.1.md
+++ b/doc/interimap.1.md
@@ -602,4 +602,4 @@ A _getting started_ guide is available [there](getting-started.html).
[PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions
[`ciphers`(1ssl)]: https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html
[`verify`(1ssl)]: https://www.openssl.org/docs/manmaster/man1/openssl-verify.html
-[`doveadm-deduplicate`(1)]: https://wiki.dovecot.org/Tools/Doveadm/Deduplicate
+[`doveadm-deduplicate`(1)]: https://doc.dovecot.org/latest/core/man/doveadm-deduplicate.1.html
diff --git a/doc/multi-account.md b/doc/multi-account.md
index cc0a1b8..58fdd2d 100644
--- a/doc/multi-account.md
+++ b/doc/multi-account.md
@@ -82,20 +82,23 @@ over: they will only live on the local instance.
$ cat >${XDG_CONFIG_HOME:-~/.config}/dovecot/dovecot.conf <<-EOF
ssl = no
- namespace {
- location = maildir:~/Mail
- inbox = yes
- separator = /
+ namespace indbox {
+ mail_driver = maildir
+ mail_path = ~/Mail
+ inbox = yes
+ separator = /
}
namespace perso {
- prefix = perso/
- location = maildir:~/Mail/perso
- separator = /
+ prefix = perso/
+ mail_driver = maildir
+ mail_path = ~/Mail/perso
+ separator = /
}
namespace work {
- prefix = work/
- location = maildir:~/Mail/work
- separator = /
+ prefix = work/
+ mail_driver = maildir
+ mail_path = ~/Mail/work
+ separator = /
}
EOF
@@ -205,5 +208,5 @@ Template user unit for systemd are provided in order to run these
[Getting Started]: getting-started.html
[RFC 2342]: https://tools.ietf.org/html/rfc2342
[RFC 3501]: https://tools.ietf.org/html/rfc3501
-[Dovecot namespaces]: https://doc.dovecot.org/configuration_manual/namespace/
+[Dovecot namespaces]: https://doc.dovecot.org/latest/core/config/namespaces.html
[`interimap`(1)]: interimap.1.html
diff --git a/tests/auth-logindisabled/remote.conf b/tests/auth-logindisabled/remote.conf
index 1f02afe..990dcbd 100644
--- a/tests/auth-logindisabled/remote.conf
+++ b/tests/auth-logindisabled/remote.conf
@@ -1,4 +1,6 @@
!include conf.d/imapd.conf
# trick dovecot into treating local connections as insecure
-imap_capability = +LOGINDISABLED
+imap_capability {
+ LOGINDISABLED = yes
+}
diff --git a/tests/condstore/t b/tests/condstore/t
index b30ca36..303287e 100644
--- a/tests/condstore/t
+++ b/tests/condstore/t
@@ -28,7 +28,7 @@ while [ $(date +%s) -le $timer ]; do
u="$(shuf -n1 -e "local" "remote")"
f="$(shuf -n1 -e "${FLAGS[@]}")"
seqs="$(shuf -n$((N/8)) -i1-$N)" # trigger changes on 1/8 of all messages
- doveadm -u "$u" flags "$a" "$f" mailbox "INBOX" "${seqs//$'\n'/,}"
+ doveadm -u "$u" flags "$a" --no-userdb-lookup "$f" mailbox "INBOX" "${seqs//$'\n'/,}"
sleep "0.0$(shuf -n1 -i10-99)" # 10 to 99ms
done
sleep 5
@@ -39,7 +39,7 @@ trap - EXIT INT TERM
# make sure the list of uids for a given tag match
flagged_uids() {
local u="$1" f="$2"
- doveadm -u "$u" search mailbox "INBOX" keyword "$f" | cut -d" " -f2 | sort -n
+ doveadm -u "$u" search --no-userdb-lookup mailbox "INBOX" keyword "$f" | cut -d" " -f2 | sort -n
}
for f in "${FLAGS[@]}"; do
diff --label="local/$f" --label="remote/$f" -u -- \
diff --git a/tests/config/dovecot/imapd.conf b/tests/config/dovecot/imapd.conf
index 2b26451..6f456f6 100644
--- a/tests/config/dovecot/imapd.conf
+++ b/tests/config/dovecot/imapd.conf
@@ -1,8 +1,5 @@
-protocols = $protocols imap
-
-mail_plugins = $mail_plugins zlib
-protocol imap {
- mail_plugins = $mail_plugins imap_zlib
+protocols {
+ imap = yes
}
service imap-login {
diff --git a/tests/config/dovecot/lmtpd.conf b/tests/config/dovecot/lmtpd.conf
index 6aa8365..23cdc1e 100644
--- a/tests/config/dovecot/lmtpd.conf
+++ b/tests/config/dovecot/lmtpd.conf
@@ -1,4 +1,6 @@
-protocols = $protocols lmtp
+protocols {
+ lmtp = yes
+}
service lmtp {
inet_listener lmtp {
diff --git a/tests/config/dovecot/ssl.conf b/tests/config/dovecot/ssl.conf
index 1f3a698..fd119cd 100644
--- a/tests/config/dovecot/ssl.conf
+++ b/tests/config/dovecot/ssl.conf
@@ -1,6 +1,6 @@
ssl = required
-ssl_cert = <dovecot.rsa.crt
-ssl_key = <dovecot.rsa.key
-ssl_dh = <dhparams.pem
+ssl_server_cert_file = dovecot.rsa.crt
+ssl_server_key_file = dovecot.rsa.key
+ssl_server_dh_file = dhparams.pem
ssl_min_protocol = TLSv1.2
ssl_cipher_list = DEFAULT@SECLEVEL=2
diff --git a/tests/db-upgrade-0-1/t b/tests/db-upgrade-0-1/t
index 2baafe6..2d0546c 100644
--- a/tests/db-upgrade-0-1/t
+++ b/tests/db-upgrade-0-1/t
@@ -1,6 +1,6 @@
# create the mailboxes from the database
-doveadm -u "local" mailbox create "a.b1.c1" "a.b1.c2" "a.b2.c" "a2"
-doveadm -u "remote" mailbox create "a.b1.c1" "a.b1.c2" "a.b2.c" "a2"
+doveadm -u "local" mailbox create --no-userdb-lookup "a.b1.c1" "a.b1.c2" "a.b2.c" "a2"
+doveadm -u "remote" mailbox create --no-userdb-lookup "a.b1.c1" "a.b1.c2" "a.b2.c" "a2"
# import an existing non-migrated database
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" <"$TESTDIR/before.sql" || error "Couldn't import DB"
diff --git a/tests/delete/t b/tests/delete/t
index 84fc55f..3baca2c 100644
--- a/tests/delete/t
+++ b/tests/delete/t
@@ -1,4 +1,4 @@
-doveadm -u "local" mailbox create "foo.bar" "foo.bar.baz"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo.bar" "foo.bar.baz"
for m in "foo.bar" "foo.bar.baz" "INBOX"; do
sample_message | deliver -u "local" -- -m "$m"
@@ -48,14 +48,14 @@ EOF
diff -u --label="a/dump.sql" --label="b/dump.sql" \
"$TMPDIR/dump.sql" "$TMPDIR/dump2.sql" || error "SQL dumps differ"
-! doveadm -u "local" mailbox status uidvalidity "foo.bar" # gone
- doveadm -u "remote" mailbox status uidvalidity "foo^bar"
+! doveadm -u "local" mailbox status --no-userdb-lookup uidvalidity "foo.bar" # gone
+ doveadm -u "remote" mailbox status --no-userdb-lookup uidvalidity "foo^bar"
# now delete from the remote server and the database
interimap --delete "foo.bar"
-! doveadm -u "local" mailbox status uidvalidity "foo.bar"
-! doveadm -u "remote" mailbox status uidvalidity "foo^bar"
+! doveadm -u "local" mailbox status --no-userdb-lookup uidvalidity "foo.bar"
+! doveadm -u "remote" mailbox status --no-userdb-lookup uidvalidity "foo^bar"
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/mailboxes2.sql" <<-EOF
SELECT idx, mailbox FROM mailboxes ORDER BY idx
@@ -80,8 +80,8 @@ step_done
step_start "\\Noinferiors mailbox"
interimap --delete "foo.bar.baz"
-! doveadm -u "local" mailbox status uidvalidity "foo.bar.baz"
-! doveadm -u "remote" mailbox status uidvalidity "foo^bar^baz"
+! doveadm -u "local" mailbox status --no-userdb-lookup uidvalidity "foo.bar.baz"
+! doveadm -u "remote" mailbox status --no-userdb-lookup uidvalidity "foo^bar^baz"
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/count" <<-EOF
SELECT COUNT(*) FROM mailboxes
diff --git a/tests/delimiter-change/t b/tests/delimiter-change/t
index c49dd66..72229de 100644
--- a/tests/delimiter-change/t
+++ b/tests/delimiter-change/t
@@ -1,5 +1,5 @@
# create and populate some mailboxes
-doveadm -u "local" mailbox create -- "foo" "foo.bar" "baz"
+doveadm -u "local" mailbox create --no-userdb-lookup -- "foo" "foo.bar" "baz"
run() {
local i m u s1="$1" s2="$2" m2
@@ -31,7 +31,7 @@ sed -ri "s,^(\\s*separator\\s*)=.*,separator = .," "$HOME_remote/.dovecot/config
run "." "."
# ensure there were no duplicates
-n="$(doveadm -u "local" search all | wc -l)"
+n="$(doveadm -u "local" search --no-userdb-lookup all | wc -l)"
[ "$n" -eq 64 ] || error "$n != 64"
# vim: set filetype=bash :
diff --git a/tests/ignore-mailbox/t b/tests/ignore-mailbox/t
index 0b8d553..1b09a1d 100644
--- a/tests/ignore-mailbox/t
+++ b/tests/ignore-mailbox/t
@@ -1,5 +1,5 @@
-doveadm -u "local" mailbox create "foo" -- "-virtual"
-doveadm -u "remote" mailbox create "bar" -- "virtual-"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo" -- "-virtual"
+doveadm -u "remote" mailbox create --no-userdb-lookup "bar" -- "virtual-"
interimap_init
check_mailbox_list
@@ -15,8 +15,8 @@ for ((i = 0; i < 16; i++)); do
done
# create new mailboxes matching 'ignore-mailbox'
-doveadm -u "local" mailbox create "virtual" "virtual.foo"
-doveadm -u "remote" mailbox create "virtual^bar"
+doveadm -u "local" mailbox create --no-userdb-lookup "virtual" "virtual.foo"
+doveadm -u "remote" mailbox create --no-userdb-lookup "virtual^bar"
for n in $(seq 1 "$(shuf -n1 -i1-8)"); do
sample_message | deliver -u "local" -- -m "virtual"
sample_message | deliver -u "local" -- -m "virtual.foo"
diff --git a/tests/largeint/t b/tests/largeint/t
index c3f349e..84d21ae 100644
--- a/tests/largeint/t
+++ b/tests/largeint/t
@@ -1,15 +1,15 @@
-doveadm -u "local" mailbox create "foo" "bar" "baz"
-doveadm -u "remote" mailbox create "foo" "bar" "baz"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo" "bar" "baz"
+doveadm -u "remote" mailbox create --no-userdb-lookup "foo" "bar" "baz"
-doveadm -u "local" mailbox update --uid-validity 1 "INBOX"
-doveadm -u "local" mailbox update --uid-validity 2147483647 "foo" # 2^31-1
-doveadm -u "local" mailbox update --uid-validity 2147483648 "bar" # 2^31
-doveadm -u "local" mailbox update --uid-validity 4294967295 "baz" # 2^32-1
+doveadm -u "local" mailbox update --no-userdb-lookup --uid-validity 1 "INBOX"
+doveadm -u "local" mailbox update --no-userdb-lookup --uid-validity 2147483647 "foo" # 2^31-1
+doveadm -u "local" mailbox update --no-userdb-lookup --uid-validity 2147483648 "bar" # 2^31
+doveadm -u "local" mailbox update --no-userdb-lookup --uid-validity 4294967295 "baz" # 2^32-1
-doveadm -u "remote" mailbox update --uid-validity 4294967295 "INBOX" # 2^32-1
-doveadm -u "remote" mailbox update --uid-validity 2147483648 "foo" # 2^31
-doveadm -u "remote" mailbox update --uid-validity 2147483647 "bar" # 2^31-1
-doveadm -u "remote" mailbox update --uid-validity 1 "baz" #
+doveadm -u "remote" mailbox update --no-userdb-lookup --uid-validity 4294967295 "INBOX" # 2^32-1
+doveadm -u "remote" mailbox update --no-userdb-lookup --uid-validity 2147483648 "foo" # 2^31
+doveadm -u "remote" mailbox update --no-userdb-lookup --uid-validity 2147483647 "bar" # 2^31-1
+doveadm -u "remote" mailbox update --no-userdb-lookup --uid-validity 1 "baz" #
run() {
local u m i
@@ -25,14 +25,16 @@ run() {
run
# raise UIDNEXT AND HIGHESTMODSEQ close to the max values (resp. 2^32-1 och 2^63-1)
-doveadm -u "local" mailbox update --min-next-uid 2147483647 --min-highest-modseq 9223372036854775807 "INBOX" # 2^31-1, 2^63-1
-doveadm -u "local" mailbox update --min-next-uid 2147483647 --min-highest-modseq 9223372036854775807 "foo" # 2^31-1, 2^63-1
-doveadm -u "local" mailbox update --min-next-uid 2147483648 --min-highest-modseq 9223372036854775808 "bar" # 2^31, 2^63
-doveadm -u "local" mailbox update --min-next-uid 2147483648 --min-highest-modseq 9223372036854775808 "baz" # 2^31, 2^63
+# XXX as of dovecot 2.4 --min-highest-modseq rejects values higher than INT64_MAX instead of UINT64_MAX,
+# cf. str_parse_int64()
+doveadm -u "local" mailbox update --no-userdb-lookup --min-next-uid 2147483647 --min-highest-modseq 9223372036854775807 "INBOX" # 2^31-1, 2^63-1
+doveadm -u "local" mailbox update --no-userdb-lookup --min-next-uid 2147483647 --min-highest-modseq 9223372036854775807 "foo" # 2^31-1, 2^63-1
+doveadm -u "local" mailbox update --no-userdb-lookup --min-next-uid 2147483648 --min-highest-modseq 9223372036854775807 "bar" # 2^31, 2^63-1
+doveadm -u "local" mailbox update --no-userdb-lookup --min-next-uid 2147483648 --min-highest-modseq 9223372036854775807 "baz" # 2^31, 2^63-1
-doveadm -u "remote" mailbox update --min-next-uid 4294967168 --min-highest-modseq 18446744073709551488 "INBOX" # 2^32-128, 2^64-128
-doveadm -u "remote" mailbox update --min-next-uid 2147483776 --min-highest-modseq 9223372036854775936 "foo" # 2^31+128, 2^63+128
-doveadm -u "remote" mailbox update --min-next-uid 2147483648 --min-highest-modseq 9223372036854775808 "bar" # 2^31, 2^63
+doveadm -u "remote" mailbox update --no-userdb-lookup --min-next-uid 4294967168 --min-highest-modseq 9223372036854775807 "INBOX" # 2^32-128, 2^63-1
+doveadm -u "remote" mailbox update --no-userdb-lookup --min-next-uid 2147483776 --min-highest-modseq 9223372036854775807 "foo" # 2^31+128, 2^63-1
+doveadm -u "remote" mailbox update --no-userdb-lookup --min-next-uid 2147483648 --min-highest-modseq 9223372036854775807 "bar" # 2^31, 2^63-1
run
diff --git a/tests/list-mailbox/t b/tests/list-mailbox/t
index a1168a6..6c19705 100644
--- a/tests/list-mailbox/t
+++ b/tests/list-mailbox/t
@@ -1,6 +1,6 @@
# create and populate some mailboxes locally
declare -a MAILBOXES=( "foo" "foo bar" "f\\\"o!o.bar" "f.o.o" )
-doveadm -u "local" mailbox create -- "${MAILBOXES[@]}" "foobad" "baz" "INBOX"
+doveadm -u "local" mailbox create --no-userdb-lookup -- "${MAILBOXES[@]}" "foobad" "baz" "INBOX"
for ((i = 0; i < 32; i++)); do
m="$(shuf -n1 -e -- "${MAILBOXES[@]}" "foobad" "baz" "INBOX")"
sample_message | deliver -u "local" -- -m "$m"
diff --git a/tests/list-reference/t b/tests/list-reference/t
index 12e112b..e8d38e6 100644
--- a/tests/list-reference/t
+++ b/tests/list-reference/t
@@ -1,6 +1,6 @@
# create and populate some mailboxes in and out the respective list references
-doveadm -u "local" mailbox create "foo" "foobar" "foo/bar/baz" "foo/baz" "bar" "bar/baz"
-doveadm -u "remote" mailbox create "foo" "foobaz" "foo/baz" "foo\\baz" "bar\\baz" "bar\\!"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo" "foobar" "foo/bar/baz" "foo/baz" "bar" "bar/baz"
+doveadm -u "remote" mailbox create --no-userdb-lookup "foo" "foobaz" "foo\\bar" "foo\\baz" "bar\\baz" "bar\\!"
populate() {
local i
@@ -8,7 +8,7 @@ populate() {
m="$(shuf -n1 -e -- "foo" "foobar" "foo/bar/baz" "foo/baz" "bar" "bar/baz")"
sample_message | deliver -u "local" -- -m "$m"
- m="$(shuf -n1 -e -- "foo" "foobar" "foo/baz" "foo\\baz" "bar\\baz" "bar\\!")"
+ m="$(shuf -n1 -e -- "foo" "foobaz" "foo\\bar" "foo\\baz" "bar\\baz" "bar\\!")"
sample_message | deliver -u "remote" -- -m "$m"
done
}
diff --git a/tests/list-select-opts/t b/tests/list-select-opts/t
index 30c3fe9..570098c 100644
--- a/tests/list-select-opts/t
+++ b/tests/list-select-opts/t
@@ -1,5 +1,5 @@
-doveadm -u "local" mailbox create -s "INBOX" "foo.bar"
-doveadm -u "remote" mailbox create -s "INBOX" "bar"
+doveadm -u "local" mailbox create --no-userdb-lookup -s "INBOX" "foo.bar"
+doveadm -u "remote" mailbox create --no-userdb-lookup -s "INBOX" "bar"
interimap_init
check_mailbox_list
@@ -15,8 +15,8 @@ for ((i = 0; i < 16; i++)); do
done
# create new unsubscribed mailboxes
-doveadm -u "local" mailbox create "foo"
-doveadm -u "remote" mailbox create "baz"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo"
+doveadm -u "remote" mailbox create --no-userdb-lookup "baz"
for ((i = 0; i < 8; i++)); do
u="$(shuf -n1 -e "local" "remote")" # choose target at random
@@ -37,12 +37,12 @@ diff -u --label="a/mailboxes.sql" --label="b/mailboxes.sql" \
check_mailboxes_status "INBOX" "foo.bar" "bar"
# double check the unsubscribed mailboxes weren't copied
-! doveadm -u "remote" mailbox status uidvalidity "foo" || error
-! doveadm -u "local" mailbox status uidvalidity "baz" || error
+! doveadm -u "remote" mailbox status --no-userdb-lookup uidvalidity "foo" || error
+! doveadm -u "local" mailbox status --no-userdb-lookup uidvalidity "baz" || error
# reconcile when subcribed
-doveadm -u "local" mailbox subscribe "foo"
-doveadm -u "remote" mailbox subscribe "baz"
+doveadm -u "local" mailbox subscribe --no-userdb-lookup "foo"
+doveadm -u "remote" mailbox subscribe --no-userdb-lookup "baz"
interimap || error
grep -Fx "database: Created mailbox foo" <"$STDERR" || error
diff --git a/tests/pullimap/t b/tests/pullimap/t
index e508784..1c57f8d 100644
--- a/tests/pullimap/t
+++ b/tests/pullimap/t
@@ -30,8 +30,8 @@ list_mails_sha256() {
local u="$1" guid uid
local fields="body date.sent imap.bodystructure imap.envelope"
while read guid uid; do
- doveadm -u "$u" -f "flow" fetch "$fields" mailbox-guid "$guid" uid "$uid" | sha256sum
- done < <(doveadm -u "$u" search mailbox "$MAILBOX") | sort -f
+ doveadm -u "$u" -f "flow" fetch --no-userdb-lookup "$fields" mailbox-guid "$guid" uid "$uid" | sha256sum
+ done < <(doveadm -u "$u" search mailbox --no-userdb-lookup "$MAILBOX") | sort -f
}
check() {
diff -u --label="local/mails" --label="remote/mails" \
@@ -91,7 +91,7 @@ step_done
# make sure remote UIDs are 11-bytes long
-doveadm -u "remote" mailbox update --min-next-uid 1000000000 "$MAILBOX"
+doveadm -u "remote" mailbox update --no-userdb-lookup --min-next-uid 1000000000 "$MAILBOX"
# Add some messages and sync
step_start "Fetching messages"
@@ -109,7 +109,7 @@ for ((i = 0; i < N; i+=2)); do
done
for ((i = 0; i < N; i+=2)); do
# expunge every other message
- doveadm -u "remote" expunge mailbox "$MAILBOX" $((N-i+32+7))
+ doveadm -u "remote" expunge --no-userdb-lookup mailbox "$MAILBOX" $((N-i+32+7))
sample_message | deliver -u "remote" -- -m "$MAILBOX"
done
@@ -117,7 +117,7 @@ pullimap "remote" || error
check
# count unseen remote messages
-doveadm -u "remote" search mailbox "$MAILBOX" unseen >"$TMPDIR/unseen"
+doveadm -u "remote" search --no-userdb-lookup mailbox "$MAILBOX" unseen >"$TMPDIR/unseen"
[ ! -s "$TMPDIR/unseen" ] || error "\\Unseen messages left"
step_done
@@ -156,7 +156,7 @@ for ((i = 0; i < 32; i++)); do
done
pullimap "remote"
-doveadm -u "remote" search mailbox "$MAILBOX" all >"$TMPDIR/messages"
+doveadm -u "remote" search --no-userdb-lookup mailbox "$MAILBOX" all >"$TMPDIR/messages"
[ ! -s "$TMPDIR/messages" ] || error "messages left"
step_done
diff --git a/tests/rename-exists-db/t b/tests/rename-exists-db/t
index 63d7ba0..2ee8d77 100644
--- a/tests/rename-exists-db/t
+++ b/tests/rename-exists-db/t
@@ -1,12 +1,12 @@
-doveadm -u "local" mailbox create "root.from" "root.from.child" "t.o"
-doveadm -u "remote" mailbox create "root\\from" "root\\from\\child" "t\\o"
+doveadm -u "local" mailbox create --no-userdb-lookup "root.from" "root.from.child" "t.o"
+doveadm -u "remote" mailbox create --no-userdb-lookup "root\\from" "root\\from\\child" "t\\o"
interimap_init
check_mailbox_list
# delete a mailbox on both servers but leave it in the database, then try to use it as target for --rename
-doveadm -u "local" mailbox delete "t.o"
-doveadm -u "remote" mailbox delete "t\\o"
+doveadm -u "local" mailbox delete --no-userdb-lookup "t.o"
+doveadm -u "remote" mailbox delete --no-userdb-lookup "t\\o"
! interimap --rename "root.from" "t.o" || error
grep -Fx 'database: ERROR: Mailbox t.o exists. Run `interimap --target=database --delete t.o` to delete.' <"$STDERR" || error
diff --git a/tests/rename-exists-local/t b/tests/rename-exists-local/t
index 33c7da7..907b14a 100644
--- a/tests/rename-exists-local/t
+++ b/tests/rename-exists-local/t
@@ -1,11 +1,11 @@
-doveadm -u "local" mailbox create "root.from" "root.from.child" "t.o"
-doveadm -u "remote" mailbox create "root\\from" "root\\from\\child"
+doveadm -u "local" mailbox create --no-userdb-lookup "root.from" "root.from.child" "t.o"
+doveadm -u "remote" mailbox create --no-userdb-lookup "root\\from" "root\\from\\child"
interimap_init
check_mailbox_list
# delete a mailbox on the remote server, then try to use it as target for --rename
-doveadm -u "remote" mailbox delete "t\\o"
+doveadm -u "remote" mailbox delete --no-userdb-lookup "t\\o"
! interimap --rename "root.from" "t.o" || error
grep -Fx 'local: ERROR: Mailbox t.o exists. Run `interimap --target=local --delete t.o` to delete.' <"$STDERR" || error
diff --git a/tests/rename-exists-remote/t b/tests/rename-exists-remote/t
index 2e87053..5cb4336 100644
--- a/tests/rename-exists-remote/t
+++ b/tests/rename-exists-remote/t
@@ -1,11 +1,11 @@
-doveadm -u "local" mailbox create "root.from" "root.from.child" "t.o"
-doveadm -u "remote" mailbox create "root\\from" "root\\from\\child" "t\\o"
+doveadm -u "local" mailbox create --no-userdb-lookup "root.from" "root.from.child" "t.o"
+doveadm -u "remote" mailbox create --no-userdb-lookup "root\\from" "root\\from\\child" "t\\o"
interimap_init
check_mailbox_list
# delete a mailbox on the local server, then try to use it as target for --rename
-doveadm -u "local" mailbox delete "t.o"
+doveadm -u "local" mailbox delete --no-userdb-lookup "t.o"
! interimap --rename "root.from" "t.o" || error
grep -Fx 'remote: ERROR: Mailbox t\o exists. Run `interimap --target=remote --delete t.o` to delete.' <"$STDERR" || remote
diff --git a/tests/rename-inferiors/t b/tests/rename-inferiors/t
index 9166230..3715680 100644
--- a/tests/rename-inferiors/t
+++ b/tests/rename-inferiors/t
@@ -1,5 +1,5 @@
-doveadm -u "local" mailbox create "root.from" "root.from.child" "root.from.child2" "root.from.child.grandchild"
-doveadm -u "remote" mailbox create "root^sibbling" "root^sibbling^grandchild" "root2"
+doveadm -u "local" mailbox create --no-userdb-lookup "root.from" "root.from.child" "root.from.child2" "root.from.child.grandchild"
+doveadm -u "remote" mailbox create --no-userdb-lookup "root^sibbling" "root^sibbling^grandchild" "root2"
for m in "root.from" "root.from.child" "root.from.child2" "root.from.child.grandchild" "INBOX"; do
sample_message | deliver -u "local" -- -m "$m"
diff --git a/tests/rename-simple/t b/tests/rename-simple/t
index df9d84c..82682fb 100644
--- a/tests/rename-simple/t
+++ b/tests/rename-simple/t
@@ -1,4 +1,4 @@
-doveadm -u "local" mailbox create "foo"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo"
sample_message | deliver -u "local" -- -m "INBOX"
sample_message | deliver -u "remote" -- -m "INBOX"
diff --git a/tests/repair/t b/tests/repair/t
index 10fab0d..bdad2e3 100644
--- a/tests/repair/t
+++ b/tests/repair/t
@@ -1,6 +1,6 @@
# create some mailboxes and populate them
-doveadm -u "local" mailbox create "foo.bar"
-doveadm -u "remote" mailbox create "foo~bar" "baz"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo.bar"
+doveadm -u "remote" mailbox create --no-userdb-lookup "foo~bar" "baz"
for ((i = 0; i < 8; i++)); do
sample_message | deliver -u "local" -- -m "foo.bar"
sample_message | deliver -u "remote" -- -m "foo~bar"
@@ -15,12 +15,12 @@ check_mailboxes_status "foo.bar" "baz" "INBOX"
# make more changes (flag updates, new massages, deletions)
sample_message | deliver -u "remote" -- -m "INBOX"
-doveadm -u "local" expunge mailbox "baz" 1:10
-doveadm -u "remote" expunge mailbox "baz" "$(seq -s"," 1 2 32),$(seq -s"," 40 2 64)"
-doveadm -u "local" expunge mailbox "foo.bar" 2,3,5:7,10
-doveadm -u "remote" expunge mailbox "foo~bar" 4,5,7,10
-doveadm -u "local" flags add "\\Answered" mailbox "foo.bar" 2,3,5:7,10
-doveadm -u "remote" flags add "\\Seen" mailbox "foo~bar" 4,5,7
+doveadm -u "local" expunge --no-userdb-lookup mailbox "baz" 1:10
+doveadm -u "remote" expunge --no-userdb-lookup mailbox "baz" "$(seq -s"," 1 2 32),$(seq -s"," 40 2 64)"
+doveadm -u "local" expunge --no-userdb-lookup mailbox "foo.bar" 2,3,5:7,10
+doveadm -u "remote" expunge --no-userdb-lookup mailbox "foo~bar" 4,5,7,10
+doveadm -u "local" flags add --no-userdb-lookup "\\Answered" mailbox "foo.bar" 2,3,5:7,10
+doveadm -u "remote" flags add --no-userdb-lookup "\\Seen" mailbox "foo~bar" 4,5,7
# spoof HIGHESTMODSEQ value in the database to make it look that we recorded the new changes already
spoof() {
@@ -28,7 +28,7 @@ spoof() {
shift
while [ $# -gt 0 ]; do
[ "$1" = "local" ] && m="foo.bar" || m="$(printf "%s" "foo.bar" | tr "." "~")"
- v="$(doveadm -u "$1" -f flow mailbox status "${k,,[A-Z]}" "$m" | sed 's/.*=//')"
+ v="$(doveadm -u "$1" -f flow mailbox status --no-userdb-lookup "${k,,[A-Z]}" "$m" | sed 's/.*=//')"
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" <<-EOF
UPDATE \`$1\` SET $k = $v
WHERE idx = (SELECT idx FROM mailboxes WHERE mailbox = x'$hex');
@@ -41,8 +41,8 @@ spoof HIGHESTMODSEQ "local" "remote"
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/dump.sql" <<-EOF
.dump
EOF
-doveadm -u "local" mailbox status "all" "foo.bar" >"$TMPDIR/foo-bar.status.local"
-doveadm -u "remote" mailbox status "all" "foo~bar" >"$TMPDIR/foo-bar.status.remote"
+doveadm -u "local" mailbox status --no-userdb-lookup "all" "foo.bar" >"$TMPDIR/foo-bar.status.local"
+doveadm -u "remote" mailbox status --no-userdb-lookup "all" "foo~bar" >"$TMPDIR/foo-bar.status.remote"
# verify that without --repair interimap does nothing due to the spoofed HIGHESTMODSEQ values
@@ -51,8 +51,8 @@ interimap "foo.bar" || error
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/dump2.sql" <<-EOF
.dump
EOF
-doveadm -u "local" mailbox status all "foo.bar" >"$TMPDIR/foo-bar.status2.local"
-doveadm -u "remote" mailbox status all "foo~bar" >"$TMPDIR/foo-bar.status2.remote"
+doveadm -u "local" mailbox status --no-userdb-lookup all "foo.bar" >"$TMPDIR/foo-bar.status2.local"
+doveadm -u "remote" mailbox status --no-userdb-lookup all "foo~bar" >"$TMPDIR/foo-bar.status2.remote"
diff -u --label="a/dump.sql" --label="b/dump.sql" "$TMPDIR/dump.sql" "$TMPDIR/dump2.sql"
diff -u --label="a/foo_bar.local" --label="a/foo_bar.local" "$TMPDIR/foo-bar.status.local" "$TMPDIR/foo-bar.status2.local"
diff -u --label="a/foo_bar.remote" --label="a/foo_bar.remote" "$TMPDIR/foo-bar.status.remote" "$TMPDIR/foo-bar.status2.remote"
diff --git a/tests/resume/t b/tests/resume/t
index d7b9b53..da80557 100644
--- a/tests/resume/t
+++ b/tests/resume/t
@@ -1,5 +1,5 @@
# create and populate a bunch of mailboxes
-doveadm -u "local" mailbox create "foo" "foo.bar" "baz"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo" "foo.bar" "baz"
for ((i = 0; i < 8; i++)); do
sample_message | deliver -u "local" -- -m "foo"
sample_message | deliver -u "local" -- -m "foo.bar"
@@ -24,17 +24,17 @@ set_uidnext() {
}
# spoof "foo"'s UIDVALIDITY and UIDNEXT values
-uidvalidity="$(doveadm -u "local" -f flow mailbox status uidvalidity "foo" | sed 's/.*=//')"
+uidvalidity="$(doveadm -u "local" -f flow mailbox status --no-userdb-lookup uidvalidity "foo" | sed 's/.*=//')"
[ $uidvalidity -eq 4294967295 ] && uidvalidity2=1 || uidvalidity2=$((uidvalidity+1))
-doveadm -u "local" mailbox update --uid-validity "$uidvalidity2" "foo"
+doveadm -u "local" mailbox update --no-userdb-lookup --uid-validity "$uidvalidity2" "foo"
set_uidnext "local" "$(printf "%s" "foo" | xxd -ps)" 1
# verify that interimap chokes on the UIDVALIDITY change without doing any changes
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/dump.sql" <<-EOF
.dump
EOF
-doveadm -u "local" mailbox status "all" "foo" >"$TMPDIR/foo.local"
-doveadm -u "remote" mailbox status "all" "foo" >"$TMPDIR/foo.remote"
+doveadm -u "local" mailbox status --no-userdb-lookup "all" "foo" >"$TMPDIR/foo.local"
+doveadm -u "remote" mailbox status --no-userdb-lookup "all" "foo" >"$TMPDIR/foo.remote"
! interimap || error
grep -Fx "Resuming interrupted sync for foo" <"$STDERR"
@@ -43,8 +43,8 @@ grep -Fx "local(foo): ERROR: UIDVALIDITY changed! ($uidvalidity2 != $uidvalidity
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/dump2.sql" <<-EOF
.dump
EOF
-doveadm -u "local" mailbox status "all" "foo" >"$TMPDIR/foo.local2"
-doveadm -u "remote" mailbox status "all" "foo" >"$TMPDIR/foo.remote2"
+doveadm -u "local" mailbox status --no-userdb-lookup "all" "foo" >"$TMPDIR/foo.local2"
+doveadm -u "remote" mailbox status --no-userdb-lookup "all" "foo" >"$TMPDIR/foo.remote2"
diff -u --label="a/dump.sql" --label="b/dump.sql" "$TMPDIR/dump2.sql" "$TMPDIR/dump.sql"
diff -u --label="a/foo.local" --label="b/foo.remote" "$TMPDIR/foo.local" "$TMPDIR/foo.local2"
@@ -57,12 +57,12 @@ set_uidnext "remote" "$(printf "%s" "INBOX" | xxd -ps)" 2
set_uidnext "remote" "$(printf "%s\\0%s" "foo" "bar" | xxd -ps)" 0
# set some flags and remove some messages for UIDs >2
-doveadm -u "local" flags add "\\Seen" mailbox "INBOX" 6,7
-doveadm -u "remote" flags add "\\Deleted" mailbox "INBOX" 6,8
+doveadm -u "local" flags add --no-userdb-lookup "\\Seen" mailbox "INBOX" 6,7
+doveadm -u "remote" flags add --no-userdb-lookup "\\Deleted" mailbox "INBOX" 6,8
-doveadm -u "local" expunge mailbox "INBOX" 4,5
-doveadm -u "remote" expunge mailbox "INBOX" 3,4
-doveadm -u "remote" expunge mailbox "foo~bar" 5
+doveadm -u "local" expunge --no-userdb-lookup mailbox "INBOX" 4,5
+doveadm -u "remote" expunge --no-userdb-lookup mailbox "INBOX" 3,4
+doveadm -u "remote" expunge --no-userdb-lookup mailbox "foo~bar" 5
# add new messages
sample_message | deliver -u "local" -- -m "foo.bar"
diff --git a/tests/run b/tests/run
index eed77df..c5614ee 100755
--- a/tests/run
+++ b/tests/run
@@ -97,9 +97,12 @@ prepare() {
mkdir -pm0700 -- "$home/.dovecot"
cat >"$home/.dovecot/config" <<-EOF
+ dovecot_config_version = 2.4.0
+ dovecot_storage_version = 2.4.0
log_path = $HOME_local/mail.log
mail_home = $home
- mail_location = dbox:~/inbox:LAYOUT=index
+ mail_driver = sdbox
+ mail_path = ~/inbox
mailbox_list_index = yes
ssl = no
listen = 127.0.0.1, 127.0.1.1, ::1
@@ -116,7 +119,9 @@ prepare() {
proto="$(env -i "${ENVIRON[@]}" doveconf -c "$home/.dovecot/config" -h protocols)"
if [ -n "$proto" ]; then
cat >>"$home/.dovecot/config" <<-EOF
- # https://wiki.dovecot.org/HowTo/Rootless
+ # https://doc.dovecot.org/latest/core/config/rootless.html#rootless-installation
+ dovecot_config_version = 2.4.0
+ dovecot_storage_version = 2.4.0
base_dir = $home/.dovecot/run
default_internal_user = $(id -un)
default_internal_group = $(id -gn)
@@ -132,13 +137,14 @@ prepare() {
chroot =
}
- passdb {
- args = scheme=PLAIN username_format=%u $home/.dovecot/users
+ passdb passwd-file {
driver = passwd-file
+ default_password_scheme = plain
+ passwd_file_path = $home/.dovecot/users
}
- userdb {
- args = username_format=%u $home/.dovecot/users
+ userdb passwd-file {
driver = passwd-file
+ passwd_file_path = $home/.dovecot/users
}
EOF
@@ -352,9 +358,9 @@ check_mailbox_status2() {
check_mailbox_status_values "$u" "$rmailbox" $rUIDVALIDITY $rUIDNEXT $rHIGHESTMODSEQ $MESSAGES
local a b
- a="$(doveadm -u "local" -f "flow" mailbox status "messages unseen vsize" -- "$lmailbox" | \
+ a="$(doveadm -u "local" -f "flow" mailbox status --no-userdb-lookup "messages unseen vsize" -- "$lmailbox" | \
sed -nr '/.*\s+(\w+=[0-9]+\s+\w+=[0-9]+\s+\w+=[0-9]+)$/ {s//\1/p;q}')"
- b="$(doveadm -u "$u" -f "flow" mailbox status "messages unseen vsize" -- "$rmailbox" | \
+ b="$(doveadm -u "$u" -f "flow" mailbox status --no-userdb-lookup "messages unseen vsize" -- "$rmailbox" | \
sed -nr '/.*\s+(\w+=[0-9]+\s+\w+=[0-9]+\s+\w+=[0-9]+)$/ {s//\1/p;q}')"
if [ "$a" != "$b" ]; then
echo "Mailbox $lmailbox status differs: \"$a\" != \"$b\"" >&2
@@ -363,7 +369,7 @@ check_mailbox_status2() {
}
check_mailbox_status_values() {
local user="$1" mailbox="$2" UIDVALIDITY="$3" UIDNEXT="$4" HIGHESTMODSEQ="$5" MESSAGES="$6" x xs v k
- xs="$(doveadm -u "$user" -f "flow" mailbox status "uidvalidity uidnext highestmodseq messages" -- "$mailbox" | \
+ xs="$(doveadm -u "$user" -f "flow" mailbox status --no-userdb-lookup "uidvalidity uidnext highestmodseq messages" -- "$mailbox" | \
sed -nr '/.*\s+(\w+=[0-9]+\s+\w+=[0-9]+\s+\w+=[0-9]+\s+\w+=[0-9]+)$/ {s//\1/p;q}')"
[ -n "$xs" ] || exit 1
for x in $xs; do
@@ -411,12 +417,12 @@ check_mailbox_list() {
done
fi
- mapfile -t lmailboxes < <( doveadm -u "local" mailbox list $sub -- "${lmailboxes[@]}" )
+ mapfile -t lmailboxes < <( doveadm -u "local" mailbox list --no-userdb-lookup $sub -- "${lmailboxes[@]}" )
for ((i = 0; i < ${#lmailboxes[@]}; i++)); do
lmailboxes[i]="${lmailboxes[i]#"$lprefix"}"
done
- mapfile -t rmailboxes < <( doveadm -u "remote" mailbox list $sub -- "${rmailboxes[@]}" )
+ mapfile -t rmailboxes < <( doveadm -u "remote" mailbox list --no-userdb-lookup $sub -- "${rmailboxes[@]}" )
for ((i = 0; i < ${#rmailboxes[@]}; i++)); do
rmailboxes[i]="${rmailboxes[i]#"$rprefix"}"
rmailboxes[i]="${rmailboxes[i]//"$rsep"/"$lsep"}"
diff --git a/tests/split-set/t b/tests/split-set/t
index d8cf948..7e124e3 100644
--- a/tests/split-set/t
+++ b/tests/split-set/t
@@ -7,8 +7,8 @@ N=2048
# set UIDNEXT to 10^9 so all uids are 10 chars long, otherwise we'd need
# to add many more messages to obtain large sets
-doveadm -u "local" mailbox update --min-next-uid 1000000000 "INBOX"
-doveadm -u "remote" mailbox update --min-next-uid 1000000000 "INBOX"
+doveadm -u "local" mailbox update --no-userdb-lookup --min-next-uid 1000000000 "INBOX"
+doveadm -u "remote" mailbox update --no-userdb-lookup --min-next-uid 1000000000 "INBOX"
for ((i = 0; i < N; i++)); do
u="$(shuf -n1 -e "local" "remote")"
@@ -20,7 +20,7 @@ check_mailbox_status "INBOX"
# mark every other message as \Seen on the local server
for ((i = 0; i < N; i+=2)); do
- doveadm -u "local" flags add "\\Seen" mailbox "INBOX" $((N-i))
+ doveadm -u "local" flags add --no-userdb-lookup "\\Seen" mailbox "INBOX" $((N-i))
done
# send the changes to the remote; this results into an UID STORE set
@@ -31,7 +31,7 @@ check_mailbox_status "INBOX"
# now expunge every other message on the remote server; this results
# into large UID STORE and UID EXPUNGE set representation
for ((i = 0; i < N; i+=2)); do
- doveadm -u "local" expunge mailbox "INBOX" $((N-i))
+ doveadm -u "local" expunge --no-userdb-lookup mailbox "INBOX" $((N-i))
# add some more messages
u="$(shuf -n1 -e "local" "remote")"
sample_message | deliver -u "$u"
diff --git a/tests/starttls-injection/remote.conf b/tests/starttls-injection/remote.conf
index f23f3de..340a484 100644
--- a/tests/starttls-injection/remote.conf
+++ b/tests/starttls-injection/remote.conf
@@ -1,4 +1,6 @@
-protocols = $protocols imap
+protocols {
+ imap = yes
+}
service imap-login {
inet_listener imap {
port = 0
diff --git a/tests/starttls-logindisabled/remote.conf b/tests/starttls-logindisabled/remote.conf
index be2d51e..86e033a 100644
--- a/tests/starttls-logindisabled/remote.conf
+++ b/tests/starttls-logindisabled/remote.conf
@@ -2,4 +2,6 @@
!include conf.d/ssl.conf
# trick dovecot into treating local connections as insecure
-imap_capability = +LOGINDISABLED
+imap_capability {
+ LOGINDISABLED = yes
+}
diff --git a/tests/starttls/t b/tests/starttls/t
index 7b76469..633997c 100644
--- a/tests/starttls/t
+++ b/tests/starttls/t
@@ -1,5 +1,5 @@
-X509_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \
- | openssl x509 -in /dev/stdin -noout -fingerprint -sha256 \
+ssl_server_cert_file="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_server/cert_file)"
+X509_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -noout -fingerprint -sha256 \
| sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]")"
for ((i = 0; i < 32; i++)); do
diff --git a/tests/sync-live-multi/local.conf b/tests/sync-live-multi/local.conf
index baae39d..6d64a84 100644
--- a/tests/sync-live-multi/local.conf
+++ b/tests/sync-live-multi/local.conf
@@ -1,30 +1,34 @@
namespace inbox {
- separator = /
- location = dbox:~/inbox:LAYOUT=index
- inbox = yes
- list = yes
+ separator = /
+ mail_driver = sdbox
+ mail_path = ~/inbox
+ inbox = yes
+ list = yes
}
namespace foo {
- separator = /
- prefix = foo/
- location = dbox:~/foo:LAYOUT=index
- inbox = no
- list = yes
+ separator = /
+ prefix = foo/
+ mail_driver = sdbox
+ mail_path = ~/foo
+ inbox = no
+ list = yes
}
namespace bar {
- separator = /
- prefix = bar/
- location = dbox:~/bar:LAYOUT=index
- inbox = no
- list = yes
+ separator = /
+ prefix = bar/
+ mail_driver = sdbox
+ mail_path = ~/bar
+ inbox = no
+ list = yes
}
namespace baz {
separator = /
- prefix = baz/
- location = dbox:~/baz:LAYOUT=index
- inbox = no
- list = yes
+ prefix = baz/
+ mail_driver = sdbox
+ mail_path = ~/baz
+ inbox = no
+ list = yes
}
diff --git a/tests/sync-live-multi/t b/tests/sync-live-multi/t
index b91cedc..5a651f5 100644
--- a/tests/sync-live-multi/t
+++ b/tests/sync-live-multi/t
@@ -49,15 +49,15 @@ while [ $(date +%s) -le $timer ]; do
remote3) m="${m//\//\?}";;
*) error "Uh?";;
esac
- doveadm -u "$u" mailbox create -- "$m"
+ doveadm -u "$u" mailbox create --no-userdb-lookup -- "$m"
fi
# EXPUNGE some messages
u="$(shuf -n1 -e -- "${TARGETS[@]}")" # choose target at random
n="$(shuf -n1 -i0-3)"
while read guid uid; do
- doveadm -u "$u" expunge mailbox-guid "$guid" uid "$uid"
- done < <(doveadm -u "$u" search all | shuf -n "$n")
+ doveadm -u "$u" expunge --no-userdb-lookup mailbox-guid "$guid" uid "$uid"
+ done < <(doveadm -u "$u" search --no-userdb-lookup all | shuf -n "$n")
# mark some existing messages as read (toggle \Seen flag as unlike other
# flags it's easier to query and check_mailboxes_status checks it)
@@ -65,8 +65,8 @@ while [ $(date +%s) -le $timer ]; do
n="$(shuf -n1 -i0-9)"
while read guid uid; do
a="$(shuf -n1 -e add remove replace)"
- doveadm -u "$u" flags "$a" "\\Seen" mailbox-guid "$guid" uid "$uid"
- done < <(doveadm -u "$u" search all | shuf -n "$n")
+ doveadm -u "$u" flags "$a" --no-userdb-lookup "\\Seen" mailbox-guid "$guid" uid "$uid"
+ done < <(doveadm -u "$u" search --no-userdb-lookup all | shuf -n "$n")
# select at random a mailbox where to deliver some messages
u="$(shuf -n1 -e "local" "remote")" # choose target at random
@@ -103,14 +103,14 @@ trap - EXIT INT TERM
# check that the mailbox lists match
diff -u --label="local/mailboxes" --label="remote1/mailboxes" \
- <( doveadm -u "local" mailbox list | sed -n "s,^foo/,,p" | sort ) \
- <( doveadm -u "remote1" mailbox list | tr '^' '/' | sort )
+ <( doveadm -u "local" mailbox list --no-userdb-lookup | sed -n "s,^foo/,,p" | sort ) \
+ <( doveadm -u "remote1" mailbox list --no-userdb-lookup | tr '^' '/' | sort )
diff -u --label="local/mailboxes" --label="remote2/mailboxes" \
- <( doveadm -u "local" mailbox list | sed -n "s,^bar/,,p" | sort ) \
- <( doveadm -u "remote2" mailbox list | tr '\\' '/' | sort )
+ <( doveadm -u "local" mailbox list --no-userdb-lookup | sed -n "s,^bar/,,p" | sort ) \
+ <( doveadm -u "remote2" mailbox list --no-userdb-lookup | tr '\\' '/' | sort )
diff -u --label="local/mailboxes" --label="remote3/mailboxes" \
- <( doveadm -u "local" mailbox list | sed -n "s,^baz/,,p" | sort ) \
- <( doveadm -u "remote3" mailbox list | tr '?' '/' | sort )
+ <( doveadm -u "local" mailbox list --no-userdb-lookup | sed -n "s,^baz/,,p" | sort ) \
+ <( doveadm -u "remote3" mailbox list --no-userdb-lookup | tr '?' '/' | sort )
for m in "${MAILBOXES[@]}"; do
case "$m" in
diff --git a/tests/sync-live/t b/tests/sync-live/t
index 1d50b00..9b2074b 100644
--- a/tests/sync-live/t
+++ b/tests/sync-live/t
@@ -26,15 +26,15 @@ while [ $(date +%s) -le $timer ]; do
MAILBOXES+=( "$m" )
u="$(shuf -n1 -e "local" "remote")" # choose target at random
[ "$u" = "local" ] || m="${m//./^}"
- doveadm -u "$u" mailbox create -- "$m"
+ doveadm -u "$u" mailbox create --no-userdb-lookup -- "$m"
fi
# EXPUNGE some messages
u="$(shuf -n1 -e "local" "remote")" # choose target at random
n="$(shuf -n1 -i0-3)"
while read guid uid; do
- doveadm -u "$u" expunge mailbox-guid "$guid" uid "$uid"
- done < <(doveadm -u "$u" search all | shuf -n "$n")
+ doveadm -u "$u" expunge --no-userdb-lookup mailbox-guid "$guid" uid "$uid"
+ done < <(doveadm -u "$u" search --no-userdb-lookup all | shuf -n "$n")
# mark some existing messages as read (toggle \Seen flag as unlike other
# flags it's easier to query and check_mailboxes_status checks it)
@@ -42,8 +42,8 @@ while [ $(date +%s) -le $timer ]; do
n="$(shuf -n1 -i0-9)"
while read guid uid; do
a="$(shuf -n1 -e add remove replace)"
- doveadm -u "$u" flags "$a" "\\Seen" mailbox-guid "$guid" uid "$uid"
- done < <(doveadm -u "$u" search all | shuf -n "$n")
+ doveadm -u "$u" flags "$a" --no-userdb-lookup "\\Seen" mailbox-guid "$guid" uid "$uid"
+ done < <(doveadm -u "$u" search --no-userdb-lookup all | shuf -n "$n")
# select at random a mailbox where to deliver some messages
u="$(shuf -n1 -e "local" "remote")" # choose target at random
diff --git a/tests/sync-mailbox-list/t b/tests/sync-mailbox-list/t
index d1567fb..ba533f0 100644
--- a/tests/sync-mailbox-list/t
+++ b/tests/sync-mailbox-list/t
@@ -4,10 +4,10 @@
# baz: present on both, subscribed to remote only
# foo.bar: present on local only
# foo.baz: present on remote only
-doveadm -u "local" mailbox create "foo" "bar" "baz" "foo.bar" "fo!o [b*a%r]"
-doveadm -u "local" mailbox subscribe "foo" "bar"
-doveadm -u "remote" mailbox create "foo" "bar" "baz" "foo~baz" "foo]bar"
-doveadm -u "remote" mailbox subscribe "foo" "baz"
+doveadm -u "local" mailbox create --no-userdb-lookup "foo" "bar" "baz" "foo.bar" "fo!o [b*a%r]"
+doveadm -u "local" mailbox subscribe --no-userdb-lookup "foo" "bar"
+doveadm -u "remote" mailbox create --no-userdb-lookup "foo" "bar" "baz" "foo~baz" "foo]bar"
+doveadm -u "remote" mailbox subscribe --no-userdb-lookup "foo" "baz"
populate() {
local i
@@ -45,7 +45,7 @@ step_start "aborts if present in database"
for u in "local" "remote"; do
[ "$u" = "local" ] && { m="foo.bar"; m2="$m"; } || { m="foo.baz"; m2="foo~baz"; }
- doveadm -u "$u" mailbox delete "$m2"
+ doveadm -u "$u" mailbox delete --no-userdb-lookup "$m2"
! interimap || error
grep -Fx "database: ERROR: Mailbox $m exists. Run \`interimap --target=database --delete $m\` to delete." <"$STDERR"
@@ -64,10 +64,10 @@ step_done
# (un)subscribe from some mailboxes, including a non-existent one
step_start "new (un)subscribtions"
-doveadm -u "local" mailbox unsubscribe "foo"
-doveadm -u "remote" mailbox unsubscribe "bar"
-doveadm -u "local" mailbox subscribe "foo.bar" "foo.nonexistent" "foo.baz"
-doveadm -u "remote" mailbox subscribe "foo~bar" "bar~nonexistent"
+doveadm -u "local" mailbox unsubscribe --no-userdb-lookup "foo"
+doveadm -u "remote" mailbox unsubscribe --no-userdb-lookup "bar"
+doveadm -u "local" mailbox subscribe --no-userdb-lookup "foo.bar" "foo.nonexistent" "foo.baz"
+doveadm -u "remote" mailbox subscribe --no-userdb-lookup "foo~bar" "bar~nonexistent"
populate
interimap
@@ -75,7 +75,7 @@ grep -Fx "remote: Unsubscribe to foo" <"$STDERR"
grep -Fx "local: Unsubscribe to bar" <"$STDERR"
grep -Fx "remote: Subscribe to foo~baz" <"$STDERR"
verify
-check_mailbox_list -s $(doveadm -u "local" mailbox list) # exclude "foo.nonexistent" and "bar~nonexistent"
+check_mailbox_list -s $(doveadm -u "local" mailbox list --no-userdb-lookup) # exclude "foo.nonexistent" and "bar~nonexistent"
# check that "baz", "foo.bar" and "foo.baz" are the only subscribed mailboxes
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/count" <<-EOF
diff --git a/tests/tls-pin-fingerprint/t b/tests/tls-pin-fingerprint/t
index 6c045a1..679eaa4 100644
--- a/tests/tls-pin-fingerprint/t
+++ b/tests/tls-pin-fingerprint/t
@@ -1,5 +1,5 @@
-PKEY_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \
- | openssl x509 -in /dev/stdin -pubkey \
+ssl_server_cert_file="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_server/cert_file)"
+PKEY_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -pubkey \
| openssl pkey -in /dev/stdin -pubin -outform DER \
| openssl dgst -sha256 | sed -rn "/^.*=\\s*/ {s///p;q}")"
INVALID_FPR="sha256\$deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
diff --git a/tests/tls-rsa+ecdsa/remote.conf b/tests/tls-rsa+ecdsa/remote.conf
index 72ca135..c0f2ff3 100644
--- a/tests/tls-rsa+ecdsa/remote.conf
+++ b/tests/tls-rsa+ecdsa/remote.conf
@@ -1,5 +1,5 @@
!include conf.d/imapd.conf
!include conf.d/ssl.conf
-ssl_alt_cert = <conf.d/dovecot.ecdsa.crt
-ssl_alt_key = <conf.d/dovecot.ecdsa.key
+ssl_server_alt_cert_file = conf.d/dovecot.ecdsa.crt
+ssl_server_alt_key_file = conf.d/dovecot.ecdsa.key
diff --git a/tests/tls-rsa+ecdsa/t b/tests/tls-rsa+ecdsa/t
index 16ec9d9..789d9e6 100644
--- a/tests/tls-rsa+ecdsa/t
+++ b/tests/tls-rsa+ecdsa/t
@@ -1,5 +1,7 @@
doveconf_remote() {
- doveconf -c "$HOME_remote/.dovecot/config" -hx "$1"
+ local p k="$1"
+ p="$(doveconf -c "$HOME_remote/.dovecot/config" -hx "$1")"
+ cat <"$p"
}
pkey_sha256() {
openssl x509 -in /dev/stdin -pubkey \
@@ -11,10 +13,10 @@ x509_sha256() {
| sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]"
}
-PKEY_SHA256="$(doveconf_remote ssl_cert | pkey_sha256)"
-X509_SHA256="$(doveconf_remote ssl_cert | x509_sha256)"
-PKEY_ALT_SHA256="$(doveconf_remote ssl_alt_cert | pkey_sha256)"
-X509_ALT_SHA256="$(doveconf_remote ssl_alt_cert | x509_sha256)"
+PKEY_SHA256="$(doveconf_remote ssl_server/cert_file | pkey_sha256)"
+X509_SHA256="$(doveconf_remote ssl_server/cert_file | x509_sha256)"
+PKEY_ALT_SHA256="$(doveconf_remote ssl_server/alt_cert_file | pkey_sha256)"
+X509_ALT_SHA256="$(doveconf_remote ssl_server/alt_cert_file | x509_sha256)"
# pinned valid fingerprints
cat >>"$XDG_CONFIG_HOME/interimap/config" <<-EOF
diff --git a/tests/tls-sni/remote.conf b/tests/tls-sni/remote.conf
index 4ccfb44..ef76cf9 100644
--- a/tests/tls-sni/remote.conf
+++ b/tests/tls-sni/remote.conf
@@ -2,6 +2,6 @@
!include conf.d/ssl.conf
local_name imap.example.net {
- ssl_cert = <conf.d/dovecot.rsa2.crt
- ssl_key = <conf.d/dovecot.rsa2.key
+ ssl_server_cert_file = conf.d/dovecot.rsa2.crt
+ ssl_server_key_file = conf.d/dovecot.rsa2.key
}
diff --git a/tests/tls-sni/t b/tests/tls-sni/t
index 0565e49..7692f74 100644
--- a/tests/tls-sni/t
+++ b/tests/tls-sni/t
@@ -1,9 +1,9 @@
SERVERNAME="imap.example.net" # cf local_name{} section in the dovecot config
-X509_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \
- | openssl x509 -in /dev/stdin -noout -fingerprint -sha256 \
+ssl_server_cert_file="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_server/cert_file)"
+X509_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -noout -fingerprint -sha256 \
| sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]")"
-X509_2_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -f lname="$SERVERNAME" -hx ssl_cert \
- | openssl x509 -in /dev/stdin -noout -fingerprint -sha256 \
+ssl_server_cert_file2="$(doveconf -c "$HOME_remote/.dovecot/config" -f local_name="$SERVERNAME" -hx ssl_server/cert_file)"
+X509_2_SHA256="$(openssl x509 -in "$ssl_server_cert_file2" -noout -fingerprint -sha256 \
| sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]")"
# check that empty SSL_hostname disables SNI
diff --git a/tests/tls-verify-peer/t b/tests/tls-verify-peer/t
index ee4cd88..50c7445 100644
--- a/tests/tls-verify-peer/t
+++ b/tests/tls-verify-peer/t
@@ -1,8 +1,7 @@
-X509_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \
- | openssl x509 -in /dev/stdin -noout -fingerprint -sha256 \
+ssl_server_cert_file="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_server/cert_file)"
+X509_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -noout -fingerprint -sha256 \
| sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]")"
-PKEY_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \
- | openssl x509 -in /dev/stdin -pubkey \
+PKEY_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -pubkey \
| openssl pkey -in /dev/stdin -pubin -outform DER \
| openssl dgst -sha256 | sed -rn "/^.*=\\s*/ {s///p;q}")"
diff --git a/tests/tls/t b/tests/tls/t
index aee0678..fa59ae5 100644
--- a/tests/tls/t
+++ b/tests/tls/t
@@ -1,5 +1,5 @@
-X509_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \
- | openssl x509 -in /dev/stdin -noout -fingerprint -sha256 \
+ssl_server_cert_file="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_server/cert_file)"
+X509_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -noout -fingerprint -sha256 \
| sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]")"
for ((i = 0; i < 32; i++)); do