]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
6 months agolib-storage: Use mail_ext_attachment prefix for settings related to external attachments
Timo Sirainen [Tue, 2 Jan 2024 02:09:24 +0000 (21:09 -0500)] 
lib-storage: Use mail_ext_attachment prefix for settings related to external attachments

This is mainly to differentiate them from mail_attachment_detection_options
setting, which is unrelated.

mail_attachment_dir setting was also renamed to mail_ext_attachment_path,
which causes settings parsing to automatically expand ~/ to home directory,
so it doesn't need to be done later on explicitly.

6 months agolib-storage: Support mailbox { mail_driver }
Timo Sirainen [Fri, 29 Dec 2023 15:44:35 +0000 (10:44 -0500)] 
lib-storage: Support mailbox { mail_driver }

Note that only the mail_driver setting is supported for now, no other
mail location settings. This preserves the original mailbox { driver }
setting's behavior.

6 months agolib-storage: mail_storage_create() - Add storage_r parameter
Timo Sirainen [Fri, 29 Dec 2023 15:46:10 +0000 (10:46 -0500)] 
lib-storage: mail_storage_create() - Add storage_r parameter

6 months agodsync: Fully separate sync users' settings
Timo Sirainen [Fri, 29 Dec 2023 21:28:33 +0000 (16:28 -0500)] 
dsync: Fully separate sync users' settings

When changing user2's settings the same changes were actually going into
user1's settings as well, since they both shared the same settings_instance.
Duplicate the service user to get the settings_instance separated as well.
This didn't really matter until now, because the changed settings weren't
used after the user initialization.

6 months agolib-storage: Add mail_storage_service_user_dup()
Timo Sirainen [Fri, 29 Dec 2023 21:27:19 +0000 (16:27 -0500)] 
lib-storage: Add mail_storage_service_user_dup()

6 months agoimapc: Silently show an empty storage if namespace is unusable
Timo Sirainen [Fri, 22 Dec 2023 20:17:45 +0000 (15:17 -0500)] 
imapc: Silently show an empty storage if namespace is unusable

When imapc is used as a shared namespace storage, users can try to
access nonexistent users. These will end up having a namespace with
NAMESPACE_FLAG_UNUSABLE set. Accessing such unusable namespace should
show it as empty, but there shouldn't be any errors logged.

6 months agoquota: maildir - Use INBOX namespace's mail_storage_settings
Timo Sirainen [Fri, 22 Dec 2023 19:19:56 +0000 (14:19 -0500)] 
quota: maildir - Use INBOX namespace's mail_storage_settings

6 months agoquota: maildir++ - Simplify INBOX namespace lookup
Timo Sirainen [Fri, 22 Dec 2023 19:18:35 +0000 (14:18 -0500)] 
quota: maildir++ - Simplify INBOX namespace lookup

The INBOX namespace always exists - there is no need to have a fallback.

6 months agodbox: Use storage-specific settings for dbox_mailbox_list_cleanup()
Timo Sirainen [Fri, 22 Dec 2023 19:15:21 +0000 (14:15 -0500)] 
dbox: Use storage-specific settings for dbox_mailbox_list_cleanup()

6 months agopop3: Use mail_storage_settings from inbox namespace
Timo Sirainen [Fri, 22 Dec 2023 19:09:56 +0000 (14:09 -0500)] 
pop3: Use mail_storage_settings from inbox namespace

6 months agolib-storage: Add mail_namespace_get_event()
Timo Sirainen [Fri, 22 Dec 2023 19:07:19 +0000 (14:07 -0500)] 
lib-storage: Add mail_namespace_get_event()

6 months agolib-storage, imap: Move mail_storage_settings.parsed_have_special_use_mailboxes to...
Timo Sirainen [Fri, 22 Dec 2023 19:02:15 +0000 (14:02 -0500)] 
lib-storage, imap: Move mail_storage_settings.parsed_have_special_use_mailboxes to mail_user

6 months agolib-storage: Check for namespaces' validity only once at mail_user init
Timo Sirainen [Fri, 22 Dec 2023 18:56:09 +0000 (13:56 -0500)] 
lib-storage: Check for namespaces' validity only once at mail_user init

