]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Wed, 15 Nov 2023 21:03:32 +0000 (23:03 +0200)]
lib-storage: mail_storage_vfuncs.autodetect() - Add mail_storage_settings parameter
Timo Sirainen [Sat, 28 Oct 2023 20:23:26 +0000 (23:23 +0300)]
lib-storage: Replace [FULL]DIRNAME with mailbox_directory_name[_legacy]
mailbox_directory_name_legacy=yes corresponds to DIRNAME, while "no"
corresponds to FULLDIRNAME. mailbox_directory_name specifies the name
in both cases.
Timo Sirainen [Sat, 28 Oct 2023 20:11:48 +0000 (23:11 +0300)]
lib-storage: Replace UTF-8 with mailbox_list_utf8 setting
Timo Sirainen [Sat, 28 Oct 2023 20:03:08 +0000 (23:03 +0300)]
lib-storage, listescape: Replace listescape_char with mailbox_list_storage_escape_char setting
This commit removes the listescape plugin entirely.
Timo Sirainen [Mon, 30 Oct 2023 19:57:30 +0000 (21:57 +0200)]
lib-storage: Add named filters for all mailbox list layouts
This allows giving them default settings.
Timo Sirainen [Fri, 27 Oct 2023 21:04:39 +0000 (00:04 +0300)]
lib-storage: Replace BROKENCHAR with mailbox_list_visible_escape_char setting
Timo Sirainen [Fri, 27 Oct 2023 20:00:55 +0000 (23:00 +0300)]
lib-storage: Replace INDEX with mail_index_path setting
Originally:
* No INDEX specified: mailbox_list_settings.index_dir = NULL,
i.e. use the default mail directory
* INDEX=MEMORY: mailbox_list_settings.index_dir = ""
After this commit:
* mail_index_path = "": Use the default mail directory
* mail_index_path = MEMORY
Timo Sirainen [Fri, 27 Oct 2023 19:15:19 +0000 (22:15 +0300)]
lib-storage: Replace INDEXPVT with mail_index_private_path setting
Timo Sirainen [Fri, 27 Oct 2023 19:05:55 +0000 (22:05 +0300)]
lib-storage: Replace INDEXCACHE with mail_index_cache_path setting
Timo Sirainen [Fri, 27 Oct 2023 18:55:54 +0000 (21:55 +0300)]
lib-storage: Replace CONTROL with mail_control_path setting
Timo Sirainen [Fri, 27 Oct 2023 12:52:53 +0000 (15:52 +0300)]
lib-storage: Replace ALT with mail_alt_path setting
Timo Sirainen [Fri, 27 Oct 2023 12:41:26 +0000 (15:41 +0300)]
lib-storage: Replace ALTNOCHECK with mail_alt_check setting
Timo Sirainen [Fri, 27 Oct 2023 12:38:57 +0000 (15:38 +0300)]
lib-storage: Replace LAYOUT with mailbox_list_layout setting
Timo Sirainen [Fri, 27 Oct 2023 12:19:25 +0000 (15:19 +0300)]
lib-storage: mail_storage_vfuncs.get_list_settings() - Add mail_storage_settings parameter
The value is NULL for now, but will be changed by the next commit.
Timo Sirainen [Fri, 29 Dec 2023 00:16:59 +0000 (19:16 -0500)]
lib-storage: mail_storage_create_list() - Add set_event parameter
Timo Sirainen [Fri, 27 Oct 2023 12:16:41 +0000 (15:16 +0300)]
lib-storage: mailbox_list_create() - Add mail_storage_settings parameter
Timo Sirainen [Fri, 27 Oct 2023 11:54:07 +0000 (14:54 +0300)]
lib-storage: Split off mail_storage_create_list()
Timo Sirainen [Fri, 27 Oct 2023 11:49:13 +0000 (14:49 +0300)]
lib-storage: Move calling get_list_settings() out of storage-specific autodetect()
Timo Sirainen [Fri, 27 Oct 2023 10:48:48 +0000 (13:48 +0300)]
lib-storage: Replace SUBSCRIPTIONS with mailbox_subscriptions_filename setting
Timo Sirainen [Fri, 27 Oct 2023 10:40:25 +0000 (13:40 +0300)]
lib-storage: Replace MAILBOXDIR with mailbox_root_directory_name setting
Timo Sirainen [Fri, 27 Oct 2023 09:12:14 +0000 (12:12 +0300)]
lib-storage: Replace VOLATILEDIR with mail_volatile_path setting
Timo Sirainen [Fri, 27 Oct 2023 08:49:41 +0000 (11:49 +0300)]
lib-storage: Replace LISTINDEX with mailbox_list_index_prefix setting
This also adds the initial infrastructure for storing unexpanded paths for
different mailbox list types.
Timo Sirainen [Fri, 27 Oct 2023 08:48:56 +0000 (11:48 +0300)]
lib-storage: Replace mailbox_list_set_get_root_path() with mailbox_list_default_get_root_path()
The new function takes mailbox_list as parameter, not mailbox_list_settings.
Timo Sirainen [Thu, 26 Oct 2023 10:06:51 +0000 (13:06 +0300)]
lib-storage: Replace ITERINDEX with mailbox_list_iter_from_index_dir setting
This removes the check that INDEX must also be set. It's not really
necessary, the setting's value just gets ignored then.
Timo Sirainen [Thu, 26 Oct 2023 10:01:34 +0000 (13:01 +0300)]
lib-storage: Replace KEEP-NOSELECT with mailbox_list_drop_noselect setting
Timo Sirainen [Thu, 26 Oct 2023 09:58:58 +0000 (12:58 +0300)]
lib-storage: Replace NO-FS-VALIDATION with mailbox_list_validate_fs_names setting
Timo Sirainen [Thu, 16 Nov 2023 23:20:32 +0000 (01:20 +0200)]
lib-storage: Support expanding ~/ to home directory in *_path settings
These settings will be added by the following commits.
Timo Sirainen [Thu, 21 Dec 2023 20:21:16 +0000 (15:21 -0500)]
lib-settings: Change variable expansion failure in default settings from panic to a regular error
Following commits add %{home} to default settings, which may fail to expand
if home directory isn't set.
Timo Sirainen [Thu, 30 Nov 2023 13:39:31 +0000 (15:39 +0200)]
lib-storage: Add mail_storage_2nd_settings_reset()
This isn't very useful yet in this commit, but following commits will
add more settings that are reset.
Timo Sirainen [Sat, 9 Dec 2023 23:30:34 +0000 (01:30 +0200)]
lib-settings: Expand %variables for SETTINGS_OVERRIDE_TYPE_DEFAULT settings
Timo Sirainen [Thu, 30 Nov 2023 12:49:41 +0000 (14:49 +0200)]
lib-settings: Add SETTINGS_OVERRIDE_TYPE_2ND_*
Timo Sirainen [Sat, 9 Dec 2023 21:05:51 +0000 (23:05 +0200)]
doveadm: Stop immediately if doveadm_mail_cmd_vfuncs.init() fails
Timo Sirainen [Thu, 16 Nov 2023 20:45:06 +0000 (22:45 +0200)]
global: Call settings_info_register() for all settings with default_filter_settings
Timo Sirainen [Thu, 16 Nov 2023 13:56:51 +0000 (15:56 +0200)]
lib-storage: Add mail_storage.set_info and fill it for all storages
Timo Sirainen [Thu, 16 Nov 2023 20:41:15 +0000 (22:41 +0200)]
lib-settings: Add settings_info_register()
Timo Sirainen [Thu, 16 Nov 2023 20:38:39 +0000 (22:38 +0200)]
lib-settings: Move path_element_count() earlier
Timo Sirainen [Wed, 15 Nov 2023 22:08:52 +0000 (00:08 +0200)]
lib-storage: Avoid unnecessary home lookup when path begins with ~user
Lookup home only when path begins with ~/, since it's the only one being
expanded to home.
Timo Sirainen [Wed, 15 Nov 2023 22:07:12 +0000 (00:07 +0200)]
lib-storage: Remove support for ~user/ expansion in paths
This was very confusing, because ~/ expanded to the home based on userdb or
configuration, while ~user/ expanded to a system user's home via getpwnam().
There shouldn't be any need to support ~user/, so reduce code complexity
by removing support for it.
Timo Sirainen [Wed, 15 Nov 2023 22:02:35 +0000 (00:02 +0200)]
lib-master: [info_|debug_]log_path - Remove support for ~/ and ~user/
It's not very clear what ~/ would have even expanded to, and in general
this feature seems unnecessary. Remove it to reduce code complexity.
Timo Sirainen [Fri, 27 Oct 2023 10:34:00 +0000 (13:34 +0300)]
lib-storage: Add named filters for all mailbox formats
This makes it possible to add settings inside e.g. sdbox { .. }
It will be needed by the next commits to add mailbox format-specific
default mailbox list settings.
Timo Sirainen [Mon, 27 Nov 2023 12:56:11 +0000 (14:56 +0200)]
lib-settings: Add SETTING_APPLY_FLAG_NO_EXPAND
Timo Sirainen [Mon, 27 Nov 2023 12:52:25 +0000 (14:52 +0200)]
lib-settings, global: Change setting_parser_info.setting_apply() API
Change override boolean to flags enum.
Timo Sirainen [Thu, 16 Nov 2023 23:10:04 +0000 (01:10 +0200)]
lib-settings, global: Allow setting_parser_info.setting_apply() to change the value
Timo Sirainen [Fri, 22 Dec 2023 15:24:28 +0000 (10:24 -0500)]
lib-settings, config: Support '/' in strlist and boollist keys
Use settings_section_[un]escape() for escaping.
Timo Sirainen [Thu, 28 Dec 2023 23:12:32 +0000 (18:12 -0500)]
lib-storage: If mail_user_created hook fails, don't continue calling the hooks
Timo Sirainen [Thu, 28 Dec 2023 22:17:59 +0000 (17:17 -0500)]
global: Use */filter for setting overrides
This makes sure the overridden settings are used regardless of namespace
settings.
Timo Sirainen [Thu, 28 Dec 2023 20:46:32 +0000 (15:46 -0500)]
lib-settings: Add */key=value override filter that applies to all named list filters
Normally key=value overrides only the global settings, not settings inside
named list filters. Using */key makes it override everything.
Timo Sirainen [Thu, 28 Dec 2023 22:23:38 +0000 (17:23 -0500)]
lib-storage: mail_*cache_fields - Allow using %variables
Timo Sirainen [Thu, 28 Dec 2023 20:43:45 +0000 (15:43 -0500)]
lib-settings, config: Use set_value_unknown for checking settings with %variables
config process runs [ext_]check_func()s, but it can't expand %variables.
So when config sees that there are %variables in a string, it assigns the
value to "set_value_unknown" pointer. The check_func()s can then skip
checking the validity of settings that point to set_value_unknown.
Timo Sirainen [Thu, 16 Nov 2023 23:30:26 +0000 (01:30 +0200)]
config: Fix parsing nested named (non-list) filters in default settings
Timo Sirainen [Sat, 2 Dec 2023 23:30:18 +0000 (01:30 +0200)]
lib: var_expand*() - If string ends with '%', return error
Timo Sirainen [Fri, 29 Dec 2023 13:48:35 +0000 (08:48 -0500)]
lib-settings: Update comments for settings_*get*()
Aki Tuomi [Mon, 20 Nov 2023 12:57:59 +0000 (14:57 +0200)]
lib-storage: shared - Copy shared namespace name to dynamically created shared namespace
This allows matching config for namespace specific settings
for shared namespaces too.
Karl Fleischmann [Tue, 14 Nov 2023 08:47:22 +0000 (09:47 +0100)]
lmtp: Allow setting of login greeting in SNI callback
Karl Fleischmann [Thu, 12 Oct 2023 13:43:18 +0000 (15:43 +0200)]
lmtp: Implement new conn_tls_sni_callback() callback
Karl Fleischmann [Tue, 14 Nov 2023 08:42:39 +0000 (09:42 +0100)]
lib-smtp: Wait for TLS handshake to finish before responding to client
Karl Fleischmann [Wed, 25 Oct 2023 10:19:34 +0000 (12:19 +0200)]
lib-smtp: Reload ssl settings on SNI callback
Karl Fleischmann [Thu, 12 Oct 2023 13:38:21 +0000 (15:38 +0200)]
lib-smtp: Trigger SNI callback on TLS handshake
Allow individual implementations to handle SNI callback in response to a
TLS handshake.
Karl Fleischmann [Tue, 12 Dec 2023 15:23:17 +0000 (16:23 +0100)]
lib-smtp: test-smtp-payload - Inject ssl settings into the SMTP server settings
This is necessary for the new SMTP SNI mechanism to succeed its settings
lookup.
Karl Fleischmann [Tue, 12 Dec 2023 15:21:06 +0000 (16:21 +0100)]
lib-smtp: test-smtp-payload - Clarify smtp server settings attribute
This will become important in a following commit, that adds another
settings attribute to the test_server data.
Karl Fleischmann [Thu, 4 Jan 2024 15:46:11 +0000 (16:46 +0100)]
lib-http: Specify post-handshake error-check
Marco Bettini [Mon, 13 Nov 2023 16:30:36 +0000 (16:30 +0000)]
plugins: quota-clone - Convert plugin settings to regular settings
Timo Sirainen [Fri, 29 Dec 2023 16:47:59 +0000 (11:47 -0500)]
doveconf: Cleanup - avoid unnecessary variables
Timo Sirainen [Thu, 23 Nov 2023 21:10:20 +0000 (23:10 +0200)]
config: doveconf - If filter_name exists, show filter_name_key under filter_name { key }
This isn't done for default settings, because it's too much effort to
implement. Also this isn't visible for the usual "doveconf -n" or
"doveconf -N" outputs. Normally people aren't looking at just "doveconf" or
"doveconf -d" output, so it likely doesn't matter.
Timo Sirainen [Wed, 15 Nov 2023 15:22:45 +0000 (17:22 +0200)]
config: Support automatic filter name setting prefixing for named non-list filters also
They were working only for named list filters. This also changes
filter_name { filter_name_key } settings (when "filter_name" string is the
same in both) to apply to the global filter_name_key setting instead of
adding it inside the named filter.
Timo Sirainen [Wed, 22 Nov 2023 21:55:13 +0000 (23:55 +0200)]
config: Refactor config_add_new_parser() API
Timo Sirainen [Wed, 22 Nov 2023 21:08:21 +0000 (23:08 +0200)]
config: Add comments to structs
Timo Sirainen [Wed, 22 Nov 2023 21:42:50 +0000 (23:42 +0200)]
config: Remove config_parser_context.key_path and config_section_stack.pathlen
Now that all settings are global, the only time when key_path is non-empty
is with strlist { .. } and boollist { .. } settings, and they can't have
nested hierarchies. There's no need for tracking a nested path in sections.
Timo Sirainen [Wed, 22 Nov 2023 21:26:04 +0000 (23:26 +0200)]
config: Remove config_section_stack.filter
It's available via filter_parser->filter.
This also fixes some issues with filters' parent hierarchy. At least a
parent named filter was ignored if it had a child named filter.
Timo Sirainen [Wed, 22 Nov 2023 20:44:32 +0000 (22:44 +0200)]
config: Remove config_section_stack.module_parsers
It's available via filter_parser->module_parsers.
Timo Sirainen [Wed, 22 Nov 2023 21:00:49 +0000 (23:00 +0200)]
config: Remove unused config_filter_parser.file_and_line
Timo Sirainen [Thu, 23 Nov 2023 19:40:49 +0000 (21:40 +0200)]
config: Set module parsers inside config_dump_human_init()
Deduplicates the code a bit.
Timo Sirainen [Mon, 13 Nov 2023 23:58:45 +0000 (01:58 +0200)]
doveadm: Fix error message if doveadm_mail_cmd_vfuncs.prerun() fails
Timo Sirainen [Tue, 7 Nov 2023 21:26:06 +0000 (23:26 +0200)]
lib-storage, global: Remove namespace_location setting
Replaced by namespace { mail_location } setting.
Timo Sirainen [Tue, 7 Nov 2023 11:02:15 +0000 (13:02 +0200)]
lib-storage: mail_namespaces_init_finish() - Add user helper variable
Timo Sirainen [Thu, 2 Nov 2023 12:52:31 +0000 (14:52 +0200)]
lib-storage: Change shared namespace location to use %{owner_*} variables
* %%u -> %{owner_user}
* %%n -> %{owner_username}
* %%d -> %{owner_domain}
* %%h -> %{owner_home}
Namespace prefix for now keeps using %%u, %%n and %%d.
Timo Sirainen [Tue, 7 Nov 2023 11:08:09 +0000 (13:08 +0200)]
lib-storage: Simplify dynamic shared namespace check
It doesn't make any sense to have a namespace location contains
user-specific path if the namespace prefix doesn't have the user template.
Timo Sirainen [Thu, 2 Nov 2023 11:09:07 +0000 (13:09 +0200)]
lib-storage: mail_storage_create() - Remove unused driver parameter
Timo Sirainen [Thu, 2 Nov 2023 11:06:01 +0000 (13:06 +0200)]
lib-storage: Remove unused mail_storage_create_full()
Timo Sirainen [Wed, 1 Nov 2023 15:03:41 +0000 (17:03 +0200)]
lib-storage: Remove mailbox_driver setting
This will be added back later as mailbox { mail_driver }.
Timo Sirainen [Wed, 1 Nov 2023 14:57:43 +0000 (16:57 +0200)]
lib-storage: raw storage - Avoid using mail_storage_create() driver parameter
It will be removed in a later commit.
Timo Sirainen [Wed, 1 Nov 2023 14:47:30 +0000 (16:47 +0200)]
lib-storage: Add and use MAIL_STORAGE_FLAG_SHARED_DYNAMIC for detecting dynamic namespace root
Timo Sirainen [Wed, 1 Nov 2023 14:35:05 +0000 (16:35 +0200)]
lib-storage: shared storage - Fix error message for failed storage creation
Dynamically created shared namespaces have no name, so use prefix instead.
Broken by
a2e8bcd7657e00db5334073479d8fb674b114415
Timo Sirainen [Wed, 1 Nov 2023 14:02:23 +0000 (16:02 +0200)]
lib-storage: Split off mail_namespaces_init_default_location()
Now mail_namespaces_init_location() is required to have non-NULL location
parameter.
Timo Sirainen [Wed, 1 Nov 2023 13:52:38 +0000 (15:52 +0200)]
lib-storage: Slightly refactor mail location lookup code
Timo Sirainen [Wed, 1 Nov 2023 13:37:22 +0000 (15:37 +0200)]
doveadm: Sync the inbox=yes namespace by default instead of empty location namespaces
This is hopefully good enough of a replacement. Later changes remove
the namespace_location setting, and later on even mail_location is split
into many settings. Those changes make the original behavior difficult to
preserve.
Timo Sirainen [Fri, 27 Oct 2023 10:31:19 +0000 (13:31 +0300)]
lib-storage: Change mailbox_list.mail_set to use also storage name-specific settings
Timo Sirainen [Thu, 2 Nov 2023 22:51:03 +0000 (00:51 +0200)]
lib-storage: Change mail_storage.event's parent to mail_user
The same storage can be shared between different mailbox_lists, so it
wasn't really correct before.
Timo Sirainen [Fri, 27 Oct 2023 10:18:47 +0000 (13:18 +0300)]
lib-storage: Change mailbox_list.mail_set to use namespace-specific settings
Timo Sirainen [Fri, 27 Oct 2023 10:11:21 +0000 (13:11 +0300)]
lib-storage: Remove mail_namespace.mail_set
It was just a pointer to mail_user.mail_set instead of namespace-specific
settings.
Timo Sirainen [Fri, 27 Oct 2023 10:10:00 +0000 (13:10 +0300)]
global: Avoid using mail_namespace.mail_set
Timo Sirainen [Fri, 27 Oct 2023 10:09:18 +0000 (13:09 +0300)]
lib-storage: Move MAIL_STORAGE_FLAG_KEEP_HEADER_MD5 flag handling later
The flag isn't needed earlier, and this will simplify the next commit.
Timo Sirainen [Tue, 14 Nov 2023 10:54:52 +0000 (12:54 +0200)]
lib-settings: Support accessing overrides for unknown named filters if SETTINGS_EVENT_FILTER_NAME is set
This is mainly intended for "doveadm fs" and similar commands' filter-name
parameter to work properly with overrides. For example:
doveadm -o obox/fs_driver=posix fs get obox testfile
The "doveadm fs" command execution never sees the obox settings, so it
doesn't know that obox/ prefix means that it's a filter name. However,
by "doveadm fs" does set SETTINGS_EVENT_FILTER_NAME=obox to the lookup
event, which now allows it to realize that it is.
Timo Sirainen [Tue, 14 Nov 2023 10:47:19 +0000 (12:47 +0200)]
lib-settings: Fix accessing override setting whose filter was just updated
set->key was stored before settings_override_filter_match() updated it,
causing the setting lookup to fail later on.
Timo Sirainen [Mon, 13 Nov 2023 14:11:49 +0000 (16:11 +0200)]
lib-settings: Fix handling overrides with named [list] filters
For example -o mail_location shouldn't override namespace inbox
{ mail_location }. It would need an explicit
-o namespace/inbox/mail_location.
Timo Sirainen [Mon, 13 Nov 2023 13:41:09 +0000 (15:41 +0200)]
lib-settings: Split off settings_instance_override_init()
Timo Sirainen [Mon, 13 Nov 2023 13:40:38 +0000 (15:40 +0200)]
lib-settings: Change settings_override.type to enum
Timo Sirainen [Mon, 13 Nov 2023 13:40:18 +0000 (15:40 +0200)]
lib-settings: Add comments to struct settings_override
Timo Sirainen [Wed, 8 Nov 2023 11:16:44 +0000 (13:16 +0200)]
config: Disable global setting order check for named [list] filters
If the configuration has e.g.:
mail_location = mdbox:...
namespace virtual {
mail_location = virtual:...
}
...
mail_location = sdbox:...
There's no need to log a warning about the second mail_location not
overriding the virtual namespace's mail_location. And the second
mail_location could be there because it's easier to write tests in
that way in CI.
Timo Sirainen [Mon, 13 Nov 2023 23:40:13 +0000 (01:40 +0200)]
lib-storage: raw-storage - Replace userdb_fields with code_override_fields
This way any -o parameters can't override raw user's settings.