Timo Sirainen [Thu, 28 Dec 2023 23:29:02 +0000 (18:29 -0500)]
lib-storage: shared - Fix handling nonexistent shared user init failure
mail_storage_service_lookup_next() isn't failing (anymore) for nonexistent
users just because the user doesn't exist. It can fail for other reasons
though, and we shouldn't ignore the failure since it can result in a crash
later on.
Timo Sirainen [Fri, 1 Dec 2023 11:04:51 +0000 (13:04 +0200)]
config: Change global settings to override filter name-specific defaults
Mainly this means that because we now have defaults like
sdbox/mail_path=~/sdbox, it should still be possible to override that
by changing the global mail_path setting.
Timo Sirainen [Thu, 30 Nov 2023 13:50:48 +0000 (15:50 +0200)]
doveadm import: Replace source location parameter handling to not use mail_location
The source location parameter is now in mail_driver:mail_path format.
For additional options use -d parameter to specify any source
storage specific settings, similar to how -o works for destination.
Timo Sirainen [Thu, 30 Nov 2023 13:41:16 +0000 (15:41 +0200)]
dsync: Replace destination parameter handling to not use mail_location
The destination parameter is now in mail_driver:mail_path format.
For additional options use -d parameter to specify any destination
storage specific settings, similar to how -o works for source.
Timo Sirainen [Tue, 28 Nov 2023 14:12:33 +0000 (16:12 +0200)]
dsync: Remove -d (default-destination) parameter
The replication plugin was already removed, so this shouldn't be necessary
either. Also with the mail_location setting split, this feature couldn't
work the same way anyway.
Timo Sirainen [Mon, 27 Nov 2023 21:40:59 +0000 (23:40 +0200)]
auth: passwd-file - Remove support for "old" format
The new format was added in v1.0, so it's unlikely the old format is still
being used. Also now that mail_location setting is split, the old format
wouldn't work anymore anyway.
Timo Sirainen [Mon, 30 Oct 2023 20:34:44 +0000 (22:34 +0200)]
lib-storage: Replace INBOX parameter with mail_inbox_path setting
This commit changes the Maildir INBOX default path when namespace_inbox=no.
Now the behavior is the same as with namespace_inbox=yes, i.e. INBOX is
created for Maildir/ root directory instead of Maildir/.INBOX/. Preserving
the original behavior would have been rather complex, and it likely doesn't
matter much, since INBOX isn't normally created for non-inbox namespaces
anyway. The original behavior can still be preserved by explicitly setting
mail_inbox_path= (to empty value) for the namespace_inbox=no namespaces.
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 [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 [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 [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 [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, 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: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.