There's no need to check them every time mail_storage_settings are looked
up.

6 months agodoveadm auth: Print mail_storage_service_lookup_next() error messages
Timo Sirainen [Sun, 17 Dec 2023 13:08:47 +0000 (15:08 +0200)] 
doveadm auth: Print mail_storage_service_lookup_next() error messages

Previously the commands could have just silently failed.

6 months agolib-settings, config: Override settings now ignore named (non-list) filters
Timo Sirainen [Fri, 15 Dec 2023 23:00:48 +0000 (01:00 +0200)] 
lib-settings, config: Override settings now ignore named (non-list) filters

For example if configuration has:

sdbox {
  mail_path = ~/sdbox
}

Then userdb or CLI -o parameter can override mail_path without having to
specify sdbox/ prefix. This makes the behavior easier to understand and
change, especially when overriding the default settings which are inside
named filters.

This does not apply to named list filters, e.g. if you have
namespace/inbox/mail_path set, it won't be overridden with just changing
mail_path.

6 months agoconfig: Enable global setting order check for named (non-list) filters
Timo Sirainen [Fri, 15 Dec 2023 22:07:14 +0000 (00:07 +0200)] 
config: Enable global setting order check for named (non-list) filters

The following commits change how setting overrides work for named (non-list)
filters. This change avoids having silently inconsistent behavior in config
file vs overrides.

6 months agolib-storage: shared - Remove check to see if shared namespace's storage exists
Timo Sirainen [Wed, 27 Dec 2023 18:18:18 +0000 (13:18 -0500)] 
lib-storage: shared - Remove check to see if shared namespace's storage exists

This doesn't work with imapc when local index files are used, because
mailbox_list_get_root_path() returns the index file location then. Just
because it doesn't exist yet doesn't mean that the namespace is unusable.

There is already a check to verify whether the user exists, which should be
enough.

6 months agolib-storage: Allow fs layout to have empty mail_path
Timo Sirainen [Wed, 27 Dec 2023 18:01:24 +0000 (13:01 -0500)] 
lib-storage: Allow fs layout to have empty mail_path

This has become necessary now  that mail_path can only be an empty string,
not NULL.

6 months agolib-storage: shared - Fix using proper namespace settings for shared users
Timo Sirainen [Sat, 2 Dec 2023 23:53:29 +0000 (01:53 +0200)] 
lib-storage: shared - Fix using proper namespace settings for shared users

6 months agolib-storage: shared - Fix handling nonexistent shared user init failure
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.

6 months agoconfig: Change global settings to override filter name-specific defaults
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.

6 months agodoveadm import: Replace source location parameter handling to not use mail_location
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.

6 months agodsync: Replace destination parameter handling to not use mail_location
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.

6 months agodsync: Remove -E (legacy-dsync) parameter and other traces of it
Timo Sirainen [Tue, 28 Nov 2023 14:22:44 +0000 (16:22 +0200)] 
dsync: Remove -E (legacy-dsync) parameter and other traces of it

The dsync symlink was already removed in
728baf6134b6207afb52b84ef45e05546a2a4740, so this is no longer used for
anything.

6 months agodsync: Remove -d (default-destination) parameter
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.

6 months agoauth: passwd-file - Remove support for "old" format
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.

6 months agolib-storage: Add default mail_path to mailbox formats
Timo Sirainen [Thu, 30 Nov 2023 09:47:26 +0000 (11:47 +0200)] 
lib-storage: Add default mail_path to mailbox formats

6 months agolib-storage: Improve location source string if mail storage init failed
Timo Sirainen [Thu, 28 Dec 2023 20:23:15 +0000 (15:23 -0500)] 
lib-storage: Improve location source string if mail storage init failed

6 months agolib-storage: Replace mail driver parameter with mail_driver setting
Timo Sirainen [Wed, 15 Nov 2023 22:35:22 +0000 (00:35 +0200)] 
lib-storage: Replace mail driver parameter with mail_driver setting

This commit also removes the mail_location setting entirely.

6 months agolib-storage: Remove empty struct mailbox_list_settings and related functions
Timo Sirainen [Mon, 30 Oct 2023 21:03:12 +0000 (23:03 +0200)] 
lib-storage: Remove empty struct mailbox_list_settings and related functions

