]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
3 years agoplugins: fts - Add event to struct fts_parser_context
Marco Bettini [Mon, 1 Aug 2022 09:12:53 +0000 (09:12 +0000)] 
plugins: fts - Add event to struct fts_parser_context

3 years agoplugins: fts - Add event to struct fts_expunge_log
Marco Bettini [Thu, 28 Jul 2022 15:38:53 +0000 (15:38 +0000)] 
plugins: fts - Add event to struct fts_expunge_log

3 years agoplugins: fts - Add event to struct script_fts_parser
Marco Bettini [Thu, 28 Jul 2022 15:20:41 +0000 (15:20 +0000)] 
plugins: fts - Add event to struct script_fts_parser

3 years agoplugins: fts - Add event to struct fts_backend
Marco Bettini [Wed, 27 Jul 2022 12:40:43 +0000 (12:40 +0000)] 
plugins: fts - Add event to struct fts_backend

3 years agoplugins: charset-alias - Replace i_<log>() with e_<log>()
Marco Bettini [Tue, 12 Jul 2022 10:08:42 +0000 (10:08 +0000)] 
plugins: charset-alias - Replace i_<log>() with e_<log>()

3 years agoplugins: acl - Replace i_<log>() with e_<log>()
Marco Bettini [Thu, 7 Jul 2022 14:43:03 +0000 (14:43 +0000)] 
plugins: acl - Replace i_<log>() with e_<log>()

3 years agoplugins: struct acl_backend - Add event
Marco Bettini [Fri, 15 Jul 2022 13:23:23 +0000 (13:23 +0000)] 
plugins: struct acl_backend - Add event

3 years agoplugins: Remove stray whitespaces
Marco Bettini [Fri, 5 Aug 2022 08:48:55 +0000 (08:48 +0000)] 
plugins: Remove stray whitespaces

3 years agolib-storage: index/pop3c - Replace i_<log>() with e_<log>()
Marco Bettini [Fri, 8 Jul 2022 10:46:34 +0000 (10:46 +0000)] 
lib-storage: index/pop3c - Replace i_<log>() with e_<log>()

3 years agolib-storage: index/mbox - Replace i_<log>() with e_<log>()
Marco Bettini [Thu, 7 Jul 2022 08:01:10 +0000 (08:01 +0000)] 
lib-storage: index/mbox - Replace i_<log>() with e_<log>()

3 years agolib-storage: index/maildir - Replace i_<log>() with e_<log>()
Marco Bettini [Thu, 7 Jul 2022 08:01:09 +0000 (08:01 +0000)] 
lib-storage: index/maildir - Replace i_<log>() with e_<log>()

3 years agolib-storage: index/imapc - Replace i_<log>() with e_<log>()
Marco Bettini [Fri, 8 Jul 2022 13:11:49 +0000 (13:11 +0000)] 
lib-storage: index/imapc - Replace i_<log>() with e_<log>()

3 years agolib-storage: index/dbox-multi - Replace i_<log>() with e_<log>()
Marco Bettini [Thu, 7 Jul 2022 08:01:09 +0000 (08:01 +0000)] 
lib-storage: index/dbox-multi - Replace i_<log>() with e_<log>()

3 years agolib-storage: index/dbox-single - Replace i_<log>() with e_<log>()
Marco Bettini [Thu, 7 Jul 2022 08:01:09 +0000 (08:01 +0000)] 
lib-storage: index/dbox-single - Replace i_<log>() with e_<log>()

3 years agolib-storage: index/dbox-common - Replace i_<log>() with e_<log>()
Marco Bettini [Mon, 11 Jul 2022 07:30:58 +0000 (07:30 +0000)] 
lib-storage: index/dbox-common - Replace i_<log>() with e_<log>()

3 years agolib-storage: index - Replace i_<log>() with e_<log>()
Marco Bettini [Tue, 19 Jul 2022 12:27:04 +0000 (12:27 +0000)] 
lib-storage: index - Replace i_<log>() with e_<log>()

3 years agolib-storage: service_auth_userdb_lookup() - Replace i_debug() with e_debug()
Marco Bettini [Mon, 18 Jul 2022 12:59:13 +0000 (12:59 +0000)] 
lib-storage: service_auth_userdb_lookup() - Replace i_debug() with e_debug()

