]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
11 years agoman: Added doveadm-proxy.1.
Pascal Volk [Tue, 7 Oct 2014 22:24:21 +0000 (22:24 +0000)] 
man: Added doveadm-proxy.1.

11 years agolib-storage: Fixed some race condition crashes with LAYOUT=index
Timo Sirainen [Tue, 7 Oct 2014 18:35:44 +0000 (21:35 +0300)] 
lib-storage: Fixed some race condition crashes with LAYOUT=index

11 years agolib-storage: Fixed assert-crash when BODYSTRUCTURE parsing fails due to broken mail...
Timo Sirainen [Tue, 7 Oct 2014 17:29:16 +0000 (20:29 +0300)] 
lib-storage: Fixed assert-crash when BODYSTRUCTURE parsing fails due to broken mail size.

11 years agolib-mail: Added asserts
Timo Sirainen [Tue, 7 Oct 2014 17:28:06 +0000 (20:28 +0300)] 
lib-mail: Added asserts

11 years agolib-index: Fixed assert-crash in some cache locking race conditions.
Timo Sirainen [Tue, 7 Oct 2014 17:13:36 +0000 (20:13 +0300)] 
lib-index: Fixed assert-crash in some cache locking race conditions.
If mail_index_map() is being called, we can't refresh the index or it'll
crash. It wouldn't help anyway, since the index was just refreshed.

11 years agolib-fs: struct fs_file's write_pending is a flag
Phil Carmody [Tue, 7 Oct 2014 16:48:34 +0000 (19:48 +0300)] 
lib-fs: struct fs_file's write_pending is a flag
Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agolib-index: Delay unlocking cache compression until changes to transaction log are...
Timo Sirainen [Tue, 7 Oct 2014 16:07:16 +0000 (19:07 +0300)] 
lib-index: Delay unlocking cache compression until changes to transaction log are committed.
This should fix race condition with two processes compressing the file at
the same time with same file_seq and becoming confused.

11 years agolib-index: Added path parameter to mail_index_create_tmp_file()
Timo Sirainen [Tue, 7 Oct 2014 16:04:36 +0000 (19:04 +0300)] 
lib-index: Added path parameter to mail_index_create_tmp_file()
This allows using it for creating any kind of a new index file with proper
file permissions.

Some of the old code should probably be changed to use this. Maybe even move
this function to public mail-index.h

11 years agolib-index: Try to minimize race conditions while compressing cache.
Timo Sirainen [Tue, 7 Oct 2014 15:58:01 +0000 (18:58 +0300)] 
lib-index: Try to minimize race conditions while compressing cache.
There are some unavoidable race conditions, but try to keep their time
window as small as possible.

11 years agolib-index: mail_cache_lock() partial rewrite.
Timo Sirainen [Tue, 7 Oct 2014 15:47:09 +0000 (18:47 +0300)] 
lib-index: mail_cache_lock() partial rewrite.
require_same_reset_id is no longer needed, if it ever was. If we're locking
the cache file, we always want the latest one. The logic of locking in
general was somewhat confusing and it probably didn't always successfully
lock when it should have, because the reset_id happened to match an old
file.

11 years agolib-index: Code cleanup - avoid code duplication.
Timo Sirainen [Mon, 6 Oct 2014 23:54:35 +0000 (02:54 +0300)] 
lib-index: Code cleanup - avoid code duplication.

11 years agolib-index: Fixed cache file creation race condition.
Timo Sirainen [Mon, 6 Oct 2014 23:35:41 +0000 (02:35 +0300)] 
lib-index: Fixed cache file creation race condition.
If two processes are creating the index files at the same time, don't have
one of them delete the dovecot.index.cache that the other one just created.
This means we never should be calling mail_cache_create(), so it was removed
entirely.

11 years agolib-index: Don't keep cache file locked for as long while syncing index.
Timo Sirainen [Mon, 6 Oct 2014 23:33:03 +0000 (02:33 +0300)] 
lib-index: Don't keep cache file locked for as long while syncing index.
The earlier code was required for updating the cache offsets, but this code
no longer exists. Now we just need to update the record counts in the
header, which can be done quickly at the end of the sync.

11 years agoman: Fixed broken syntax in doveadm-sync.1.
Pascal Volk [Mon, 6 Oct 2014 20:50:34 +0000 (20:50 +0000)] 
man: Fixed broken syntax in doveadm-sync.1.

