]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agoquota: Cleanup - split quota_over_flag to init & run parts
Timo Sirainen [Fri, 29 Apr 2016 15:58:53 +0000 (18:58 +0300)] 
quota: Cleanup - split quota_over_flag to init & run parts

In preparation for the next change.

9 years agoquota: Fixed debug logging for quota_over_flag
Timo Sirainen [Fri, 29 Apr 2016 15:55:34 +0000 (18:55 +0300)] 
quota: Fixed debug logging for quota_over_flag

9 years agoquota: Fixed quota_over_flag handling when quota usage==limit
Timo Sirainen [Fri, 29 Apr 2016 15:53:04 +0000 (18:53 +0300)] 
quota: Fixed quota_over_flag handling when quota usage==limit

It couldn't really work correctly otherwise. If we've reached the quota, we
want to start rejecting new mails.

9 years agoquota-count: Cache quota usage within the same ioloop run.
Timo Sirainen [Fri, 29 Apr 2016 14:21:26 +0000 (17:21 +0300)] 
quota-count: Cache quota usage within the same ioloop run.

This mainly means that when both STORAGE and MESSAGES quota is looked up we
don't need to calculate them twice.

9 years agoquota-count: Code cleanup - give consistent return value
Timo Sirainen [Fri, 29 Apr 2016 14:20:31 +0000 (17:20 +0300)] 
quota-count: Code cleanup - give consistent return value

Although the callers didn't care if it returned 0 or 1.

9 years agoglobal: Use buffer_get_writable_size() where possible
Timo Sirainen [Fri, 29 Apr 2016 12:50:06 +0000 (15:50 +0300)] 
global: Use buffer_get_writable_size() where possible

With 09539f3db increasing buffer's init_size with +1 some fts-icu unit tests
started failing. And in general it's better to use the writable size since
that provides the true size that can be used.

9 years agoquota: Optimize handling a large number of expunges.
Timo Sirainen [Fri, 29 Apr 2016 12:42:48 +0000 (15:42 +0300)] 
quota: Optimize handling a large number of expunges.

This assumes that the mail_expunge() was called in the same order as
sync_notify(), which practically means that they were both done in
ascending uid order. This is usually true.

9 years agolib-ldap: Set minimum protocol if supported by library
Aki Tuomi [Fri, 29 Apr 2016 11:30:46 +0000 (14:30 +0300)] 
lib-ldap: Set minimum protocol if supported by library

9 years agoimapc: Fixed EXPUNGE handling when imapc_features didn't have modseq
Timo Sirainen [Fri, 29 Apr 2016 11:33:45 +0000 (14:33 +0300)] 
imapc: Fixed EXPUNGE handling when imapc_features didn't have modseq

9 years agolib-index: Use a bit larger initial records buffer size
Timo Sirainen [Fri, 29 Apr 2016 11:07:05 +0000 (14:07 +0300)] 
lib-index: Use a bit larger initial records buffer size

For example with a mailbox having 160k messages the buffer size is around
10MB. Adding just 1% more space to it allows a lot more appends before the
buffer needs to be realloced. This reduces CPU usage quite a lot.

9 years agolib: buffer_create_dynamic() now adds +1 to init_size
Timo Sirainen [Fri, 29 Apr 2016 10:55:33 +0000 (13:55 +0300)] 
lib: buffer_create_dynamic() now adds +1 to init_size

9 years agolib: Use p_malloc() explicitly in first buffer_alloc()
Timo Sirainen [Fri, 29 Apr 2016 09:55:52 +0000 (12:55 +0300)] 
lib: Use p_malloc() explicitly in first buffer_alloc()

Although there is now code in p_realloc() that it should be just as
efficient, this makes profiling somewhat nicer since it can better
distinguish between actual reallocs and initial allocs.

9 years agolib: Implement i_realloc(mem==NULL) more efficiently
Timo Sirainen [Fri, 29 Apr 2016 09:54:46 +0000 (12:54 +0300)] 
lib: Implement i_realloc(mem==NULL) more efficiently

