]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
11 years agoAdded signature for changeset a3c27cec4112
Timo Sirainen [Fri, 6 Mar 2015 15:47:38 +0000 (17:47 +0200)] 
Added signature for changeset a3c27cec4112

11 years agoAdded tag 2.2.16.rc1 for changeset a3c27cec4112
Timo Sirainen [Fri, 6 Mar 2015 15:47:34 +0000 (17:47 +0200)] 
Added tag 2.2.16.rc1 for changeset a3c27cec4112

11 years agoReleased v2.2.16.rc1. 2.2.16.rc1
Timo Sirainen [Fri, 6 Mar 2015 15:47:34 +0000 (17:47 +0200)] 
Released v2.2.16.rc1.

11 years agolib-mail: Unit test fix to make static analyzer happier
Timo Sirainen [Fri, 6 Mar 2015 15:46:26 +0000 (17:46 +0200)] 
lib-mail: Unit test fix to make static analyzer happier

11 years agolmtp: Fixed lmtp_user_concurrency_limit=0 to actually mean unlimited
Timo Sirainen [Fri, 6 Mar 2015 14:37:07 +0000 (16:37 +0200)] 
lmtp: Fixed lmtp_user_concurrency_limit=0 to actually mean unlimited

11 years agolda/lmtp: Added a hardcoded LDA_SUBMISSION_TIMEOUT_SECS=30 timeout for SMTP client.
Timo Sirainen [Fri, 6 Mar 2015 14:33:23 +0000 (16:33 +0200)] 
lda/lmtp: Added a hardcoded LDA_SUBMISSION_TIMEOUT_SECS=30 timeout for SMTP client.
Maybe we could have a new setting if needed later on, but we've been working
pretty successfully without any timeout for a long time..

11 years agolib-lda: Added smtp_client_deinit_timeout() to give a session timeout.
Timo Sirainen [Fri, 6 Mar 2015 14:32:05 +0000 (16:32 +0200)] 
lib-lda: Added smtp_client_deinit_timeout() to give a session timeout.

11 years agolib-lda: lmtp client now supports checking for timeouts internally.
Timo Sirainen [Fri, 6 Mar 2015 14:30:55 +0000 (16:30 +0200)] 
lib-lda: lmtp client now supports checking for timeouts internally.
The default is still to have no timeout.

11 years agolib-fs: struct fs_stats comment updates
Timo Sirainen [Fri, 6 Mar 2015 09:55:45 +0000 (11:55 +0200)] 
lib-fs: struct fs_stats comment updates

11 years agolib-fs: Minor code cleanup: Merge read_counted & prefetch_counted into read_or_prefet...
Timo Sirainen [Fri, 6 Mar 2015 09:51:55 +0000 (11:51 +0200)] 
lib-fs: Minor code cleanup: Merge read_counted & prefetch_counted into read_or_prefetch_counted

11 years agolib-master: Added anvil_client_query_abort()
Timo Sirainen [Fri, 6 Mar 2015 00:23:56 +0000 (02:23 +0200)] 
lib-master: Added anvil_client_query_abort()

11 years agolmtp: Added lmtp_user_concurrency_limit setting.
Timo Sirainen [Fri, 6 Mar 2015 00:10:02 +0000 (02:10 +0200)] 
lmtp: Added lmtp_user_concurrency_limit setting.
This allows limiting the number of concurrent deliveries to a single user.
Useful in case one user is receiving a lot of mails and causing other
deliveries to be delayed. If the limit is reached, Dovecot returns temporary
failure error at DATA stage.

11 years agolmtp: Changed rcpt_to array to contain pointers to struct mail_recipient
Timo Sirainen [Fri, 6 Mar 2015 00:06:10 +0000 (02:06 +0200)] 
lmtp: Changed rcpt_to array to contain pointers to struct mail_recipient
This allow storing the pointers so they don't change.

11 years agopop3-login: Disconnect client on 3rd invalid command (not 11th).
Timo Sirainen [Thu, 5 Mar 2015 23:01:28 +0000 (01:01 +0200)] 
pop3-login: Disconnect client on 3rd invalid command (not 11th).

