]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Mon, 10 Oct 2016 07:37:24 +0000 (10:37 +0300)]
doveadm-sync: Document end-date flag
Aki Tuomi [Mon, 10 Oct 2016 07:36:52 +0000 (10:36 +0300)]
doveadm-sync: Add end-date support
Aki Tuomi [Mon, 10 Oct 2016 07:13:12 +0000 (10:13 +0300)]
doveadm-sync: Document start date
Timo Sirainen [Sun, 9 Oct 2016 20:34:18 +0000 (23:34 +0300)]
lib-compression: Fixed compler warnings and wrongly triggering asserts.
Broken by
7f74811b7 .
Timo Sirainen [Thu, 6 Oct 2016 10:50:59 +0000 (13:50 +0300)]
global: Make sure i_stream_read() calls handle 0 and -2 return values correctly.
Timo Sirainen [Thu, 6 Oct 2016 10:39:21 +0000 (13:39 +0300)]
log: Minor error logging and comment improvement.
Timo Sirainen [Thu, 6 Oct 2016 10:09:46 +0000 (13:09 +0300)]
imapc: Added imapc_max_line_length to limit maximum memory usage.
The default is still unlimited, but this should be set to something smaller
for untrusted servers.
Timo Sirainen [Thu, 6 Oct 2016 09:10:28 +0000 (12:10 +0300)]
lib-index: Added test-mail-index-modseq unit test
Timo Sirainen [Wed, 5 Oct 2016 13:34:16 +0000 (16:34 +0300)]
lib-storage: Fixed assert-crash in mailbox_save_cancel()
Broken by
05150df8f . Fixes:
Panic: file mail-storage.c: line 2137 (mailbox_save_context_reset): assertion failed: (ctx->saving)
Timo Sirainen [Tue, 27 Sep 2016 13:15:42 +0000 (16:15 +0300)]
lib: If connect() fails with EADDRNOTAVAIL, retry it 4 more times.
This is needed on busy systems. Nicely explained in:
https://idea.popcount.org/2014-04-03-bind-before-connect/
Phil Carmody [Wed, 5 Oct 2016 12:03:05 +0000 (15:03 +0300)]
plugins/fts - make storage errors more informative
There are 3 different ways to fail ending a transaction (one
of which is itself just a record that something now unknown
previously failed). Identify which one in the logs.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Timo Sirainen [Tue, 4 Oct 2016 14:31:26 +0000 (17:31 +0300)]
lib-storage: autoexpunge mailboxes with wildcards didn't work with namespace prefix.
Timo Sirainen [Tue, 27 Sep 2016 16:48:14 +0000 (19:48 +0300)]
lib-index: If view syncing sees index is reset, always mark the view as inconsistent.
Not only when the mailbox has messages, because that could still mess up
assumptions about UIDs. A somewhat better check could have been to do this
only when next_uid>1 (= there have been messages at some point in this
mailbox), but it's safer to just always mark the view as inconsistent.
Timo Sirainen [Tue, 27 Sep 2016 16:45:57 +0000 (19:45 +0300)]
lib-index: When finding a view is reset, don't attempt any further syncing.
This could cause various errors to be logged, such as:
Error: Append with UID 7103, but next_uid = 7242
Timo Sirainen [Tue, 27 Sep 2016 16:41:25 +0000 (19:41 +0300)]
lib-index: Fixed potential assert-crash when view syncing sees a reset marker.
It should never try to use main index map at that point, because
view_sync_have_expunges() looks changes only before the reset marker.
Fixes:
Error: Index .../dovecot.index lost messages without expunging (36 -> 27)
Timo Sirainen [Tue, 27 Sep 2016 16:39:59 +0000 (19:39 +0300)]
lib-storage: Make sure mailbox_sync*() fails if view is inconsistent afterwards.
Timo Sirainen [Tue, 27 Sep 2016 16:38:26 +0000 (19:38 +0300)]
imap: If mailbox is inconsistent after syncing, don't try to sync message counts.
This fixes (e.g. after doveadm force-resync):
Panic: Message count decreased
Stephan Bosch [Sun, 2 Oct 2016 12:18:35 +0000 (14:18 +0200)]
lib-http: uri: Removed unnecessary checking of percent encoding of query and fragment parts.
This is now always performed in lib/uri-util.
Stephan Bosch [Sun, 2 Oct 2016 12:14:48 +0000 (14:14 +0200)]
lib: uri-util: Always fully check the syntax of percent encoding while parsing URI components.
Aki Tuomi [Mon, 3 Oct 2016 07:08:45 +0000 (10:08 +0300)]
lib-test: Fix memory leak in test-ostream
Aki Tuomi [Mon, 3 Oct 2016 07:08:31 +0000 (10:08 +0300)]
lib-test: Fix illegal memory access in test-ostream
Aki Tuomi [Mon, 3 Oct 2016 06:11:23 +0000 (09:11 +0300)]
io: Add source filename
This will make debugging alot easier
when you can see what the filename is as well.
Timo Sirainen [Fri, 30 Sep 2016 10:42:45 +0000 (13:42 +0300)]
lib-test: Added test_ostream for testing nonblocking ostreams.
Timo Sirainen [Fri, 30 Sep 2016 10:10:13 +0000 (13:10 +0300)]
lib-test: Moved test_istream code to its own test-istream.c file.
Timo Sirainen [Fri, 30 Sep 2016 10:04:48 +0000 (13:04 +0300)]
lib-test: Allow test_istream_set_*() for test-istream's children.
It will internally find the test_istream from parents. This simplifies the
testing code so that it doesn't have to keep track of both the test_istream
and the final istream.
Timo Sirainen [Tue, 27 Sep 2016 17:21:55 +0000 (20:21 +0300)]
director: Ignore duplicates in director_servers setting.
Timo Sirainen [Fri, 30 Sep 2016 09:36:33 +0000 (12:36 +0300)]
lib-storage: mail_user_dup() should duplicate also userdb_fields.
Timo Sirainen [Thu, 29 Sep 2016 11:15:32 +0000 (14:15 +0300)]
lib-storage: Don't reset mail_save_context.saving too early.
If mailbox_save_using_mail() ended up in mail_storage_copy(), saving was set
to FALSE before the copy() method was finished running. This caused e.g.
notify plugin to think that this was a copy event instead of a save event.
Added comments and asserts to clarify how the logic should work between
all the different copying/moving/saving flags.
Timo Sirainen [Thu, 29 Sep 2016 11:00:49 +0000 (14:00 +0300)]
lib-storage: If mailbox_move() fails, reset mail_save_context.moving==FALSE
Timo Sirainen [Tue, 27 Sep 2016 12:50:11 +0000 (15:50 +0300)]
master: Removed hardcoded listen() backlog limit.
If it's already too large, the kernel will truncate it automatically. So
there shouldn't be any reason for us to explicitly limit it.
Timo Sirainen [Mon, 26 Sep 2016 12:38:27 +0000 (15:38 +0300)]
dict-client: Fixed lock and ioloop wait timings in log messages.
Previously it was logging the total amount of time spent on lock waits or on
ioloop during the existence of the entire process, rather than how much time
the command itself was spending on those. This wasn't very useful.
Now it also tries to separate the time spent on the main ioloop and in
dict_wait().
Timo Sirainen [Mon, 26 Sep 2016 13:44:21 +0000 (16:44 +0300)]
dict-client: Don't return "Dict server timeout" too early.
This could have happened when many dict commands were being run without
the timeout being reset in the middle.
Timo Sirainen [Mon, 26 Sep 2016 13:34:23 +0000 (16:34 +0300)]
dict-client: Remove timeout when there are only background commands.
Normally the timeout wasn't added in the first place, but it was if a
non-background command was added first and it was followed by a background
command.
Timo Sirainen [Wed, 21 Sep 2016 10:47:05 +0000 (13:47 +0300)]
lib: Fixed ostream-failure-at with blocking parent stream.
Blocking ostream returns either a full success or a full failure. It can't
return that only n/m bytes were written.
Fixes assert:
Panic: file ostream.c: line 255 (o_stream_sendv_int): assertion failed: (!stream->blocking)
Timo Sirainen [Mon, 19 Sep 2016 08:08:08 +0000 (11:08 +0300)]
lib-ssl-iostream: The final fix to make the SSL plugin loading not fail..
Timo Sirainen [Sun, 18 Sep 2016 13:33:07 +0000 (16:33 +0300)]
lib-ssl-iostream: Fixed OpenSSL module to be actually initialized.
Timo Sirainen [Fri, 16 Sep 2016 05:39:24 +0000 (08:39 +0300)]
lib-http: Link test-http-client libssl_iostream_openssl.so directly.
This way it can be run without having to do make install first.
Timo Sirainen [Fri, 16 Sep 2016 05:35:55 +0000 (08:35 +0300)]
lib-ssl-iostream: Use more standard _init() & _deinit() to initialize SSL plugin
This is mainly to make it easier for test programs to link to the plugin
directly.
Timo Sirainen [Sat, 10 Sep 2016 08:15:00 +0000 (11:15 +0300)]
doveadm: Don't allow doveadm_print_header(title==NULL) anymore.
It's not used anywhere, and if it was used it would have crashed with at
least "tab" backend.
Timo Sirainen [Fri, 9 Sep 2016 14:40:58 +0000 (17:40 +0300)]
fts-squat: Fixed memory leak on corrupted uidlist handling
Timo Sirainen [Fri, 9 Sep 2016 14:39:43 +0000 (17:39 +0300)]
dict-file: Don't leak a lock on temp file creation failure.
Timo Sirainen [Tue, 11 Oct 2016 08:03:06 +0000 (11:03 +0300)]
lib: iostream-temp: Fixed o_stream_send_istream() with >2GB files
8051312f9 wasn't quite enough.
Timo Sirainen [Mon, 10 Oct 2016 11:42:24 +0000 (14:42 +0300)]
lib-program-client: Compiler warning fixes
Timo Sirainen [Mon, 10 Oct 2016 11:20:16 +0000 (14:20 +0300)]
lib-program-client: Avoid busy-looping while waiting for ostream to have space.
Aki Tuomi [Fri, 7 Oct 2016 16:49:24 +0000 (19:49 +0300)]
lib-program-client: Add test suite for program client
Aki Tuomi [Fri, 7 Oct 2016 16:48:59 +0000 (19:48 +0300)]
lib-program-client: Expose asynchronous API
Aki Tuomi [Thu, 6 Oct 2016 08:57:27 +0000 (11:57 +0300)]
lib-program-client: Whitespace fix
Aki Tuomi [Mon, 12 Sep 2016 10:02:23 +0000 (13:02 +0300)]
lib-program-client: Add program-client from pigeonhole
Aki Tuomi [Thu, 29 Sep 2016 06:51:40 +0000 (09:51 +0300)]
doveadm-import: Update manpage
Aki Tuomi [Thu, 29 Sep 2016 07:17:05 +0000 (10:17 +0300)]
doveadm-import: Add -U parameter to specify source user
When doing import, you can specify which user to use
as source user.
Aki Tuomi [Thu, 29 Sep 2016 07:15:24 +0000 (10:15 +0300)]
doveadm-import: Use target user as source user
This is done to avoid spurious error messages
caused by being ran as root.
Aki Tuomi [Wed, 28 Sep 2016 10:34:46 +0000 (13:34 +0300)]
imap-hibernate: Accept RFC DONE\IDLE
Change imap-hibernate to accept
DONE\r\n<tag> IDLE\r\n
as well, which is specified by RFC
Timo Sirainen [Tue, 27 Sep 2016 10:28:15 +0000 (13:28 +0300)]
lib-storage: Update mailbox.recent_flags_count correctly.
The counter was increased even if the UID was already in recent_flags.
This is the only place where I found that recent_flags and
recent_flags_count could become desynced (which they definitely were in
a core dump), so hopefully this fixes assert-crashes like:
Panic: file index-status.c: line 130 (index_storage_get_open_status): assertion failed: (status_r->recent <= status_r->messages)
Timo Sirainen [Tue, 27 Sep 2016 10:50:51 +0000 (13:50 +0300)]
dsync: Virtual sizes weren't exported properly with -I parameter.
Although they were incorrectly being exported with -T parameter. This makes
-I work without assert-crashing.
Timo Sirainen [Tue, 27 Sep 2016 10:50:10 +0000 (13:50 +0300)]
dsync: Renamed "max sync size" parameter from -S to -I.
-S can't be used because it was already used for the generic socket path,
so it didn't actually work.
Josef 'Jeff' Sipek [Wed, 14 Sep 2016 11:13:50 +0000 (07:13 -0400)]
doveadm: refactor mailbox attribute get/set/unset/list to share more code
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 11:50:04 +0000 (07:50 -0400)]
doveadm: allow access to server attributes via empty mailbox name
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 11:49:41 +0000 (07:49 -0400)]
lib-storage: remove attribute accessibility checks
index_storage_attribute_{set,get} should assume that the caller performed
due diligence and checked whether or not the user is allowed to store under
the key.
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 07:33:06 +0000 (03:33 -0400)]
doveadm: lowercase attribute names before trying to parse them
This now matches what the imap server does.
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 07:32:06 +0000 (03:32 -0400)]
lib-storage: document mailbox and server attribute handling
Timo Sirainen [Fri, 23 Sep 2016 11:59:33 +0000 (14:59 +0300)]
login proxy: Don't leak connections if reconnect fails with "Host is down"
Double-disconnection was also attempting to close the same fd twice, but I
think that couldn't have happened before this leak was fixed.
Aki Tuomi [Thu, 22 Sep 2016 11:14:23 +0000 (14:14 +0300)]
lib: Add test for pending io without timeouts
Aki Tuomi [Thu, 22 Sep 2016 11:13:43 +0000 (14:13 +0300)]
lib: Update ioloop attributes
With pending IO, the ioloop attributes still need
updating, instead of just returning.
Timo Sirainen [Thu, 22 Sep 2016 11:23:00 +0000 (14:23 +0300)]
lib-mail: message_header_hash_more() now allows input in any slices.
There wasn't necessarily any guarantees that the input would be sliced in
such a way that the repeating '?' would be dropped the same way every time.
Timo Sirainen [Thu, 22 Sep 2016 11:16:12 +0000 (14:16 +0300)]
lib-mail: Removed obsolete comment about message_header_hash_more()
pop3-migration plugin uses this function now, so it doesn't need to be kept
in sync.
Timo Sirainen [Thu, 22 Sep 2016 10:47:42 +0000 (13:47 +0300)]
pop3-migration: "first POP3 msg" warning didn't actually show the first one.
It was showing the first index in an array, which had nothing to do with
being the first POP3 message number.
Timo Sirainen [Thu, 22 Sep 2016 10:38:33 +0000 (13:38 +0300)]
dbox: mailbox_update() shouldn't reset pop3-uidl header.
This broke reading migrated POP3 UIDLs.
Timo Sirainen [Wed, 21 Sep 2016 17:50:24 +0000 (20:50 +0300)]
login-proxy: Fixed "Host is down" never reseting itself.
Broken by
c8eb8314a , which moved adding num_waiting_connections earlier.
After that it was never 0 at the check time.
Timo Sirainen [Wed, 21 Sep 2016 13:17:26 +0000 (16:17 +0300)]
lib: test-istream-chain fixes
Timo Sirainen [Tue, 20 Sep 2016 15:08:10 +0000 (18:08 +0300)]
lib-dcrypt: Don't finalize encryption on o_stream_flush()
For example the default o_stream_uncork() implementation enforces flushing
and it's probably better not to change that. In general there's really no
reason to perform the finalization at flush when the stream can't be written
to anymore (whereas lib-compression ostreams allow writes after flushes).
Timo Sirainen [Wed, 21 Sep 2016 10:26:30 +0000 (13:26 +0300)]
lib: Fixed istream-chain when it has multiple "previous streams".
Fixes assert:
Panic: file istream-chain.c: line 223 (i_stream_chain_read): assertion failed: (cur_data_pos == data_size)
Unit test for it by Stephan Bosch.
Timo Sirainen [Wed, 21 Sep 2016 09:19:18 +0000 (12:19 +0300)]
doveadm fs get: Fixed logging error messages.
The error is in istream, not in fs.
Aki Tuomi [Tue, 20 Sep 2016 18:06:22 +0000 (21:06 +0300)]
imap-login: Add missing brace
Aki Tuomi [Tue, 20 Sep 2016 15:51:18 +0000 (18:51 +0300)]
imap-proxy: Fix typo in comment
Aki Tuomi [Tue, 20 Sep 2016 12:02:42 +0000 (15:02 +0300)]
imap-login: Honor nopipelining during preauth
Aki Tuomi [Tue, 20 Sep 2016 09:47:32 +0000 (12:47 +0300)]
lib-dcrypt: Set NOPLUGIN_LDFLAGS to empty
Avoids -Wl,--as-needed here
Aki Tuomi [Tue, 20 Sep 2016 07:52:08 +0000 (10:52 +0300)]
lib-dcrypt: Makefile.am fix
Remove dcrypt.c from openssl library and add missing slash
Aki Tuomi [Fri, 16 Sep 2016 12:50:22 +0000 (15:50 +0300)]
lib: Ensure handler_context is not NULL
handler context must not be NULL here.
Aki Tuomi [Fri, 16 Sep 2016 12:49:36 +0000 (15:49 +0300)]
lib: Prevent crash in ioloop
If only non-fd sources and no timeouts are
in ioloop, prevent crash and unnecessary
waiting when there are pending IOs.
Timo Sirainen [Mon, 19 Sep 2016 13:20:14 +0000 (16:20 +0300)]
lib: Assert if i_stream_create_seekable_path(temp_path_prefix==NULL)
If the stream becomes large enough it would crash then in a callback
function, which makes debugging more difficult.
Aki Tuomi [Mon, 19 Sep 2016 09:27:16 +0000 (12:27 +0300)]
fts-plugin: Remove NULL assert
fts_backend_update_deinit will set box to NULL and call
update_set_mailbox then. NULL check needs to be done
in backends.
Aki Tuomi [Mon, 19 Sep 2016 09:26:46 +0000 (12:26 +0300)]
fts-backend-solr: Check that box is not NULL
fts_backend_update_deinit will set box to NULL and call
update_set_mailbox then.
Aki Tuomi [Mon, 19 Sep 2016 09:26:08 +0000 (12:26 +0300)]
fts-backend-lucene: Check that box is not NULL
fts_backend_update_deinit will set box to NULL and call
update_set_mailbox then.
Aki Tuomi [Sat, 17 Sep 2016 09:57:00 +0000 (12:57 +0300)]
auth-policy: Ref/unref auth request
If auth_request is not referenced it can go away
before HTTP response is handled.
Timo Sirainen [Fri, 16 Sep 2016 14:13:24 +0000 (17:13 +0300)]
fs-randomfail: Operation is unfinished on EAGAIN, not ENOENT.
This caused crashes and other problems when using randomfail with
asynchronous fs drivers.
Timo Sirainen [Thu, 15 Sep 2016 08:30:15 +0000 (11:30 +0300)]
lib: safe_mkstemp*() didn't always truncate prefix back to original on failure.
This caused repeated safe_mkstemp*() calls with the same prefix to keep
increasing its size. It probably didn't really break anything (unless it was
called enough many times to reach 255 filename length), but the filenames
were still confusingly ugly.
Timo Sirainen [Thu, 15 Sep 2016 07:23:41 +0000 (10:23 +0300)]
pop3-migration: Fixed crash when not specifying pop3_migration_mailbox setting.
Timo Sirainen [Wed, 14 Sep 2016 11:19:39 +0000 (14:19 +0300)]
iostream-temp: If write() to temp file fails at any time, move it back to memory.
Similarly to if the write() to temp fails during the initial move attempt.
This way even if write() fails due to out of disk space, it's not visible
to caller. An error message is logged in any case.
Timo Sirainen [Wed, 14 Sep 2016 16:06:29 +0000 (19:06 +0300)]
pop3-migration: Avoid unnecessarily using stream's hdr_size.
Shouldn't change any behavior, except reduce CPU usage a little bit.
Timo Sirainen [Wed, 14 Sep 2016 15:57:43 +0000 (18:57 +0300)]
imapc: mail_get_stream() shouldn't return cached hdr_size
Stephan Bosch [Tue, 13 Sep 2016 20:54:02 +0000 (22:54 +0200)]
lib-http: client: Fixed hang occurring when nested ioloops are used in response callbacks.
To prevent missing disconnect events, i_stream_read() is called once a change in ioloop is detected.
However, if something was actually read into the stream, the input handler was never called.
So, a response could linger in the stream buffer, without being handled, thereby causing the connection to hang indefinitely.
An additional input event could end the hang, but sometimes this doesn't happen before the request times out.
This problem was seen in test-http-payload once in about 10 invocations.
Obox uses nested ioloops, to this applies there.
Timo Sirainen [Sat, 10 Sep 2016 08:32:28 +0000 (11:32 +0300)]
doveadm-auth: Handle unexpected auth "continue" request without crashing.
Timo Sirainen [Sat, 10 Sep 2016 08:28:38 +0000 (11:28 +0300)]
lib-lda: Cleanup error handling in LMTP client code.
If there are no successful recipients, we'll need to deinit the client.
But at that point we've already called all the callbacks, so the line
parameter to lmtp_client_fail_full() isn't actually used anywhere.
This was confusing static analyzer because global_fail_string was used
as parameter, which could have been NULL and wouldn't have been valid
for the callbacks.
Timo Sirainen [Sat, 10 Sep 2016 08:16:05 +0000 (11:16 +0300)]
lib-master: Fixed memory leak when IPC server is handling commands.
This mainly meant that when login processes responded to doveadm proxy
list/kick commands memory was leaked.
Timo Sirainen [Sat, 10 Sep 2016 08:13:58 +0000 (11:13 +0300)]
dict-client: Don't crash if dict-server returns broken reply.
Just treat missing <tab>value as empty value.
Timo Sirainen [Fri, 9 Sep 2016 15:18:32 +0000 (18:18 +0300)]
auth: Make sure auth_request_log_info() doesn't crash when there are no passdbs
auth_request_is_disabled_master_user() could have caused such crash.
Timo Sirainen [Fri, 9 Sep 2016 15:12:41 +0000 (18:12 +0300)]
auth: Explicitly ignore return value to make static analyzer happier.
Timo Sirainen [Fri, 9 Sep 2016 15:10:29 +0000 (18:10 +0300)]
Added asserts to make static analyzer happier.
Timo Sirainen [Fri, 9 Sep 2016 15:07:15 +0000 (18:07 +0300)]
Removed dead code to make static analyzer happier.
Timo Sirainen [Fri, 9 Sep 2016 14:55:20 +0000 (17:55 +0300)]
lib-storage: Fix potential crash when userdb-returns "key+=value" for a nonexistent setting.
type would have also happened to be initialized to SET_STR for the crash to
happen.