3 years agolib-storage: mail_storage_service_lookup_real() - Anticipate the creation of the...
Marco Bettini [Thu, 7 Jul 2022 08:30:10 +0000 (08:30 +0000)] 
lib-storage: mail_storage_service_lookup_real() - Anticipate the creation of the event before service_auth_userdb_lookup()

3 years agolib-storage: Add prefix to storage event
Marco Bettini [Tue, 19 Jul 2022 10:31:53 +0000 (10:31 +0000)] 
lib-storage: Add prefix to storage event

3 years agolib-storage: Factor in sanitize_box_name()
Marco Bettini [Mon, 1 Aug 2022 10:04:15 +0000 (10:04 +0000)] 
lib-storage: Factor in sanitize_box_name()

3 years agoauth: userdb - Stop calling USERDB_RESULT_OK after template expansion failure
Martti Rannanjärvi [Fri, 3 Jun 2022 08:15:05 +0000 (11:15 +0300)] 
auth: userdb - Stop calling USERDB_RESULT_OK after template expansion failure

Call only USERDB_RESULT_INTERNAL_FAILURE. This was broken by
0f5dc4da3982053036be65190e44bf28a67b1ca2.

3 years agologin-common: Fail early if redirection destination has empty hostname
Timo Sirainen [Fri, 8 Jul 2022 13:33:14 +0000 (16:33 +0300)] 
login-common: Fail early if redirection destination has empty hostname

3 years agolmtp: Use hostname (not IP) for proxy_redirect_host_next
Timo Sirainen [Fri, 8 Jul 2022 13:32:38 +0000 (16:32 +0300)] 
lmtp: Use hostname (not IP) for proxy_redirect_host_next

This makes it consistent with login-common and doveadm.

3 years agolib-http: Fix unlimited size parameters for i_stream_create_limit()
Timo Sirainen [Wed, 3 Aug 2022 09:23:09 +0000 (12:23 +0300)] 
lib-http: Fix unlimited size parameters for i_stream_create_limit()

The type is uoff_t, not size_t, so the value should be UOFF_T_MAX.

3 years agolib-http: Wrap server response payload istream into istream-limit
Timo Sirainen [Wed, 3 Aug 2022 09:22:31 +0000 (12:22 +0300)] 
lib-http: Wrap server response payload istream into istream-limit

This way if the underlying istream is accessed by other code, lib-http won't
be affected by the seek offset changes.

3 years agolib-http: Wrap client request payload istream into istream-limit
Timo Sirainen [Wed, 3 Aug 2022 09:05:57 +0000 (12:05 +0300)] 
lib-http: Wrap client request payload istream into istream-limit

This way if the underlying istream is accessed by other code, lib-http won't
be affected by the seek offset changes.

3 years agom4: dovecot.m4 - Make C standard check aware of autoconf version
Karl Fleischmann [Wed, 27 Jul 2022 13:50:48 +0000 (15:50 +0200)] 
m4: dovecot.m4 - Make C standard check aware of autoconf version

Version 2.70 of autoconf deprecated AC_PROG_CC_C99 in favor of using
different cache veriables that are set by AC_PROG_CC. This commit uses
the appropriate mechanism depending on the m4 version used.

3 years agom4: dovecot.m4 - Fix formatting
Karl Fleischmann [Wed, 27 Jul 2022 13:11:25 +0000 (15:11 +0200)] 
m4: dovecot.m4 - Fix formatting

Replace indentation of C99 checks from tabs/arbitrary numbered spaces to
consistent indenting with 2 spaces per level.

3 years agoconfigure: Remove obsolescent AC_HEADER_STDC macro
Karl Fleischmann [Wed, 27 Jul 2022 12:55:11 +0000 (14:55 +0200)] 
configure: Remove obsolescent AC_HEADER_STDC macro

As per the documentation current systems have the relevant headers
included, so the check is unnecessary.

3 years agolib-lua: Add dovecot.net_ip_family()
Timo Sirainen [Fri, 29 Jul 2022 12:49:09 +0000 (15:49 +0300)] 
lib-lua: Add dovecot.net_ip_family()