11 years agolib: Minor improvement to test-wildcard-match unit test.
Timo Sirainen [Thu, 5 Mar 2015 22:41:14 +0000 (00:41 +0200)] 
lib: Minor improvement to test-wildcard-match unit test.

11 years agoquota: If overquota-flag in userdb is wrong, execute a configured script.
Timo Sirainen [Thu, 5 Mar 2015 22:40:46 +0000 (00:40 +0200)] 
quota: If overquota-flag in userdb is wrong, execute a configured script.
The idea here is that a quota_warning script could set user's overquota-flag
to e.g. LDAP where MTA could reject mails already at RCPT TO stage. The
quota_warning scripts however have race conditions that are difficult (or
impossible) to fix, so sometimes the overquota-flag could become wrong and
might require manual intervention to fix it. This feature is supposed to
solve the issue by comparing the overquota-flag's status to the actual
current quota usage and execute a script to fix up the situation if needed.
This script is of course racy as well, but there's always the next login
that can fix the situation. Also it's pretty rare that user's quota is
jumping just around the limit.

The overquota-flag name in userdb must be "quota_over_flag". There are two
settings to configure what to do:

plugin {
  # If quota_over_flag=TRUE, the overquota-flag is enabled. Otherwise not.
  quota_over_flag_value = TRUE

  # Any non-empty value for quota_over_flag means user is over quota.
  # Wildcards can be used in a generic way, e.g. "*yes" or "*TRUE*"
  #quota_over_flag_value = *

  # Service script to execute if overquota-flag is wrong. Configured the
  # same as quota_warning scripts. The current quota_over_flag's value is
  # appended as the last parameter.
  quota_over_script = quota-warning mismatch %u
}

11 years agostats process/plugin redesign to be more modular.
Timo Sirainen [Thu, 5 Mar 2015 21:02:48 +0000 (23:02 +0200)] 
stats process/plugin redesign to be more modular.
The visible functionality doesn't actually change with this patch yet, but
it allows other plugins/services to add their own fields to stats process.
For example auth process could send auth success/failures or auth cache
hits/misses.

11 years agolib: Don't call ioloop context deactivate() if activate() hasn't been called yet.
Timo Sirainen [Thu, 5 Mar 2015 20:19:02 +0000 (22:19 +0200)] 
lib: Don't call ioloop context deactivate() if activate() hasn't been called yet.
This could have happened immediately after the callback was registered.

11 years agolib-fs: Track how many different operations have been done on the fs.
Timo Sirainen [Thu, 5 Mar 2015 20:18:04 +0000 (22:18 +0200)] 
lib-fs: Track how many different operations have been done on the fs.

11 years agolib-fs: Added fs_get_parent() and fs_get_driver()
Timo Sirainen [Thu, 5 Mar 2015 20:17:09 +0000 (22:17 +0200)] 
lib-fs: Added fs_get_parent() and fs_get_driver()
These can be used to iterate through fs wrappers and see what they are.

11 years agodoveadm backup: Try to avoid crashing on unexpected destination changes.
Timo Sirainen [Tue, 3 Mar 2015 17:48:23 +0000 (19:48 +0200)] 
doveadm backup: Try to avoid crashing on unexpected destination changes.
It's a bit difficult to reproduce this bug.. But at least this change should
change the assert, if nothing else.

11 years agodsync: Open mailboxes with readonly-flag whenever possible.
Timo Sirainen [Tue, 3 Mar 2015 17:34:59 +0000 (19:34 +0200)] 
dsync: Open mailboxes with readonly-flag whenever possible.
There shouldn't be any actual functional difference though.

11 years agodoveadm backup -R: Open the mailbox as readonly, so with imapc EXAMINE is used.
Timo Sirainen [Tue, 3 Mar 2015 17:32:28 +0000 (19:32 +0200)] 
doveadm backup -R: Open the mailbox as readonly, so with imapc EXAMINE is used.

11 years agolib-imap-client: Get capabilities again after reconnection to server.
Timo Sirainen [Tue, 3 Mar 2015 15:25:33 +0000 (17:25 +0200)] 
lib-imap-client: Get capabilities again after reconnection to server.
This is needed most importantly if we're not using plaintext authentication
to log in.

