]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
21 months agoconfig, lib-settings: Add filter count to binary config file
Timo Sirainen [Mon, 22 May 2023 20:21:18 +0000 (23:21 +0300)] 
config, lib-settings: Add filter count to binary config file

21 months agoconfig: Move writing delayed filter into config_dump_full_sections()
Timo Sirainen [Mon, 22 May 2023 21:18:29 +0000 (00:18 +0300)] 
config: Move writing delayed filter into config_dump_full_sections()

This simplifies the next commit.

21 months agolib-settings: Don't try to free nonexistent settings blocks when parsing settings
Timo Sirainen [Mon, 22 May 2023 20:04:20 +0000 (23:04 +0300)] 
lib-settings: Don't try to free nonexistent settings blocks when parsing settings

settings_mmap is no longer reused for parsing.

21 months agoconfig: config_export_init() - Add type safety check for callback's context parameter
Timo Sirainen [Thu, 1 Jun 2023 22:23:41 +0000 (01:23 +0300)] 
config: config_export_init() - Add type safety check for callback's context parameter

21 months agoconfig: Change config_request_callback_t() to have a struct parameter
Timo Sirainen [Mon, 22 May 2023 19:40:05 +0000 (22:40 +0300)] 
config: Change config_request_callback_t() to have a struct parameter

21 months agoconfig: Create settings_parsers lazily to filters
Timo Sirainen [Sat, 20 May 2023 20:53:01 +0000 (23:53 +0300)] 
config: Create settings_parsers lazily to filters

This also avoids checking/exporting parsers that haven't been modified.

21 months agolib-settings: Make settings_parser_unref(&NULL) no-op
Timo Sirainen [Sat, 20 May 2023 20:52:07 +0000 (23:52 +0300)] 
lib-settings: Make settings_parser_unref(&NULL) no-op

21 months agoconfig: Use config_module_parsers_get_setting() where possible
Timo Sirainen [Sat, 20 May 2023 20:21:00 +0000 (23:21 +0300)] 
config: Use config_module_parsers_get_setting() where possible

21 months agoconfig: Add config_module_parsers_get_setting()
Timo Sirainen [Sat, 20 May 2023 20:12:52 +0000 (23:12 +0300)] 
config: Add config_module_parsers_get_setting()

21 months agoconfig: Move global config_module_parsers into config_parsed.module_parsers
Timo Sirainen [Sat, 20 May 2023 18:51:37 +0000 (21:51 +0300)] 
config: Move global config_module_parsers into config_parsed.module_parsers

21 months agoconfig: Remove config_module_parser.settings
Timo Sirainen [Sat, 20 May 2023 18:40:29 +0000 (21:40 +0300)] 
config: Remove config_module_parser.settings

This was never actually used for anything.

21 months agolib-settings: Remove unused settings_parse_unalias()
Timo Sirainen [Sat, 20 May 2023 21:07:50 +0000 (00:07 +0300)] 
lib-settings: Remove unused settings_parse_unalias()

21 months agolib-settings: Remove unused settings_parse_get_filter()
Timo Sirainen [Sat, 20 May 2023 21:06:40 +0000 (00:06 +0300)] 
lib-settings: Remove unused settings_parse_get_filter()

21 months agoconfig: Add hash table to lookup setting keys more efficiently
Timo Sirainen [Sat, 20 May 2023 18:34:56 +0000 (21:34 +0300)] 
config: Add hash table to lookup setting keys more efficiently

The setting is now parsed only by the settings_parsers that actually have
the key.

21 months agolib-settings: Add settings_parse_keyidx_value[_nodup]()
Timo Sirainen [Sat, 20 May 2023 20:03:13 +0000 (23:03 +0300)] 
lib-settings: Add settings_parse_keyidx_value[_nodup]()

21 months agosubmission: Change login_greeting setting type to STR_VARS
Timo Sirainen [Sat, 20 May 2023 18:34:11 +0000 (21:34 +0300)] 
submission: Change login_greeting setting type to STR_VARS

The same setting is already STR_VARS in lmtp settings.

21 months agoconfig: Rename <plugin>_set_roots symbol to <plugin>_set_infos
Timo Sirainen [Sat, 20 May 2023 18:09:57 +0000 (21:09 +0300)] 
config: Rename <plugin>_set_roots symbol to <plugin>_set_infos

