]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
10 years agolib-imap: Added imap_to_date()
Timo Sirainen [Thu, 23 Apr 2015 16:19:10 +0000 (19:19 +0300)] 
lib-imap: Added imap_to_date()

10 years agolib-storage: Fixed assert-crash with mailbox_list_index=yes if root mailbox name...
Timo Sirainen [Thu, 23 Apr 2015 13:33:19 +0000 (16:33 +0300)] 
lib-storage: Fixed assert-crash with mailbox_list_index=yes if root mailbox name was empty.
This happened if the index was used for a non-listable namespace whose
prefix started with the namespace separator (e.g. prefix="/expunged/")

10 years agoimapc: After auth failed, return failure immediately when opening a mailbox.
Timo Sirainen [Thu, 23 Apr 2015 10:37:22 +0000 (13:37 +0300)] 
imapc: After auth failed, return failure immediately when opening a mailbox.
Instead of trying to re-authenticate which again will most likely fail.
Based on patch by Michael M Slusarz

10 years agolib-storage: Small code cleanup for index_mail_get_binary_stream()
Timo Sirainen [Thu, 23 Apr 2015 10:27:17 +0000 (13:27 +0300)] 
lib-storage: Small code cleanup for index_mail_get_binary_stream()
stream_r is always non-NULL here. Also move unreferencing cache istream to
be last in case it might fix data.stream=NULL being here in some situations.

10 years agolib: Fixed reference counting in iostream-rawlog if either i/ostream wasn't used.
Timo Sirainen [Thu, 23 Apr 2015 10:01:50 +0000 (13:01 +0300)] 
lib: Fixed reference counting in iostream-rawlog if either i/ostream wasn't used.

10 years agolib: iostream_rawlog_create_from_stream() now allows input or output to be NULL.
Timo Sirainen [Thu, 23 Apr 2015 08:40:03 +0000 (11:40 +0300)] 
lib: iostream_rawlog_create_from_stream() now allows input or output to be NULL.

10 years agolib-storage: Fixed subscription file reading when file was (nearly) empty.
Timo Sirainen [Thu, 23 Apr 2015 08:20:53 +0000 (11:20 +0300)] 
lib-storage: Fixed subscription file reading when file was (nearly) empty.
Broken by the earlier changes.

10 years agolib-storage: Added support for subscriptions file version 2 format.
Timo Sirainen [Wed, 22 Apr 2015 15:17:10 +0000 (18:17 +0300)] 
lib-storage: Added support for subscriptions file version 2 format.
The v2 format's main benefit is that it doesn't write the hierarchy
separator to the subscriptions file, which allows the separator to be
changed without breaking subscriptions. This mainly affects LAYOUT=INDEX,
which doesn't have a native hardcoded separator.

The plan is to start writing v2 subscription files in Dovecot v2.3. So for
now we simply read such files and if we find v2 file we also modify it in v2
format, but we never create new v2 format files or convert v0 to v2.

10 years agofts-lucene: Fix to earlier commit: Header names must be indexed without libfts, not...
Timo Sirainen [Tue, 21 Apr 2015 20:00:08 +0000 (23:00 +0300)] 
fts-lucene: Fix to earlier commit: Header names must be indexed without libfts, not with.

10 years agofts-lucene: Optionally use lib-fts instead of CLucene's own analyzers.
Timo Sirainen [Tue, 21 Apr 2015 18:29:42 +0000 (21:29 +0300)] 
fts-lucene: Optionally use lib-fts instead of CLucene's own analyzers.
fts_lucene = use_libfts enables this.

10 years agofts: If backend has FTS_BACKEND_FLAG_TOKENIZED_INPUT set, index also the header name.
Timo Sirainen [Tue, 21 Apr 2015 18:28:41 +0000 (21:28 +0300)] 
fts: If backend has FTS_BACKEND_FLAG_TOKENIZED_INPUT set, index also the header name.
We were sending the hdr_name to the backend without tokenizing it or
filtering it, so the backend couldn't have done anything useful about it.