This returns the family of the IP address, or 0 if it's not a valid IP.

3 years agovirtual: virtual_get_storage() - Fix error handling
Markus Valentin [Fri, 29 Jul 2022 07:53:50 +0000 (09:53 +0200)] 
virtual: virtual_get_storage() - Fix error handling

Broken by aeedbb12e74610d83830050297424cf1507fe199

3 years agolib-test: fuzzer_t_strndup_replace_zero() - Fix NUL termination
Timo Sirainen [Thu, 28 Jul 2022 10:11:35 +0000 (13:11 +0300)] 
lib-test: fuzzer_t_strndup_replace_zero() - Fix NUL termination

3 years agodoveadm: Add missing doveadm_client_unref()
Markus Valentin [Fri, 22 Jul 2022 08:40:34 +0000 (10:40 +0200)] 
doveadm: Add missing doveadm_client_unref()

doveadm_client_unref() got required to be called, but got forgotten to
be added in doveadm_cmd_callback.
Broken in 24c1c355bb46a3a824573467f887972ad13a33cb

3 years agolib-storage: Add istream_broken field to struct index_mail_data
Markus Valentin [Wed, 27 Jul 2022 11:48:10 +0000 (13:48 +0200)] 
lib-storage: Add istream_broken field to struct index_mail_data

To prevent correctly cached information being marked as corrupted
by an broken mail input stream use istream_broken flag.

3 years agovirtual: Remove dead code
Timo Sirainen [Mon, 25 Jul 2022 10:06:53 +0000 (13:06 +0300)] 
virtual: Remove dead code

Caused by 8536cd46be13bc18aa538b279d7fdba7d54e268f

3 years agolib: mmap_get_page_size() - Assert that sysconf() return value is valid
Timo Sirainen [Mon, 25 Jul 2022 09:47:37 +0000 (12:47 +0300)] 
lib: mmap_get_page_size() - Assert that sysconf() return value is valid

3 years agoanvil: Use time_to_uint32() to cast time_t to unsigned int where needed
Timo Sirainen [Mon, 25 Jul 2022 09:35:02 +0000 (12:35 +0300)] 
anvil: Use time_to_uint32() to cast time_t to unsigned int where needed

This was forgotten in earlier changes.

3 years agolib-imap: fuzz-imap-bodystructure - fix inverted case/ignorecase calls
Marco Bettini [Mon, 25 Jul 2022 09:16:09 +0000 (09:16 +0000)] 
lib-imap: fuzz-imap-bodystructure - fix inverted case/ignorecase calls

3 years agolmtp: lmtp-proxy - Fix memory leak
Aki Tuomi [Fri, 22 Jul 2022 06:49:49 +0000 (09:49 +0300)] 
lmtp: lmtp-proxy - Fix memory leak

auth_pool is not always free'd.

Broken in f8d778ecea227290f87f6666e991289b3b51b37a

3 years agoauth: Remove explicit auth_verbose checks in logging
Marco Bettini [Thu, 7 Jul 2022 12:47:05 +0000 (12:47 +0000)] 
auth: Remove explicit auth_verbose checks in logging

This way the e_info() is logged also when it matches log_debug, even if auth_verbose=no.

3 years agologin-common: login_settings_check() - Stop cascading auth_debug_passwords -> auth_de...
Marco Bettini [Thu, 7 Jul 2022 12:36:56 +0000 (12:36 +0000)] 
login-common: login_settings_check() - Stop cascading auth_debug_passwords -> auth_debug -> auth_verbose

3 years agoconfig: Inject category=auth into log_debug when auth_debug=yes
Marco Bettini [Thu, 30 Jun 2022 14:05:26 +0000 (14:05 +0000)] 
config: Inject category=auth into log_debug when auth_debug=yes

Restores the (deprecated) behavior for auth_debug=yes to before
d49f5b30. Note that module loading debug lines will NOT appear anymore.

3 years agologin-common: Rename AUTH_PLAINTEXT_DISABLED_MSG to AUTH_CLEARTEXT_DISABLED_MSG
Aki Tuomi [Tue, 19 Jul 2022 10:29:44 +0000 (13:29 +0300)] 
login-common: Rename AUTH_PLAINTEXT_DISABLED_MSG to AUTH_CLEARTEXT_DISABLED_MSG

