]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Wed, 5 Apr 2017 11:22:38 +0000 (14:22 +0300)]
lib-imap-client: Do not reset ips when reconnecting
Avoids infinite loop
Aki Tuomi [Wed, 5 Apr 2017 10:27:57 +0000 (13:27 +0300)]
lib-storage: Return empty value in imapc_list_get_storage_name on auth error
Avoids clobbering authentication error.
Aki Tuomi [Wed, 5 Apr 2017 09:48:31 +0000 (12:48 +0300)]
lib-storage: Do not clobber error with imapc
Aki Tuomi [Wed, 5 Apr 2017 09:47:24 +0000 (12:47 +0300)]
global: Fix imapc_client_login usage
Aki Tuomi [Wed, 5 Apr 2017 09:09:57 +0000 (12:09 +0300)]
lib-imap-client: Add login_callback setter
This way it can be set before actually calling login
which might happen some time later.
Dmitry Yakunin [Tue, 4 Apr 2017 20:33:51 +0000 (23:33 +0300)]
imapc: Fix memory leak in disconnected state
Aki Tuomi [Wed, 5 Apr 2017 06:26:54 +0000 (09:26 +0300)]
auth: Update default policy string to include device id and protocol
Timo Sirainen [Tue, 4 Apr 2017 12:59:04 +0000 (15:59 +0300)]
imap: Set command reason strings using the new human_args
This way the reason string is already suitable for logging, since it's
guaranteed to be valid UTF-8 without control chars.
Timo Sirainen [Tue, 4 Apr 2017 12:58:42 +0000 (15:58 +0300)]
imap: Add client_command_context.human_args
Generated with imap_write_args_for_human()
Timo Sirainen [Tue, 4 Apr 2017 12:58:15 +0000 (15:58 +0300)]
lib-imap: Add imap_write_args_for_human()
Timo Sirainen [Tue, 4 Apr 2017 12:38:00 +0000 (15:38 +0300)]
imap: Add imap_client_command_get_reason()
All the command -> reason string conversions now go through this function.
Timo Sirainen [Tue, 4 Apr 2017 10:28:44 +0000 (13:28 +0300)]
lib: Increase net_connect*() EADDRNOTAVAIL retries to 20
4 is too little, since on busy systems it's sometimes failing. These calls
should be pretty cheap, so lets try if 20 is enough.
It would be nice if this was configurable, but the only practical way right
now would be to use environment variable, which is a bit ugly. We could
try it next if 20 is still not enough.
Timo Sirainen [Mon, 3 Apr 2017 15:44:52 +0000 (18:44 +0300)]
imapc: Compiler warning fix for 32bit systems
Aki Tuomi [Fri, 31 Mar 2017 07:57:14 +0000 (10:57 +0300)]
lib-imap-client: Make authentication failures more consistent
This way they always say the same prefix, which is easier to
spot.
Aki Tuomi [Fri, 31 Mar 2017 07:49:50 +0000 (10:49 +0300)]
lib-imap-client: Call login_callback on all authentication failures
Aki Tuomi [Fri, 31 Mar 2017 07:12:58 +0000 (10:12 +0300)]
lib-imap-client: Fix reconnection
This patch fixes reconnections to actually consider
all IP addresses first and then delay for interval and
retry at most retry count times.
Aki Tuomi [Fri, 31 Mar 2017 08:01:15 +0000 (11:01 +0300)]
lib-imap-client: Remove io earlier to avoid hammering
If connection has failed and reconnection is not yet
possible, io has to be removed here, otherwise it will
keep hammering the callback.
Aki Tuomi [Fri, 31 Mar 2017 07:58:47 +0000 (10:58 +0300)]
lib-imap-client: Only LOGOUT from connected connections
Aki Tuomi [Fri, 31 Mar 2017 06:44:28 +0000 (09:44 +0300)]
lib-imap-client: Make retry count and interval configurable
Aki Tuomi [Fri, 31 Mar 2017 06:59:02 +0000 (09:59 +0300)]
lib-imap-client: Add imapc_client_try_stop
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