11 years agolib-fs: Added FS_ITER_FLAG_NOCACHE
Timo Sirainen [Mon, 2 Mar 2015 23:05:49 +0000 (01:05 +0200)] 
lib-fs: Added FS_ITER_FLAG_NOCACHE

11 years agorawlog: Removed double '.' chars from log filenames
Timo Sirainen [Mon, 2 Mar 2015 19:14:55 +0000 (21:14 +0200)] 
rawlog: Removed double '.' chars from log filenames

11 years agodict-redis: Added support for changing the Redis database.
Timo Sirainen [Mon, 2 Mar 2015 13:07:20 +0000 (15:07 +0200)] 
dict-redis: Added support for changing the Redis database.
Adding :db=N to the dict string specifies the database.

11 years agolib: Added assert to i_stream_create_seekable*() to have non-zero max_buffer_size.
Timo Sirainen [Mon, 2 Mar 2015 12:41:11 +0000 (14:41 +0200)] 
lib: Added assert to i_stream_create_seekable*() to have non-zero max_buffer_size.
This size is used for the created fd istream and it can't be zero.

11 years agolib: Give a name for istream-seekable's temporary fd istream.
Timo Sirainen [Mon, 2 Mar 2015 12:36:15 +0000 (14:36 +0200)] 
lib: Give a name for istream-seekable's temporary fd istream.

11 years agolib-storage: Allow up to 255 chars in a single mailbox hierarchy name.
Timo Sirainen [Sun, 1 Mar 2015 20:14:01 +0000 (22:14 +0200)] 
lib-storage: Allow up to 255 chars in a single mailbox hierarchy name.
This also reduces the max number of hierarchy levels, but 16 should still be
enough for normal uses.

11 years agofts-lucene: Fixed lookups from virtual mailboxes with over 32 physical mailboxes.
Timo Sirainen [Fri, 27 Feb 2015 12:29:10 +0000 (14:29 +0200)] 
fts-lucene: Fixed lookups from virtual mailboxes with over 32 physical mailboxes.

11 years agodsync: If we get disconnected from remoset server, exit with EX_TEMPFAIL
Timo Sirainen [Thu, 26 Feb 2015 18:24:16 +0000 (20:24 +0200)] 
dsync: If we get disconnected from remoset server, exit with EX_TEMPFAIL
Instead of 1000, which gets truncated to 232.

11 years agolib-index: Added an assert.
Timo Sirainen [Wed, 25 Feb 2015 16:58:50 +0000 (18:58 +0200)] 
lib-index: Added an assert.
It seems to be triggering later on, but not sure how it's happening.

11 years agodoveadm: If command going through multiple users fails with user-specific error,...
Timo Sirainen [Wed, 25 Feb 2015 13:06:29 +0000 (15:06 +0200)] 
doveadm: If command going through multiple users fails with user-specific error, don't stop.

11 years agolib-auth: auth_master_pass/user_lookup() now returns -2 for user-specific errors.
Timo Sirainen [Wed, 25 Feb 2015 13:05:22 +0000 (15:05 +0200)] 
lib-auth: auth_master_pass/user_lookup() now returns -2 for user-specific errors.
Compared to -1 which are about a more generic error with auth process
communication. If -2 is returned the lookup could still succeed for another
user.

11 years agoexpire plugin: If expire_cache=yes, cache the dict db value in dovecot.index file.
Timo Sirainen [Tue, 24 Feb 2015 16:42:43 +0000 (18:42 +0200)] 
expire plugin: If expire_cache=yes, cache the dict db value in dovecot.index file.
This avoids all of the dict lookups when mails are being saved to a mailbox
that is tracked for expiring. The only downside is that if the dict is
externally modified, the changes won't reflect the cached value. This isn't
normally a problem (except maybe in initial testing stages).

11 years agodsync: Debug logging was attempting to read already freed memory.
Timo Sirainen [Sat, 21 Feb 2015 09:40:40 +0000 (11:40 +0200)] 
dsync: Debug logging was attempting to read already freed memory.

11 years agoLAYOUT=index: Reversed d977a746819d - use storage's list_index_*() callbacks after...
Timo Sirainen [Fri, 20 Feb 2015 12:04:28 +0000 (14:04 +0200)] 
LAYOUT=index: Reversed d977a746819d - use storage's list_index_*() callbacks after all.
Just because we have all the mailbox information in the mailbox list index
doesn't mean that we necessarily trust the folder mail counts and such to be
correct. Setting mailbox_list_index_very_dirty_syncs=yes pretty much reverts
to the earlier behavior.