6 months agolib-storage: Remove mail_storage_vfuncs.get_list_settings()
Timo Sirainen [Mon, 30 Oct 2023 21:00:51 +0000 (23:00 +0200)] 
lib-storage: Remove mail_storage_vfuncs.get_list_settings()

6 months agolib-storage: Replace mail root location parameter with mail_path setting
Timo Sirainen [Mon, 30 Oct 2023 20:58:50 +0000 (22:58 +0200)] 
lib-storage: Replace mail root location parameter with mail_path setting

6 months agolib-storage: Move empty root_dir check later
Timo Sirainen [Fri, 1 Dec 2023 20:45:14 +0000 (22:45 +0200)] 
lib-storage: Move empty root_dir check later

This simplifies the next commit, which requires the check to be done
later when the final mail_storage_settings are known.

6 months agolib-storage: Replace INBOX parameter with mail_inbox_path setting
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.

6 months agolib-storage: mail_storage_vfuncs.autodetect() - Change API to return root_path and...
Timo Sirainen [Wed, 15 Nov 2023 21:20:15 +0000 (23:20 +0200)] 
lib-storage: mail_storage_vfuncs.autodetect() - Change API to return root_path and inbox_path

This will be necessary once mailbox_list_settings is removed.

6 months agolib-storage: mail_storage_vfuncs.autodetect() - Add mail_storage_settings parameter
Timo Sirainen [Wed, 15 Nov 2023 21:03:32 +0000 (23:03 +0200)] 
lib-storage: mail_storage_vfuncs.autodetect() - Add mail_storage_settings parameter

6 months agolib-storage: Replace [FULL]DIRNAME with mailbox_directory_name[_legacy]
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.

6 months agolib-storage: Replace UTF-8 with mailbox_list_utf8 setting
Timo Sirainen [Sat, 28 Oct 2023 20:11:48 +0000 (23:11 +0300)] 
lib-storage: Replace UTF-8 with mailbox_list_utf8 setting

6 months agolib-storage, listescape: Replace listescape_char with mailbox_list_storage_escape_cha...
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.

6 months agolib-storage: Add named filters for all mailbox list layouts
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.

6 months agolib-storage: Replace BROKENCHAR with mailbox_list_visible_escape_char setting
Timo Sirainen [Fri, 27 Oct 2023 21:04:39 +0000 (00:04 +0300)] 
lib-storage: Replace BROKENCHAR with mailbox_list_visible_escape_char setting

6 months agolib-storage: Replace INDEX with mail_index_path 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

6 months agolib-storage: Replace INDEXPVT with mail_index_private_path setting
Timo Sirainen [Fri, 27 Oct 2023 19:15:19 +0000 (22:15 +0300)] 
lib-storage: Replace INDEXPVT with mail_index_private_path setting

6 months agolib-storage: Replace INDEXCACHE with mail_index_cache_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

6 months agolib-storage: Replace CONTROL with mail_control_path setting
Timo Sirainen [Fri, 27 Oct 2023 18:55:54 +0000 (21:55 +0300)] 
lib-storage: Replace CONTROL with mail_control_path setting

6 months agolib-storage: Replace ALT with mail_alt_path setting
Timo Sirainen [Fri, 27 Oct 2023 12:52:53 +0000 (15:52 +0300)] 
lib-storage: Replace ALT with mail_alt_path setting

6 months agolib-storage: Replace ALTNOCHECK with mail_alt_check setting
Timo Sirainen [Fri, 27 Oct 2023 12:41:26 +0000 (15:41 +0300)] 
lib-storage: Replace ALTNOCHECK with mail_alt_check setting

6 months agolib-storage: Replace LAYOUT with mailbox_list_layout setting
Timo Sirainen [Fri, 27 Oct 2023 12:38:57 +0000 (15:38 +0300)] 
lib-storage: Replace LAYOUT with mailbox_list_layout setting

6 months agolib-storage: mail_storage_vfuncs.get_list_settings() - Add mail_storage_settings...
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.

