]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
10 years agolib: test-strnum - do not invite undetectable errors
Phil Carmody [Tue, 8 Sep 2015 16:28:31 +0000 (19:28 +0300)] 
lib: test-strnum - do not invite undetectable errors
The very numbers which could cause a broken parser to over-run, the ones we
are testing, are the ones which will be parsed as having a value similar to
'value', so check that no value was returned by using a number completely
dissimilar to that. Otherwise, there might be an accidental mis-parse that
overwrote value, but left its value the same.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-storage: Replaced some unlink()s with i_unlink*()s where we could.
Timo Sirainen [Tue, 8 Sep 2015 16:12:26 +0000 (19:12 +0300)] 
lib-storage: Replaced some unlink()s with i_unlink*()s where we could.
This changes some mail_storage_set_critical() calls to i_error()s, but
because these unlink() failures don't actually fail the operation it doesn't
matter.

10 years agolib-index: Replaced some unlink()s with i_unlink*()s where we could.
Timo Sirainen [Tue, 8 Sep 2015 16:11:45 +0000 (19:11 +0300)] 
lib-index: Replaced some unlink()s with i_unlink*()s where we could.
This changes some mail_index_set_error() calls to i_error()s, but because
these unlink() failures don't actually fail the operation it doesn't matter.
In fact it may be even better that it doesn't overwrite the existing
index->error if it exists.

10 years agoReplaced unlink() calls with i_unlink*() wherever possible.
Timo Sirainen [Tue, 8 Sep 2015 16:07:02 +0000 (19:07 +0300)] 
Replaced unlink() calls with i_unlink*() wherever possible.

10 years agolib: Added i_unlink() and i_unlink_if_exists()
Timo Sirainen [Tue, 8 Sep 2015 15:49:00 +0000 (18:49 +0300)] 
lib: Added i_unlink() and i_unlink_if_exists()
These log the error message on a failed unlink(). They also include the
source code file and line number to make it easier to find which unlink()
actually failed if the path itself doesn't already clearly identify it.
This can be especially useful if the path is (null), "" or contains some
corrupted garbage.

10 years agolib-storage: Mailbox deletion shouldn't fail when trying to delete read-only attributes.
Timo Sirainen [Tue, 8 Sep 2015 15:45:57 +0000 (18:45 +0300)] 
lib-storage: Mailbox deletion shouldn't fail when trying to delete read-only attributes.

10 years agolib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_attribute_*set() fails for read...
Timo Sirainen [Tue, 8 Sep 2015 15:45:28 +0000 (18:45 +0300)] 
lib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_attribute_*set() fails for read-only attribute.
MAIL_ERROR_PARAMS indicates that there was something wrong with the
parameters itself. But the caller can't know (at least with current APIs)
if it's a read-only attribute it's trying to change before actually doing it.

10 years agolib-storage: If mail_attribute_dict is set, ignore non-authority rank internal attrib...
Timo Sirainen [Tue, 8 Sep 2015 10:41:21 +0000 (13:41 +0300)] 
lib-storage: If mail_attribute_dict is set, ignore non-authority rank internal attributes.
This way dsync can still sync things like Sieve scripts, but it doesn't
attempt to sync anything that actually requires dict.

10 years agoexample-config: 10-mail.conf: Added example configuration for the new settings relati...
Stephan Bosch [Tue, 8 Sep 2015 10:30:21 +0000 (13:30 +0300)] 
example-config: 10-mail.conf: Added example configuration for the new settings relating to IMAP METADATA.

10 years agoexample-config: Added more detailed documentation for mailbox settings.
Stephan Bosch [Tue, 8 Sep 2015 10:27:41 +0000 (13:27 +0300)] 
example-config: Added more detailed documentation for mailbox settings.

10 years agolib: strnum: Fixed test suite failure on 32 bit systems.
Stephan Bosch [Tue, 8 Sep 2015 10:26:38 +0000 (13:26 +0300)] 
lib: strnum: Fixed test suite failure on 32 bit systems.

10 years agoacl: Log which ACL groups are enabled with mail_debug=yes
Timo Sirainen [Tue, 8 Sep 2015 10:18:58 +0000 (13:18 +0300)] 
acl: Log which ACL groups are enabled with mail_debug=yes