11 years agolib-dict: Fixed race condition in mkdir()ing dict file's parent directory.
Timo Sirainen [Mon, 6 Oct 2014 19:12:01 +0000 (22:12 +0300)] 
lib-dict: Fixed race condition in mkdir()ing dict file's parent directory.

11 years agosdbox: Fixed race condition when two processes mkdir() the same directory
Timo Sirainen [Mon, 6 Oct 2014 18:15:31 +0000 (21:15 +0300)] 
sdbox: Fixed race condition when two processes mkdir() the same directory

11 years agoMinor code cleanup to previous change.
Timo Sirainen [Mon, 6 Oct 2014 17:17:19 +0000 (20:17 +0300)] 
Minor code cleanup to previous change.
No need to have a data stack frame here.

11 years agolog_timestamp setting supports now %{usecs}
Timo Sirainen [Mon, 6 Oct 2014 17:16:07 +0000 (20:16 +0300)] 
log_timestamp setting supports now %{usecs}
This is mainly useful for debugging.

11 years agoman: Added doveadm-replicator.1.
Pascal Volk [Sun, 5 Oct 2014 23:36:10 +0000 (23:36 +0000)] 
man: Added doveadm-replicator.1.

11 years agoman: Forgot to update doveadm.1 in previous commit (fec91a386bb0).
Pascal Volk [Sun, 5 Oct 2014 23:25:48 +0000 (23:25 +0000)] 
man: Forgot to update doveadm.1 in previous commit (fec91a386bb0).

11 years agoman: Reworked dsync.1 and renamed it to doveadm-sync.1.
Pascal Volk [Sun, 5 Oct 2014 20:18:20 +0000 (20:18 +0000)] 
man: Reworked dsync.1 and renamed it to doveadm-sync.1.

11 years agodsync: Debug logging improvements and comment clarifications.
Timo Sirainen [Mon, 6 Oct 2014 10:17:00 +0000 (13:17 +0300)] 
dsync: Debug logging improvements and comment clarifications.

11 years agodsync: Fixed potential crash when deleting mailbox.
Timo Sirainen [Mon, 6 Oct 2014 10:13:04 +0000 (13:13 +0300)] 
dsync: Fixed potential crash when deleting mailbox.

11 years agodoveadm backup: Don't unnecessarily delete mailbox when handling expunges
Timo Sirainen [Mon, 6 Oct 2014 10:15:10 +0000 (13:15 +0300)] 
doveadm backup: Don't unnecessarily delete mailbox when handling expunges

11 years agodoveadm backup: Local mailbox was deleted also when there were just new messages.
Timo Sirainen [Mon, 6 Oct 2014 09:21:52 +0000 (12:21 +0300)] 
doveadm backup: Local mailbox was deleted also when there were just new messages.

11 years agodoveadm backup: When deleting a mailbox, log a warning, not just a debug message.
Timo Sirainen [Mon, 6 Oct 2014 09:21:24 +0000 (12:21 +0300)] 
doveadm backup: When deleting a mailbox, log a warning, not just a debug message.
Because we're also returning temporary failure in any case, so there needs
to be some kind of a warning/error logged.

11 years agodsync: Fixed linking with some systems.
Timo Sirainen [Sun, 5 Oct 2014 17:56:39 +0000 (20:56 +0300)] 
dsync: Fixed linking with some systems.

11 years agodoveadm sync/backup: Updated usage string
Timo Sirainen [Sun, 5 Oct 2014 10:24:02 +0000 (13:24 +0300)] 
doveadm sync/backup: Updated usage string

11 years agolib: Added support for connecting UDP sockets.
Stephan Bosch [Sat, 4 Oct 2014 14:48:03 +0000 (17:48 +0300)] 
lib: Added support for connecting UDP sockets.

11 years agolib-http: Fixed detecting disconnection when ioloop is running only intermittently.
Stephan Bosch [Sat, 4 Oct 2014 14:32:48 +0000 (17:32 +0300)] 
lib-http: Fixed detecting disconnection when ioloop is running only intermittently.
This fix only applies to ioloops created and run by lib-http itself.

