Timo Sirainen [Sun, 9 Jun 2013 03:03:34 +0000 (06:03 +0300)]
imap/pop3-login: Use libsasl for authenticating to remote IMAP/POP3 server.
Also passdb lookup can return "proxy_mech" extra field to specify which SASL
mechanism to use.
Timo Sirainen [Sun, 9 Jun 2013 00:10:43 +0000 (03:10 +0300)]
fts-lucene: Support normalize setting also without snowball. Added no_snowball setting.
Snowball seems to be converting / breaking words down rather annoyingly.
Timo Sirainen [Sat, 8 Jun 2013 23:08:24 +0000 (02:08 +0300)]
lib-http: If connect to peer failed, don't recreate a new connection to handle pending requests.
The new connection would very likely fail as well. Another peer for the host
should pick up the requests.
Timo Sirainen [Thu, 6 Jun 2013 09:36:30 +0000 (12:36 +0300)]
var_expand*(): Fixed %N to work the same with little and big endian CPUs.
Also use 64bit integer to do the MOD from, which should give somewhat better
value distribution than with 32bit.
Timo Sirainen [Thu, 6 Jun 2013 02:58:16 +0000 (05:58 +0300)]
lib-http: Fixed previous patch setting connection connected only after SSL handshake.
This just caused crashes. The main point was anyway to include the SSL
handshake as part of the connect_timeout_msecs. Apparently the easiest way
is to set it immediately connected and delay removing the timeout.
Timo Sirainen [Wed, 5 Jun 2013 15:21:55 +0000 (18:21 +0300)]
dsync: Set broken_char to a control char, so invalid mailbox names are handled properly.
The dsync will now fail if there are invalid mailbox names (e.g. valid UTF8
when they should have been mUTF7), instead of simply printing "mailbox
doesn't exist" error and exiting with 0.
Timo Sirainen [Wed, 5 Jun 2013 14:14:49 +0000 (17:14 +0300)]
dsync: If unexpected changes happened during sync, log a warning and exit with code 2.
This was done by v2.1 dsync, but the code got temporarily lost in v2.2.
Timo Sirainen [Wed, 5 Jun 2013 13:40:01 +0000 (16:40 +0300)]
lib-http: After peer has received 100 response, don't add ambiguity timeout anymore.
The server should be sending the 100 responses then, and long delays
shouldn't be confused with them being missing.
Timo Sirainen [Wed, 5 Jun 2013 13:28:16 +0000 (16:28 +0300)]
lib-http: When receiving 1xx response while waiting for 100, don't restart timeout.
The 100 response is missing only from HTTP/1.0 requests, which also didn't
allow any 1xx responses. So if a 1xx response is returned, a 100 response is
definitely also coming.
Timo Sirainen [Sat, 1 Jun 2013 14:08:19 +0000 (17:08 +0300)]
lib-fs: If fs_default_copy() fails, close the copy stream immediately.
The stream's origin may already be freed by the time the fs_file_close() is
trying to close the stream.
Timo Sirainen [Sat, 1 Jun 2013 01:17:40 +0000 (04:17 +0300)]
imapc: If imapc_list_prefix is set, don't skip it in filesystem paths.
Most importantly this fixes the index path when accessing the
imapc_list_prefix mailbox itself (so the indexes won't be in the mail root
dir, where they don't get deleted when mailbox is deleted).
Timo Sirainen [Sat, 1 Jun 2013 01:06:48 +0000 (04:06 +0300)]
lib-storage: If mailbox autocreate fails with "already exists", ignore the error.
This check was supposed to have been already there, but it was checking for
the wrong error.
Timo Sirainen [Fri, 31 May 2013 23:25:54 +0000 (02:25 +0300)]
Make sure errno is preserved in non-delayed signal handlers.
The current code didn't have any signal handlers that modified errno, so
this doesn't fix any bugs.
Timo Sirainen [Fri, 31 May 2013 14:36:19 +0000 (17:36 +0300)]
imapc: Empty imapc_user expands to namespace's owner, or with public namespaces to user itself.
The main idea is that with shared namespaces it now expands to the shared
username, allowing shared mailbox access via imapc.
Stephan Bosch [Thu, 30 May 2013 15:04:52 +0000 (18:04 +0300)]
imap: Fixed segfault in URLFETCH command.
Command would be cleaned up while requests were still pending, causing a
segfault once a request finished. Added API determining whether the URLAUTH
fetch interface still has pending requests.
Timo Sirainen [Wed, 29 May 2013 13:40:50 +0000 (16:40 +0300)]
lib-imap: imap_append_string_for_humans() returned broken output for whitespace-only input.
This returned broken IMAP ENVELOPEs, especially for subjects that contained
only whitespace. Since the broken output returned a huge literal, it
basically caused the IMAP client to hang.
Timo Sirainen [Tue, 28 May 2013 14:30:42 +0000 (17:30 +0300)]
auth: Keep auth_request referenced during DNS lookup.
If the underlying auth connection gets closed, there's nothing else
referencing the auth_request.
Timo Sirainen [Mon, 27 May 2013 18:03:14 +0000 (21:03 +0300)]
dbox: Don't cache pop3.uidl|order unless index header indicates there are those.
They exist only when doing a migration, so it's pretty wasteful storing
"doesn't exist" for all other installations.
Timo Sirainen [Sun, 26 May 2013 18:57:36 +0000 (21:57 +0300)]
dsync: Added -x parameter to exclude mailboxes from sync.
Multiple -x parameters can be added. Giving \flag as parameter means that
the mailbox with the given SPECIAL-USE \flag is skipped. For example:
Timo Sirainen [Sun, 26 May 2013 16:04:00 +0000 (19:04 +0300)]
lib-index: mail_cache_lookup*() can now return fields recently added with mail_cache_add()
Previously it was returning them if they had already been written to
dovecot.index.cache, but not if they were still in the in-memory buffer.
This avoids caching/parsing the same field multiple times when messages
aren't accessed in ascending order (e.g. when sorting messages).