]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agolib: data-stack - Don't keep largest unused block in memory
Timo Sirainen [Mon, 16 Nov 2020 22:32:45 +0000 (00:32 +0200)] 
lib: data-stack - Don't keep largest unused block in memory

It's not that expensive to allocate it again, but it might be expensive to
keep allocated a block that became huge due to a bug. The huge block could
be just wasting memory without ever being used again.

4 years agolib: data-stack - Add unit test for data_stack_set_clean_after_pop()
Timo Sirainen [Mon, 16 Nov 2020 16:09:44 +0000 (18:09 +0200)] 
lib: data-stack - Add unit test for data_stack_set_clean_after_pop()

4 years agolib: data-stack - Rename variables in clean_after_pop handling
Timo Sirainen [Mon, 16 Nov 2020 16:08:57 +0000 (18:08 +0200)] 
lib: data-stack - Rename variables in clean_after_pop handling

These new variables make more sense than the old ones.

4 years agolib: data-stack - Rename lowwater to left_lowwater
Timo Sirainen [Mon, 16 Nov 2020 16:06:55 +0000 (18:06 +0200)] 
lib: data-stack - Rename lowwater to left_lowwater

This describes its behavior better. Also add a comment explaining what
exactly it is.

4 years agolib: data-stack - Rename block_space_used[] to block_space_left[]
Timo Sirainen [Mon, 16 Nov 2020 15:57:39 +0000 (17:57 +0200)] 
lib: data-stack - Rename block_space_used[] to block_space_left[]

This describes its behavior better. Also add a comment explaining what
exactly it is.

4 years agolib: data-stack - Use INITIAL_STACK_SIZE without growing it to nearest power
Timo Sirainen [Mon, 16 Nov 2020 13:25:36 +0000 (15:25 +0200)] 
lib: data-stack - Use INITIAL_STACK_SIZE without growing it to nearest power

4 years agoglobal: Never use t_push(NULL)
Timo Sirainen [Wed, 31 Mar 2021 10:13:22 +0000 (13:13 +0300)] 
global: Never use t_push(NULL)

A non-NULL name is expected by the debug logging.

4 years agolib: Recalculate events' debug logging state after replacing event filters
Timo Sirainen [Wed, 31 Mar 2021 10:11:16 +0000 (13:11 +0300)] 
lib: Recalculate events' debug logging state after replacing event filters

4 years agolib-index: test-mail-index-sync-ext - Fix memory leak
Timo Sirainen [Mon, 3 May 2021 16:40:23 +0000 (19:40 +0300)] 
lib-index: test-mail-index-sync-ext - Fix memory leak

4 years agolib-smtp: smtp-server-transaction - Make sure current data command is recorded as...
Stephan Bosch [Mon, 12 Apr 2021 20:43:57 +0000 (22:43 +0200)] 
lib-smtp: smtp-server-transaction - Make sure current data command is recorded as soon as possible.

This prevents crashes when replies are sent early. This also prevents crashes
when invalid DATA commands are sent in succession.

4 years agolib-smtp: smtp-server-transaction - Rename smtp_server_transaction_last_data() to...
Stephan Bosch [Mon, 12 Apr 2021 20:50:48 +0000 (22:50 +0200)] 
lib-smtp: smtp-server-transaction - Rename smtp_server_transaction_last_data() to smtp_server_transaction_data_command().

4 years agolib-smtp: smtp-server-recipient - Rename smtp_server_recipient_last_data() to smtp_se...
Stephan Bosch [Mon, 12 Apr 2021 20:46:17 +0000 (22:46 +0200)] 
lib-smtp: smtp-server-recipient - Rename smtp_server_recipient_last_data() to smtp_server_recipient_data_command().

4 years agologin-common: Add client.list_type to better track which linked list client belongs to
Timo Sirainen [Mon, 3 May 2021 11:07:44 +0000 (14:07 +0300)] 
login-common: Add client.list_type to better track which linked list client belongs to