10 years agolib-charset: Fixed assert-crash with some iconv() versions.
Timo Sirainen [Tue, 8 Sep 2015 10:07:59 +0000 (13:07 +0300)] 
lib-charset: Fixed assert-crash with some iconv() versions.
Older glibc iconv() versions seem to skip over invalid characters, at least
with some charsets, while newer versions don't. We were assuming that the
skipping never happened, so if the invalid character was at the end of the
string we could have wrapped size to (size_t)-1 and caused a crash later on.

10 years agoimap: METADATA: Implemented mailbox and server comment entries and the server admin...
Stephan Bosch [Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)] 
imap: METADATA: Implemented mailbox and server comment entries and the server admin entry.

10 years agoimap: Implemented /private/specialuse METADATA entry for SPECIAL-USE capability.
Stephan Bosch [Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)] 
imap: Implemented /private/specialuse METADATA entry for SPECIAL-USE capability.

10 years agolib: Added some tests for the new strnum _hex() and _oct() function variants.
Stephan Bosch [Mon, 7 Sep 2015 22:27:18 +0000 (01:27 +0300)] 
lib: Added some tests for the new strnum _hex() and _oct() function variants.

10 years agolib: Added assert to Solaris sendfile() return value.
Timo Sirainen [Mon, 7 Sep 2015 22:20:51 +0000 (01:20 +0300)] 
lib: Added assert to Solaris sendfile() return value.

10 years agodoveadm: Fixed hiding titles' tabs with tab formatter (-h -f tab)
Timo Sirainen [Mon, 7 Sep 2015 21:51:30 +0000 (00:51 +0300)] 
doveadm: Fixed hiding titles' tabs with tab formatter (-h -f tab)

10 years agoMake static analyzer happier.
Timo Sirainen [Mon, 7 Sep 2015 21:46:11 +0000 (00:46 +0300)] 
Make static analyzer happier.

10 years agolib-charset: Added more asserts to checking iconv() results.
Timo Sirainen [Mon, 7 Sep 2015 21:34:14 +0000 (00:34 +0300)] 
lib-charset: Added more asserts to checking iconv() results.

10 years agolib-charset: Updated test-charset unit test to check for iconv() E2BIG result
Timo Sirainen [Mon, 7 Sep 2015 21:33:21 +0000 (00:33 +0300)] 
lib-charset: Updated test-charset unit test to check for iconv() E2BIG result

10 years agolib-storage: Mailbox list notifications didn't work for INBOX.
Timo Sirainen [Mon, 7 Sep 2015 21:07:55 +0000 (00:07 +0300)] 
lib-storage: Mailbox list notifications didn't work for INBOX.
Because of some earlier optimizations that changes to INBOX aren't written
to dovecot.list.index.log file.

10 years agoMailbox list notify API changed to return multiple events at once.
Timo Sirainen [Mon, 7 Sep 2015 20:55:31 +0000 (23:55 +0300)] 
Mailbox list notify API changed to return multiple events at once.
This fixes some issues where a single event could actually trigger multiple
different kinds of events.

10 years agoimap: NOTIFY (SUBSCRIPTIONS) assert-crashed when subscriptions hadn't been refreshed.
Timo Sirainen [Mon, 7 Sep 2015 20:08:44 +0000 (23:08 +0300)] 
imap: NOTIFY (SUBSCRIPTIONS) assert-crashed when subscriptions hadn't been refreshed.

10 years agoVarious passthrough istreams didn't preserve readable_fd.
Timo Sirainen [Mon, 7 Sep 2015 19:35:30 +0000 (22:35 +0300)] 
Various passthrough istreams didn't preserve readable_fd.

10 years agolib: Fix hang in safe_sendfile on SmartOS
Sebastian Wiedenroth [Thu, 16 Jul 2015 12:41:24 +0000 (14:41 +0200)] 
lib: Fix hang in safe_sendfile on SmartOS
The call to sendfile on SmartOS can fail with EOPNOTSUPP. This is a valid
error code and documented in the man page. This error code needs to be
handled or else dovecot will retry the sendfile call endlessly and hang.

10 years agoimap: Fixed assert-crash in NOTIFY when using multiple namespaces.
Timo Sirainen [Mon, 7 Sep 2015 19:14:18 +0000 (22:14 +0300)] 
imap: Fixed assert-crash in NOTIFY when using multiple namespaces.
I'm not sure why the original code was trying to add it to multiple
namespaces. A single mailbox name should be matching only a single
namespace (visible one at least). In any case we can't use
mail_namespace_find() with only partial namespaces-list, because it'll
assert-crash if it can't find a namespace for the mailbox.

