]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
3 years agolib-storage: Add mail_search_seqset_iter_*() API for batched iteration of a seqset
sergey.kitov [Tue, 8 Mar 2022 09:52:31 +0000 (11:52 +0200)] 
lib-storage: Add mail_search_seqset_iter_*() API for batched iteration of a seqset

3 years agolib-storage: Whitespace cleanup.
sergey.kitov [Thu, 17 Feb 2022 08:33:19 +0000 (10:33 +0200)] 
lib-storage: Whitespace cleanup.

3 years agomail-crypt: Do not attempt to load empty keys
Aki Tuomi [Fri, 25 Mar 2022 12:07:40 +0000 (14:07 +0200)] 
mail-crypt: Do not attempt to load empty keys

3 years agomail-crypt: fs-crypt - Add unit tests for fs-crypt
Aki Tuomi [Fri, 18 Mar 2022 13:39:57 +0000 (15:39 +0200)] 
mail-crypt: fs-crypt - Add unit tests for fs-crypt

3 years agofs-mail-crypt: Allow missing keys if mail_crypt_save_version = 0
Aki Tuomi [Fri, 25 Mar 2022 07:04:01 +0000 (09:04 +0200)] 
fs-mail-crypt: Allow missing keys if mail_crypt_save_version = 0

3 years agomail-crypt: fs-crypt - Support reading maybe encrypted files
Aki Tuomi [Fri, 18 Mar 2022 13:39:29 +0000 (15:39 +0200)] 
mail-crypt: fs-crypt - Support reading maybe encrypted files

3 years agomail-crypt: fs-crypt - Require public_key for encryption
Aki Tuomi [Fri, 18 Mar 2022 08:01:49 +0000 (10:01 +0200)] 
mail-crypt: fs-crypt - Require public_key for encryption

Adds parameter maybe to allow not requiring it.

3 years agomail-crypt: fs-crypt - Allow using without any parameters
Aki Tuomi [Fri, 18 Mar 2022 13:33:02 +0000 (15:33 +0200)] 
mail-crypt: fs-crypt - Allow using without any parameters

It does not require any and this check would break
crypt:posix usage.

3 years agolib-dcrypt: test-stream - Try read invalid stream
Aki Tuomi [Mon, 21 Mar 2022 14:19:05 +0000 (16:19 +0200)] 
lib-dcrypt: test-stream - Try read invalid stream

Test that reading stream with correct magic but invalid
data fails correctly.

3 years agolib-dcrypt: istream-decrypt - Change EINVAL to EIO, except when it's not encrypted
Aki Tuomi [Mon, 21 Mar 2022 13:41:48 +0000 (15:41 +0200)] 
lib-dcrypt: istream-decrypt - Change EINVAL to EIO, except when it's not encrypted

Makes it easier to detect unencrypted streams.

3 years agolib: Add istream-noop
Aki Tuomi [Mon, 21 Mar 2022 15:36:00 +0000 (17:36 +0200)] 
lib: Add istream-noop

A simple wrapper class that allows using istream as a child stream.

3 years agolib-test: test_istream_find - Ensure that stream is not NULL
Aki Tuomi [Tue, 22 Mar 2022 11:08:49 +0000 (13:08 +0200)] 
lib-test: test_istream_find - Ensure that stream is not NULL

3 years agolib: i_stream_get_name - Ensure that stream is not NULL
Aki Tuomi [Tue, 22 Mar 2022 11:08:26 +0000 (13:08 +0200)] 
lib: i_stream_get_name - Ensure that stream is not NULL

3 years agoauth: Handle return value of connection_client_connect()
Karl Fleischmann [Thu, 24 Mar 2022 09:20:33 +0000 (10:20 +0100)] 
auth: Handle return value of connection_client_connect()

3 years agolib: str_begins*() - Suppress static code analyzer false positives
Marco Bettini [Thu, 24 Mar 2022 09:45:37 +0000 (09:45 +0000)] 
lib: str_begins*() - Suppress static code analyzer false positives

The code analyzer is not able to properly infer that str_begins_builtin_success()
cannot be invoked when the previous strncmp() does not match. It then complies
about overrun pointers arithmetic that is just not possible to happen.