11 years agolib-http: client: Added support for absolute request timeout.
Stephan Bosch [Sat, 4 Oct 2014 14:32:48 +0000 (17:32 +0300)] 
lib-http: client: Added support for absolute request timeout.
Requests cannot survive beyond this deadline.

11 years agolib-http: client: Added support for delaying requests in milliseconds.
Stephan Bosch [Sat, 4 Oct 2014 14:31:38 +0000 (17:31 +0300)] 
lib-http: client: Added support for delaying requests in milliseconds.

11 years agolib-http: client queue: Start using new timeval_cmp_margin function for delay handling.
Stephan Bosch [Sat, 4 Oct 2014 14:31:38 +0000 (17:31 +0300)] 
lib-http: client queue: Start using new timeval_cmp_margin function for delay handling.

11 years agolib: Fixed io_loop_move_timeout() to retain the next_run time, so that the timeout...
Stephan Bosch [Sat, 4 Oct 2014 14:31:38 +0000 (17:31 +0300)] 
lib: Fixed io_loop_move_timeout() to retain the next_run time, so that the timeout is not implicitly reset.
This problem became with timeout_add_absolute(), since resetting an
absolute timeout causes it to fire immediately (msecs == 0).

11 years agolib: ioloop: Fixed absolute timeout removal.
Stephan Bosch [Sat, 4 Oct 2014 14:31:14 +0000 (17:31 +0300)] 
lib: ioloop: Fixed absolute timeout removal.
Absolute timeouts fire only once, so the timeout should be removed from the
priority queue once it fires.

11 years agolib-http: client: Fixed problem occuring when a nested ioloop was run inside a reques...
Stephan Bosch [Sat, 4 Oct 2014 14:30:54 +0000 (17:30 +0300)] 
lib-http: client: Fixed problem occuring when a nested ioloop was run inside a request callback using the same client.
If requests in the nested ioloop would use the same connection as the one
that called the callback, the requests would (in the best scenario) all be
doomed to time out.

11 years agofs-posix: Compile fix for systems without flock()
Timo Sirainen [Fri, 3 Oct 2014 21:29:30 +0000 (00:29 +0300)] 
fs-posix: Compile fix for systems without flock()

11 years agoMake static analyzer happier
Timo Sirainen [Fri, 3 Oct 2014 19:44:31 +0000 (22:44 +0300)] 
Make static analyzer happier

11 years agolib-lda: smtp client may have crashed if remote returned a permanent error.
Timo Sirainen [Fri, 3 Oct 2014 19:39:53 +0000 (22:39 +0300)] 
lib-lda: smtp client may have crashed if remote returned a permanent error.

11 years agoAdded signature for changeset 34e52cbeb837
Timo Sirainen [Fri, 3 Oct 2014 15:18:44 +0000 (18:18 +0300)] 
Added signature for changeset 34e52cbeb837

11 years agoAdded tag 2.2.14.rc1 for changeset 34e52cbeb837
Timo Sirainen [Fri, 3 Oct 2014 15:18:41 +0000 (18:18 +0300)] 
Added tag 2.2.14.rc1 for changeset 34e52cbeb837

11 years agoReleased v2.2.14.rc1. 2.2.14.rc1
Timo Sirainen [Fri, 3 Oct 2014 15:18:41 +0000 (18:18 +0300)] 
Released v2.2.14.rc1.

11 years agoexample-config: Added ssl_options setting.
Timo Sirainen [Fri, 3 Oct 2014 14:36:11 +0000 (17:36 +0300)] 
example-config: Added ssl_options setting.

11 years agoimap: GETMETADATA was returning mailbox name as UTF-8 instead of mUTF-7
Timo Sirainen [Fri, 3 Oct 2014 14:11:58 +0000 (17:11 +0300)] 
imap: GETMETADATA was returning mailbox name as UTF-8 instead of mUTF-7

11 years agofs-posix: Added prefix parameter that is prefixed to all paths.
Timo Sirainen [Fri, 3 Oct 2014 13:57:39 +0000 (16:57 +0300)] 
fs-posix: Added prefix parameter that is prefixed to all paths.

11 years agolib-lda, lmtp: Separate internal errors from remote errors.
Timo Sirainen [Fri, 3 Oct 2014 13:31:33 +0000 (16:31 +0300)] 
lib-lda, lmtp: Separate internal errors from remote errors.
LMTP proxy shouldn't log remote errors with error level, because the proxy
itself didn't have any failure.

