Timo Sirainen [Fri, 21 Mar 2014 15:52:50 +0000 (17:52 +0200)]
imapc: Cache LIST replies for a while to be able to immediately ask for mailbox flags/existence.
Besides giving better performance, this will fix bugs in some servers where
LISTing a single mailbox doesn't necessarily return it. (In this case a
mailbox named "in" wasn't returned, but I think Dovecot has had bugs related
to this also.)
Timo Sirainen [Thu, 20 Mar 2014 15:00:31 +0000 (17:00 +0200)]
imapc: Avoid hanging when running into server problems.
imapc_mail_fetch_flush() caused imail->fetch_count to drop to 0, but
imapc_mailbox_run() still started imapc_client_run() which was doing
nothing.
Timo Sirainen [Mon, 17 Mar 2014 14:57:21 +0000 (16:57 +0200)]
liblib: Added negative %variable lengths to count backwards from the end of the value.
For example %0.-2 for "12345" returns "123".
Patch by Norbert Weinhold / Open-Xchange.
Timo Sirainen [Tue, 11 Mar 2014 11:26:33 +0000 (13:26 +0200)]
fts-lucene: Skip returned duplicate results.
This caused assert-crash at least when searching from virtual mailbox
because the score array was larger than the actual number of results.
Timo Sirainen [Mon, 10 Mar 2014 22:39:27 +0000 (00:39 +0200)]
mdbox: Added mdbox_purge_preserve_alt setting to keep the file within alt storage during purge.
Perhaps it would be better for this setting to be the default in v2.3 and
maybe be removed entirely? Not a good idea to change during v2.2.x anyway,
so for now this is a setting.
Timo Sirainen [Mon, 24 Feb 2014 18:30:51 +0000 (12:30 -0600)]
lib-storage: Fixed support for list=no prefix="" listing.
This behavior works with e.g. Outlook where it's allowed to CREATE and LIST
the Sent/Trash/etc mailboxes to root level, even though the primary
namespace has a prefix.
Timo Sirainen [Fri, 7 Feb 2014 20:03:33 +0000 (15:03 -0500)]
pop3: Use POP3 order sorting only when directly listing UIDLs.
"Message ordering changed unexpectedly" errors can be completely avoided by
using either pop3_lock_session=yes or adding %u to pop3_logout_format.
Timo Sirainen [Thu, 30 Jan 2014 21:03:40 +0000 (22:03 +0100)]
net_transmit() may have wrongly returned EPIPE error.
If errno was EPIPE before net_transmit() was called and sendto() didn't
change it, we still returned error.
Also removed the unlikely() call which isn't all that unlikely for
non-blocking code.
Timo Sirainen [Mon, 27 Jan 2014 14:35:46 +0000 (16:35 +0200)]
acl plugin: Added an alternative global ACL file that can contain mailbox patterns.
Instead of pointing the global ACL path to a directory use a file instead.
The file format is "<mailbox pattern> <normal ACL line>". Most importantly
this can be used to specify default ACLs for namespaces.
The mailbox pattern uses "*" and "?" wildcards currently. I'm not sure if I
should still change them to IMAP "*" and "%" wildcards. That would make the
behavior more complex ("%" depends on hierarchy separator), slightly slower
and quota code is already also using the */? wildcards..
Timo Sirainen [Tue, 14 Jan 2014 22:57:59 +0000 (00:57 +0200)]
lib-compression: Added initial support for LZ4
There's no standard file format for LZ4, so we created our own. The code has
had only minimal testing currently, so there may be bugs.
Timo Sirainen [Tue, 14 Jan 2014 01:24:47 +0000 (03:24 +0200)]
auth, login, mail: Added %{auth_user}, %{auth_username} and %{auth_domain}
They expand to the SASL authentication ID. So if master user login is done,
it expands to the master user. If username changes during authentication, it
expands to the original username. Otherwise %{user} and %{auth_user} are
equal.
Stephan Bosch [Fri, 10 Jan 2014 20:00:28 +0000 (15:00 -0500)]
lib-http: Added option to the header parser to make it lenient towards illegal characters in header field content.
The offending characters are then skipped without error. This is required
for the http client as a workaround for bugs in certain HTTP servers. This
behavior is explicitly not enabled for the http-request-parser as used by
our own HTTP server implementation.