Various parts of code use this to allocate the initial buffer. We can
do this more efficiently by using calloc().

9 years agoconfigure: Fixed (again) --with-ldap=plugin
Timo Sirainen [Fri, 29 Apr 2016 09:44:09 +0000 (12:44 +0300)] 
configure: Fixed (again) --with-ldap=plugin

9 years agolib-index: Memory allocation optimization
Timo Sirainen [Fri, 29 Apr 2016 09:34:23 +0000 (12:34 +0300)] 
lib-index: Memory allocation optimization

9 years agofts-lucene: Fixed crash on rescan
Timo Sirainen [Fri, 29 Apr 2016 07:53:37 +0000 (10:53 +0300)] 
fts-lucene: Fixed crash on rescan

Broken by af2564c7f9e05ad245a032efdfbc5abbb9b70f1e - rescan_ctx can be NULL.

9 years agolib-charset: Do not use //IGNORE on non-GNU system
Aki Tuomi [Thu, 28 Apr 2016 11:03:41 +0000 (14:03 +0300)] 
lib-charset: Do not use //IGNORE on non-GNU system

9 years agolib-storage: mailbox_set_subscribed() ignores duplicate changes now.
Timo Sirainen [Thu, 28 Apr 2016 23:33:58 +0000 (02:33 +0300)] 
lib-storage: mailbox_set_subscribed() ignores duplicate changes now.

9 years agolib-storage: Added index_storage_list_index_has_changed_full()
Timo Sirainen [Thu, 28 Apr 2016 12:21:41 +0000 (15:21 +0300)] 
lib-storage: Added index_storage_list_index_has_changed_full()

This allows the caller to use it to implement a slightly different
mailbox.list_index_has_changed()

9 years agolib-charset: Revert f086fd065 - wrong version
Timo Sirainen [Thu, 28 Apr 2016 12:56:45 +0000 (15:56 +0300)] 
lib-charset: Revert f086fd065 - wrong version

This wasn't the version that was supposed to be merged..

9 years agolib-charset: Do not use //IGNORE on non-GNU system
Aki Tuomi [Thu, 28 Apr 2016 11:03:41 +0000 (14:03 +0300)] 
lib-charset: Do not use //IGNORE on non-GNU system

9 years agolib: [io]stream-rawlog.h should auto-include iostream-rawlog.h
Timo Sirainen [Thu, 28 Apr 2016 12:00:44 +0000 (15:00 +0300)] 
lib: [io]stream-rawlog.h should auto-include iostream-rawlog.h

Otherwise compiler will warn about the missing enum.

9 years agodoveadm dump: Added more index ext records.
Timo Sirainen [Thu, 28 Apr 2016 09:53:49 +0000 (12:53 +0300)] 
doveadm dump: Added more index ext records.

"msgs" and "vsize" are now expanded.

9 years agolib-fs: Allow multiple fs_read_stream() calls to seekable istreams.
Timo Sirainen [Thu, 28 Apr 2016 09:45:01 +0000 (12:45 +0300)] 
lib-fs: Allow multiple fs_read_stream() calls to seekable istreams.

This fixes for example calling fs_default_copy() for an istream which was
already opened:

Panic: file fs-api.c: line 528 (fs_read_stream): assertion failed: (!file->istream_open)

9 years agolib-fs: Fixed multiple concurrent fs_read_stream() calls
Timo Sirainen [Thu, 28 Apr 2016 09:47:02 +0000 (12:47 +0300)] 
lib-fs: Fixed multiple concurrent fs_read_stream() calls

Return a new limit-istream, so each istream can have its own independent
offset.

9 years agolazy-expunge: Open the mailbox with ACLs ignored.
Timo Sirainen [Wed, 27 Apr 2016 20:58:12 +0000 (23:58 +0300)] 
lazy-expunge: Open the mailbox with ACLs ignored.

9 years agolazy-expunge: Open mailbox with MAILBOX_FLAG_SAVEONLY flag.
Timo Sirainen [Wed, 27 Apr 2016 20:47:09 +0000 (23:47 +0300)] 
lazy-expunge: Open mailbox with MAILBOX_FLAG_SAVEONLY flag.