10 years agolib-fs: Fixed fs-posix to work with fs_iter_init(path="") when fs prefix wasn't set.
Timo Sirainen [Tue, 21 Apr 2015 17:59:48 +0000 (20:59 +0300)] 
lib-fs: Fixed fs-posix to work with fs_iter_init(path="") when fs prefix wasn't set.

10 years agolib-fts: Added normalizer-simple for doing normalization without libicu.
Timo Sirainen [Tue, 21 Apr 2015 17:16:36 +0000 (20:16 +0300)] 
lib-fts: Added normalizer-simple for doing normalization without libicu.

10 years agolib-fts: Fixed test-fts-filter to work again after previous normalizer changes.
Timo Sirainen [Tue, 21 Apr 2015 16:40:42 +0000 (19:40 +0300)] 
lib-fts: Fixed test-fts-filter to work again after previous normalizer changes.

10 years agolib-fts: Renamed normalizer to icu-normalizer, including the source code.
Timo Sirainen [Tue, 21 Apr 2015 16:36:27 +0000 (19:36 +0300)] 
lib-fts: Renamed normalizer to icu-normalizer, including the source code.

10 years agoconfigure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen [Tue, 21 Apr 2015 16:31:14 +0000 (19:31 +0300)] 
configure: s/normalizer/libicu/ since we it could be used for something else as well.

10 years agolmtp proxy: Include in log messages how long it took to deliver the mail.
Timo Sirainen [Tue, 21 Apr 2015 14:01:39 +0000 (17:01 +0300)] 
lmtp proxy: Include in log messages how long it took to deliver the mail.
In multi-RCPT TO sessions it's a bit unreliable to split the single DATA
reply's times to multiple lines, so instead each line just says
"(2/3 at 123 ms)" meaning that the second mail was delivered at the time
when 123 milliseconds had elapsed since the delivery was started.

10 years agolib-lda: Assume that the caller sets delivery_time_started
Timo Sirainen [Tue, 21 Apr 2015 13:54:51 +0000 (16:54 +0300)] 
lib-lda: Assume that the caller sets delivery_time_started
This is required because parts of the delivery time may be done at the time
the user is being initialized, so it needs to be set before the user init is
done.

10 years agolib-lda: mail_deliver_log() now updates the %{delivery_time} instead of using the...
Timo Sirainen [Tue, 21 Apr 2015 13:52:59 +0000 (16:52 +0300)] 
lib-lda: mail_deliver_log() now updates the %{delivery_time} instead of using the first cached value.
The first time the cached values are set the transaction isn't committed and
the mailbox isn't synced.

10 years agolib-lda: Added lmtp-client to track timestamps when various events happen.
Timo Sirainen [Tue, 21 Apr 2015 13:50:43 +0000 (16:50 +0300)] 
lib-lda: Added lmtp-client to track timestamps when various events happen.

10 years agoimap: Finishing previous commit by removing now-unnecessary code.
Timo Sirainen [Tue, 21 Apr 2015 11:08:12 +0000 (14:08 +0300)] 
imap: Finishing previous commit by removing now-unnecessary code.

10 years agoimap: Removed separate time counting from SELECT and SEARCH commands.
Timo Sirainen [Tue, 21 Apr 2015 11:06:41 +0000 (14:06 +0300)] 
imap: Removed separate time counting from SELECT and SEARCH commands.

10 years agoimap: Include in tagged reply how much running time each IMAP command takes.
Timo Sirainen [Tue, 21 Apr 2015 11:06:22 +0000 (14:06 +0300)] 
imap: Include in tagged reply how much running time each IMAP command takes.
The running time doesn't include time spent waiting for the client on
ioloop.

10 years agoimap: Small code cleanup.
Timo Sirainen [Tue, 21 Apr 2015 11:03:52 +0000 (14:03 +0300)] 
imap: Small code cleanup.
Removed all the checks of CLIENT_COMMAND_STATE_DONE to command_exec()
itself.