6 months agolib-storage: mail_storage_create_list() - Add set_event parameter
Timo Sirainen [Fri, 29 Dec 2023 00:16:59 +0000 (19:16 -0500)] 
lib-storage: mail_storage_create_list() - Add set_event parameter

6 months agolib-storage: mailbox_list_create() - Add mail_storage_settings parameter
Timo Sirainen [Fri, 27 Oct 2023 12:16:41 +0000 (15:16 +0300)] 
lib-storage: mailbox_list_create() - Add mail_storage_settings parameter

6 months agolib-storage: Split off mail_storage_create_list()
Timo Sirainen [Fri, 27 Oct 2023 11:54:07 +0000 (14:54 +0300)] 
lib-storage: Split off mail_storage_create_list()

6 months agolib-storage: Move calling get_list_settings() out of storage-specific autodetect()
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()

6 months agolib-storage: Replace SUBSCRIPTIONS with mailbox_subscriptions_filename setting
Timo Sirainen [Fri, 27 Oct 2023 10:48:48 +0000 (13:48 +0300)] 
lib-storage: Replace SUBSCRIPTIONS with mailbox_subscriptions_filename setting

6 months agolib-storage: Replace MAILBOXDIR with mailbox_root_directory_name setting
Timo Sirainen [Fri, 27 Oct 2023 10:40:25 +0000 (13:40 +0300)] 
lib-storage: Replace MAILBOXDIR with mailbox_root_directory_name setting

6 months agolib-storage: Replace VOLATILEDIR with mail_volatile_path setting
Timo Sirainen [Fri, 27 Oct 2023 09:12:14 +0000 (12:12 +0300)] 
lib-storage: Replace VOLATILEDIR with mail_volatile_path setting

6 months agolib-storage: Replace LISTINDEX with mailbox_list_index_prefix 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.

6 months agolib-storage: Replace mailbox_list_set_get_root_path() with mailbox_list_default_get_r...
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.

6 months agolib-storage: Replace ITERINDEX with mailbox_list_iter_from_index_dir setting
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.

6 months agolib-storage: Replace KEEP-NOSELECT with mailbox_list_drop_noselect setting
Timo Sirainen [Thu, 26 Oct 2023 10:01:34 +0000 (13:01 +0300)] 
lib-storage: Replace KEEP-NOSELECT with mailbox_list_drop_noselect setting

6 months agolib-storage: Replace NO-FS-VALIDATION with mailbox_list_validate_fs_names 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

6 months agolib-storage: Support expanding ~/ to home directory in *_path settings
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.

6 months agolib-settings: Change variable expansion failure in default settings from panic to...
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.

6 months agolib-storage: Add mail_storage_2nd_settings_reset()
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.

6 months agolib-settings: Expand %variables for SETTINGS_OVERRIDE_TYPE_DEFAULT settings
Timo Sirainen [Sat, 9 Dec 2023 23:30:34 +0000 (01:30 +0200)] 
lib-settings: Expand %variables for SETTINGS_OVERRIDE_TYPE_DEFAULT settings

6 months agolib-settings: Add SETTINGS_OVERRIDE_TYPE_2ND_*
Timo Sirainen [Thu, 30 Nov 2023 12:49:41 +0000 (14:49 +0200)] 
lib-settings: Add SETTINGS_OVERRIDE_TYPE_2ND_*

6 months agodoveadm: Stop immediately if doveadm_mail_cmd_vfuncs.init() fails
Timo Sirainen [Sat, 9 Dec 2023 21:05:51 +0000 (23:05 +0200)] 
doveadm: Stop immediately if doveadm_mail_cmd_vfuncs.init() fails

6 months agoglobal: Call settings_info_register() for all settings with default_filter_settings
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

6 months agolib-storage: Add mail_storage.set_info and fill it for all storages
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

6 months agolib-settings: Add settings_info_register()
Timo Sirainen [Thu, 16 Nov 2023 20:41:15 +0000 (22:41 +0200)] 
lib-settings: Add settings_info_register()

6 months agolib-settings: Move path_element_count() earlier
Timo Sirainen [Thu, 16 Nov 2023 20:38:39 +0000 (22:38 +0200)] 
lib-settings: Move path_element_count() earlier

