]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
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.

4 years agolib: event filter - Allow '?' in filter language tokens
Josef 'Jeff' Sipek [Thu, 20 May 2021 14:24:35 +0000 (10:24 -0400)] 
lib: event filter - Allow '?' in filter language tokens

Without this, it is not possible to use '?' wildcards without quoting the
value.

4 years agodict-sql: Support SQL_DB_FLAG_ON_CONFLICT_DO
Timo Sirainen [Tue, 18 May 2021 14:44:08 +0000 (17:44 +0300)] 
dict-sql: Support SQL_DB_FLAG_ON_CONFLICT_DO

4 years agolib-sql: Add SQL_DB_FLAG_ON_CONFICT_DO for new enough sqlite and pgsql
Timo Sirainen [Tue, 18 May 2021 14:40:00 +0000 (17:40 +0300)] 
lib-sql: Add SQL_DB_FLAG_ON_CONFICT_DO for new enough sqlite and pgsql

4 years agolib-sql: sqlpool: Implement get_flags() as a wrapper to the real db
Timo Sirainen [Tue, 18 May 2021 14:21:59 +0000 (17:21 +0300)] 
lib-sql: sqlpool: Implement get_flags() as a wrapper to the real db

4 years agolib: test-array - Add more unit tests for array_foreach*()
Timo Sirainen [Tue, 18 May 2021 14:15:02 +0000 (17:15 +0300)] 
lib: test-array - Add more unit tests for array_foreach*()

Make sure that the elem value is as expected after the loop completes.

4 years agolib-sql: Add sql_db_vfuncs.get_flags()
Timo Sirainen [Tue, 18 May 2021 14:08:51 +0000 (17:08 +0300)] 
lib-sql: Add sql_db_vfuncs.get_flags()

4 years agodict-sql: Use SQL_DB_FLAG_ON_DUPLICATE_KEY
Timo Sirainen [Tue, 18 May 2021 14:02:30 +0000 (17:02 +0300)] 
dict-sql: Use SQL_DB_FLAG_ON_DUPLICATE_KEY

Instead of hardcoding mysql check.

4 years agolib-sql: Add SQL_DB_FLAG_ON_DUPLICATE_KEY flag for MySQL
Timo Sirainen [Tue, 18 May 2021 14:00:44 +0000 (17:00 +0300)] 
lib-sql: Add SQL_DB_FLAG_ON_DUPLICATE_KEY flag for MySQL

4 years agoauth: mech-oauth2 - Iterate fields in safer manner
Aki Tuomi [Mon, 24 May 2021 15:55:28 +0000 (18:55 +0300)] 
auth: mech-oauth2 - Iterate fields in safer manner

Static analyser wasn't happy about the previous way.

4 years agolib-smtp: smtp-server-recipient - Remove smtp_server_recipient_initialize().
Stephan Bosch [Mon, 9 Nov 2020 11:29:16 +0000 (12:29 +0100)] 
lib-smtp: smtp-server-recipient - Remove smtp_server_recipient_initialize().

It is no longer needed.

4 years agolib-smtp: smtp-server-recipient - Create transaction event early if there is no trans...
Stephan Bosch [Mon, 9 Nov 2020 11:29:29 +0000 (12:29 +0100)] 
lib-smtp: smtp-server-recipient - Create transaction event early if there is no transaction yet.

This allows having a parent for the recipient event once the recipient is
created, which can precede the creation of the transaction.

4 years agolib: Free unused data stack memory once per second while running ioloop
Timo Sirainen [Fri, 21 May 2021 15:20:10 +0000 (18:20 +0300)] 
lib: Free unused data stack memory once per second while running ioloop

This way if the data stack has grown excessively large temporarily, it
won't permanently waste memory. And if the data stack grows back to the
same large size, re-allocating it once per second doesn't cause performance
problems.

4 years agolib: data-stack - Keep the largest unused block in memory after all
Timo Sirainen [Fri, 21 May 2021 15:13:08 +0000 (18:13 +0300)] 
lib: data-stack - Keep the largest unused block in memory after all

This reverts 2da21080dbbe50b4924ac0135c84babfb404dcce, but that alone
doesn't produce working code so there are also some further fixups.

4 years agolib-smtp: test-smtp-payload - Double the client progress timeout.
Stephan Bosch [Sun, 16 May 2021 23:24:31 +0000 (01:24 +0200)] 
lib-smtp: test-smtp-payload - Double the client progress timeout.

Otherwise, SSL tests can fail on systems with low entropy.

