]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib: Add str_is_float check function
Aki Tuomi [Fri, 29 Jan 2016 08:28:53 +0000 (10:28 +0200)] 
lib: Add str_is_float check function

9 years agodsync: Improved header hash v2 algorithm to remove repeated '?' chars.
Timo Sirainen [Thu, 28 Jan 2016 18:47:02 +0000 (20:47 +0200)] 
dsync: Improved header hash v2 algorithm to remove repeated '?' chars.

This is to help with Yahoo that replaces UTF-8 chars in headers with a
single '?' (instead of '?' per each 8bit byte).

9 years agolib-index: Memory leak fix for test-mail-index-map
Timo Sirainen [Thu, 28 Jan 2016 18:23:51 +0000 (20:23 +0200)] 
lib-index: Memory leak fix for test-mail-index-map

This failed when running make check with valgrind.

9 years agopop3-migration: Fix to 5407a86 - don't sync POP3 UIDLs when we don't need to
Timo Sirainen [Thu, 28 Jan 2016 18:16:31 +0000 (20:16 +0200)] 
pop3-migration: Fix to 5407a86 - don't sync POP3 UIDLs when we don't need to

9 years agodsync: Avoid finishing importer successfully on exporter failures.
Timo Sirainen [Thu, 28 Jan 2016 17:56:38 +0000 (19:56 +0200)] 
dsync: Avoid finishing importer successfully on exporter failures.

At least dsync_mailbox_import_changes_finish() could have been called when
exporter was already failed.

9 years agodoveadm backup: If local mailbox has more mails than remote, detect and delete it...
Timo Sirainen [Thu, 28 Jan 2016 17:55:06 +0000 (19:55 +0200)] 
doveadm backup: If local mailbox has more mails than remote, detect and delete it earlier.

9 years agoimapc: Don't mark the initial sync done if it wasn't successful.
Timo Sirainen [Thu, 28 Jan 2016 17:51:43 +0000 (19:51 +0200)] 
imapc: Don't mark the initial sync done if it wasn't successful.

9 years agoimapc: Handle disconnection when NOOP is sent to verify if mail is expunged.
Timo Sirainen [Thu, 28 Jan 2016 17:49:56 +0000 (19:49 +0200)] 
imapc: Handle disconnection when NOOP is sent to verify if mail is expunged.

9 years agolib-index: Added unit test to mail_index_map_lookup_seq_range()
Timo Sirainen [Thu, 28 Jan 2016 17:48:09 +0000 (19:48 +0200)] 
lib-index: Added unit test to mail_index_map_lookup_seq_range()

9 years agoimapc: Don't ignore FETCH, SEARCH and EXPUNGE returning NO failures in syncing.
Timo Sirainen [Thu, 28 Jan 2016 15:53:41 +0000 (17:53 +0200)] 
imapc: Don't ignore FETCH, SEARCH and EXPUNGE returning NO failures in syncing.

Especially if the FETCH 1:* (FLAGS) didn't succeed, we expunged all the
mails from local index.

9 years agoimapc: If FETCH didn't send our wanted data, log the tagged FETCH reply text.
Timo Sirainen [Thu, 28 Jan 2016 15:43:01 +0000 (17:43 +0200)] 
imapc: If FETCH didn't send our wanted data, log the tagged FETCH reply text.

9 years agoimapc: Don't use fetch-fix-broken-mails for NO [LIMIT] FETCH replies
Timo Sirainen [Thu, 28 Jan 2016 15:29:57 +0000 (17:29 +0200)] 
imapc: Don't use fetch-fix-broken-mails for NO [LIMIT] FETCH replies

9 years agoimapc: Remove X-Message-Flag filtering if imapc_features has rfc822.size
Timo Sirainen [Thu, 28 Jan 2016 15:15:20 +0000 (17:15 +0200)] 
imapc: Remove X-Message-Flag filtering if imapc_features has rfc822.size

9 years agodoveadm: All commands iterating mails stop now if doveadm has been killed.
Timo Sirainen [Thu, 28 Jan 2016 15:03:15 +0000 (17:03 +0200)] 
doveadm: All commands iterating mails stop now if doveadm has been killed.