9 years agoman: Add more complete description of one-way sync
Michael Slusarz [Wed, 20 Apr 2016 01:24:52 +0000 (19:24 -0600)] 
man: Add more complete description of one-way sync

9 years agolib: Add PKCS#5 pbkdf1 and 2
Aki Tuomi [Wed, 20 Apr 2016 14:34:53 +0000 (17:34 +0300)] 
lib: Add PKCS#5 pbkdf1 and 2

9 years agoauth: Add PBKDF2 password scheme
Aki Tuomi [Wed, 27 Apr 2016 06:14:29 +0000 (09:14 +0300)] 
auth: Add PBKDF2 password scheme

9 years agofts: Empty "fts" setting should be same as nonexistent.
Timo Sirainen [Tue, 26 Apr 2016 18:07:57 +0000 (21:07 +0300)] 
fts: Empty "fts" setting should be same as nonexistent.

9 years agostats: Support multiple FIFO listeners.
Timo Sirainen [Tue, 26 Apr 2016 14:12:25 +0000 (17:12 +0300)] 
stats: Support multiple FIFO listeners.

9 years agolib-storage: Remove unused mail_storage_service_all_init()
Timo Sirainen [Tue, 26 Apr 2016 12:56:40 +0000 (15:56 +0300)] 
lib-storage: Remove unused mail_storage_service_all_init()

9 years agodoveadm -u: Use mail_storage_service_all_init_mask()
Timo Sirainen [Tue, 26 Apr 2016 08:12:45 +0000 (11:12 +0300)] 
doveadm -u: Use mail_storage_service_all_init_mask()

9 years agolib-storage: Added mail_storage_service_all_init_mask()
Timo Sirainen [Tue, 26 Apr 2016 08:11:57 +0000 (11:11 +0300)] 
lib-storage: Added mail_storage_service_all_init_mask()

This allows providing a usermask hint to the userdb iteration lookup. For example
with LDAP this allows setting the base based on the @domain.

9 years agolib-storage: fixup the broken search result with \seen or \delete
Baofeng Wang [Tue, 26 Apr 2016 08:10:35 +0000 (11:10 +0300)] 
lib-storage: fixup the broken search result with \seen or \delete

remove side effects of match_always flag during search.

9 years agolib-sql: Fixed building Cassandra as plugin
Timo Sirainen [Tue, 26 Apr 2016 07:31:49 +0000 (10:31 +0300)] 
lib-sql: Fixed building Cassandra as plugin

9 years agofts-lucene: Rescan skipped namespace roots.
Timo Sirainen [Mon, 25 Apr 2016 17:14:19 +0000 (20:14 +0300)] 
fts-lucene: Rescan skipped namespace roots.

9 years agofts-lucene: Cleanup - move code to a separate function
Timo Sirainen [Mon, 25 Apr 2016 17:13:54 +0000 (20:13 +0300)] 
fts-lucene: Cleanup - move code to a separate function

9 years agolib-mail: More fixes to istream-header-filter with large input.
Timo Sirainen [Mon, 25 Apr 2016 13:58:30 +0000 (16:58 +0300)] 
lib-mail: More fixes to istream-header-filter with large input.

Don't assume that when reading the header the second time we'll get exactly
the same header blocks as the first time.

This commit also prevents the filter callback from switching the
matching-decision on non-first header line. This shouldn't be needed and it
could just cause confusion. (It also made it a bit easier to implement this
fix.)

9 years agolib-mail: Improved istream-header-filter unit test.
Timo Sirainen [Mon, 25 Apr 2016 13:34:59 +0000 (16:34 +0300)] 
lib-mail: Improved istream-header-filter unit test.

Existing code already assumes that the callback is called for all the header
data. So it's not used just for filtering headers but also parsing the
header contents. Make this assumption now explicit as a unit test.

9 years agolib-mail: istream-header-filter didn't limit memory usage.
Timo Sirainen [Mon, 25 Apr 2016 13:25:46 +0000 (16:25 +0300)] 
lib-mail: istream-header-filter didn't limit memory usage.

