]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib: Small istream-concat code cleanup in preperation for next change
Timo Sirainen [Tue, 26 Jan 2016 13:17:34 +0000 (15:17 +0200)] 
lib: Small istream-concat code cleanup in preperation for next change

No actual changes, just moved some code into i_stream_concat_skip().

9 years agolib: Improved test-istream-seekable unit test to check for parent stream's offset...
Timo Sirainen [Tue, 26 Jan 2016 12:19:23 +0000 (14:19 +0200)] 
lib: Improved test-istream-seekable unit test to check for parent stream's offset at the end

9 years agolib: When closing istream-chain, make sure parent stream is seeked to correct offset.
Timo Sirainen [Tue, 26 Jan 2016 11:51:47 +0000 (13:51 +0200)] 
lib: When closing istream-chain, make sure parent stream is seeked to correct offset.

We were only seeking it earlier if it ended at EOF.

9 years agopop3-migration: Add calculated header hashes to local cache.
Timo Sirainen [Mon, 25 Jan 2016 20:34:24 +0000 (22:34 +0200)] 
pop3-migration: Add calculated header hashes to local cache.

This allows faster resuming on failures if local pop3c indexes are used.

9 years agopop3c: Preserve local cache even when server reorders messages.
Timo Sirainen [Mon, 25 Jan 2016 20:33:29 +0000 (22:33 +0200)] 
pop3c: Preserve local cache even when server reorders messages.

9 years agopop3c: Avoid unnecessarily email deletions from local index when mails have been...
Timo Sirainen [Mon, 25 Jan 2016 19:57:35 +0000 (21:57 +0200)] 
pop3c: Avoid unnecessarily email deletions from local index when mails have been deleted from remote POP3.

9 years agoimap: Finish all commands before starting IDLE.
Timo Sirainen [Mon, 25 Jan 2016 15:37:02 +0000 (17:37 +0200)] 
imap: Finish all commands before starting IDLE.

We don't want to send tagged command replies only after the DONE. Also this
fixes assert-crash:

Panic: file imap-client.c: line 852 (client_check_command_hangs): assertion
failed: (!have_wait_unfinished || unfinished_count > 0)

Which could be reproduced by:

printf "0 SELECT INBOX\n1 NOOP\n2 IDLE\n"; read; printf "DONE\n"; read) | ./imap

9 years agoimapc: Prefetching shouldn't send FETCH requests for headers that are already cached.
Timo Sirainen [Mon, 25 Jan 2016 08:26:17 +0000 (10:26 +0200)] 
imapc: Prefetching shouldn't send FETCH requests for headers that are already cached.

9 years agoauth: Add any %variables in passdb/userdb { default_fields } to cache key.
Timo Sirainen [Sun, 24 Jan 2016 20:12:30 +0000 (22:12 +0200)] 
auth: Add any %variables in passdb/userdb { default_fields } to cache key.