9 years agodoveadm: Enable SIGINT and SIGTERM signal handler for all doveadm mail commands.
Timo Sirainen [Thu, 28 Jan 2016 14:59:48 +0000 (16:59 +0200)] 
doveadm: Enable SIGINT and SIGTERM signal handler for all doveadm mail commands.

Most importantly this allows stopping dsync.

9 years agodoveadm backup: Detect and handle conflicts earlier.
Timo Sirainen [Thu, 28 Jan 2016 14:43:37 +0000 (16:43 +0200)] 
doveadm backup: Detect and handle conflicts earlier.

This avoids doing a lot of work, only for the next doveadm backup to just
delete the entire mailbox and start from the beginning.

9 years agoimapc: Fixed assert-crash in mailbox syncing, if mailbox couldn't be opened.
Timo Sirainen [Thu, 28 Jan 2016 14:26:53 +0000 (16:26 +0200)] 
imapc: Fixed assert-crash in mailbox syncing, if mailbox couldn't be opened.

Usually meaning that syncing was attempted when IMAP server couldn't be
connected to. Fixes the assert:

Panic: file imapc-client.c: line 439 (imapc_client_get_capabilities):
assertion failed: (conn != NULL)

9 years agoimap: Send all pending tagged command replies before APPEND is started.
Timo Sirainen [Thu, 28 Jan 2016 13:36:58 +0000 (15:36 +0200)] 
imap: Send all pending tagged command replies before APPEND is started.

This probably doesn't matter a lot, but it's cleaner.

One side effect of this change is that if multiple APPENDs are pipelined
(without MULTIAPPEND) on the selected mailbox, this now performs a sync
between each APPEND and sends the EXISTS replies. This may be slightly
lower in performance, but it's also slightly more correct behavior.

9 years agolib: Added json_append_escaped_data() to escape non-NUL terminated input.
Timo Sirainen [Thu, 28 Jan 2016 13:16:29 +0000 (15:16 +0200)] 
lib: Added json_append_escaped_data() to escape non-NUL terminated input.

9 years agolib: json_append_escaped() doesn't need to escape the 8bit chars.
Timo Sirainen [Thu, 28 Jan 2016 13:05:38 +0000 (15:05 +0200)] 
lib: json_append_escaped() doesn't need to escape the 8bit chars.

We'll assume that the input is valid UTF-8.