Add asserts to make sure the client is always in the expected list.

4 years agologin-common: Fix handling destroyed_clients linked list
Timo Sirainen [Fri, 23 Apr 2021 13:43:36 +0000 (16:43 +0300)] 
login-common: Fix handling destroyed_clients linked list

The client needs to be removed from destroyed_clients linked list before
it's added to client_fd_proxies linked list.

Broken by 1c622cdbe08df2f642e28923c39894516143ae2a

4 years agolib-index: test-mail-index-sync-ext - Fix to link with the full libindex
Timo Sirainen [Sat, 6 Feb 2021 18:11:14 +0000 (20:11 +0200)] 
lib-index: test-mail-index-sync-ext - Fix to link with the full libindex

4 years agolib-index: Add/update comments related to cloning maps
Timo Sirainen [Tue, 2 Feb 2021 15:41:28 +0000 (17:41 +0200)] 
lib-index: Add/update comments related to cloning maps

4 years agolib-index: Don't call mail_index_modseq_sync_map_replaced() if nothing changed
Timo Sirainen [Tue, 2 Feb 2021 15:25:33 +0000 (17:25 +0200)] 
lib-index: Don't call mail_index_modseq_sync_map_replaced() if nothing changed

4 years agolib-index: Add comments to struct mail_transaction_log and related
Timo Sirainen [Tue, 2 Feb 2021 14:13:50 +0000 (16:13 +0200)] 
lib-index: Add comments to struct mail_transaction_log and related

4 years agolib-index: Rename MAIL_TRANSACTION_LOG_LOCK_CHANGE_TIMEOUT to .._DOTLOCK_..
Timo Sirainen [Tue, 2 Feb 2021 14:13:01 +0000 (16:13 +0200)] 
lib-index: Rename MAIL_TRANSACTION_LOG_LOCK_CHANGE_TIMEOUT to .._DOTLOCK_..

4 years agolib-index: Rename mail_transaction_log_file.lock_created to lock_create_time
Timo Sirainen [Tue, 2 Feb 2021 14:02:58 +0000 (16:02 +0200)] 
lib-index: Rename mail_transaction_log_file.lock_created to lock_create_time

4 years agolib-index: Move mail_transaction_log_file_get_modseq_next_offset() to its own file
Timo Sirainen [Tue, 2 Feb 2021 13:59:34 +0000 (15:59 +0200)] 
lib-index: Move mail_transaction_log_file_get_modseq_next_offset() to its own file

This nicely isolates the modseq_cache code to its own file.

4 years agolib-index: Remove unused mail_transaction_log_file.saved_tail_sync_offset
Timo Sirainen [Tue, 2 Feb 2021 13:26:08 +0000 (15:26 +0200)] 
lib-index: Remove unused mail_transaction_log_file.saved_tail_sync_offset

Shrinking tail_offsets have been ignored since
082e82792b8ac33ad42beac510441b37a3c50737

4 years agolib-index: Rename mail_transaction_log_file.saved_tail_offset to last_read_hdr_tail_o...
Timo Sirainen [Tue, 2 Feb 2021 13:24:53 +0000 (15:24 +0200)] 
lib-index: Rename mail_transaction_log_file.saved_tail_offset to last_read_hdr_tail_offset

This describes better what it's actually used for.

4 years agolib-index: Remove mail_transaction_log.nfs_flush
Timo Sirainen [Tue, 2 Feb 2021 13:07:02 +0000 (15:07 +0200)] 
lib-index: Remove mail_transaction_log.nfs_flush

Just access it via mail_index.flags like it's done elsewhere.

4 years agolib-index: Rename mail_transaction_log.dotlock_count to dotlock_refcount
Timo Sirainen [Tue, 2 Feb 2021 12:59:02 +0000 (14:59 +0200)] 
lib-index: Rename mail_transaction_log.dotlock_count to dotlock_refcount

Also change it to a signed integer and add asserts to make sure it's >=0.
This is how refcounts are handled generally in Dovecot.