4 years agolib-smtp: smtp-client-transaction - Allow destroying connection while transaction...
Stephan Bosch [Wed, 21 Apr 2021 01:02:38 +0000 (03:02 +0200)] 
lib-smtp: smtp-client-transaction - Allow destroying connection while transaction still holds reference.

The lifetime of the transaction is controlled by the application and not so much
by the connection. The transaction holds a reference to the connection, so if
the connection is forcibly destroyed it needs, to notify the transaction of this
event.

This fixes:

Panic: file connection.c: line 938 (connection_list_deinit): assertion failed: (conn != list->connections)

4 years agolib-smtp: smtp-client-transaction - Properly handle pending failure upon smtp_client_...
Stephan Bosch [Thu, 22 Apr 2021 10:13:35 +0000 (12:13 +0200)] 
lib-smtp: smtp-client-transaction - Properly handle pending failure upon smtp_client_transaction_send_reset().

4 years agolib-smtp: smtp-client-connection - Add smtp_client_connection_transactions_fail(...
Stephan Bosch [Thu, 22 Apr 2021 10:03:59 +0000 (12:03 +0200)] 
lib-smtp: smtp-client-connection - Add smtp_client_connection_transactions_fail() and use it.

Use it to always fail the whole transaction first before the individual commands
if possible.

4 years agolib-smtp: smtp-client-connection - Split off smtp_client_connection_transactions_fail...
Stephan Bosch [Thu, 22 Apr 2021 09:53:30 +0000 (11:53 +0200)] 
lib-smtp: smtp-client-connection - Split off smtp_client_connection_transactions_fail_reply().

4 years agolib-smtp: smtp-client-connection - Always abort all commands upon smtp_client_connect...
Stephan Bosch [Thu, 22 Apr 2021 10:36:18 +0000 (12:36 +0200)] 
lib-smtp: smtp-client-connection - Always abort all commands upon smtp_client_connection_close().

Before, these would get a disconnect failure, which makes no sense when the
client is causing the disconnect.

4 years agolib-smtp: smtp-client-connection - Abort all transactions upon smtp_client_connection...
Stephan Bosch [Thu, 22 Apr 2021 10:32:38 +0000 (12:32 +0200)] 
lib-smtp: smtp-client-connection - Abort all transactions upon smtp_client_connection_close().

Before, these would get a disconnect failure, which makes no sense when the
client is causing the disconnect.

4 years agolib-smtp: test-smtp-payload - Finish client transaction only when it finishes completely.
Stephan Bosch [Thu, 22 Apr 2021 10:09:11 +0000 (12:09 +0200)] 
lib-smtp: test-smtp-payload - Finish client transaction only when it finishes completely.

4 years agolib-smtp: Reformat smtp-client-transaction.c.
Stephan Bosch [Sun, 16 May 2021 23:13:36 +0000 (01:13 +0200)] 
lib-smtp: Reformat smtp-client-transaction.c.

4 years agolib-smtp: Reformat smtp-client-connection.c.
Stephan Bosch [Thu, 22 Apr 2021 09:46:30 +0000 (11:46 +0200)] 
lib-smtp: Reformat smtp-client-connection.c.

4 years agoauth: oauth2 - Support passing openid-configuration URL to client on failure
Aki Tuomi [Mon, 10 May 2021 19:37:44 +0000 (22:37 +0300)] 
auth: oauth2 - Support passing openid-configuration URL to client on failure

4 years agoauth: mech-oauth2 - Pass error fields as array
Aki Tuomi [Mon, 10 May 2021 19:29:23 +0000 (22:29 +0300)] 
auth: mech-oauth2 - Pass error fields as array

Makes it easier to add fields to it later on.

4 years agoimap: copy/move: Fix memory leak when no messages were found
Timo Sirainen [Fri, 21 May 2021 11:42:07 +0000 (14:42 +0300)] 
imap: copy/move: Fix memory leak when no messages were found

4 years agodoveadm: Delay reading settings until doveadm plugins are loaded
Timo Sirainen [Thu, 11 Feb 2021 23:22:25 +0000 (01:22 +0200)] 
doveadm: Delay reading settings until doveadm plugins are loaded

4 years agodoveadm: Add doveadm_setting_roots_*() API for plugins to register settings
Timo Sirainen [Thu, 11 Feb 2021 23:54:48 +0000 (01:54 +0200)] 
doveadm: Add doveadm_setting_roots_*() API for plugins to register settings

4 years agodoveadm: Move settings reading code into doveadm-settings.c
Timo Sirainen [Mon, 15 Feb 2021 15:11:07 +0000 (17:11 +0200)] 
doveadm: Move settings reading code into doveadm-settings.c

This code is now shared between doveadm and doveadm-server.

4 years agolib-master: Add master_service_settings_input.extra_modules
Timo Sirainen [Fri, 12 Feb 2021 17:17:25 +0000 (19:17 +0200)] 
lib-master: Add master_service_settings_input.extra_modules

This allows specifying more than one module.

4 years agolib-master: master_service_exec_config() - Build argv using dynamic array
Timo Sirainen [Fri, 12 Feb 2021 17:15:44 +0000 (19:15 +0200)] 
lib-master: master_service_exec_config() - Build argv using dynamic array

4 years agoauth: auth-worker - Respect service_count
Aki Tuomi [Mon, 10 May 2021 21:07:24 +0000 (00:07 +0300)] 
auth: auth-worker - Respect service_count

If service_count is set, then auth-worker will stop after
given number of requests.

4 years agoimap: Improve sending internal error to client if initialization fails
Timo Sirainen [Thu, 20 May 2021 12:54:04 +0000 (15:54 +0300)] 
imap: Improve sending internal error to client if initialization fails

The "Internal server error" should be sent using the same ostream that
was created. Also if service_user initialization failed there was no
OK reply to sent to login.

4 years agoimap: Send initial tagged reply directly using ostream
Timo Sirainen [Thu, 20 May 2021 12:42:45 +0000 (15:42 +0300)] 
imap: Send initial tagged reply directly using ostream

This simplifies the following commits.

4 years agoimap: Send initial tagged reply and capability after rawlogs are initialized
Timo Sirainen [Thu, 20 May 2021 10:22:18 +0000 (13:22 +0300)] 
imap: Send initial tagged reply and capability after rawlogs are initialized

This way the initial tagged reply and capability is written to the rawlog.
Broken by 16328738d35370685387ec51d20657265855e770

4 years agoimap: Split client_add_input_capability() into two functions
Timo Sirainen [Thu, 20 May 2021 10:16:40 +0000 (13:16 +0300)] 
imap: Split client_add_input_capability() into two functions

4 years agoimap: Rename struct client_input to imap_login_request
Timo Sirainen [Thu, 20 May 2021 10:14:00 +0000 (13:14 +0300)] 
imap: Rename struct client_input to imap_login_request

This better indicates what it is about, and causes less confusion with
all the other client_input variables.

4 years agopop3: Handle pipelined input via istream-concat
Timo Sirainen [Mon, 8 Mar 2021 14:45:08 +0000 (16:45 +0200)] 
pop3: Handle pipelined input via istream-concat

This fixes rawlog_dir to work properly. It didn't log the pipelined input
to rawlog and it may have also caused the connection to hang.

4 years agopop3: Move finishing istream to client_create_finish()
Timo Sirainen [Mon, 8 Mar 2021 14:44:31 +0000 (16:44 +0200)] 
pop3: Move finishing istream to client_create_finish()

4 years agoimap: Handle pipelined input from imap-hibernate via istream-concat
Timo Sirainen [Mon, 8 Mar 2021 14:55:49 +0000 (16:55 +0200)] 
imap: Handle pipelined input from imap-hibernate via istream-concat

Similarly to the previous commit, this fixes issues with rawlog.

4 years agoimap: Handle pipelined input via istream-concat
Timo Sirainen [Mon, 8 Mar 2021 14:37:15 +0000 (16:37 +0200)] 
imap: Handle pipelined input via istream-concat

This fixes rawlog_dir to work properly. It didn't log the pipelined input
to rawlog and it may have also caused the connection to hang.

4 years agoimap: Move iostream-rawlog creation to client_create_finish()
Timo Sirainen [Mon, 8 Mar 2021 14:33:50 +0000 (16:33 +0200)] 
imap: Move iostream-rawlog creation to client_create_finish()

This allows the caller to modify the istream before rawlog.

4 years agolib: Add i_stream_copy_fd()
Timo Sirainen [Mon, 8 Mar 2021 14:33:33 +0000 (16:33 +0200)] 
lib: Add i_stream_copy_fd()

4 years agoacl: Fix broken LIST for shared namespaces
Markus Valentin [Fri, 14 May 2021 13:57:20 +0000 (15:57 +0200)] 
acl: Fix broken LIST for shared namespaces

Due to the recent changes in the usage of the acl_ignore_namespace
setting shared namespaces where trying to use fast listing too. This
resulted in wrong LIST IMAP command outputs when using acl plugin.

Broken by dc8ecd38a7e54b8bb80ae97712a0d8ad4edcbed3