diff options
author | Guilhem Moulin <guilhem@debian.org> | 2025-04-26 18:24:46 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@debian.org> | 2025-04-26 18:24:46 +0200 |
commit | 822f251cd94468a2ab305f46078c9f3e38b68b5f (patch) | |
tree | 2ec291885cc3db4c1f15445557b0f57c223f6931 /benchmark | |
parent | 6efe479ce30432045a099c4624455f152fa19ba3 (diff) | |
parent | d3bcc2e368e7399af664812cbd67df1dc827d58b (diff) |
Merge tag 'v0.5.8' into debian/latest
Release version 0.5.8
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/dovecot.conf | 29 | ||||
-rwxr-xr-x | benchmark/run | 39 |
2 files changed, 38 insertions, 30 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 |