]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agoNEWS: Add 100% master process CPU item release-2.3.16 2.3.16
Timo Sirainen [Thu, 5 Aug 2021 15:25:31 +0000 (18:25 +0300)] 
NEWS: Add 100% master process CPU item

4 years agomaster: Avoid creating prefork timeout if process_limit is already reached
Timo Sirainen [Thu, 5 Aug 2021 14:48:42 +0000 (17:48 +0300)] 
master: Avoid creating prefork timeout if process_limit is already reached

4 years agomaster: Avoid high CPU usage when process_min_avail reaches process_limit
Timo Sirainen [Thu, 5 Aug 2021 14:53:58 +0000 (17:53 +0300)] 
master: Avoid high CPU usage when process_min_avail reaches process_limit

process_min_avail handling always created a 0ms timeout to try to create the
missing processes. This timeout was supposed to stop when it couldn't launch
all the wanted processes, but the check wasn't done right. This ended up
causing the timeout to be called rapidly over and over again.

4 years agofts: Fix internal error when fts_index_timeout is set
Timo Sirainen [Wed, 4 Aug 2021 14:24:00 +0000 (17:24 +0300)] 
fts: Fix internal error when fts_index_timeout is set

Broken by cf114f90e0ba25c18db846ee582e3a130bd52949

4 years agoNEWS: Updates for v2.3.16
Timo Sirainen [Wed, 4 Aug 2021 09:51:19 +0000 (12:51 +0300)] 
NEWS: Updates for v2.3.16

4 years agoNEWS: Updates for v2.3.15
Timo Sirainen [Mon, 14 Jun 2021 09:47:15 +0000 (12:47 +0300)] 
NEWS: Updates for v2.3.15

4 years agoNEWS: Add news for 2.3.14.1
Aki Tuomi [Mon, 24 May 2021 11:03:57 +0000 (14:03 +0300)] 
NEWS: Add news for 2.3.14.1

4 years agoutil: dovecot-sysreport - Fix help to have -o as the short form of --core
Martti Rannanjärvi [Tue, 3 Aug 2021 08:44:06 +0000 (11:44 +0300)] 
util: dovecot-sysreport - Fix help to have -o as the short form of --core

4 years agoutil: dovecot-sysreport - Use only spaces for indentation
Martti Rannanjärvi [Tue, 3 Aug 2021 07:56:08 +0000 (10:56 +0300)] 
util: dovecot-sysreport - Use only spaces for indentation

Stop mixing tabs and spaces.

4 years agostats: Revert the previous OpenMetrics info type revert
Timo Sirainen [Tue, 27 Jul 2021 17:13:24 +0000 (20:13 +0300)] 
stats: Revert the previous OpenMetrics info type revert

The OpenMetrics standard does support "info" type. The original Prometheus
format doesn't support it, but our support is for OpenMetrics. They don't
even have any overlapping types that could be used for this, so the only
other possibility would have been to make this configurable.

Reverts 55a519d18fbbb8435854f1fcf2642b908d6fc074

4 years agostats: Revert dovecot build information to untyped data
Aki Tuomi [Thu, 22 Jul 2021 08:26:10 +0000 (11:26 +0300)] 
stats: Revert dovecot build information to untyped data

OpenMetrics does not know type 'info', so use 'untyped' instead.

Broken in ae678116a79fff609cdf4fb1eb7eb3db2975bf1c

4 years agolib: Fix assert-crash when destroying ioloop that has active context
Timo Sirainen [Thu, 3 Dec 2020 17:20:32 +0000 (19:20 +0200)] 
lib: Fix assert-crash when destroying ioloop that has active context

Normally the ioloop shouldn't have an active context at deinit, but it
seems to be possible in some situations. It's not really bad anyway, so
just allow it.

Fixes:
Panic: file ioloop.c: line 928 (io_loop_destroy): assertion failed: (ioloop->cur_ctx == NULL)

4 years agolib-storage: Use escaped name length to calculate truncation margin
Markus Valentin [Mon, 12 Jul 2021 12:26:38 +0000 (14:26 +0200)] 
lib-storage: Use escaped name length to calculate truncation margin