10 years agolib-storage: Fixed assert-crash when reading binary streams.
Timo Sirainen [Mon, 7 Sep 2015 19:06:16 +0000 (22:06 +0300)] 
lib-storage: Fixed assert-crash when reading binary streams.

10 years agodoveadm: Added new "auth login" command to simulate an actual client login.
Timo Sirainen [Mon, 7 Sep 2015 18:54:20 +0000 (21:54 +0300)] 
doveadm: Added new "auth login" command to simulate an actual client login.
This performs both passdb and userdb lookups and prints their results.

10 years agoauth: If userdb lookup was found from auth cache, don't clear the earlier userdb...
Timo Sirainen [Mon, 7 Sep 2015 18:24:01 +0000 (21:24 +0300)] 
auth: If userdb lookup was found from auth cache, don't clear the earlier userdb fields.

10 years agoauth: If multiple userdbs are used, default_fields was ignored for all but the first...
Timo Sirainen [Mon, 7 Sep 2015 18:02:51 +0000 (21:02 +0300)] 
auth: If multiple userdbs are used, default_fields was ignored for all but the first one.

10 years agodirector: Added director_user_kick_delay setting.
Timo Sirainen [Mon, 7 Sep 2015 17:24:25 +0000 (20:24 +0300)] 
director: Added director_user_kick_delay setting.
This replaces the hardcoded 2 seconds delay. This setting specifies how long
to wait for after user has been kicked from all directors before letting the
user login to the new server. This timeout should be large enough that the
user's existing processes in the old backend should be finished.

10 years agologin proxy: Added delayed disconnection of clients on server mass-disconnect.
Timo Sirainen [Mon, 7 Sep 2015 15:50:24 +0000 (18:50 +0300)] 
login proxy: Added delayed disconnection of clients on server mass-disconnect.
login_proxy_max_disconnect_delay setting (default 0 = disabled) controls for
how long time period the disconnections are spread to. The idea behind this
is to avoid load spikes due to client reconnections when a backend server
dies or is restarted.

10 years agoauth: Ignore first passdbs that contain skip=unauthenticated.
Timo Sirainen [Mon, 7 Sep 2015 14:10:19 +0000 (17:10 +0300)] 
auth: Ignore first passdbs that contain skip=unauthenticated.
They can never match anything.

10 years agolib-storage: Added mailbox_attribute_register_internals()
Timo Sirainen [Mon, 7 Sep 2015 13:39:28 +0000 (16:39 +0300)] 
lib-storage: Added mailbox_attribute_register_internals()
Just for making it easier to register multiple attributes.

10 years agolib-storage: Allow MAIL_ATTRIBUTE_INTERNAL_RANK_DEFAULT to use get=NULL
Timo Sirainen [Mon, 7 Sep 2015 13:23:40 +0000 (16:23 +0300)] 
lib-storage: Allow MAIL_ATTRIBUTE_INTERNAL_RANK_DEFAULT to use get=NULL
This is useful for registering internal attributes whose only purpose is to
be able to set/get them via dict. (Because normally the dict access would be
denied completely.)

10 years agolib-storage: Allow set/get for Dovecot-private attributes via internal attributes.
Timo Sirainen [Mon, 7 Sep 2015 13:22:11 +0000 (16:22 +0300)] 
lib-storage: Allow set/get for Dovecot-private attributes via internal attributes.
This allows registering attributes with MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT
prefix and having them be get/set via dict, instead of failing them.

10 years agolib-storage: Added MAIL_ATTRIBUTE_INTERNAL_FLAG_CHILDREN
Timo Sirainen [Mon, 7 Sep 2015 13:38:24 +0000 (16:38 +0300)] 
lib-storage: Added MAIL_ATTRIBUTE_INTERNAL_FLAG_CHILDREN
This also adds the key to get() and set() functions, so they can know
exactly what key is wanted to be accessed.

10 years agomail-storage: Added registration API for builtin mailbox attributes.
Stephan Bosch [Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)] 
mail-storage: Added registration API for builtin mailbox attributes.

10 years agolib-storage: mail_user_init() wasn't always expanding %h correctly to settings.
Timo Sirainen [Mon, 7 Sep 2015 12:07:55 +0000 (15:07 +0300)] 
lib-storage: mail_user_init() wasn't always expanding %h correctly to settings.
This mainly affected users autocreated for accessing shared mailboxes.

