Timo Sirainen [Wed, 14 Aug 2024 10:11:10 +0000 (13:11 +0300)]
auth: Add auth_internal_failure_delay setting
When >0, delay before sending "internal failure" replies to auth clients.
The idea is to prevent clients from hammering the server with immediate
retries. Also, a random 0..50% extra delay is added on top of this delay
to try to prevent thundering herd issues.
Timo Sirainen [Fri, 9 Aug 2024 06:24:53 +0000 (09:24 +0300)]
login-common: Change "Login" log lines to "Logged in"
Previously it wasn't possible to search (with e.g. graylog) all lines from
login processes except the successful logins, because "NOT Login" would
still match e.g. "imap-login" prefix itself. Now it can work with
"NOT Logged".
Timo Sirainen [Tue, 13 Aug 2024 06:45:40 +0000 (09:45 +0300)]
config: doveconf without parameters now outputs the same as -n
The old behavior was the same as the -a parameter. The old behavior is
preserved when doveconf is given a setting name as parameter, so its
value is output regardless of whether it's the default value or not.
Timo Sirainen [Thu, 8 Feb 2024 22:57:12 +0000 (00:57 +0200)]
lib-mail, lib-imap: Optimize parsing large number of address headers
Every header was appended to a linked list by walking through the whole
list, causing excessive CPU usage when the list became large enough.
Fixed by changing struct message_part_envelope to use struct
message_address_list, which stores also linked list tail pointers. This
allows quickly appending to the end of the linked list.
Duncan Overbruck [Mon, 18 Dec 2023 15:12:22 +0000 (16:12 +0100)]
lib: test-file-cache - build expected error strings using strerror
Different libc libraries like musl and glibc have different error
strings for the same errno's, to make the tests work as expected
with musl libc, use strerror to build the expected error string.
Timo Sirainen [Wed, 19 Jun 2024 12:41:24 +0000 (15:41 +0300)]
lib-master, config: Add a required dovecot_storage_version setting
This setting specifies specifies the oldest Dovecot version that must be
able to read the files written by this Dovecot. This setting replaces
separate settings that are added when file formats are changed.
The intention is that when upgrading Dovecot cluster, this setting is
first kept as the old Dovecot version. Once the cluster is fully upgraded
to a new version and there is no intention to rollback to the old version
anymore, this version number can be increased.
Timo Sirainen [Wed, 19 Jun 2024 19:13:25 +0000 (22:13 +0300)]
config: doveconf - Change is_config_binary() to return TRUE
Previously only the "config" binary returned TRUE, while doveconf didn't.
The intention was always for both to return TRUE, since it's an alternative
runtime check for CONFIG_BINARY macro.
Timo Sirainen [Wed, 19 Jun 2024 08:24:49 +0000 (11:24 +0300)]
config: Add a required dovecot_config_version setting
This version must now be the first setting in the configuration file.
This is just the minimal version to allow supporting backwards
compatibility better in later versions.
Arnt Gulbrandsen [Tue, 22 Nov 2022 11:51:44 +0000 (12:51 +0100)]
smtp: Add support for SMTPUTF8
This adds support for SMTPUTF8 (RFC 6531) to the LMTP and Submission
services. The Submission service advertises this extension only if its
upstream relay does, and takes some care to avoid a misunderstood error
message.
Arnt Gulbrandsen [Tue, 22 Nov 2022 11:38:14 +0000 (12:38 +0100)]
imap: Add UTF8=ACCEPT capability (RFC 6855)
This adds the capability and accepts UTF8 quoted-strings.
The SEARCH command is changed as required by RFC 6855, section 3, final
paragraph. There are no changes to the searching, as 6855 only changes
changes the syntax.
This does not add any kind of downgrading. Before this change, Dovecot would
accept an APPEND of a message such as
From: grå@grå.org
Subject: grå
...
and would just-send-8 that to any IMAP clients. This change maintains that policy.
lib-mail: Make FETCH ENVELOPE and SEARCH work on the human-readable domains
This stores the unicode form of domains in all indexes, meaning that
searching uses and serverside parsing shows the human-readable form of all
addresses.
Marco Bettini [Tue, 25 Jun 2024 16:01:16 +0000 (16:01 +0000)]
dsync: Don't fail when metadata cannot be retrieved
This become necessary when imapc is accessing a backend with
no metadata capabilities as the attribute_get imap primitive
cannot reply OK when it cannot provide the requested metadata
entry (attribute_iter already iterated an emtpy set in this case).
Timo Sirainen [Thu, 30 Mar 2023 09:26:52 +0000 (12:26 +0300)]
dsync: Don't commit transaction after every mail on slave side
dsync_commit_msgs_interval setting worked only on the master side. On the
slave side it was always 0, which caused it to commit after every mail save.
Also, dsync_commit_msgs_interval should be handled independently on each
side. Master shouldn't send its dsync_commit_msgs_interval setting to the
slave side.
Timo Sirainen [Fri, 10 May 2024 10:51:01 +0000 (13:51 +0300)]
imap, imap-login: Handle COMPRESS in imap-login process if possible
This is currently done only in the connecting Dovecot proxy's imap-login
process. If no proxying is used, the COMPRESS handling stays in the imap
process. (That could be changed with some extra work.)