This fixes corruption of mailbox names when the storage_name_escape_char
has been part of the parent folder name.

Broken by 5dd81d83d8d9120ed2a74d5bd2aa62622885b49c

4 years agoconfigure: Set version to 2.3.16
Aki Tuomi [Tue, 13 Jul 2021 09:01:47 +0000 (12:01 +0300)] 
configure: Set version to 2.3.16

4 years agolib-lua: Fix LIBDICT_LUA variable usage
Aki Tuomi [Mon, 12 Jul 2021 10:40:58 +0000 (13:40 +0300)] 
lib-lua: Fix LIBDICT_LUA variable usage

It needs to be appended to, not set again. Broken by
3d0b7e9bb59e3dc41fd5a4d09832eedea7a92933.

4 years agolib-lua: Only link libdict_lua if it's available
Aki Tuomi [Thu, 8 Jul 2021 09:24:47 +0000 (12:24 +0300)] 
lib-lua: Only link libdict_lua if it's available

4 years agoplugins/fts: Restore fts_indexer_cmd
Aki Tuomi [Thu, 8 Jul 2021 08:10:38 +0000 (11:10 +0300)] 
plugins/fts: Restore fts_indexer_cmd

It was removed in cf114f90e0ba25c18db846ee582e3a130bd52949 and that
broke some FTS plugins.

4 years agolib-dict: Fix linking when building without Lua
Timo Sirainen [Tue, 22 Jun 2021 11:28:34 +0000 (13:28 +0200)] 
lib-dict: Fix linking when building without Lua

Linking didn't work on some non-Linux OSes (non-GNU linkers?)

4 years agolib-smtp: test-smtp-payload - Set all timeouts to CLIENT_PROGRESS_TIMEOUT.
Stephan Bosch [Tue, 1 Jun 2021 22:40:19 +0000 (00:40 +0200)] 
lib-smtp: test-smtp-payload - Set all timeouts to CLIENT_PROGRESS_TIMEOUT.

This prevents connect and idle timeouts from triggering earlier than the
progress timeout.

4 years agoacl: Ignore acls in acl_lookup_dict_rebuild_add_backend if ignore_acls is set
Markus Valentin [Thu, 1 Jul 2021 08:46:05 +0000 (10:46 +0200)] 
acl: Ignore acls in acl_lookup_dict_rebuild_add_backend if ignore_acls is set

In case an namespace has been configured to ignore ACLs also respect
that when acl_lookup_dict_rebuild is called.

Co-Authored-By: Vincent Brillault <vincent.brillault@cern.ch>
4 years agolib-storage: Make use of MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX
Markus Valentin [Tue, 15 Jun 2021 10:21:22 +0000 (12:21 +0200)] 
lib-storage: Make use of MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX

4 years agolib-index: Introduce MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX
Markus Valentin [Tue, 15 Jun 2021 10:19:00 +0000 (12:19 +0200)] 
lib-index: Introduce MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX

This flag is used to make sure secondary views flags-index can work
properly without emitting warnings about inconsistency. If an
inconsistency is encountered fix it by fully syncing.

4 years agoRevert "lib-storage: Always fix inconsistency when syncing private flags index"
Markus Valentin [Tue, 15 Jun 2021 06:59:17 +0000 (08:59 +0200)] 
Revert "lib-storage: Always fix inconsistency when syncing private flags index"

This reverts commit 986d9cbbecffd836d977b6ad956b04e3ca606677.

This is reverted because storing flags on private indexes no longer send
untagged replies.

4 years agoimap: PREVIEW responses need trailing space
Michael M Slusarz [Tue, 22 Jun 2021 17:52:02 +0000 (11:52 -0600)] 
imap: PREVIEW responses need trailing space

2.3.15 regression

Before 2.3.15, there was this same buggy behavior in error cases; 2.3.15
moved that buggy behavior to the success code path

DOP-2463