6 months agolib-storage: Avoid unnecessary home lookup when path begins with ~user
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.

6 months agolib-storage: Remove support for ~user/ expansion in paths
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.

6 months agolib-master: [info_|debug_]log_path - Remove support for ~/ and ~user/
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.

6 months agolib-storage: Add named filters for all mailbox formats
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.

6 months agolib-settings: Add SETTING_APPLY_FLAG_NO_EXPAND
Timo Sirainen [Mon, 27 Nov 2023 12:56:11 +0000 (14:56 +0200)] 
lib-settings: Add SETTING_APPLY_FLAG_NO_EXPAND

6 months agolib-settings, global: Change setting_parser_info.setting_apply() API
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.

6 months agolib-settings, global: Allow setting_parser_info.setting_apply() to change the value
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

6 months agolib-settings, config: Support '/' in strlist and boollist keys
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.

6 months agolib-storage: If mail_user_created hook fails, don't continue calling the hooks
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

6 months agoglobal: Use */filter for setting overrides
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.

6 months agolib-settings: Add */key=value override filter that applies to all named list filters
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.

6 months agolib-storage: mail_*cache_fields - Allow using %variables
Timo Sirainen [Thu, 28 Dec 2023 22:23:38 +0000 (17:23 -0500)] 
lib-storage: mail_*cache_fields - Allow using %variables

6 months agolib-settings, config: Use set_value_unknown for checking settings with %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.

6 months agoconfig: Fix parsing nested named (non-list) filters in default settings
Timo Sirainen [Thu, 16 Nov 2023 23:30:26 +0000 (01:30 +0200)] 
config: Fix parsing nested named (non-list) filters in default settings

6 months agolib: var_expand*() - If string ends with '%', return error
Timo Sirainen [Sat, 2 Dec 2023 23:30:18 +0000 (01:30 +0200)] 
lib: var_expand*() - If string ends with '%', return error

6 months agolib-settings: Update comments for settings_*get*()
Timo Sirainen [Fri, 29 Dec 2023 13:48:35 +0000 (08:48 -0500)] 
lib-settings: Update comments for settings_*get*()

6 months agolib-storage: shared - Copy shared namespace name to dynamically created shared namespace
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.

6 months agolmtp: Allow setting of login greeting in SNI callback
Karl Fleischmann [Tue, 14 Nov 2023 08:47:22 +0000 (09:47 +0100)] 
lmtp: Allow setting of login greeting in SNI callback

6 months agolmtp: Implement new conn_tls_sni_callback() callback
Karl Fleischmann [Thu, 12 Oct 2023 13:43:18 +0000 (15:43 +0200)] 
lmtp: Implement new conn_tls_sni_callback() callback

6 months agolib-smtp: Wait for TLS handshake to finish before responding to client
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

6 months agolib-smtp: Reload ssl settings on SNI callback
Karl Fleischmann [Wed, 25 Oct 2023 10:19:34 +0000 (12:19 +0200)] 
lib-smtp: Reload ssl settings on SNI callback

6 months agolib-smtp: Trigger SNI callback on TLS handshake
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.

6 months agolib-smtp: test-smtp-payload - Inject ssl settings into the SMTP server settings
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.

6 months agolib-smtp: test-smtp-payload - Clarify smtp server settings attribute
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.

6 months agolib-http: Specify post-handshake error-check
Karl Fleischmann [Thu, 4 Jan 2024 15:46:11 +0000 (16:46 +0100)] 
lib-http: Specify post-handshake error-check

6 months agoplugins: quota-clone - Convert plugin settings to regular settings
Marco Bettini [Mon, 13 Nov 2023 16:30:36 +0000 (16:30 +0000)] 
plugins: quota-clone - Convert plugin settings to regular settings

6 months agodoveconf: Cleanup - avoid unnecessary variables
Timo Sirainen [Fri, 29 Dec 2023 16:47:59 +0000 (11:47 -0500)] 
doveconf: Cleanup - avoid unnecessary variables

6 months agoconfig: doveconf - If filter_name exists, show filter_name_key under filter_name...
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.

6 months agoconfig: Support automatic filter name setting prefixing for named non-list filters...
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.