3 years agoauth: Rename auth-worker-client -> auth-worker-server
Karl Fleischmann [Tue, 1 Mar 2022 11:07:08 +0000 (12:07 +0100)] 
auth: Rename auth-worker-client -> auth-worker-server

The previous naming convention of auth-worker-server and
auth-worker-client was confusing enough to justify a rename.

3 years agoauth: Rename auth-worker-server -> auth-worker-connection
Karl Fleischmann [Tue, 1 Mar 2022 10:10:08 +0000 (11:10 +0100)] 
auth: Rename auth-worker-server -> auth-worker-connection

The previous naming convention of auth-worker-server and
auth-worker-client was confusing enough to justify a rename.

3 years agoauth: Clean up naming for auth worker connections
Karl Fleischmann [Mon, 21 Feb 2022 15:11:39 +0000 (16:11 +0100)] 
auth: Clean up naming for auth worker connections

Similar to the indexer this commit consolidates the naming of the
auth-worker setup into a header file. This reduces the effort to write
the appropriate name correctly in 4 different places.

3 years agoauth: Remove auth_worker_max_count_setting
Karl Fleischmann [Fri, 18 Feb 2022 15:33:01 +0000 (16:33 +0100)] 
auth: Remove auth_worker_max_count_setting

Replace obsolete `auth_worker_max_count` setting with `service
auth-worker { process_limit }`.

3 years agoauth: Set process limit via handshake
Karl Fleischmann [Tue, 22 Feb 2022 13:51:50 +0000 (14:51 +0100)] 
auth: Set process limit via handshake

Append process_limit value in handshake between auth-worker client and
server. The server now uses this value to determine how many workers to
spawn.

3 years agoauth: Make sure auth worker idle count is valid
Karl Fleischmann [Mon, 28 Feb 2022 09:30:57 +0000 (10:30 +0100)] 
auth: Make sure auth worker idle count is valid

Make obvious corruptions to the idle auth worker counter immediately
visible by asserting that this unsigned value never gets decremented
past 0.

3 years agoauth: Improve consistency with auth-worker timeout values
Karl Fleischmann [Fri, 4 Mar 2022 14:55:12 +0000 (15:55 +0100)] 
auth: Improve consistency with auth-worker timeout values

- Split values into numeric value and factor for next larger timeframe
  (i.e. 60 for minutes, 1000 for seconds), and
- order them to be numeric value first, factor last for consistency.

3 years agoauth: Refactor auth-worker to use connection API
Karl Fleischmann [Fri, 18 Feb 2022 10:41:47 +0000 (11:41 +0100)] 
auth: Refactor auth-worker to use connection API

This change allows an easier exchange of the process_limit value from
the auth-worker-client process to the auth-worker-server.

3 years agoauth: Remove unused auth_fields_import()
Karl Fleischmann [Tue, 1 Mar 2022 09:39:32 +0000 (10:39 +0100)] 
auth: Remove unused auth_fields_import()

3 years agoauth: Refactor auth worker callbacks to use arguments
Karl Fleischmann [Tue, 1 Mar 2022 09:35:10 +0000 (10:35 +0100)] 
auth: Refactor auth worker callbacks to use arguments

To prepare a refactor of the auth worker input handling to use the
connection API this commit changes the signature of the auth worker
callback to use an arguments array instead of the full line as well as
all relevant callback functions.

3 years agoauth: Add arguments based auth field importers
Karl Fleischmann [Tue, 1 Mar 2022 09:28:25 +0000 (10:28 +0100)] 
auth: Add arguments based auth field importers

This commit prepares a refactor of authentication callbacks to use
arguments arrays instead of full lines.

3 years agoauth: Clarify auth worker connection variable naming
Karl Fleischmann [Mon, 28 Feb 2022 13:31:15 +0000 (14:31 +0100)] 
auth: Clarify auth worker connection variable naming

Rename `conn` to `worker` to make distinction clear between generic
connection and auth_worker_connection respectively.

3 years agoauth: auth_worker_server - Use connection.h structures
Karl Fleischmann [Fri, 18 Feb 2022 09:11:14 +0000 (10:11 +0100)] 
auth: auth_worker_server - Use connection.h structures

This commit prepares a refactor of auth-worker-server to use the
connection API by introducing the connection.h structures.
Keep the lookup timeout extra in the worker as there are more distinct
use-cases for it than the connection API would handle.