4 years agolib-fs: metawrap - Fix handling empty file
Markus Valentin [Fri, 25 Jun 2021 12:52:11 +0000 (14:52 +0200)] 
lib-fs: metawrap - Fix handling empty file

As empty files are already closed when fs-metawrap attempts to append
metadata there have been problems with size calculation. Fix this by
relying on the same mechanism as if metadata changed during write.

This recreates metadata and keeps old body. This fixes an issue when
writing empty mails to cache (failed: Cached message size larger than
expected).

This was introduced by 03e102ddccaae9e944c503d4269de755731798e8a

4 years agolib-fs: fs-metawrap - Expect fs_stat to return size 0 for empty file
Markus Valentin [Fri, 25 Jun 2021 12:28:57 +0000 (14:28 +0200)] 
lib-fs: fs-metawrap - Expect fs_stat to return size 0 for empty file

4 years agolib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability.
Stephan Bosch [Fri, 21 May 2021 22:16:38 +0000 (00:16 +0200)] 
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability.

The input handler kept reading more commands even though the input was locked by
the STARTTLS command, thereby causing it to read the command pipelined beyond
STARTTLS. This causes a STARTTLS command injection vulerability.

4 years agolib-dict-extra: dict-fs - Escape unsafe paths
Aki Tuomi [Tue, 8 Jun 2021 06:13:25 +0000 (09:13 +0300)] 
lib-dict-extra: dict-fs - Escape unsafe paths

Change any path components that are `.` or `..` to `...` and `....`.
Prevents path traversal attacks.

4 years agolib-oauth2: Do not escape '.'
Aki Tuomi [Tue, 8 Jun 2021 06:04:21 +0000 (09:04 +0300)] 
lib-oauth2: Do not escape '.'

This is not really needed and just makes things difficult.

4 years agolib-oauth2: Add missing test_begin/test_end to token escape
Aki Tuomi [Mon, 3 May 2021 06:58:29 +0000 (09:58 +0300)] 
lib-oauth2: Add missing test_begin/test_end to token escape

4 years agolib-oauth2: test-oauth2-jwt - Fix linkage for openssl
Aki Tuomi [Wed, 14 Apr 2021 16:17:30 +0000 (19:17 +0300)] 
lib-oauth2: test-oauth2-jwt - Fix linkage for openssl

Without whole archive option ssl_iostream_unref isn't
included in linkage, which will prevent libdcrypt from
loading openssl backend.

4 years agolib-oauth2: Ensure azp is escaped too
Aki Tuomi [Thu, 19 Nov 2020 17:55:42 +0000 (19:55 +0200)] 
lib-oauth2: Ensure azp is escaped too

4 years agolib-oauth2: Add test for token escape
Aki Tuomi [Wed, 14 Apr 2021 10:47:16 +0000 (13:47 +0300)] 
lib-oauth2: Add test for token escape

4 years agolib-oauth2: Improve identifier escaping function
Aki Tuomi [Wed, 14 Apr 2021 11:12:16 +0000 (14:12 +0300)] 
lib-oauth2: Improve identifier escaping function

4 years agolib-oauth2: Move identifier escaping to own function
Aki Tuomi [Sat, 10 Apr 2021 14:54:45 +0000 (17:54 +0300)] 
lib-oauth2: Move identifier escaping to own function

4 years agolib-storage: Sync mailbox if autoexpunging finds mails that are already expunged
Timo Sirainen [Thu, 25 Mar 2021 13:36:49 +0000 (15:36 +0200)] 
lib-storage: Sync mailbox if autoexpunging finds mails that are already expunged

The syncing should remove the mails from the index.

4 years agolib-storage: Fix infinite loop in autoexpunging if the mails are already expunged
Timo Sirainen [Thu, 25 Mar 2021 13:34:14 +0000 (15:34 +0200)] 
lib-storage: Fix infinite loop in autoexpunging if the mails are already expunged

This happens if the mails exist in the index, but mail_get_save_date()
fails with MAIL_ERROR_EXPUNGED.