10 years agolib-storage: Updated MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE() to not allow private...
Timo Sirainen [Mon, 7 Sep 2015 12:06:40 +0000 (15:06 +0300)] 
lib-storage: Updated MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE() to not allow private server attributes.

10 years agodovecot.m4: Added LIBDOVECOT_ACL_INCLUDE
Timo Sirainen [Mon, 7 Sep 2015 11:16:39 +0000 (14:16 +0300)] 
dovecot.m4: Added LIBDOVECOT_ACL_INCLUDE

10 years agoauth: Fixed passdb skip_password_check / result_success=continue-fail handling
Timo Sirainen [Mon, 7 Sep 2015 11:08:52 +0000 (14:08 +0300)] 
auth: Fixed passdb skip_password_check / result_success=continue-fail handling
If passdb returned success, but result_success=continue-fail, it means that
the authentication didn't succeed. So we still want to check the password
again and in general treat the request as unauthenticated (especially for
the passdb { skip } setting).

So the current logic means that there are 2 ways for the request to be
treated as authenticated and skipping any password checking:

1) passdb lookup succeeding, with result_success=continue, continue-ok,
return or return-ok

2) passdb lookup not succeeding, with result_failure=continue-ok or
return-ok

It's a bit questionable though if 2) should be allowed.

10 years agoimap: Don't allow IMAP METADATA to access Dovecot's private server attributes.
Timo Sirainen [Mon, 7 Sep 2015 10:40:41 +0000 (13:40 +0300)] 
imap: Don't allow IMAP METADATA to access Dovecot's private server attributes.

10 years agoauth: Aborting auth request didn't abort a pending proxy DNS lookup.
Timo Sirainen [Mon, 7 Sep 2015 08:40:08 +0000 (11:40 +0300)] 
auth: Aborting auth request didn't abort a pending proxy DNS lookup.

10 years agolib-storage: Store pointer to mail_storage_service_user to mail_user if it exists.
Timo Sirainen [Sun, 6 Sep 2015 19:28:07 +0000 (22:28 +0300)] 
lib-storage: Store pointer to mail_storage_service_user to mail_user if it exists.

10 years agolib-storage: Added mail_storage_service_user_get_service_ctx()
Timo Sirainen [Sun, 6 Sep 2015 19:27:29 +0000 (22:27 +0300)] 
lib-storage: Added mail_storage_service_user_get_service_ctx()

10 years agoacl: Install most of the header files.
Timo Sirainen [Fri, 4 Sep 2015 10:00:25 +0000 (13:00 +0300)] 
acl: Install most of the header files.

10 years agoacl: acl_object_list_next() should return -1 if acl refreshing failed earlier.
Timo Sirainen [Fri, 4 Sep 2015 10:00:14 +0000 (13:00 +0300)] 
acl: acl_object_list_next() should return -1 if acl refreshing failed earlier.

10 years agodsync: If remote disconnects, log the last sent/recv state.
Timo Sirainen [Fri, 4 Sep 2015 08:21:39 +0000 (11:21 +0300)] 
dsync: If remote disconnects, log the last sent/recv state.

10 years agodsync: If we disconnect with I/O timeout, log the last sent/recv state.
Timo Sirainen [Fri, 4 Sep 2015 08:17:30 +0000 (11:17 +0300)] 
dsync: If we disconnect with I/O timeout, log the last sent/recv state.

10 years agologin proxy: Code cleanup - separate login_proxy_free_final()
Timo Sirainen [Thu, 3 Sep 2015 22:23:28 +0000 (01:23 +0300)] 
login proxy: Code cleanup - separate login_proxy_free_final()

10 years agologin proxy: Always keep proxy->state_rec available.
Timo Sirainen [Thu, 3 Sep 2015 22:21:28 +0000 (01:21 +0300)] 
login proxy: Always keep proxy->state_rec available.

10 years agologin proxy: Added asserts to track that num_waiting_connections are correct.
Timo Sirainen [Thu, 3 Sep 2015 22:18:04 +0000 (01:18 +0300)] 
login proxy: Added asserts to track that num_waiting_connections are correct.

10 years agologin proxy: Small code cleanup
Timo Sirainen [Thu, 3 Sep 2015 22:10:29 +0000 (01:10 +0300)] 
login proxy: Small code cleanup

10 years agodsync: Assert-crashfix
Timo Sirainen [Thu, 3 Sep 2015 19:12:14 +0000 (22:12 +0300)] 
dsync: Assert-crashfix
Fixes:

