]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Fri, 10 Feb 2017 11:15:58 +0000 (13:15 +0200)]
pop3-login: Code cleanup - Make sure destroying client stops processing.
It would currently do it in any case, but this makes it clearer.
Timo Sirainen [Fri, 10 Feb 2017 11:15:26 +0000 (13:15 +0200)]
global: Ignore unnecessary return values.
Timo Sirainen [Fri, 10 Feb 2017 11:13:01 +0000 (13:13 +0200)]
mail-filter: Handle handshake write() failure
Timo Sirainen [Fri, 10 Feb 2017 10:50:58 +0000 (12:50 +0200)]
fts: Fix crash using fts_autoexpunge_exclude = \Special-use crash
It crashed whenever seeing a mailbox that didn't have any special-use flags.
Timo Sirainen [Fri, 10 Feb 2017 10:46:50 +0000 (12:46 +0200)]
doveadm mailbox metadata list: Fix listing all metadata.
It was listing only private attributes, because key_type=0 happens to be
MAIL_ATTRIBUTE_TYPE_PRIVATE and key was never NULL.
Timo Sirainen [Fri, 10 Feb 2017 10:41:28 +0000 (12:41 +0200)]
mail-crypt-acl: Fix error handling
Don't crash if mail_user creation failed.
Timo Sirainen [Fri, 10 Feb 2017 10:40:41 +0000 (12:40 +0200)]
doveadm mailbox cryptokey generate: Fix error handling
Don't crash if mail_user creation failed.
Timo Sirainen [Fri, 10 Feb 2017 10:33:01 +0000 (12:33 +0200)]
doveadm mailbox cryptokey generate: Fix memory leak
dest_user was set to NULL, but never freed.
Timo Sirainen [Fri, 10 Feb 2017 10:20:37 +0000 (12:20 +0200)]
lib-program-client: Clarify dot_input/dot_output NULL checks.
Helps to avoid static analyzer false positives about NULL pointer
dereference.
Timo Sirainen [Fri, 10 Feb 2017 10:09:50 +0000 (12:09 +0200)]
doveadm director map: Fix checking if host parameter is required
Timo Sirainen [Fri, 10 Feb 2017 09:58:17 +0000 (11:58 +0200)]
lib: Avoid unnecessary Coverity warnings in MALLOC_*()
There doesn't seem to be any other nice way of avoiding these without
separately marking every instance.
Timo Sirainen [Thu, 9 Feb 2017 14:33:35 +0000 (16:33 +0200)]
TODO: Remove some of the implemented features
Timo Sirainen [Wed, 8 Feb 2017 21:01:32 +0000 (23:01 +0200)]
pop3c: Increase timeout for PASS to 5 minutes.
Timo Sirainen [Mon, 6 Feb 2017 16:34:05 +0000 (18:34 +0200)]
sdbox: Fix assert-crash on mailbox create race
If another process created the mailbox at the same time, the mailbox_guid
wasn't set and opening the mailbox assert-crashed:
Panic: file mail-storage.c: line 1744 (mailbox_get_metadata): assertion failed: ((items & MAILBOX_METADATA_GUID) == 0 || !guid_128_is_empty(metadata_r->guid))
Timo Sirainen [Tue, 7 Feb 2017 19:07:54 +0000 (21:07 +0200)]
quota: Clarify quota_count() return value.
Timo Sirainen [Tue, 7 Feb 2017 18:41:41 +0000 (20:41 +0200)]
quota: Make sure quota_warning doesn't wrap "quota before" value.
This could happen in some race conditions (and with bugs).
Timo Sirainen [Tue, 7 Feb 2017 16:26:50 +0000 (18:26 +0200)]
quota: When executing quota_warning/over_flag script, log the reason why.
Martti Rannanjärvi [Mon, 6 Feb 2017 12:37:05 +0000 (14:37 +0200)]
lib-storage: remove mail_storage_get_driver_settings
It has been marked obsolete.
Aki Tuomi [Tue, 7 Feb 2017 11:19:17 +0000 (13:19 +0200)]
lib: Check that output max size is non-zero when version specified
Otherwise we try to send version to non-existent output
stream.
Stephan Bosch [Sun, 22 Jan 2017 12:42:25 +0000 (13:42 +0100)]
fts-tika: Fixed HTTPS support by properly propagating SSL client settings from mail_user.
Stephan Bosch [Sun, 22 Jan 2017 12:41:25 +0000 (13:41 +0100)]
fts-solr: Fixed HTTPS support by properly propagating SSL client settings from mail_user.
Stephan Bosch [Sun, 22 Jan 2017 12:40:00 +0000 (13:40 +0100)]
lib-storage: Added mail_user_init_ssl_client_settings().
johnkwoods [Wed, 28 Dec 2016 18:02:14 +0000 (12:02 -0600)]
lib-ldap: Remove extra return
The ldap_connection_queue_request() function returns void. Trying to
"return" something from a void function caused compiling issues on
Solaris (Oracle Developer Studio 12.5).
J. Nick Koston [Sun, 22 Jan 2017 23:24:02 +0000 (17:24 -0600)]
fts-solr: Allow username/password for solr connction
Solr comes open to the world by default. For better
security, we protect our solr installs with a user
and password. This change allows dovecot to connect
to these instances.
Example usage in a fts.conf (permissions 0600)
fts_solr = url=http://nick:pass@127.0.0.1:8983/solr/dovecot/
Timo Sirainen [Mon, 6 Feb 2017 12:05:47 +0000 (14:05 +0200)]
indexer: Don't send more requests directly from worker status callback
This causes assert-crashes when workers disconnect while having multiple
requests:
indexer: Error: Indexer worker disconnected, discarding 2 requests for user@domain
indexer: Panic: file indexer.c: line 69 (queue_try_send_more): assertion failed: (worker_connection_is_connected(conn))
Timo Sirainen [Sun, 5 Feb 2017 14:49:05 +0000 (16:49 +0200)]
imap: Add imap_fetch_failure setting
This controls what happens when FETCH fails for some mails. The possible
values are:
disconnect-immediately: This is the original behavior. Whenever FETCH
fails for a mail, the FETCH is aborted and client is disconnected.
disconnect-after: The FETCH runs for all the requested mails, skipping
any mails that returned failures, but at the end the client is still
disconnected.
no-after: The FETCH runs for all the requested mails, skipping any mails
that returned failures. At the end tagged NO reply is returned. If the
client attempts to FETCH the same failed mail more than once, the client
is disconnected. This is to avoid clients from going into infinite loops
trying to FETCH a broken mail.
Timo Sirainen [Sun, 5 Feb 2017 14:24:08 +0000 (16:24 +0200)]
imap: Share mailbox closing code in SELECT/UNSELECT/CLOSE/LOGOUT/deinit
Timo Sirainen [Sun, 5 Feb 2017 14:23:35 +0000 (16:23 +0200)]
imap: Free search updates on CLOSE
Timo Sirainen [Sun, 5 Feb 2017 14:10:44 +0000 (16:10 +0200)]
imap: Don't send empty FETCH () on failure
It violates IMAP RFC. Send FETCH (UID n) instead.
Timo Sirainen [Mon, 6 Feb 2017 09:02:46 +0000 (11:02 +0200)]
lib-ssl-iostream: Fix memory leak in RSA_generate_key_ex() usage
Timo Sirainen [Mon, 6 Feb 2017 09:23:50 +0000 (11:23 +0200)]
auth: Handle delayed credentials identically in auth-workers
Timo Sirainen [Mon, 6 Feb 2017 08:55:40 +0000 (10:55 +0200)]
lib: Make sure NULL is defined to be ((void *)0)
This avoids us having to do explicit (void *)NULL casts in e.g.
io_add(..., NULL) context parameter.
Timo Sirainen [Sat, 4 Feb 2017 11:51:13 +0000 (13:51 +0200)]
lib-storage: Don't duplicate service user's settings into mail_user
The mail_storage_service_user.user_set isn't used afterwards, so it can be
directly used to avoid wasting memory.
Timo Sirainen [Sat, 4 Feb 2017 11:38:17 +0000 (13:38 +0200)]
lib-storage: Don't unnecessarily duplicate user's all setting strings
user->unexpanded_set and user->set have the same life-time, so they can
point to same strings.
Timo Sirainen [Sun, 5 Feb 2017 18:29:10 +0000 (20:29 +0200)]
lib-ssl-iostream: Remove libdovecot_openssl_common.la
Using such a library results in the same code being duplicated (in OSX) in
both libssl_iostream_openssl.so and libdcrypt_openssl.so. This breaks the
idea of openssl_init_refcount, because each one will have their own one.
libdcrypt_openssl.so now links to libssl_iostream_openssl.so, which
shouldn't really be a problem, because lib-ssl-iostream is part of the core
libdovecot.so already. It would have been possible to also install
libdovecot_openssl_common.so and link it to both libssl_iostream_openssl.so
and libdcrypt_openssl.so, but that seems unnecessarily complicated.
Timo Sirainen [Sun, 5 Feb 2017 18:28:04 +0000 (20:28 +0200)]
lib-ssl-iostream: Remove empty $(ssl_sources) from Makefile
Timo Sirainen [Sun, 5 Feb 2017 18:26:12 +0000 (20:26 +0200)]
lib-dcrypt: Link unit tests with libssl_iostream.la
libssl_iostream_openssl.so requires this, and it doesn't get added from
anywhere automatically.
Timo Sirainen [Sun, 5 Feb 2017 18:24:41 +0000 (20:24 +0200)]
lib-dcrypt: Remove unnecessary -shared link flag
Not sure if this is harmful, but since no other plugin uses this it's not
needed either.
Timo Sirainen [Sun, 5 Feb 2017 18:22:27 +0000 (20:22 +0200)]
lib-dcrypt: Don't link liblib.la to libdcrypt_openssl.so
At best this does nothing, at worst (like with OSX) it duplicates the
entire liblib and creates split state between the two instances.
Timo Sirainen [Sun, 5 Feb 2017 18:20:37 +0000 (20:20 +0200)]
lib-dcrypt: If dcrypt can't be initialized, log also the reason.
This is very helpful when debugging linking issues.
Timo Sirainen [Sun, 5 Feb 2017 19:38:33 +0000 (21:38 +0200)]
lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen [Sun, 5 Feb 2017 19:31:08 +0000 (21:31 +0200)]
lib-ssl-iostream: Call OBJ_cleanup() for all OpenSSL versions
Just to reduce the #if checks that uglify the code.
Timo Sirainen [Sun, 5 Feb 2017 19:10:04 +0000 (21:10 +0200)]
lib-ssl-iostream: Detect OPENSSL_cleanup() via configure
It's ugly to have both OpenSSL version number check and a special LibreSSL
check.
Timo Sirainen [Sun, 5 Feb 2017 19:04:35 +0000 (21:04 +0200)]
lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
The version number check doesn't work correctly for LibreSSL.
Timo Sirainen [Sun, 5 Feb 2017 19:56:20 +0000 (21:56 +0200)]
lib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists
This avoids deprecation warnings about ASN1_STRING_data() in OpenSSL v1.1.
Timo Sirainen [Sun, 5 Feb 2017 19:51:29 +0000 (21:51 +0200)]
lib-ssl-iostream: Use RSA_generate_key_ex() if it exists
This avoids deprecation warnings about RSA_generate_key() in OpenSSL v1.1.
Timo Sirainen [Sun, 5 Feb 2017 22:11:14 +0000 (00:11 +0200)]
dict-sql: Move USING TIMESTAMP to correct location for INSERTs
Timo Sirainen [Sun, 5 Feb 2017 22:48:18 +0000 (00:48 +0200)]
auth: Pass through passdb extra fields to auth-worker requests
Timo Sirainen [Sun, 5 Feb 2017 22:46:55 +0000 (00:46 +0200)]
auth: Code cleanup - Move userdb extra fields exporting to its own function
Timo Sirainen [Sun, 5 Feb 2017 17:52:20 +0000 (19:52 +0200)]
lib: Fix compiler warning with non-Linux
Timo Sirainen [Wed, 25 Jan 2017 21:26:35 +0000 (23:26 +0200)]
lib-storage: Expunging now uses GUID only if it's in cache.
Otherwise the GUID lookup may be expensive, which is especially bad when
deleting a large number of mails.
Timo Sirainen [Fri, 3 Feb 2017 17:40:54 +0000 (19:40 +0200)]
lib-storage: Fix autoexpunge locking to actually work correctly.
It wasn't actually skipping the autoexpunging if the lock already existed.
It autoexpunged anyway.
Aki Tuomi [Sat, 4 Feb 2017 08:42:21 +0000 (10:42 +0200)]
lib-storage: Put vsize in index only if it's not there
Aki Tuomi [Fri, 3 Feb 2017 12:22:02 +0000 (14:22 +0200)]
fts: Use mailbox_list_created hook
Otherwise the deinit hook might get lost and fts would not be deinitialized.
Reverts
11f12ca1c97583b551a4286fa6cd1ab33aa67680 which seems to have been unnecessary
Fixes indexer-worker signal 11 crash
Timo Sirainen [Fri, 3 Feb 2017 14:16:26 +0000 (16:16 +0200)]
lib-storage: Once hooks have run, set vlast to NULL to make sure it's not used
The functions can't be correctly overridden outside their own specific
hooks. It would work only if hook_build_update() is called afterwards and
currently there's no public API for that.
Timo Sirainen [Mon, 30 Jan 2017 19:28:20 +0000 (21:28 +0200)]
lib-storage: Add assert to make sure header parsing isn't recursed
Stephan Bosch [Thu, 2 Feb 2017 00:36:50 +0000 (01:36 +0100)]
lib-http: client: Fixed peer reconnection failure handling.
The addressed problem occurs in a very specific situation in which the original successful connection is dropped, yet a new connection fails.
It manifests as an assertion failure or panic:
Panic: file ioloop-epoll.c: line 189 (io_loop_handler_run_internal): assertion failed: (msecs >= 0)
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.
The timing is very critical. However, this doesn't mean that the occurrence of this problem is very unlikely; it can happen frequently under high load.
Stephan Bosch [Thu, 2 Feb 2017 00:34:35 +0000 (01:34 +0100)]
lib-http: client: Respect the connection idle timeout, even when all queues have unlinked from a peer.
Otherwise, the DNS TTL timeout dictates the connection idle timeout in some situations.
Timo Sirainen [Thu, 2 Feb 2017 09:47:24 +0000 (11:47 +0200)]
dict: Fix error logging if TIMESTAMP parameters are wrong.
Martti Rannanjärvi [Wed, 1 Feb 2017 08:48:37 +0000 (10:48 +0200)]
lib-master: Ignore t_readlink ENOENT error on updating instances list
The list may contain paths that don't exist anymore.
Timo Sirainen [Tue, 31 Jan 2017 19:03:29 +0000 (21:03 +0200)]
imap: Fix panic on FETCH X-MAILBOX in virtual mailbox when mail is expunged
Timo Sirainen [Tue, 31 Jan 2017 18:27:54 +0000 (20:27 +0200)]
lib: Fix -Wstrict-bool compiler warnings.
Martti Rannanjärvi [Mon, 30 Jan 2017 17:45:28 +0000 (19:45 +0200)]
lib: Implicitly ignore memmove and memcpy return values in path-util
This is because dovecot code doesn't explicitly ignore the return values
of those functions elsewhere either.
Stephan Bosch [Tue, 31 Jan 2017 12:41:48 +0000 (13:41 +0100)]
lib-http: server: Fix premature connection destroy in http_server_connection_output().
Added a reference to the connection object while it is sending the remainder of a response's payload.
This is necessary, since http_server_response_send_more() can destroy the connection, for example when the request has a "Connection: close" header.
This will only occur for responses with a very large payload, because otherwise the payload is fully sent in in the initial pass.
Timo Sirainen [Mon, 9 Jan 2017 21:13:03 +0000 (23:13 +0200)]
lib-storage: When logging corrupted mail size, disable logging Message-ID for now
This was causing crashes in some situations. It was originally added to
figure out if there were problems with dovecot.index.cache containing
data for wrong messages. This was never found to happen, although now
thinking about it, the problem may have been
741287129c22cadc14c05584704685b31169dbce . So perhaps this code could be
removed permanently as well.
6b44fc75c0039d1006ce4d543544552449b8e229 also attempted to fix this, but it
wasn't enough. There was still some code path that lead to recursive header
parsing.
Stephan Bosch [Mon, 30 Jan 2017 22:20:48 +0000 (23:20 +0100)]
lib: path-util: Fixed assertion in path_normalize().
The invariant was using the wrong variable for comparison, causing it to trigger erraticly.
Timo Sirainen [Mon, 30 Jan 2017 17:17:33 +0000 (19:17 +0200)]
lib: Fix t_get_working_dir() to properly allocate memory in data stack.
Timo Sirainen [Mon, 30 Jan 2017 19:53:01 +0000 (21:53 +0200)]
lib-mail: Fix message_part_data_is_plain_7bit()
Content-Type parameters weren't handled exactly right.
Broken by recent changes.
Timo Sirainen [Mon, 30 Jan 2017 16:55:29 +0000 (18:55 +0200)]
lib-imap: Fix another compiler warning
Unnecessary, but older gcc complains.
Martti Rannanjärvi [Thu, 29 Dec 2016 21:32:04 +0000 (23:32 +0200)]
lib, lib-master: Add error_r to t_binary_abspath
Martti Rannanjärvi [Thu, 29 Dec 2016 21:04:56 +0000 (23:04 +0200)]
lib: Add error_r to t_abspath and its callers
Martti Rannanjärvi [Tue, 29 Nov 2016 18:50:28 +0000 (20:50 +0200)]
lib: Add tests for path-util
Martti Rannanjärvi [Sun, 4 Dec 2016 10:13:00 +0000 (12:13 +0200)]
lib: Add Pigeonhole realpath functions to path-util
Martti Rannanjärvi [Sun, 4 Dec 2016 10:52:51 +0000 (12:52 +0200)]
lib: Rename t_get_current_dir to t_get_working_dir
Also add an error_r parameter that cannot be NULL.
Martti Rannanjärvi [Sun, 4 Dec 2016 10:47:22 +0000 (12:47 +0200)]
lib: Add error_r to t_readlink and its callers
Martti Rannanjärvi [Wed, 30 Nov 2016 10:03:30 +0000 (12:03 +0200)]
lib: Add asserts to t_abspath and t_abspath_to
Martti Rannanjärvi [Wed, 30 Nov 2016 06:40:40 +0000 (08:40 +0200)]
lib: Rename abspath to path-util
Timo Sirainen [Mon, 30 Jan 2017 16:29:36 +0000 (18:29 +0200)]
lib-imap: Fix compiler warning
Unnecessary, but older gcc complains.
Stephan Bosch [Sat, 14 Jan 2017 12:33:05 +0000 (13:33 +0100)]
lib-imap: Created test-imap-envelope.
Stephan Bosch [Thu, 29 Dec 2016 13:02:05 +0000 (14:02 +0100)]
lib-imap: imap-envelope: Added function for parsing ENVELOPE from string.
Stephan Bosch [Wed, 26 Oct 2016 21:44:47 +0000 (23:44 +0200)]
lib-imap: Added more comments to imap-bodystructure and imap-envelope.
Stephan Bosch [Sun, 23 Oct 2016 23:45:18 +0000 (01:45 +0200)]
lib-imap: imap-bodystructure: Added support for making imap_bodystructure_parse() work without a pre-existing message_part tree.
It can now create the tree from the BODYSTRUCTURE string itself.
Stephan Bosch [Sun, 23 Oct 2016 23:01:19 +0000 (01:01 +0200)]
lib-mail: message-part-data: Implemented message_part_data_get_filename().
Gets the message part's filename if it has any.
Stephan Bosch [Sun, 23 Oct 2016 22:19:05 +0000 (00:19 +0200)]
lib-mail: message-part-data: Renamed struct message_part_envelope_data to message_part_envelope.
Stephan Bosch [Sun, 23 Oct 2016 20:29:49 +0000 (22:29 +0200)]
lib-imap: imap-envelope: Moved imap_envelope_headers to lib-mail/message-part-data as message_part_envelope_headers.
Stephan Bosch [Sun, 23 Oct 2016 18:05:33 +0000 (20:05 +0200)]
lib-imap: imap-bodystructure: Moved message_part_data header parsing and query functions to their own module in lib-mail.
Moved code from imap-bodystructure and imap-envelope.
Stephan Bosch [Sun, 23 Oct 2016 17:47:12 +0000 (19:47 +0200)]
lib-imap: imap-bodystructure: Renamed imap_bodystructure_is_plain_7bit() to message_part_data_is_plain_7bit().
Stephan Bosch [Sun, 23 Oct 2016 17:00:10 +0000 (19:00 +0200)]
lib-imap: imap-envelope: Renamed imap_envelope_parse_header() to message_part_envelope_parse_from_header().
Stephan Bosch [Sun, 23 Oct 2016 16:10:01 +0000 (18:10 +0200)]
lib-imap: imap-evenvelope: Changed imap_envelope_get_field() into a private equivalent.
Stephan Bosch [Sun, 23 Oct 2016 15:51:59 +0000 (17:51 +0200)]
lib-imap: imap-bodystructure: Renamed imap_bodystructure_parse_header() to message_part_data_parse_from_header().
Stephan Bosch [Sun, 23 Oct 2016 15:27:07 +0000 (17:27 +0200)]
lib-imap: imap-bodystructure: Grouped together functions relating to the conversion of BODYSTRUCTURE to BODY.
This only moves code.
Stephan Bosch [Sun, 23 Oct 2016 14:50:25 +0000 (16:50 +0200)]
lib-imap: imap-bodystructure: Changed struct message_part_body to contain fully decoded data.
Contained unparsed IMAP string data before.
Stephan Bosch [Sun, 23 Oct 2016 14:49:37 +0000 (16:49 +0200)]
lib-imap: imap-envelope: Added function to parse struct message_part_envelope_data from parsed imap args.
Stephan Bosch [Sun, 23 Oct 2016 12:06:44 +0000 (14:06 +0200)]
lib-imap: imap-bodystructure: Renamed `d' parameter to `data' in parse_content_header() function.
Stephan Bosch [Sun, 23 Oct 2016 11:52:10 +0000 (13:52 +0200)]
lib-imap: imap-envelope: Removed useless pool field from struct message_part_envelope_data.
Stephan Bosch [Sun, 23 Oct 2016 11:50:05 +0000 (13:50 +0200)]
lib-imap: imap-bodystructure: Removed useless pool field from struct message_part_data.
Stephan Bosch [Sun, 23 Oct 2016 11:29:43 +0000 (13:29 +0200)]
lib-mail: Gave message_part_data its own field in struct message_part.
Stephan Bosch [Sun, 23 Oct 2016 11:10:11 +0000 (13:10 +0200)]
lib-imap: imap-bodystructure: Renamed struct message_part_body_data to message_part_data.
Stephan Bosch [Sun, 23 Oct 2016 10:10:44 +0000 (12:10 +0200)]
lib-imap: Removed existing envelope parsing function.
This is currently only used by imaptest. Alternative API is provided in later commit.
Stephan Bosch [Sun, 8 Jan 2017 11:00:15 +0000 (12:00 +0100)]
lib-imap: test-imap-bodystructure: Added normalization tests.