diff options
author | Guilhem Moulin <guilhem@debian.org> | 2025-04-25 17:59:57 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-04-26 18:03:03 +0200 |
commit | 66aeda7f653cfb72731fe7ff2925d7291158500f (patch) | |
tree | c00ab59def64caace0cbe7a3c747f18f71f6649b /doc | |
parent | 8f11b2625b98831a591a73c8928d62c1df11aadb (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 'doc')
-rw-r--r-- | doc/benchmark.md | 4 | ||||
-rw-r--r-- | doc/development.md | 69 | ||||
-rw-r--r-- | doc/getting-started.md | 21 | ||||
-rw-r--r-- | doc/interimap.1.md | 2 | ||||
-rw-r--r-- | doc/multi-account.md | 25 |
5 files changed, 67 insertions, 54 deletions
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 |