3 years agoauth: Remove unreached return statement
Karl Fleischmann [Wed, 9 Mar 2022 12:49:13 +0000 (13:49 +0100)] 
auth: Remove unreached return statement

3 years agoauth: Whitespace fix
Karl Fleischmann [Thu, 17 Feb 2022 11:14:01 +0000 (12:14 +0100)] 
auth: Whitespace fix

3 years agoglobal: Replace strncasecmp() with str_begins_icase*()
Timo Sirainen [Sun, 19 Apr 2020 13:11:47 +0000 (16:11 +0300)] 
global: Replace strncasecmp() with str_begins_icase*()

3 years agolib: Add str_begins_icase*() and str_match_icase()
Timo Sirainen [Sun, 19 Apr 2020 12:31:35 +0000 (15:31 +0300)] 
lib: Add str_begins_icase*() and str_match_icase()

3 years agolib: Remove strcasecmp() / strncasecmp() compatibility functions
Timo Sirainen [Sun, 19 Apr 2020 13:13:02 +0000 (16:13 +0300)] 
lib: Remove strcasecmp() / strncasecmp() compatibility functions

We don't support any OS where these don't exist.

3 years agoglobal: Rename str_begins_suffix() to str_begins() and use it everywhere
Timo Sirainen [Fri, 10 Apr 2020 16:13:07 +0000 (19:13 +0300)] 
global: Rename str_begins_suffix() to str_begins() and use it everywhere

3 years agoimap: notify - Replace strncmp() with str_begins()
Timo Sirainen [Fri, 10 Apr 2020 18:00:34 +0000 (21:00 +0300)] 
imap: notify - Replace strncmp() with str_begins()

3 years agoglobal: Use str_begins_with()
Timo Sirainen [Fri, 10 Apr 2020 16:45:44 +0000 (19:45 +0300)] 
global: Use str_begins_with()

3 years agolib: Add str_begins_suffix()
Timo Sirainen [Fri, 10 Apr 2020 16:56:14 +0000 (19:56 +0300)] 
lib: Add str_begins_suffix()

3 years agolib: test-strfuncs - Add tests for literal versions of str_begins_with()
Timo Sirainen [Fri, 10 Apr 2020 16:53:02 +0000 (19:53 +0300)] 
lib: test-strfuncs - Add tests for literal versions of str_begins_with()

3 years agolib: Rename str_begins() to str_begins_with() and add compatibility macro
Timo Sirainen [Fri, 10 Apr 2020 16:50:54 +0000 (19:50 +0300)] 
lib: Rename str_begins() to str_begins_with() and add compatibility macro

3 years agolib: Fix str_begins() unit test
Timo Sirainen [Fri, 10 Apr 2020 16:08:24 +0000 (19:08 +0300)] 
lib: Fix str_begins() unit test

c05976729405180c565aad464cb494c731a640b3 replaced all strncmp() calls to
str_begins(). This caused str_begins() to be tested against str_begins()
itself, which obviously always works. Reverted the change.

3 years agosubmission-login: proxy: Check for STARTTLS capability exactly, not as prefix
Timo Sirainen [Sun, 19 Apr 2020 13:10:30 +0000 (16:10 +0300)] 
submission-login: proxy: Check for STARTTLS capability exactly, not as prefix

3 years agoimap-hibernate: Break out of userdb_fields parsing loop once auth_user is found
Timo Sirainen [Thu, 14 Oct 2021 22:18:17 +0000 (00:18 +0200)] 
imap-hibernate: Break out of userdb_fields parsing loop once auth_user is found

3 years agoimap-login: proxy: Fix STARTTLS failure message
Timo Sirainen [Thu, 14 Oct 2021 22:11:06 +0000 (00:11 +0200)] 
imap-login: proxy: Fix STARTTLS failure message

The error message blindly skipped over 3 bytes after the tagged "S " reply.
This was okay if the reply was "NO", but wrong if the reply was "BAD". Also
nothing really guarantees that a broken server couldn't have just returned
a truncated "S " string, in which case the error would point to garbage.

3 years agoauth: crypt_verify_blowfish() - Check $2 prefix without str_begins()
Timo Sirainen [Thu, 14 Oct 2021 21:48:41 +0000 (23:48 +0200)] 
auth: crypt_verify_blowfish() - Check $2 prefix without str_begins()

