Timo Sirainen [Sat, 9 May 2015 12:00:28 +0000 (15:00 +0300)]
lib-fts: Removed supports() function from filter API
I think the original idea was that this could be used to automatically
create filters for many languages, but this probably won't be needed or
wanted.
Timo Sirainen [Sat, 9 May 2015 11:49:20 +0000 (14:49 +0300)]
lib-fts: Store pointers to fts_filter classes instead of copying the data.
Doesn't really matter, but it's a bit cleaner when fts_filter_find() returns
the same pointer as the fts_filter class originally was.
Timo Sirainen [Sat, 9 May 2015 11:09:37 +0000 (14:09 +0300)]
lib-fts: Removed "simple" normalizer.
It translated input to titlecase, which wasn't suitable for snowball
stemming that wanted lowercase input. Since that doesn't work, there's
probably no good for the existence of this (perhaps in future it's replaced
by unicode-aware lowercaser).
Timo Sirainen [Sat, 9 May 2015 09:39:21 +0000 (12:39 +0300)]
lib-fts: Don't treat empty domains as valid addresses.
This actually pretty much reverts the previous patch and just fixes the
original code's chars_after_at() to work correctly. Also renamed the
function to make it a bit clearer what was intended.
Timo Sirainen [Sat, 9 May 2015 09:32:46 +0000 (12:32 +0300)]
lib-fts: Removed unnecessary code from fts-address-tokenizer.
chars_after_at() was only used to check if local-part was empty, but it was
checked at a state where it never could have been empty.
Timo Sirainen [Sat, 9 May 2015 09:01:42 +0000 (12:01 +0300)]
lib-fts: Various fixes and cleanups to stopwords filter.
Most importantly words added to hash table needs to be allocated from the
pool and not data stack.
Timo Sirainen [Sat, 9 May 2015 08:46:09 +0000 (11:46 +0300)]
lib-fts: Changed filter's internal APIs to return error_r directly.
It's not very safe to store strings allocated from data stack to any
permanent structs.
Teemu Huovila [Sat, 9 May 2015 08:05:04 +0000 (11:05 +0300)]
fts: Change tokenizer API to be able to return errors
Modify fts_tokenizer_next() to return integer status codes. It returns
1 if a token was returned in *token_r, 0 if more input is needed and -1
on error.
Teemu Huovila [Sat, 9 May 2015 08:02:22 +0000 (11:02 +0300)]
fts: Create tokenizers differently
Create tokenizers earlier. Create separate tokenizers for search
and indexing. Enable configuration of tokenizers. Add some helpers
in fts-tokenizer.h api. Change tokenizer unit tests to match
those changes.
lib-fts: Refactor lib-fts settings a bit
Turned address tokenizer settings into "boolean" values. Changed
have_parent to "no_parent" and added "search" setting. Added
documentation in fts-tokenizer.h. Change unit tests accordingly.
Timo Sirainen [Thu, 7 May 2015 17:35:23 +0000 (20:35 +0300)]
lib-fs: Fixed fs-compress code to actually build and run.
It's a plugin (because it depends on extra compression libraries). We want
to register it only when it's explicitly attempted to be used, not before.
Timo Sirainen [Thu, 7 May 2015 08:27:55 +0000 (11:27 +0300)]
auth: Fixed credentials lookups via auth-workers when no actual password was returned.
For example LDAP lookup with auth_bind=yes should still return any extra
fields.
Timo Sirainen [Thu, 7 May 2015 08:21:33 +0000 (11:21 +0300)]
ldap auth: If password is already verified (e.g. master user login), skip LDAP auth binding.
This happens only if auth_bind_userdn isn't set, i.e. it only makes sense if
the LDAP DN lookup also returns some extra fields.
Timo Sirainen [Wed, 6 May 2015 21:01:08 +0000 (00:01 +0300)]
mbox: Fixed crash/corruption in some situations when the first mail was expunged.
This could be reproduced with default mbox settings, IMAP session that does
- STORE 1 +FLAGS \DELETED
- EXPUNGE
With mbox containing:
===
From root@example.com Tue Jan 13 10:18:16 2015
Timo Sirainen [Wed, 6 May 2015 12:45:43 +0000 (15:45 +0300)]
doveadm: Added -U <file> parameter for executing the command for all the users in the file.
This is similar to -A parameter, but instead of getting the list of users
from userdb they are read from the file. The file contains one username per
line.
Timo Sirainen [Tue, 5 May 2015 13:24:07 +0000 (16:24 +0300)]
lib-storage: After mailbox_list_init_fs() is finished, notify fs about it.
Creating a separate fs_init_finish() would perhaps have been clearner, but
it's a lot more work and usually isn't even necessary for most backends.
So I simply chose to use fs_get_properties() which is a fast call in all fs
backends and the few ones that actually care about the initialization finish
can then do their work in there.
Timo Sirainen [Tue, 5 May 2015 13:17:14 +0000 (16:17 +0300)]
fts: Initialize fts backend in mail_namespaces_added(), not in mailbox_list_created()
This way the storage has already been created by the time fts initialization
starts, which simplifies things.
Timo Sirainen [Tue, 5 May 2015 10:35:52 +0000 (13:35 +0300)]
doveadm fs delete: Another attempt at fixing recursive deletion.
I'm not entirely sure anymore what the original infinite looping was, but
this fixes all the potential problems that I see.
Timo Sirainen [Mon, 4 May 2015 20:27:42 +0000 (23:27 +0300)]
lib-storage: Fixed setting/getting server metadata.
Also added a MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE() macro to make it a
bit easier to check if a key should be accessible to a user or not.
Timo Sirainen [Mon, 4 May 2015 09:07:16 +0000 (12:07 +0300)]
configure: When compiling with sqlite3, don't forcibly link with zlib.
Looks like -lz was originally added when it was copy&pasted from some other
code. Hopefully this isn't actually needed by any (current) system.
Timo Sirainen [Sun, 3 May 2015 13:26:46 +0000 (16:26 +0300)]
lib-mail: Removed quoted_printable_decode*()
quoted_printable_q_decode() was still left in quoted-printable.h, but maybe
it should be moved to qp-decoder.c as well.
Timo Sirainen [Sun, 3 May 2015 13:23:41 +0000 (16:23 +0300)]
lib-mail: Switched message-decoder to use qp-decoder.
This probably doesn't fix any actual bugs, but allows getting rid of the
quoted_printable_decode*()