Panic: file mail-storage.c: line 1897 (mailbox_save_alloc): assertion
failed: (!ctx->unfinished)

10 years agocassandra: Handle async queries internally - don't use sql pooling code.
Timo Sirainen [Thu, 3 Sep 2015 18:37:09 +0000 (21:37 +0300)] 
cassandra: Handle async queries internally - don't use sql pooling code.
There's no need to create multiple Cassandra instances, since the single
instance is capable of doing multiple asynchronous requests in parallel.

10 years agolib-storage: Another fix to using index_storage_mailbox_close() without an opened...
Timo Sirainen [Thu, 3 Sep 2015 17:55:18 +0000 (20:55 +0300)] 
lib-storage: Another fix to using index_storage_mailbox_close() without an opened view.
Calling mail_index_close() without mail_index_open() caused it to
assert-crash.

10 years agodict: Various reference counting and other fixes related to using freed memory.
Timo Sirainen [Thu, 3 Sep 2015 17:54:27 +0000 (20:54 +0300)] 
dict: Various reference counting and other fixes related to using freed memory.

10 years agodsync: Crashfix in certain situation.
Timo Sirainen [Thu, 3 Sep 2015 16:59:16 +0000 (19:59 +0300)] 
dsync: Crashfix in certain situation.

10 years agolib-storage: Allow index_storage_mailbox_close() to be called without an opened view.
Timo Sirainen [Thu, 3 Sep 2015 16:58:39 +0000 (19:58 +0300)] 
lib-storage: Allow index_storage_mailbox_close() to be called without an opened view.
Some failing mailbox_open() call may leave it in such a state.

10 years agodoveadm director update command added.
Timo Sirainen [Thu, 3 Sep 2015 13:04:26 +0000 (16:04 +0300)] 
doveadm director update command added.
The difference to "doveadm director add" is that if the IP doesn't already
exist, it's not added.

10 years agoRemoved SET_IN_PORT_ZERO - SET_IN_PORT now always allows zeros as well.
Timo Sirainen [Thu, 3 Sep 2015 11:10:36 +0000 (14:10 +0300)] 
Removed SET_IN_PORT_ZERO - SET_IN_PORT now always allows zeros as well.
A zero in all the port settings means that the port is disabled, which is
also the default. So it shouldn't be an error to explicitly set it to zero
in the config file.

10 years agolib: strnum - simplify hex and oct overflow code
Phil Carmody [Thu, 3 Sep 2015 11:01:57 +0000 (14:01 +0300)] 
lib: strnum - simplify hex and oct overflow code
uintmax_t is defined to have modulo-2^n semantics, and therefore the bottom
bits of (uintmax_t) are guaranteed to be all set. Therefore the checking of
the next character read is unnecessary, as it's already done in the loop
control statement itself. (This is not true about the bottom digit base 10,
which is why the check remains in the decimal case)

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agoman: doveadm-sync.1: Added description for option `-T secs'.
Pascal Volk [Mon, 31 Aug 2015 22:31:19 +0000 (22:31 +0000)] 
man: doveadm-sync.1: Added description for option `-T secs'.

10 years agodict-sql: Fixed iteration with blob fields.
Timo Sirainen [Wed, 2 Sep 2015 17:30:07 +0000 (20:30 +0300)] 
dict-sql: Fixed iteration with blob fields.

10 years agodict-sql: Implemented support for binary fields.
Timo Sirainen [Wed, 2 Sep 2015 16:46:36 +0000 (19:46 +0300)] 
dict-sql: Implemented support for binary fields.
Example:

map {
  pattern = shared/blobtest/$key
  table = blobtest
  value_field = value
  value_hexblob = yes

  fields {
    key = ${hexblob:key}
  }
}

Now you can access both field and value as hex data. For example:

doveadm dict set proxy::sqldict shared/blobtest/746573746b6579 7465737476616c7565

This adds "testkey" and "testvalue" to key and value fields blobs.

10 years agolib-sql: Implemented sql_escape_blob()
Timo Sirainen [Wed, 2 Sep 2015 16:43:26 +0000 (19:43 +0300)] 
lib-sql: Implemented sql_escape_blob()

10 years agocassandra: Implemented support for binary values.
Timo Sirainen [Wed, 2 Sep 2015 16:42:45 +0000 (19:42 +0300)] 
cassandra: Implemented support for binary values.