4 years agolib-index: Update mail caching decisions explanation comment.
Timo Sirainen [Mon, 1 Feb 2021 21:05:50 +0000 (23:05 +0200)] 
lib-index: Update mail caching decisions explanation comment.

4 years agolib-index: Add test-mail-cache-fields unit test
Timo Sirainen [Mon, 1 Feb 2021 20:30:27 +0000 (22:30 +0200)] 
lib-index: Add test-mail-cache-fields unit test

4 years agolib-index: Add comments to struct mail_cache and related
Timo Sirainen [Mon, 1 Feb 2021 20:11:11 +0000 (22:11 +0200)] 
lib-index: Add comments to struct mail_cache and related

Also reorder some fields so the grouping makes more sense.

4 years agolib-index: Add comments to struct mail_cache_header and related
Timo Sirainen [Mon, 25 Jan 2021 19:10:32 +0000 (21:10 +0200)] 
lib-index: Add comments to struct mail_cache_header and related

4 years agolib-index: Add comments to mail-transaction-log.h
Timo Sirainen [Fri, 29 Jan 2021 17:11:36 +0000 (19:11 +0200)] 
lib-index: Add comments to mail-transaction-log.h

4 years agolib-index: Update mail_index_mail_flags comments and add MAIL_INDEX_MAIL_FLAG_UNUSED
Timo Sirainen [Mon, 25 Jan 2021 21:06:59 +0000 (23:06 +0200)] 
lib-index: Update mail_index_mail_flags comments and add MAIL_INDEX_MAIL_FLAG_UNUSED

4 years agolib-index: Add comments to struct mail_index_ext_header and related
Timo Sirainen [Mon, 25 Jan 2021 20:42:37 +0000 (22:42 +0200)] 
lib-index: Add comments to struct mail_index_ext_header and related

4 years agolib-index: Add comments to struct mail_index_header and related
Timo Sirainen [Mon, 25 Jan 2021 20:10:29 +0000 (22:10 +0200)] 
lib-index: Add comments to struct mail_index_header and related

4 years agolib-index: Add comments to struct mail_index_view
Timo Sirainen [Wed, 20 Jan 2021 17:22:06 +0000 (19:22 +0200)] 
lib-index: Add comments to struct mail_index_view

4 years agolib-index: Add comments and reorder fields in struct mail_index
Timo Sirainen [Wed, 20 Jan 2021 17:21:10 +0000 (19:21 +0200)] 
lib-index: Add comments and reorder fields in struct mail_index

The field ordering was pretty random for some fields. The new ordering
should make more sense.

4 years agolib-index: Rename mail_index.pending_log2_rotate_time to hdr_log2_rotate_time_delayed...
Timo Sirainen [Wed, 20 Jan 2021 16:43:27 +0000 (18:43 +0200)] 
lib-index: Rename mail_index.pending_log2_rotate_time to hdr_log2_rotate_time_delayed_update

This describes better what it does. Also add some comments explaining
what its purpose is.

4 years agolib-index: mail_index_expunge_handler_t - Remove seq and context parameters
Timo Sirainen [Sat, 6 Feb 2021 19:00:58 +0000 (21:00 +0200)] 
lib-index: mail_index_expunge_handler_t - Remove seq and context parameters

They're not actually used anywhere.

4 years agolib-index: mail_index_register_expunge_handler() - Remove call_always handling
Timo Sirainen [Mon, 25 Jan 2021 20:44:17 +0000 (22:44 +0200)] 
lib-index: mail_index_register_expunge_handler() - Remove call_always handling

It's not needed anymore.

4 years agolib-index: Remove "sync lost" callback handlers
Timo Sirainen [Wed, 20 Jan 2021 16:17:27 +0000 (18:17 +0200)] 
lib-index: Remove "sync lost" callback handlers

These were used to invalidate in-memory dovecot.index.cache cache with
mmap_disable=yes. This became unnecessary when cache file became
append-only.

