Timo Sirainen [Sat, 16 May 2015 15:47:20 +0000 (18:47 +0300)]
lib-fts: Rewrite ICU handling functions.
Some of the changes:
- Use buffers instead of allocating everything from data stack.
- Optimistically attempt to write the data directly to the buffers without
first calculating their size. Grow the buffer if it doesn't fit first.
- Use u_strFromUTF8Lenient() instead of u_strFromUTF8(). Our input is
already supposed to be valid UTF-8, although we don't check if all code
points are valid, while u_strFromUTF8() does check them and return failures.
We don't really care about if code points are valid or not and
u_strFromUTF8Lenient() passes through everything.
Added unit tests to make sure all the functions work as intended and all the
UTF-8 input passes through them successfully.
Timo Sirainen [Sat, 16 May 2015 10:50:48 +0000 (13:50 +0300)]
lib-charset: Fixed compile warning caused by earlier commit.
This UNICODE_REPLACEMENT_CHAR_UTF8 part of the change was actually supposed
to be a separate commit..
Timo Sirainen [Fri, 15 May 2015 13:50:27 +0000 (16:50 +0300)]
doveadm director flush: Unless -F parameter is used, do the flush by moving users.
User moving causes the users to be properly kicked out of the old backends
before new connections are made to the new backends. This way the user isn't
accessed simultaneously by different backends.
Timo Sirainen [Fri, 15 May 2015 13:44:45 +0000 (16:44 +0300)]
director: Moving a user to another host sometimes caused the move to fail.
It could have given "User hash .. is being redirected to two hosts" error
and afterwards moved the user back to its original host.
Timo Sirainen [Fri, 15 May 2015 09:48:07 +0000 (12:48 +0300)]
Reverted d592417ec815 which added unnecessary code to Makefiles.
The original problem it tried to solve was properly fixed by 46969c4cc57e.
make will actually wait for processes to finish creating files before it
continues to the next program that wants to access the file. As long as the
dependencies are correct.
Timo Sirainen [Fri, 15 May 2015 08:15:50 +0000 (11:15 +0300)]
sdbox: When hardlink-copying a mail in alt storage, keep it within the alt storage.
Also make sure that the alt-flag is set correctly no matter where we copy
the mail.
Timo Sirainen [Thu, 14 May 2015 08:26:00 +0000 (11:26 +0300)]
director: UNIX auth sockets were wrongly detected as doveadm or ring sockets.
A workaround would be to use login/director-auth socket name instead of
login/director.
Timo Sirainen [Wed, 13 May 2015 16:24:55 +0000 (19:24 +0300)]
mbox: Fixed corruption in some usage patterns.
Something like:
- first mail is being expunged
- other mails are being rewritten and they get their space from the
expunged mail
- there's not enough space for the last mail to get space
- we add more space
- we'll now need to use up the space. We can't just decide to mark the
mails dirty.
Timo Sirainen [Wed, 13 May 2015 13:22:27 +0000 (16:22 +0300)]
director: Added "authreply" socket type.
This allows defining a socket, which receives auth replies. Director then
adds the "host" field to it if it's missing and returns back the original
string. The idea is that eventually a director ring could be running
independently from Dovecot proxies.
Timo Sirainen [Wed, 13 May 2015 12:47:14 +0000 (15:47 +0300)]
lib-master: If executing doveconf, use master_service_settings_input.service for filter
Instead of hardcoding to the master_service->name, which may be different.
This fixes reading protocol sieve {} settings when if managesieve was
reading settings via doveconf (= executed from command line).
Timo Sirainen [Wed, 13 May 2015 12:33:27 +0000 (15:33 +0300)]
director: Cleanup for director socket type configuration.
It's now possible to use any type of a socket for inet listeners by
specifying the name for the listener. The available types are: auth
(default), userdb, ring (= director<->director connection), admin/doveadm.
This change should be backwards compatible with previous configuration.
This setting also deprecates director_doveadm_port setting.
Timo Sirainen [Wed, 13 May 2015 02:25:31 +0000 (05:25 +0300)]
director: Added a new DIRECTOR-LOOKUP command that auth connections can use.
The parameters are the same as what auth lookup would receive from auth
process. So the idea is that a proxy could do an auth lookup, then forward
the reply to director, which would return back the updated reply with the
host field added.
Timo Sirainen [Tue, 12 May 2015 18:58:03 +0000 (21:58 +0300)]
lib: connection API: Added delayed_unix_client_connected_callback setting. 092a51d80bad commit changed this functionality first to fix lib-http code,
but it broke other code. 1fac17a2bc53 reversed the original behavior.
This change allows either behavior optionally.
Timo Sirainen [Tue, 12 May 2015 09:20:56 +0000 (12:20 +0300)]
lib-fts: Reverted e80969ea8684 which replaced .sh scripts with awk
Bugs in older awk versions (used at least by Debian squeeze & wheezy) caused
awk to crash while processing the script.
Timo Sirainen [Mon, 11 May 2015 18:55:42 +0000 (21:55 +0300)]
lib-sql: Added support for Cassandra CQL as lib-sql backend.
Implemented using DataStax's cpp-driver.
Many things are still unimplemented. Column name specific functionality
isn't even supported by the Cassandra library. So this can currently mainly
be used as one of the dict backends for some simple functionality.