Although str_begins() works as well, it's a bit inconsistent looking here.

3 years agolib-storage: Don't include "hdr." prefix in invalid header name error message
Timo Sirainen [Thu, 14 Oct 2021 20:17:09 +0000 (23:17 +0300)] 
lib-storage: Don't include "hdr." prefix in invalid header name error message

The error message makes more sense without the "hdr." prefix, since it's
not part of the header name.

3 years agolib-master: Break out of FAIL reply parsing loop once reason is found
Timo Sirainen [Thu, 14 Oct 2021 22:18:40 +0000 (00:18 +0200)] 
lib-master: Break out of FAIL reply parsing loop once reason is found

3 years agolib: Fix memory pool names with DEBUG_SILENT=1
Timo Sirainen [Thu, 14 Oct 2021 22:21:30 +0000 (00:21 +0200)] 
lib: Fix memory pool names with DEBUG_SILENT=1

When compiling with --enable-devel-checks and running with DEBUG_SILENT=1,
the memory pool names were skipping over the first 8 bytes in the name.
This was supposed to be done only if the name begins with MEMPOOL_GROWING.

3 years agoglobal: Fix stray whitespaces
Marco Bettini [Fri, 11 Mar 2022 10:44:24 +0000 (10:44 +0000)] 
global: Fix stray whitespaces

3 years agolib-ssl-iostream: protocol_versions[] - Reformat table
Marco Bettini [Tue, 15 Mar 2022 09:45:23 +0000 (09:45 +0000)] 
lib-ssl-iostream: protocol_versions[] - Reformat table

3 years agolib-ssl-iostream: protocol_versions[] - Replace conditional table chunks with macro...
Marco Bettini [Tue, 15 Mar 2022 09:43:05 +0000 (09:43 +0000)] 
lib-ssl-iostream: protocol_versions[] - Replace conditional table chunks with macro values

3 years agolib-ssl-iostream: protocol_versions[] - Drops support for ssl_min_protocol=SSLv3
Marco Bettini [Tue, 15 Mar 2022 09:37:59 +0000 (09:37 +0000)] 
lib-ssl-iostream: protocol_versions[] - Drops support for ssl_min_protocol=SSLv3

3 years agolib-master: master_service_ssl_settings_check(): Raise warning when ssl_min_protocol...
Marco Bettini [Wed, 16 Mar 2022 10:53:25 +0000 (10:53 +0000)] 
lib-master: master_service_ssl_settings_check(): Raise warning when ssl_min_protocol contains ANY

3 years agolib-ssl-iostream: ssl_ctx_use_certificate_chain() - Remove stray whitespaces
Marco Bettini [Tue, 15 Mar 2022 15:02:56 +0000 (15:02 +0000)] 
lib-ssl-iostream: ssl_ctx_use_certificate_chain() - Remove stray whitespaces

3 years agodsync: Properly terminate escape_chars when escaping mailbox names
Timo Sirainen [Mon, 21 Mar 2022 09:03:03 +0000 (11:03 +0200)] 
dsync: Properly terminate escape_chars when escaping mailbox names

Broken by 596c5a52e7e554571285e90063712cb0d37b34eb

3 years agolib-test: test-subprocess - Free subprocess before forking
Aki Tuomi [Fri, 18 Mar 2022 07:41:37 +0000 (09:41 +0200)] 
lib-test: test-subprocess - Free subprocess before forking

Otherwise it'll leak memory.

Broken in 34bdfdcbc7e3b374a219732329b6ce6d84a7666e

3 years agoglobal: Remove unused macros
Timo Sirainen [Mon, 28 Feb 2022 11:11:35 +0000 (06:11 -0500)] 
global: Remove unused macros

3 years agovar-expand-crypt: var_expand_crypt_settings() - Use macro VAR_EXPAND_CRYPT_DEFAULT_ALGO
Marco Bettini [Wed, 9 Mar 2022 08:56:28 +0000 (09:56 +0100)] 
var-expand-crypt: var_expand_crypt_settings() - Use macro VAR_EXPAND_CRYPT_DEFAULT_ALGO

