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*()
Timo Sirainen [Sun, 3 May 2015 11:50:01 +0000 (14:50 +0300)]
lib-mail: Added qp-decoder, which is a rewritten quoted_printable_decode()
The main benefit is that qp-decoder allows feeding data to it in smaller
pieces. It can also give better error reporting.
Timo Sirainen [Wed, 29 Apr 2015 15:19:34 +0000 (17:19 +0200)]
lib-imap: imap_utf7_to_utf8() returns failure now for encoded NULs.
All the callers change the string to NUL-terminated string, so the earlier
behavior was just truncating the string at the encoded NUL. It's a bit safer
to just return failure so in future if the callers didn't convert the string
to NUL-terminated string it wouldn't be handled inconsistently in different
places.
Timo Sirainen [Wed, 29 Apr 2015 09:33:21 +0000 (11:33 +0200)]
director: Implemented director_proxy_maybe passdb extra field.
This allows running director and backend in the same Dovecot instance. It
was implemented into director instead of login-common to allow doveadm and
lmtp proxying to work as well (although currently lmtp can't handle mixed
proxying and non-proxying destinations, which makes this a bit less useful).
Stephan Bosch [Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)]
lib-http: client: Fixed memory leak in CONNECT tunnel support.
Forgot to dereference streams once tunnel was completed and passed to the new connection object.
Timo Sirainen [Wed, 29 Apr 2015 08:27:50 +0000 (10:27 +0200)]
trash plugin: Count more correctly the number of bytes/messages needed to get under quota.
If there already were some messages saved, those weren't counted when
figuring out how many/much mails are still needed to be expunged.
Timo Sirainen [Tue, 28 Apr 2015 12:20:39 +0000 (14:20 +0200)]
lib-mail: Fixed modifying headers with i_stream_header_filter_add()
If the stream was read twice, the second time the callback wasn't called and
the header wasn't modified.
Timo Sirainen [Sat, 25 Apr 2015 09:07:44 +0000 (12:07 +0300)]
log: Don't confuse process sending a partial log line to process sending logs too fast.
If it's a partial line we don't want to show the "service too fast" error in
ps title.
Timo Sirainen [Fri, 24 Apr 2015 12:45:42 +0000 (15:45 +0300)]
doveadm fs delete -R: Fixed infinite looping when deleting a lot of files with some backends.
After file was deleted, we closed it. Then later on we tried to delete it
all over again.
Timo Sirainen [Fri, 24 Apr 2015 12:13:59 +0000 (15:13 +0300)]
lmtp: Added lmtp_hdr_delivery_address=final|original|none setting.
This controls what username is used for logging Delivered-To: header and the
"for user@domain" in Received: header. The default "final" is the regular
username as earlier, "original" logs the RFC822 address received via ORCPT
parameter or fallbacks to username, "none" logs nothing.
Timo Sirainen [Fri, 24 Apr 2015 11:25:06 +0000 (14:25 +0300)]
fts-solr: fts_solr=use_libfts send data to Solr via space-separated tokens.
In this case Solr should be configured to not do any kind of filtering and
use only WhitespaceTokenizerFactory.
Timo Sirainen [Fri, 24 Apr 2015 10:10:17 +0000 (13:10 +0300)]
fts: Replace '-' with '_' in filter-specific fts_filters_* settings.
So for example using fts_filters_normalizer_icu instead of
fts_filters_normalizer-icu.
Timo Sirainen [Thu, 23 Apr 2015 18:32:43 +0000 (21:32 +0300)]
dict: Fixed unescaping strings from lib-dict.
This may potentially break backwards compatibility with someone, but it's
probably pretty rare that anybody is yet using dict proxy with multi-line
fields. Also even though the current behavior happens to work, it's very
much non-ideal and can be potentially dangerous.
Timo Sirainen [Thu, 23 Apr 2015 18:19:54 +0000 (21:19 +0300)]
lib-storage: mail_search_args_simplify() handles now SEARCH_HEADER*/TEXT/BODY
These are especially useful with lib-fts, where stemming and other filtering
can produce duplicates. There's some internal deduplication, but it doesn't
catch all of these.
Timo Sirainen [Thu, 23 Apr 2015 16:49:49 +0000 (19:49 +0300)]
lib-storage: If mail_search_args_simplify() merges flags, check again if any SUBs can be removed.
The subquery may have been replaced with a single SEARCH_FLAGS parameter.
Timo Sirainen [Thu, 23 Apr 2015 16:28:04 +0000 (19:28 +0300)]
imapc: Use mail_search_arg_to_imap() to write IMAP SEARCH parameters.
This also fixes a few bugs, since some of the search parameters weren't
written entirely correctly.
Timo Sirainen [Thu, 23 Apr 2015 13:33:19 +0000 (16:33 +0300)]
lib-storage: Fixed assert-crash with mailbox_list_index=yes if root mailbox name was empty.
This happened if the index was used for a non-listable namespace whose
prefix started with the namespace separator (e.g. prefix="/expunged/")
Timo Sirainen [Thu, 23 Apr 2015 10:37:22 +0000 (13:37 +0300)]
imapc: After auth failed, return failure immediately when opening a mailbox.
Instead of trying to re-authenticate which again will most likely fail.
Based on patch by Michael M Slusarz
Timo Sirainen [Thu, 23 Apr 2015 10:27:17 +0000 (13:27 +0300)]
lib-storage: Small code cleanup for index_mail_get_binary_stream()
stream_r is always non-NULL here. Also move unreferencing cache istream to
be last in case it might fix data.stream=NULL being here in some situations.