11 years agodsync: Added more debug output for mailbox renaming.
Timo Sirainen [Fri, 20 Feb 2015 10:56:43 +0000 (12:56 +0200)] 
dsync: Added more debug output for mailbox renaming.

11 years agolib-storage: Index rebuilding (for [sm]dbox) caused it to reset dovecot.index.cache...
Timo Sirainen [Thu, 19 Feb 2015 17:31:49 +0000 (19:31 +0200)] 
lib-storage: Index rebuilding (for [sm]dbox) caused it to reset dovecot.index.cache file
Although in some situations this might be wanted, usually it's not needed
and simply makes the performance worse. If caching is explicitly unwanted
the dovecot.index.cache file can be deleted manually for now. Perhaps there
could be a separate doveadm force-resync parameter to do it as well.

11 years agoMakefile: Added run-test.sh to be cleaned by distclean
Timo Sirainen [Thu, 19 Feb 2015 11:45:23 +0000 (13:45 +0200)] 
Makefile: Added run-test.sh to be cleaned by distclean

11 years agolib: Make static analyzer happier
Timo Sirainen [Thu, 19 Feb 2015 11:05:49 +0000 (13:05 +0200)] 
lib: Make static analyzer happier

11 years agolib: Another test_assert() -> i_assert() change to avoid static analyzer warnings.
Timo Sirainen [Thu, 19 Feb 2015 11:05:31 +0000 (13:05 +0200)] 
lib: Another test_assert() -> i_assert() change to avoid static analyzer warnings.

11 years agolib: Replaced two test_assert()s checking for NULLs with i_assert()s
Timo Sirainen [Thu, 19 Feb 2015 11:03:46 +0000 (13:03 +0200)] 
lib: Replaced two test_assert()s checking for NULLs with i_assert()s
These can never happen anyway, and keeping them as test_assert()s cause
static analyzer to give warnings.

11 years agofs-posix: Removed the FS_PROPERTY_DIRECTORIES after all.
Timo Sirainen [Thu, 19 Feb 2015 10:00:11 +0000 (12:00 +0200)] 
fs-posix: Removed the FS_PROPERTY_DIRECTORIES after all.
We could have kept it if we removed the auto-rmdir()-parents feature in
fs_delete(), but SIS code already somewhat relies on it so it's better not
to change it for now at least.

The downside here though is that directories are rmdir()ed only if
fs_settings.root_dir is set. So for example "doveadm fs delete -R" doesn't
ever rmdir() any directories. But that's probably not a real problem.

11 years agoMakefile: Removed run-test.sh from EXTRA_DIST since it's now generated by configure
Timo Sirainen [Thu, 19 Feb 2015 08:24:09 +0000 (10:24 +0200)] 
Makefile: Removed run-test.sh from EXTRA_DIST since it's now generated by configure

11 years agolib-fs: fs-posix needs to return FS_PROPERTY_DIRECTORIES
Timo Sirainen [Tue, 17 Feb 2015 21:13:22 +0000 (23:13 +0200)] 
lib-fs: fs-posix needs to return FS_PROPERTY_DIRECTORIES

11 years agodoveadm fs delete -R: Delete the root directory also.
Timo Sirainen [Tue, 17 Feb 2015 21:13:00 +0000 (23:13 +0200)] 
doveadm fs delete -R: Delete the root directory also.

11 years agodoveadm fs delete: When recursively deleting files, delete directories with "/" prefix.
Timo Sirainen [Tue, 17 Feb 2015 21:07:00 +0000 (23:07 +0200)] 
doveadm fs delete: When recursively deleting files, delete directories with "/" prefix.
Some backends require this to properly delete the file. Those that don't can
ignore it easily.

11 years agodoveadm fetch: Removed unused code.
Timo Sirainen [Tue, 17 Feb 2015 20:06:14 +0000 (22:06 +0200)] 
doveadm fetch: Removed unused code.