All external plugins' settings must be updated to use the new symbol.

21 months agoconfig: Rename "root" variables to "info" where appropriate
Timo Sirainen [Sat, 20 May 2023 18:08:32 +0000 (21:08 +0300)] 
config: Rename "root" variables to "info" where appropriate

21 months agoconfig: Rename config_module_parser.root to .info
Timo Sirainen [Sat, 20 May 2023 18:05:24 +0000 (21:05 +0300)] 
config: Rename config_module_parser.root to .info

21 months agoconfig: Rename all_[default_]roots to all_[default_]infos
Timo Sirainen [Sat, 20 May 2023 18:03:03 +0000 (21:03 +0300)] 
config: Rename all_[default_]roots to all_[default_]infos

All settings are now root settings.

21 months agolib-settings: Remove unused settings_parse_line()
Timo Sirainen [Fri, 19 May 2023 13:04:42 +0000 (16:04 +0300)] 
lib-settings: Remove unused settings_parse_line()

21 months agolib-settings: test-settings-parser - Parse settings with keyvalue instead of line
Timo Sirainen [Fri, 19 May 2023 13:04:22 +0000 (16:04 +0300)] 
lib-settings: test-settings-parser - Parse settings with keyvalue instead of line

21 months agoconfig: config_apply_exact_line() - replace line parameter with value parameter
Timo Sirainen [Fri, 19 May 2023 13:02:24 +0000 (16:02 +0300)] 
config: config_apply_exact_line() - replace line parameter with value parameter

21 months agoconfig: config_apply_line() - replace line parameter with value parameter
Timo Sirainen [Fri, 19 May 2023 12:16:20 +0000 (15:16 +0300)] 
config: config_apply_line() - replace line parameter with value parameter

21 months agoconfig: Split config_parser_context.str into key_path and value
Timo Sirainen [Fri, 19 May 2023 12:38:19 +0000 (15:38 +0300)] 
config: Split config_parser_context.str into key_path and value

21 months agolib-settings: Fix logic for overriding alias settings
Timo Sirainen [Sat, 27 May 2023 20:37:20 +0000 (23:37 +0300)] 
lib-settings: Fix logic for overriding alias settings

21 months agoconfig: settings-get.pl - Require some reasonable Perl version
Timo Sirainen [Mon, 29 May 2023 12:05:28 +0000 (15:05 +0300)] 
config: settings-get.pl - Require some reasonable Perl version

21 months agoconfig: settings-get.pl - Add comments
Timo Sirainen [Sat, 20 May 2023 22:07:27 +0000 (01:07 +0300)] 
config: settings-get.pl - Add comments

21 months agoconfig: settings-get.pl - Rename parsers variable to infos
Timo Sirainen [Sat, 20 May 2023 22:05:01 +0000 (01:05 +0300)] 
config: settings-get.pl - Rename parsers variable to infos

21 months agoconfig: settings-get.pl - Always add forward declarations for info structs
Timo Sirainen [Sat, 20 May 2023 21:54:30 +0000 (00:54 +0300)] 
config: settings-get.pl - Always add forward declarations for info structs

This way they don't need to be set explicitly for ext_check() functions to
compile in config/all-settings.c.

21 months agoconfig: settings-get.pl - Reindent without tabs
Timo Sirainen [Sat, 20 May 2023 21:35:00 +0000 (00:35 +0300)] 
config: settings-get.pl - Reindent without tabs

21 months agoconfig: settings-get.pl - Don't remove "static const" from master_default_settings
Timo Sirainen [Sat, 20 May 2023 21:30:08 +0000 (00:30 +0300)] 
config: settings-get.pl - Don't remove "static const" from master_default_settings

This is unnecessary nowadays.

21 months agoconfig: settings-get.pl - Clean up variables
Timo Sirainen [Sat, 20 May 2023 21:27:48 +0000 (00:27 +0300)] 
config: settings-get.pl - Clean up variables

21 months agoconfig: settings-get.pl - Change state from a number to name
Timo Sirainen [Sat, 20 May 2023 21:25:37 +0000 (00:25 +0300)] 
config: settings-get.pl - Change state from a number to name