10 years agolda, lmtp: Added delivery_time and session_time variables to deliver_log_format
Timo Sirainen [Tue, 21 Apr 2015 10:19:24 +0000 (13:19 +0300)] 
lda, lmtp: Added delivery_time and session_time variables to deliver_log_format
session_time is meaningful only with LMTP. The delivery_time is separate for
each mail delivery. The results are in milliseconds now. If needed we could
add a new %modifier that converts it into secs.millisecs.

10 years agostats: num_cmds was always 0 in global stats
Timo Sirainen [Tue, 21 Apr 2015 08:13:51 +0000 (11:13 +0300)] 
stats: num_cmds was always 0 in global stats

10 years agolib-fts: Added udhr_fra.txt to EXTRA_DIST
Timo Sirainen [Tue, 21 Apr 2015 06:59:32 +0000 (09:59 +0300)] 
lib-fts: Added udhr_fra.txt to EXTRA_DIST

10 years agolib-fts: Added PropList.txt to EXTRA_DIST
Timo Sirainen [Mon, 20 Apr 2015 16:57:37 +0000 (19:57 +0300)] 
lib-fts: Added PropList.txt to EXTRA_DIST

10 years agolib-fts requires libexttextcat actually - don't even try to use textcat for it.
Timo Sirainen [Mon, 20 Apr 2015 15:08:56 +0000 (18:08 +0300)] 
lib-fts requires libexttextcat actually - don't even try to use textcat for it.
I'm also not sure yet if some libexttextcats are too old for it.

10 years agolib-fts: Updated Finnish/French stopword lists from Lucene code.
Timo Sirainen [Mon, 20 Apr 2015 15:02:31 +0000 (18:02 +0300)] 
lib-fts: Updated Finnish/French stopword lists from Lucene code.
Most importantly they added the licensing info to the files.

10 years agolib-fts: Fixed using FTS_NORMALIZER_CFLAGS/LIBS.
Timo Sirainen [Mon, 20 Apr 2015 14:45:32 +0000 (17:45 +0300)] 
lib-fts: Fixed using FTS_NORMALIZER_CFLAGS/LIBS.

10 years agolib-fts: Don't crash in test-fts-filter if libstemmer support isn't built in
Timo Sirainen [Mon, 20 Apr 2015 14:44:21 +0000 (17:44 +0300)] 
lib-fts: Don't crash in test-fts-filter if libstemmer support isn't built in

10 years agolib-fts: Fixed some wrong macro name checks.
Timo Sirainen [Mon, 20 Apr 2015 14:43:32 +0000 (17:43 +0300)] 
lib-fts: Fixed some wrong macro name checks.
Forgot to change these ones while renaming them..

10 years agolib-fts: Added missing stopwords_fi.txt
Timo Sirainen [Mon, 20 Apr 2015 14:40:12 +0000 (17:40 +0300)] 
lib-fts: Added missing stopwords_fi.txt

10 years agolib-fts: Fixed test-fts-language to use TEXTCAT_DATADIR
Timo Sirainen [Mon, 20 Apr 2015 14:33:09 +0000 (17:33 +0300)] 
lib-fts: Fixed test-fts-language to use TEXTCAT_DATADIR
This may still make too many assumptions about what data exists where.. So
we may need to remove this test from "make check". But for now leave it
there.

10 years agoconfigure: Fixed building without textcat.
Timo Sirainen [Mon, 20 Apr 2015 14:24:37 +0000 (17:24 +0300)] 
configure: Fixed building without textcat.

10 years agoconfigure: Added Debian Wheezy workaround for finding textcat.h
Timo Sirainen [Mon, 20 Apr 2015 14:08:42 +0000 (17:08 +0300)] 
configure: Added Debian Wheezy workaround for finding textcat.h

10 years agolib-fts: Fixed default textcat datadir paths.
Timo Sirainen [Mon, 20 Apr 2015 14:01:12 +0000 (17:01 +0300)] 
lib-fts: Fixed default textcat datadir paths.