4 years agolib-index: Move fields from struct mail_index to struct mail_index_error
Timo Sirainen [Wed, 20 Jan 2021 16:07:33 +0000 (18:07 +0200)] 
lib-index: Move fields from struct mail_index to struct mail_index_error

This clarifies which are error related fields.

nodiskspace isn't actually currently used for anything, but it seems
potentially useful in the future.

4 years agolib-index: Use mail_index_reset_error() when opening index
Timo Sirainen [Wed, 20 Jan 2021 16:04:40 +0000 (18:04 +0200)] 
lib-index: Use mail_index_reset_error() when opening index

This resets the error more cleanly than changing nodiskspace directly.

4 years agolib-index: Remove mail_index.index_lock_timeout
Timo Sirainen [Wed, 20 Jan 2021 16:01:03 +0000 (18:01 +0200)] 
lib-index: Remove mail_index.index_lock_timeout

Nothing needs it.

4 years agolib-index: Move fields from struct mail_index to struct mail_index_settings
Timo Sirainen [Wed, 20 Jan 2021 15:54:49 +0000 (17:54 +0200)] 
lib-index: Move fields from struct mail_index to struct mail_index_settings

This clarifies which fields are settings related.

4 years agolib-index: Remove mail_index_view.index_sync_view
Timo Sirainen [Wed, 20 Jan 2021 15:35:20 +0000 (17:35 +0200)] 
lib-index: Remove mail_index_view.index_sync_view

Nothing was using it.

4 years agolib-index: Remove mail_index_view.transactions and related functions
Timo Sirainen [Wed, 20 Jan 2021 15:34:01 +0000 (17:34 +0200)] 
lib-index: Remove mail_index_view.transactions and related functions

It's enough to have transaction_list, nothing needs the count.

4 years agolib-index: Change mail_index_view_get_transaction_count() into _have_transactions()
Timo Sirainen [Wed, 20 Jan 2021 15:31:36 +0000 (17:31 +0200)] 
lib-index: Change mail_index_view_get_transaction_count() into _have_transactions()

This allows removing mail_index_view.transactions in the next commit.

4 years agolib-index: Rename mail_index.last_read_log_* to main_index_hdr_log_*
Timo Sirainen [Wed, 20 Jan 2021 15:22:20 +0000 (17:22 +0200)] 
lib-index: Rename mail_index.last_read_log_* to main_index_hdr_log_*

Also update the comment to describe better what the variables do.

4 years agolib-index: Remove mail_index_map.hdr_base
Timo Sirainen [Tue, 19 Jan 2021 10:51:07 +0000 (12:51 +0200)] 
lib-index: Remove mail_index_map.hdr_base

It was just causing unnecessary complexity. Simpler to just keep
hdr_copy_buf always up-to-date and access it directly.

4 years agolib-index: MAIL_TRANSACTION_LOG_VERSION_* - Add also FEATURE_ suffix for feature...
Timo Sirainen [Fri, 29 Jan 2021 15:45:45 +0000 (17:45 +0200)] 
lib-index: MAIL_TRANSACTION_LOG_VERSION_* - Add also FEATURE_ suffix for feature macros

This more clearly differentiates them from the other
MAIL_TRANSACTION_LOG_VERSION_* macros

4 years agolib-index: Verify that keywords in dovecot.index header don't change unexpectedly
Timo Sirainen [Fri, 29 Jan 2021 15:03:34 +0000 (17:03 +0200)] 
lib-index: Verify that keywords in dovecot.index header don't change unexpectedly

Previously this was behind DEBUG for performance reasons, but that was only
because dovecot.index file used to be modified directly. Nowadays it's rare
that the index is being re-read within the same session (most changes are
read via dovecot.index.log), so it's better to verify that things are
working correctly.

