]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
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.
Aki Tuomi [Wed, 22 Mar 2017 17:21:55 +0000 (19:21 +0200)]
doveadm: Add exit code/string conversion functions
Stephan Bosch [Thu, 2 Mar 2017 22:12:45 +0000 (23:12 +0100)]
lib-lda: smtp-client: Fixed memory leak of the error message string.
Stephan Bosch [Thu, 2 Mar 2017 22:51:45 +0000 (23:51 +0100)]
lib-lda: smtp-client: Fixed cleanup of LMTP client at end of transaction.
It was not deinitialized, causing a memory leak.
Stephan Bosch [Wed, 1 Mar 2017 23:42:13 +0000 (00:42 +0100)]
lib-smtp: lmtp-client: Fixed bug in timeout handling.
The timeout was erroneously stopped when lmtp_client_send() was invoked before a connection was established.
Once the connection finally got established, the timeout was removed.
This would cause the client to wait indefinitely.
Stephan Bosch [Wed, 1 Mar 2017 23:03:50 +0000 (00:03 +0100)]
lib-lda: smtp-client: Make sure only the first error determines the tempfail status.
The client is supposed to stop running the moment the first error occurs. However, there is a (very unlikely) possiblity that the encapsulated LMTP client issues both an RCPT and DATA error callback in sequence.
In that case, the second callback should not override the tempfail status of the first (the second likely is a tempfail).
If the server disconnects right after failing the last of at least two recipients, the lmtp-client would issue a DATA callback with a disconnection error.
The disconnect error would set the client->tempfail flag, which caused smtp_client_deinit*() to always return -1 in this scenario.
Stephan Bosch [Sat, 5 Nov 2016 21:00:09 +0000 (22:00 +0100)]
lib-lda: smtp-client: Renamed "smtp_client" parameters to "client" for consistency.
Timo Sirainen [Tue, 21 Mar 2017 23:05:37 +0000 (01:05 +0200)]
lib: Add missing error handling to o_stream_cork()
With ostream-file the corking could have called buffer_flush(), which could
have failed and set stream_errno, but nothing would set last_failed_errno.
Fixes:
Panic: file ostream.c: line 59 (o_stream_close_full): assertion failed: (stream->last_failed_errno != 0)
Aki Tuomi [Mon, 20 Mar 2017 18:21:56 +0000 (20:21 +0200)]
lib-dict: Ensure init returns dict
Aki Tuomi [Fri, 10 Mar 2017 08:05:14 +0000 (10:05 +0200)]
pop3-login: Add FORWARD for XCLIENT
This allows passing passdb variables. They are prefixed
with forward_ when imported to extra fields.
Aki Tuomi [Fri, 10 Mar 2017 08:04:33 +0000 (10:04 +0200)]
pop3-login: Pass forward_ passdb args using XCLIENT command
Aki Tuomi [Mon, 20 Feb 2017 18:37:09 +0000 (20:37 +0200)]
imap-login: Allow x-forward- to specify forward fields from trusted networks
Aki Tuomi [Mon, 20 Feb 2017 18:36:58 +0000 (20:36 +0200)]
auth: Accept forward_fields from auth client
Aki Tuomi [Thu, 16 Mar 2017 11:36:23 +0000 (13:36 +0200)]
auth: Add auth_fields_import_prefixed
Aki Tuomi [Tue, 14 Mar 2017 08:01:51 +0000 (10:01 +0200)]
auth: Support client_id variable
When imap_id_retain is turned on, contains
the client ID request content with dovecot
special vars removed.
Aki Tuomi [Thu, 16 Mar 2017 08:01:23 +0000 (10:01 +0200)]
imap-login: Forward original client ID to next hop
This will be done if ID is present.
Aki Tuomi [Mon, 20 Feb 2017 17:11:01 +0000 (19:11 +0200)]
imap-login: Retain ID request without dovecot specials
Aki Tuomi [Tue, 21 Feb 2017 12:46:31 +0000 (14:46 +0200)]
imap-login: Add option to retain client id
This should be enabled if client_id is wanted for auth policy
Aki Tuomi [Mon, 20 Feb 2017 16:58:21 +0000 (18:58 +0200)]
auth: Accept client_id from auth client
Client ID contains the ID client request string
for IMAP.
Aki Tuomi [Thu, 9 Mar 2017 12:08:40 +0000 (14:08 +0200)]
login-common: Add preproxy pool
preproxy pool can be used to do allocations that are released
once proxying starts.
Timo Sirainen [Sat, 28 Jan 2017 23:03:00 +0000 (01:03 +0200)]
imapc: Use LOGOUT to cleanly disconnect from server.
This makes it clearer in the remote server's logs whether the disconnection
was intentional or not.
Use a hardcoded 5 second timeout for LOGOUT. It should be enough time for
the server to finish sending the tagged reply.
Timo Sirainen [Thu, 16 Mar 2017 16:46:28 +0000 (18:46 +0200)]
lib-storage: Don't reset \Recent flags when rebuilding index
The recent flags are tracked with first_recent_uid in the header. If the
first_recent_uid is valid in the old index, preserve it. This way all
mails don't show as having \Recent flag.
This was used by sdbox and mdbox code.
Aki Tuomi [Thu, 16 Mar 2017 07:38:59 +0000 (09:38 +0200)]
trash: Move config file to trash user
Makes static analyser happy
Stephan Bosch [Sun, 5 Mar 2017 18:45:04 +0000 (19:45 +0100)]
lib-http: test-http-server-errors: Fixed logically dead code.
Problem reported by Coverity.
Timo Sirainen [Thu, 2 Mar 2017 16:32:15 +0000 (18:32 +0200)]
example-config: Update deliver_log_format comment
Aki Tuomi [Thu, 2 Mar 2017 07:15:13 +0000 (09:15 +0200)]
lib-ssl-iostream: Ensure verify_remote_cert is true
Forgotten in
38424b8081a75be3ef93729fed4d30dbafca5885
Aki Tuomi [Mon, 20 Feb 2017 07:32:15 +0000 (09:32 +0200)]
lib-ssl-iostream: Fix ambiguity with SSL settings
- lib-ssl-iostream as client: Use only allow_invalid_cert. If it's not set, verify the server cert.
- lib-ssl-iostream as server: If verify_client_cert=FALSE, don't ask for the client cert. Otherwise, ask for client cert but still allow it if allow_invalid_cert=TRUE.
Timo Sirainen [Wed, 1 Mar 2017 11:12:41 +0000 (13:12 +0200)]
imap-hibernate: Avoid using casts
Aki Tuomi [Wed, 1 Mar 2017 07:15:29 +0000 (09:15 +0200)]
trash: Read settings after namespaces are loaded
Fixes Panic: file mail-namespace.c: line 709 (mail_namespace_find): assertion failed: (ns != NULL)
Timo Sirainen [Mon, 27 Feb 2017 14:23:09 +0000 (16:23 +0200)]
master: Try to listen on master socket even if all services couldn't be listened to.
This could happen during a settings reload.
Timo Sirainen [Mon, 27 Feb 2017 14:22:52 +0000 (16:22 +0200)]
master: Add missing error logging for master socket listening failure.
Timo Sirainen [Mon, 27 Feb 2017 14:22:08 +0000 (16:22 +0200)]
master: Don't crash if master socket couldn't be re-opened after settings reload.
Aki Tuomi [Thu, 23 Feb 2017 09:47:20 +0000 (11:47 +0200)]
imap-hibernate: Support userdb in var_expand
Timo Sirainen [Sun, 26 Feb 2017 14:10:58 +0000 (16:10 +0200)]
lib-index: Fix test-mail-index-transaction-update
It was broken with TZ=Australia/ACT. Fixing it seems too troublesome, so
just use TZ=UTC during the test.
Timo Sirainen [Sun, 26 Feb 2017 14:09:13 +0000 (16:09 +0200)]
lib-index: Minor fix to day_first_uid updating
mktime() was getting a bit confused around day changes. Giving it only
year/month/day makes it less confused.
Aki Tuomi [Sat, 11 Mar 2017 17:20:30 +0000 (19:20 +0200)]
doveadm: Do not crash doveadm-server if input file missing
save commands expects valid input file for it to work,
if we are not running for cli, and input file is not
provided, provide EINVAL error to caller via i_stream_error.
Aki Tuomi [Thu, 16 Mar 2017 07:36:23 +0000 (09:36 +0200)]
lib-dcrypt: Add asserts
Fixes several static analysis reports
Josef 'Jeff' Sipek [Mon, 27 Feb 2017 23:13:54 +0000 (18:13 -0500)]
lib-storage & imap: add MAIL_ERROR_UNAVAILABLE as [UNAVAILABLE]
[UNAVAILABLE] is defined in RFC 5530 and we were just missing a MAIL_ERROR_*
constant to make use of it.
Timo Sirainen [Wed, 8 Mar 2017 20:39:34 +0000 (15:39 -0500)]
imap, pop3, indexer-worker: Add (deinit) to process title before autoexpunging runs.
lmtp should also do this, but it needs a bit larger changes.
Timo Sirainen [Wed, 8 Mar 2017 22:09:12 +0000 (17:09 -0500)]
pop3: Add client.destroyed boolean
Timo Sirainen [Mon, 13 Mar 2017 12:23:11 +0000 (14:23 +0200)]
auth: Auth workers shouldn't return username if it wasn't changed
This continues the previous fix where username was always added to
passdb/userdb cache, even if the username wasn't changed. That could have
resulted in wrongly changing usernames if the cache key didn't uniquely
identify the user.
Timo Sirainen [Mon, 13 Mar 2017 11:49:04 +0000 (13:49 +0200)]
auth: passdb/userdb lookups via auth-worker cached too much of the replies
Only the fields returned by the lookup itself were supposed to be cached.
This was especially problematic if the lookup via auth-worker didn't
uniquely identify the user. For example doing a passdb lookup for an
attribute shared by multiple users could have caused the reply to contain
the previous cached user's all extra fields.
Aki Tuomi [Wed, 15 Mar 2017 11:29:11 +0000 (13:29 +0200)]
auth: Properly hide all fields with passwords
client reply line wasn't hiding all items
which contain 'pass' substring. This was
inconsistent behaviour since elsewhere this was done.
Timo Sirainen [Wed, 15 Mar 2017 16:20:31 +0000 (18:20 +0200)]
*-login: Change API for how login_plugins hook into client allocation.
The previous API worked badly when there were more than one plugin.
The current behavior works similarly to how mail_plugins work.
Timo Sirainen [Mon, 13 Mar 2017 20:52:41 +0000 (22:52 +0200)]
cassandra: Treat CASS_ERROR_SERVER_UNAVAILABLE as "write success is uncertain"
Looks like the write could still have actually gone through.
Timo Sirainen [Wed, 15 Mar 2017 23:22:09 +0000 (01:22 +0200)]
lib-oauth2: Don't free oauth2_request too early.
Move the freeing explicitly to only after calling the callback. The
previous method of freeing it on when http_request was destroyed could
have happened too early when oauth2_parse_json() called i_stream_unref(),
which released the last reference to the http_request.
Timo Sirainen [Wed, 15 Mar 2017 23:12:57 +0000 (01:12 +0200)]
lib-oauth2: Fix memory leak if HTTP URL parsing fails.
Also delay calling the callback. The callers don't necessarily expect an
immediate callback (auth/db-oauth2.c doesn't).
Timo Sirainen [Wed, 15 Mar 2017 22:54:44 +0000 (00:54 +0200)]
auth: oauth2 - cleanup db_oauth2_lookup_callback_t
db parameter isn't needed, because request->db already contains it.
Also moved request parameter to be the first.
Timo Sirainen [Wed, 15 Mar 2017 22:51:15 +0000 (00:51 +0200)]
auth: oauth2 - make it easier to see where db_oauth2_callback() is called
Doesn't fix anything, but places the db_oauth2_callback() calls into the end
of _continue() calls so it's clearer that they're always being called
exactly once.
Timo Sirainen [Wed, 15 Mar 2017 23:35:38 +0000 (01:35 +0200)]
auth: oauth2 - Clarify token validation success/valid error handling
result->error is NULL only if result->success && !result->valid.
Also !result->success is the more important error handling case.
Write out these cases explicitly so it's easier to understand.
Timo Sirainen [Wed, 15 Mar 2017 22:42:28 +0000 (00:42 +0200)]
auth: oauth2 - remove db_oauth2_request.failed
It is an unnecessary duplication of passdb_result.
Timo Sirainen [Wed, 15 Mar 2017 22:38:39 +0000 (00:38 +0200)]
auth: oauth2 - remove db_oauth2_request.result
It's not a persistent state. When it's set, the callback needs to be called.
This way it's more difficult to forget to set it.
Timo Sirainen [Wed, 15 Mar 2017 22:33:24 +0000 (00:33 +0200)]
auth: oauth2 - Template expand failure should be an internal error
Not the default "password mismatch". Also changed the API to be closer to
the other nearby functions.
Timo Sirainen [Wed, 15 Mar 2017 22:32:01 +0000 (00:32 +0200)]
auth: oauth2 - make db_oauth2_template_export() static
It's not used outside db-oauth2.c
Timo Sirainen [Wed, 15 Mar 2017 22:25:19 +0000 (00:25 +0200)]
auth: oauth2 - introspection lookup error should be internal failure
Not the default, which is "password mismatch".
Timo Sirainen [Wed, 15 Mar 2017 22:15:10 +0000 (00:15 +0200)]
auth: oauth2 - Make sure db_oauth2_request.req is set to NULL when it gets freed.
Doesn't fix anything, but makes it clearer that req->req must not be
aborted anymore after this stage, because it gets freed anyway.
Timo Sirainen [Wed, 15 Mar 2017 22:13:08 +0000 (00:13 +0200)]
auth: oauth2 - Fix aborting auth requests on deinit.
The auth_request needs to be finished by calling the callback.
Aki Tuomi [Mon, 6 Mar 2017 12:59:46 +0000 (14:59 +0200)]
auth: Do not double-expand key in passdb dict when authenticating
Broken by
79042f8c
Timo Sirainen [Thu, 9 Mar 2017 16:32:21 +0000 (11:32 -0500)]
*-login: Remove unused client.proxy_state
Timo Sirainen [Thu, 9 Mar 2017 15:48:33 +0000 (10:48 -0500)]
pop3-login: Remove usage of client.common.proxy_state
Timo Sirainen [Thu, 9 Mar 2017 15:46:36 +0000 (10:46 -0500)]
pop3-login: Log proxy state as human-readable string.
Timo Sirainen [Thu, 9 Mar 2017 15:41:52 +0000 (10:41 -0500)]
imap-login: Log proxy state as human-readable string.
Separate sent/received state and log them as strings.
Timo Sirainen [Thu, 9 Mar 2017 15:31:39 +0000 (10:31 -0500)]
*-login: Add client.proxy_get_state() for providing human-readable proxy state
If not implemented, it defaults to the old method of returning proxy_state
number.
Timo Sirainen [Tue, 7 Mar 2017 19:36:45 +0000 (14:36 -0500)]
pop3: Set process title before syncing mailbox.
The syncing could be taking a long time, so it's useful to have the username
in the process title during that.
Timo Sirainen [Wed, 8 Mar 2017 15:07:37 +0000 (10:07 -0500)]
imap: If unhibernation fails due to a mailbox error, log the mailbox name.
Timo Sirainen [Wed, 8 Mar 2017 14:28:14 +0000 (09:28 -0500)]
imap: When disconnecting due to FETCH failure, include "FETCH" in the log message.
Aki Tuomi [Tue, 7 Mar 2017 16:10:57 +0000 (18:10 +0200)]
lib-sasl: Fix xoauth2 data format
Authentication data was missing user=
Aki Tuomi [Tue, 7 Mar 2017 08:09:20 +0000 (10:09 +0200)]
db-oauth2: Make sure request is removed only once
Callback might be called twice.
Aki Tuomi [Tue, 7 Mar 2017 08:08:08 +0000 (10:08 +0200)]
lib-oauth2: Use http client destroy callback
Avoids freeing memory early.
Fixes signal 11 crash in auth
Aki Tuomi [Mon, 6 Mar 2017 11:16:12 +0000 (13:16 +0200)]
auth: Apply skips to first passdb
This is required to apply filters to first
passdb, so that mechanism filters can be
applied.
Aki Tuomi [Fri, 3 Mar 2017 06:31:50 +0000 (08:31 +0200)]
lib-oauth2: Add missing content-type header
Timo Sirainen [Thu, 20 Oct 2016 09:08:09 +0000 (12:08 +0300)]
lib: Added i_strchr_to_next()
Martti Rannanjärvi [Wed, 1 Mar 2017 10:29:17 +0000 (12:29 +0200)]
fts: Don't add NULL content disposition or type to HTTP header
Aki Tuomi [Mon, 27 Feb 2017 18:40:43 +0000 (20:40 +0200)]
doveadm: Add missing newline to proxy kick output
Aki Tuomi [Mon, 27 Feb 2017 18:38:43 +0000 (20:38 +0200)]
doveadm: Ensure -- is added to command line before positional arguments for non-mails commands as well
Was forgotten from
967efe37d1f10a28c0a086cc5919d4ce8917bed8
Aki Tuomi [Mon, 27 Feb 2017 17:12:32 +0000 (19:12 +0200)]
doveadm: Ensure -- is added to command line before positional arguments
This prevents parser from choking on dash.
Aki Tuomi [Mon, 27 Feb 2017 17:04:55 +0000 (19:04 +0200)]
doveadm: Fix allow-empty-mailbox-name handling
It was supposed to be handled for metadata commands only.
Broken in
26c41874cf6019c3e39f0ed630b2a07a92b2635f
Timo Sirainen [Mon, 27 Feb 2017 12:21:48 +0000 (14:21 +0200)]
doveadm move: Use mailbox_move() instead of copy+expunge
This allows for some optimizations to be done.
Martti Rannanjärvi [Mon, 27 Feb 2017 07:39:06 +0000 (09:39 +0200)]
master: add cassandra to printed build options
Timo Sirainen [Sat, 25 Feb 2017 19:47:01 +0000 (21:47 +0200)]
lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen [Sat, 25 Feb 2017 19:41:03 +0000 (21:41 +0200)]
lib-dcrypt: Move most of the OpenSSL #if handling to macros
This avoids #if calls being littered all over the file.
This change can cause HMAC_CTX_free(NULL) to be called, but that seems to
work fine without crashing.
Timo Sirainen [Sun, 26 Feb 2017 13:37:36 +0000 (15:37 +0200)]
lib: Fix t_strf*time() unit tests
Timezone isn't part of the standard struct tm, so %z doesn't necessarily
expand as expected outside Linux.