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.
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.
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.
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 }
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.