21 months agoconfig: settings-get.pl - Remove checks for default_* named setting_parser_infos
Timo Sirainen [Sat, 20 May 2023 21:21:04 +0000 (00:21 +0300)] 
config: settings-get.pl - Remove checks for default_* named setting_parser_infos

These no longer exist.

21 months agoconfig: settings-get.pl - Remove ifdef handling for services
Timo Sirainen [Sat, 20 May 2023 21:14:29 +0000 (00:14 +0300)] 
config: settings-get.pl - Remove ifdef handling for services

This was necessary only for tcpwrap service, which was already removed.

21 months agoconfig: settings-get.pl - Fix to work with "use warnings"
Timo Sirainen [Fri, 19 May 2023 13:58:51 +0000 (16:58 +0300)] 
config: settings-get.pl - Fix to work with "use warnings"

21 months agoglobal: Remove setting_parser_info.dependencies
Timo Sirainen [Sat, 20 May 2023 21:49:01 +0000 (00:49 +0300)] 
global: Remove setting_parser_info.dependencies

The dependency tracking is no longer needed.

21 months agolib-settings: Remove struct setting_link
Timo Sirainen [Wed, 10 May 2023 14:47:38 +0000 (17:47 +0300)] 
lib-settings: Remove struct setting_link

21 months agolib-settings: Remove "link" parameter from functions
Timo Sirainen [Wed, 10 May 2023 14:46:51 +0000 (17:46 +0300)] 
lib-settings: Remove "link" parameter from functions

The link is always ctx->root.

21 months agolib-settings: Remove unused settings_parse_get_prev_info()
Timo Sirainen [Wed, 10 May 2023 14:40:46 +0000 (17:40 +0300)] 
lib-settings: Remove unused settings_parse_get_prev_info()

21 months agolib-settings, global: Remove unused setting_parser_info.type_offset1
Timo Sirainen [Sun, 14 May 2023 21:28:03 +0000 (00:28 +0300)] 
lib-settings, global: Remove unused setting_parser_info.type_offset1

21 months agoconfig: config_apply_line() - Remove unused section_name parameter
Timo Sirainen [Wed, 10 May 2023 14:39:47 +0000 (17:39 +0300)] 
config: config_apply_line() - Remove unused section_name parameter

21 months agoconfig: old-set-parser - Remove support for socket { .. }
Timo Sirainen [Wed, 10 May 2023 14:32:31 +0000 (17:32 +0300)] 
config: old-set-parser - Remove support for socket { .. }

This was in Dovecot v1.x and it's not working anymore with named filters.

21 months agoconfig: Reduce config_export_context memory usage
Timo Sirainen [Tue, 16 May 2023 23:03:37 +0000 (02:03 +0300)] 
config: Reduce config_export_context memory usage

21 months agoconfig: Remove unused config_export_context.prefix
Timo Sirainen [Tue, 16 May 2023 22:59:34 +0000 (01:59 +0300)] 
config: Remove unused config_export_context.prefix

21 months agolib-settings, config: Simplify SET_STRLIST parsing
Timo Sirainen [Wed, 10 May 2023 14:25:14 +0000 (17:25 +0300)] 
lib-settings, config: Simplify SET_STRLIST parsing

The settings are now internally sent as strlist/key=value rather than
strlist/0/key=value. This change makes the "links" hash table in
settings_parser unnecessary.

21 months agolib-settings: Require pool_offset1 to be always set
Timo Sirainen [Sun, 14 May 2023 21:36:18 +0000 (00:36 +0300)] 
lib-settings: Require pool_offset1 to be always set

21 months agolib-settings: Move settings_parse_strlist()
Timo Sirainen [Wed, 10 May 2023 14:18:02 +0000 (17:18 +0300)] 
lib-settings: Move settings_parse_strlist()

21 months agolib-settings: Remove unused settings_dup*()
Timo Sirainen [Sun, 14 May 2023 21:34:47 +0000 (00:34 +0300)] 
lib-settings: Remove unused settings_dup*()

21 months agolib-settings, config: Remove DEFLIST and DEFLIST_UNIQUE setting types
Timo Sirainen [Wed, 10 May 2023 13:44:11 +0000 (16:44 +0300)] 
lib-settings, config: Remove DEFLIST and DEFLIST_UNIQUE setting types