4 years agolib-index: Add and use MAIL_INDEX_MAP_HDR_OFFSET() helper macro
Timo Sirainen [Tue, 19 Jan 2021 10:48:16 +0000 (12:48 +0200)] 
lib-index: Add and use MAIL_INDEX_MAP_HDR_OFFSET() helper macro

4 years agolib-index: Fill mail_index_map.hdr_copy_buf also when mmap()ing index
Timo Sirainen [Tue, 19 Jan 2021 10:42:02 +0000 (12:42 +0200)] 
lib-index: Fill mail_index_map.hdr_copy_buf also when mmap()ing index

This doesn't seem to have been necessary so far, but will be required by
the following changes.

4 years agoimap: Fix using SETMETADATA NIL to unset value
Timo Sirainen [Mon, 3 May 2021 10:15:17 +0000 (13:15 +0300)] 
imap: Fix using SETMETADATA NIL to unset value

Broken by 923362d27d9b2428e301614673cb0efba3bf928f

4 years agomaster: Explain how "client_limit is lower than required" is calculated in the warning
Timo Sirainen [Thu, 22 Apr 2021 08:36:40 +0000 (11:36 +0300)] 
master: Explain how "client_limit is lower than required" is calculated in the warning

4 years agostats: Use only one filter for stats and exports
Josef 'Jeff' Sipek [Wed, 21 Apr 2021 14:41:27 +0000 (10:41 -0400)] 
stats: Use only one filter for stats and exports

Since there is no way to have a exported-only metric (i.e., all metrics are
used for statistics calculations), the exported metrics are always a subset
of all metrics.  Additionally, since exported metrics have a non-NULL
exporter info while stats-only metrics have a NULL, it is very easy to check
if a given metric shoud be exported or not.

We can combine these facts and simplify the event matching.  We can simply
match against the "all metrics" filter, perform the statistics, and then
export the event if needed.

This reduces the CPU load quite dramatically since we are no longer
duplicating the matching for exported metrics.  Stats-only metrics shouldn't
see any measurable difference in performance.

4 years agolib: event filter - Extend existing queries if context matches (event_filter_parse)
Josef 'Jeff' Sipek [Wed, 21 Apr 2021 15:50:54 +0000 (11:50 -0400)] 
lib: event filter - Extend existing queries if context matches (event_filter_parse)

Since there is no practical difference between a filter with one query and a
filter with multiple queries using the same context pointer, we can extend
the existing queries as long as there is a context pointer match.  This
reduces the number of queries (and filter expressions) thereby increasing
future optimization opportunities.

