Stephan Bosch [Sat, 15 Sep 2012 20:57:08 +0000 (23:57 +0300)]
Added support for IMAP URLAUTH and URLAUTH=BINARY extensions
Extends imap service with URLAUTH and URLAUTH=BINARY support:
- Adds new commands URLFETCH, GENURLAUTH and RESETKEY.
Creates imap-urlauth service in src/imap-urlauth.
Functionality common to both the imap and imap-urlauth services is located
in src/lib-imap-urlauth.
TODO:
- use mailbox GUIDs instead of names
- doveadm command to delete stale urlauth entries?
- add delay when attempting to access nonexistent user
- create urlauth-worker queue, similar to how indexer-worker works
(could we share code?..)
Timo Sirainen [Sat, 15 Sep 2012 00:12:20 +0000 (03:12 +0300)]
Replaced "decomposed titlecase" conversions with more generic normalizer function.
Plugins can now change mail_user.default_normalizer. Specific searches can
also use different normalizers by changing mail_search_context.normalizer.
Timo Sirainen [Fri, 14 Sep 2012 20:11:27 +0000 (23:11 +0300)]
Use "tokenlogin" socket name (instead of "token-login") after all.
Auth code has special checks for '-', which breaks "token-login" and fixing
it is rather annoying.
Stephan Bosch [Fri, 14 Sep 2012 18:48:45 +0000 (21:48 +0300)]
Added support to perform token-based service process authentication.
Creates hidden SASL method DOVECOT-TOKEN. This method is not available on
the normal auth login socket and thus never presented to clients.
Creates new auth socket type 'tokenlogin'. This otherwise normal login
socket only offers authentication using the DOVECOT-TOKEN mechanism.
Creates new token-login directory in base_dir to separate token logins from
normal logins. This directory is otherwise completely identical to the
normal login dir, i.e. it contains sockets for the service backends, used
to chroot login processes to, etc.
Makes default login socket configurable.
Performs some minor changes to src/login-common to build very sparse
protocols, e.g. avoid the need to implement methods that are not needed.
Timo Sirainen [Thu, 13 Sep 2012 14:12:59 +0000 (17:12 +0300)]
lib-storage: Message size/sent date could have been set as 0 in some cases.
It doesn't look like it ever happened with the current storage backends or
use cases.
Timo Sirainen [Thu, 13 Sep 2012 07:52:52 +0000 (10:52 +0300)]
lib-storage: Moved mail_storage_settings_to_index_flags to mail-storage-private.h
This is mainly to allow #including mail-storage-settings.h from C++ code
without having to #include mail-index.h from mail-storage-settings.h
Timo Sirainen [Tue, 11 Sep 2012 15:56:07 +0000 (18:56 +0300)]
i_get(pw|gr)(nam|uid): Use small initial buffer sizes.
For processes that need to do only a single lookup there's no point in
wasting a lot of memory for the maximum buffer size.
Timo Sirainen [Mon, 10 Sep 2012 14:19:43 +0000 (17:19 +0300)]
lib-storage: Removed rename_children parameter from mailbox_rename()
The children are now always renamed. The only reason this feature was added
in the first place was to make dsync's job easier, but this is no longer
needed.
Timo Sirainen [Wed, 5 Sep 2012 22:25:23 +0000 (01:25 +0300)]
dsync: Rewritten syncing for mailbox renames.
A few things didn't go as I originally intended in the algorithm, but it
appears to give consistent results now. :) But the algorithm should probably
be looked at more closely at some point.
Timo Sirainen [Wed, 5 Sep 2012 22:13:03 +0000 (01:13 +0300)]
Renamed buffer_create_*data() to buffer_create_from_*data() for consistency.
Especially i_stream_create_from_data() was a very similar function, which
made it difficult to remember which one should have "from" and which one
shouldn't.
Timo Sirainen [Sun, 2 Sep 2012 14:18:41 +0000 (17:18 +0300)]
imap-msgpart-url: Attempt to reuse selected mailbox instead of reallocating a new one.
Besides giving slightly better performace, this also fixes CATENATE for mbox
when source and destination mailboxes are the same.
Timo Sirainen [Thu, 30 Aug 2012 18:12:23 +0000 (21:12 +0300)]
Moved most of the IMAP LIST code to lib-storage.
Also removed MAILBOX_LIST_ITER_SHOW_EXISTING_PARENT flag, since there wasn't
any clearly good way to handle it. Some clients got confused when they saw
that foo/ mailbox was returned with \Noselect flag. Either they thought that
the mailbox was named foo/ or that foo was \Noselect. Pretty much the only
sane way to handle this would be to not make return \Noselect and to treat
foo and foo/ as equivalent in all commands, but that might cause trouble
with ACLs and similar checks..
Timo Sirainen [Wed, 29 Aug 2012 05:56:40 +0000 (08:56 +0300)]
Reverted some of the last hash table changes.
They caused hash table operations to dereference pointers, which caused
a compiler error if the type wasn't known.
Timo Sirainen [Tue, 28 Aug 2012 11:46:16 +0000 (14:46 +0300)]
lmtp proxy: Forward proxy_timeout to backend and set mail_max_lock_timeout based on it.
This automatically avoids duplicate mail deliveries caused by long lock
waits.