4 years agoplugins/fts: Use event logging
Aki Tuomi [Mon, 31 May 2021 11:48:42 +0000 (14:48 +0300)] 
plugins/fts: Use event logging

4 years agoplugins/fts: fts-indexer - Use connection.c functions
Aki Tuomi [Wed, 26 May 2021 10:55:52 +0000 (13:55 +0300)] 
plugins/fts: fts-indexer - Use connection.c functions

4 years agoplugins/fts: fts-indexer - Move fts_indexer_init to end of file
Aki Tuomi [Mon, 31 May 2021 16:31:35 +0000 (19:31 +0300)] 
plugins/fts: fts-indexer - Move fts_indexer_init to end of file

Simplifies next commit

4 years agoplugins/fts: fts-indexer - Use connection structures
Aki Tuomi [Wed, 26 May 2021 10:54:56 +0000 (13:54 +0300)] 
plugins/fts: fts-indexer - Use connection structures

4 years agoindexer: worker - Fix busy/free status
Aki Tuomi [Thu, 6 May 2021 11:55:55 +0000 (14:55 +0300)] 
indexer: worker - Fix busy/free status

Determining whether worker is free or not should be determined
using worker_connection_is_busy, not whether there are
connections in the list.

A worker connection is busy when it has a request.

4 years agoindexer: indexer-client - Use connection.c functions
Aki Tuomi [Thu, 6 May 2021 09:54:15 +0000 (12:54 +0300)] 
indexer: indexer-client - Use connection.c functions

4 years agoindexer: indexer-client - Use connection structure
Aki Tuomi [Thu, 6 May 2021 09:41:39 +0000 (12:41 +0300)] 
indexer: indexer-client - Use connection structure

4 years agoindexer: indexer-worker - Use event logging
Aki Tuomi [Thu, 6 May 2021 09:08:39 +0000 (12:08 +0300)] 
indexer: indexer-worker - Use event logging

4 years agoindexer: indexer-worker: Use connection.c functions
Aki Tuomi [Thu, 6 May 2021 09:03:16 +0000 (12:03 +0300)] 
indexer: indexer-worker: Use connection.c functions

4 years agoindexer: indexer-worker: Use connection structure
Aki Tuomi [Thu, 6 May 2021 08:42:37 +0000 (11:42 +0300)] 
indexer: indexer-worker: Use connection structure

4 years agoindexer: worker-connection - Use connection.c functions
Aki Tuomi [Thu, 6 May 2021 08:21:43 +0000 (11:21 +0300)] 
indexer: worker-connection - Use connection.c functions

4 years agoindexer: worker-connection - Prepare for using connection.c
Aki Tuomi [Thu, 6 May 2021 07:59:24 +0000 (10:59 +0300)] 
indexer: worker-connection - Prepare for using connection.c

4 years agoindexer: worker-pool - Use connection_list
Aki Tuomi [Thu, 6 May 2021 07:56:40 +0000 (10:56 +0300)] 
indexer: worker-pool - Use connection_list

4 years agoindexer: worker-pool - Remove unused last_use
Aki Tuomi [Thu, 6 May 2021 07:49:23 +0000 (10:49 +0300)] 
indexer: worker-pool - Remove unused last_use

4 years agoindexer: worker-connection - Use connection.h structures
Aki Tuomi [Thu, 6 May 2021 07:29:23 +0000 (10:29 +0300)] 
indexer: worker-connection - Use connection.h structures

4 years agoindexer: worker-connection - Move constructor further down
Aki Tuomi [Thu, 6 May 2021 07:11:54 +0000 (10:11 +0300)] 
indexer: worker-connection - Move constructor further down

Simplifies next commit

4 years agoReformat worker-connection.c
Aki Tuomi [Thu, 6 May 2021 07:11:24 +0000 (10:11 +0300)] 
Reformat worker-connection.c

4 years agolib: lib-event - Copy ru_last when making passthrough event
Aki Tuomi [Tue, 25 May 2021 07:38:46 +0000 (10:38 +0300)] 
lib: lib-event - Copy ru_last when making passthrough event