10 years agodoveadm dict iter: Added -V parameter to return only keys.
Timo Sirainen [Wed, 2 Sep 2015 16:41:23 +0000 (19:41 +0300)] 
doveadm dict iter: Added -V parameter to return only keys.

10 years agodict-sql: Fixed iteration with DICT_ITERATE_FLAG_NO_VALUE
Timo Sirainen [Wed, 2 Sep 2015 16:38:35 +0000 (19:38 +0300)] 
dict-sql: Fixed iteration with DICT_ITERATE_FLAG_NO_VALUE

10 years agodict-client: Prefix relative socket paths with base_dir.
Timo Sirainen [Wed, 2 Sep 2015 15:42:01 +0000 (18:42 +0300)] 
dict-client: Prefix relative socket paths with base_dir.

10 years agodict: Added dict-async service.
Timo Sirainen [Wed, 2 Sep 2015 14:51:23 +0000 (17:51 +0300)] 
dict: Added dict-async service.
This allows running separate dict processes with separate settings for async
and non-async backends.

10 years agodict-sql: Added support for async operations.
Timo Sirainen [Wed, 2 Sep 2015 14:37:16 +0000 (17:37 +0300)] 
dict-sql: Added support for async operations.

10 years agodict: Use the new async APIs for everything.
Timo Sirainen [Wed, 2 Sep 2015 14:36:47 +0000 (17:36 +0300)] 
dict: Use the new async APIs for everything.
If the dict backend supports async operations, this means that dict service
can now be configured with client_count>1.

10 years agolib-dict: Added async API for lookup and iteration.
Timo Sirainen [Wed, 2 Sep 2015 14:34:43 +0000 (17:34 +0300)] 
lib-dict: Added async API for lookup and iteration.

10 years agodict-sql: Code cleanup - added sql_dict_transaction_has_nonexistent()
Timo Sirainen [Wed, 2 Sep 2015 14:28:41 +0000 (17:28 +0300)] 
dict-sql: Code cleanup - added sql_dict_transaction_has_nonexistent()

10 years agodict-sql: Code cleanup - use a common sql_dict_transaction_free()
Timo Sirainen [Wed, 2 Sep 2015 14:27:09 +0000 (17:27 +0300)] 
dict-sql: Code cleanup - use a common sql_dict_transaction_free()

10 years agodict-sql: Fixed memory leak when committing/rollbacking unchanged transaction.
Timo Sirainen [Wed, 2 Sep 2015 14:26:08 +0000 (17:26 +0300)] 
dict-sql: Fixed memory leak when committing/rollbacking unchanged transaction.

10 years agodict-sql: Code cleanup - separated SQL query building function from sending it.
Timo Sirainen [Wed, 2 Sep 2015 14:23:45 +0000 (17:23 +0300)] 
dict-sql: Code cleanup - separated SQL query building function from sending it.

10 years agolib-dict: Code cleanup - give name for enum dict_protocol_cmd/reply
Timo Sirainen [Wed, 2 Sep 2015 14:21:06 +0000 (17:21 +0300)] 
lib-dict: Code cleanup - give name for enum dict_protocol_cmd/reply

10 years agolib-sql: Mark Cassandra driver as pooled.
Timo Sirainen [Wed, 2 Sep 2015 14:20:02 +0000 (17:20 +0300)] 
lib-sql: Mark Cassandra driver as pooled.
Otherwise all the asynchronous operations will assert-crash, since all the
auto-connecting code is in the sqlpool code.

10 years agolib-sql: Debugging help - Added assert before clearing sql_result.callback.
Timo Sirainen [Wed, 2 Sep 2015 14:19:08 +0000 (17:19 +0300)] 
lib-sql: Debugging help - Added assert before clearing sql_result.callback.
If result is unrefed too many times, this still allows accessing the
callback from a debugger.

10 years agolib-sql: sql_result.free() should never be reached from the query callback.
Timo Sirainen [Wed, 2 Sep 2015 14:16:41 +0000 (17:16 +0300)] 
lib-sql: sql_result.free() should never be reached from the query callback.
This code was probably added before sql_result refcounting.

10 years agolib-imap-client: If connect() fails immediately, log an error and retry the next IP.
Timo Sirainen [Tue, 1 Sep 2015 13:25:11 +0000 (16:25 +0300)] 
lib-imap-client: If connect() fails immediately, log an error and retry the next IP.
Only if all IPs fail return a full failure. This is mainly intended to skip
IPv6 addresses when IPv6 connectivity doesn't work.