10 years agoconfigure: Fixed linking with libexttextcat when it was found via pkg-config
Timo Sirainen [Mon, 20 Apr 2015 13:34:31 +0000 (16:34 +0300)] 
configure: Fixed linking with libexttextcat when it was found via pkg-config

10 years agofts: Added FTS_BACKEND_FLAG_TOKENIZED_INPUT, which is implemented via lib-fts.
Timo Sirainen [Mon, 20 Apr 2015 13:22:36 +0000 (16:22 +0300)] 
fts: Added FTS_BACKEND_FLAG_TOKENIZED_INPUT, which is implemented via lib-fts.

10 years agoInitial import for lib-fts.
Timo Sirainen [Mon, 20 Apr 2015 13:19:07 +0000 (16:19 +0300)] 
Initial import for lib-fts.
Parts of what this code does was already implemented internally by
fts-lucene. lib-fts is intended to be usable for all the FTS backends. The
APIs are still going to change a bit, but hopefully not after v2.2.17
release.

Mostly written by Teemu Huovila.

10 years agoconfigure: Fixed/improved finding and using libexttextcat.
Timo Sirainen [Mon, 20 Apr 2015 12:27:02 +0000 (15:27 +0300)] 
configure: Fixed/improved finding and using libexttextcat.
libexttextcat wasn't actually being used at all by fts-lucene. Now we'll
first prefer finding it via pkg-config, next finding exttextcat and only
last look up textcat.

10 years agoconfigure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen [Mon, 20 Apr 2015 12:12:14 +0000 (15:12 +0300)] 
configure: Stemmer and textcat checks are now done even if CLucene isn't used.
They'll be useful for other FTS backends as well. This patch doesn't change
any actual functionality.

10 years agofts: Code cleanup to do all index updates via fts_build_data()
Timo Sirainen [Mon, 20 Apr 2015 12:02:04 +0000 (15:02 +0300)] 
fts: Code cleanup to do all index updates via fts_build_data()
This doesn't actually change the behavior.

10 years agodoveadm fs delete -R: Don't add extra '/' chars in the middle of paths
Timo Sirainen [Fri, 17 Apr 2015 08:52:24 +0000 (11:52 +0300)] 
doveadm fs delete -R: Don't add extra '/' chars in the middle of paths

10 years agodovecot-config: Added lib-stats to LIBDOVECOT_INCLUDE
Timo Sirainen [Fri, 17 Apr 2015 08:20:23 +0000 (11:20 +0300)] 
dovecot-config: Added lib-stats to LIBDOVECOT_INCLUDE

10 years agolib-fs: fs_class_register() can now be called externally.
Timo Sirainen [Thu, 16 Apr 2015 15:20:15 +0000 (18:20 +0300)] 
lib-fs: fs_class_register() can now be called externally.

10 years agodoveadm mailbox metadata: The keys must always be lowercased.
Timo Sirainen [Thu, 16 Apr 2015 11:19:51 +0000 (14:19 +0300)] 
doveadm mailbox metadata: The keys must always be lowercased.
The keys need to be case-insensitive in IMAP, so the IMAP code always also
lowercases them.

10 years agostats: Fixed compiling with some OSes.
Timo Sirainen [Thu, 16 Apr 2015 09:59:05 +0000 (12:59 +0300)] 
stats: Fixed compiling with some OSes.
struct timeval wasn't necessarily already defined by existing includes.

10 years agolib: test-array build warnings on Solaris 10
Phil Carmody [Thu, 16 Apr 2015 08:46:22 +0000 (11:46 +0300)] 
lib: test-array build warnings on Solaris 10
Solaris cc doesn't think I've read N1570 6.7.9p11, 6.5.16.1p2, and 6.3.1.3p2,
and wants to save me from myself.

