]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Tue, 8 Oct 2019 07:27:59 +0000 (10:27 +0300)]
Released v2.3.8
Aki Tuomi [Mon, 30 Sep 2019 07:33:25 +0000 (10:33 +0300)]
Update NEWS for 2.3.8
Timo Sirainen [Sat, 5 Oct 2019 12:46:47 +0000 (15:46 +0300)]
lib-index: Fix checking if log file can be rotated
This fixes a bug caused by
883a3022992d0f832f0aff21572caeb7c63b7668 where
dovecot.index.log file wasn't rotated as often as it was supposed to be. It
also could have caused dovecot.index to be rewritten much more often than
it was supposed to be.
The buggy commit was correct that the tail_offset wasn't updated previously
to the dovecot.index.log file after changes. However, I didn't realize that
the tail_offset was internally still updated and required by this rotation
check to work correctly.
The fix works by relaxing the tail_offset==head_offset requirement for
rotation. It's enough that all the changes are synced, which can be checked
from mail_index_sync_ctx.fully_synced. Any changes after tail_offset are
then supposed to be external transactions, which aren't synced anyway, so
rotation is allowed.
Timo Sirainen [Tue, 1 Oct 2019 09:15:51 +0000 (12:15 +0300)]
lib-storage: Simplify mail_save_context.keywords reference counting
This change also makes it possible for plugins to change the keywords
without leaking memory.
Timo Sirainen [Wed, 4 Sep 2019 10:51:26 +0000 (13:51 +0300)]
push-notification: Add accessor functions to global variables
These are enough for the current plugin. Maybe others will be needed in the
future.
Stephan Bosch [Sat, 16 Mar 2019 15:24:59 +0000 (16:24 +0100)]
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_get_reply() and use it.
Stephan Bosch [Sat, 16 Mar 2019 13:41:37 +0000 (14:41 +0100)]
lib-smtp: smtp-server-recipient - Add hook for the submission of a DATA/BDAT/BURL command reply.
Stephan Bosch [Sat, 16 Mar 2019 14:26:58 +0000 (15:26 +0100)]
lib-smtp: smtp-server-cmd-data - Call smtp_server_transaction_last_data() earlier for the DATA command.
Makes sure rcpt->cmd is set before replies are being submitted.
Stephan Bosch [Sat, 16 Mar 2019 14:20:22 +0000 (15:20 +0100)]
lib-mstp: smtp-server-recipient - Make smtp_server_recipient_call_hooks() private rather than static.
Stephan Bosch [Sat, 16 Mar 2019 14:14:59 +0000 (15:14 +0100)]
lib-smtp: smtp-server-transaction - Allow calling smtp_server_transaction_last_data() more than once.
Stephan Bosch [Sat, 16 Mar 2019 14:13:03 +0000 (15:13 +0100)]
lib-smtp: smtp-server-transaction - Allow calling smtp_server_transaction_last_data() when all recipients failed.
Stephan Bosch [Sat, 16 Mar 2019 14:03:39 +0000 (15:03 +0100)]
lib-smtp: smtp-server-command - Add hook for the submission of individual replies.
Stephan Bosch [Sat, 16 Mar 2019 13:47:41 +0000 (14:47 +0100)]
lib-smtp: smtp-server-command - Make removal of hook optional for smtp_server_command_call_hooks().
Stephan Bosch [Fri, 15 Mar 2019 00:50:01 +0000 (01:50 +0100)]
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_reply_forward().
This acts as a wrapper around smtp_server_reply_index_forward().
Stephan Bosch [Fri, 15 Mar 2019 00:38:29 +0000 (01:38 +0100)]
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_is_replied().
This is a convenience wrapper around smtp_server_command_is_replied().
Stephan Bosch [Thu, 14 Mar 2019 21:31:09 +0000 (22:31 +0100)]
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_reply().
This is a convenience wrapper around smtp_server_reply_index(). This implicitly
adds the <path> prefix to the reply (when it is not an RCPT success reply).
Stephan Bosch [Tue, 19 Mar 2019 11:37:53 +0000 (12:37 +0100)]
lib-smtp: smtp-server-cmd-rcpt - Add smtp_server_cmd_is_rcpt().
Timo Sirainen [Thu, 14 Mar 2019 16:57:54 +0000 (18:57 +0200)]
lmtp: Add mail_user_settings to struct client
Timo Sirainen [Thu, 14 Mar 2019 16:58:14 +0000 (18:58 +0200)]
lib-storage: Add mailbox_keywords_merge()
Timo Sirainen [Thu, 28 Feb 2019 13:10:59 +0000 (15:10 +0200)]
lib-storage: Add mailbox_search_mail_detach()
This allows keeping the struct mail open even after the mail_search_context
that created it is freed.
Timo Sirainen [Thu, 28 Feb 2019 13:03:22 +0000 (15:03 +0200)]
lib-storage: Move tracking mails to mail_search_context from index-specific code
This makes the next commit much easier to implement.
Timo Sirainen [Thu, 28 Feb 2019 13:08:38 +0000 (15:08 +0200)]
lib-storage: Move index_mail.search_mail to mail_private struct
Timo Sirainen [Mon, 18 Mar 2019 13:34:10 +0000 (15:34 +0200)]
lib-mail: istream-header-filter: Fix HEADER_FILTER_ADD_MISSING_EOH with callback
If mail already had EOH and callback returned matched=TRUE in the EOH
callback (e.g. adding more headers), the callback was called a second
time for the EOH.
Currently there doesn't seem to be any existing code that was affected by
this bug.
Aki Tuomi [Tue, 2 Jul 2019 16:33:59 +0000 (19:33 +0300)]
index: Pass index sync flags to index view sync for pvt
When recovering from inconsistent view, this needs to
passed for pvt indexes too. Fixes
Error: dovecot.index.pvt reset, view is now inconsistent
Timo Sirainen [Tue, 17 Sep 2019 16:52:25 +0000 (19:52 +0300)]
lib-index: Add index alloc cache timeout to root ioloop
The cache is a global one and the timeout shouldn't trigger until the global
root ioloop is reached.
This fixes a timeout leak / crash when index was opened in an inner ioloop.
Timo Sirainen [Tue, 17 Sep 2019 16:52:14 +0000 (19:52 +0300)]
lib: Add io_loop_get_root()
Timo Sirainen [Wed, 4 Sep 2019 14:13:15 +0000 (17:13 +0300)]
lib-auth: Fix auth_client_is_connected() to work after disconnection
Aki Tuomi [Tue, 3 Sep 2019 08:58:18 +0000 (11:58 +0300)]
lib-dcrypt: Add static keyword to ECDSA_SIG_get0
Otherwise compilers complain as it's not declared anywhere.
Aki Tuomi [Tue, 3 Sep 2019 08:57:51 +0000 (11:57 +0300)]
lib-dcrypt: Free EVP_MD_CTX in dcrypt_openssl_digest
Aki Tuomi [Tue, 3 Sep 2019 08:57:17 +0000 (11:57 +0300)]
lib-dcrypt: Free existing BIGNUMs in setters
Aki Tuomi [Tue, 3 Sep 2019 06:10:13 +0000 (09:10 +0300)]
lib-dcrypt: Add ECDSA_SIG_set0 and ECDSA_SIG_get0 when missing
These are needed for low-level operations
Aki Tuomi [Tue, 3 Sep 2019 06:06:29 +0000 (09:06 +0300)]
m4: Check for ECDSA_SIG_set0 and ECDSA_SIG_get0
These are not present in older libssl
Aki Tuomi [Mon, 2 Sep 2019 11:17:50 +0000 (14:17 +0300)]
lib-dcrypt: Ignore padding when decoding base64url
Aki Tuomi [Mon, 2 Sep 2019 09:54:12 +0000 (12:54 +0300)]
dcrypt: Add signature format
Needed to implement RFC7515
Aki Tuomi [Thu, 29 Aug 2019 14:09:55 +0000 (17:09 +0300)]
lib-dcrypt: Only use compressed points with dovecot internal formats
Aki Tuomi [Thu, 29 Aug 2019 13:54:27 +0000 (16:54 +0300)]
lib-dcrypt: Implement dcrypt_ecdh_derive_secret for OpenSSL
Aki Tuomi [Thu, 29 Aug 2019 13:43:45 +0000 (16:43 +0300)]
lib-dcrypt: Move shared secret derivation to dcrypt_openssl_echd_derive_secret
Makes it possible to expose it on next commit.
Aki Tuomi [Thu, 29 Aug 2019 13:52:51 +0000 (16:52 +0300)]
lib-dcrypt: Add API for dcrypt_ecdh_derive_secret
Aki Tuomi [Thu, 29 Aug 2019 09:56:21 +0000 (12:56 +0300)]
lib-dcrypt: Return value from RSA_set0_crt_params
Aki Tuomi [Thu, 29 Aug 2019 09:52:46 +0000 (12:52 +0300)]
lib-dcrypt: Fix key format in raw & jwk keys
It needs to be point compressed with named curve
Aki Tuomi [Thu, 29 Aug 2019 09:25:07 +0000 (12:25 +0300)]
lib-dcrypt: Use correct variables names in RSA_set0_key
Broken in
79e9ccdc4a536f3881ec2b9304020514d1f92590
Aki Tuomi [Thu, 29 Aug 2019 09:24:42 +0000 (12:24 +0300)]
lib-dcrypt: Use ERR_R_PASSED_NULL_PARAMETER
It's the correct error and exists for older OpenSSL
Added in
79e9ccdc4a536f3881ec2b9304020514d1f92590
Aki Tuomi [Tue, 27 Aug 2019 07:09:30 +0000 (10:09 +0300)]
lib-dcrypt: Fix memory leak in raw key test
Aki Tuomi [Mon, 23 Jan 2017 12:56:54 +0000 (14:56 +0200)]
lib-dcrypt: Add unit tests for changes
Aki Tuomi [Mon, 23 Jan 2017 12:56:38 +0000 (14:56 +0200)]
dcrypt-openssl: Implement signature API for OpenSSL
Aki Tuomi [Mon, 23 Jan 2017 15:40:01 +0000 (17:40 +0200)]
lib-dcrypt: Add padding parameter for RSA encrypt/decrypt
Aki Tuomi [Mon, 23 Jan 2017 12:56:27 +0000 (14:56 +0200)]
lib-dcrypt: Add signature API
Aki Tuomi [Fri, 23 Aug 2019 09:34:54 +0000 (12:34 +0300)]
lib-dcrypt: Unit test for JWK keys
Aki Tuomi [Wed, 21 Aug 2019 13:16:22 +0000 (16:16 +0300)]
lib-dcrypt: Add JWK key format support
Aki Tuomi [Fri, 23 Aug 2019 08:51:45 +0000 (11:51 +0300)]
lib-dcrypt: Implement usage and key ID accessors for openssl
Aki Tuomi [Fri, 23 Aug 2019 07:42:09 +0000 (10:42 +0300)]
lib-dcrypt: Add key usage and id
These can be used for e.g. JWK keys.
Aki Tuomi [Fri, 23 Aug 2019 08:51:21 +0000 (11:51 +0300)]
lib-dcrypt: Add key id and usage fields to dcrypt keys
Simplifies next change
Aki Tuomi [Fri, 23 Aug 2019 09:27:23 +0000 (12:27 +0300)]
lib-dcrypt: Make key unref with NULL no-op
Aki Tuomi [Thu, 22 Aug 2019 11:28:17 +0000 (14:28 +0300)]
doveadm: Do not call dcrypt_deinitialize
It can break openssl
Aki Tuomi [Thu, 22 Aug 2019 10:58:52 +0000 (13:58 +0300)]
lib-dcrypt: Clarify when dcrypt_deinitialize is to be used
It should never be called if it's going to be used later on.
Aki Tuomi [Wed, 21 Aug 2019 13:15:57 +0000 (16:15 +0300)]
m4: Check if some RSA key manipulators are present
Needed for JWK
Aki Tuomi [Thu, 22 Aug 2019 15:43:11 +0000 (18:43 +0300)]
lib: hmac - Add hkdf for key derivation
Aki Tuomi [Sun, 25 Aug 2019 17:55:24 +0000 (20:55 +0300)]
lib-dcrypt: Use BN_secure_new when available for secrets
Aki Tuomi [Sun, 25 Aug 2019 17:54:12 +0000 (20:54 +0300)]
m4: Check for BN_secure_new
Aki Tuomi [Wed, 21 Aug 2019 10:26:29 +0000 (13:26 +0300)]
lib-dcrypt: Implement dcrypt_key_get_curve_public using openssl
Aki Tuomi [Wed, 21 Aug 2019 10:25:33 +0000 (13:25 +0300)]
lib-dcrypt: Add dcrypt_key_get_curve_public
Returns name of the curve of public key
Aki Tuomi [Mon, 19 Aug 2019 19:40:02 +0000 (22:40 +0300)]
lib-dcrypt: Add tests for raw keys
Aki Tuomi [Mon, 19 Aug 2019 11:39:05 +0000 (14:39 +0300)]
lib-dcrypt: Implement raw key API using OpenSSL
Aki Tuomi [Mon, 19 Aug 2019 11:20:47 +0000 (14:20 +0300)]
lib-dcrypt: Add API for dealing with raw keys
Aki Tuomi [Fri, 23 Aug 2019 16:39:16 +0000 (19:39 +0300)]
lib-dcrypt: Fix i2d_ASN1_OBJECT usage
i2d_ASN1_OBJECT tells how much memory we need.
Aki Tuomi [Fri, 23 Aug 2019 10:48:03 +0000 (13:48 +0300)]
lib-dcrypt: Symbolize maximum OID length
Aki Tuomi [Fri, 23 Aug 2019 10:46:33 +0000 (13:46 +0300)]
lib-dcrypt: Use len instead of ln
Timo Sirainen [Mon, 19 Aug 2019 09:11:59 +0000 (12:11 +0300)]
lib-http: Make http_client_request_delay_from_response() public
Timo Sirainen [Fri, 16 Aug 2019 19:07:51 +0000 (22:07 +0300)]
push-notification: Allow easy access to Message-ID header
Stephan Bosch [Tue, 12 Mar 2019 22:23:35 +0000 (23:23 +0100)]
lib-lda: mail-deliver - Emit events at start and finish of delivery.
Stephan Bosch [Sun, 10 Mar 2019 12:08:34 +0000 (13:08 +0100)]
lib-lda: Replace i_warning() with e_warning().
Stephan Bosch [Sun, 10 Mar 2019 12:01:08 +0000 (13:01 +0100)]
lib-lda: Replace i_info() with e_info().
Stephan Bosch [Sun, 10 Mar 2019 11:58:03 +0000 (12:58 +0100)]
lib-lda: Replace i_error() with e_error().
Stephan Bosch [Sun, 10 Mar 2019 09:53:51 +0000 (10:53 +0100)]
lib-lda: mail-deliver - Add message fields to the deliver event.
Stephan Bosch [Sun, 10 Mar 2019 11:13:10 +0000 (12:13 +0100)]
lib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.
Also make the fields public.
Stephan Bosch [Mon, 4 Mar 2019 00:15:47 +0000 (01:15 +0100)]
lda: Use LDA event as mail_*user's parent event.
Stephan Bosch [Mon, 4 Mar 2019 00:12:55 +0000 (01:12 +0100)]
lda: Add support for event API.
Stephan Bosch [Mon, 4 Mar 2019 00:08:21 +0000 (01:08 +0100)]
lda: Assign envelope fields in mail deliver context right away.
Stephan Bosch [Sun, 3 Mar 2019 23:30:27 +0000 (00:30 +0100)]
lmtp: lmtp-local - Use recipient event for mail delivery.
Stephan Bosch [Sun, 3 Mar 2019 23:28:42 +0000 (00:28 +0100)]
lib-lda: mail-deliver - Add support for event API.
Stephan Bosch [Wed, 27 Mar 2019 00:25:57 +0000 (01:25 +0100)]
lib-lda: Initialize/deinitialize mail_deliver_context in separate functions.
This changes the allocation of parsed SMTP addresses to initially use a
datastack pool rather than the mail_deliver context pool. This is necessary
because the context is created a bit later. Upon mail_deliver_init(), the
addresses are moved to the context pool.
Stephan Bosch [Sun, 31 Mar 2019 14:14:06 +0000 (16:14 +0200)]
lda: Move mail_deliver() invocation to a separate function.
Stephan Bosch [Mon, 4 Mar 2019 00:19:05 +0000 (01:19 +0100)]
lib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery cleanup in one place.
Stephan Bosch [Thu, 14 Mar 2019 23:14:05 +0000 (00:14 +0100)]
lib: str - Add str_replace().
Stephan Bosch [Thu, 14 Mar 2019 22:55:00 +0000 (23:55 +0100)]
lib: buffer - Add buffer_replace().
Stephan Bosch [Sun, 17 Mar 2019 23:52:37 +0000 (00:52 +0100)]
lib: buffer - Improve header comment for buffer_insert() and buffer_delete().
Stephan Bosch [Thu, 5 Sep 2019 11:06:28 +0000 (13:06 +0200)]
lib: test-istream-base64-decoder - Make random test also test CRLF vs LF line endings at random.
Stephan Bosch [Thu, 5 Sep 2019 09:50:04 +0000 (11:50 +0200)]
lib: test-istream-base64-decoder - Add explicit test cases for decoding the empty string.
Stephan Bosch [Thu, 5 Sep 2019 09:45:02 +0000 (11:45 +0200)]
lib: test-base64 - Add explicit test cases for encoding/decoding the empty string.
Stephan Bosch [Thu, 5 Sep 2019 00:31:58 +0000 (02:31 +0200)]
lib: base64 - Add assertion preventing calling base64_encode_more() after base64_encode_finish().
Stephan Bosch [Wed, 4 Sep 2019 23:13:46 +0000 (01:13 +0200)]
lib: test-istream-base64-decoder - Reduce minimum random stream buffer size to 1.
Stephan Bosch [Wed, 4 Sep 2019 23:11:53 +0000 (01:11 +0200)]
lib: test-istream-base64-decoder - Abort random test at first error and print parameters.
Stephan Bosch [Wed, 4 Sep 2019 21:40:25 +0000 (23:40 +0200)]
lib: test-istream-base64-encoder - Fix test names.
Stephan Bosch [Wed, 4 Sep 2019 21:37:11 +0000 (23:37 +0200)]
lib: test-base64 - Abort random test at first error and print parameters.
Stephan Bosch [Wed, 4 Sep 2019 21:16:24 +0000 (23:16 +0200)]
lib: test-base64 - Test Base64 encoding with maximum line length of 1.
This corner case is a useful test for problems in the line encoding.
Stephan Bosch [Wed, 4 Sep 2019 20:52:00 +0000 (22:52 +0200)]
lib: test-base64 - Better check output of incrementally encoded random Base64.
Check whether it is equal to the same data encoded as a single block and whether
the length matches the base64_get_full_encoded_size() output.
Stephan Bosch [Wed, 4 Sep 2019 20:44:03 +0000 (22:44 +0200)]
lib: base64 - Fix incremental/streaming Base64 encoding with CRLF line endings.
Line lengths became inconsistent due to a design error. The encoding itself
remained valid. The linefeed is no longer appended to the write buffer when the
destination buffer is full. Rather, a flag is set that makes the encoder emit
the linefeed immediately next time the encoder is called with more buffer
space. Appending it to the write buffer was wrong; it in fact needs to be
prepended and in that case a flag is more efficient.
Stephan Bosch [Wed, 4 Sep 2019 23:17:55 +0000 (01:17 +0200)]
lib: base64 - Restructure base64_encode_get_size().
Stephan Bosch [Wed, 4 Sep 2019 20:23:25 +0000 (22:23 +0200)]
lib: base64 - Use unsigned size type for base64_get_full_encoded_size().
Makes more sense.
Stephan Bosch [Wed, 4 Sep 2019 16:34:30 +0000 (18:34 +0200)]
lib: base64 - Truly fix dest buffer assertion in base64_decode_more().
Previous fix was inadequate in the presence of padding at the end of input.