9 years agolib-index: If transaction log was locked for at least 30 secs, log a warning (not...
Timo Sirainen [Thu, 28 Jan 2016 11:45:48 +0000 (13:45 +0200)] 
lib-index: If transaction log was locked for at least 30 secs, log a warning (not at 3min)

This is because we log a warning about it already when locking it took 30
seconds, so it's useful to see which process was actually keeping the lock.

9 years agopop3-migration: Perform UIDL syncing a bit earlier to work around Yahoo IMAP bug.
Timo Sirainen [Wed, 27 Jan 2016 13:44:54 +0000 (15:44 +0200)] 
pop3-migration: Perform UIDL syncing a bit earlier to work around Yahoo IMAP bug.

9 years agoimapc: Don't use fetch-fix-broken-mails for OK and NO [SERVERBUG] FETCH replies
Timo Sirainen [Wed, 27 Jan 2016 13:16:18 +0000 (15:16 +0200)] 
imapc: Don't use fetch-fix-broken-mails for OK and NO [SERVERBUG] FETCH replies

Hopefully no servers are actually returning OK without returning a FETCH
reply. If they are, maybe we need another workaround..

In any case Yahoo IMAP sometimes loses state and starts returning OK without
FETCH replies to all UID FETCH requests (and BADs to FETCHes). It also may
return NO [UNAVAILABLE] for both permanent and temporary FETCH failures, so
we can't do anything with that.

I added NO [SERVERBUG] because that's what Dovecot responds to temporary
failures. I'm not sure how useful that check is though.

9 years agolib: Make static analyzer happier about istream-chain changes
Timo Sirainen [Wed, 27 Jan 2016 08:17:44 +0000 (10:17 +0200)] 
lib: Make static analyzer happier about istream-chain changes

9 years agopop3c: Fixed assert-crash when prefetching a mail failed.
Timo Sirainen [Wed, 27 Jan 2016 00:04:00 +0000 (02:04 +0200)] 
pop3c: Fixed assert-crash when prefetching a mail failed.

9 years ago*-login: Add all returned passdb fields to struct client_auth_reply.all_fields
Timo Sirainen [Tue, 26 Jan 2016 23:12:21 +0000 (01:12 +0200)] 
*-login: Add all returned passdb fields to struct client_auth_reply.all_fields

These will be mainly useful to plugins.

9 years agofts-solr: Changed default operator to AND to fix multi-word queries.
Timo Sirainen [Tue, 26 Jan 2016 22:35:34 +0000 (00:35 +0200)] 
fts-solr: Changed default operator to AND to fix multi-word queries.

Previously for example searching from:foo@example.com was expanded to
foo OR example OR com. Now it's foo AND example AND com, which makes a lot
more sense.

9 years agopop3c: Compiler warning fix for using wrong enum type
Timo Sirainen [Tue, 26 Jan 2016 21:51:16 +0000 (23:51 +0200)] 
pop3c: Compiler warning fix for using wrong enum type

9 years agopop3-migration: If reading message header for hashing fails, fail immediately.
Timo Sirainen [Tue, 26 Jan 2016 20:10:29 +0000 (22:10 +0200)] 
pop3-migration: If reading message header for hashing fails, fail immediately.

This avoids flooding the log with a ton of errors in case the POP3
connection dies.

9 years agodsync: When comparing headers' hashes to match messages, try to normalize the input.
Timo Sirainen [Tue, 26 Jan 2016 17:56:43 +0000 (19:56 +0200)] 
dsync: When comparing headers' hashes to match messages, try to normalize the input.

This is especially useful because some IMAP servers return different data
depending on whether we're fetching only specific header fields, all headers
or entire body. For now we're assuming that any non-ASCII is going to be
replaced with '?', which helps at least with Zimbra and Yahoo. The header
hashing algorithm is now versionable, so it can be modified more easily in
future.

This change should make imapc_features=zimbra-workarounds setting obsolete.

9 years agopop3-migration: Don't change TAB to '?' when calculating header hash.
Timo Sirainen [Tue, 26 Jan 2016 15:55:10 +0000 (17:55 +0200)] 
pop3-migration: Don't change TAB to '?' when calculating header hash.

9 years agopop3-migration: Don't even try to match message sizes with pop3_migration_skip_size_c...
Timo Sirainen [Tue, 26 Jan 2016 15:53:28 +0000 (17:53 +0200)] 
pop3-migration: Don't even try to match message sizes with pop3_migration_skip_size_check=yes

This skipped the header check for mailboxes that had only a single mail.

9 years agopop3c: Added support for TOP/RETR prefetching when PIPIELINING capability exists.
Timo Sirainen [Tue, 26 Jan 2016 13:41:16 +0000 (15:41 +0200)] 
pop3c: Added support for TOP/RETR prefetching when PIPIELINING capability exists.

9 years agopop3c: Added full support for running commands asynchronously (with PIPELINING)
Timo Sirainen [Tue, 26 Jan 2016 13:40:09 +0000 (15:40 +0200)] 
pop3c: Added full support for running commands asynchronously (with PIPELINING)

9 years agopop3c: Increased command timeout from 30s to 5mins.
Timo Sirainen [Tue, 26 Jan 2016 13:38:13 +0000 (15:38 +0200)] 
pop3c: Increased command timeout from 30s to 5mins.

Possibly should be made configurable, but use this for now.

9 years agopop3-migration: Cached header hashes weren't actually being used for imapc.
Timo Sirainen [Tue, 26 Jan 2016 13:22:50 +0000 (15:22 +0200)] 
pop3-migration: Cached header hashes weren't actually being used for imapc.

We'll need to do the search twice: Once to find out the actual cached header
hashes and then second time do a search for the message headers excluding the
emails whose hashes we already know. This allows prefetching to work for imapc
without prefetching all the emails as it was doing.

9 years agolib: istream-concat now seeks parent streams to correct offset.
Timo Sirainen [Tue, 26 Jan 2016 13:20:48 +0000 (15:20 +0200)] 
lib: istream-concat now seeks parent streams to correct offset.

All of the streams' offsets were somewhat random.

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