Timo Sirainen [Tue, 22 Aug 2023 19:46:07 +0000 (15:46 -0400)]
config: Don't allow config file to contain key=value for lists or filters
For example although it's allowed to use "-o namespace=name1" to add a
new named array filter in command line, in config file this would just
cause confusion, so require namespace name1 { .. } instead.
Timo Sirainen [Tue, 15 Aug 2023 00:00:53 +0000 (20:00 -0400)]
lib-settings: Sort overridden settings by the key path's element count
This is especially important to get fs_parent/fs_parent/.. hierarchy to
work correctly. An alternative could have been to require specifying the
overridden settings in the correct order, but that would require a stable
merging algorithm to be used instead of qsort().
Timo Sirainen [Thu, 10 Aug 2023 10:53:30 +0000 (13:53 +0300)]
doveadm: Add "mail dict" commands
These are similar to "doveadm dict" commands, but they're run in the mail
user context. This way all user-specific settings are applied and process
uid/gid is also set properly.
Timo Sirainen [Mon, 7 Aug 2023 08:17:34 +0000 (11:17 +0300)]
doveadm: Add "mail fs" commands
These are similar to "doveadm fs" commands, but they're run in the mail user
context. This way all user-specific settings are applied and process
uid/gid is also set properly.
Timo Sirainen [Mon, 7 Aug 2023 06:08:45 +0000 (09:08 +0300)]
doveadm fs: Change fs-driver & fs-args parameters to filter-name
The filter-name refers to the filter section in config file that contains
the fs_driver and other necessary settings. It's also possible to specify
all necessary settings using -o parameter, e.g.:
Timo Sirainen [Sat, 29 Jul 2023 18:31:40 +0000 (21:31 +0300)]
fs-compress: Implement new fs.init() and compression_handler.create_ostream_auto() APIs
The compression method parameter is replaced by fs_compress_write_method
setting. An empty setting means writing with plaintext.
The old "maybe-" prefix is replaced by fs_compress_read_plain_fallback
setting.
Since there is no longer a single generic compression level parameter,
using level 0 to disable compression is replaced by using an empty
fs_compress_write_method value.
Timo Sirainen [Sat, 29 Jul 2023 18:22:28 +0000 (21:22 +0300)]
mail-compress: Use create_ostream_auto() API
mail_compress_save plugin setting is replaced by mail_compress_write_method.
mail_compress_save_level plugin setting is replaced by compression method
specific settings.
Timo Sirainen [Fri, 28 Jul 2023 11:26:05 +0000 (14:26 +0300)]
lib-storage: Replace mail_attachment_fs with mail_attachment filter
Replace e.g.:
mail_attachment_fs = posix:no-fsync
with:
mail_attachment {
fs_driver = posix
fs_posix_fsync = no
}
There is no longer a default mail_attachment { fs_driver }. It needs to be
set explicitly.
This also changes the mailbox_list_init_fs() API to use fs_init_filter().
Currently its only caller in core is this mail_attachment_fs.
If mail_attachment_dir is set, it now gives an error if
mail_attachment { ... } filter is not set. Previously an empty
mail_attachment_fs would have been ignored, although it likely wasn't used
much since its default was not empty.
Copying mails needed to remove full mail_attachment_fs comparison checks
between source and destination storage, because it's not practical anymore
to compare whether two FSes are the same. It's unlikely anyone would use
two incompatible FSes with the same mail_attachment_dir setting.
Timo Sirainen [Fri, 28 Jul 2023 10:40:12 +0000 (13:40 +0300)]
fs-posix: Remove mode=auto setting
This setting has never actually done anything. Its behavior of taking
created files' permissions from parent directory is actually controlled by
the parent directory's SETGID bit.
Timo Sirainen [Tue, 27 Jun 2023 21:34:39 +0000 (00:34 +0300)]
auth: auth-policy - Use http_client_init_auto()
This adds auth_policy { .. } named filter, which can be used to override
http settings. auth_policy_server_timeout_msecs setting is replaced by
auth_policy { http_client_request_absolute_timeout }.
Note that http_client_max_connect_attempts is not explicitly set anymore,
since it was already the default value (0 and 1 are currently the same,
but this will change in a later commit).
Timo Sirainen [Tue, 25 Jul 2023 06:49:06 +0000 (09:49 +0300)]
lib-http: http_client_connection_get_settings() - Assert that peer is non-NULL
This change is only temporary. A later commit reimplements it by using
the last assigned http_client's settings.
It shouldn't be possible with current code for peer to be NULL, so this
temporary change in behavior doesn't matter. If it had been possible for
peer to be NULL, the current code would have always returned empty
settings, since http_client_context.set is never set outside unit tests.
This is equivalent to the new way of explicitly returning default settings.