3 years agologin-common: Use AUTH_PLAINTEXT_DISABLED_MSG in sasl-server
Aki Tuomi [Fri, 15 Jul 2022 05:53:39 +0000 (08:53 +0300)] 
login-common: Use AUTH_PLAINTEXT_DISABLED_MSG in sasl-server

For consistency

3 years agologin-common: Send BAD alert about cleartext login attempt with AUTHENTICATE too
Aki Tuomi [Fri, 15 Jul 2022 05:47:28 +0000 (08:47 +0300)] 
login-common: Send BAD alert about cleartext login attempt with AUTHENTICATE too

3 years agologin-common: Change plaintext to cleartext on login error
Aki Tuomi [Fri, 15 Jul 2022 05:18:07 +0000 (08:18 +0300)] 
login-common: Change plaintext to cleartext on login error

3 years agopush-notification: Replace i_<log>() with e_<log>()
Marco Bettini [Wed, 20 Jul 2022 13:58:13 +0000 (13:58 +0000)] 
push-notification: Replace i_<log>() with e_<log>()

3 years agopush-notification: struct push_notification_event_config - Add and propagate log_event
Marco Bettini [Wed, 20 Jul 2022 13:40:44 +0000 (13:40 +0000)] 
push-notification: struct push_notification_event_config - Add and propagate log_event

3 years agopush-notification: dlog - Introduce driver and transaction log events
Marco Bettini [Wed, 20 Jul 2022 13:51:05 +0000 (13:51 +0000)] 
push-notification: dlog - Introduce driver and transaction log events

3 years agoconfig: Handle disable_plaintext_auth in old-set-parser
Aki Tuomi [Thu, 14 Jul 2022 10:59:48 +0000 (13:59 +0300)] 
config: Handle disable_plaintext_auth in old-set-parser

3 years agoexample-config: Replace disable_plaintext_auth with auth_allow_cleartext
Aki Tuomi [Thu, 14 Jul 2022 07:53:53 +0000 (10:53 +0300)] 
example-config: Replace disable_plaintext_auth with auth_allow_cleartext

3 years agodirector: Change disable_plaintext_auth to auth_allow_cleartext
Aki Tuomi [Thu, 14 Jul 2022 07:53:32 +0000 (10:53 +0300)] 
director: Change disable_plaintext_auth to auth_allow_cleartext

3 years agologin: Rename disable_plaintext_auth to auth_allow_cleartext
Aki Tuomi [Thu, 14 Jul 2022 07:48:50 +0000 (10:48 +0300)] 
login: Rename disable_plaintext_auth to auth_allow_cleartext

The old setting is too often confused for PLAIN mechanism,
the new setting makes it more clear that we are talking
about lack of confidentiality, and not actual mechs.

3 years agolib-imap: remove_newlines_and_append() - Drop unnecessary +1 in t_str_new() call
Marco Bettini [Fri, 15 Jul 2022 12:51:53 +0000 (12:51 +0000)] 
lib-imap: remove_newlines_and_append() - Drop unnecessary +1 in t_str_new() call

3 years agolib-imap: remove_newlines_and_append() - Clarify what function does
Marco Bettini [Tue, 19 Jul 2022 09:16:05 +0000 (09:16 +0000)] 
lib-imap: remove_newlines_and_append() - Clarify what function does

3 years agolib-imap: fuzz-imap-bodystructure - Handle CR/LF suppression operated on nstrings
Marco Bettini [Fri, 15 Jul 2022 09:19:27 +0000 (09:19 +0000)] 
lib-imap: fuzz-imap-bodystructure - Handle CR/LF suppression operated on nstrings

3 years agolib-doveadm: Add return to luaL_error in lua_doveadm_client_cmd
Aki Tuomi [Mon, 18 Jul 2022 10:02:59 +0000 (13:02 +0300)] 
lib-doveadm: Add return to luaL_error in lua_doveadm_client_cmd

Satisfies static analyzers.

3 years agolib-ssl-iostream: Use data stack allocation for log prefix
Aki Tuomi [Mon, 18 Jul 2022 10:00:08 +0000 (13:00 +0300)] 
lib-ssl-iostream: Use data stack allocation for log prefix