Reported-by: Juergen Obermann <http://www.dovecot.org/list/dovecot/2015-April/100427.html>
Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agoimapc: Added imapc_features=zimbra-workarounds
Timo Sirainen [Wed, 15 Apr 2015 18:01:11 +0000 (21:01 +0300)] 
imapc: Added imapc_features=zimbra-workarounds
Zimbra (at least v5.0.18_GA_3011.RHEL4_64) can return different headers
depending on whether the whole message body was fetched or only (partial)
headers. This probably happens only for invalid characters that are
translated into '?'. With this workaround enabled we don't use FETCH
BODY.PEEK[], but we do FETCH (BODY.PEEK[HEADER] BODY.PEEK[TEXT]) and merge
the results together. This way the results are always consistent and headers
don't suddenly change.

10 years agodict-file: Use tabescaping for keys and values to allow LFs in them.
Timo Sirainen [Tue, 14 Apr 2015 06:58:01 +0000 (09:58 +0300)] 
dict-file: Use tabescaping for keys and values to allow LFs in them.
Although this makes the format slightly incompatible, it's doubtful anybody
is using dict values containing \001 characters.

10 years agoauth: If passdb/userdb changes the username, add the changed username also to the...
Timo Sirainen [Mon, 13 Apr 2015 17:38:10 +0000 (20:38 +0300)] 
auth: If passdb/userdb changes the username, add the changed username also to the cache.

10 years agoauth: Setting userdb fields from cache didn't set handle any special fields.
Timo Sirainen [Mon, 13 Apr 2015 17:37:48 +0000 (20:37 +0300)] 
auth: Setting userdb fields from cache didn't set handle any special fields.
The special fields were relatively rarely used though.

10 years agoreplication plugin: Don't crash for users who don't have replication enabled.
Timo Sirainen [Mon, 13 Apr 2015 07:04:47 +0000 (10:04 +0300)] 
replication plugin: Don't crash for users who don't have replication enabled.

10 years agolib: Added json-tree API for parsing JSON input into a tree structure.
Timo Sirainen [Wed, 8 Apr 2015 04:55:35 +0000 (13:55 +0900)] 
lib: Added json-tree API for parsing JSON input into a tree structure.
This makes it easier to access complicated JSON structs that can fit into
memory.

10 years agolib-index: Added reason_r parameter to mail_transaction_log_view_set()
Timo Sirainen [Mon, 6 Apr 2015 03:07:32 +0000 (12:07 +0900)] 
lib-index: Added reason_r parameter to mail_transaction_log_view_set()
This is used to improve some of the error messages about index corruption.

10 years agorawlog: Flush output to disk every second instead of only when buffer is full.
Timo Sirainen [Mon, 6 Apr 2015 02:39:34 +0000 (11:39 +0900)] 
rawlog: Flush output to disk every second instead of only when buffer is full.

10 years agoconfigure: Added --with-textcat parameter
Timo Sirainen [Thu, 2 Apr 2015 23:53:45 +0000 (08:53 +0900)] 
configure: Added --with-textcat parameter

10 years agodsync: Improved error message when remote dsync-server couldn't be started.
Timo Sirainen [Wed, 1 Apr 2015 23:12:41 +0000 (08:12 +0900)] 
dsync: Improved error message when remote dsync-server couldn't be started.

10 years agodsync: Don't try to use the new "finish" state with old dsync versions.
Timo Sirainen [Tue, 31 Mar 2015 16:16:57 +0000 (01:16 +0900)] 
dsync: Don't try to use the new "finish" state with old dsync versions.

10 years agoMakefile: Build lib-dovecot before lib-compression
Timo Sirainen [Fri, 27 Mar 2015 23:23:47 +0000 (01:23 +0200)] 
Makefile: Build lib-dovecot before lib-compression
Because lib-compression depends on it.

10 years agoquota: Added debug information for quota_over_flag handling.
Timo Sirainen [Fri, 27 Mar 2015 21:39:30 +0000 (23:39 +0200)] 
quota: Added debug information for quota_over_flag handling.

10 years agoconfigure: Add missing (auto) to autodetected options.
Teemu Huovila [Wed, 25 Mar 2015 08:11:35 +0000 (10:11 +0200)] 
configure: Add missing (auto) to autodetected options.