This is an API change, but I'm not aware of any plugins actually using the
lmtp-client.h directly.

11 years agomaster: If log process crashes, restart it immediately.
Timo Sirainen [Fri, 3 Oct 2014 13:04:06 +0000 (16:04 +0300)] 
master: If log process crashes, restart it immediately.
The regular service_monitor_listen_start() doesn't work for it, because the
log fds aren't in the listeners.

11 years agodsync: Debug message fix
Timo Sirainen [Thu, 2 Oct 2014 16:43:25 +0000 (19:43 +0300)] 
dsync: Debug message fix

11 years agolib-storage: Added %{session} to mail_user_var_expand_table()
Timo Sirainen [Thu, 2 Oct 2014 16:43:09 +0000 (19:43 +0300)] 
lib-storage: Added %{session} to mail_user_var_expand_table()

11 years agodsync: Improved debug logging.
Timo Sirainen [Thu, 2 Oct 2014 10:15:22 +0000 (13:15 +0300)] 
dsync: Improved debug logging.

11 years agodsync: Added more debug logging.
Timo Sirainen [Thu, 2 Oct 2014 09:56:30 +0000 (12:56 +0300)] 
dsync: Added more debug logging.

11 years agodoveadm backup: Fix to earlier commit - don't try to delete an already empty mailbox.
Timo Sirainen [Thu, 2 Oct 2014 09:48:00 +0000 (12:48 +0300)] 
doveadm backup: Fix to earlier commit - don't try to delete an already empty mailbox.

11 years agodoveadm backup: Locally expunged mails weren't always added back.
Timo Sirainen [Thu, 2 Oct 2014 09:31:34 +0000 (12:31 +0300)] 
doveadm backup: Locally expunged mails weren't always added back.

11 years agolib-http: client: Fixed recovery after connection failure.
Stephan Bosch [Wed, 1 Oct 2014 07:33:49 +0000 (10:33 +0300)] 
lib-http: client: Fixed recovery after connection failure.
If a parallel already connected connection was active, the queue wasn't notified of the failure.
Only pending connections should be considered in this case and not established ones.

11 years agolib-http: client: Fixed aborting request in the middle of sending payload.
Stephan Bosch [Wed, 1 Oct 2014 07:33:39 +0000 (10:33 +0300)] 
lib-http: client: Fixed aborting request in the middle of sending payload.
If the request payload is so big that it cannot be sent all at once, the
caller may at some point abort the request when it is still being sent. The
bug occurred when the request finally finished sending. It erroneously
advanced the state to WAITING rather than remaining ABORTED, thus
'reviving' the request unexpectedly.

11 years agolib: Fixed earlier timeout_add_absolute() commit.
Timo Sirainen [Tue, 30 Sep 2014 21:17:09 +0000 (00:17 +0300)] 
lib: Fixed earlier timeout_add_absolute() commit.
I removed too much from Stephan's patch.

11 years agolib: Created timeval_cmp_margin().
Stephan Bosch [Tue, 30 Sep 2014 21:13:36 +0000 (00:13 +0300)] 
lib: Created timeval_cmp_margin().
It's identical to timeval_cmp(), except that it ignores tv_usec differences
smaller than a specified margin.

11 years agolib: Added support for adding milliseconds to struct timeval time values.
Stephan Bosch [Tue, 30 Sep 2014 21:06:19 +0000 (00:06 +0300)] 
lib: Added support for adding milliseconds to struct timeval time values.

11 years agolib: Added support for setting timeouts at absolute time, rather than relative to...
Stephan Bosch [Tue, 30 Sep 2014 21:03:17 +0000 (00:03 +0300)] 
lib: Added support for setting timeouts at absolute time, rather than relative to current time.

11 years agolib-http: client: The http_client_queue_fail() function aborted requests in an unsafe...
Stephan Bosch [Tue, 30 Sep 2014 20:49:52 +0000 (23:49 +0300)] 
lib-http: client: The http_client_queue_fail() function aborted requests in an unsafe manner.
Copied queues before freeing the requests, because the destroyed requests modify the queue.

11 years agolib-http: client: Fixed crash occurring sometimes when delay timeout expired.
Stephan Bosch [Tue, 30 Sep 2014 20:49:45 +0000 (23:49 +0300)] 
lib-http: client: Fixed crash occurring sometimes when delay timeout expired.
Forgot to drop destroyed requests from delay queue.