11 years agolib-fs: Added FS_METADATA_OBJECTID macro.
Timo Sirainen [Tue, 17 Feb 2015 18:43:57 +0000 (20:43 +0200)] 
lib-fs: Added FS_METADATA_OBJECTID macro.

11 years agolib-fs: Added flag for iteration returning object IDs.
Timo Sirainen [Tue, 17 Feb 2015 18:42:59 +0000 (20:42 +0200)] 
lib-fs: Added flag for iteration returning object IDs.
The flag is only allowed to be used if FS_PROPERTY_OBJECTIDS is set
(to avoid writing extra code for backends that don't support this).

11 years agoimapc: Fixed STATUS_FIRST_RECENT_UID to return the (mostly) correct UID.
Timo Sirainen [Tue, 17 Feb 2015 14:02:49 +0000 (16:02 +0200)] 
imapc: Fixed STATUS_FIRST_RECENT_UID to return the (mostly) correct UID.

11 years agodoveadm: Added "save" command to directly save mail to specified mailbox.
Timo Sirainen [Sun, 15 Feb 2015 08:11:01 +0000 (10:11 +0200)] 
doveadm: Added "save" command to directly save mail to specified mailbox.
The mail is read from stdin.

11 years agodoveadm: Added support for mail commands to read an input stream (from stdin)
Timo Sirainen [Sun, 15 Feb 2015 08:09:19 +0000 (10:09 +0200)] 
doveadm: Added support for mail commands to read an input stream (from stdin)
This is done by calling doveadm_mail_get_input() from the command's init()
function. Currently it reads the entire input into a seekable istream with
hardcoded 5 minute timeout. The input stream sending works also through
doveadm proxying.

This could probably be used by dsync at some point to support proxying over
doveadm proxies, but that would require some more work. Especially a flag
for commands to specify that they allow non-blocking input streams.

11 years agolib-mail: ostream-dot API changes
Timo Sirainen [Sun, 15 Feb 2015 08:03:10 +0000 (10:03 +0200)] 
lib-mail: ostream-dot API changes
The dot-line sending is now done when o_stream_flush() is called. This
should be used instead of relying on close() doing it, because it still
needs to write a few bytes and there are no guarantees that the parent
stream allows sending them.

Also added force_extra_crlf parameter, which specifies whether CRLF should
always be written before the dot-line, even when it already contained CRLF.
This is useful if the input is read with
i_stream_create_dot(send_last_lf=FALSE), since it allows sending a stream
that doesn't have to end with LF.

11 years agolib-mail: istream-dot should have immediately returned error if dot-line was missing...
Timo Sirainen [Sun, 15 Feb 2015 07:55:56 +0000 (09:55 +0200)] 
lib-mail: istream-dot should have immediately returned error if dot-line was missing at EOF.

11 years agolib: If i_stream_read() sets stream_errno even if it didn't return -1, make sure...
Timo Sirainen [Sun, 15 Feb 2015 07:55:05 +0000 (09:55 +0200)] 
lib: If i_stream_read() sets stream_errno even if it didn't return -1, make sure we set eof=TRUE

11 years agolib: If istream-seekable's parent stream returns error, make sure we set eof=TRUE
Timo Sirainen [Sun, 15 Feb 2015 07:54:45 +0000 (09:54 +0200)] 
lib: If istream-seekable's parent stream returns error, make sure we set eof=TRUE

11 years agolib-imap-client: Improved error message a bit if server disconnects.
Timo Sirainen [Sat, 14 Feb 2015 07:47:41 +0000 (09:47 +0200)] 
lib-imap-client: Improved error message a bit if server disconnects.

11 years agoconfigure: Removed unnecessary lines left by the previous commit.
Timo Sirainen [Fri, 13 Feb 2015 14:39:30 +0000 (16:39 +0200)] 
configure: Removed unnecessary lines left by the previous commit.

11 years agoLink all libstorage.la dependencies into the library itself instead.
Timo Sirainen [Fri, 13 Feb 2015 14:38:35 +0000 (16:38 +0200)] 
Link all libstorage.la dependencies into the library itself instead.
Instead of keeping a lot of different libraries in LIBDOVECOT_STORAGE, which
have circular dependencies and may cause linking issues.

11 years agodovecot-config: Added DOVECOT_INSTALLED parameter.
Timo Sirainen [Fri, 13 Feb 2015 12:35:54 +0000 (14:35 +0200)] 
dovecot-config: Added DOVECOT_INSTALLED parameter.
Also added dovecot_installed_moduledir to dovecot.m4

These can be used by external plugins to access some headers and libraries
that don't already have existing DOVECOT_* parameters in dovecot-config.

11 years agodovecot-config: Added LIBDOVECOT_NOTIFY_INCLUDE
Timo Sirainen [Thu, 12 Feb 2015 12:38:18 +0000 (14:38 +0200)] 
dovecot-config: Added LIBDOVECOT_NOTIFY_INCLUDE

11 years agodovecot-config: Added lib-storage/index/imapc also to LIBDOVECOT_IMAPC_INCLUDE
Timo Sirainen [Thu, 12 Feb 2015 11:29:23 +0000 (13:29 +0200)] 
dovecot-config: Added lib-storage/index/imapc also to LIBDOVECOT_IMAPC_INCLUDE

11 years agodovecot-config: Added LIBDOVECOT_IMAPC_INCLUDE and LIBDOVECOT_FTS_INCLUDE
Timo Sirainen [Thu, 12 Feb 2015 10:42:39 +0000 (12:42 +0200)] 
dovecot-config: Added LIBDOVECOT_IMAPC_INCLUDE and LIBDOVECOT_FTS_INCLUDE

11 years agofts: Fixed memory leak in HTML parsing
Timo Sirainen [Thu, 12 Feb 2015 08:49:28 +0000 (10:49 +0200)] 
fts: Fixed memory leak in HTML parsing

11 years agofts: Fixed error printing if fts wasn't enabled for user's default namespace.
Timo Sirainen [Wed, 11 Feb 2015 09:56:59 +0000 (11:56 +0200)] 
fts: Fixed error printing if fts wasn't enabled for user's default namespace.

11 years agodovecot-config: Added lib-sasl path into LIBDOVECOT_INCLUDE.
Timo Sirainen [Tue, 10 Feb 2015 15:29:31 +0000 (17:29 +0200)] 
dovecot-config: Added lib-sasl path into LIBDOVECOT_INCLUDE.

11 years agodovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen [Tue, 10 Feb 2015 11:12:42 +0000 (13:12 +0200)] 
dovecot.m4: External plugins can now more easily run their tests via Valgrind.
DC_DOVECOT macro automatically adds RUN_TEST variable to Makefiles, which
can be used to call any test programs. If valgrind exists, the tests are run
through it. This is done by writing run-test.sh to the build directory, so
the original run-test.sh in hg is no longer needed.

11 years agolib: istream create helpers for common cases
Phil Carmody [Tue, 10 Feb 2015 10:31:12 +0000 (12:31 +0200)] 
lib: istream create helpers for common cases
Several clients want to create streams from buffer_t and
string_t, we may as well make it easy for them

Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agodsync: Don't try to rename namespace prefixes.
Timo Sirainen [Mon, 9 Feb 2015 19:58:13 +0000 (21:58 +0200)] 
dsync: Don't try to rename namespace prefixes.

11 years agodsync: Fixed assert-crash when the two mailbox trees differed only by their directory...
Timo Sirainen [Mon, 9 Feb 2015 19:45:04 +0000 (21:45 +0200)] 
dsync: Fixed assert-crash when the two mailbox trees differed only by their directory names.

11 years agodoveadm copy/move/import: Delay initializing source user until run()
Timo Sirainen [Mon, 9 Feb 2015 13:38:42 +0000 (15:38 +0200)] 
doveadm copy/move/import: Delay initializing source user until run()
This fixes using them with doveadm proxying.

11 years agodoveadm: Added comments to struct doveadm_mail_cmd_vfuncs
Timo Sirainen [Mon, 9 Feb 2015 13:21:55 +0000 (15:21 +0200)] 
doveadm: Added comments to struct doveadm_mail_cmd_vfuncs

11 years agodoveadm: Reverted changeset 3b89f2f4ffb3, which avoided calling init() for proxied...
Timo Sirainen [Mon, 9 Feb 2015 11:03:47 +0000 (13:03 +0200)] 
doveadm: Reverted changeset 3b89f2f4ffb3, which avoided calling init() for proxied commands.
The init() is required for all commands that print something, because
otherwise the doveadm_print_header*() isn't called and the commands crash.

The reason for the original change was that some commands' init() attempted
to do too much work on the proxy, which ended up failing. So looks like the
proper fix is to just remove this kind of extra work from init().

11 years agolog: If too much logging data is sent, show it in process title.
Timo Sirainen [Mon, 9 Feb 2015 02:03:12 +0000 (04:03 +0200)] 
log: If too much logging data is sent, show it in process title.

11 years agolog: Log a warning if some connection is logging faster than we can write.
Timo Sirainen [Sat, 7 Feb 2015 16:39:05 +0000 (18:39 +0200)] 
log: Log a warning if some connection is logging faster than we can write.

11 years agolog: Don't spend more than 100 msecs at a time logging one connection.
Timo Sirainen [Sat, 7 Feb 2015 16:23:58 +0000 (18:23 +0200)] 
log: Don't spend more than 100 msecs at a time logging one connection.

11 years agolog: Small cleanup: Include log connection prefix when logging read() errors.
Timo Sirainen [Sat, 7 Feb 2015 16:17:59 +0000 (18:17 +0200)] 
log: Small cleanup: Include log connection prefix when logging read() errors.

11 years agolog: Minor cleanup: Update ioloop_timeval whenever reading input from log client.
Timo Sirainen [Sat, 7 Feb 2015 16:14:53 +0000 (18:14 +0200)] 
log: Minor cleanup: Update ioloop_timeval whenever reading input from log client.

11 years agolib: Accidentally committed a nonexistent function call in previous commit.
Timo Sirainen [Fri, 6 Feb 2015 17:03:20 +0000 (19:03 +0200)] 
lib: Accidentally committed a nonexistent function call in previous commit.

11 years agolib-storage: Use module_dir_try_load_missing() to load user plugins.
Timo Sirainen [Fri, 6 Feb 2015 16:18:19 +0000 (18:18 +0200)] 
lib-storage: Use module_dir_try_load_missing() to load user plugins.

11 years agolib: Added module_dir_try_load_missing() that returns error instead of logging it.
Timo Sirainen [Fri, 6 Feb 2015 16:18:10 +0000 (18:18 +0200)] 
lib: Added module_dir_try_load_missing() that returns error instead of logging it.
Also module_names now can be given for it without i_fatal() being called.

11 years agolib-storage: Previous log prefix changing code started accessing freed memory.
Timo Sirainen [Fri, 6 Feb 2015 16:17:10 +0000 (18:17 +0200)] 
lib-storage: Previous log prefix changing code started accessing freed memory.

11 years agolib-storage: Set the user log prefix earlier when initializing user.
Timo Sirainen [Fri, 6 Feb 2015 15:06:36 +0000 (17:06 +0200)] 
lib-storage: Set the user log prefix earlier when initializing user.
So the full prefix with session and other useful information is included in
the log message as early as possible. Some fatal/panic errors wouldn't even
have shown the username.

11 years agolib: Added i_get_failure_prefix()
Timo Sirainen [Fri, 6 Feb 2015 15:04:52 +0000 (17:04 +0200)] 
lib: Added i_get_failure_prefix()

11 years agodsync: Fixed crash in earlier patch if node didn't have a namespace.
Timo Sirainen [Thu, 5 Feb 2015 17:40:25 +0000 (19:40 +0200)] 
dsync: Fixed crash in earlier patch if node didn't have a namespace.
This shouldn't have happened except in test-dsync-mailbox-tree-sync, but
easier and safer to fix it here.

11 years agodsync: Added assert to make sure namespace prefix isn't attempted to be renamed.
Timo Sirainen [Thu, 5 Feb 2015 17:36:29 +0000 (19:36 +0200)] 
dsync: Added assert to make sure namespace prefix isn't attempted to be renamed.
This can happen, I'm just not sure how exactly.. The previous behavior
caused assert-crashes also, this change just makes it happen earlier.

11 years agodsync: Don't assert-crash in configs where INBOX doesn't have a parent namespace.
Timo Sirainen [Thu, 5 Feb 2015 17:20:17 +0000 (19:20 +0200)] 
dsync: Don't assert-crash in configs where INBOX doesn't have a parent namespace.
The inbox=yes namespace of course exists, but if there is no prefix="" or
prefix=INBOX/ namespace, then INBOX doesn't clearly belong to any namespace.

11 years agodsync: Make sure when fixing mailbox names we don't try to change the namespace prefix.
Timo Sirainen [Tue, 3 Feb 2015 18:27:49 +0000 (20:27 +0200)] 
dsync: Make sure when fixing mailbox names we don't try to change the namespace prefix.
Although in normal installations this it wouldn't have happened in any case.

11 years agolib-storage: Avoid assert-crashing on mailbox_verify_*_name() with invalid namespace...
Timo Sirainen [Tue, 3 Feb 2015 18:23:52 +0000 (20:23 +0200)] 
lib-storage: Avoid assert-crashing on mailbox_verify_*_name() with invalid namespace prefix.

11 years agoimapc: Fixed modseq search for previous imapc_features=search change
Timo Sirainen [Tue, 3 Feb 2015 16:47:54 +0000 (18:47 +0200)] 
imapc: Fixed modseq search for previous imapc_features=search change

11 years agoimapc: Added imapc_features=search support for sending SEARCH commands.
Timo Sirainen [Tue, 3 Feb 2015 16:33:12 +0000 (18:33 +0200)] 
imapc: Added imapc_features=search support for sending SEARCH commands.
Currently requires the remote server to support ESEARCH (but this would be
easy to avoid). This is only minimally tested for now, so bugs may exist
(especially related to sub-queries).

11 years agolib-imap-client: Implemented support for GMail [THROTTLED] resp-text-code.
Timo Sirainen [Tue, 3 Feb 2015 08:15:38 +0000 (10:15 +0200)] 
lib-imap-client: Implemented support for GMail [THROTTLED] resp-text-code.
If we receive it, start throttling future commands by waiting exponentially
longer until we no longer receive [THROTTLED]. Max wait time is currently
16 seconds.

11 years agolib-http: client: Fixed double unref of request when error occurs during http_client_...
Stephan Bosch [Mon, 2 Feb 2015 21:48:30 +0000 (23:48 +0200)] 
lib-http: client: Fixed double unref of request when error occurs during http_client_request_try_retry().
Much like when the request is first submitted, any errors that occur while attempting a retry from within the callback are now delayed in a zero timer.

11 years agolib: array - test count/isempty/nonepty
Phil Carmody [Mon, 2 Feb 2015 08:26:44 +0000 (10:26 +0200)] 
lib: array - test count/isempty/nonepty
Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agolib: array - two helpers to avoid wasteful array_count
Phil Carmody [Mon, 2 Feb 2015 08:24:42 +0000 (10:24 +0200)] 
lib: array - two helpers to avoid wasteful array_count
There's no need to dereference array->element_size and
perform a division when all you care about is the boolean
isempty/nonempty predicate:

$ git grep 'array_count(.*) > 0' | wc -l
77
$ git grep 'array_count(.*) == 0' | wc -l
95

Changing 6 of them has the following impact on the code:

$ size src/lib-imap-client/imapc-connection.o
   text    data     bss     dec     hex filename
  20879       0       4   20883    5193 src/lib-imap-client/imapc-connection.o
$ size src/lib-imap-client/imapc-connection.o
   text    data     bss     dec     hex filename
  20796       0       4   20800    5140 src/lib-imap-client/imapc-connection.o

Signed-off-by: Phil Carmody <phil@dovecot.fi>
11 years agoreplicator: Previous "last successful sync" timestamp change wrote data wrong to...
Timo Sirainen [Fri, 30 Jan 2015 23:10:56 +0000 (01:10 +0200)] 
replicator: Previous "last successful sync" timestamp change wrote data wrong to replicator.db
Patch by Matthew Via / Rackspace

11 years agoimap: If GETMETADATA fails for some mailbox, don't send the error message mixed in...
Timo Sirainen [Fri, 30 Jan 2015 10:29:25 +0000 (12:29 +0200)] 
imap: If GETMETADATA fails for some mailbox, don't send the error message mixed in the METADATA reply line.