10 years agolib-compression: Use libdovecot.so as dependency. Don't include liblib.a itself!
Timo Sirainen [Fri, 27 Mar 2015 16:04:51 +0000 (18:04 +0200)] 
lib-compression: Use libdovecot.so as dependency. Don't include liblib.a itself!

10 years agoimapc: Don't assert-crash when trying to sync a mailbox with MAILBOX_FLAG_SAVEONLY.
Timo Sirainen [Fri, 27 Mar 2015 13:12:50 +0000 (15:12 +0200)] 
imapc: Don't assert-crash when trying to sync a mailbox with MAILBOX_FLAG_SAVEONLY.
We can just skip the sync, because we don't do anything except save mails.

10 years agoquota: When reporting quota value/limit in kilobytes, round the value upwards.
Timo Sirainen [Fri, 27 Mar 2015 12:31:01 +0000 (14:31 +0200)] 
quota: When reporting quota value/limit in kilobytes, round the value upwards.
Most importantly this doesn't truncate <1024 values to 0, which also in
quota limit means unlimited.

10 years agoauth: Don't add original_user or auth_user to passdb reply if they already exist.
Timo Sirainen [Fri, 27 Mar 2015 09:02:18 +0000 (11:02 +0200)] 
auth: Don't add original_user or auth_user to passdb reply if they already exist.
This allows passdb to override their values cleanly.

10 years agoimapc: Fix to previous change - labels are strings and not atoms.
Timo Sirainen [Tue, 24 Mar 2015 09:27:26 +0000 (11:27 +0200)] 
imapc: Fix to previous change - labels are strings and not atoms.
Allow also atoms just in case

10 years agoimapc: Ignore \Muted GMail label
Timo Sirainen [Tue, 24 Mar 2015 09:14:58 +0000 (10:14 +0100)] 
imapc: Ignore \Muted GMail label

10 years agolib-storage: Added mailbox_list_fs_get_list()
Timo Sirainen [Sun, 22 Mar 2015 18:54:29 +0000 (20:54 +0200)] 
lib-storage: Added mailbox_list_fs_get_list()
Using mailbox_list_init_fs() now sets the mailbox_list pointer to root fs,
which allows the fs backends to lookup the list. Although this can't be done
in the init() function since the list is set only afterwards.

10 years agolib-fs: Added support for module_contexts in fs.
Timo Sirainen [Sun, 22 Mar 2015 18:52:56 +0000 (20:52 +0200)] 
lib-fs: Added support for module_contexts in fs.
They could also be added to fs_file if needed, but for now I didn't bother
adding it.

10 years agolib-fs: When autoloading fs plugins with '-' in the name, translate them to '_'
Timo Sirainen [Sun, 22 Mar 2015 18:52:16 +0000 (20:52 +0200)] 
lib-fs: When autoloading fs plugins with '-' in the name, translate them to '_'
It's not possible for the function names to contain '-' in any case. Also
Dovecot in general uses '-' instead of '_' in the configuration names. This
change actually allows using either of them.

10 years agoCleanup for libcharset's iconv linking.
Timo Sirainen [Sun, 22 Mar 2015 16:59:51 +0000 (18:59 +0200)] 
Cleanup for libcharset's iconv linking.
Linking libcharset.la now automatically links with the necessary iconv
libraries.

10 years agolib: Fixed potential build error when building without modules.
Timo Sirainen [Fri, 20 Mar 2015 19:58:16 +0000 (21:58 +0200)] 
lib: Fixed potential build error when building without modules.

10 years agolib-dict: Fixed crash when transaction failed due to dict server disconnection.
Timo Sirainen [Fri, 20 Mar 2015 19:13:21 +0000 (21:13 +0200)] 
lib-dict: Fixed crash when transaction failed due to dict server disconnection.