11 years agolib-sasl: Added reference counting to lib-sasl initialization.
Stephan Bosch [Tue, 30 Sep 2014 20:49:35 +0000 (23:49 +0300)] 
lib-sasl: Added reference counting to lib-sasl initialization.

11 years agolib: Improved istream-file's failing read()/pread() error message.
Timo Sirainen [Mon, 29 Sep 2014 19:44:03 +0000 (22:44 +0300)] 
lib: Improved istream-file's failing read()/pread() error message.

11 years agolib: If i_stream_default_seek_nonseekable() can't seek, set a more readable error...
Timo Sirainen [Mon, 29 Sep 2014 19:43:44 +0000 (22:43 +0300)] 
lib: If i_stream_default_seek_nonseekable() can't seek, set a more readable error message.

11 years agolib-lda: smtp_client_deinit() may have returned NULL error strings.
Timo Sirainen [Mon, 29 Sep 2014 12:56:02 +0000 (15:56 +0300)] 
lib-lda: smtp_client_deinit() may have returned NULL error strings.

11 years agolib-http: Fixed assert-crash when http_client_connection_disconnect() is called multi...
Timo Sirainen [Mon, 29 Sep 2014 11:57:42 +0000 (14:57 +0300)] 
lib-http: Fixed assert-crash when http_client_connection_disconnect() is called multiple times.

11 years agodsync: Added DSYNC_BRAIN_FLAG_NO_MAIL_PREFETCH to avoid opening mails unnecessarily.
Timo Sirainen [Mon, 29 Sep 2014 11:16:06 +0000 (14:16 +0300)] 
dsync: Added DSYNC_BRAIN_FLAG_NO_MAIL_PREFETCH to avoid opening mails unnecessarily.

11 years agolib-storage: Don't assume that we must read the whole message to get its virtual...
Timo Sirainen [Thu, 25 Sep 2014 21:32:03 +0000 (00:32 +0300)] 
lib-storage: Don't assume that we must read the whole message to get its virtual size.
This is true only with mbox format. All the other formats have various
metadata available where it's stored.

11 years agoimap: die-callback didn't set log prefixes correctly for client handlers
Timo Sirainen [Thu, 25 Sep 2014 16:43:28 +0000 (19:43 +0300)] 
imap: die-callback didn't set log prefixes correctly for client handlers
Calling mail_storage_service_io_activate_user() unfortunately doesn't set
the ioloop context itself, so timeouts weren't inheriting it. It seemed a
bit difficult to change this, so for now I just moved the call to the
timeout handler.

11 years agolib: If file_wait_lock*() fails, try to include the current pid holding the lock...
Timo Sirainen [Thu, 25 Sep 2014 12:50:03 +0000 (15:50 +0300)] 
lib: If file_wait_lock*() fails, try to include the current pid holding the lock in error message.
This is currently supported via fcntl(F_GETLK) and also via Linux
/proc/locks.

11 years agoimap, pop3: Show user's proper log prefix when deinitializing users at exit.
Timo Sirainen [Thu, 25 Sep 2014 12:37:48 +0000 (15:37 +0300)] 
imap, pop3: Show user's proper log prefix when deinitializing users at exit.

11 years agolib-storage: Allow calling storage service's ioloop activate/deactivate functions...
Timo Sirainen [Thu, 25 Sep 2014 12:37:01 +0000 (15:37 +0300)] 
lib-storage: Allow calling storage service's ioloop activate/deactivate functions manually.

11 years agolib: Code cleanup - check io_loop_context_add/remove_callbacks() callback parameters.
Timo Sirainen [Thu, 25 Sep 2014 12:15:20 +0000 (15:15 +0300)] 
lib: Code cleanup - check io_loop_context_add/remove_callbacks() callback parameters.

11 years agoMark more memory pools as growing
Timo Sirainen [Thu, 25 Sep 2014 10:40:54 +0000 (13:40 +0300)] 
Mark more memory pools as growing

11 years agoauth: Mark memory pools as growing and use the same sizes for all mechanisms.
Timo Sirainen [Thu, 25 Sep 2014 10:38:09 +0000 (13:38 +0300)] 
auth: Mark memory pools as growing and use the same sizes for all mechanisms.
Mainly to have DEBUG log fewer warnings.