3 years agomail-crypt: Replace DCRYPT_FORMAT_DOVECOT with MAIL_CRYPT_KEY_ATTRIBUTE_FORMAT
Marco Bettini [Wed, 9 Mar 2022 09:14:44 +0000 (10:14 +0100)] 
mail-crypt: Replace DCRYPT_FORMAT_DOVECOT with MAIL_CRYPT_KEY_ATTRIBUTE_FORMAT

3 years agoauth: Use macro DB_LUA_CACHE_KEY
Marco Bettini [Wed, 9 Mar 2022 09:05:52 +0000 (09:05 +0000)] 
auth: Use macro DB_LUA_CACHE_KEY

3 years agolib: Use GRBUF_MIN_SIZE for groups instead of PWBUF_MIN_SIZE
Timo Sirainen [Mon, 28 Feb 2022 11:53:05 +0000 (06:53 -0500)] 
lib: Use GRBUF_MIN_SIZE for groups instead of PWBUF_MIN_SIZE

They both have the same value, so it didn't break anything.

3 years agomail-crypt: Remove stray spaces in mail-crypt-key.c
Marco Bettini [Wed, 9 Mar 2022 09:14:10 +0000 (10:14 +0100)] 
mail-crypt: Remove stray spaces in mail-crypt-key.c

3 years agodsync: Fix hierarchical mailbox name parts individually
Timo Sirainen [Wed, 2 Mar 2022 14:39:30 +0000 (09:39 -0500)] 
dsync: Fix hierarchical mailbox name parts individually

For example with filesystem-based mailbox formats it's not allowed to create
"box/../child" mailbox. With previous code dsync just gave up and created
the mailbox name based on its GUID. This is now improved to instead try to
insert '_' character after each hierarchy separator so the newly fixed
mailbox name is "box/_../child".

3 years agodsync: Escape and unescape mailbox names as needed
Timo Sirainen [Tue, 1 Mar 2022 13:37:57 +0000 (08:37 -0500)] 
dsync: Escape and unescape mailbox names as needed

This should fix various issues with syncing local and remote mailbox names.
It especially avoids changing the escape character to alt_char.

3 years agodsync: Track whether escape character was added just for dsync
Timo Sirainen [Tue, 1 Mar 2022 16:51:04 +0000 (11:51 -0500)] 
dsync: Track whether escape character was added just for dsync

Will be used by the following commit

3 years agodsync: Add clarifying comment about mailbox_log_record.maibox_guid contents
Timo Sirainen [Tue, 1 Mar 2022 13:36:55 +0000 (08:36 -0500)] 
dsync: Add clarifying comment about mailbox_log_record.maibox_guid contents

3 years agodsync: Add escape_char to dsync-mailbox-tree
Timo Sirainen [Tue, 1 Mar 2022 13:06:14 +0000 (08:06 -0500)] 
dsync: Add escape_char to dsync-mailbox-tree

This will be used by the following changes.

3 years agolib-compression: Remove xz/lzma read support
Josef 'Jeff' Sipek [Wed, 11 Mar 2020 11:40:38 +0000 (13:40 +0200)] 
lib-compression: Remove xz/lzma read support

This commit removes the read support that was left behind to allow for more
gradual migration from lzma/xz.

The code had bugs.  Additionally, there is no benefit in keeping it around.
bzip2 or zstd (at maximum compression level) are likely better choices for
archival.  For non-archival usecases, a light compression algorithm like
zstd (at low to medium compression level) or lz4 are better choices.

3 years agolib-lua: Add a minimal interface to lib-http
Siavash Tavakoli [Mon, 25 Oct 2021 11:23:56 +0000 (12:23 +0100)] 
lib-lua: Add a minimal interface to lib-http

Adds the ability to
- Creating http clients
- Creating http requests
- Adding arbitrary headers and payload to the http request
- Submitting the request to remote server and getting the response

3 years agoauth: password-scheme - Mark DES-CRYPT weak
Aki Tuomi [Mon, 7 Mar 2022 09:53:27 +0000 (11:53 +0200)] 
auth: password-scheme - Mark DES-CRYPT weak

3 years agoauth: password-scheme - Mark MD4 as weak
Aki Tuomi [Mon, 7 Mar 2022 08:58:54 +0000 (10:58 +0200)] 
auth: password-scheme - Mark MD4 as weak