21 months agoglobal: Remove unused DEFLIST macros
Timo Sirainen [Wed, 10 May 2023 13:27:48 +0000 (16:27 +0300)] 
global: Remove unused DEFLIST macros

21 months agoauth: Convert passdbs and userdbs to named array filter
Timo Sirainen [Wed, 10 May 2023 12:32:32 +0000 (15:32 +0300)] 
auth: Convert passdbs and userdbs to named array filter

21 months agomaster: Convert unix/file/fifo_listeners to named array filter
Timo Sirainen [Tue, 9 May 2023 17:03:45 +0000 (20:03 +0300)] 
master: Convert unix/file/fifo_listeners to named array filter

21 months agoglobal: Remove stddef.h includes
Timo Sirainen [Mon, 8 May 2023 19:57:19 +0000 (22:57 +0300)] 
global: Remove stddef.h includes

It's already included in lib.h

21 months agoconfig: Remove unused CONFIG_DUMP_FLAG_HIDE_LIST_DEFAULTS
Timo Sirainen [Mon, 8 May 2023 19:50:09 +0000 (22:50 +0300)] 
config: Remove unused CONFIG_DUMP_FLAG_HIDE_LIST_DEFAULTS

21 months agomaster: Convert services to named array filter
Timo Sirainen [Fri, 5 May 2023 14:16:29 +0000 (17:16 +0300)] 
master: Convert services to named array filter

21 months agoglobal: Set service listener settings via strings
Timo Sirainen [Mon, 8 May 2023 14:33:09 +0000 (17:33 +0300)] 
global: Set service listener settings via strings

21 months agosubmission-login: Add default submissions port 465
Timo Sirainen [Mon, 15 May 2023 22:06:14 +0000 (01:06 +0300)] 
submission-login: Add default submissions port 465

The code was already half there, but accidentally left out.

21 months agoconfig, lib-master: Add support for services to set defaults via strings
Timo Sirainen [Mon, 8 May 2023 14:09:34 +0000 (17:09 +0300)] 
config, lib-master: Add support for services to set defaults via strings

21 months agoconfig: Add support for changing the default settings internally
Timo Sirainen [Mon, 8 May 2023 13:44:20 +0000 (16:44 +0300)] 
config: Add support for changing the default settings internally

Currently the default settings can be given only via the defaults struct.
With this change it's possible to separately track whether settings changes
are intended to be defaults or explicit configuration changes.

Only the explicit config changes are visible in e.g. "doveconf -n" output,
while all the changes will be written to the binary config file.

21 months agolib-settings: Add setting_parser_info.default_settings
Timo Sirainen [Mon, 8 May 2023 13:40:27 +0000 (16:40 +0300)] 
lib-settings: Add setting_parser_info.default_settings

This allows giving default settings via strings.

21 months agolib-settings: Add "change counter" number for change tracking
Timo Sirainen [Mon, 8 May 2023 10:08:28 +0000 (13:08 +0300)] 
lib-settings: Add "change counter" number for change tracking

21 months agolib-settings: Replace settings_mmap_pool.extra_pool_ref with pool_add_external_ref()
Timo Sirainen [Mon, 8 May 2023 12:37:40 +0000 (15:37 +0300)] 
lib-settings: Replace settings_mmap_pool.extra_pool_ref with pool_add_external_ref()

21 months agolib-storage: Convert mailboxes to named array filter
Timo Sirainen [Tue, 2 May 2023 13:27:56 +0000 (16:27 +0300)] 
lib-storage: Convert mailboxes to named array filter

21 months agolib-storage: Fix error handling if mailbox list iteration init fails
Timo Sirainen [Wed, 17 May 2023 14:12:17 +0000 (17:12 +0300)] 
lib-storage: Fix error handling if mailbox list iteration init fails

If the init failed, an error was set to the mailbox_list. However, this
didn't stop the iteration and the error was lost. This resulted in the
error being "BUG: Unknown internal list error".

21 months agoglobal: Use mailbox_get_settings() where possible
Timo Sirainen [Mon, 1 May 2023 21:34:00 +0000 (00:34 +0300)] 
global: Use mailbox_get_settings() where possible

21 months agolib-storage: mailbox_get_settings() - Return mailbox_settings instead of mail_storage...
Timo Sirainen [Mon, 1 May 2023 21:32:58 +0000 (00:32 +0300)] 
lib-storage: mailbox_get_settings() - Return mailbox_settings instead of mail_storage_settings

