]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Thu, 30 Mar 2017 13:09:06 +0000 (16:09 +0300)]
lib-sasl: Add missing input handler for xoauth2
Timo Sirainen [Mon, 3 Apr 2017 09:40:51 +0000 (12:40 +0300)]
director: Fix mail_hosts_dup() to duplicate tags correctly.
The host->tag pointed to the old hosts list. Also the new hosts list's tags
array wasn't filled.
This fixes USER-LOOKUP to return host with default configuration, which fixes
doveadm director status <user> to not show "Initial config" as empty.
Martti Rannanjärvi [Mon, 3 Apr 2017 08:41:29 +0000 (11:41 +0300)]
doveadm: Call mailbox_set_reason with initialized mailbox
Timo Sirainen [Sat, 1 Apr 2017 19:12:37 +0000 (22:12 +0300)]
global: Add mailbox_transaction_set_reason() calls
Added to the most important places.
Timo Sirainen [Sat, 1 Apr 2017 18:54:30 +0000 (21:54 +0300)]
lib-storage: Add mailbox_transaction_set_reason()
Timo Sirainen [Sat, 1 Apr 2017 18:43:16 +0000 (21:43 +0300)]
global: Add mailbox_set_reason() calls
Added to the most important places.
Timo Sirainen [Sat, 1 Apr 2017 18:16:37 +0000 (21:16 +0300)]
lib-storage: Add mailbox_set_reason()
Use it to log a debug message when mailbox is being opened.
Timo Sirainen [Mon, 27 Mar 2017 15:05:29 +0000 (18:05 +0300)]
lib-index: Don't increase modseq for backend/dirty flag changes
These flags are used only for internal changes and they shouldn't be
triggering any modseq changes.
To avoid modseqs from unexpectedly shrinking, the new modseq counting
behavior is enabled only for newly rotated transaction log files that have
a new minor_version.
Timo Sirainen [Thu, 30 Mar 2017 17:38:44 +0000 (20:38 +0300)]
lib-index: Add macros to check if transaction log file version is new enough.
The version numbers are 8bit, so we can generate a single 16bit number out
of them.
Stephan Bosch [Tue, 28 Mar 2017 23:25:21 +0000 (01:25 +0200)]
lib-http: client: Implemented means to obtain request statistics.
Aki Tuomi [Fri, 31 Mar 2017 20:12:47 +0000 (23:12 +0300)]
lib: Fix strcasecmp mistake in var-expand
Timo Sirainen [Fri, 31 Mar 2017 13:42:55 +0000 (16:42 +0300)]
lmtp: Die at startup if config reading fails.
Although most of the time it's not strictly required for config to be read here,
one exception is SSL server settings. If this config reading fails, the SSL
initialization just crashes. So this gives a better error message than a crash.
Also config reading really isn't supposed to fail anyway.
Timo Sirainen [Thu, 30 Mar 2017 20:25:40 +0000 (23:25 +0300)]
lib-index: Assert in mail_index_append_finish_uids() to prevent UID wrapping
This should be handled better eventually, but it's better to crash earlier
now than later. This avoids a later assert:
Panic: file mail-index-transaction-finish.c: line 187 (mail_index_transaction_get_uid): assertion failed: (rec->uid != 0)
Timo Sirainen [Fri, 31 Mar 2017 09:28:56 +0000 (12:28 +0300)]
lib-fs: Add FS_METADATA_ORIG_PATH
This allows fs backends to keep track of the original filename and use it
for logging purposes and such.
Timo Sirainen [Fri, 31 Mar 2017 09:28:01 +0000 (12:28 +0300)]
lib-fs: Allow fs_set_metadata() to update already added metadata.
Previously we were just appending the metadata multiple times with different
values, which could have caused problems.
Timo Sirainen [Thu, 30 Mar 2017 22:02:49 +0000 (01:02 +0300)]
imap: Fix assert-crash when hibernation triggers during IDLE syncing
Fixes:
Panic: file cmd-idle.c: line 182 (idle_hibernate_timeout): assertion failed: (ctx->sync_ctx == NULL)
Aki Tuomi [Mon, 27 Mar 2017 08:02:31 +0000 (11:02 +0300)]
var-expand-crypt: Fix data decryption
Aki Tuomi [Mon, 27 Mar 2017 06:39:03 +0000 (09:39 +0300)]
var-expand-crypt: Add error handling for initialization
Aki Tuomi [Mon, 27 Mar 2017 06:34:50 +0000 (09:34 +0300)]
var-expand-crypt: Do not free dcrypt context twice
Found by coverity
Aki Tuomi [Fri, 31 Mar 2017 12:30:58 +0000 (15:30 +0300)]
test-var-expand: Expect error
Aki Tuomi [Thu, 23 Mar 2017 13:17:44 +0000 (15:17 +0200)]
var-expand-crypt: Remove pointless assigment
It's never used
Aki Tuomi [Thu, 23 Mar 2017 13:12:45 +0000 (15:12 +0200)]
var-expand-crypt: Fix base64 encoding
the break was missing, also removed confusing block.
Aki Tuomi [Fri, 18 Nov 2016 12:47:05 +0000 (14:47 +0200)]
var-expand-crypt: Encryption/decryption support for var-expand
Registers new encrypt and decrypt processors for
var-expand.
Aki Tuomi [Sun, 25 Dec 2016 08:36:59 +0000 (10:36 +0200)]
lib: Add tests for extensions
Aki Tuomi [Fri, 18 Nov 2016 07:39:46 +0000 (09:39 +0200)]
lib: Add extension support for var-expand
This enables loading new var-expand features
using plugins.
Aki Tuomi [Mon, 27 Mar 2017 10:55:28 +0000 (13:55 +0300)]
lib: Use error_r in var_expand_long and friends
This is aligment commit for extensions, and differs
from v2.3 so that error is reported in var_expand_with_funcs
since the public API is not changed.
Timo Sirainen [Thu, 30 Mar 2017 20:46:02 +0000 (23:46 +0300)]
lib-http: http_client_request_delay_from_response() should use per-request timeout as max
It was using the global request_timeout_msecs for the maximum timeout,
which could be different from the per-request timeout set by
http_client_request_set_attempt_timeout_msecs().
Stephan Bosch [Thu, 30 Mar 2017 20:29:13 +0000 (22:29 +0200)]
lib-http: client: Fixed request-specific attempt timeout.
This is the timeout applied to a single request attempt. Using http_client_request_set_attempt_timeout_msecs() this can be set for a specific request.
However, this was mostly ignored for requests that weren't in the process of handling response payload.
Instead, the global request_timeout_msecs client setting was used.
Also amended the (currently manual) test suite with tests that demonstated the problem and now verify the fix.
Timo Sirainen [Tue, 28 Mar 2017 16:40:27 +0000 (19:40 +0300)]
lib-index: Use time_to_local_day_start() instead of reimplementing
Timo Sirainen [Tue, 28 Mar 2017 16:14:00 +0000 (19:14 +0300)]
lib: Add time_to_local_day_start()
Timo Sirainen [Mon, 27 Mar 2017 14:44:45 +0000 (17:44 +0300)]
lib-index: Code cleanup - expand LOG_WANT_ROTATE() macro
There was no reason it had to be a macro. Also this fixes off-by-one
error when checking for log_rotate_min_size.
Aki Tuomi [Fri, 17 Mar 2017 08:28:36 +0000 (10:28 +0200)]
test: lib-http: Check write_full return value in test
Makes static analyzers happier
Aki Tuomi [Fri, 17 Mar 2017 08:26:50 +0000 (10:26 +0200)]
test: fts-squat: Ignore gettimeofday return value in test
Makes static analyzers happier
Aki Tuomi [Fri, 17 Mar 2017 08:26:06 +0000 (10:26 +0200)]
test: lib-index: Ensure conficts_seqs is created in test
Makes static analyzers happier
Aki Tuomi [Fri, 17 Mar 2017 08:25:01 +0000 (10:25 +0200)]
test: lib: Ensure item is not null
Makes static analyzers happier
Aki Tuomi [Fri, 17 Mar 2017 08:19:17 +0000 (10:19 +0200)]
test: lib-fts: Ignore uni_utf8_get_valid_data return value
Makes static analyzers happier
Aki Tuomi [Fri, 17 Mar 2017 08:17:59 +0000 (10:17 +0200)]
test: mail-crypt: Check dcrypt_id_key_private_old return value
Makes static analyzers happier
Aki Tuomi [Fri, 17 Mar 2017 08:16:11 +0000 (10:16 +0200)]
test: lib-http: Check o_stream_send return value
Makes static analyzers happier
Aki Tuomi [Fri, 17 Mar 2017 08:13:59 +0000 (10:13 +0200)]
test: lib: Check o_stream_send return value
Make static analyzers happier
Aki Tuomi [Mon, 27 Mar 2017 16:50:53 +0000 (19:50 +0300)]
driver-cassandra: Add metric for slow queries
Martti Rannanjärvi [Wed, 29 Mar 2017 17:04:47 +0000 (20:04 +0300)]
push-notification-driver-ox: Wait for http requests to finish in deinit
This is to make sure mail_user is still usable in http response
callback.
Martti Rannanjärvi [Thu, 30 Mar 2017 12:53:59 +0000 (15:53 +0300)]
director: Log vhost count changes and HOST-UP/DOWN
Timo Sirainen [Wed, 29 Mar 2017 22:42:53 +0000 (01:42 +0300)]
master: When logging fork() EAGAIN failure, include current ulimit -u value
Timo Sirainen [Mon, 27 Mar 2017 13:33:30 +0000 (16:33 +0300)]
doveadm dump log: Use shared lib-index code for updating modseq
When MAIL_TRANSACTION_MODSEQ_UPDATE records were seen, the printed modseqs
afterwards weren't correct.
Now that mail_transaction_update_modseq() is used, we don't need to keep
this code synchronized with it.
Timo Sirainen [Mon, 27 Mar 2017 13:30:16 +0000 (16:30 +0300)]
doveadm dump log: Cleanup - don't change hdr.size
Needed by the next commit.
Timo Sirainen [Mon, 27 Mar 2017 13:26:09 +0000 (16:26 +0300)]
doveadm dump log: Use istream for reading the file.
Cleans up the code a bit and removes the 1MB record limit.
Timo Sirainen [Wed, 29 Mar 2017 10:28:36 +0000 (13:28 +0300)]
lib-storage: Fix potential dict transaction leak on transaction rollback.
Timo Sirainen [Wed, 29 Mar 2017 10:27:32 +0000 (13:27 +0300)]
lib-dict: Keep a linked list of all transactions in dict.
This helps debugging if a transaction is leaked.
Aki Tuomi [Wed, 29 Mar 2017 13:15:36 +0000 (16:15 +0300)]
auth: Do not cache username unless it was changed by lookup
This could've caused usernames to be unexpectedly changed
because they were cached by a lookup that did not include
username in the cache key.
Aki Tuomi [Wed, 29 Mar 2017 12:37:36 +0000 (15:37 +0300)]
auth: Mark username changed if it's changes in auth_request_try_update_username
It was forgotten in by
865a82c1
Aki Tuomi [Tue, 7 Mar 2017 11:32:15 +0000 (13:32 +0200)]
lib: Add uuid support to guid
Aki Tuomi [Thu, 23 Mar 2017 12:09:01 +0000 (14:09 +0200)]
mail-log: Differentiate autoexpunges from expunges
Aki Tuomi [Thu, 23 Mar 2017 12:08:30 +0000 (14:08 +0200)]
lib-storage: Indicate mail is being autoexpunged
This way plugins, such as mail_log, can detect this.
Timo Sirainen [Mon, 27 Mar 2017 12:28:01 +0000 (15:28 +0300)]
config: Don't stop the process due to idling.
If the config process restarts, it also reloads configuration. We'd rather
want the configuration reloads to always be explicit.
Timo Sirainen [Mon, 27 Mar 2017 10:44:13 +0000 (13:44 +0300)]
cassandra: Fallback consistency fix - it wasn't used permanently
Because the "do I want to retry using primary consistency?" check was done
using the first failure timestamp, after 60 seconds that check always
returned TRUE. We should instead be checking the last timestamp for a
query that was sent with the primary consistency.
Timo Sirainen [Mon, 27 Mar 2017 10:33:18 +0000 (13:33 +0300)]
cassandra: Fallback consistency fix - max retry interval was set wrong
The maximum msecs is _MAX_RETRY_MSECS, not _FIRST_RETRY_MSECS
Stephan Bosch [Sun, 26 Mar 2017 17:08:18 +0000 (19:08 +0200)]
lib-http: client: Fix aborting a request that has a delayed error.
Caused by recent changes in delayed error handling.
Timo Sirainen [Sun, 19 Mar 2017 13:35:14 +0000 (15:35 +0200)]
imapc: Add imapc_features=delay-login
The connection to imapc_host is delayed until it's actually needed to be
performed.
Timo Sirainen [Sun, 19 Mar 2017 13:34:20 +0000 (15:34 +0200)]
imap: Remove imapc-specific "is connection valid?" code
This is now done by imapc itself in the previous patch
Timo Sirainen [Sun, 19 Mar 2017 13:32:53 +0000 (15:32 +0200)]
imapc: Fail user creation if login to imapc_host fails.
This causes imapc to actually wait for the login to succeed or fail.
Such a wait was already done by the imap code, which will be removed by
the next patch.
Aki Tuomi [Sat, 25 Mar 2017 13:46:58 +0000 (15:46 +0200)]
quota: Add backend register/unregister
This way, other mail plugins can register their own
quota backends.
Timo Sirainen [Fri, 24 Mar 2017 12:46:05 +0000 (14:46 +0200)]
lib-mail: Fix read overflow / crash in message_header_decode()
If the input string was "=?charset?Q|B?text?", the code attempted to look up
the character after it. And if it was "=", the callback was called with
size=-1, which ends up in a crash.
Martti Rannanjärvi [Fri, 16 Dec 2016 20:18:02 +0000 (22:18 +0200)]
doc: mention no_ticket in ssl config example
Timo Sirainen [Thu, 23 Mar 2017 18:16:44 +0000 (20:16 +0200)]
imap-login: Move forward_fields updating code to login-common
This allows using the new client_add_forward_field() in e.g. plugins.
Timo Sirainen [Fri, 24 Mar 2017 02:21:49 +0000 (04:21 +0200)]
lib-storage: Fix mail_user_autoexpunge() return value to be initialized properly
Timo Sirainen [Thu, 23 Mar 2017 12:27:28 +0000 (14:27 +0200)]
lib-storage: Change mail_user_autoexpunge() to return number of autoexpunged mails
Timo Sirainen [Thu, 23 Mar 2017 12:19:42 +0000 (14:19 +0200)]
lmtp: Trigger autoexpunging only for the last RCPT TO.
Otherwise if the autoexpunging takes a long time, the LMTP client could
disconnect due to a timeout. The mails would still eventually get delivered
though, so it would result in duplicate mails being delivered.
An alternative to this would be to keep all the mail_users referenced until
the delivery is finished and then autoexpunge all of them at the end. It
increases memory usage though and complicates the code, so at least for now
it's not implemented.
Timo Sirainen [Thu, 23 Mar 2017 12:15:49 +0000 (14:15 +0200)]
lib-storage: Replace MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE with explicit mail_user_autoexpunge()
This allows better control of which users are being autoexpunged. This
patch changes behavior at least in two ways now:
1) After shared folder access, the owner user isn't autoexpunged at deinit.
Although this is a bit questionable of whether it should be or not.
2) LMTP's quota check at RCPT TO stage doesn't trigger autoexpunging.
Timo Sirainen [Thu, 23 Mar 2017 12:08:53 +0000 (14:08 +0200)]
pop3: Start autoexpunging only after client is disconnected
Martti Rannanjärvi [Thu, 16 Mar 2017 09:15:18 +0000 (11:15 +0200)]
global: Log internal storage error on failure
Martti Rannanjärvi [Fri, 17 Mar 2017 07:23:00 +0000 (09:23 +0200)]
lmtp: Log internal error on STATUS_CHECK_OVER_QUOTA failure
Martti Rannanjärvi [Thu, 16 Mar 2017 09:12:29 +0000 (11:12 +0200)]
lib-storage: Add mail_storage_get_last_internal_error()
This returns the error given to mail_storage_set_critical().
Martti Rannanjärvi [Wed, 22 Mar 2017 15:17:41 +0000 (17:17 +0200)]
quota: Add quota_max_mail_size setting
Martti Rannanjärvi [Thu, 23 Mar 2017 08:16:30 +0000 (10:16 +0200)]
quota: Use quota_alloc_result in quota_settings.test_alloc
Martti Rannanjärvi [Thu, 23 Mar 2017 11:48:04 +0000 (13:48 +0200)]
quota: Introduce quota_alloc_result return type
Timo Sirainen [Thu, 23 Mar 2017 13:05:12 +0000 (15:05 +0200)]
dbox: Allow ":" separator between mail_attachment_fs driver and args.
The ":" separator is nowadays commonly used elsewhere for the separator,
so it should work here as well.
Aki Tuomi [Tue, 22 Nov 2016 08:54:43 +0000 (10:54 +0200)]
lib: Fix whitespace in var-expand.c
Aki Tuomi [Sat, 25 Feb 2017 21:34:03 +0000 (23:34 +0200)]
lib-storage: Add and use default mailbox iterator
The idea is to allow mail plugins to see also the non-existent
autoboxes by feeding them thru the iterator.
Fixes problem where autocreated boxes are not seen by ACL
plugin.
Aki Tuomi [Tue, 21 Mar 2017 11:14:41 +0000 (13:14 +0200)]
lib-storage: Expose mailbox_list_init_autocreate
It is needed when backend_ctx is created on the fly
Aki Tuomi [Sat, 25 Feb 2017 21:33:20 +0000 (23:33 +0200)]
acl: Use MODULE_CONTEXT for mailbox list iterator
Aki Tuomi [Sat, 25 Feb 2017 21:59:21 +0000 (23:59 +0200)]
acl: Use mailbox_list_context instead of ctx->ctx
This prepares for the next commit
Aki Tuomi [Wed, 22 Mar 2017 10:01:18 +0000 (12:01 +0200)]
lib-dict: Ensure all iterations and transactions are done in deinit
Aki Tuomi [Wed, 22 Mar 2017 10:01:07 +0000 (12:01 +0200)]
lib-dict: Track transaction counts
Aki Tuomi [Wed, 22 Mar 2017 08:33:20 +0000 (10:33 +0200)]
lib-dict: Fix test-dict linkage
Aki Tuomi [Wed, 22 Mar 2017 08:32:58 +0000 (10:32 +0200)]
lib-dict: Use dict-fail iterator and transaction when missing from dict driver
Aki Tuomi [Wed, 22 Mar 2017 10:05:32 +0000 (12:05 +0200)]
dict: Update correct counter in dict_iterate_init
Aki Tuomi [Wed, 22 Mar 2017 08:32:04 +0000 (10:32 +0200)]
lib-dict: Add dict-fail driver
It can be used for providing various failures
Martti Rannanjärvi [Fri, 17 Mar 2017 10:58:08 +0000 (12:58 +0200)]
global: Log mailbox_list internal errors
Martti Rannanjärvi [Fri, 17 Mar 2017 10:38:21 +0000 (12:38 +0200)]
lib-storage: Add mailbox_list_get_last_internal_error()
This returns the error given to mailbox_list_set_critical().
Martti Rannanjärvi [Wed, 22 Mar 2017 21:19:51 +0000 (23:19 +0200)]
lib: Download unicode.org files from dovecot.org
Stephan Bosch [Fri, 17 Mar 2017 22:39:33 +0000 (23:39 +0100)]
lib-http: client: Implemented http_client_request_url_str() function that accepts an URL string rather than a pre-parsed URL object.
If the provided HTTP URL is invalid, the callback with the error is called some time later from the ioloop.
This change also amends the test-http-client-errors test suite with a new test for this new feature.
Stephan Bosch [Fri, 17 Mar 2017 22:51:19 +0000 (23:51 +0100)]
lib-http: client: Make sure a request's log label never gets a duplicate request target part.
Make sure the URL part of the label always only consists of a http://host:port part and nothing more.
Stephan Bosch [Fri, 17 Mar 2017 22:35:55 +0000 (23:35 +0100)]
lib-http: client: Restructured the handling of delayed errors.
The req->delayed_error* fields are cleared before the callback is called and before the request is dereferenced.
This way, freeing the request never removes it from the delayed request list when the list is being processed.
It also makes it possible to resubmit the request from the callback (mainly for future use).
Stephan Bosch [Fri, 17 Mar 2017 22:18:52 +0000 (23:18 +0100)]
lib-http: client: Clear request pointer immediately in http_client_request_error().
Stephan Bosch [Fri, 17 Mar 2017 22:00:42 +0000 (23:00 +0100)]
lib-http: test-http-client-errors: Added test for using https:// while SSL is not configured.
Stephan Bosch [Sun, 19 Mar 2017 14:47:41 +0000 (15:47 +0100)]
global: Use http_response_get_message() to log HTTP responses.
Stephan Bosch [Sun, 19 Mar 2017 14:09:03 +0000 (15:09 +0100)]
lib-http: Added a function to obtain a message suitable for logging from a response object.
This prevents logging internal error codes (>= 9000).
Stephan Bosch [Sun, 19 Mar 2017 14:06:13 +0000 (15:06 +0100)]
lib-http: Explicitly define the start of the range of internal response status codes.
Stephan Bosch [Fri, 17 Mar 2017 22:03:03 +0000 (23:03 +0100)]
lib-http: test-http-client-errors: Always use the proper error status code definitions rather than an integer literal.
Aki Tuomi [Wed, 22 Mar 2017 07:03:20 +0000 (09:03 +0200)]
doveadm: Send and receive exit codes correctly
The old code would assume TEMPFAIL for almost everything.