]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agoimap: Removed special EXPUNGE callback for an Outlook workaround.
Timo Sirainen [Mon, 1 Feb 2016 18:26:19 +0000 (20:26 +0200)] 
imap: Removed special EXPUNGE callback for an Outlook workaround.

As the comment mentions, this workaround isn't needed if index files are
used.  Hopefully also the Outlook bug itself is gone nowadays.. In any case
the current callback code didn't work, because it was returning FALSE and
causing an assert in a pipelined EXPUNGE+APPEND combination after 6e9454f:

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

It would probably be possible to fix this, but it would complicate the code
even further, so it's easier just to get rid of this feature. It was easily
triggered by running imaptest stress testing.

9 years agopop3-migration: Ignore mails returned as expunged by pop3c.
Timo Sirainen [Mon, 1 Feb 2016 17:08:24 +0000 (19:08 +0200)] 
pop3-migration: Ignore mails returned as expunged by pop3c.

Whether the -ERR actually meant they were expunged or not is another
issue, but the answer to that belongs to pop3c code. MAIL_ERROR_EXPUNGED
in any case can be safely handled this way here.

9 years agopop3c: If prefetch fails, treat it as if prefetching simply wasn't done.
Timo Sirainen [Mon, 1 Feb 2016 17:07:59 +0000 (19:07 +0200)] 
pop3c: If prefetch fails, treat it as if prefetching simply wasn't done.

This avoids having error handling twice. Also in case the error was caused
by -ERR, this should retry the operation, which even might fix it in some
situations.

9 years agopop3-migration: Use message_header_hash_more() instead of duplicating the code
Timo Sirainen [Mon, 1 Feb 2016 15:57:07 +0000 (17:57 +0200)] 
pop3-migration: Use message_header_hash_more() instead of duplicating the code

9 years agolib-mail: Changed message_header_hash_more() to support any hash algorithm
Timo Sirainen [Mon, 1 Feb 2016 15:56:49 +0000 (17:56 +0200)] 
lib-mail: Changed message_header_hash_more() to support any hash algorithm

9 years agolib: JSON parser can now optionally parse input that isn't an object.
Timo Sirainen [Mon, 1 Feb 2016 15:38:11 +0000 (17:38 +0200)] 
lib: JSON parser can now optionally parse input that isn't an object.

Based on patch by Aki Tuomi.

9 years agolib: Fixed json-parser to correctly parse numbers at EOF.
Timo Sirainen [Mon, 1 Feb 2016 15:30:23 +0000 (17:30 +0200)] 
lib: Fixed json-parser to correctly parse numbers at EOF.

Numbers are a bit special compared to others, because they don't have any
clear character indicating that the number ends. So we can only assume that
the number is finished when EOF is reached, although even that isn't
necessarily correct in case the stream is terminated unexpectedly.

This change is in prepartion for the next change. With current JSON parser
this issue could never happen because "}" was expected just before EOF.

9 years agolib: Code cleanup to json-parser - assume less that the root is an object
Timo Sirainen [Mon, 1 Feb 2016 15:00:11 +0000 (17:00 +0200)] 
lib: Code cleanup to json-parser - assume less that the root is an object

9 years agolib-mail, dsync: Moved dsync_mail_hash_more() to lib-mail/message-header-hash.*
Timo Sirainen [Thu, 28 Jan 2016 22:08:33 +0000 (00:08 +0200)] 
lib-mail, dsync: Moved dsync_mail_hash_more() to lib-mail/message-header-hash.*

9 years agolib-http: Add function to update HTTP response status
Aki Tuomi [Mon, 1 Feb 2016 12:44:11 +0000 (14:44 +0200)] 
lib-http: Add function to update HTTP response status

9 years agodoveadm: Add JSON formatter support
Aki Tuomi [Thu, 21 Jan 2016 17:49:12 +0000 (19:49 +0200)] 
doveadm: Add JSON formatter support

9 years agodoveadm-print: Add flag indicating number-only field
Aki Tuomi [Mon, 25 Jan 2016 08:50:23 +0000 (10:50 +0200)] 
doveadm-print: Add flag indicating number-only field

9 years agoCompiler warning fix to previous commit
Timo Sirainen [Fri, 29 Jan 2016 15:47:52 +0000 (17:47 +0200)] 
Compiler warning fix to previous commit

9 years agoReplace host:port parsers with net_str2hostport().
Timo Sirainen [Fri, 29 Jan 2016 15:42:51 +0000 (17:42 +0200)] 
Replace host:port parsers with net_str2hostport().

9 years agolib: Added net_str2hostport()
Timo Sirainen [Fri, 29 Jan 2016 15:32:30 +0000 (17:32 +0200)] 
lib: Added net_str2hostport()

9 years agolast-login: Added last_login_precision setting
Timo Sirainen [Fri, 29 Jan 2016 14:23:57 +0000 (16:23 +0200)] 
last-login: Added last_login_precision setting

9 years agolib-sasl: Allow plugins to override the default SASL client mechanisms.
Timo Sirainen [Fri, 29 Jan 2016 14:07:35 +0000 (16:07 +0200)] 
lib-sasl: Allow plugins to override the default SASL client mechanisms.

9 years agolib-imap: Write invalid Content-Transfer-Encoding value as "7bit" to BODY/BODYSTRUCTURE.
Timo Sirainen [Fri, 29 Jan 2016 13:09:35 +0000 (15:09 +0200)] 
lib-imap: Write invalid Content-Transfer-Encoding value as "7bit" to BODY/BODYSTRUCTURE.

9 years agolib: Add tests for str_is_float
Aki Tuomi [Fri, 29 Jan 2016 08:29:05 +0000 (10:29 +0200)] 
lib: Add tests for str_is_float

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.