9 years agoauth: Avoid unnecessary work if passdb/userdb { override_fields, default_fields ...
Timo Sirainen [Sun, 24 Jan 2016 20:10:01 +0000 (22:10 +0200)] 
auth: Avoid unnecessary work if passdb/userdb { override_fields, default_fields } aren't set.

9 years ago.gitignore: Added *.orig and *.rej
Timo Sirainen [Sun, 24 Jan 2016 20:07:55 +0000 (22:07 +0200)] 
.gitignore: Added *.orig and *.rej

They are created often enough to become annoying.

9 years agoconfig: Fixed '\' line continuation to work again.
Timo Sirainen [Sun, 24 Jan 2016 20:06:30 +0000 (22:06 +0200)] 
config: Fixed '\' line continuation to work again.

This had been broken for many years.

9 years agoimapc: If command times out, reconnect and retry if possible.
Timo Sirainen [Sun, 24 Jan 2016 18:07:58 +0000 (20:07 +0200)] 
imapc: If command times out, reconnect and retry if possible.

9 years agopop3-migration: Fix to 2f19f8 - Don't convert LF also to '?' in header hashes.
Timo Sirainen [Sun, 24 Jan 2016 17:54:51 +0000 (19:54 +0200)] 
pop3-migration: Fix to 2f19f8 - Don't convert LF also to '?' in header hashes.

9 years agopop3-migration: Filter out headers with invalid names.
Timo Sirainen [Sun, 24 Jan 2016 17:34:21 +0000 (19:34 +0200)] 
pop3-migration: Filter out headers with invalid names.

9 years agopop3-migration: Convert all non-ASCII in headers to '?'
Timo Sirainen [Sun, 24 Jan 2016 17:23:59 +0000 (19:23 +0200)] 
pop3-migration: Convert all non-ASCII in headers to '?'

9 years agoimapc: Added imapc_features=fetch-fix-broken-mails
Timo Sirainen [Sun, 24 Jan 2016 16:15:53 +0000 (18:15 +0200)] 
imapc: Added imapc_features=fetch-fix-broken-mails

This allows ignoring a missing FETCH reply. It shouldn't be used normally,
but if there's a mail that the IMAP server simply won't serve, this can be
used to finish dsync successfully.

9 years agoimapc: Added imapc_cmd_timeout setting to control the command wait timeouts.
Timo Sirainen [Sun, 24 Jan 2016 15:41:01 +0000 (17:41 +0200)] 
imapc: Added imapc_cmd_timeout setting to control the command wait timeouts.

9 years agoimapc: Added imapc_features=fetch-msn-workarounds
Timo Sirainen [Sun, 24 Jan 2016 15:39:28 +0000 (17:39 +0200)] 
imapc: Added imapc_features=fetch-msn-workarounds

This can be used to work around broken servers that send invalid MSNs. This
avoids errors like:

imapc: Mailbox 'INBOX' state corrupted: FETCH UID mismatch (78976 != 82589)

9 years agopop3-migration: If we matched all the IMAP (but not all POP3) messages, log about it.
Timo Sirainen [Sun, 24 Jan 2016 15:38:39 +0000 (17:38 +0200)] 
pop3-migration: If we matched all the IMAP (but not all POP3) messages, log about it.

9 years agopop3-migration: Ignore X-Yahoo-Newman-Property: header
Timo Sirainen [Sun, 24 Jan 2016 15:13:04 +0000 (17:13 +0200)] 
pop3-migration: Ignore X-Yahoo-Newman-Property: header

This exists only for Yahoo IMAP mails, but not for Yahoo POP3 mails.

9 years agopop3-migration: When logging the first missing POP3 mail, it logged a wrong mail
Timo Sirainen [Sun, 24 Jan 2016 14:55:13 +0000 (16:55 +0200)] 
pop3-migration: When logging the first missing POP3 mail, it logged a wrong mail

9 years agopop3-migration: When failing because some messages couldn't be matched, show the...
Timo Sirainen [Sun, 24 Jan 2016 14:28:29 +0000 (16:28 +0200)] 
pop3-migration: When failing because some messages couldn't be matched, show the first message's number and UIDL

This was already being done for the warning message when
pop3_migration_ignore_missing_uidls was set, but not for the error message
when it wasn't set.

9 years agopop3-migration: Added pop3_migration_skip_size_check setting
Timo Sirainen [Sun, 24 Jan 2016 14:27:21 +0000 (16:27 +0200)] 
pop3-migration: Added pop3_migration_skip_size_check setting

If we know that we're not going to be able to match any messages by sizes,
we might as well not ask for the messages' sizes. This is useful at least
with Yahoo.

9 years agopop3-migration: Ignore Return-Path: header when matching UIDLs by header hashes
Timo Sirainen [Sun, 24 Jan 2016 14:25:52 +0000 (16:25 +0200)] 
pop3-migration: Ignore Return-Path: header when matching UIDLs by header hashes

This fixes matching between Yahoo IMAP and Yahoo POP3

9 years agoauth: Apply override_fields to userdb also when continuing to the next userdb.
Timo Sirainen [Sat, 23 Jan 2016 13:48:14 +0000 (15:48 +0200)] 
auth: Apply override_fields to userdb also when continuing to the next userdb.

9 years agoauth: If userdb result was found from cache, its result_* rules were ignored.
Timo Sirainen [Sat, 23 Jan 2016 13:12:37 +0000 (15:12 +0200)] 
auth: If userdb result was found from cache, its result_* rules were ignored.

9 years agoldap auth: %variables in pass/user_attrs are now included in auth cache key.
Timo Sirainen [Sat, 23 Jan 2016 12:05:19 +0000 (14:05 +0200)] 
ldap auth: %variables in pass/user_attrs are now included in auth cache key.

This makes sure that the result won't be cached too aggressively, for example
if %{lport} or %{rip} was used as a field's value. Although each of these
fields just makes the cache less effective, so it's a good idea to avoid
variables entirely in the pass/user_attrs. An alternative is to use
passdb/userdb { override_fields }

9 years agoauth: Apply passdb/userdb { override_fields } only after caching
Timo Sirainen [Sat, 23 Jan 2016 11:57:54 +0000 (13:57 +0200)] 
auth: Apply passdb/userdb { override_fields } only after caching

Now they're not be unnecessarily saved to cache to waste memory. More
importantly they will always override the cached fields, which is required
for %variables to work.

9 years agodoveadm: Changed most print formatters to write to ostream.
Timo Sirainen [Fri, 22 Jan 2016 17:06:59 +0000 (19:06 +0200)] 
doveadm: Changed most print formatters to write to ostream.

This allows all the formatters to be used when sending replies to the
upcoming doveadm HTTP server responses.

The "table" formatter wasn't modified, because it writes to both stdout and
stderr.

9 years agodirector: "Host is being updated before previous update had finished" logs now details.
Timo Sirainen [Fri, 22 Jan 2016 17:08:11 +0000 (19:08 +0200)] 
director: "Host is being updated before previous update had finished" logs now details.

9 years agodoveadm: Add plugins support for doveadm pw
Alin Dobre [Fri, 22 Jan 2016 15:15:03 +0000 (15:15 +0000)] 
doveadm: Add plugins support for doveadm pw

This simply tries to load all the auth plugins. The ones that aren't
password scheme plugins will most likely just fail. Hopefully this will
work fine so we don't need to require any specific naming rules for the
plugins.

Signed-off-by: Alin Dobre <alin@dovecot.fi>
9 years agofts-solr: If Solr lookup returns missing or invalid UID, fail the search.
Timo Sirainen [Fri, 22 Jan 2016 15:14:37 +0000 (17:14 +0200)] 
fts-solr: If Solr lookup returns missing or invalid UID, fail the search.

We were previously logging the error but still returning success.

9 years agodoveadm: Make sure all mail storage hooks are freed at deinit.
Timo Sirainen [Fri, 22 Jan 2016 14:48:53 +0000 (16:48 +0200)] 
doveadm: Make sure all mail storage hooks are freed at deinit.

9 years agomaster: Do not close stdout if going foreground
Aki Tuomi [Mon, 18 Jan 2016 13:50:23 +0000 (15:50 +0200)] 
master: Do not close stdout if going foreground

This lets one to use /dev/stdout for logging. Mainly
useful for testing purposes where we can generate
log output to stdout and use tee to write it to a
file for later examination.

9 years agolib-auth: Error message typofix
Timo Sirainen [Thu, 21 Jan 2016 11:59:31 +0000 (13:59 +0200)] 
lib-auth: Error message typofix

9 years agoMakefile: Fixed ChangeLog generation with older git versions that don't support ...
Timo Sirainen [Wed, 20 Jan 2016 17:35:06 +0000 (19:35 +0200)] 
Makefile: Fixed ChangeLog generation with older git versions that don't support --since

Changed the oldest changeset to be the v2.0.0 release commit.

9 years agoimap, pop3, lmtp: Enable MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE
Timo Sirainen [Wed, 20 Jan 2016 11:30:43 +0000 (13:30 +0200)] 
imap, pop3, lmtp: Enable MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE

9 years agolib-storage: Enable autoexpunge only when MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE is...
Timo Sirainen [Wed, 20 Jan 2016 11:30:34 +0000 (13:30 +0200)] 
lib-storage: Enable autoexpunge only when MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE is set.

9 years agolib-storage: Fixed looking up MAILBOX_METADATA_FIRST_SAVE_DATE from mailbox list...
Timo Sirainen [Wed, 20 Jan 2016 11:22:15 +0000 (13:22 +0200)] 
lib-storage: Fixed looking up MAILBOX_METADATA_FIRST_SAVE_DATE from mailbox list index.

If the mailbox was cached as empty, we didn't check if it had since received
new messages. This caused the first-save-date to be returned as nonexistent,
which caused autoexpunging to not always work.

9 years agolib-storage: Fixed updating first-saved-uid to mailbox list index when first mails...
Timo Sirainen [Wed, 20 Jan 2016 11:13:47 +0000 (13:13 +0200)] 
lib-storage: Fixed updating first-saved-uid to mailbox list index when first mails were just expunged.

9 years agolib-storage: Don't set internal error to storage when there's nothing to sync.
Timo Sirainen [Wed, 20 Jan 2016 10:55:57 +0000 (12:55 +0200)] 
lib-storage: Don't set internal error to storage when there's nothing to sync.

This may also wrongly overwrite an existing error.

9 years agoimap-login: If LOGINDISABLED capability is advertised in banner, don't try to LOGIN...
Timo Sirainen [Tue, 19 Jan 2016 21:47:08 +0000 (23:47 +0200)] 
imap-login: If LOGINDISABLED capability is advertised in banner, don't try to LOGIN without SSL/TLS.

This avoids accidentally sending the password in plaintext. Also the server
should fail the LOGIN in any case.

9 years agolib: Don't crash if getenv() is called after process_title_deinit() with Linux/OSX...
Timo Sirainen [Tue, 19 Jan 2016 18:45:27 +0000 (20:45 +0200)] 
lib: Don't crash if getenv() is called after process_title_deinit() with Linux/OSX PROCTITLE_HACK

Right now the only known issue is GNUTLS's lib_deinit():

e = getenv("GNUTLS_NO_EXPLICIT_INIT");

But we likely never want that to be set. Alternative ways to solve this are
more annoying than our clearing the environment. Libraries probably shouldn't
rely on it much anyway, because some parts of Dovecot clear the whole
environment while running.

9 years agoconfig: Improved error messages for wrong order of nested local/remote/protocol ...
Timo Sirainen [Tue, 19 Jan 2016 13:39:13 +0000 (15:39 +0200)] 
config: Improved error messages for wrong order of nested local/remote/protocol { .. } blocks

9 years agoquota-clone: Avoid leaving a dict transaction open for unnecessarily long.
Timo Sirainen [Tue, 19 Jan 2016 13:15:19 +0000 (15:15 +0200)] 
quota-clone: Avoid leaving a dict transaction open for unnecessarily long.

Even though the earlier change should fix the dict assert crash due to
opening multiple transactions when recursing back, this makes sure of it.
It could also be helpful for some dict backends to not keep the transaction
open for unnecessarily long.

9 years agoquota-clone: Fixed update-recursion crash when closing mailbox.
Timo Sirainen [Tue, 19 Jan 2016 13:11:44 +0000 (15:11 +0200)] 
quota-clone: Fixed update-recursion crash when closing mailbox.

We need to avoid recursing for all mailboxes that quota recalculation
might open and close, not just the one that triggered the recalculation.

9 years agopop3c: If authentication fails, log if it was done with USER+PASS or AUTH PLAIN
Timo Sirainen [Tue, 19 Jan 2016 00:30:53 +0000 (02:30 +0200)] 
pop3c: If authentication fails, log if it was done with USER+PASS or AUTH PLAIN

9 years agopop3c: Improve authentication debug log messages a bit.
Timo Sirainen [Tue, 19 Jan 2016 00:26:24 +0000 (02:26 +0200)] 
pop3c: Improve authentication debug log messages a bit.

9 years agoauth: If passdbs are required, don't allow only master=yes passdbs.
Timo Sirainen [Mon, 18 Jan 2016 15:38:22 +0000 (17:38 +0200)] 
auth: If passdbs are required, don't allow only master=yes passdbs.

This fixes a crash:

Panic: file auth-request.c: line 743 (auth_request_is_disabled_master_user):
assertion failed: (request->requested_login_user != NULL)

Which would happen because request->passdb=NULL because there are only
master passdbs. Even if only master passdb is actually needed, there should
still be a non-master passdb for non-master logins to specify what happens
to them.

9 years ago*-login: Typofix for login_plugins error messages.
Timo Sirainen [Mon, 18 Jan 2016 15:08:04 +0000 (17:08 +0200)] 
*-login: Typofix for login_plugins error messages.

9 years agolib-fs: Added default implementations for fs_iter_*(), fs_copy() and fs_stat()
Timo Sirainen [Mon, 18 Jan 2016 12:59:50 +0000 (14:59 +0200)] 
lib-fs: Added default implementations for fs_iter_*(), fs_copy() and fs_stat()

The backends can now leave them as NULL, and the callers will get an error
that they're not supported.

9 years agolib-mail: istream-binary-converter lost last few chars from root-level binary content.
Timo Sirainen [Mon, 18 Jan 2016 12:57:45 +0000 (14:57 +0200)] 
lib-mail: istream-binary-converter lost last few chars from root-level binary content.

9 years agolib-mail: message-parser unit test now verifies that parsed block parts match input.
Timo Sirainen [Mon, 18 Jan 2016 12:56:47 +0000 (14:56 +0200)] 
lib-mail: message-parser unit test now verifies that parsed block parts match input.

9 years agolib-mail: Added message_header_line_write()
Timo Sirainen [Mon, 18 Jan 2016 12:56:24 +0000 (14:56 +0200)] 
lib-mail: Added message_header_line_write()

9 years agoChangeLog: Generate mercurial style changelogs
Aki Tuomi [Fri, 15 Jan 2016 12:11:34 +0000 (14:11 +0200)] 
ChangeLog: Generate mercurial style changelogs

9 years agolib-storage: Ignore ACLs when autoexpunging.
Timo Sirainen [Mon, 18 Jan 2016 11:28:23 +0000 (13:28 +0200)] 
lib-storage: Ignore ACLs when autoexpunging.

9 years agoquota: Fixed namespace filtering for dict and count backends.
Timo Sirainen [Mon, 18 Jan 2016 10:31:26 +0000 (12:31 +0200)] 
quota: Fixed namespace filtering for dict and count backends.

9 years agolib-http: Assign an ID for each HTTP request and log it in debug lines.
Timo Sirainen [Sat, 16 Jan 2016 19:47:53 +0000 (21:47 +0200)] 
lib-http: Assign an ID for each HTTP request and log it in debug lines.

The ID stays the same when request is retried. Added a "Req" prefix so it's
easier to search for the IDs. Based on patch by Stephan Bosch.

9 years agoimapc: Added support for PROXYAUTH command by setting imapc_features = proxyauth
Timo Sirainen [Sat, 16 Jan 2016 19:31:55 +0000 (21:31 +0200)] 
imapc: Added support for PROXYAUTH command by setting imapc_features = proxyauth

This can be useful when talking to Sun/Oracle IMAP server, which wants you
to use LOGIN+PROXYAUTH to perform master user logins, instead of supporting
the standard SASL PLAIN authentication.

9 years agostats: Added missing #include forgotten in 63393b70
Timo Sirainen [Fri, 15 Jan 2016 17:36:46 +0000 (19:36 +0200)] 
stats: Added missing #include forgotten in 63393b70

9 years agodoveadm-stats: Add documentation about stats subcommand
Aki Tuomi [Tue, 12 Jan 2016 07:47:43 +0000 (09:47 +0200)] 
doveadm-stats: Add documentation about stats subcommand

9 years agodoveadm-stats: Add stats reset command line
Aki Tuomi [Mon, 11 Jan 2016 13:46:35 +0000 (15:46 +0200)] 
doveadm-stats: Add stats reset command line

9 years agostats: Add RESET call to stats client
Aki Tuomi [Mon, 11 Jan 2016 13:46:28 +0000 (15:46 +0200)] 
stats: Add RESET call to stats client

9 years agolib-stats: Add stats_reset function
Aki Tuomi [Mon, 11 Jan 2016 13:46:05 +0000 (15:46 +0200)] 
lib-stats: Add stats_reset function

9 years agolib-fts: Add lib-fts to CPPFLAGS as include dir
Aki Tuomi [Thu, 7 Jan 2016 09:09:50 +0000 (11:09 +0200)] 
lib-fts: Add lib-fts to CPPFLAGS as include dir

Without this, VPATH builds fail because the includes cannot be
found as they are not on same directory.

9 years ago*-login: Allow plugins to hook into client allocation and add module-specific context...
Timo Sirainen [Fri, 15 Jan 2016 16:03:11 +0000 (18:03 +0200)] 
*-login: Allow plugins to hook into client allocation and add module-specific contexts to client.

9 years agodovecot-config: Added LIBDOVECOT_{AUTH/POP3/IMAP_LOGIN}_INCLUDE
Timo Sirainen [Fri, 15 Jan 2016 15:17:05 +0000 (17:17 +0200)] 
dovecot-config: Added LIBDOVECOT_{AUTH/POP3/IMAP_LOGIN}_INCLUDE

9 years agoimap-login: Install imap-login-*.h headers so plugins can use them.
Timo Sirainen [Fri, 15 Jan 2016 14:51:15 +0000 (16:51 +0200)] 
imap-login: Install imap-login-*.h headers so plugins can use them.

9 years agoimap-login: Renamed client.[ch] to imap-login-client.[ch]
Timo Sirainen [Fri, 15 Jan 2016 14:49:05 +0000 (16:49 +0200)] 
imap-login: Renamed client.[ch] to imap-login-client.[ch]

This allows installing the imap-login-client.h without conflicting.

9 years agoimap-login: Added API for registering/unregistering commands (for plugins).
Timo Sirainen [Fri, 15 Jan 2016 14:46:34 +0000 (16:46 +0200)] 
imap-login: Added API for registering/unregistering commands (for plugins).

9 years ago*-login: Added login_plugins and login_plugin_dir settings.
Timo Sirainen [Fri, 15 Jan 2016 14:07:32 +0000 (16:07 +0200)] 
*-login: Added login_plugins and login_plugin_dir settings.

9 years agoAdded v2.2.21 to NEWS.
Timo Sirainen [Fri, 15 Jan 2016 14:20:45 +0000 (16:20 +0200)] 
Added v2.2.21 to NEWS.

9 years ago*-login: Changed -D parameter to mean a more generic login_debug option.
Timo Sirainen [Fri, 15 Jan 2016 13:55:26 +0000 (15:55 +0200)] 
*-login: Changed -D parameter to mean a more generic login_debug option.

9 years agoimapc: Added imapc_features = no-examine
Timo Sirainen [Fri, 15 Jan 2016 13:40:56 +0000 (15:40 +0200)] 
imapc: Added imapc_features = no-examine

9 years agodsync: Fixed syncing subscription state with doveadm backup.
Timo Sirainen [Fri, 15 Jan 2016 13:12:30 +0000 (15:12 +0200)] 
dsync: Fixed syncing subscription state with doveadm backup.

If DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_REMOTE was set, we could still have
preserved the local subscription state. Also cleaned up the code a bit to
make it clearer.

9 years agoimapc: Fixed mailbox name escaping for STATUS
Timo Sirainen [Fri, 15 Jan 2016 13:04:21 +0000 (15:04 +0200)] 
imapc: Fixed mailbox name escaping for STATUS

9 years agoimapc: Fixed mailbox name escaping for CREATE, DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE
Timo Sirainen [Thu, 14 Jan 2016 16:52:01 +0000 (18:52 +0200)] 
imapc: Fixed mailbox name escaping for CREATE, DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE

9 years agoimapc: Fixed escaping/unescaping mailbox names.
Timo Sirainen [Thu, 14 Jan 2016 16:50:23 +0000 (18:50 +0200)] 
imapc: Fixed escaping/unescaping mailbox names.

This fixes accessing mailbox names with '%' (the escape_char). It also fixes
local namespace separator being different from the remote separator.

9 years agolib-storage: Added mailbox_list_[un]escape_name_params()
Timo Sirainen [Thu, 14 Jan 2016 16:47:40 +0000 (18:47 +0200)] 
lib-storage: Added mailbox_list_[un]escape_name_params()

This allows calling the mailbox_list_[un]escape_name() with wanted parameters
instead of taking them from mailbox_list.

9 years agoimapc: Don't duplicate standard mailbox flags in LIST replies.
Timo Sirainen [Thu, 14 Jan 2016 14:28:06 +0000 (16:28 +0200)] 
imapc: Don't duplicate standard mailbox flags in LIST replies.

We added the standard \NoSelect, \NonExistent, \NoInferiors and \Subscribed
to special_use string, which caused them to be sent duplicated.

9 years agovirtual plugin: Added support for filtering mailboxes by METADATA entries.
Timo Sirainen [Wed, 13 Jan 2016 12:30:03 +0000 (14:30 +0200)] 
virtual plugin: Added support for filtering mailboxes by METADATA entries.

Usage:

<mailbox patterns as usual>
[-]/<metadata-entry-name>:<value-wildcard>

There can be multiple metadata entries. All the entries must match.

For example:

*
/private/vendor/vendor.dovecot/virtual:*
-/private/vendor/vendor.dovecot/virtual:ignore

This matches all mailboxes, which contain a virtual METADATA entry that has
any value except "ignore".

Note that the current implementation requires still opening all the mailboxes
before matching the METADATA entries. This could be avoided in v2.3 with some
lib-storage API changes.

9 years agolib-imap-storage: imap_metadata_get*() returned 1 also when value wasn't found.
Timo Sirainen [Wed, 13 Jan 2016 12:22:22 +0000 (14:22 +0200)] 
lib-imap-storage: imap_metadata_get*() returned 1 also when value wasn't found.

9 years agovirtual plugin: Cleaned up behavior of '!' prefix with '+' and '-'
Timo Sirainen [Wed, 13 Jan 2016 11:46:33 +0000 (13:46 +0200)] 
virtual plugin: Cleaned up behavior of '!' prefix with '+' and '-'

It makes a bit more sense now. Mainly the difference is that "!foo*" means
to save mails to a mailbox called "foo*", instead of including mailboxes
matching "!foo*" pattern to the virtual mailbox. It's unlikely anyone was
relying on this behavior.

9 years agovirtual plugin: Don't treat "+-box" as a negative entry.
Timo Sirainen [Wed, 13 Jan 2016 11:41:05 +0000 (13:41 +0200)] 
virtual plugin: Don't treat "+-box" as a negative entry.

This was already documented by wiki to work as a mailbox named "-box",
although it didn't actually work that way. There wasn't any practical
difference between "+-box" and "-box", so this change is unlikely to break
anyone's config. It was mainly done as code cleanup.

9 years agovirtual plugin: Minor cleanup/fix - find the namespace after we have processed specia...
Timo Sirainen [Wed, 13 Jan 2016 11:31:54 +0000 (13:31 +0200)] 
virtual plugin: Minor cleanup/fix - find the namespace after we have processed special prefixes.

We already skipped over them earlier, but the logic wasn't exactly the same
as when they were actually being processed, so there could have been some
unexpected mismatches.

9 years agoglobal: freshen copyright
Timo Sirainen [Wed, 13 Jan 2016 10:24:03 +0000 (12:24 +0200)] 
global: freshen copyright

git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/'

9 years agolib-storage: Fixed autoexpunge=yes to work with namespace's root mailbox.
Timo Sirainen [Wed, 13 Jan 2016 09:22:20 +0000 (11:22 +0200)] 
lib-storage: Fixed autoexpunge=yes to work with namespace's root mailbox.

namespace { mailbox "" { autoexpunge = .. } }

9 years agolib-fts: Create library for development packages.
Teemu Huovila [Wed, 23 Dec 2015 12:45:08 +0000 (14:45 +0200)] 
lib-fts: Create library for development packages.

9 years agolib: i_stream_get_error() now returns "EOF" if stream_errno==0 and eof==TRUE.
Timo Sirainen [Mon, 11 Jan 2016 17:00:07 +0000 (19:00 +0200)] 
lib: i_stream_get_error() now returns "EOF" if stream_errno==0 and eof==TRUE.

This can be used to replace a lot of code like:

input->stream_errno == 0 ? "EOF" : i_stream_get_error(input)

with simply:

i_stream_get_error(input)

9 years agoRemoved now-unused is-tagged.py
Timo Sirainen [Sat, 9 Jan 2016 20:55:15 +0000 (22:55 +0200)] 
Removed now-unused is-tagged.py

9 years agoauth: Don't crash if passwd-file can't be opened
Timo Sirainen [Fri, 8 Jan 2016 16:12:21 +0000 (18:12 +0200)] 
auth: Don't crash if passwd-file can't be opened

9 years agolib-settings: If SET_UINT_OCT has invalid value, we ignored the error and returned...
Timo Sirainen [Fri, 8 Jan 2016 15:04:27 +0000 (17:04 +0200)] 
lib-settings: If SET_UINT_OCT has invalid value, we ignored the error and returned garbage value.

9 years agolib-settings: Fixed parsing '0' value for SET_UINT_OCT.
Timo Sirainen [Fri, 8 Jan 2016 15:02:56 +0000 (17:02 +0200)] 
lib-settings: Fixed parsing '0' value for SET_UINT_OCT.

This was used only by service { *_listener { mode } }

9 years agolib-mail: message-parser was counting body_size wrong for truncated MIME headers...
Timo Sirainen [Fri, 8 Jan 2016 11:24:32 +0000 (13:24 +0200)] 
lib-mail: message-parser was counting body_size wrong for truncated MIME headers after 7d800c55

9 years agolib-storage: mailbox_exists() shouldn't return INBOX as nonexistent if it's not creat...
Timo Sirainen [Thu, 7 Jan 2016 20:14:59 +0000 (22:14 +0200)] 
lib-storage: mailbox_exists() shouldn't return INBOX as nonexistent if it's not created yet.

9 years agoupdate-version.sh: Explicitly specify git directory.
Timo Sirainen [Thu, 7 Jan 2016 20:02:18 +0000 (22:02 +0200)] 
update-version.sh: Explicitly specify git directory.

9 years agopop3: Make sure pop3_lock_session=yes creates the lock's directory if it's missing.
Timo Sirainen [Tue, 5 Jan 2016 16:17:26 +0000 (11:17 -0500)] 
pop3: Make sure pop3_lock_session=yes creates the lock's directory if it's missing.

This happened at least with mbox if the root .imap/ didn't exist yet.

9 years agoauth: Fixed allow_nets=local to work correctly with non-local remote IP
Timo Sirainen [Tue, 5 Jan 2016 16:08:01 +0000 (11:08 -0500)] 
auth: Fixed allow_nets=local to work correctly with non-local remote IP

9 years agoimap: Don't hang at ambiguous commands when they were pipelined already before login
Timo Sirainen [Tue, 5 Jan 2016 16:01:26 +0000 (11:01 -0500)] 
imap: Don't hang at ambiguous commands when they were pipelined already before login

For example if all of these are sent in a single IP packet:

a login user pass
b select inbox
c noop
d unselect