4 years agolib: event filter - Extend existing queries if context matches (event_filter_merge_wi...
Josef 'Jeff' Sipek [Wed, 21 Apr 2021 15:47:51 +0000 (11:47 -0400)] 
lib: event filter - Extend existing queries if context matches (event_filter_merge_with_context*)

Since there is no practical difference between a filter with one query and a
filter with multiple queries using the same context pointer, we can extend
the existing queries as long as there is a context pointer match.  This
reduces the number of queries (and filter expressions) thereby increasing
future optimization opportunities.

4 years agolib: event filter - Extend existing queries if context matches (event_filter_add)
Josef 'Jeff' Sipek [Wed, 21 Apr 2021 15:42:55 +0000 (11:42 -0400)] 
lib: event filter - Extend existing queries if context matches (event_filter_add)

Since there is no practical difference between a filter with one query and a
filter with multiple queries using the same context pointer, we can extend
the existing queries as long as there is a context pointer match.  This
reduces the number of queries (and filter expressions) thereby increasing
future optimization opportunities.

4 years agolib: event filter - Move add_node higher up in the file to avoid a prototype
Josef 'Jeff' Sipek [Wed, 21 Apr 2021 15:52:27 +0000 (11:52 -0400)] 
lib: event filter - Move add_node higher up in the file to avoid a prototype

4 years agolib: event filter - Add filter op argument to add_node
Josef 'Jeff' Sipek [Wed, 21 Apr 2021 15:37:31 +0000 (11:37 -0400)] 
lib: event filter - Add filter op argument to add_node

4 years agolib: event filter - Generalize query construction helpers
Josef 'Jeff' Sipek [Wed, 21 Apr 2021 15:19:31 +0000 (11:19 -0400)] 
lib: event filter - Generalize query construction helpers

If instead of taking the internal query, they take a filter expression node,
they can be reused by optimizations in subsequent commits.

4 years agolib: Rename event_find_field() to event_find_field_nonrecursive() and make it public
Timo Sirainen [Mon, 26 Apr 2021 16:49:22 +0000 (19:49 +0300)] 
lib: Rename event_find_field() to event_find_field_nonrecursive() and make it public

4 years agolib: Reformat lib-event to avoid long lines
Timo Sirainen [Tue, 16 Mar 2021 17:13:23 +0000 (19:13 +0200)] 
lib: Reformat lib-event to avoid long lines

4 years agolib: Rename event_find_field*() to event_find_field_recursive*()
Timo Sirainen [Tue, 16 Mar 2021 17:09:06 +0000 (19:09 +0200)] 
lib: Rename event_find_field*() to event_find_field_recursive*()

This clarifies how it works.

4 years agolib: event_find_field() - Rewrite without using recursion
Timo Sirainen [Tue, 16 Mar 2021 16:26:20 +0000 (18:26 +0200)] 
lib: event_find_field() - Rewrite without using recursion

This simplifies the following change.

4 years agolib: event_match_field() - Avoid recursing event fields twice
Timo Sirainen [Tue, 9 Mar 2021 14:32:35 +0000 (16:32 +0200)] 
lib: event_match_field() - Avoid recursing event fields twice

event_find_field() is already recursive.

4 years agolib: Split off event_has_category_nonrecursive()
Timo Sirainen [Tue, 9 Mar 2021 14:31:20 +0000 (16:31 +0200)] 
lib: Split off event_has_category_nonrecursive()

4 years agolib-master: test-event-stats - Fix "large event id" test to check for END
Timo Sirainen [Thu, 11 Mar 2021 16:55:21 +0000 (18:55 +0200)] 
lib-master: test-event-stats - Fix "large event id" test to check for END

Otherwise the END would be visible in the next test.

4 years agolib-master: test-event-stats - Avoid busy-looping while waiting for "test done" file
Timo Sirainen [Thu, 11 Mar 2021 16:29:45 +0000 (18:29 +0200)] 
lib-master: test-event-stats - Avoid busy-looping while waiting for "test done" file

4 years agolib: event importing - Do not accept empty field name
Aki Tuomi [Wed, 27 Jan 2021 08:55:14 +0000 (10:55 +0200)] 
lib: event importing - Do not accept empty field name

4 years agolib: lib-event - Use named initializators for passthrough event
Aki Tuomi [Tue, 15 Dec 2020 07:15:56 +0000 (09:15 +0200)] 
lib: lib-event - Use named initializators for passthrough event

4 years agom4: Include local copy of pkg.m4
Aki Tuomi [Mon, 26 Apr 2021 12:39:36 +0000 (15:39 +0300)] 
m4: Include local copy of pkg.m4

We need features not present in early versions. The variable=name
support has been there since 1.7.4 of pkg-config.

4 years agolib-storage: Avoid logging the same mail istream read error multiple times
Timo Sirainen [Wed, 21 Apr 2021 16:18:07 +0000 (19:18 +0300)] 
lib-storage: Avoid logging the same mail istream read error multiple times

4 years agomaster: Notify systemd after we are really stopped
Aki Tuomi [Mon, 26 Apr 2021 09:02:58 +0000 (12:02 +0300)] 
master: Notify systemd after we are really stopped

4 years agoMakefile.am: Fix systemd detection mess in automake
Aki Tuomi [Mon, 26 Apr 2021 05:39:50 +0000 (08:39 +0300)] 
Makefile.am: Fix systemd detection mess in automake

4 years agodovecot.service: Set type to notify only when compiling with systemd
Aki Tuomi [Mon, 26 Apr 2021 05:29:02 +0000 (08:29 +0300)] 
dovecot.service: Set type to notify only when compiling with systemd

4 years agoMakefile.am: Make systemd service file generation more readable
Aki Tuomi [Mon, 26 Apr 2021 05:38:14 +0000 (08:38 +0300)] 
Makefile.am: Make systemd service file generation more readable

4 years agoconfigure.ac: Move CFLAGS to right place
Aki Tuomi [Mon, 26 Apr 2021 06:38:44 +0000 (09:38 +0300)] 
configure.ac: Move CFLAGS to right place

Now it's in middle of passdb displaying

4 years agolib-storage: Fix detecting duplicate nodes in mailbox list index
Timo Sirainen [Wed, 24 Mar 2021 14:09:51 +0000 (16:09 +0200)] 
lib-storage: Fix detecting duplicate nodes in mailbox list index

The duplicates were checked only for root nodes, not for child nodes.

4 years agodriver-mysql: Rollback a failed multi-statement transaction
Siavash Tavakoli [Thu, 8 Apr 2021 16:08:54 +0000 (17:08 +0100)] 
driver-mysql: Rollback a failed multi-statement transaction

If transaction failed, send "ROLLBACK" statement.

4 years agodriver-mysql: Avoid BEGIN/COMMIT for single statement transactions
Siavash Tavakoli [Wed, 7 Apr 2021 15:44:00 +0000 (16:44 +0100)] 
driver-mysql: Avoid BEGIN/COMMIT for single statement transactions

To reduce unnecessary load to database.

4 years agolib-imap: imap_bodystructure_write() - Return error on corruption instead of assert...
Timo Sirainen [Thu, 1 Apr 2021 17:39:27 +0000 (20:39 +0300)] 
lib-imap: imap_bodystructure_write() - Return error on corruption instead of assert-crash

This could happen if broken message_parts came from cache and
message_part->data was newly read from the mail input.

4 years agolib-storage: Split off index_mail_parse_bodystructure_full()
Timo Sirainen [Thu, 8 Apr 2021 12:04:42 +0000 (15:04 +0300)] 
lib-storage: Split off index_mail_parse_bodystructure_full()

4 years agolib-imap: fuzz-imap-bodystructure - Change failures to i_panic() instead of i_fatal()
Timo Sirainen [Fri, 9 Apr 2021 11:09:17 +0000 (14:09 +0300)] 
lib-imap: fuzz-imap-bodystructure - Change failures to i_panic() instead of i_fatal()

4 years agoNEWS: Mention XZ/LZMA removal.
Aki Tuomi [Thu, 4 Mar 2021 07:52:40 +0000 (09:52 +0200)] 
NEWS: Mention XZ/LZMA removal.

4 years agoNEWS: Update news for 2.3.14
Aki Tuomi [Tue, 2 Mar 2021 08:55:53 +0000 (10:55 +0200)] 
NEWS: Update news for 2.3.14

4 years agolib-smtp: smtp-params - Make explicit which extra parameters can be written by smtp_p...
Stephan Bosch [Tue, 30 Mar 2021 19:12:41 +0000 (21:12 +0200)] 
lib-smtp: smtp-params - Make explicit which extra parameters can be written by smtp_params_*_write().

This can be used to prevent sending unsupported parameters to the remote server,
even when these are listed in extra_parameters. Before, blindly proxying
parameters would cause MAIL/RCPT error replies from the remote server.

4 years agolib-smtp: smtp-client-connection - Explicitly specify which MAIL/RCPT parameters...
Stephan Bosch [Tue, 30 Mar 2021 19:06:58 +0000 (21:06 +0200)] 
lib-smtp: smtp-client-connection - Explicitly specify which MAIL/RCPT parameters are added by extra capabilities.

This is used in later commit to limit which custom parameters are actually sent
to the server based on the capabilities supported by said server.

4 years agolib-smtp: smtp-client-connection - Prevent recording extra capabilities from server...
Stephan Bosch [Tue, 30 Mar 2021 19:48:24 +0000 (21:48 +0200)] 
lib-smtp: smtp-client-connection - Prevent recording extra capabilities from server more than once.

4 years agolib-smtp: smtp-client-connection - Prevent duplicate registrations for extra capabili...
Stephan Bosch [Tue, 30 Mar 2021 19:45:33 +0000 (21:45 +0200)] 
lib-smtp: smtp-client-connection - Prevent duplicate registrations for extra capabilities.

4 years agolib-smtp: smtp-client-connection - Move smtp_client_connection_find_extra_capability().
Stephan Bosch [Wed, 31 Mar 2021 10:33:38 +0000 (12:33 +0200)] 
lib-smtp: smtp-client-connection - Move smtp_client_connection_find_extra_capability().

4 years agolib-smtp: smtp-client-connection - Change extra capability registration to use a...
Stephan Bosch [Tue, 30 Mar 2021 19:33:17 +0000 (21:33 +0200)] 
lib-smtp: smtp-client-connection - Change extra capability registration to use a struct.

This is needed for adding additional features in later commit.

4 years agolib-smtp: smtp-client-connection - Fix typo in function name.
Stephan Bosch [Tue, 30 Mar 2021 19:41:48 +0000 (21:41 +0200)] 
lib-smtp: smtp-client-connection - Fix typo in function name.

4 years agolmtp: lmtp-commands - Drop XRCPTFORWARD parameter once processed.
Stephan Bosch [Tue, 30 Mar 2021 22:06:29 +0000 (00:06 +0200)] 
lmtp: lmtp-commands - Drop XRCPTFORWARD parameter once processed.

This prevents it from popping up elsewhere. This for example crudely fixes a
problem in the proxy where XRCPTFORWARD was sent even without backend server support.

4 years agoimap: NOTIFY - Fix crash if client disconnects while sending FETCH notification ...
Timo Sirainen [Mon, 19 Apr 2021 09:46:44 +0000 (12:46 +0300)] 
imap: NOTIFY - Fix crash if client disconnects while sending FETCH notification (try #2)

Continues the incomplete fix for c4f4058d16096f23eea0b3182205d6653f5954dd

Fixes:
Panic: Trying to close mailbox INBOX with open transactions

4 years agologin-common: Fix memory leak if anvil query is aborted
Timo Sirainen [Fri, 16 Apr 2021 13:13:39 +0000 (16:13 +0300)] 
login-common: Fix memory leak if anvil query is aborted

4 years agovirtual: virtual-mail - Use index_mail_set_seq to ensure cleanup
Aki Tuomi [Fri, 16 Apr 2021 08:18:15 +0000 (11:18 +0300)] 
virtual: virtual-mail - Use index_mail_set_seq to ensure cleanup

Forgotten in 67ab2070cf513179382b564871f2a0f177987cc9

4 years agovirtual: virtual-mail - Pass wanted_headers and wanted_fields to backend mails only
Aki Tuomi [Fri, 16 Apr 2021 08:16:36 +0000 (11:16 +0300)] 
virtual: virtual-mail - Pass wanted_headers and wanted_fields to backend mails only

Broken in 67ab2070cf513179382b564871f2a0f177987cc9

4 years agovirtual: virtual-mail - Use index_mail_free
Aki Tuomi [Fri, 16 Apr 2021 07:01:45 +0000 (10:01 +0300)] 
virtual: virtual-mail - Use index_mail_free

Since we are using index_mail_init, we need to use index_mail_free
to free up the virtual mail.

4 years agovirtual: virtual-mail - Free wanted headers in close if we are freeing
Aki Tuomi [Fri, 16 Apr 2021 07:24:22 +0000 (10:24 +0300)] 
virtual: virtual-mail - Free wanted headers in close if we are freeing

Simplifies next change