Timo Sirainen [Mon, 9 Jan 2023 16:33:12 +0000 (18:33 +0200)]
mail-crypt-acl: Fix logging while updating private keys for shared users
During userdb lookup the log prefix contained only the user being looked up
with no mention of the originating user. This was because
mail_storage_service_lookup() didn't see that there was any IO loop context
active, so it created a new log prefix. Fixed by simply removing the
explicit IO loop context [de]activate calls. The logging seems to work just
fine even without them.
Timo Sirainen [Tue, 9 Jan 2024 14:27:47 +0000 (09:27 -0500)]
lib-storage: Don't allow empty mail_path just because of MAILBOX_LIST_PROP_NO_ROOT
For example fs layout now has MAILBOX_LIST_PROP_NO_ROOT enabled, because
pop3c uses fs layout, even though it may not have a mail_path set. But
this shouldn't disable empty mail_path check for sdbox, which would crash
if it is attempted.
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.
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.
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.
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.
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.
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.
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.
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