Broken in 799cafd42fd47cc3bcb57f9fa98647051ba770ba

3 years agolib-ssl-iostream: Use event based logging
Aki Tuomi [Thu, 7 Jul 2022 07:05:22 +0000 (10:05 +0300)] 
lib-ssl-iostream: Use event based logging

To keep things less complicated, invalid cert info has been changed to a warning.

3 years agoglobal: Pass event to SSL iostream
Aki Tuomi [Fri, 8 Jul 2022 09:03:25 +0000 (12:03 +0300)] 
global: Pass event to SSL iostream

3 years agolib-ssl-iostream: Add event to struct ssl_iostream
Aki Tuomi [Thu, 7 Jul 2022 06:37:55 +0000 (09:37 +0300)] 
lib-ssl-iostream: Add event to struct ssl_iostream

3 years agolib-ssl-iostream: Indicate if we are creating client or server
Aki Tuomi [Fri, 8 Jul 2022 08:55:03 +0000 (11:55 +0300)] 
lib-ssl-iostream: Indicate if we are creating client or server

Needed for next commit.

3 years agolib-ssl-iostream: Convert invalid certificate message to warning
Aki Tuomi [Fri, 8 Jul 2022 13:00:24 +0000 (16:00 +0300)] 
lib-ssl-iostream: Convert invalid certificate message to warning

3 years agologin-common: Handle missing ssl_iostream in get_var_expand_table()
Aki Tuomi [Thu, 7 Jul 2022 10:58:02 +0000 (13:58 +0300)] 
login-common: Handle missing ssl_iostream in get_var_expand_table()

It can be missing during connection disconnection when connection
is lost uncleanly.

3 years agoanvil: Use memmove() for moving penalty checksum buffer
Timo Sirainen [Mon, 28 Feb 2022 19:43:27 +0000 (14:43 -0500)] 
anvil: Use memmove() for moving penalty checksum buffer

The memory wasn't actually overlapping, because CHECKSUM_VALUE_COUNT=2 so
only 1 element was memcpy()d. However, it would have been wrong if
CHECKSUM_VALUE_COUNT had been higher, so fix it to make the code
future-safe.

Found by Martin Strunz

3 years agolib-lua: Add dovecot.gettimeofday(), .nanoseconds() and .microseconds()
Timo Sirainen [Wed, 29 Jun 2022 15:12:56 +0000 (18:12 +0300)] 
lib-lua: Add dovecot.gettimeofday(), .nanoseconds() and .microseconds()

Lua itself doesn't have these nicely available.

3 years agolib-lua, lib-doveadm: Add lib-doveadm client API to Lua
Timo Sirainen [Tue, 28 Jun 2022 14:50:33 +0000 (17:50 +0300)] 
lib-lua, lib-doveadm: Add lib-doveadm client API to Lua

3 years agolib-lua: Add dlua_strtable_to_kvarray() and dlua_table_to_array()
Timo Sirainen [Wed, 6 Jul 2022 09:23:33 +0000 (12:23 +0300)] 
lib-lua: Add dlua_strtable_to_kvarray() and dlua_table_to_array()

3 years agolib-doveadm, doveadm: Add and require doveadm_client_unref()
Timo Sirainen [Wed, 29 Jun 2022 13:48:28 +0000 (16:48 +0300)] 
lib-doveadm, doveadm: Add and require doveadm_client_unref()

The only way to destroy a doveadm_client before was to send a command.

3 years agolib-lua: Makefile.am - Rename LIBDICT_LUA to WITH_YIELDS_LUA
Timo Sirainen [Tue, 28 Jun 2022 14:49:02 +0000 (17:49 +0300)] 
lib-lua: Makefile.am - Rename LIBDICT_LUA to WITH_YIELDS_LUA

It's not just dict that is being added there.

3 years agologin-proxy: Increase LOGIN_PROXY_TTL from 5 to 7
Timo Sirainen [Tue, 28 Jun 2022 09:53:26 +0000 (12:53 +0300)] 
login-proxy: Increase LOGIN_PROXY_TTL from 5 to 7

5 is a bit too much on the low side in case there are several redirects.
It shouldn't be too high either, since it'll increase how long it takes
to detect a proxying loop.