10 years agoauth: Added ":protected" suffix to passdb and userdb field names.
Timo Sirainen [Mon, 31 Aug 2015 21:11:37 +0000 (00:11 +0300)] 
auth: Added ":protected" suffix to passdb and userdb field names.
This means that if the field is set only if it hasn't already been set.
Usually an earlier passdb/userdb would have set the field and this is
setting a default (e.g. per-user settings override per-domain settings).

10 years agolib-fs: Added "dict" backend, which is a wrapper to using lib-dict.
Timo Sirainen [Mon, 31 Aug 2015 20:54:24 +0000 (23:54 +0300)] 
lib-fs: Added "dict" backend, which is a wrapper to using lib-dict.

10 years agoimap-hibernate: Use sockets' st_dev and st_ino to verify that the passed fd is correct.
Timo Sirainen [Mon, 31 Aug 2015 20:46:05 +0000 (23:46 +0300)] 
imap-hibernate: Use sockets' st_dev and st_ino to verify that the passed fd is correct.

10 years agolib: Added str_to_ino()
Timo Sirainen [Mon, 31 Aug 2015 20:25:12 +0000 (23:25 +0300)] 
lib: Added str_to_ino()

10 years agoimap: NOTIFY SET STATUS didn't send HIGHESTMODSEQ in STATUS reponses when needed.
Timo Sirainen [Mon, 31 Aug 2015 20:11:17 +0000 (23:11 +0300)] 
imap: NOTIFY SET STATUS didn't send HIGHESTMODSEQ in STATUS reponses when needed.

10 years ago*-login: mail_max_userip_connections=0 was broken by f8ab4f979e92
Timo Sirainen [Mon, 31 Aug 2015 19:45:17 +0000 (22:45 +0300)] 
*-login: mail_max_userip_connections=0 was broken by f8ab4f979e92

10 years agocassandra: Changed default consistency levels to local-quorum.
Timo Sirainen [Mon, 31 Aug 2015 19:25:57 +0000 (22:25 +0300)] 
cassandra: Changed default consistency levels to local-quorum.
It is a much safer default than "one".

10 years agocassandra: Split consistency setting to read_consistency and write_consistency.
Timo Sirainen [Mon, 31 Aug 2015 18:31:46 +0000 (21:31 +0300)] 
cassandra: Split consistency setting to read_consistency and write_consistency.

10 years agolib-fts: Add missing "j'" to French contractions.
Teemu Huovila [Mon, 31 Aug 2015 17:23:32 +0000 (20:23 +0300)] 
lib-fts: Add missing "j'" to French contractions.

10 years agoEarlier in_port_t fix was ineffective due to one small detail.
Stephan Bosch [Mon, 31 Aug 2015 11:24:54 +0000 (14:24 +0300)] 
Earlier in_port_t fix was ineffective due to one small detail.
The new SET_IN_PORT_ZERO did not actually use the new net_str2port_zero() function.

10 years agolib-fts: Add UTF-8 unit test for lowercase filter.
Teemu Huovila [Mon, 31 Aug 2015 10:33:26 +0000 (13:33 +0300)] 
lib-fts: Add UTF-8 unit test for lowercase filter.

10 years agolib-fts: Add prefixing contraction filter.
Teemu Huovila [Mon, 31 Aug 2015 10:33:26 +0000 (13:33 +0300)] 
lib-fts: Add prefixing contraction filter.
Filters away prefixing contracted words, e.g. "l'homme" -> "homme".
Tokens to be filtered must be lower case. Only supports French in
this initial version.

10 years agoaggregator: Allow replicator_port=0 setting (fix to previous in_port_t changes)
Timo Sirainen [Sat, 29 Aug 2015 22:00:30 +0000 (01:00 +0300)] 
aggregator: Allow replicator_port=0 setting (fix to previous in_port_t changes)

10 years agoEarlier in_port_t fix created problems with service listener configuration.
Stephan Bosch [Sat, 29 Aug 2015 21:46:32 +0000 (00:46 +0300)] 
Earlier in_port_t fix created problems with service listener configuration.
Listeners are disabled with port=0, which was not allowed anymore.

10 years agolib-master: Compiler warning fix
Timo Sirainen [Sat, 29 Aug 2015 21:42:16 +0000 (00:42 +0300)] 
lib-master: Compiler warning fix