10 years agolib: o_stream_create_rawlog_from_stream() should preserve the output stream fd.
Timo Sirainen [Fri, 20 Mar 2015 19:01:08 +0000 (21:01 +0200)] 
lib: o_stream_create_rawlog_from_stream() should preserve the output stream fd.
ostream-rawlog is just a passthrough stream after all.

10 years agodoveadm: Added -h parameter to hide header line from tab and table formatter output.
Timo Sirainen [Fri, 20 Mar 2015 18:46:52 +0000 (20:46 +0200)] 
doveadm: Added -h parameter to hide header line from tab and table formatter output.

10 years agoRemoved mountpoint checking and updating code.
Timo Sirainen [Fri, 20 Mar 2015 11:27:00 +0000 (13:27 +0200)] 
Removed mountpoint checking and updating code.
After a few years it seems like it has just caused more problems than it has
actually fixed. The only thing it's been used for is to make sure that
Dovecot can't create empty user directories when the user's mail filesystem
isn't mounted. But that's supposed to be normally prevented already if the
mount root directory permissions are only writable by root.

For now the mountpoint listing code and doveadm mount code still exists just
in case people have some scripts using those. Those could be removed in v2.3.

If we somehow figured out which mountpoints existed (not so easy because
they could be only visible in userdb lookups for different users), we could
maybe create some kind of a script that checks the permissions at startup.
This would work with Linux at least:

mkdir test
mount / -o bind test
ls -ld test/var/mail # assuming /var/mail mountpoint
umount test

10 years agodsync: Fixed returning wrong mail_error in some remote dsync.
Timo Sirainen [Thu, 19 Mar 2015 08:01:18 +0000 (10:01 +0200)] 
dsync: Fixed returning wrong mail_error in some remote dsync.

10 years agoimapc: Don't wait for login to succeed at mailbox list creation.
Timo Sirainen [Wed, 18 Mar 2015 23:24:32 +0000 (01:24 +0200)] 
imapc: Don't wait for login to succeed at mailbox list creation.
The failure will be visible in the next command. This wait was here mainly
for imap, but cbdfca7d24a6 implements the wait in imap process directly.
Other (current) protocols don't need such wait at all.

Most importantly this change allows doveadm to handle imapc login failures
by seeing them as MAIL_ERROR_PERM errors when listing mailboxes or opening a
mailbox. This allows it to return a different exit code from temporary
failure (which it is not).

10 years agoimapc: Don't crash in mailbox_is_inconsistent() with unopened mailbox.
Timo Sirainen [Wed, 18 Mar 2015 23:21:20 +0000 (01:21 +0200)] 
imapc: Don't crash in mailbox_is_inconsistent() with unopened mailbox.

10 years agoimap: If mailbox list is unusable at startup, return failure immediately.
Timo Sirainen [Wed, 18 Mar 2015 23:20:38 +0000 (01:20 +0200)] 
imap: If mailbox list is unusable at startup, return failure immediately.
This is currently used only by imapc when login fails.

10 years agodsync: Use storage's mail_error to choose the doveadm exit code.
Timo Sirainen [Wed, 18 Mar 2015 22:41:19 +0000 (00:41 +0200)] 
dsync: Use storage's mail_error to choose the doveadm exit code.
Instead of always assuming that all errors are EX_TEMPFAIL.

10 years agoimapc: If authentication fails, preserve the error message as storage/list error.
Timo Sirainen [Wed, 18 Mar 2015 22:38:01 +0000 (00:38 +0200)] 
imapc: If authentication fails, preserve the error message as storage/list error.
This isn't very helpful yet, because the mailbox list creation itself fails.

10 years agolib-storage: mailbox_list_mailbox() now copies the mailbox_exists() error.
Timo Sirainen [Wed, 18 Mar 2015 22:32:44 +0000 (00:32 +0200)] 
lib-storage: mailbox_list_mailbox() now copies the mailbox_exists() error.
Instead of assuming it has to be an internal error.