Otherwise user_cpu_usecs does not get added to the sent events.

4 years agomaster: Fix idle-kill for processes with a single short-lived client
Aki Tuomi [Thu, 6 May 2021 11:29:03 +0000 (14:29 +0300)] 
master: Fix idle-kill for processes with a single short-lived client

lib-master sends unimportant service status updates to master only once per
second when client_limit>1, because within that 1 second the available client
count may have already changed many times. Normally this is fine, but there's a
problem with the initial client:

 * The client connection launches a new process
 * The process sends the initial status notification with available_count=MAX
 * The client connection is handled, but because the status notification was
   just sent, the update won't be sent until 1 second later
 * The client disconnects within the 1 second
 * The available_count is again MAX, so no status notification is sent

In this situation the master process never created the idle-kill timeout.
Usually the following clients will cause a status notification to be sent, but
if there was only the one client then this process won't be idle-killed. Fix the
situation so that the idle-kill timeout is created already by the initial status
notification.

4 years agolib: Add array_foreach_reverse[_modifiable]()
Timo Sirainen [Thu, 3 Jun 2021 16:04:26 +0000 (19:04 +0300)] 
lib: Add array_foreach_reverse[_modifiable]()

This is especially useful when deleting multiple elements inside the loop.

4 years agolib: Don't use special code for i_unreached() with STATIC_CHECKER
Timo Sirainen [Thu, 3 Jun 2021 13:50:39 +0000 (16:50 +0300)] 
lib: Don't use special code for i_unreached() with STATIC_CHECKER

This was done originally to help scan-build, but this is no longer
necessary. Also actually running code where __builtin_unreachable() was
reached produced (very weird) undefined behavior.

Reverts e2e9ea6da9f3db5fd7fe467db79232d20d03832f

4 years agoMakefile.am: Update configure parameters for scan-build
Timo Sirainen [Thu, 3 Jun 2021 13:48:36 +0000 (16:48 +0300)] 
Makefile.am: Update configure parameters for scan-build

Especially add --enable-static-checker.

4 years agolib-imap: imap-parser - Parse literal size using as same algorithm as str_parse*().
Timo Sirainen [Fri, 4 Jun 2021 09:46:53 +0000 (12:46 +0300)] 
lib-imap: imap-parser - Parse literal size using as same algorithm as str_parse*().

This prevents wrapping the integer value and fixes an ubsan complaint.

Based on Stephan's similar patch in managesieve-parser.

4 years agolib-imap: imap-parser - Fix 8 bit atom check to use unsigned char.
Timo Sirainen [Fri, 4 Jun 2021 09:45:08 +0000 (12:45 +0300)] 
lib-imap: imap-parser - Fix 8 bit atom check to use unsigned char.

4 years agolib-http: Add http-client category to client events
Timo Sirainen [Fri, 20 Nov 2020 09:56:41 +0000 (11:56 +0200)] 
lib-http: Add http-client category to client events

4 years agoacl: Ignore acls in acl_mailbox_right_lookup if ignore_acls is set
Markus Valentin [Wed, 2 Jun 2021 10:39:39 +0000 (12:39 +0200)] 
acl: Ignore acls in acl_mailbox_right_lookup if ignore_acls is set

In case an namespace has been configured to ignore ACLs make sure that
also happens for acl_mailbox_right_lookup.

4 years agoacl: If acl_ignore_namespace is set acl_backend can be NULL
Markus Valentin [Tue, 1 Jun 2021 11:10:23 +0000 (13:10 +0200)] 
acl: If acl_ignore_namespace is set acl_backend can be NULL

Allow an uninitialized acl backend when ignore_acls is set.

4 years agolib-mail: Add MESSAGE_PART_FLAG_OVERFLOW to MIME parts that reached parsing limits
Timo Sirainen [Tue, 25 May 2021 17:03:53 +0000 (20:03 +0300)] 
lib-mail: Add MESSAGE_PART_FLAG_OVERFLOW to MIME parts that reached parsing limits