3 years agologin-proxy: Allow proxying twice to the same destination before it's assumed to...
Timo Sirainen [Tue, 28 Jun 2022 09:52:23 +0000 (12:52 +0300)] 
login-proxy: Allow proxying twice to the same destination before it's assumed to be a loop

3 years agolmtp: Fix forward_ fields handling with reauth requests
Timo Sirainen [Thu, 23 Jun 2022 21:11:39 +0000 (00:11 +0300)] 
lmtp: Fix forward_ fields handling with reauth requests

3 years agodoveadm: Don't preserve first auth's forward_ fields for reauth lookup
Timo Sirainen [Thu, 23 Jun 2022 20:56:20 +0000 (23:56 +0300)] 
doveadm: Don't preserve first auth's forward_ fields for reauth lookup

3 years agolib-auth, global: Change forward_fields to be an array of strings
Timo Sirainen [Thu, 23 Jun 2022 20:25:28 +0000 (23:25 +0300)] 
lib-auth, global: Change forward_fields to be an array of strings

3 years agopop3/submission-login: Split off a common client_forward_decode_base64()
Timo Sirainen [Thu, 23 Jun 2022 20:23:32 +0000 (23:23 +0300)] 
pop3/submission-login: Split off a common client_forward_decode_base64()

3 years agosubmission-login: Fix parsing multiple XCLIENT FORWARD parameters
Timo Sirainen [Thu, 23 Jun 2022 20:19:12 +0000 (23:19 +0300)] 
submission-login: Fix parsing multiple XCLIENT FORWARD parameters

Each such parameter was intended to replace the previous one, but
the code was only deleting the string without adding the new string.
This didn't really matter, since Dovecot would only ever send a
single FORWARD parameter.

3 years agolib-auth: Add debug logging for auth input
Timo Sirainen [Thu, 23 Jun 2022 17:12:46 +0000 (20:12 +0300)] 
lib-auth: Add debug logging for auth input

3 years agologin-common: Fix forward_ fields handling with reauth requests
Timo Sirainen [Thu, 23 Jun 2022 16:39:57 +0000 (19:39 +0300)] 
login-common: Fix forward_ fields handling with reauth requests

3 years agologin-common: Reauth error handling fixes
Timo Sirainen [Thu, 23 Jun 2022 15:02:15 +0000 (18:02 +0300)] 
login-common: Reauth error handling fixes

3 years agolib-imap: fuzz-imap-bodystructure - Compare ignorecase
Marco Bettini [Fri, 8 Jul 2022 07:57:51 +0000 (07:57 +0000)] 
lib-imap: fuzz-imap-bodystructure - Compare ignorecase

3 years agosubmission: Correctly handle var_expand() return codes
Karl Fleischmann [Thu, 7 Jul 2022 06:55:06 +0000 (08:55 +0200)] 
submission: Correctly handle var_expand() return codes

3 years agopop3: Correctly handle var_expand() return codes
Karl Fleischmann [Thu, 7 Jul 2022 06:54:52 +0000 (08:54 +0200)] 
pop3: Correctly handle var_expand() return codes

3 years agoplugins/notify-status: Correctly handle var_expand() return codes
Karl Fleischmann [Thu, 7 Jul 2022 06:54:38 +0000 (08:54 +0200)] 
plugins/notify-status: Correctly handle var_expand() return codes

3 years agolib-storage: Correctly handle var_expand() return codes
Karl Fleischmann [Thu, 7 Jul 2022 06:54:24 +0000 (08:54 +0200)] 
lib-storage: Correctly handle var_expand() return codes

3 years agoimap: Correctly handle var_expand() return codes
Karl Fleischmann [Thu, 7 Jul 2022 06:54:05 +0000 (08:54 +0200)] 
imap: Correctly handle var_expand() return codes

3 years agoauth: Correctly handle var_expand() return codes
Aki Tuomi [Mon, 24 Jul 2017 12:07:48 +0000 (15:07 +0300)] 
auth: Correctly handle var_expand() return codes

3 years agolib: Make var_expand() comparison consistent
Karl Fleischmann [Thu, 7 Jul 2022 08:02:57 +0000 (10:02 +0200)] 
lib: Make var_expand() comparison consistent