21 months agolib-storage: Avoid using mailbox_get_settings()
Timo Sirainen [Mon, 1 May 2023 21:32:00 +0000 (00:32 +0300)] 
lib-storage: Avoid using mailbox_get_settings()

All the callers can use box->storage->set directly.

21 months agoglobal: Use mailbox_list.event where possible
Timo Sirainen [Mon, 1 May 2023 20:50:42 +0000 (23:50 +0300)] 
global: Use mailbox_list.event where possible

21 months agolib-storage: Add mailbox_list.event
Timo Sirainen [Mon, 1 May 2023 21:01:51 +0000 (00:01 +0300)] 
lib-storage: Add mailbox_list.event

21 months agolib-storage: Convert namespaces to named array filter
Timo Sirainen [Wed, 26 Apr 2023 22:03:24 +0000 (01:03 +0300)] 
lib-storage: Convert namespaces to named array filter

21 months agolib-storage: Remove namespace { mail, mail_location } alias settings
Timo Sirainen [Thu, 27 Apr 2023 20:15:40 +0000 (23:15 +0300)] 
lib-storage: Remove namespace { mail, mail_location } alias settings

These haven't actually been used much, if at all. They also make the
following changes more complex.

21 months agolib-storage, imap: Add and use mail_storage_settings.parsed_have_special_use_mailboxes
Timo Sirainen [Wed, 26 Apr 2023 22:00:11 +0000 (01:00 +0300)] 
lib-storage, imap: Add and use mail_storage_settings.parsed_have_special_use_mailboxes

This avoids having to loop through the namespaces again to find if there are
any special-use mailboxes.

21 months agolib-storage: Move mail_namespace.special_use_mailboxes to mail_namespace_settings
Timo Sirainen [Mon, 1 May 2023 21:41:23 +0000 (00:41 +0300)] 
lib-storage: Move mail_namespace.special_use_mailboxes to mail_namespace_settings

21 months agolib-storage: Remove mail_namespace_settings.mail_set
Timo Sirainen [Wed, 26 Apr 2023 21:02:21 +0000 (00:02 +0300)] 
lib-storage: Remove mail_namespace_settings.mail_set

21 months agolib-storage: Move namespace alias_for validity check to master_service_settings.check...
Timo Sirainen [Wed, 26 Apr 2023 21:01:38 +0000 (00:01 +0300)] 
lib-storage: Move namespace alias_for validity check to master_service_settings.check_func()

21 months agolib-master, master: Remove service_settings.master_set
Timo Sirainen [Wed, 26 Apr 2023 20:35:54 +0000 (23:35 +0300)] 
lib-master, master: Remove service_settings.master_set

21 months agostats: Convert metrics to named array filter
Timo Sirainen [Wed, 26 Apr 2023 19:34:26 +0000 (22:34 +0300)] 
stats: Convert metrics to named array filter

21 months agostats: Convert event_exporters to named array filter
Timo Sirainen [Fri, 21 Apr 2023 12:01:48 +0000 (15:01 +0300)] 
stats: Convert event_exporters to named array filter

21 months agostats: Convert unit tests to initialize settings with the new settings API
Timo Sirainen [Fri, 21 Apr 2023 11:47:30 +0000 (14:47 +0300)] 
stats: Convert unit tests to initialize settings with the new settings API

21 months agolib-storage: Add "namespace" field to mailbox event
Timo Sirainen [Thu, 1 Jun 2023 20:10:49 +0000 (23:10 +0300)] 
lib-storage: Add "namespace" field to mailbox event

21 months agodict-redis: Implement new init() API
Timo Sirainen [Wed, 19 Apr 2023 13:38:52 +0000 (16:38 +0300)] 
dict-redis: Implement new init() API

21 months agodict-file: Implement new init() API
Timo Sirainen [Thu, 6 Apr 2023 20:42:06 +0000 (23:42 +0300)] 
dict-file: Implement new init() API

21 months agodict-fail: Implement new init() API
Timo Sirainen [Thu, 6 Apr 2023 20:30:24 +0000 (23:30 +0300)] 
dict-fail: Implement new init() API