This allows callers to find out which MIME parts were properly parsed.

4 years agoimap: copy: Abort if client disconnects during COPY
Timo Sirainen [Thu, 29 Apr 2021 14:00:47 +0000 (17:00 +0300)] 
imap: copy: Abort if client disconnects during COPY

Since the client didn't receive the COPY tagged reply, it doesn't know
whether the COPY succeeded or not. This likely causes it to try the COPY
again and duplicate the mails.

4 years agoimap: imap-sync - Fix VANISHED response with UID=1
Splintermail Dev [Wed, 19 May 2021 11:56:13 +0000 (05:56 -0600)] 
imap: imap-sync - Fix VANISHED response with UID=1

Fixes a bug introduced in 4eb3f6f27, where a UID EXPUNGE 1 command
resulted in a VANSIHED 0:1 response, which is invalid IMAP syntax
(sequence sets must have nonzero values).

4 years agofts: Do not consider arbitrary headers with 8-bit data as language-specific
Aki Tuomi [Mon, 17 May 2021 09:13:16 +0000 (12:13 +0300)] 
fts: Do not consider arbitrary headers with 8-bit data as language-specific

If we do stemming etc processing for arbitrary headers, they might
become impossible to find in subsequent searches due to stemming.

This practically breaks e.g. From/To header searches with non-ascii
names.

4 years agolib: DEBUG: Fix potential crash in handling "Growing data stack" debug message
Timo Sirainen [Mon, 9 Mar 2020 09:11:04 +0000 (11:11 +0200)] 
lib: DEBUG: Fix potential crash in handling "Growing data stack" debug message

This could have only happened when data_stack_grow event was enabled and
when --enable-devel-checks was used.

4 years agolib: test-data-stack: Run each test with the same data stack state
Timo Sirainen [Thu, 27 May 2021 08:18:05 +0000 (11:18 +0300)] 
lib: test-data-stack: Run each test with the same data stack state

4 years agolib-lua: Delay running Lua script until dlua_script_init()
Timo Sirainen [Fri, 21 May 2021 13:59:17 +0000 (16:59 +0300)] 
lib-lua: Delay running Lua script until dlua_script_init()

This allows the caller to register globals before running the script.

4 years agolib-lua: Move finalizing event and setting linked list to dlua_create_script()
Timo Sirainen [Fri, 21 May 2021 13:58:01 +0000 (16:58 +0300)] 
lib-lua: Move finalizing event and setting linked list to dlua_create_script()

There's no need to delay them until dlua_script_create_finish().

4 years agolib-lua: Update dlua_script_create_*() comment
Timo Sirainen [Fri, 21 May 2021 14:48:48 +0000 (17:48 +0300)] 
lib-lua: Update dlua_script_create_*() comment

Reusing existing scripts wasn't actually implemented.

4 years agolib-lua: dlua_script_init() - Always return -1 if script_init() fails
Timo Sirainen [Fri, 21 May 2021 14:06:37 +0000 (17:06 +0300)] 
lib-lua: dlua_script_init() - Always return -1 if script_init() fails

The previous behavior was to forward the script_init() return value to
the caller. This was somewhat unexpected behavior.

4 years agolib-storage: dlua_register_mail_storage() - Fix popping dlua_dovecot in Lua stack
Timo Sirainen [Mon, 31 May 2021 08:33:40 +0000 (11:33 +0300)] 
lib-storage: dlua_register_mail_storage() - Fix popping dlua_dovecot in Lua stack

4 years agolib-storage: Fix corrupted cache when adding attachment keywords
Timo Sirainen [Fri, 7 May 2021 17:37:02 +0000 (20:37 +0300)] 
lib-storage: Fix corrupted cache when adding attachment keywords

If IMAP BODYSTRUCTURE parsing fails, it means the BODYSTRUCTURE doesn't
match the MIME parts. This likely means that one or both of them are
corrupted. Handle this by deleting the email from cache, so this error
won't keep repeating.