A large header was always added to hdr_buf, ignoring any max_buffer_size
limits.

9 years agolib-mail: Code cleanup to istream-header-filter unit test
Timo Sirainen [Mon, 25 Apr 2016 13:22:12 +0000 (16:22 +0300)] 
lib-mail: Code cleanup to istream-header-filter unit test

The exclude_headers arrays were used in a confusing way. The X-Drop header
wasn't actually even used in the exclude_headers.

9 years agodsync: If state is invalid, exit with code 2 instead of tempfail.
Timo Sirainen [Mon, 25 Apr 2016 11:38:35 +0000 (14:38 +0300)] 
dsync: If state is invalid, exit with code 2 instead of tempfail.

We'll have dsync_mailbox_import_*() just return success to everything until
_deinit() is called. The _deinit() will return a failure and set "resync
needed"-flag, which caller will know how to handle.

9 years agodsync: If full resync is requested, return empty state string.
Timo Sirainen [Mon, 25 Apr 2016 11:35:21 +0000 (14:35 +0300)] 
dsync: If full resync is requested, return empty state string.

If the state is wrong, it's better to fully resync all the mailboxes rather
than just the one where a problem was noticed.

9 years agodsync: Improved detecting state state string.
Timo Sirainen [Mon, 25 Apr 2016 11:08:37 +0000 (14:08 +0300)] 
dsync: Improved detecting state state string.

9 years agolib-mail: return void from message_parser_deinit()
Martti Rannanjärvi [Fri, 22 Apr 2016 09:37:29 +0000 (12:37 +0300)] 
lib-mail: return void from message_parser_deinit()

9 years agolib-storage: Don't use same session ID for multiple mail_storage_service_next() calls.
Timo Sirainen [Fri, 15 Apr 2016 13:12:44 +0000 (16:12 +0300)] 
lib-storage: Don't use same session ID for multiple mail_storage_service_next() calls.

dsync does multiple mail_storage_service_next() calls for the same
mail_storage_service_user. This causes stats plugin to send the same
session ID to stats process, which complains about duplicates. Solved this
in a generic way by having the following mail_storage_service_next() calls
append :counter to session ID.

9 years agofs-posix: If link() fails, preserve its errno through the following unlink()
Timo Sirainen [Mon, 11 Apr 2016 14:25:51 +0000 (17:25 +0300)] 
fs-posix: If link() fails, preserve its errno through the following unlink()

9 years agofs-posix: Minor code cleanup - removed unnecessary code.
Timo Sirainen [Mon, 11 Apr 2016 14:20:52 +0000 (17:20 +0300)] 
fs-posix: Minor code cleanup - removed unnecessary code.

If success==TRUE, temp_path==NULL always also.

9 years agoimapc: Fixed crash caused by pool_unref() API change.
Timo Sirainen [Mon, 25 Apr 2016 09:07:25 +0000 (12:07 +0300)] 
imapc: Fixed crash caused by pool_unref() API change.

Calling pool_unref() set the mail_private->pool=NULL, which crashed in
index_mail_free(). Fixed this by removing the unnecessary ref/unref
entirely. We're already waiting in imapc_mail_close() for all the
existing FETCHes to finish, so the callback will always have only
valid mails with valid pools.

9 years agocassandra: Added num_threads, connect_timeout and request_timeout settings.
Timo Sirainen [Fri, 22 Apr 2016 16:37:57 +0000 (19:37 +0300)] 
cassandra: Added num_threads, connect_timeout and request_timeout settings.

9 years agolib-dovecot: Avoid duplication of listing *.la in both Makefile.am and configure
Timo Sirainen [Thu, 21 Apr 2016 16:18:55 +0000 (19:18 +0300)] 
lib-dovecot: Avoid duplication of listing *.la in both Makefile.am and configure

9 years agolib-dict: Moved dict-ldap to lib-dict-extra
Timo Sirainen [Thu, 21 Apr 2016 15:58:10 +0000 (18:58 +0300)] 
lib-dict: Moved dict-ldap to lib-dict-extra

