Timo Sirainen [Tue, 27 Nov 2012 08:39:26 +0000 (10:39 +0200)]
mdbox: When rebuilding storage, fsck the map index first to make sure it's valid.
This fixes assert-crash when the map index contained records with UIDs in
wrong order.
Timo Sirainen [Tue, 27 Nov 2012 07:13:57 +0000 (09:13 +0200)]
login: Reverted previous fix attempt for SSL_accept() busy-looping.
Apparently didn't work. Probably this patch doesn't help anything then, so
just remove the extra complexity.
Timo Sirainen [Tue, 27 Nov 2012 05:50:06 +0000 (07:50 +0200)]
Reversed recent "short utf8" changes.
Solr code needs to parse the UTF8 input explicitly anyway to encode the XML
characters. And all the character checks were already done in it.
Timo Sirainen [Fri, 23 Nov 2012 06:32:13 +0000 (08:32 +0200)]
auth: Added a way to set default values for nonexistent LDAP attributes.
%{ldap:attrName:default_value} expands to default_value if attrName doesn't
exist.
Timo Sirainen [Wed, 7 Nov 2012 15:37:16 +0000 (17:37 +0200)]
var_expand*(): Don't use a data stack frame when expanding long %{variables}
This avoids potential crashes if the destination string is also allocated
from data stack and requires growing.
Timo Sirainen [Wed, 7 Nov 2012 15:05:47 +0000 (17:05 +0200)]
mdbox: Don't leave extra records to dovecot.map.index if mailbox index locking fails.
Fixes errors such as:
Corrupted dbox file /mdbox/storage/m.1 (around offset=2652): EOF reading msg header (got 0/30 bytes)
Timo Sirainen [Mon, 22 Oct 2012 12:32:04 +0000 (15:32 +0300)]
director: Don't remove user's weak flag from notify connection.
If notify connection worked properly, the weak flag should never have been
set in the first place. And if it's just suddenly removed, it won't finish
the pending requests properly.
Timo Sirainen [Mon, 22 Oct 2012 12:20:57 +0000 (15:20 +0300)]
director: Don't handle pending requests from all around the code.
I'm not sure if this actually fixes any bugs, but it definitely makes the
state cleaner.
Timo Sirainen [Thu, 18 Oct 2012 03:00:18 +0000 (06:00 +0300)]
lib-index: Fixed handling of finding a duplicate dovecot.index.log file_seq
Previously we assumed that the already opened file was always the wrong one,
but more common was that the newly opened file was .log.2 which should have
been deleted.
Timo Sirainen [Thu, 4 Oct 2012 21:15:01 +0000 (00:15 +0300)]
lib-storage: Don't crash when searching multiple keywords.
Fixed by simply removing the keyword merging code.
mail_search_args_simplify() is called before mail_search_args_init(), so the
keywords are still NULL and merging can't be done. Alternative fix would
have been to add string array to mail_search_arg.value containing the
keywords, but all of this is a pretty unnecessary optimization.
Timo Sirainen [Wed, 3 Oct 2012 02:41:46 +0000 (05:41 +0300)]
lib-index: Fix for handling view syncing for already deleted transaction logs.
The sync changes' hidden-flag was set randomly, which could have caused
flag changes to get lost.
Timo Sirainen [Tue, 2 Oct 2012 22:20:22 +0000 (01:20 +0300)]
lib-storage: mailbox_save_cancel() now makes sure that dest_mail is reset.
This fixes e.g. doveadm import, which continues import even though some
messages couldn't be saved.
Timo Sirainen [Tue, 2 Oct 2012 20:24:10 +0000 (23:24 +0300)]
lib-storage: When index mkdir() fails with EPERM, create the dir anyway with 0700 mode.
This avoids failing entirely when /var/mail/user has 0660 permissions and we
don't have access to the group. The error message is still logged.
Timo Sirainen [Mon, 24 Sep 2012 13:49:29 +0000 (16:49 +0300)]
ldap auth: Update %variables after each field update.
The previous behavior was a bit confusing. "uid=user" at the beginning
updated the %u variable, but if it was after templates it didn't update it.
Also "=user=%{uid}" that was supposed to be equivalent wasn't. Now the
behavior is consistent across all ways to set the fields.
Timo Sirainen [Mon, 24 Sep 2012 11:42:38 +0000 (14:42 +0300)]
lib-storage: Added ALTNOCHECK option to mail_location.
By default Dovecot verifies that $rootdir/dbox-alt-root symlink matches the
ALT directory location, and logs an error if not. This is mainly to avoid
accidents during initial configuration when for example alt dir was set in
global mail_location but was forgotten to be set in userdb reply's
mail_location. The ALTNOCHECK setting simply doesn't check or create this
symlink, giving a (very) small performance improvement.
Timo Sirainen [Mon, 24 Sep 2012 11:24:58 +0000 (14:24 +0300)]
imapc: And another compile fix..
Using the macro would have required config/all-settings.c to include
imapc-client.h, which is a bit too much trouble just for this.
Timo Sirainen [Fri, 21 Sep 2012 07:26:10 +0000 (09:26 +0200)]
lmtp: After successful proxying RCPT TO, the second one to nonexistent user gave tempfail error.
Instead of "unknown user" it gave "Can't handle mixed proxy/non-proxy
destinations".