4 years agolib-storage: Don't log error if attachment flags couldn't be set due to missing cache
Timo Sirainen [Fri, 7 May 2021 17:28:03 +0000 (20:28 +0300)] 
lib-storage: Don't log error if attachment flags couldn't be set due to missing cache

Ever since 194dcaa65cdd247393633f2daa4b40fd12985440 missing attachment
keywords have been attempted to be automatically added if all the necessary
fields are in dovecot.index.cache. However, if mime.parts wasn't in the
cache an error was unnecessarily logged.

Fixes:
Error: Failed to add attachment keywords: mail_get_parts() failed: Mail field not cached

4 years agoimap-acl: In case mailbox name is "" set it to INBOX for shared namespaces
Markus Valentin [Fri, 21 May 2021 11:53:02 +0000 (13:53 +0200)] 
imap-acl: In case mailbox name is "" set it to INBOX for shared namespaces

To prevent proxying ACL commands with mailbox "" replace it with "INBOX"
when used with shared namespaces.

4 years agoimapc: Extract imapc_mailbox_name_equals from imapc_untagged_status
Markus Valentin [Tue, 25 May 2021 14:09:25 +0000 (16:09 +0200)] 
imapc: Extract imapc_mailbox_name_equals from imapc_untagged_status

4 years agoimap-acl: Replace mailbox_open_as_admin with mailbox_open_allocated_as_admin
Markus Valentin [Thu, 20 May 2021 14:03:12 +0000 (16:03 +0200)] 
imap-acl: Replace mailbox_open_as_admin with mailbox_open_allocated_as_admin

4 years agoimap-acl: Allow LISTRIGHT replies without opening as admin
Markus Valentin [Thu, 20 May 2021 12:27:46 +0000 (14:27 +0200)] 
imap-acl: Allow LISTRIGHT replies without opening as admin

As the reply is hardcoded there is no need to proxy the ACL
command to a remote backend in case imapc_feature "acl" is
enabled.

4 years agoimap-acl: Implement proxying commands to an imapc location for DELETEACL
Markus Valentin [Wed, 19 May 2021 13:12:35 +0000 (15:12 +0200)] 
imap-acl: Implement proxying commands to an imapc location for DELETEACL

Before calling imap_acl_cmd_deleteacl in cmd_deleteacl the new code
checks if the command should be proxied and if so, does the proxying.

4 years agoimap-acl: Implement proxying commands to an imapc location for SETACL
Markus Valentin [Wed, 19 May 2021 13:11:40 +0000 (15:11 +0200)] 
imap-acl: Implement proxying commands to an imapc location for SETACL

Before calling imap_acl_cmd_setacl in cmd_setacl the new code checks if
the command should be proxied and if so, does the proxying.

4 years agoimap-acl: Implement proxying commands to an imapc location for GETACL
Markus Valentin [Wed, 19 May 2021 13:09:24 +0000 (15:09 +0200)] 
imap-acl: Implement proxying commands to an imapc location for GETACL

Before calling imap_acl_cmd_getacl in cmd_getacl the new code checks if the
command should be proxied and if so, does the proxying.

4 years agoimap-acl: Extract imap_acl_cmd_deleteacl from cmd_deletacl
Markus Valentin [Tue, 25 May 2021 14:59:31 +0000 (16:59 +0200)] 
imap-acl: Extract imap_acl_cmd_deleteacl from cmd_deletacl

This change makes acl_mailbox_open_allocated_as_admin called later which
is necessary for the following proxying IMAP ACL changes.

4 years agoimap-acl: Extract imap_acl_cmd_setacl from cmd_setacl
Markus Valentin [Tue, 25 May 2021 14:45:13 +0000 (16:45 +0200)] 
imap-acl: Extract imap_acl_cmd_setacl from cmd_setacl

This change makes acl_mailbox_open_allocated_as_admin called later which
is necessary for the following proxying IMAP ACL changes.

4 years agoimap-acl: Extract imap_acl_cmd_getacl from cmd_getacl
Markus Valentin [Tue, 25 May 2021 14:29:10 +0000 (16:29 +0200)] 
imap-acl: Extract imap_acl_cmd_getacl from cmd_getacl