3 years agoauth: password-scheme - Mark MD5 schemes weak
Aki Tuomi [Mon, 7 Mar 2022 08:58:04 +0000 (10:58 +0200)] 
auth: password-scheme - Mark MD5 schemes weak

For interop reasons, we cannot mark SCRAM-MD5 and DIGEST-MD5 weak
yet.

3 years agoauth: password-scheme - Only allow weak schemes if enabled
Aki Tuomi [Mon, 7 Mar 2022 08:53:20 +0000 (10:53 +0200)] 
auth: password-scheme - Only allow weak schemes if enabled

3 years agoauth: Add auth_allow_weak_schemes setting
Aki Tuomi [Mon, 7 Mar 2022 08:53:00 +0000 (10:53 +0200)] 
auth: Add auth_allow_weak_schemes setting

3 years agoauth: password-scheme - Add password_schemes_allow_weak()
Aki Tuomi [Mon, 7 Mar 2022 08:48:20 +0000 (10:48 +0200)] 
auth: password-scheme - Add password_schemes_allow_weak()

Can be used to allow weak password schemes.

3 years agoauth: password-scheme - Use named initializers
Aki Tuomi [Mon, 7 Mar 2022 06:42:18 +0000 (08:42 +0200)] 
auth: password-scheme - Use named initializers

3 years agosubmission-login: Add workaround for SMTP backend that is not Dovecot.
Stephan Bosch [Wed, 9 Mar 2022 01:30:12 +0000 (02:30 +0100)] 
submission-login: Add workaround for SMTP backend that is not Dovecot.

Adds workaround called "exotic-backend".

3 years agoversion.in: Remove stray file
Aki Tuomi [Wed, 9 Mar 2022 11:54:20 +0000 (13:54 +0200)] 
version.in: Remove stray file

3 years agobuild-aux/git-version-gen: Allow .git to be any file
Aki Tuomi [Wed, 9 Mar 2022 11:53:48 +0000 (13:53 +0200)] 
build-aux/git-version-gen: Allow .git to be any file

In submodule context this will not be a directory

3 years agoacl: Treat missing global acl file as error
Aki Tuomi [Wed, 2 Mar 2022 15:22:23 +0000 (17:22 +0200)] 
acl: Treat missing global acl file as error

3 years agoacl: Remove Global ACL directory feature
Aki Tuomi [Wed, 2 Mar 2022 09:29:54 +0000 (11:29 +0200)] 
acl: Remove Global ACL directory feature

3 years agocassandra: Implement sql_db_vfuncs.statement_bind_double
Timo Sirainen [Mon, 28 Feb 2022 21:42:27 +0000 (16:42 -0500)] 
cassandra: Implement sql_db_vfuncs.statement_bind_double

3 years agocassandra: Add support for reading "double" value type
Timo Sirainen [Mon, 28 Feb 2022 21:51:08 +0000 (16:51 -0500)] 
cassandra: Add support for reading "double" value type

3 years agocassandra: Add enum cassandra_sql_arg_type
Timo Sirainen [Mon, 28 Feb 2022 21:40:03 +0000 (16:40 -0500)] 
cassandra: Add enum cassandra_sql_arg_type

This allows adding other types more reliably.

3 years agodict-sql: Add "double" value type
Timo Sirainen [Mon, 28 Feb 2022 21:42:50 +0000 (16:42 -0500)] 
dict-sql: Add "double" value type

3 years agolib-sql: Add sql_statement_bind_double()
Timo Sirainen [Mon, 28 Feb 2022 21:42:10 +0000 (16:42 -0500)] 
lib-sql: Add sql_statement_bind_double()

3 years agolib: Add str_to_float() and str_to_double()
Timo Sirainen [Mon, 28 Feb 2022 21:33:09 +0000 (16:33 -0500)] 
lib: Add str_to_float() and str_to_double()

3 years agoglobal: Use connection_client_connect_async()
Timo Sirainen [Thu, 24 Feb 2022 17:41:48 +0000 (18:41 +0100)] 
global: Use connection_client_connect_async()

3 years agolib: Add connection_client_connect_async()
Timo Sirainen [Thu, 24 Feb 2022 17:11:19 +0000 (18:11 +0100)] 
lib: Add connection_client_connect_async()