21 months agodict-client: Implement new init() API
Timo Sirainen [Thu, 6 Apr 2023 20:29:16 +0000 (23:29 +0300)] 
dict-client: Implement new init() API

21 months agolib-dict: Move dict-client to lib-dict-extra
Timo Sirainen [Wed, 19 Apr 2023 12:30:59 +0000 (15:30 +0300)] 
lib-dict: Move dict-client to lib-dict-extra

The following commits make it depend on lib-master, so it's better outside
lib-dict.

21 months agodict-client: Remove unused client_dict.value_type
Timo Sirainen [Thu, 6 Apr 2023 20:14:34 +0000 (23:14 +0300)] 
dict-client: Remove unused client_dict.value_type

21 months agolib-dict: Replace dict_init() with a new dict_init_auto() API
Timo Sirainen [Thu, 6 Apr 2023 20:01:48 +0000 (23:01 +0300)] 
lib-dict: Replace dict_init() with a new dict_init_auto() API

21 months agodict: Rename dict_setting_parser_info to dict_server_setting_parser_info
Timo Sirainen [Wed, 19 Apr 2023 21:32:56 +0000 (00:32 +0300)] 
dict: Rename dict_setting_parser_info to dict_server_setting_parser_info

21 months agolib-dict, global: Rename struct dict_settings to dict_legacy_settings
Timo Sirainen [Wed, 19 Apr 2023 20:00:37 +0000 (23:00 +0300)] 
lib-dict, global: Rename struct dict_settings to dict_legacy_settings

21 months agolib-dict, global: Rename dict_vfuncs.init() to init_legacy()
Timo Sirainen [Thu, 6 Apr 2023 19:57:13 +0000 (22:57 +0300)] 
lib-dict, global: Rename dict_vfuncs.init() to init_legacy()

21 months agolib-dict, global: Rename dict_init() to dict_init_legacy()
Timo Sirainen [Thu, 6 Apr 2023 19:52:07 +0000 (22:52 +0300)] 
lib-dict, global: Rename dict_init() to dict_init_legacy()

21 months agolib-settings, config: Allow empty filter names if they are explicitly quoted
Timo Sirainen [Tue, 2 May 2023 09:16:31 +0000 (12:16 +0300)] 
lib-settings, config: Allow empty filter names if they are explicitly quoted

This will be required to keep allowing mailbox "" { ... } to be used for
matching the namespace prefix mailbox.

The empty name is now escaped as "\." string. It might have been possible
to make it work as an empty string, but it would have been rather confusing
(e.g. "mailbox= ", "mailbox//auto").

21 months agodoveconf: Strip named array filter prefix from keys
Timo Sirainen [Wed, 3 May 2023 20:06:06 +0000 (23:06 +0300)] 
doveconf: Strip named array filter prefix from keys

This way the output will be namespace { prefix } rather than
namespace { namespace_prefix }

21 months agolib-settings: Support automatic array filter name prefix in -o parameters
Timo Sirainen [Wed, 26 Apr 2023 19:50:09 +0000 (22:50 +0300)] 
lib-settings: Support automatic array filter name prefix in -o parameters

This allows using -o namespace/inbox/prefix instead of requiring the full
-o namespace/inbox/namespace_prefix.

21 months agoconfig: Track setting conflicts using the full setting name
Timo Sirainen [Wed, 10 May 2023 12:51:27 +0000 (15:51 +0300)] 
config: Track setting conflicts using the full setting name

This prevents warnings about mixing inet_listener { ssl } setting with the
global ssl setting.

21 months agoconfig: Support automatic array filter name prefix in settings
Timo Sirainen [Fri, 21 Apr 2023 14:33:31 +0000 (17:33 +0300)] 
config: Support automatic array filter name prefix in settings

This allows using namespace inbox { prefix } instead of requiring the full
namespace inbox { namespace_prefix }

21 months agolib-settings, config: Add support for named array filters
Timo Sirainen [Fri, 21 Apr 2023 12:19:11 +0000 (15:19 +0300)] 
lib-settings, config: Add support for named array filters

21 months agolib-settings: Change settings event filter matching to be case-sensitive
Timo Sirainen [Thu, 4 May 2023 15:36:28 +0000 (18:36 +0300)] 
lib-settings: Change settings event filter matching to be case-sensitive

This will be required for matching mailbox names, which are case-sensitive.