This change makes acl_mailbox_open_allocated_as_admin called later which
is necessary for the following proxying IMAP ACL changes.

4 years agoimap-acl: Implement proxying commands to an imapc location for MYRIGHTS
Markus Valentin [Wed, 19 May 2021 12:52:36 +0000 (14:52 +0200)] 
imap-acl: Implement proxying commands to an imapc location for MYRIGHTS

Introduce the needed changes to proxy imap-acl commands to a remote
backend using imap-client.

Before calling imap_acl_cmd_myrights in cmd_myrights the new code checks if
the command should be proxied and if so, does the proxying.

4 years agoimap-acl: Add imapc_acl_get_mailbox_error
Markus Valentin [Tue, 25 May 2021 10:40:55 +0000 (12:40 +0200)] 
imap-acl: Add imapc_acl_get_mailbox_error

Allows to retrieve full mailbox error.

4 years agoimap-acl: Split off imap_acl_cmd_myrights from cmd_myrights
Markus Valentin [Tue, 25 May 2021 09:19:47 +0000 (11:19 +0200)] 
imap-acl: Split off imap_acl_cmd_myrights from cmd_myrights

4 years agoimap-acl: Split acl_mailbox_open_as_admin
Markus Valentin [Thu, 20 May 2021 11:47:55 +0000 (13:47 +0200)] 
imap-acl: Split acl_mailbox_open_as_admin

This allows easier implementation of the imap-acl proxying.

4 years agoimap-acl: Add imap_acl_storage with module context
Markus Valentin [Thu, 20 May 2021 21:21:10 +0000 (23:21 +0200)] 
imap-acl: Add imap_acl_storage with module context

4 years agoimapc: Add imapc_mail_error_to_resp_text_code to access error msg by enum
Markus Valentin [Tue, 25 May 2021 10:38:50 +0000 (12:38 +0200)] 
imapc: Add imapc_mail_error_to_resp_text_code to access error msg by enum

4 years agoimapc: Change function signature prefix to imapc_resp_text_code_parse
Markus Valentin [Wed, 26 May 2021 08:31:26 +0000 (10:31 +0200)] 
imapc: Change function signature prefix to imapc_resp_text_code_parse

4 years agoimapc: Add imapc_storage_client_unregister_untagged function
Markus Valentin [Thu, 20 May 2021 21:18:30 +0000 (23:18 +0200)] 
imapc: Add imapc_storage_client_unregister_untagged function

4 years agoimapc: Add imapc_features=acl
Markus Valentin [Tue, 18 May 2021 14:26:46 +0000 (16:26 +0200)] 
imapc: Add imapc_features=acl

In order to allow proxying IMAP ACL commands to a remote backend

4 years agolib: test-event-filter-*: Hide details of tests unless they fail
Timo Sirainen [Fri, 21 May 2021 17:23:57 +0000 (19:23 +0200)] 
lib: test-event-filter-*: Hide details of tests unless they fail

This removes ~14k lines of output from test-lib run.

4 years agoimap: Send tagged login reply before finalizing user initialization
Timo Sirainen [Fri, 21 May 2021 13:11:45 +0000 (16:11 +0300)] 
imap: Send tagged login reply before finalizing user initialization

Broken by 5fc66f182ff6941639d30372b414c1b39ae1e67e

4 years agom4, dovecot-config: Add LIBDOVECOT_LUA_INCLUDE
Timo Sirainen [Fri, 21 May 2021 13:23:36 +0000 (16:23 +0300)] 
m4, dovecot-config: Add LIBDOVECOT_LUA_INCLUDE

This allows building plugins that use lib-lua against uninstalled Dovecot
source code tree.

4 years agolib: event filter - Return invalid chars in the lexer
Josef 'Jeff' Sipek [Thu, 20 May 2021 15:05:37 +0000 (11:05 -0400)] 
lib: event filter - Return invalid chars in the lexer

This way, we leave it up to the parser to figure out whether or not they
make sense.