11 years agoAvoid logging warnings about increasing memory pool/data stack with DEBUG on.
Timo Sirainen [Thu, 25 Sep 2014 10:28:39 +0000 (13:28 +0300)] 
Avoid logging warnings about increasing memory pool/data stack with DEBUG on.
These could have a minor effect on memory usage, but shouldn't be much.

11 years agolib: Added file_wait_lock_error() and file_try_lock_error()
Timo Sirainen [Thu, 25 Sep 2014 10:26:20 +0000 (13:26 +0300)] 
lib: Added file_wait_lock_error() and file_try_lock_error()

11 years agofs-posix: fs_read_stream() now returns an istream that can live even after the fs_fil...
Timo Sirainen [Wed, 24 Sep 2014 23:55:34 +0000 (02:55 +0300)] 
fs-posix: fs_read_stream() now returns an istream that can live even after the fs_file is closed.

11 years agolib-storage: Added mailbox_get_index_path() and caching of the index path.
Timo Sirainen [Wed, 24 Sep 2014 22:13:12 +0000 (01:13 +0300)] 
lib-storage: Added mailbox_get_index_path() and caching of the index path.
This solves some potential assert-crashes on race conditions when opening a
mailbox while it's being deleted.

11 years agolib-storage: Headers were sometimes added to dovecot.index.cache with wrong line...
Timo Sirainen [Wed, 24 Sep 2014 21:42:56 +0000 (00:42 +0300)] 
lib-storage: Headers were sometimes added to dovecot.index.cache with wrong line number value.
This happened if the header parsing was done multiple times for the same
mail. The end result being that when fetching multiple headers as a stream,
the headers could have been returned in the wrong order. This messed up at
least dsync's header hash comparisons.

11 years agoimapc: Fixed potential crash when trying to send NOOP before mailbox was fully opened.
Timo Sirainen [Wed, 24 Sep 2014 21:41:15 +0000 (00:41 +0300)] 
imapc: Fixed potential crash when trying to send NOOP before mailbox was fully opened.

11 years agoimapc: If connection isn't in selected state when deleting mailbox, don't try to...
Timo Sirainen [Wed, 24 Sep 2014 21:40:48 +0000 (00:40 +0300)] 
imapc: If connection isn't in selected state when deleting mailbox, don't try to UNSELECT it.

11 years agoman: Added doveadm-fts.1.
Pascal Volk [Wed, 24 Sep 2014 20:01:46 +0000 (20:01 +0000)] 
man: Added doveadm-fts.1.

11 years agoman: Added doveadm-acl.1.
Pascal Volk [Wed, 24 Sep 2014 19:50:37 +0000 (19:50 +0000)] 
man: Added doveadm-acl.1.

11 years agoimap: Don't send MODSEQ in untagged FETCH reply if IMAP client didn't enable CONDSTOR...
Timo Sirainen [Tue, 23 Sep 2014 13:58:59 +0000 (16:58 +0300)] 
imap: Don't send MODSEQ in untagged FETCH reply if IMAP client didn't enable CONDSTORE/QRESYNC.
We should have been checking client->enabled_features, not
mailbox_get_enabled_features(). The former contains the features enabled by
the IMAP client, while the latter contains also some automatically added
features.

11 years agolib-master: Increased instances file's dotlock timeout to 2 seconds.
Timo Sirainen [Mon, 22 Sep 2014 13:08:25 +0000 (16:08 +0300)] 
lib-master: Increased instances file's dotlock timeout to 2 seconds.
The 1 second would have been enough, except the current dotlocking code
uses second-level precision in checking timeouts, so it could end up trying
the lock only once.

A better fix would be to fix the dotlocking code to use millisecond-level
precision (internally), but since this is the only user so far where it
would have mattered, it's not really worth the effort (yet).

11 years agolib: bsearch - make BINARY_NUMBER_SEARCH more widely usable
Phil Carmody [Mon, 22 Sep 2014 12:56:31 +0000 (15:56 +0300)] 
lib: bsearch - make BINARY_NUMBER_SEARCH more widely usable
This template is more widely usable if we do not hard-code into it the
method of accessing the value being compared. For the default case
we already use, this accessor is just a simple array dereferencing
macro.