3 years agoimapc: imapc_connection_disconnect_full() - Only conditionally abort
Markus Valentin [Thu, 3 Mar 2022 13:21:00 +0000 (14:21 +0100)] 
imapc: imapc_connection_disconnect_full() - Only conditionally abort

Only abort commands if there are no reconnect commands. Otherwise these
still will be handled and the commands memory will be freed after handling
them.

Broken by 6d16e82fa2c352974558e1415d06f07d8962fe09

3 years agoauth: auth-cache - Always use translated_username as cache key
Aki Tuomi [Wed, 2 Mar 2022 13:40:16 +0000 (15:40 +0200)] 
auth: auth-cache - Always use translated_username as cache key

This fixes auth cache when passdb/userdb changes the user field.

3 years agoauth: Set translated_user to requested_login_user in master login
Aki Tuomi [Wed, 2 Mar 2022 12:57:20 +0000 (14:57 +0200)] 
auth: Set translated_user to requested_login_user in master login

Fixes caching issues with master logins.

3 years agoauth: Include cache hit/miss information in passdb/userdb lookup end events
Aki Tuomi [Tue, 6 Jul 2021 11:02:41 +0000 (14:02 +0300)] 
auth: Include cache hit/miss information in passdb/userdb lookup end events

3 years agolib: test-cpu-limit - Disable system CPU limit checks with valgrind
Timo Sirainen [Tue, 1 Mar 2022 11:05:07 +0000 (06:05 -0500)] 
lib: test-cpu-limit - Disable system CPU limit checks with valgrind

They run way too slowly.

3 years agoimapc: imapc_connection_disconnect_full() - Prevent leaking cmd->pool
Markus Valentin [Mon, 28 Feb 2022 14:50:05 +0000 (15:50 +0100)] 
imapc: imapc_connection_disconnect_full() - Prevent leaking cmd->pool

If the imapc connection was already disconnected when calling
imapc_connection_disconnect() it didn't clean up the commands and
especially the command pools.

3 years agoauth: db-oauth2 - Fix off by one in oauth2 variable handling
Aki Tuomi [Tue, 1 Mar 2022 08:01:06 +0000 (10:01 +0200)] 
auth: db-oauth2 - Fix off by one in oauth2 variable handling

Broken in 9b670175445a75987a713ff899d1a945255b0b5b

3 years agobuild-aux: run-test.sh.in - Capture exit codes before set -e ends the script
Martti Rannanjärvi [Tue, 1 Mar 2022 10:51:29 +0000 (12:51 +0200)] 
build-aux: run-test.sh.in - Capture exit codes before set -e ends the script

With set -e, the script ends on any nonzero exit code and that would
leave the valgrind output unchecked. Fix the exit code capture so
valgrind output is correctly shown.

3 years agoimapc: imapc_transaction_save_rollback() - Fix NULL-check for ctx->src_mbox
Markus Valentin [Tue, 1 Mar 2022 12:49:39 +0000 (13:49 +0100)] 
imapc: imapc_transaction_save_rollback() - Fix NULL-check for ctx->src_mbox

Assert that unfinished context implies that ctx->src_mbox is non-NULL.
Also check for ctx->src_mbox being non-NULL before deinitializing it.

3 years agolib: test-seqset-builder - Add missing seqset_builder_deinit()
Markus Valentin [Tue, 1 Mar 2022 11:06:20 +0000 (12:06 +0100)] 
lib: test-seqset-builder - Add missing seqset_builder_deinit()

Fixes leaking memory when running tests.

3 years agolmtp: lmtp-proxy - Use port 24 as default for proxy.
Stephan Bosch [Tue, 1 Feb 2022 00:33:53 +0000 (01:33 +0100)] 
lmtp: lmtp-proxy - Use port 24 as default for proxy.

LMTP has no officially registered default service port, but 24 is the de-facto
standard. When client connects through TCP, the local client port number is used
to setup the proxy connection as well. However, when the client connects through a
unix socket, there is no port number to use and a default is needed.

3 years agofts: Parse mail header before checking whether to index it
Marco Bettini [Mon, 28 Feb 2022 16:12:32 +0000 (17:12 +0100)] 
fts: Parse mail header before checking whether to index it

Fixes an issue where mime parts Content-type wasn't properly set,
causing binary mime parts to be fed to the indexes.

Broken in ddb85f3533842aa7c4e943c10bbd3dcb745c2eae