This also allows moving lib-ldap away from LIBDOVECOT_SUBDIRS in
src/Makefile.am, which was wrong because it's not really part of
libdovecot.la.

9 years agoSplit parts of lib-dict into lib-dict-extra.
Timo Sirainen [Thu, 21 Apr 2016 15:51:57 +0000 (18:51 +0300)] 
Split parts of lib-dict into lib-dict-extra.

Otherwise there's a circular dependency because lib-dict/dict-fs.c depends
on lib-fs, while lib-fs/fs-dict.c depends on lib-dict. This becomes a problem
when compiling --without-shared-libs, although for some reason it works for
me while linking the Dovecot core, but not when linking external plugins.

9 years ago.gitignore: Updated to include auto-added m4/*
Timo Sirainen [Fri, 22 Apr 2016 19:44:01 +0000 (22:44 +0300)] 
.gitignore: Updated to include auto-added m4/*

9 years agoconfigure, Makefile: Tell autoconf/automake about m4 directory
Timo Sirainen [Fri, 22 Apr 2016 19:36:39 +0000 (22:36 +0300)] 
configure, Makefile: Tell autoconf/automake about m4 directory

To finally get rid of the complaints:

libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

9 years agodoveadm user: Added -e <value> parameter to expand %variables in <value>
Timo Sirainen [Tue, 19 Apr 2016 16:08:52 +0000 (19:08 +0300)] 
doveadm user: Added -e <value> parameter to expand %variables in <value>

This allows expanding any %variable that the mail processes normally expand.
For example:

% doveadm user -e "%u's home is %h" testuser@example.com
testuser@example.com's home is /var/mail/testuser@example.com

9 years agodoveadm user: Code cleanup - move field printing to its own function.
Timo Sirainen [Tue, 19 Apr 2016 16:07:51 +0000 (19:07 +0300)] 
doveadm user: Code cleanup - move field printing to its own function.

No functional changes.

9 years agolib-mail: Improved test-message-parser further
Timo Sirainen [Fri, 22 Apr 2016 15:35:04 +0000 (18:35 +0300)] 
lib-mail: Improved test-message-parser further

9 years agolib-mail: Fixed inner MIME part boundary being a prefix of outer boundary.
Timo Sirainen [Fri, 22 Apr 2016 15:28:20 +0000 (18:28 +0300)] 
lib-mail: Fixed inner MIME part boundary being a prefix of outer boundary.

9 years agolib-mail: Fixed handling duplicate boundary prefixes.
Timo Sirainen [Fri, 22 Apr 2016 15:15:44 +0000 (18:15 +0300)] 
lib-mail: Fixed handling duplicate boundary prefixes.

If inner MIME part had the same --boundary prefix as its parent(s) and
the MIME part body started with the inner --boundary prefix, we didn't yet
have it in the list of valid boundaries, so we thought that the outer
boundary was found and the MIME headers were truncated. But due to an extra
bug we still treated it as if it were the inner boundary, except the MIME
part sizes/offsets were set wrong.

This for example fixes a situation where FETCH [1.2.MIME] returns an extra
newline before the actual headers.

9 years agodsync: Fixed assert-crash in rename algorithm
Timo Sirainen [Fri, 22 Apr 2016 13:39:49 +0000 (16:39 +0300)] 
dsync: Fixed assert-crash in rename algorithm

Fixes a crash:
Panic: file dsync-mailbox-tree-sync.c: line 1308 (sync_mailbox_child_dirs): assertion failed: (!node_is_existent(local_node))

9 years agodsync: Determine better when rename-algorithm might have gotten stuck.
Timo Sirainen [Fri, 22 Apr 2016 13:28:56 +0000 (16:28 +0300)] 
dsync: Determine better when rename-algorithm might have gotten stuck.

A hardcoded value of 100 isn't necessarily enough if there are a lot of
mailboxes with a lot of renames. Base the max count on the total number
of mailboxes on both local and remote. And just in case multiple it by 3.
Probably smaller number would be fine too.

9 years agodsync: Fixed crash when rename algorithm thinks it has gone to infinite loop.
Timo Sirainen [Fri, 22 Apr 2016 13:25:00 +0000 (16:25 +0300)] 
dsync: Fixed crash when rename algorithm thinks it has gone to infinite loop.

ctx->brain was NULL, so trying to access it crashed.

9 years agolib-fs: Assert-crash if file's istream isn't closed at fs_file_close()
Timo Sirainen [Thu, 21 Apr 2016 14:59:19 +0000 (17:59 +0300)] 
lib-fs: Assert-crash if file's istream isn't closed at fs_file_close()

Some backends can't guarantee that the istream stays usable after the file
is closed.

9 years agolib-fs: fs-metawrap stat() and get_metadata(): use existing istream if possible
Timo Sirainen [Thu, 21 Apr 2016 14:55:51 +0000 (17:55 +0300)] 
lib-fs: fs-metawrap stat() and get_metadata(): use existing istream if possible

This may reduce reads from parent fs, but it's at least required for the
following commit.

9 years agolib-fs: Added initial fs-metawrap unit test.
Timo Sirainen [Thu, 21 Apr 2016 14:54:54 +0000 (17:54 +0300)] 
lib-fs: Added initial fs-metawrap unit test.

9 years agolib-fs: Added fs-test backend for helping with creation of fs-wrapper unit tests.
Timo Sirainen [Thu, 21 Apr 2016 14:52:44 +0000 (17:52 +0300)] 
lib-fs: Added fs-test backend for helping with creation of fs-wrapper unit tests.

9 years agolib: var_expand() now expands %{nonexistent} to UNSUPPORTED_VARIABLE_nonexistent
Timo Sirainen [Wed, 20 Apr 2016 20:01:45 +0000 (23:01 +0300)] 
lib: var_expand() now expands %{nonexistent} to UNSUPPORTED_VARIABLE_nonexistent

Earlier it was expanded to "nonexistent}", which looked more like a bug.
This change hopefully makes it clear enough to understand when a variable isn't
supported.

9 years agolib-ssl-iostream: Return stacked errors as single combined string.
Timo Sirainen [Thu, 21 Apr 2016 18:45:02 +0000 (21:45 +0300)] 
lib-ssl-iostream: Return stacked errors as single combined string.

Instead of logging stacked errors as separate log lines, which don't provide
any context of what created them.

9 years agoimapc: Added support for imapc_features=modseq
Timo Sirainen [Thu, 21 Apr 2016 21:21:12 +0000 (00:21 +0300)] 
imapc: Added support for imapc_features=modseq

If the remote server supports CONDSTORE or QRESYNC extensions we'll use the
remote's MODSEQ and HIGHESTMODSEQ counts.

There are some situations where the HIGHESTMODSEQ isn't updated exactly
correctly on an open mailbox, so this feature shouldn't be fully relied on.
It was primarily implemented for dsync+imapc support - both for preserving
modseqs and also for HIGHESTMODSEQ lookups.

9 years agoliblib: pool_unref() should always set pool=NULL (alloconly pool)
Baofeng Wang [Wed, 20 Apr 2016 14:24:06 +0000 (17:24 +0300)] 
liblib: pool_unref() should always set pool=NULL (alloconly pool)

set pool to NULL before return.

9 years agoSupport multiple recipient_delimiters
Lennart Weller [Tue, 22 Mar 2016 14:24:22 +0000 (10:24 -0400)] 
Support multiple recipient_delimiters

The recipient_delimiter is treated as multiple one-character delimiters
rather than one multi-character delimiter if more than one character is
supplied. The address is split on the first character in
recipient_delimiter found.

9 years agolib-http: Include information about number of request attempts and its timing in...
Timo Sirainen [Tue, 19 Apr 2016 13:55:02 +0000 (16:55 +0300)] 
lib-http: Include information about number of request attempts and its timing in response reason.

Because the reason is usually logged as part of the error string, this
causes all of the error messages to include the attempts count and how long
the requests took in total. This should make it easier to understand problems
in error logs.

http_client_request_set_preserve_exact_reason() can be used to disable
modifying the reason string. This may also apply to other reason
modifications that may be done in the future.

9 years agoconfigure: Move checks to separate m4 files
Aki Tuomi [Tue, 19 Apr 2016 11:51:15 +0000 (14:51 +0300)] 
configure: Move checks to separate m4 files

9 years agolib: Fix to previous istream-timeout commit
Timo Sirainen [Fri, 22 Apr 2016 17:31:02 +0000 (20:31 +0300)] 
lib: Fix to previous istream-timeout commit

The one commit I didn't bother putting through all the automated testing
stages and I of course forgot to even compile after the last change :(

9 years agolib: Improved istream-timeout error message.
Timo Sirainen [Fri, 22 Apr 2016 17:10:34 +0000 (20:10 +0300)] 
lib: Improved istream-timeout error message.

We're supposed to check that timeout isn't triggered after a long-running
code, but it's not perfect. So provide the actual timing information we
saw instead of the expected timeout.

9 years agocassandra: Added support for user and password settings.
Timo Sirainen [Sun, 17 Apr 2016 18:15:30 +0000 (21:15 +0300)] 
cassandra: Added support for user and password settings.

9 years agopush-notification: Small optimization - don't lookup uidvalidity for each message.
Timo Sirainen [Fri, 22 Apr 2016 13:00:36 +0000 (16:00 +0300)] 
push-notification: Small optimization - don't lookup uidvalidity for each message.

9 years agolib-ssl-iostream: Fixed reporting errors returned by OpenSSL.
Timo Sirainen [Thu, 21 Apr 2016 18:41:23 +0000 (21:41 +0300)] 
lib-ssl-iostream: Fixed reporting errors returned by OpenSSL.

We were always logging all errors as "Stacked error" and then returning
"Unknown error".

9 years agoimap: add variables to default imap_logout_format
Martti Rannanjärvi [Fri, 15 Apr 2016 10:14:16 +0000 (13:14 +0300)] 
imap: add variables to default imap_logout_format

9 years agolib-http, lib-mail, lib-storage: parent unrefs
Martti Rannanjärvi [Wed, 20 Apr 2016 11:51:22 +0000 (14:51 +0300)] 
lib-http, lib-mail, lib-storage: parent unrefs

Remove some unneccesary parent unrefs from i_stream_*_destroys. Don't
know too many or too few were removed.

9 years agolib: remove unneccesary i_stream_unrefs of parent
Martti Rannanjärvi [Tue, 19 Apr 2016 11:09:01 +0000 (14:09 +0300)] 
lib: remove unneccesary i_stream_unrefs of parent

9 years agolib: When istream is destroyed, it now always unrefs the parent istream if it exists.
Timo Sirainen [Tue, 19 Apr 2016 09:23:54 +0000 (12:23 +0300)] 
lib: When istream is destroyed, it now always unrefs the parent istream if it exists.

This way the implementations don't have to do it themselves in their
destroy() function. This change doesn't necessarily require changing the
existing code, because if the istream implementation already unrefs the
parent it gets set to NULL so the auto-unref won't be done.

9 years agodoveadm: \f\n only between pages in pager
Martti Rannanjärvi [Thu, 21 Apr 2016 11:22:10 +0000 (14:22 +0300)] 
doveadm: \f\n only between pages in pager

No more \f\n in the end.

9 years agofixup: fix task for `lib-dict: remove dict_append()'
Baofeng Wang [Thu, 21 Apr 2016 13:02:39 +0000 (16:02 +0300)] 
fixup: fix task for `lib-dict: remove dict_append()'

9 years agolib-dict: remove dict_append()
Baofeng Wang [Wed, 20 Apr 2016 14:24:51 +0000 (17:24 +0300)] 
lib-dict: remove dict_append()

Remove all *_dict_append and redis_append functions and corresponding
command from lib-dict.

9 years agozlib: Compiling fix to a1630a3b3 - don't return a void function
Timo Sirainen [Wed, 20 Apr 2016 16:34:05 +0000 (19:34 +0300)] 
zlib: Compiling fix to a1630a3b3 - don't return a void function

9 years agolazy-expunge: Fixed using a mailbox (instead of namespace) as lazy_expunge destination.
Timo Sirainen [Wed, 20 Apr 2016 14:10:17 +0000 (17:10 +0300)] 
lazy-expunge: Fixed using a mailbox (instead of namespace) as lazy_expunge destination.

The initial implementation in f2d7ae020bda762f78e8e639a69fb129230cbb7d was
completely broken.

9 years agolib-index: If opening a cache file fails, try again later.
Timo Sirainen [Tue, 19 Apr 2016 23:23:31 +0000 (02:23 +0300)] 
lib-index: If opening a cache file fails, try again later.

The previous code would never retry opening the cache file within the same
session.

9 years agolib-index: Fixed calling mail_cache_open_and_verify() on an already open cache.
Timo Sirainen [Tue, 19 Apr 2016 21:29:49 +0000 (00:29 +0300)] 
lib-index: Fixed calling mail_cache_open_and_verify() on an already open cache.

This was done at least by index_index_rebuild_init().

Either the currently open cache->fd was leaked, or if the cache file open()
failed we left the cache in an inconsistent state where cache->fd == -1, but
cache->hdr != NULL, so it caused MAIL_CACHE_IS_UNUSABLE() to also be TRUE. This
could have ended up in an assert:

Panic: file mail-index-lock.c: line 31 (mail_index_lock_fd): assertion failed: (MAIL_INDEX_IS_IN_MEMORY(index))

9 years agozlib plugin: Make sure we don't keep mail istream referenced after mail is closed.
Timo Sirainen [Tue, 19 Apr 2016 23:47:13 +0000 (02:47 +0300)] 
zlib plugin: Make sure we don't keep mail istream referenced after mail is closed.

9 years agoexpire-plugin: code cleanup
Baofeng [Mon, 18 Apr 2016 12:40:56 +0000 (15:40 +0300)] 
expire-plugin: code cleanup

expire_mail_namespaces_created() will check dict_uri after namespace
validation check.

9 years agolib-http: client: Added pure attribute to some of the request property functions.
Stephan Bosch [Sat, 16 Apr 2016 00:05:28 +0000 (02:05 +0200)] 
lib-http: client: Added pure attribute to some of the request property functions.

9 years agolib-http: client: Cleaned up headers and added some more documentation there.
Stephan Bosch [Sat, 16 Apr 2016 00:03:10 +0000 (02:03 +0200)] 
lib-http: client: Cleaned up headers and added some more documentation there.

9 years agolib-http: client: Implemented means to set request payload buffer rather than an...
Stephan Bosch [Fri, 15 Apr 2016 21:59:24 +0000 (23:59 +0200)] 
lib-http: client: Implemented means to set request payload buffer rather than an input stream.

This is not purely a convenience function: there have been bugs caused by allocating a data input stream from a datastack buffer.
With this function, the buffer is copied to the request pool, so that it is durably allocated while the request exists.
This prevents futher mishaps. The server already has an equivalent function for its response object.

9 years agolib: Fixed bits_required64() with 32bit systems.
Timo Sirainen [Tue, 19 Apr 2016 18:14:37 +0000 (21:14 +0300)] 
lib: Fixed bits_required64() with 32bit systems.

Broken by 84f697c5e30565823619abaaeb57164c789d4b66.

9 years agolazy-expunge: Allow lazy_expunge setting to point to a mailbox in any namespace.
Timo Sirainen [Thu, 14 Apr 2016 16:04:28 +0000 (19:04 +0300)] 
lazy-expunge: Allow lazy_expunge setting to point to a mailbox in any namespace.

This way we can use an existing namespace without having to create a new one
just for a single lazy_expunge mailbox.

9 years agolib: bits - GCC (and clang) provide bit-twiddle intrinsics, use them
Phil Carmody [Fri, 5 Feb 2016 13:57:30 +0000 (15:57 +0200)] 
lib: bits - GCC (and clang) provide bit-twiddle intrinsics, use them

Signed-off-by: Phil Carmody <phil@dovecot.fi>