As rewriting with the array access happens in the preprocessor, the
code generated is completely unchanged.

Expected future use:

:  #define MY_GETTER(array, index) ((array)[(index)].index_field)
:  #define MY_BINARY_SEARCH(data, count, value, idx_r)                  \
:          BINARY_NUMERIC_SEARCH(MY_GETTER, data, count, value, idx_r);

Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agolib-dict: dict-fs implements now minimal iteration support.
Timo Sirainen [Thu, 18 Sep 2014 15:46:18 +0000 (17:46 +0200)] 
lib-dict: dict-fs implements now minimal iteration support.

11 years agodoveadm dict iter: Use recursion flag only if -R parameter is specified.
Timo Sirainen [Thu, 18 Sep 2014 15:39:49 +0000 (17:39 +0200)] 
doveadm dict iter: Use recursion flag only if -R parameter is specified.

11 years agofs-posix: When deleting a directory, automatically fallback to rmdir()ing it
Timo Sirainen [Thu, 18 Sep 2014 00:19:32 +0000 (02:19 +0200)] 
fs-posix: When deleting a directory, automatically fallback to rmdir()ing it

11 years agovirtual: Using modseq-based syncing while mailbox was open didn't handle expunges...
Timo Sirainen [Tue, 16 Sep 2014 20:22:59 +0000 (23:22 +0300)] 
virtual: Using modseq-based syncing while mailbox was open didn't handle expunges correctly.
The expunges were handled only after EXPUNGE command was given, which should
have been done only for mails that no longer matched the search query but
still existed.

11 years agoquota: Quota recalculation didn't include INBOX in some configurations.
Timo Sirainen [Tue, 16 Sep 2014 17:59:48 +0000 (20:59 +0300)] 
quota: Quota recalculation didn't include INBOX in some configurations.
If one inbox=yes and another inbox=no namespace shared the same mail
location, and the inbox=no namespace was first, only it was used to list all
mailboxes.

11 years agolib: test-var-expand - disambiguate tests
Phil Carmody [Tue, 16 Sep 2014 17:29:04 +0000 (20:29 +0300)] 
lib: test-var-expand - disambiguate tests
Two test cases had the same name.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agolib: hash-format - fix leak on _init() failure path
Phil Carmody [Tue, 16 Sep 2014 17:29:04 +0000 (20:29 +0300)] 
lib: hash-format - fix leak on _init() failure path
If any of the analysis/parse helpers return failure, then the whole pool
will leak.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agolib-storage: SEARCH_MAILBOX* value is now also compared to to the (virtual) mailbox...
Timo Sirainen [Tue, 16 Sep 2014 12:43:42 +0000 (15:43 +0300)] 
lib-storage: SEARCH_MAILBOX* value is now also compared to to the (virtual) mailbox name.
This fixes for example "doveadm fetch uid mailbox virtual/all"

11 years agodoveadm fts rescan: For virtual namespaces just mark the last indexed UID to 0.
Timo Sirainen [Tue, 16 Sep 2014 12:23:51 +0000 (15:23 +0300)] 
doveadm fts rescan: For virtual namespaces just mark the last indexed UID to 0.

11 years agofts: dovecot-expunges.log wasn't closed at deinit
Timo Sirainen [Tue, 16 Sep 2014 11:32:20 +0000 (14:32 +0300)] 
fts: dovecot-expunges.log wasn't closed at deinit

11 years agolib: test-strnum - fix format size mismatch
Phil Carmody [Tue, 16 Sep 2014 11:03:52 +0000 (14:03 +0300)] 
lib: test-strnum - fix format size mismatch
Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agolib: test-strnum - add size-oblivious str_to/parse_uintmax tests
Phil Carmody [Tue, 16 Sep 2014 10:38:30 +0000 (13:38 +0300)] 
lib: test-strnum - add size-oblivious str_to/parse_uintmax tests
Test a value of every bit-length. Also test the 10/9*MAX corner case.
And due to crappy helper functions, test lots of leading zeroes too!

Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agolib: remove uintmax tests from uint64 tests
Phil Carmody [Tue, 16 Sep 2014 10:38:30 +0000 (13:38 +0300)] 
lib: remove uintmax tests from uint64 tests
These log a warning on OSX with clang.

Signed-off-by: Phil Carmody <phil@dovecot.fi>