aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/run
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 /benchmark/run
parent8f11b2625b98831a591a73c8928d62c1df11aadb (diff)
Port tests and documentation to Dovecot 2.4.
See https://doc.dovecot.org/main/installation/upgrade/2.3-to-2.4.html .
Diffstat (limited to 'benchmark/run')
-rwxr-xr-xbenchmark/run39
1 files changed, 22 insertions, 17 deletions
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