]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Karl Fleischmann [Thu, 14 Sep 2023 09:09:54 +0000 (11:09 +0200)]
plugins/push-notification: push_notification_driver_ox_init_global() - Allow nested http-client settings
Karl Fleischmann [Thu, 7 Sep 2023 11:55:19 +0000 (13:55 +0200)]
plugins/push-notification: push_notification_driver_ox_deinit - Remove incorrect ATTR_UNUSED
Karl Fleischmann [Thu, 7 Sep 2023 11:54:18 +0000 (13:54 +0200)]
plugins/push-notification: push_notification_driver_dlog_process_msg - Remove incorrect ATTR_UNUSED
Karl Fleischmann [Thu, 7 Sep 2023 11:35:58 +0000 (13:35 +0200)]
plugins/push-notification: Rewrite push notification driver config initialization
Replace the old config lookup mechanism - a per-driver parsing of a
settings-string and a subsequent creation of a config hash-map - with a
new settings-based mechanism. This way each driver can now access its
native settings directly. For this to work the driver identification and
initialization needs to be adapted, as well.
Karl Fleischmann [Thu, 7 Sep 2023 10:23:38 +0000 (12:23 +0200)]
plugins/push-notification: push-notification-settings - Add new settings API infrastructure
Karl Fleischmann [Fri, 25 Aug 2023 12:36:48 +0000 (14:36 +0200)]
plugins/push-notification: push-notification-driver-ox - Use http_client_init_auto() to initialize http client
Karl Fleischmann [Mon, 11 Sep 2023 13:58:24 +0000 (15:58 +0200)]
plugins/push-notification: push_notification_driver_lua_init() - Simplify resolving the script's path
Karl Fleischmann [Mon, 7 Aug 2023 08:36:55 +0000 (10:36 +0200)]
plugins/push-notification: push-notification-driver-lua - Rename push_notification_lua_script_file to push_notification_lua_script_path
Markus Valentin [Mon, 28 Aug 2023 06:41:11 +0000 (08:41 +0200)]
notify-status: Convert notify_status_mailboxN setting to a per mailbox setting
Rather than using:
plugin {
notify_status_mailbox = inbox
notify_status_mailbox2 = TestBox
}
This can now be configured by mailbox filters:
mailbox inbox {
notify_status_mailbox = yes
}
mailbox TestBox {
notify_status_mailbox = yes
}
Markus Valentin [Fri, 4 Aug 2023 08:58:02 +0000 (10:58 +0200)]
notify-status: Convert plugin settings to normal settings
Timo Sirainen [Fri, 25 Aug 2023 20:11:08 +0000 (16:11 -0400)]
lib-http, global: Add request_ to http_client_max_redirects and http_client_*max_attempts
This makes it consistent with http_client_request_*timeout settings.
Timo Sirainen [Fri, 25 Aug 2023 19:59:32 +0000 (15:59 -0400)]
lib-dict: Don't crash if init_legacy() isn't supported by dict driver
Timo Sirainen [Fri, 25 Aug 2023 19:52:28 +0000 (15:52 -0400)]
lib-dict-extra: test-dict-fs - Convert to use dict_init_auto()
Timo Sirainen [Thu, 24 Aug 2023 19:36:36 +0000 (15:36 -0400)]
doveconf: Read configuration in its own data stack frame
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 [Mon, 14 Aug 2023 23:01:46 +0000 (19:01 -0400)]
lib-settings: Use only the same setting root's settings
Timo Sirainen [Fri, 11 Aug 2023 20:00:45 +0000 (23:00 +0300)]
lib-settings: Support %{variables} also with strlist settings
Timo Sirainen [Fri, 11 Aug 2023 21:41:23 +0000 (00:41 +0300)]
fts: Fix potential memory leaks when init() fails
Timo Sirainen [Fri, 11 Aug 2023 18:59:18 +0000 (21:59 +0300)]
dict-fs: Implement new init() API
Timo Sirainen [Fri, 11 Aug 2023 14:20:23 +0000 (17:20 +0300)]
lib-settings: Add settings_root_find() and settings_instance_find()
Timo Sirainen [Thu, 10 Aug 2023 22:31:02 +0000 (01:31 +0300)]
util: test-fs - Change to fs_init_auto() API
Timo Sirainen [Thu, 10 Aug 2023 22:23:42 +0000 (01:23 +0300)]
lib-storage: Change mailboxes_fs to be initialized with fs_init_auto()
Timo Sirainen [Thu, 10 Aug 2023 22:15:04 +0000 (01:15 +0300)]
lib-fs: Change unit tests to use fs_init_auto()
Timo Sirainen [Thu, 10 Aug 2023 22:14:16 +0000 (01:14 +0300)]
lib-settings: Add settings_simple_*() API
This is mainly intended to easily provide settings for unit tests.
Timo Sirainen [Thu, 10 Aug 2023 22:02:00 +0000 (01:02 +0300)]
lib-settings: Make settings_instance_free(&NULL) no-op
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 [Thu, 10 Aug 2023 09:14:37 +0000 (12:14 +0300)]
doveadm dict: Split functions in preparation for "doveadm mail dict" commands
Timo Sirainen [Thu, 10 Aug 2023 09:13:25 +0000 (12:13 +0300)]
doveadm dict iter: Move iter-specific parameter handling to cmd_dict_iter()
Timo Sirainen [Thu, 10 Aug 2023 09:05:56 +0000 (12:05 +0300)]
doveadm dict: Remove unused code
Timo Sirainen [Thu, 10 Aug 2023 08:57:18 +0000 (11:57 +0300)]
doveadm dict: Change dict-uri parameter to filter-name
This makes it work similarly to "doveadm fs".
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 08:57:00 +0000 (11:57 +0300)]
lib-storage: Add MAIL_STORAGE_SERVICE_FLAG_MINIMAL_USER_INIT
This is needed/used only by the obox format currently.
Timo Sirainen [Mon, 7 Aug 2023 08:56:52 +0000 (11:56 +0300)]
lib-storage: Add mail_storage_service_get_flags()
Timo Sirainen [Mon, 7 Aug 2023 08:16:44 +0000 (11:16 +0300)]
doveadm fs: Split functions in preparation for "doveadm mail fs" commands
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.:
doveadm \
-o fs_parent/fs_driver=posix \
-o fs_driver=randomfail \
-o fs_randomfail_ops/read=50 \
fs get "" /path/to/file
Note that currently the order of fs_driver settings is important here,
because the first match is used. This may change in the future.
Timo Sirainen [Sun, 30 Jul 2023 15:32:13 +0000 (18:32 +0300)]
lib-http: Make http_client_request_error() public
Timo Sirainen [Sat, 29 Jul 2023 18:47:00 +0000 (21:47 +0300)]
doveadm compress: Use compression_handler.create_ostream_auto() API
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 [Sat, 29 Jul 2023 18:06:41 +0000 (21:06 +0300)]
imap: COMPRESS - Use create_ostream_auto() API
The compression level can now be configured using the compression settings.
Timo Sirainen [Sat, 29 Jul 2023 18:03:39 +0000 (21:03 +0300)]
lib-compression: ostream-zstd - Add support for create_ostream_auto() API
Timo Sirainen [Sat, 29 Jul 2023 17:57:54 +0000 (20:57 +0300)]
lib-compression: ostream-lz4 - Add support for create_ostream_auto() API
Timo Sirainen [Sat, 29 Jul 2023 17:56:33 +0000 (20:56 +0300)]
lib-compression: ostream-bzlib - Add support for create_ostream_auto() API
Timo Sirainen [Sat, 29 Jul 2023 17:49:34 +0000 (20:49 +0300)]
lib-compression: ostream-zlib - Add support for create_ostream_auto() API
Timo Sirainen [Sat, 29 Jul 2023 17:48:59 +0000 (20:48 +0300)]
lib-compression: Prepare support for reading settings for ostreams via event
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 11:20:27 +0000 (14:20 +0300)]
lib-storage: mailbox_list_init_fs() - Don't allow NULL parent event
There are no callers that use NULL.
Timo Sirainen [Fri, 28 Jul 2023 12:53:00 +0000 (15:53 +0300)]
fs-test: Implement new init() API
Timo Sirainen [Fri, 28 Jul 2023 12:52:28 +0000 (15:52 +0300)]
fs-metawrap: Implement new init() API
Timo Sirainen [Fri, 28 Jul 2023 12:50:48 +0000 (15:50 +0300)]
fs-randomfail: Implement new init() API
Timo Sirainen [Fri, 28 Jul 2023 12:42:20 +0000 (15:42 +0300)]
fs-sis-queue: Implement new init() API
Timo Sirainen [Fri, 28 Jul 2023 12:37:12 +0000 (15:37 +0300)]
fs-sis: Implement new init() API
Timo Sirainen [Fri, 28 Jul 2023 10:52:39 +0000 (13:52 +0300)]
fs-posix: Implement new init() API
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 [Fri, 28 Jul 2023 10:22:17 +0000 (13:22 +0300)]
fs-dict: Implement new init() API
Timo Sirainen [Mon, 31 Jul 2023 11:29:44 +0000 (14:29 +0300)]
lib-fs: Don't crash if fs_vfuncs.legacy_init() isn't implemented
Timo Sirainen [Wed, 30 Aug 2023 21:07:18 +0000 (17:07 -0400)]
lib-fs: Add fs_init_parent()
This simplifies initializing parent fs for wrapper filesystems.
Timo Sirainen [Fri, 28 Jul 2023 09:56:14 +0000 (12:56 +0300)]
lib-fs: Add fs_init_auto()
Timo Sirainen [Thu, 27 Jul 2023 12:53:54 +0000 (15:53 +0300)]
lib-fs, global: Rename fs_init() to fs_legacy_init()
Timo Sirainen [Fri, 28 Jul 2023 09:41:49 +0000 (12:41 +0300)]
lib-fs: Move calling fs_vfuncs.init() out of fs_alloc()
Timo Sirainen [Fri, 28 Jul 2023 09:39:12 +0000 (12:39 +0300)]
lib-fs: Move auto-loading of fs_class into fs_alloc()
Timo Sirainen [Fri, 28 Jul 2023 09:38:26 +0000 (12:38 +0300)]
lib-fs: Move fs_alloc() later
Timo Sirainen [Fri, 28 Jul 2023 09:35:48 +0000 (12:35 +0300)]
lib-fs: Fill all struct fs fields before calling init()
This simplifies the following changes.
Timo Sirainen [Fri, 28 Jul 2023 09:49:50 +0000 (12:49 +0300)]
lib-fs: Remove event_parent parameter from fs_vfuncs.init()
fs->event should be used instead.
Timo Sirainen [Thu, 27 Jul 2023 12:38:11 +0000 (15:38 +0300)]
lib-storage: Rename mail_user_init_fs_settings() to mail_user_init_fs_parameters()
Timo Sirainen [Thu, 27 Jul 2023 12:27:23 +0000 (15:27 +0300)]
lib-fs, global: Rename fs_settings to fs_parameters
These are internal parameters. A later commit will add back fs_settings
where the settings are coming from config file.
Timo Sirainen [Thu, 27 Jul 2023 12:02:31 +0000 (15:02 +0300)]
lib-fs: remove struct fs.set
Only set.enable_timing was used, and it can be in its own field.
Timo Sirainen [Thu, 27 Jul 2023 11:55:11 +0000 (14:55 +0300)]
lib-fs, global: Move fs_settings.event_parent to dict_init() parameter
Timo Sirainen [Thu, 27 Jul 2023 11:48:15 +0000 (14:48 +0300)]
lib-dict-extra: dict-fs - Forward dict's event_parent to fs
Timo Sirainen [Thu, 27 Jul 2023 11:42:46 +0000 (14:42 +0300)]
lib-fs, global: Remove fs_settings.debug
The debugging can be enabled via parent event.
Timo Sirainen [Thu, 27 Jul 2023 11:45:06 +0000 (14:45 +0300)]
global: Replace fs_settings.debug with parent event that has debugging enabled
Timo Sirainen [Thu, 27 Jul 2023 11:19:36 +0000 (14:19 +0300)]
lib-fs: Remove unused fs_init_from_string()
Timo Sirainen [Thu, 27 Jul 2023 11:19:08 +0000 (14:19 +0300)]
mail-crypt: test-fs-crypt - Replace fs_init_from_string() with fs_init()
There was no benefit in using it.
Timo Sirainen [Fri, 28 Jul 2023 09:29:34 +0000 (12:29 +0300)]
lib-fs: Remove obsolete comment
Use of T_END_PASS_STR_IF() removed the kludge.
Timo Sirainen [Sat, 29 Jul 2023 10:53:41 +0000 (13:53 +0300)]
global: Remove unnecessary settings-parser.h includes
It's already included by including settings.h.
Timo Sirainen [Sat, 29 Jul 2023 10:50:02 +0000 (13:50 +0300)]
lib-settings: settings.h - Include settings-parser.h automatically
These are nowadays usually both included, so it simplifies the code.
Timo Sirainen [Sat, 29 Jul 2023 10:57:12 +0000 (13:57 +0300)]
lib-settings: settings-legacy - Rename setting_type to setting_legacy_type
This allows including both settings-parser.h and settings-legacy.h
Timo Sirainen [Wed, 23 Aug 2023 01:23:13 +0000 (21:23 -0400)]
config: Allow named array filters under named filters
This is needed for at least obox { crypt_global_private_key { .. } }
Timo Sirainen [Wed, 23 Aug 2023 01:21:15 +0000 (21:21 -0400)]
lib-settings: Make settings_root_deinit(&NULL) no-op
Timo Sirainen [Fri, 4 Aug 2023 13:03:12 +0000 (16:03 +0300)]
config: Fix using filter_name/strlist/key in default settings
Timo Sirainen [Fri, 28 Jul 2023 12:36:22 +0000 (15:36 +0300)]
lib-settings, config: Add support for SET_FILTER_HIERARCHY
Timo Sirainen [Mon, 24 Jul 2023 20:05:18 +0000 (23:05 +0300)]
lib-http, global: Rename http_client_no_* settings
Remove double negatives:
* http_client_proxy_no_ssl_tunnel -> http_client_proxy_ssl_tunnel
* http_client_no_auto_redirect -> http_client_auto_redirect
* http_client_no_auto_retry -> http_client_auto_retry
Timo Sirainen [Mon, 24 Jul 2023 20:09:11 +0000 (23:09 +0300)]
lib-http: Change http_client_settings.max_connect_attempts=1 behavior
Before 1 meant the same as 0, which means "try every IP once". But there
is no need for two values to mean the same, so now 1 means "try only 1
IP".
Timo Sirainen [Mon, 24 Jul 2023 19:48:25 +0000 (22:48 +0300)]
lib-http, global: Add and use http_client_settings_init()
Timo Sirainen [Mon, 24 Jul 2023 21:27:44 +0000 (00:27 +0300)]
lib-http: Add http_client_settings.read/write/delete_max_attempts
If they are non-zero, they override the max_attempts setting for the
specified HTTP methods.
Timo Sirainen [Mon, 24 Jul 2023 19:31:07 +0000 (22:31 +0300)]
lib-http: Add http_client_settings.read/write/delete_request_timeout
If they are non-zero, they override the request_timeout setting for the
specified HTTP methods.
Timo Sirainen [Mon, 24 Jul 2023 15:53:53 +0000 (18:53 +0300)]
lib-dns: dns_client_init() - Assert dns_client_socket_path isn't empty
It's easier to debug assert-crashes than seeing an empty error in logs.
Timo Sirainen [Mon, 24 Jul 2023 15:18:32 +0000 (18:18 +0300)]
auth: oauth2 - Use http_client_init_auto()
This adds oauth2 { .. } named filter, which can be used to override http
and ssl settings. The following settings were replaced:
* tls_ca_cert_file -> ssl_client_ca_file
* tls_ca_cert_dir -> ssl_client_ca_dir
* tls_cert_file -> ssl_client_cert
* tls_cipher_suite -> ssl_client_cipher_list
* rawlog_dir -> http_client_rawlog_dir
* timeout_msecs -> http_client_request_absolute_timeout
* max_idle_time_msecs -> http_client_max_idle_time
* max_parallel_connections -> http_client_max_parallel_connections
* max_pipelined_requests -> http_client_max_pipelined_requests
* tls_allow_invalid_cert -> http_client_allow_invalid_cert
Timo Sirainen [Mon, 24 Jul 2023 15:15:30 +0000 (18:15 +0300)]
lib-oauth2, auth: Set HTTP absolute request timeout via http_client_settings
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, 27 Jun 2023 21:10:43 +0000 (00:10 +0300)]
lib-http, global: Drop _msecs and _secs suffixes from http_client_* settings
Keep the suffixes in the code, but drop them from the configuration file.
Timo Sirainen [Tue, 27 Jun 2023 21:00:08 +0000 (00:00 +0300)]
lib-http: Add http_client_init_[private_]auto()
Timo Sirainen [Wed, 2 Aug 2023 22:29:01 +0000 (01:29 +0300)]
lib-http: http_client_connection_get_settings() - Support being called with NULL peer
Use the connection's last assigned http_client's settings even after
the connection is detached from it, until a new http_client is assigned.
Timo Sirainen [Tue, 27 Jun 2023 20:52:55 +0000 (23:52 +0300)]
lib-http, global: Change http_client_settings into registered settings
Timo Sirainen [Tue, 25 Jul 2023 07:20:21 +0000 (10:20 +0300)]
lib-http: Change http_client_settings.socket_*_buffer_size types to uoff_t
This simplifies the following changes.
Timo Sirainen [Tue, 25 Jul 2023 07:19:23 +0000 (10:19 +0300)]
lib-http: Expand http_client_settings.response_hdr_limits to separate settings
This simplifies the following changes.
Timo Sirainen [Tue, 25 Jul 2023 07:17:01 +0000 (10:17 +0300)]
lib-http: Fix storing dns_client_socket_path to http_client_context
It wasn't safe to point it directly to http_client's settings, since the
client could become destroyed.
Timo Sirainen [Tue, 25 Jul 2023 07:14:32 +0000 (10:14 +0300)]
lib-http: Handle empty settings strings the same as NULLs
This will be needed by the following changes.
Timo Sirainen [Tue, 27 Jun 2023 20:36:24 +0000 (23:36 +0300)]
lib-http: Change http_client.set to be a pointer
Simplifies the following commits.