3 years agovar-expand-crypt: Make var_expand() comparisons consistent
Karl Fleischmann [Thu, 7 Jul 2022 07:59:31 +0000 (09:59 +0200)] 
var-expand-crypt: Make var_expand() comparisons consistent

3 years agovar-expand-crypt: Correctly handle var_expand() return codes
Aki Tuomi [Mon, 24 Jul 2017 12:05:51 +0000 (15:05 +0300)] 
var-expand-crypt: Correctly handle var_expand() return codes

3 years agovar-expand: Delegate error-handling in var_expand_try_extension()
Karl Fleischmann [Tue, 5 Jul 2022 11:26:38 +0000 (13:26 +0200)] 
var-expand: Delegate error-handling in var_expand_try_extension()

3 years agovar-expand: Retain error-message in var_expand_try_extension()
Karl Fleischmann [Tue, 5 Jul 2022 11:24:20 +0000 (13:24 +0200)] 
var-expand: Retain error-message in var_expand_try_extension()

3 years agovar-expand: Assert that hash method is found
Aki Tuomi [Mon, 24 Jul 2017 12:29:07 +0000 (15:29 +0300)] 
var-expand: Assert that hash method is found

3 years agovar-expand: Require extensions to set error_r if ret != 1
Aki Tuomi [Mon, 24 Jul 2017 12:26:10 +0000 (15:26 +0300)] 
var-expand: Require extensions to set error_r if ret != 1

3 years agoconfigure: Revert "configure: Remove unused sizeof directives"
Karl Fleischmann [Thu, 7 Jul 2022 11:52:38 +0000 (13:52 +0200)] 
configure: Revert "configure: Remove unused sizeof directives"

This reverts commit 90ec0579eda9bec1a3e636c6716d4edebf795cff, which
incorrectly determined the macros to be unnecessary. The cached values
are used in various places. This commit reverts and comments on the
necessity of the macros.

3 years agovirtual: When saving to virtual mailbox, convert it early on to backend mailbox
Timo Sirainen [Wed, 2 Mar 2022 22:49:27 +0000 (17:49 -0500)] 
virtual: When saving to virtual mailbox, convert it early on to backend mailbox

This fixes some confusion in plugins that don't understand that the mailbox
changes. For example when virtual mailbox is configured to save mails to a
backend mailbox, saving mails to the virtual mailbox will now trigger the
backend mailbox's imapsieve scripts. (Virtual mailbox names can't be used
in the imapsieve scripts or configuration, only the backend mailbox names.)

3 years agolib-storage: Add mailbox.mailbox_not_original flag
Timo Sirainen [Wed, 2 Mar 2022 23:05:27 +0000 (18:05 -0500)] 
lib-storage: Add mailbox.mailbox_not_original flag

3 years agolib-storage: Add default implementation for mailbox_list_vfuncs.get_storage()
Timo Sirainen [Wed, 2 Mar 2022 22:56:58 +0000 (17:56 -0500)] 
lib-storage: Add default implementation for mailbox_list_vfuncs.get_storage()

3 years agolib-storage: mailbox_list_get_storage() - Add flags, and allow changing vname
Timo Sirainen [Wed, 2 Mar 2022 22:37:50 +0000 (17:37 -0500)] 
lib-storage: mailbox_list_get_storage() - Add flags, and allow changing vname

The previous API allowed changing the mailbox_list, but not the vname
string. Now it's possible to change both.

The flags allows the implementation more flexibility. It will be used by
following commits to determine whether opening a virtual mailbox should
actually be opening the backend mailbox (for saving mails).

3 years agolib-imap: fuzz-imap-bodystructure - Replace string comparison with part comparison
Marco Bettini [Tue, 5 Jul 2022 09:50:32 +0000 (09:50 +0000)] 
lib-imap: fuzz-imap-bodystructure - Replace string comparison with part comparison

bodystructure strings comparison can break due to imap_append_string_for_humans()
can alter some fields (Subject, Addresses). Instead, we do a part vs part comparison
checking several string fields that are known not to use the aforementioned call.
This gives the fuzzer 'space' to explore the string parser anyway and to test if
the re-encoding is coherent.