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.
Timo Sirainen [Wed, 22 Apr 2015 15:17:10 +0000 (18:17 +0300)]
lib-storage: Added support for subscriptions file version 2 format.
The v2 format's main benefit is that it doesn't write the hierarchy
separator to the subscriptions file, which allows the separator to be
changed without breaking subscriptions. This mainly affects LAYOUT=INDEX,
which doesn't have a native hardcoded separator.
The plan is to start writing v2 subscription files in Dovecot v2.3. So for
now we simply read such files and if we find v2 file we also modify it in v2
format, but we never create new v2 format files or convert v0 to v2.
Timo Sirainen [Tue, 21 Apr 2015 18:28:41 +0000 (21:28 +0300)]
fts: If backend has FTS_BACKEND_FLAG_TOKENIZED_INPUT set, index also the header name.
We were sending the hdr_name to the backend without tokenizing it or
filtering it, so the backend couldn't have done anything useful about it.
Timo Sirainen [Tue, 21 Apr 2015 14:01:39 +0000 (17:01 +0300)]
lmtp proxy: Include in log messages how long it took to deliver the mail.
In multi-RCPT TO sessions it's a bit unreliable to split the single DATA
reply's times to multiple lines, so instead each line just says
"(2/3 at 123 ms)" meaning that the second mail was delivered at the time
when 123 milliseconds had elapsed since the delivery was started.
Timo Sirainen [Tue, 21 Apr 2015 13:54:51 +0000 (16:54 +0300)]
lib-lda: Assume that the caller sets delivery_time_started
This is required because parts of the delivery time may be done at the time
the user is being initialized, so it needs to be set before the user init is
done.
Timo Sirainen [Tue, 21 Apr 2015 13:52:59 +0000 (16:52 +0300)]
lib-lda: mail_deliver_log() now updates the %{delivery_time} instead of using the first cached value.
The first time the cached values are set the transaction isn't committed and
the mailbox isn't synced.
Timo Sirainen [Tue, 21 Apr 2015 11:06:22 +0000 (14:06 +0300)]
imap: Include in tagged reply how much running time each IMAP command takes.
The running time doesn't include time spent waiting for the client on
ioloop.
Timo Sirainen [Tue, 21 Apr 2015 10:19:24 +0000 (13:19 +0300)]
lda, lmtp: Added delivery_time and session_time variables to deliver_log_format
session_time is meaningful only with LMTP. The delivery_time is separate for
each mail delivery. The results are in milliseconds now. If needed we could
add a new %modifier that converts it into secs.millisecs.
Timo Sirainen [Mon, 20 Apr 2015 14:33:09 +0000 (17:33 +0300)]
lib-fts: Fixed test-fts-language to use TEXTCAT_DATADIR
This may still make too many assumptions about what data exists where.. So
we may need to remove this test from "make check". But for now leave it
there.
Timo Sirainen [Mon, 20 Apr 2015 13:19:07 +0000 (16:19 +0300)]
Initial import for lib-fts.
Parts of what this code does was already implemented internally by
fts-lucene. lib-fts is intended to be usable for all the FTS backends. The
APIs are still going to change a bit, but hopefully not after v2.2.17
release.
Timo Sirainen [Mon, 20 Apr 2015 12:27:02 +0000 (15:27 +0300)]
configure: Fixed/improved finding and using libexttextcat.
libexttextcat wasn't actually being used at all by fts-lucene. Now we'll
first prefer finding it via pkg-config, next finding exttextcat and only
last look up textcat.
Timo Sirainen [Mon, 20 Apr 2015 12:12:14 +0000 (15:12 +0300)]
configure: Stemmer and textcat checks are now done even if CLucene isn't used.
They'll be useful for other FTS backends as well. This patch doesn't change
any actual functionality.
Timo Sirainen [Thu, 16 Apr 2015 11:19:51 +0000 (14:19 +0300)]
doveadm mailbox metadata: The keys must always be lowercased.
The keys need to be case-insensitive in IMAP, so the IMAP code always also
lowercases them.
Phil Carmody [Thu, 16 Apr 2015 08:46:22 +0000 (11:46 +0300)]
lib: test-array build warnings on Solaris 10
Solaris cc doesn't think I've read N1570 6.7.9p11, 6.5.16.1p2, and 6.3.1.3p2,
and wants to save me from myself.
Reported-by: Juergen Obermann <http://www.dovecot.org/list/dovecot/2015-April/100427.html> Signed-off-by: Phil Carmody <phil@dovecot.fi>
Timo Sirainen [Wed, 15 Apr 2015 18:01:11 +0000 (21:01 +0300)]
imapc: Added imapc_features=zimbra-workarounds
Zimbra (at least v5.0.18_GA_3011.RHEL4_64) can return different headers
depending on whether the whole message body was fetched or only (partial)
headers. This probably happens only for invalid characters that are
translated into '?'. With this workaround enabled we don't use FETCH
BODY.PEEK[], but we do FETCH (BODY.PEEK[HEADER] BODY.PEEK[TEXT]) and merge
the results together. This way the results are always consistent and headers
don't suddenly change.
Timo Sirainen [Tue, 14 Apr 2015 06:58:01 +0000 (09:58 +0300)]
dict-file: Use tabescaping for keys and values to allow LFs in them.
Although this makes the format slightly incompatible, it's doubtful anybody
is using dict values containing \001 characters.
Timo Sirainen [Wed, 8 Apr 2015 04:55:35 +0000 (13:55 +0900)]
lib: Added json-tree API for parsing JSON input into a tree structure.
This makes it easier to access complicated JSON structs that can fit into
memory.