10 years agolib: buffer - paranoid compile-time check for struct sizes
Phil Carmody [Wed, 18 Mar 2015 15:10:23 +0000 (17:10 +0200)] 
lib: buffer - paranoid compile-time check for struct sizes
At the moment, nothing guarantees that the public struct is big
enough to contain the private struct.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib: bits - improve bits_required to recurse downwards, not sideways
Phil Carmody [Wed, 18 Mar 2015 15:10:03 +0000 (17:10 +0200)] 
lib: bits - improve bits_required to recurse downwards, not sideways
Ooops.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib: bits - Add macro for '1 << i'
Phil Carmody [Wed, 18 Mar 2015 15:09:30 +0000 (17:09 +0200)] 
lib: bits - Add macro for '1 << i'
It's used all over the place. It feels weird not having access to such a macro.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agofts: Fixed assert-crash if fts-parser was created for a body part that backend didn...
Timo Sirainen [Wed, 18 Mar 2015 11:43:35 +0000 (13:43 +0200)] 
fts: Fixed assert-crash if fts-parser was created for a body part that backend didn't want to index.

10 years agoauth ldap: Crashfixes for earlier changes.
Timo Sirainen [Tue, 17 Mar 2015 15:30:33 +0000 (17:30 +0200)] 
auth ldap: Crashfixes for earlier changes.
Hopefully works correctly now

10 years agoauth ldap: Fixed crash when handling invalid SSL option.
Timo Sirainen [Tue, 17 Mar 2015 08:49:20 +0000 (10:49 +0200)] 
auth ldap: Fixed crash when handling invalid SSL option.

10 years agoauth ldap: Fixed assert-crash when both passdb ldap and userdb ldap was used
Timo Sirainen [Tue, 17 Mar 2015 07:58:03 +0000 (09:58 +0200)] 
auth ldap: Fixed assert-crash when both passdb ldap and userdb ldap was used

10 years agoauth ldap: Start LDAP connection only after auth process initialization is finished.
Timo Sirainen [Mon, 16 Mar 2015 21:25:34 +0000 (23:25 +0200)] 
auth ldap: Start LDAP connection only after auth process initialization is finished.
This way even if connecting to LDAP takes a while it won't cause the master
process to kill the auth process due to it not sending the startup "I'm ok"
notification early enough.

10 years agoauth ldap: Make sure config file path is included in all fatal error messages.
Timo Sirainen [Mon, 16 Mar 2015 21:21:05 +0000 (23:21 +0200)] 
auth ldap: Make sure config file path is included in all fatal error messages.

10 years agoauth ldap: If any tls_* settings are given when they're not supported, fail with...
Timo Sirainen [Mon, 16 Mar 2015 21:17:39 +0000 (23:17 +0200)] 
auth ldap: If any tls_* settings are given when they're not supported, fail with fatal instead of just warning.
These may be important for intended security, especially tls_cipher_suite.
We shouldn't allow setting them and then somewhat silently just ignore them.

10 years agoauth ldap: Call ldap_init*() already at db_ldap_init().
Timo Sirainen [Mon, 16 Mar 2015 21:14:49 +0000 (23:14 +0200)] 
auth ldap: Call ldap_init*() already at db_ldap_init().
ldap_init*() doesn't start connecting yet, but this way we can verify that
all the settings are correct.

10 years agoauth ldap: More concentration of i_fatal() calls to db_ldap_init()
Timo Sirainen [Mon, 16 Mar 2015 21:03:10 +0000 (23:03 +0200)] 
auth ldap: More concentration of i_fatal() calls to db_ldap_init()

10 years agoauth ldap: Moved more LDAP fatal checks to db_ldap_init()
Timo Sirainen [Mon, 16 Mar 2015 20:55:47 +0000 (22:55 +0200)] 
auth ldap: Moved more LDAP fatal checks to db_ldap_init()

10 years agoauth ldap: Improved ldap_initialize() failure's error logging.
Timo Sirainen [Mon, 16 Mar 2015 20:48:39 +0000 (22:48 +0200)] 
auth ldap: Improved ldap_initialize() failure's error logging.