diff -Nru dovecot-2.2.33.2/aclocal.m4 dovecot-2.3.3/aclocal.m4 --- dovecot-2.2.33.2/aclocal.m4 2017-10-20 13:34:47.000000000 +0000 +++ dovecot-2.3.3/aclocal.m4 2018-10-01 10:40:09.000000000 +0000 @@ -2857,10 +2857,93 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ac_checktype2.m4]) +m4_include([m4/ac_typeof.m4]) +m4_include([m4/arc4random.m4]) +m4_include([m4/blockdev.m4]) +m4_include([m4/c99_vsnprintf.m4]) +m4_include([m4/cc_clang.m4]) +m4_include([m4/cc_fortify.m4]) +m4_include([m4/cc_pie.m4]) +m4_include([m4/cc_retpoline.m4]) +m4_include([m4/cc_stack_protector.m4]) +m4_include([m4/cflags.m4]) +m4_include([m4/clock_gettime.m4]) +m4_include([m4/crypt.m4]) +m4_include([m4/crypt_xpg6.m4]) +m4_include([m4/dbqlk.m4]) +m4_include([m4/dirent_dtype.m4]) +m4_include([m4/dovecot.m4]) +m4_include([m4/fd_passing.m4]) +m4_include([m4/fdatasync.m4]) +m4_include([m4/flexible_array_member.m4]) +m4_include([m4/glibc.m4]) +m4_include([m4/gmtime_max.m4]) +m4_include([m4/gmtime_tm_gmtoff.m4]) +m4_include([m4/ioloop.m4]) +m4_include([m4/iovec.m4]) +m4_include([m4/ipv6.m4]) +m4_include([m4/ld_relro.m4]) +m4_include([m4/ld_whole_archive.m4]) +m4_include([m4/libcap.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/libwrap.m4]) +m4_include([m4/linux_mremap.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/mmap_write.m4]) +m4_include([m4/mntctl.m4]) +m4_include([m4/modules.m4]) +m4_include([m4/notify.m4]) +m4_include([m4/nsl.m4]) +m4_include([m4/off_t_max.m4]) +m4_include([m4/pr_set_dumpable.m4]) +m4_include([m4/q_quotactl.m4]) +m4_include([m4/quota.m4]) +m4_include([m4/random.m4]) +m4_include([m4/rlimit.m4]) +m4_include([m4/sendfile.m4]) +m4_include([m4/size_t_signed.m4]) +m4_include([m4/sockpeercred.m4]) +m4_include([m4/sql.m4]) +m4_include([m4/ssl.m4]) +m4_include([m4/st_tim.m4]) +m4_include([m4/static_array.m4]) +m4_include([m4/test_with.m4]) +m4_include([m4/time_t.m4]) +m4_include([m4/typeof.m4]) +m4_include([m4/typeof_dev_t.m4]) +m4_include([m4/unsetenv.m4]) +m4_include([m4/uoff_t_max.m4]) +m4_include([m4/vararg.m4]) m4_include([m4/want_apparmor.m4]) -m4_include([dovecot.m4]) -m4_include([libtool.m4]) -m4_include([ltoptions.m4]) -m4_include([ltsugar.m4]) -m4_include([ltversion.m4]) -m4_include([lt~obsolete.m4]) +m4_include([m4/want_bsdauth.m4]) +m4_include([m4/want_bzlib.m4]) +m4_include([m4/want_cassandra.m4]) +m4_include([m4/want_cdb.m4]) +m4_include([m4/want_checkpassword.m4]) +m4_include([m4/want_clucene.m4]) +m4_include([m4/want_db.m4]) +m4_include([m4/want_gssapi.m4]) +m4_include([m4/want_icu.m4]) +m4_include([m4/want_ldap.m4]) +m4_include([m4/want_lua.m4]) +m4_include([m4/want_lz4.m4]) +m4_include([m4/want_lzma.m4]) +m4_include([m4/want_mysql.m4]) +m4_include([m4/want_pam.m4]) +m4_include([m4/want_passwd.m4]) +m4_include([m4/want_pgsql.m4]) +m4_include([m4/want_prefetch.m4]) +m4_include([m4/want_shadow.m4]) +m4_include([m4/want_sia.m4]) +m4_include([m4/want_sodium.m4]) +m4_include([m4/want_solr.m4]) +m4_include([m4/want_sqlite.m4]) +m4_include([m4/want_stemmer.m4]) +m4_include([m4/want_textcat.m4]) +m4_include([m4/want_vpopmail.m4]) +m4_include([m4/want_zlib.m4]) +m4_include([m4/warnings.m4]) diff -Nru dovecot-2.2.33.2/AUTHORS dovecot-2.3.3/AUTHORS --- dovecot-2.2.33.2/AUTHORS 2017-06-23 11:18:28.000000000 +0000 +++ dovecot-2.3.3/AUTHORS 2018-06-18 18:15:32.000000000 +0000 @@ -17,4 +17,6 @@ Portions Copyright (c) 2008 Apple Inc. All rights reserved. +Blowfish code by Solar Designer + Grepping 'Patch by' from ChangeLog shows up more people. diff -Nru dovecot-2.2.33.2/ChangeLog dovecot-2.3.3/ChangeLog --- dovecot-2.2.33.2/ChangeLog 2017-10-20 13:35:03.000000000 +0000 +++ dovecot-2.3.3/ChangeLog 2018-10-01 10:40:29.000000000 +0000 @@ -1,9571 +1,33175 @@ -2017-10-20 16:34:22 +0300 Timo Sirainen (d6601f4ec) +2018-10-01 13:36:56 +0300 Timo Sirainen (dcead646b) - Released v2.2.33.2. + Released v2.3.3. M NEWS M configure.ac -2017-10-19 15:39:28 +0300 Timo Sirainen (366d80c44) +2018-08-23 20:29:58 +0300 Aki Tuomi (b96be88f9) - auth: Fix %{ldap_dn} not to leak memory + submission: Reorder initialization code + login_set socket paths get invalidated when master_service_init_finish is + called, so we need to run the code that uses them before this. -M src/auth/db-ldap.c +M src/submission/main.c -2017-10-16 15:41:56 +0300 Timo Sirainen (b06c43234) +2018-08-23 19:15:50 +0300 Aki Tuomi (3413ea118) - cassandra: Support "timestamp" type fields properly + lib-smtp: Increase memory pool initial sizes - Fixes setting them with prepared statements. Reading them never worked - earlier. + This reduces malloc traffic -M src/lib-sql/driver-cassandra.c +M src/lib-http/test-http-client-errors.c +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-transaction.c +M src/lib-smtp/smtp-reply-parser.c +M src/lib-smtp/smtp-server-command.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-transaction.c -2017-10-16 15:12:12 +0300 Timo Sirainen (5d4780b89) +2018-06-20 00:22:47 +0200 Stephan Bosch (999c74680) - cassandra: Include "prepared" when logging about prepared statement queries + lib-smtp: server: Fix memory leak occurring when an error occurs early for + BDAT/BURL. - Mainly useful for debugging/testing. -M src/lib-sql/driver-cassandra.c +M src/lib-smtp/smtp-server-cmd-data.c +M src/lib-smtp/smtp-server-connection.c -2017-10-16 14:49:56 +0300 Timo Sirainen (be665d47d) +2018-06-20 15:54:21 +0200 Stephan Bosch (2636474cc) - cassandra: Fix using bigint types with unprepared statements + lib-smtp: server: connection: Rely on i_stream_destroy(NULL) being a no-op. - This reverts the code to not using the statements with binding at all. - Alternative fix would be to start using explicit int32 or int64 parameter - types, but that breaks backwards compatibility a bit. -M src/lib-sql/driver-cassandra.c +M src/lib-smtp/smtp-server-connection.c -2017-10-14 12:54:18 +0300 Timo Sirainen (758404a3b) +2018-06-20 00:31:43 +0200 Stephan Bosch (d25951928) - doveadm proxy: Don't crash if remote doesn't support log proxying + lib-smtp: server: Restructure reference counting of BDAT/BURL chain stream. + It is now dereferenced directly, rather than via a local variable; thereby + making sure it is reset to NULL. -M src/doveadm/server-connection.c +M src/lib-smtp/smtp-server-cmd-data.c -2017-10-11 19:43:04 +0300 Timo Sirainen (e9afa7f18) +2018-06-29 14:37:36 +0300 Timo Sirainen (0c22bd104) - Released v2.2.33.1. + director: Fix assert-crash when doveadm disconnects immediately after + sending command + Any command that requires a ring sync should cause the doveadm connection to + wait until the ring is synced. However, if the disconnection happened early + enough the connection is deinitialized before the ring sync is finished. -M NEWS -M configure.ac + Fixes: Panic: file doveadm-connection.c: line 1097 + (doveadm_connection_deinit): assertion failed: (conn->to_ring_sync_abort == + NULL) -2017-10-11 13:03:51 +0300 Timo Sirainen (4da63b2e6) +M src/director/doveadm-connection.c - lib-master: Allow a second log initialization after settings have been read. +2018-09-19 11:32:08 +0300 Timo Sirainen (2fbbccc0a) - This fixes logging with services that bypass the log service (lda or -L - parameter). + director: Add assert to make sure doveadm connection's IO isn't added + multiple times -M src/lib-master/master-service.c -2017-10-10 18:20:31 +0300 Timo Sirainen (68b0a183e) +M src/director/doveadm-connection.c - Released v2.2.33. +2018-09-07 20:04:48 +0300 Timo Sirainen (ae44bab08) + doveadm: Make sure to stop running commands requiring synced ring when ring + is no longer synced -M NEWS -M configure.ac + A command could desync the ring, and no more commands should be run + afterwards. -2017-10-10 15:38:13 +0300 Timo Sirainen (8945785ec) + This also fixes a bug where a command that desyncs the ring is supposed to + wait for the ring being synced before returning OK, but returns it + immediately instead. - lib: ostream-multiplex - ignore flush return value +M src/director/doveadm-connection.c +M src/director/doveadm-connection.h +M src/director/main.c - There's nothing that can be done about it at close() time. Silences static - analyzer warnings. +2018-01-03 15:54:15 +0200 Phil Carmody (14e4920d8) -M src/lib/ostream-multiplex.c + lib/printf-format-fix: fix rejection of "%.0f" as a valid string -2017-10-10 15:37:39 +0300 Timo Sirainen (81157ad22) + Sometimes you want to calculate in floats, but don't want the decimals + printed. - lib: ostream-multiplex - remove unnecessary flushes + Signed-off-by: Phil Carmody +M src/lib/printf-format-fix.c +M src/lib/test-printf-format-fix.c -M src/lib/ostream-multiplex.c +2018-09-19 22:26:08 +0200 Stephan Bosch (8b8464b5d) -2017-10-10 12:52:15 +0300 Aki Tuomi (3af85d6bb) + lib-smtp: reply-parser: Fix closing the text_lines array with NULL sentinel. - doveadm-mail-crypt: Do not return prematurely in key generate + For (EHLO) replies with more than 7 lines, the text_lines array of the reply + did not end in NULL, causing a segfault. - Broken by 446d7d9ddfe122e152b832c13fc28d164ae2c5e9 +M src/lib-smtp/smtp-reply-parser.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c +2018-09-20 19:34:33 +0300 Timo Sirainen (1e1acce32) -2017-10-10 12:33:08 +0300 Timo Sirainen (e168b589d) + Released v2.3.3.rc1. - lib: istream-multiplex - Minor optimization - There's no need to find channel when we already know it. This also helps - static analyzers to understand that req_channel can't be NULL. +M NEWS +M configure.ac -M src/lib/istream-multiplex.c +2018-09-13 15:30:22 +0300 Timo Sirainen (8561dd773) -2017-10-06 09:02:49 +0300 Aki Tuomi (40770486f) + lib: i_zero*() - Give compiler error if it's wrongly used on an array - ostream-multiplex: Check flush return value +M src/lib/macros.h -M src/lib/ostream-multiplex.c +2018-09-13 15:29:45 +0300 Timo Sirainen (fafbf8400) -2017-10-06 08:55:33 +0300 Aki Tuomi (af9672c1e) + lib-master, auth: Fix clearing memory - test-ostream-escaped: Check flush return value + It doesn't look like these being wrong were causing any bugs. - Found by coverity +M src/auth/password-scheme-sodium.c +M src/lib-master/master-service-haproxy.c -M src/lib/test-ostream-escaped.c +2018-09-11 15:54:39 +0300 Timo Sirainen (c19068daf) -2017-10-06 08:54:38 +0300 Aki Tuomi (ed64529a7) + doveadm stats dump: Fix potentially not writing all stats output - doveadm-server: Remove flush before multiplex + It depended on whether uninitialized stack memory was 0 or not. - It's not really necessary, found by coverity +M src/doveadm/doveadm-stats.c -M src/doveadm/client-connection.c +2018-08-17 11:34:02 +0300 Timo Sirainen (313be4a02) -2017-10-06 08:52:18 +0300 Aki Tuomi (a1cbe6d45) + lib: Mark signal waiting IO as "never wait alone" - iostream-multiplex: Check return values in tests + This signal is being automatically moved to nested ioloops. It can't be the + only IO being waited, since there's no code that simply wants to wait for a + signal. +M src/lib/lib-signals.c -M src/lib/test-istream-multiplex.c -M src/lib/test-multiplex.c -M src/lib/test-ostream-multiplex.c +2018-08-17 11:33:17 +0300 Timo Sirainen (658e58b02) -2017-10-06 08:46:00 +0300 Aki Tuomi (981447121) + lib: ioloop-epoll/kqueue: Remove now unnecessary infinite wait check. - doveadm: Return after destroying connection + The previous change adds this globally to io_loop_run_get_wait_time(). - Prevents NULL deferences, found by coverity. +M src/lib/ioloop-epoll.c +M src/lib/ioloop-kqueue.c -M src/doveadm/server-connection.c +2018-08-17 11:32:10 +0300 Timo Sirainen (e73415715) -2017-08-17 14:17:46 +0300 Timo Sirainen (577616b71) + lib: Add io_set_never_wait_alone() - doveadm mcp keypair generate: Fix -f parameter + If ioloop is run without any timeouts and without IOs that don't have this + flag, assert-crash rather than going to infinite wait. +M src/lib/ioloop-private.h +M src/lib/ioloop.c +M src/lib/ioloop.h -M src/plugins/mail-crypt/doveadm-mail-crypt.c +2018-08-17 11:29:30 +0300 Timo Sirainen (16fd1766d) -2017-10-06 14:39:00 +0300 Timo Sirainen (b9ead8d45) + lib: Add and use io_loop_run_get_wait_time() - pop3: Expand settings to fix rawlog_dir + This is going to be called just before running an ioloop iteration. The next + commit improves its behavior. - Even if %variables weren't used in rawlog_dir, the path was always prefixed - with "0". +M src/lib/ioloop-epoll.c +M src/lib/ioloop-kqueue.c +M src/lib/ioloop-poll.c +M src/lib/ioloop-private.h +M src/lib/ioloop-select.c +M src/lib/ioloop.c -M src/pop3/main.c +2018-09-07 10:43:43 -0400 Josef 'Jeff' Sipek (3ecffb14a) -2017-10-06 12:47:06 +0300 Martti Rannanjärvi (154a011b9) + lib-storage: Don't try to deserialize bodystructure if we already have it - doveadm-mail-crypt: Print existing folder key hash when aborting generate + Fixes: Panic: file message-part-data.c: line 37 + (message_part_data_is_plain_7bit): assertion failed: (data != NULL) +M src/lib-storage/index/index-mail.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c +2018-09-06 11:07:22 -0400 Josef 'Jeff' Sipek (97e8c8279) -2017-10-06 11:07:23 +0300 Martti Rannanjärvi (e46dc6c96) + lib-storage: Simplify an assertion condition - doveadm-mail-crypt: Print existing userkey hash when aborting generate + Since the i_assert() is guarded by a check for save_bodystructure_header + being true, the whole condition can be simplified. +M src/lib-storage/index/index-mail-headers.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c +2018-09-06 11:06:17 -0400 Josef 'Jeff' Sipek (8c87b9417) -2017-10-05 15:53:16 +0300 Aki Tuomi (dc88b0d8c) + lib-storage: Don't try to process header if we haven't parsed the body + structure - mail-crypt: Improve doveadm output + Fixes: Panic: file index-mail-headers.c: line 294 (index_mail_parse_header): + assertion failed: (part != NULL) +M src/lib-storage/index/index-mail-headers.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c +2018-08-31 15:06:09 +0300 Timo Sirainen (d54d97c06) -2017-10-05 15:40:45 +0300 Aki Tuomi (424deab0a) + lib: Move log type to be written before appended log prefix - mail-crypt: Fix key generation handling + This changes the logging format back to how it used to be before the event + logging changes. - Userkey generation would not set all required fields. +M src/lib/event-log.c +M src/lib/lib-event.h +M src/lib/test-event-log.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c +2018-08-31 15:03:37 +0300 Timo Sirainen (a50f08645) -2017-10-09 18:21:24 +0300 Aki Tuomi (d5488dcd3) + lib: Add failure_context.log_prefix_type_pos - ostream-multiplex: Unreference stream parent + If non-zero, this specifies where the log type (e.g. "Info: ") is written + within the log prefix. By default it's appended. - Otherwise it won't get free'd. +M src/lib/failures.c +M src/lib/failures.h -M src/lib/ostream-multiplex.c +2018-08-31 15:01:38 +0300 Timo Sirainen (f69253fd4) -2017-10-09 13:55:06 +0300 Timo Sirainen (beb9d9256) + lib, log: Add log prefix length to internal logging protocol - doveadm: Add remote(host) prefix to all proxied logs + This way log process knows which part of the text is the log prefix, and + which part is the logged text. +M src/lib/failures.c +M src/lib/failures.h +M src/log/log-connection.c -M src/doveadm/server-connection.c +2018-08-31 14:57:13 +0300 Timo Sirainen (6571120bd) -2017-10-09 14:28:17 +0300 Timo Sirainen (2c0c73fe7) + log: Move data stack frame allocation to parent function - doveadm log test: Fix it to work again + This simplifies the next commit, which requires data stack nearly always + when logging. The data stack frames are cheap enough that we don't really + need to optimize for avoiding the cases when they're not needed. - Broken by 719abeb2088987f213a33a7dd1fe78958beaef03 +M src/log/log-connection.c -M src/doveadm/doveadm-log.c +2018-08-31 14:54:18 +0300 Timo Sirainen (83a59a536) -2017-10-09 13:19:32 +0300 Timo Sirainen (e0456dc06) + log: Avoid unnecessary global log prefix changes - lib: ostream-multiplex - set ostream_private.parent + If the context specifies a log prefix, the global prefix isn't going to be + used. - Unlike with istream-multiplex, there are no issues with I/Os. Only the - parent stream will have the I/O. Using the default parent adds the missing - methods that otherwise would have needed to be implemented: - - cork - - flush_pending - - switch_ioloop +M src/log/log-connection.c -M src/lib/ostream-multiplex.c +2018-08-31 14:50:52 +0300 Timo Sirainen (38dade51b) -2017-10-09 13:14:23 +0300 Timo Sirainen (1c777b3e4) + lib: failures - Use common log_prefix_add() for default and syslog + formatters - lib: istream-multiplex - Forward i_stream_switch_ioloop() to parent - Most istreams do this because istream_private.parent is set to the parent - stream, but this can't be done with istream-multiplex. The main problem with - attempting to do the same with istream-multiplex is that the different - channels don't share the same I/O. Just because one channel received data - doesn't mean that other channels received any data. (It would be possible to - solve this by implementing a new method that allows overriding - i_stream_set_io(), but I'm not sure if that's a good idea either.) +M src/lib/failures.c -M src/lib/istream-multiplex.c +2018-08-28 12:45:23 +0300 Timo Sirainen (d0a7f6c69) -2017-10-09 01:22:47 +0300 Timo Sirainen (d1b011901) + lib: Add unit test for event log prefix handling - acl: Fix compiler warning with -Wstrict-bool + Some of the tests are commented out until they're fixed in a following + commit. +M src/lib/Makefile.am +A src/lib/test-event-log.c +M src/lib/test-lib.inc -M src/plugins/acl/acl-backend-vfile.c +2018-08-31 14:30:21 +0300 Timo Sirainen (da55b6a75) -2017-10-06 16:55:28 +0300 Timo Sirainen (b1b550153) + lib: failures - Move adding LF from default_format() to default_write() - acl: Fix checking create (k) permission in global acl-file + This makes it similar to internal_format/write() - Just because the global ACL file hasn't changed since it was last refreshed - for another ACL object, it doesn't mean that those ACLs don't need to be - applied to this ACL object. +M src/lib/failures.c - This didn't usually cause problems, because the initial ACL object refresh - was always done due to local-path refresh returning "needs a refresh". The - only exception was when acl_object_init_from_parent() was called, because it - added an empty non-NULL validity for the local-path, so the - "needs a refresh" wasn't returned. This happened only when trying to CREATE - or RENAME mailbox under a parent where user didn't have create permissions. +2018-08-31 14:21:06 +0300 Timo Sirainen (7ebce7728) - This affected only when using a single global acl-file, not when using - global acl directory containing per-mailbox files. + lib: Move failure handler structs and typedefs to failures-private.h -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/acl/acl-global-file.c -M src/plugins/acl/acl-global-file.h + Also change the function typedefs to be non-pointers, like they usually are + in Dovecot code. -2017-10-06 16:54:20 +0300 Timo Sirainen (8bd8652b1) +M src/lib/Makefile.am +A src/lib/failures-private.h +M src/lib/failures.c - acl: Cleanup - move code to a new acl_vfile_validity_has_changed() +2018-08-31 14:19:32 +0300 Timo Sirainen (4576851ee) + lib: Make failure handler variables static -M src/plugins/acl/acl-backend-vfile.c -2017-10-06 16:44:01 +0300 Timo Sirainen (ba6c321d5) +M src/lib/failures.c - acl: Fix checking whether global acl-file has changed +2018-08-31 14:18:34 +0300 Timo Sirainen (136ecaeb0) - We always assumed that it was changed and re-read it. + lib: Rename handler_config variable to failure_handler -M src/plugins/acl/acl-global-file.c + It's a global variable, so it needs to have a proper prefix. -2017-10-06 16:30:11 +0300 Timo Sirainen (67c90c97b) +M src/lib/failures.c - auth: Fix %{ldap_dn} change to compile with v2.2 API +2018-06-14 15:54:03 +0300 Sergey Kitov (00f94a425) + lib: Implement vfuncs for logging to stderr -M src/auth/db-ldap.c -2017-09-15 15:17:08 +0300 Sergey Kitov (8bfc42d4d) +M src/lib/failures.c - auth: Expand %{ldap_dn} to ldap_get_dn(). +2018-06-14 15:49:41 +0300 Sergey Kitov (723a84238) + lib: Implement vfuncs for logging to syslog -M src/auth/db-ldap.c -2017-10-05 20:25:29 +0300 Timo Sirainen (f352c763b) +M src/lib/failures.c - lib: iostream-multiplex tests - Fix hangs by setting the pipe fds - non-blocking +2018-08-05 04:00:17 +0300 Sergey Kitov (7867f9f33) + lib: Implement vfuncs for logging to default location and common failure + logging handling -M src/lib/test-istream-multiplex.c -M src/lib/test-multiplex.c -M src/lib/test-ostream-multiplex.c -2017-10-05 20:24:11 +0300 Timo Sirainen (90d745e0a) +M src/lib/failures.c - lib: istream-multiplex - Minor code cleanup +2018-06-12 15:56:46 +0300 Sergey Kitov (236276026) - Avoid propagating the error twice, and avoid any confusion about what "got" - actually contains. + lib: Introduce abstraction for failure logging implementations. -M src/lib/istream-multiplex.c -2017-10-05 20:07:11 +0300 Timo Sirainen (c1538be43) +M src/lib/failures.c - Released v2.2.33.rc1. +2018-09-03 14:15:07 +0300 Timo Sirainen (0574f9fa2) + lib-master: Fix crash when stats events are merged all the way to the root -M NEWS -M configure.ac -2017-10-05 12:34:10 +0300 Timo Sirainen (f066ee1f0) +M src/lib-master/stats-client.c - director: When ring is synced, purge any pending "removed" directors +2018-09-03 13:14:39 +0300 Timo Sirainen (4ae56d07e) - This allows adding a director back to the ring without having to wait for 30 - seconds. + lib-master: stats_event_get_merged() - Remove unnecessary variable + assignment -M src/director/director.c + Fixes scan-build complaint. -2017-10-03 16:40:32 +0300 Timo Sirainen (ab9e658e6) +M src/lib-master/stats-client.c - director: Rename director_delayed_dir_remove_timeout() to - director_hosts_purge_removed() +2018-01-16 12:51:53 +0200 Sergey Kitov (334f0390b) - This allows using it for other purposes without having a confusing name. + lib-master: stats_event_write use BEGIN only when event and parent_event + create timestamps differ -M src/director/director.c -2017-10-05 16:12:38 +0300 Timo Sirainen (184bcab00) +M src/lib-master/stats-client.c - director: Fix potential panic when director is alone +2018-02-26 16:33:19 +0200 Sergey Kitov (43f458007) - If director is alone and it can't connect to other directors, it might crash - with: + lib: Add some event handling functions. - Panic: file director.c: line 318 (director_set_ring_synced): assertion - failed: (!dir->ring_synced) + event_has_all_categories() - checks if given event contains all the + categories of an another event. event_has_all_fields() - checks if given + event contains all the fields of an another event. event_dup() - duplicates + an event. event_copy_categories_fields() - copies all categories and fields + from source to dest. -M src/director/director.c +M src/lib/lib-event.c +M src/lib/lib-event.h -2017-10-05 11:51:23 +0300 Timo Sirainen (d78b8d04a) +2018-09-06 03:40:55 +0200 Stephan Bosch (97ef926ed) - director: Allow doveadm director ring remove for the same director + lib-http: client: peer: Log the number of pending connections consistently + in relevant debug messages. - Fixes: Panic: file doveadm-connection.c: line 859 - (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && - conn->dir->left == NULL) + Use the same style everywhere and log it where it makes sense. -M src/director/director.c +M src/lib-http/http-client-peer.c -2017-10-05 11:49:31 +0300 Timo Sirainen (868c94dfa) +2018-09-06 03:33:59 +0200 Stephan Bosch (652724a2a) - director: Don't crash on doveadm director ring remove for unknown director + lib-http: client: peer: Maintain a list of connections pending on behalf of + a peer. - Ring syncing isn't started, so it shouldn't try to wait for ring sync. + Before, pending connections were only listed in the peer pool. - Fixes: Panic: file doveadm-connection.c: line 859 - (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && - conn->dir->left == NULL) +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h -M src/director/doveadm-connection.c +2018-09-06 03:23:26 +0200 Stephan Bosch (a5d4658dc) -2017-10-05 11:46:55 +0300 Timo Sirainen (547fa7e59) + lib-http: client: connection: Unlist the connection as pending immediately + in http_client_connection_failure(). - director: Don't crash if DIRECTOR-REMOVE is received for itself - This triggers the director removal from the ring, which causes the - connection to be destroyed. But since we're still in the middle of handling - the connection it needs refcounting. +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-peer.c -M src/director/director-connection.c +2018-09-06 01:57:43 +0200 Stephan Bosch (71120b664) -2017-09-14 18:13:05 +0300 Timo Sirainen (959376d04) + lib-http: client: connection: Remove the connection from the peer pool + pending list in a separate function. - director: Fix ring sync wait after DIRECTOR-REMOVE - It was sending OK twice, and the first OK was too early. +M src/lib-http/http-client-connection.c -M src/director/doveadm-connection.c +2018-09-06 15:22:30 +0200 Stephan Bosch (4031ea3f4) -2017-09-14 17:59:05 +0300 Timo Sirainen (656b9cd7f) + lib-http: client: peer: Notify all peers in a peer pool about a successful + connection. - director: Ignore CONNECT requests to hosts that have been removed already + This allows peers for which the last connection attempt failed (which was + not the last pending attempt in the pool) to try again. This solves a + problem that could potentially cause a hang with multiple parallel clients + creating serveral new connections at once. +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h -M src/director/director-connection.c +2018-09-06 16:03:58 +0200 Stephan Bosch (e73699af4) -2017-09-14 17:57:29 +0300 Timo Sirainen (3284bc936) + lib-http: client: peer: Add debug message for + http_client_peer_connection_failure(). - director: After CONNECT was received, make sure we disconnect - The remote side won't be reading anything after the CONNECT, so we have to - disconnect anyway. If we decide that the CONNECT request is wrong, reconnect - after a short delay and hope that the remote agrees with us the next time. +M src/lib-http/http-client-peer.c -M src/director/director-connection.c +2018-09-06 15:56:44 +0200 Stephan Bosch (715338bcc) -2017-09-14 17:48:50 +0300 Timo Sirainen (63818a815) + lib-http: client: peer: Clarify debug message in + http_client_peer_connection_failed_pool(). - director: When director is removed, notify it before disconnecting - This way the removed director will know that it's been removed, and it can - also more quickly forward the removal to other directors. +M src/lib-http/http-client-peer.c -M src/director/director.c +2018-09-06 15:54:02 +0200 Stephan Bosch (ab2c55469) -2017-09-14 17:38:24 +0300 Timo Sirainen (1c88cb742) + lib-http: client: peer: Log debug message before calling peer pool in + http_client_peer_connection_success(). - director: Don't reset directors' last_network_failure while handshaking - The reset is done mainly to make it faster for a director that has been down - to connect back to the ring, without other directors still thinking that - it's down. But DIRECTOR that is sent during handshake says nothing about - whether the director is up at the moment or not. +M src/lib-http/http-client-peer.c -M src/director/director-connection.c +2018-09-06 15:50:36 +0200 Stephan Bosch (6ce5436ad) -2017-09-14 17:35:02 +0300 Timo Sirainen (cc4257614) + lib-http: client: peer: Rename http_client_peer_connection_failed_any() to + http_client_peer_connection_failed_pool(). - director: Log info line for every incoming/outgoing connection - This can help with debugging problems. +M src/lib-http/http-client-peer.c -M src/director/director-connection.c -M src/director/director.c -M src/director/director.h -M src/director/main.c +2018-09-06 03:11:18 +0200 Stephan Bosch (985cd1ebf) -2017-09-14 17:33:19 +0300 Timo Sirainen (4f8ec7760) + lib-http: client: peer: Always run http_client_queue_connection_failure() + upon definitive connection failure. - director: Cleanup - move code to a new director_log_connect() + The recorded peer->connecting flag was highly unreliable in a scenario + involving starting parallel connections. This way, the linked queues can + update their state accordingly. Also, this will not cause empty queues to + initiate new connection, because empty queues will do nothing after updating + the connection state. - Also adds a missing ')' to the log line. + This problem caused a client ioloop hang in high-load conditions. -M src/director/director.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h -2017-09-14 17:29:48 +0300 Timo Sirainen (2ff32179d) +2018-09-06 14:57:28 +0200 Stephan Bosch (57f8094d6) - director: Log info line whenever a director is added/removed from ring + lib-http: client: peer: Move http_client_peer_connection_failure(). - This can help with debugging problems. -M src/director/director-connection.c -M src/director/director.c -M src/director/director.h -M src/director/doveadm-connection.c +M src/lib-http/http-client-peer.c -2017-09-14 18:13:33 +0300 Timo Sirainen (f16eeebdd) +2018-09-06 03:02:16 +0200 Stephan Bosch (a8f17f33f) - director: Improve debugging: Log ring desync when there is no right - connection + lib-http: client: queue: Do not fail claimed requests unless the queue is + being destroyed. + Before, connection failure would also abort requests already being sent on + another connection, which is premature at best. -M src/director/director.c +M src/lib-http/http-client-queue.c -2017-09-14 17:26:39 +0300 Timo Sirainen (c78c950ef) +2018-09-06 02:57:24 +0200 Stephan Bosch (4675367e9) - director: When logging "ring SYNC lost", include sync seq number in message + lib-http: client: queue: Fix the number of pending requests listed in + http_client_queue_connection_failure() debug message. - This can help with debugging. -M src/director/director.c +M src/lib-http/http-client-queue.c -2017-09-14 11:57:27 +0300 Timo Sirainen (86a787a08) +2018-09-06 02:51:09 +0200 Stephan Bosch (e8f137bb3) - doveadm director ring remove: Wait ring sync before and after removal + lib-http: client: peer: Determine number of pending peers in + http_client_peer_shared_connection_failure() itself. - This helps mainly with automated tests. + Before, the number of pending peers was a parameter, but that was only for a + single peer pool. This is wrong, since the one peer can have many different + pools (depending on how many clients with incompatible configs share this + peer). -M src/director/director.c -M src/director/doveadm-connection.c +M src/lib-http/http-client-peer.c -2017-10-03 14:51:16 +0300 Timo Sirainen (71a491318) +2018-09-06 14:49:59 +0200 Stephan Bosch (0a6397833) - lib-master: master_service_init_log() - Switch log handlers only on the - first call + lib-http: client: peer: Notify definitive connection failure only within a + peer pool. - The secondary calls were only done by mail_storage_service_*() calls. They - want to initialize the logging once, but afterwards they only care about - changing the log prefix. Switch to this behavior now explicitly. + Other peer pools have different configuration, which may actually succeed + and will arrive at this point when their own connections fail anyway. - This fixes behavior if logging functions are changed between - mail_storage_service_*() calls, so they don't get reset. +M src/lib-http/http-client-peer.c -M src/lib-master/master-service-private.h -M src/lib-master/master-service.c -M src/lib-master/master-service.h +2018-07-24 14:47:47 +0300 Aki Tuomi (6c7a7b286) -2017-10-05 12:47:17 +0300 Timo Sirainen (e9910418a) + quota: Mark noenforcing quotas with unlimited quota - lib: Fix warning with gcc7's -Wint-in-bool-context + This allows quota to be properly updated for unenforced quotas so they can + be used for tracking only. + This fixes issue where using noenforcing would not update quota during mail + save, but requires a manual quota update. -M src/lib/buffer.h +M src/plugins/quota/quota.c -2017-08-24 14:59:07 +0300 Aki Tuomi (7daf9f464) +2018-07-24 14:38:18 +0300 Aki Tuomi (3eb689841) - doveadm: Deliver remote logs over doveadm socket + quota: Cleanup - Move enforce checking out of quota_root_visible() + Non-enforcing quota roots need to be visible even when enforcing quotas, + otherwise we cannot update them. -M src/doveadm/client-connection.c -M src/doveadm/client-connection.h -M src/doveadm/doveadm-util.c -M src/doveadm/doveadm-util.h -M src/doveadm/server-connection.c +M src/plugins/quota/quota.c -2017-08-24 14:45:22 +0300 Aki Tuomi (6960662b2) +2018-08-27 15:06:44 +0300 Timo Sirainen (5bf2f17a1) - doveadm: Refactor server/client code to support versioning properly + fts: Optimize replacing NULs in header - This way we can distinguish between old and new server side -M src/doveadm/client-connection.c -M src/doveadm/doveadm-util.h -M src/doveadm/server-connection.c +M src/plugins/fts/fts-build-mail.c -2017-09-12 13:43:30 +0300 Aki Tuomi (2cb630d7d) +2018-08-23 14:33:59 +0300 Timo Sirainen (4afa42b8e) - doveadm-server: Refactor connection handshake and authentication + fts: Fix indexing mails with NULs in headers - Simplifies next change + After the first NUL all the rest of the string was converted to spaces. This + was broken already in the initial commit that attempted to fix this: + 4d27f95c76bd008bb38f9c442567046da2b6ce14 -M src/doveadm/client-connection.c -M src/doveadm/client-connection.h -M src/doveadm/doveadm-util.h -M src/doveadm/server-connection.c +M src/plugins/fts/fts-build-mail.c -2017-08-22 10:14:22 +0300 Aki Tuomi (7a4621110) +2018-08-20 12:51:28 +0300 Timo Sirainen (17f8c0b8c) - lib: Add multiplex stream support + lib-index: mail_cache_lookup_headers() - Allow using datastack pool - This allows having multiple channels of data in single stream. + This fixes assert caused by 53712af0e7f357e7279d9ff03831428aae85aa45: Panic: + pool_data_stack_realloc(): stack frame changed -M src/lib/Makefile.am -A src/lib/istream-multiplex.c -A src/lib/istream-multiplex.h -A src/lib/ostream-multiplex.c -A src/lib/ostream-multiplex.h -A src/lib/test-istream-multiplex.c -M src/lib/test-lib.c -M src/lib/test-lib.h -A src/lib/test-multiplex.c -A src/lib/test-ostream-multiplex.c +M src/lib-index/mail-cache-lookup.c -2017-10-04 15:41:03 +0300 Timo Sirainen (5848bf10e) +2018-08-17 14:39:41 +0300 Timo Sirainen (34d826b4c) - director: Fix HOST-RESET-USERS when all hosts are down + lib-storage: Fix NUL handling in mail_get_first_header*(), + mail_get_headers*() - If there were a lot of users being kicked, the host was flushed after the - initial round of user kills. This caused the rest of the user connections to - be just discarded instead of actually being killed. + These functions return NUL-terminated values, so they got truncated whenever + a header value contained a NUL. Fix this by converting NULs to unicode + replacement characters in the output. -M src/director/doveadm-connection.c +M src/lib-storage/index/index-mail-headers.c -2017-10-04 15:39:08 +0300 Timo Sirainen (49a526355) +2018-08-17 14:33:50 +0300 Timo Sirainen (d309654ac) - director: Fix tracking user move count when user is freed early + lib-mail: Make message_header_strdup() public - users_moving_count wasn't updated if the user was freed before killing it - finished. This caused "doveadm director flush" to hang while waiting for the - move count to drop to 0, which it never did. Also following flushes were - doing less work in parallel, or possibly even nothing since director thought - there were too many users already being moved. + Also move it to a better file. -M src/director/director.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-header-parser.h +M src/lib-mail/message-part-data.c -2017-10-04 10:32:17 +0300 Aki Tuomi (3dc758622) +2018-08-17 20:16:29 +0300 Timo Sirainen (9f222e06c) - quota-clone: Always update dict + lib-mail: Cleanup - Rename internal hdr_strdup() to message_header_strdup() - ret_count and ret_bytes become zero if no quota rules are specified, so we - need to update the dict anyways. - Broken in 81d10aff29baede9ae4944d6c89790871123d11d +M src/lib-mail/message-part-data.c -M src/plugins/quota-clone/quota-clone-plugin.c +2018-08-17 14:12:25 +0300 Timo Sirainen (5f65ff7bf) -2017-09-22 13:30:43 +0300 Aki Tuomi (d630d68aa) + lib-mail: rfc822-parser - Handle \ in quoted-string and domain-literal - dsync: Add hashed_headers setting + It was already handled in comments. Previously this caused the strings and + domain-literals to be truncated at that position. - This makes it possible to configure them +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-message-address.c -M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-settings.h -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.h -M src/doveadm/dsync/dsync-mail.c -M src/doveadm/dsync/dsync-mail.h -M src/doveadm/dsync/dsync-mailbox-export.c -M src/doveadm/dsync/dsync-mailbox-export.h -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-import.h +2018-08-17 13:42:35 +0300 Timo Sirainen (db9b51176) -2017-09-22 14:08:45 +0300 Aki Tuomi (d1c2f79c1) + lib-mail: test-message-address - Test NULs in display-name - dsync: Fix typo, it's ibc not icb +M src/lib-mail/test-message-address.c -M src/doveadm/doveadm-dsync.c +2018-05-04 19:53:27 +0300 Timo Sirainen (c95e5cbdb) -2017-09-25 10:28:03 +0300 Aki Tuomi (ff0a0c905) + lib-mail: Change MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS to + _FLAG_STRICT_DOTS - dsync: Add missing space to handshake optional keys + Generally we want it to be enabled everywhere, so it's easier to just enable + it by default. + (This is kept as a separate commit from the previous one so it'll be easy to + revert this in case we actually don't want this to be the default.) -M src/doveadm/dsync/dsync-ibc-stream.c +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h +M src/lib-mail/test-message-address.c -2017-09-08 11:02:29 +0300 Timo Sirainen (33f877eca) +2018-05-04 19:49:57 +0300 Timo Sirainen (d103d4f89) - doveadm proxy: Avoid DNS lookup for "host" if passdb also returns "hostip" + lib-mail: Add MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS + This code is somewhat copy&pasted from parse_local_part() in Pigeonhole. -M src/doveadm/doveadm-mail-server.c +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h +M src/lib-mail/test-message-address.c -2017-09-08 11:02:07 +0300 Timo Sirainen (9222388d6) +2018-05-04 19:31:26 +0300 Timo Sirainen (d4aa3ee9b) - lmtp proxy: Avoid DNS lookup for "host" if passdb also returns "hostip" + lib-mail: message_address_parse() - Change fill_missing parameter to flags + This change allows adding more flags. The API is also backwards compatible + in a way that the old FALSE/TRUE values still map to compatible 0/1 flags. -M src/lmtp/commands.c -M src/lmtp/lmtp-proxy.c -M src/lmtp/lmtp-proxy.h +M src/doveadm/doveadm-mail-fetch.c +M src/lib-lda/mail-deliver.c +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h +M src/lib-mail/message-part-data.c +M src/lib-mail/test-message-address.c +M src/lib-smtp/smtp-params.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/mail-storage-settings.c +M src/plugins/fts/fts-build-mail.c -2017-09-08 11:01:20 +0300 Timo Sirainen (dbf0b24b7) +2018-05-04 19:21:52 +0300 Timo Sirainen (b835b4d09) - auth: Avoid DNS lookup for "host" if passdb returns also "hostip" + lib-mail: Fix rfc822_parse_dot_atom() to reject if dot isn't followed by + atom -M src/auth/auth-request.c +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-rfc822-parser.c -2017-07-25 10:39:43 +0300 Timo Sirainen (053f9b41a) +2018-04-25 14:19:27 +0300 Timo Sirainen (56a43b7ce) - lib: Fix compiler warning in var-expand-if + lib-mail: Remove MESSAGE_HEADER_REPLACE_NULS_WITH_0x80 flag + As mentioned in previous commit, 0x80 isn't valid UTF-8 and we shouldn't + encourage using it. This implementation also can't be easily changed to use + unicode replacement character without larger changes to istream-nonuls. -M src/lib/var-expand-if.c + Reverts 95fba2c295bb84639dc64ca5c9f2ccb9edc00ba7. -2017-07-25 09:43:56 +0300 Timo Sirainen (5ef27b9d1) +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-header-parser.h - lib: Fix static analyzer warnings in var-expand-if +2018-04-25 14:17:34 +0300 Timo Sirainen (cb716afd3) + lib-mail: Change NUL -> 0x80 replacement to use unicode replacement char + instead -M src/lib/var-expand-if.c + Using 0x80 produces invalid UTF-8 output, which we should avoid. Some places + in Dovecot code already requires that input is valid UTF-8, so it's also + safer and easier to use the unicode replacement character. -2017-07-24 18:30:01 +0300 Aki Tuomi (587bf2f8f) + Fixes: Panic: file fts-tokenizer-generic.c: line 210 + (fts_tokenizer_generic_simple_next): assertion failed: (char_size > 0) - var-expand-if: Remove unused variable par_start +M src/lib-mail/message-part-data.c +M src/lib-mail/rfc2231-parser.h +M src/lib-mail/rfc822-parser.h +M src/lib-mail/test-message-address.c +M src/lib-mail/test-rfc2231-parser.c +2018-04-25 14:11:43 +0300 Timo Sirainen (2ed851d65) -M src/lib/var-expand-if.c + lib-mail: Change rfc822_parser_context.nul_replacement_char to string -2017-07-24 13:31:49 +0300 Aki Tuomi (d19ed6338) - var-expand: Add tests for var_expand conditionals +M src/lib-mail/message-address.c +M src/lib-mail/rfc2231-parser.c +M src/lib-mail/rfc822-parser.c +M src/lib-mail/rfc822-parser.h +M src/lib-mail/test-rfc822-parser.c +2018-04-24 18:01:03 +0300 Timo Sirainen (6b3d0a3c8) -M src/lib/test-var-expand.c + lib-mail: message_part_*_parse_from_header() - Replace NULs with 0x80 -2017-07-24 13:31:02 +0300 Aki Tuomi (e55f99a3d) + This avoids truncation of Content-*, Subject, Message-ID, In-Reply-To and + Date headers in IMAP ENVELOPE, BODY and BODYSTRUCTURE replies. Of course, + NULs in headers are violating RFCs already, so the previous behavior wasn't + really wrong either. - var-expand: Add support for conditionals +M src/lib-mail/message-part-data.c - %{if;value-a,op,value-b:true-value:false-value} +2018-04-21 16:21:33 +0300 Timo Sirainen (0663cd573) -M src/lib/Makefile.am -A src/lib/var-expand-if.c -M src/lib/var-expand-private.h -M src/lib/var-expand.c + lib: Mark str_append_n() deprecated -2015-10-19 13:49:54 +0300 Timo Sirainen (16d2f48cb) + It was almost always used wrongly. Most of the time str_append_data() should + have been used instead. str_append_max() has the old functionality. - director: Remember backends' hostnames and send them in login reply. This - allows login processes to verify the remote server's hostname in SSL - certificate. +M src/lib/str.h +2018-04-21 16:19:43 +0300 Timo Sirainen (847a4fe9c) -M src/director/mail-host.h + lib: Add ATTR_DEPRECATED macro -2017-08-18 11:51:36 +0300 Timo Sirainen (9a97cfeb2) - director: Run director/host changing doveadm commands only after ring is - synced +M src/lib/compat.h +M src/lib/macros.h - If the ring sync is still pending, the doveadm command may become reverted. - This doesn't fully prevent problems caused by sending doveadm commands - simultaneously to multiple directors, but it should prevent issues when only - a single director is used for doveadm commands. +2018-04-21 16:17:03 +0300 Timo Sirainen (d6afcb8e9) - It would have been nice to enable this also for HOST/DIRECTOR-LIST commands, - but they don't support returning a ring timeout error without changing the - protocol. It's a bit too much effort to change that for now. + global: Replace str_append_n() with str_append_max() -M src/director/doveadm-connection.c -2017-08-14 10:29:47 +0300 Timo Sirainen (1d0eb22ca) +M src/config/doveconf.c +M src/doveadm/dsync/dsync-mailbox-tree-sync.c +M src/lib/failures.c +M src/lib/var-expand.c - director: doveadm HOST-* commands now wait for ring sync before returning OK +2018-04-21 16:07:21 +0300 Timo Sirainen (6689030b0) - This should make it easier for tests and maybe for scripts in general, so - they won't think the command failed when it just takes a while to finish. + lib-fts: fts-tokenizer-address - Cleanup NUL handling in parent_data -M src/director/doveadm-connection.c -M src/director/doveadm-connection.h -M src/director/main.c + The end result is anyway that the token will be truncated at the first NUL. + This change just makes the code a bit more understandable on where the + truncation will happen. -2017-08-14 10:06:34 +0300 Timo Sirainen (540695680) +M src/lib-fts/fts-tokenizer-address.c - director: Cleanup - Doveadm commands now return enum - doveadm_director_cmd_ret +2018-04-21 15:44:11 +0300 Timo Sirainen (f37afa6d8) + lib: str_append_[tab]unescaped(): Don't truncate input at NULs -M src/director/doveadm-connection.c + For str_append_tabunescaped() the input is supposed to have NULs already + escaped though, so it was truncating only with invalid input. -2017-08-14 10:01:01 +0300 Timo Sirainen (f5416e345) +M src/lib/strescape.c - director: Cleanup - Move all doveadm commands into an array. +2018-04-21 15:24:28 +0300 Timo Sirainen (d396d01f8) + global: Replace str_append_n() with str_append_data() wherever possible -M src/director/doveadm-connection.c + It shouldn't be possible for input to have NULs in any of these places. This + makes the extra NUL-check in str_append_n() unnecessary. -2017-09-19 14:48:54 +0300 Timo Sirainen (8cd3ade63) +M src/auth/auth-cache.c +M src/auth/db-dict-cache-key.c +M src/auth/db-ldap.c +M src/auth/password-scheme-md5crypt.c +M src/config/config-parser.c +M src/config/doveconf.c +M src/lib-dict-backend/dict-ldap.c +M src/lib-dict/dict.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-sis.c +M src/lib-fts/fts-tokenizer-address.c +M src/lib-http/http-auth.c +M src/lib-http/http-header-parser.c +M src/lib-http/http-parser.c +M src/lib-http/http-url.c +M src/lib-imap/imap-quote.c +M src/lib-imap/imap-url.c +M src/lib-imap/imap-utf7.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-snippet.c +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-istream-dot.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-istream-qp-decoder.c +M src/lib-mail/test-istream-qp-encoder.c +M src/lib-mail/test-message-header-parser.c +M src/lib-mail/test-message-parser.c +M src/lib-settings/settings-parser.c +M src/lib-settings/settings.c +M src/lib-smtp/smtp-address.c +M src/lib-smtp/smtp-parser.c +M src/lib-smtp/smtp-reply-parser.c +M src/lib-smtp/smtp-server-reply.c +M src/lib-smtp/smtp-syntax.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-sync-parse.c +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-tree.c +M src/lib/failures.c +M src/lib/file-dotlock.c +M src/lib/istream.c +M src/lib/str-sanitize.c +M src/lib/strescape.c +M src/lib/test-path-util.c +M src/lib/uri-util.c +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-backend-solr.c - cassandra: Timestamp should be in microseconds, not milliseconds +2018-04-21 16:11:48 +0300 Timo Sirainen (90a8fad77) + lib: Add str_append_max() -M src/lib-sql/driver-cassandra.c + It's otherwise the same as str_append_n(), except it takes const char* as + input instead of const void*. This, as well as its name, should make it less + likely to be used wrong when the input may legitimately have NULs. -2017-09-13 15:16:59 +0300 Timo Sirainen (65ffbfb57) + The unit test is changed from str_append_n() to str_append_max(), because + str_append_n() will be deprecated. - cassandra: Fix paged queries to work again +M src/lib/str.c +M src/lib/str.h +M src/lib/test-str.c - When continuing the result, consistency was reset to 0 (=ANY), which caused - the queries to fail. There's no need to initialize the statement again when - continuing it. Also set result->consistency to be correct mainly for - debugging purposes. +2018-04-21 16:10:03 +0300 Timo Sirainen (dbd99e76a) -M src/lib-sql/driver-cassandra.c + lib: Improve str_append_n() comment -2017-09-12 13:23:51 +0300 Timo Sirainen (fbe89fbf9) - cassandra: Disable prepared statements with protocol v3 and older +M src/lib/str.h +2018-04-11 14:41:45 +0300 Sergey Kitov (ee1a1f544) -M src/lib-sql/driver-cassandra.c + lib-mail: Add MESSAGE_HEADER_REPLACE_NULS_WITH_0x80 flag -2017-08-22 14:35:11 +0300 Timo Sirainen (f90f6a287) + The flag signals that input stream for message_parse_header() should replace + 0x0 symbols with 0x80. - cassandra: Add support for prepared statements +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-header-parser.h +2018-04-21 16:47:16 +0300 Timo Sirainen (4b6bf5290) -M src/lib-sql/driver-cassandra.c + lib-mail: rfc2231_parse() - Replace NULs with 0x80 -2017-08-22 13:55:15 +0300 Timo Sirainen (424b15e8d) + Instead of truncating the strings at NULs. - cassandra: Cleanup - Create statement earlier +M src/lib-mail/rfc2231-parser.c +M src/lib-mail/rfc2231-parser.h +M src/lib-mail/test-rfc2231-parser.c - Simplifies the following changes +2018-04-21 16:34:05 +0300 Timo Sirainen (f3139c4b0) -M src/lib-sql/driver-cassandra.c + lib-mail: message_address_parse*() - Replace NULs with 0x80 -2017-08-24 11:56:38 +0300 Timo Sirainen (6679cc8ff) + Instead of truncating the strings at NULs. - cassandra: sql_transaction_commit*() cleanup - handle multiple query - failures earlier +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c - This makes the handling same for the sync and async method. It also - simplifies code for the following commits. +2018-04-21 16:27:21 +0300 Timo Sirainen (4729a2765) -M src/lib-sql/driver-cassandra.c + lib-mail: rfc822-parser: Add nul_replacement_char -2017-08-24 11:13:32 +0300 Timo Sirainen (f1f0d80ad) - cassandra: sql_transaction_commit_s() - Set query_type correctly +M src/lib-mail/rfc822-parser.c +M src/lib-mail/rfc822-parser.h +M src/lib-mail/test-rfc822-parser.c - The queries were all sent with READ type instead of WRITE/DELETE. This meant - they were using potentially wrong consistency values. Although synchronous - commits aren't actually used anywhere, so this practically this doesn't fix - anything right now. +2018-04-21 13:46:21 +0300 Timo Sirainen (83059eb6f) -M src/lib-sql/driver-cassandra.c + lib-mail: rfc822-parser: Strip away folding whitespace from comments -2017-08-24 11:09:05 +0300 Timo Sirainen (c5a23ba5e) - cassandra: sql_transaction_commit_s() - Don't allow multi-query transactions +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-rfc822-parser.c - They were already denied for asynchronous commits. Also the synchronous - commits aren't actually used anywhere, so this shouldn't break anything. +2018-04-21 13:28:34 +0300 Timo Sirainen (5991d3518) -M src/lib-sql/driver-cassandra.c + lib-mail: rfc822-parser: Improve domain-literal parsing -2017-09-07 15:40:16 +0300 Timo Sirainen (4ea91541f) + Strip away folding whitespace. Treat any extra '[' as an error. - dict-sql: Use prepared statements +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-rfc822-parser.c - Create a hash table of query template -> prepared statement and fill it out - as needed. This could have been done some alternative ways that wouldn't - require building the string first, but this should still be fast enough and - much easier to implement. +2018-04-21 13:05:49 +0300 Timo Sirainen (bf9c2696a) -M src/lib-dict/dict-sql.c + lib-mail: rfc822-parser: Don't allow preserving escaped [CR]LF -2017-08-26 23:27:21 +0300 Timo Sirainen (727f90169) + It's not valid to have "\" or "\", so the old behavior isn't really + wrong either. However, rfc822_parse_quoted_string() callers are more likely + to expect that the output won't contain any [CR]LF so this new behavior is a + bit better. - dict-sql: Flush pending atomic_inc on set, and pending set on atomic_inc +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-rfc822-parser.c +2018-04-21 12:47:22 +0300 Timo Sirainen (43d38f423) -M src/lib-dict/dict-sql.c + lib-mail: Change rfc822_parse_content_param() API to allow NULs in value -2017-08-26 23:17:45 +0300 Timo Sirainen (1b4704229) + This was the only function in rfc822-parser.h that wasn't NUL-safe. This + won't fix anything, but it makes the rfc822-parser.h API fully consistent + with the NUL handling. - dict-sql: Cleanup - change query generator functions to return statement + Normally rfc2231_parse() should be called instead of calling + rfc822_parse_content_param() directly, so this shouldn't break any plugins. - Instead of query+params. This is in preparation for the following changes. +M src/lib-mail/rfc2231-parser.c +M src/lib-mail/rfc822-parser.c +M src/lib-mail/rfc822-parser.h +M src/lib-mail/test-rfc822-parser.c -M src/lib-dict/dict-sql.c +2018-04-21 16:05:16 +0300 Timo Sirainen (6285cce30) -2017-08-15 16:50:16 +0300 Timo Sirainen (98d322947) + fts-squat: Fix truncating headers at NULs while indexing - dict-sql: Cleanup - Remove unnecessary code - The values are explicitly added to params. sql_dict_update_query() doesn't - add them again. Since the "diff" parameter is already a long long type, this - avoids unnecessary conversion to string and back. +M src/plugins/fts-squat/fts-backend-squat.c -M src/lib-dict/dict-sql.c +2018-04-21 16:03:42 +0300 Timo Sirainen (d1e71fadb) -2017-08-15 16:38:33 +0300 Timo Sirainen (fa7369ee9) + login-common: Consistently truncate client SASL input at first NUL - dict-sql: Use sql_statement_bind_*() + The input is supposed to be base64-encoded, so there's no need to support + actual NUL characters. The previous code truncated at NULs, but could have + kept appending more data to the value. This could have produced somewhat + random results. +M src/login-common/client-common-auth.c -M src/lib-dict/dict-sql.c +2018-04-21 15:58:15 +0300 Timo Sirainen (217c2c091) -2017-08-15 15:37:01 +0300 Timo Sirainen (99c545950) + lib-master, util: Consistently truncate tabescaped input at the first NUL - dict-sql: Add signed "int" type + The NULs are supposed to come tab-escaped, so there's no need to support + actual NUL characters. The previous code truncated at NULs, but could have + kept appending more data to the value. This could have produced somewhat + random results. +M src/lib-master/master-login.c +M src/util/script-login.c -M src/lib-dict/dict-sql-settings.c -M src/lib-dict/dict-sql-settings.h -M src/lib-dict/dict-sql.c +2018-04-21 15:53:42 +0300 Timo Sirainen (505a449db) -2017-08-15 14:55:48 +0300 Timo Sirainen (9b762025a) + config: Consistently truncate value at the first NUL in value input file - dict-sql: Use sql_statement_set_timestamp() instead of adding it to query + When value contained " (92836cfe2) -2017-08-15 14:46:10 +0300 Timo Sirainen (f6334b9c9) + dict-fs/memcached-ascii/redis: Consistently truncate value at NULs - dict-sql: Initial change to use sql_statement API + The dict API currently doesn't support NULs in values, so they have to be + truncated. However, previously they were truncated at NULs, but more data + may have still been appended to the value. This could have produced somewhat + random results. - sql_statement_bind_*() will be followed by later changes. +M src/lib-dict-extra/dict-fs.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-redis.c -M src/lib-dict/dict-sql.c +2018-04-21 15:47:23 +0300 Timo Sirainen (aa40bd118) -2017-08-15 16:44:27 +0300 Timo Sirainen (80b78400b) + auth: checkpassword - Fail if input from script contains NULs - dict-sql: Remove dict_sql_build_query.inc + Previously the input was just silently truncated at NULs. - It's no longer useful with the current code. +M src/auth/db-checkpassword.c -M src/lib-dict/dict-sql.c +2018-04-21 15:42:53 +0300 Timo Sirainen (7f94502ce) -2016-05-06 12:19:21 +0300 Timo Sirainen (a8bff174c) + doveadm: Fix table printer to not truncate output at NULs - lib-dict: Moved/removed explicit stack frames in dict drivers. - Added them back to dict_set/unset/atomic_inc() in dict.c. Others are - unlikely to be called many times. +M src/doveadm/doveadm-print-table.c -M src/lib-dict/dict-memcached-ascii.c -M src/lib-dict/dict-memcached.c -M src/lib-dict/dict-redis.c -M src/lib-dict/dict-sql.c -M src/lib-dict/dict.c -M src/plugins/dict-ldap/dict-ldap.c +2018-04-21 15:41:44 +0300 Timo Sirainen (f9775668e) -2017-08-15 14:27:40 +0300 Timo Sirainen (c90266497) + doveadm dump: Don't truncate dovecot.index.cache values at NULs - dict-sql: Change "uint" type to mean 64bit instead of 32bit integer. - This is likely what is usually wanted (especially in e.g. quotas). If - someone actually wants it to be restricted to 32bit, we could add uint32 - later on. +M src/doveadm/doveadm-dump-index.c -M src/lib-dict/dict-sql.c +2018-04-21 14:56:43 +0300 Timo Sirainen (064750966) -2017-08-22 11:37:17 +0300 Timo Sirainen (6ebfc2ec5) + lib-mail: rfc822-parser: Don't truncate comment/quoted-string/domain-literal + at NUL - lib-sql: Add support for prepared SQL statements. + The other tokens couldn't have contained NULs in the first place. - This initial implementation doesn't use prepared statements in drivers, but - simply generates the query string internally. +M src/lib-mail/rfc822-parser.c -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c -M src/lib-sql/sql-api.h +2018-04-21 14:53:25 +0300 Timo Sirainen (163d14ed0) -2017-08-22 11:31:51 +0300 Timo Sirainen (c4cd55ca3) + lib-mail: message_snippet_generate() - Ignore NULs without shrinking snippet + size - lib-sql: Explicitly specify used *_vfuncs methods for drivers. + Previously the NULs also weren't in the snippet content, but they were + included in the snippet size. - This allows adding more methods without modifying all the existing drivers. +M src/lib-mail/message-snippet.c +M src/lib-mail/test-message-snippet.c -M src/lib-sql/driver-cassandra.c -M src/lib-sql/driver-mysql.c -M src/lib-sql/driver-pgsql.c -M src/lib-sql/driver-sqlite.c -M src/lib-sql/driver-sqlpool.c -A src/lib-sql/driver-test.c +2018-04-21 14:31:08 +0300 Timo Sirainen (f39f0a198) -2017-08-08 20:07:18 +0300 Timo Sirainen (f46b4fbb8) + lib-storage: Fix truncating header values at NUL when adding to cache - lib: When logging I/O or timeout leak, log also raw backtrace + For example FETCH BODY.PEEK[HEADER.FIELDS (Subject)] could have returned the + NUL on the first fetch when the mail wasn't in dovecot.index.cache, but the + second FETCH would have returned it truncated at the NUL. - This can be useful when trying to figure out where the io_loop_destroy() was - called from. +M src/lib-storage/index/index-mail-headers.c -M src/lib/ioloop.c +2018-05-27 15:42:26 +0300 Timo Sirainen (600d85e35) -2017-05-23 14:05:02 +0200 Stephan Bosch (718d7fa85) + lib: Fix filtering by event name in log_core_filter - lib-storage: index: Made MIME FILENAME search criterion match - case-insensitively. + event->sending_name was already cleared by the time it was checked, so any + event:* filters never matched. +M src/lib/event-log.c -M src/lib-storage/index/index-search-mime.c -M src/lib-storage/index/index-search-private.h -M src/lib-storage/index/index-search.c +2018-08-20 18:07:30 -0400 Josef 'Jeff' Sipek (21c899aaf) -2017-09-20 01:47:38 +0300 Timo Sirainen (a0ec1e9eb) + master: Wait 1 second for SIGQUITs to get handled - director: Fix flush to kick the user also when all backends are down + The delay (previously 100ms, now 1s) is intended to delay our exit enough so + that the child processes have a chance to receive & handle the SIGQUITs we + just sent. If we don't wait long enough, it is possible that we'll get + restarted before our children had the chance to stop listening on their + sockets and we'll hit "address already in use" type errors. - The user's host can't change, because there are no other hosts. So add a new - parameter to force the kick anyway. + Increasing the delay does not fix the issue, but it masks it better. -M src/director/director.c -M src/director/director.h -M src/director/doveadm-connection.c +M src/master/service-monitor.c -2017-09-14 12:50:29 +0300 Timo Sirainen (31865444e) +2018-05-18 17:04:36 +0300 Timo Sirainen (6919d08d7) - director: Avoid "ring sync timeout" errors when all backends are down + *-login: Fix non-global ssl=no configuration - doveadm commands were failing with it. Also pending request failures were - logged as failing due to ring sync timeout, instead of because no hosts. + For example local 127.0.0.2 { ssl=no } wasn't working. -M src/director/main.c +M src/login-common/client-common.c -2017-09-14 13:02:40 +0300 Timo Sirainen (9f103210f) +2018-06-28 11:51:22 +0300 Timo Sirainen (1022c021c) - director: Delay calling state_change_callback() after user kick is finished + dict-file: If write failed, file was left locked - Otherwise it can get into recursive loop and cause problems. -M src/director/director.c +M src/lib-dict/dict-file.c -2017-09-14 12:42:13 +0300 Timo Sirainen (9b3025548) +2018-06-28 11:50:36 +0300 Timo Sirainen (b1e1da29a) - doveadm director: Improve logging unexpected disconnections from director - socket + dict-file: Fix memory leak when file is recreated during lock wait - Previously it just logged "failed", which wasn't very understandable. -M src/doveadm/doveadm-director.c +M src/lib-dict/dict-file.c -2017-08-22 16:32:32 +0300 Timo Sirainen (1654e67e5) +2018-06-27 18:28:23 +0300 Timo Sirainen (a5291c276) - director: Fix crash when flush is run and all backends are down. + lda: Deinitialize cleanly if user doesn't exist in userdb - Instead of moving the users elsewhere, just kill them and flush the backend. -M src/director/director.c -M src/director/director.h -M src/director/doveadm-connection.c +M src/lda/main.c -2017-09-20 15:03:55 +0300 Timo Sirainen (a3de897e2) +2018-06-27 18:24:06 +0300 Timo Sirainen (5b4790122) - notify-status plugin: Use priv/status/ for keys + lda: Deinitialize cleanly if mail delivery fails - priv//status can't be used with dict-sql when has '/'. -M src/plugins/notify-status/notify-status-plugin.c +M src/lda/main.c -2017-09-18 23:04:55 +0300 Timo Sirainen (e15275e21) +2018-06-27 18:22:01 +0300 Timo Sirainen (d628a0f9c) - notify-status: Remove first_unseen_seq field + lda: Cleanup - move code to lda_deliver() function - The sequence number keeps changing, so it's very unlikely to be useful. It's - also not always as efficiently available as the other fields, so better to - avoid having it. + No functional changes. -M src/plugins/notify-status/notify-status-plugin.c +M src/lda/main.c -2017-09-04 15:32:24 +0300 Aki Tuomi (75d0e484a) +2018-06-27 18:17:23 +0300 Timo Sirainen (b26ecb24d) - notify-status: Provide access to all easy fields + lda: Cleanup - reorder code + Makes the next commit cleaner. -M src/plugins/notify-status/notify-status-plugin.c +M src/lda/main.c -2017-07-04 14:22:19 +0300 Aki Tuomi (4216de2fc) +2018-06-27 13:22:03 +0300 Timo Sirainen (613c46b98) - notify-status: Add notify-status plugin + lib-storage: Fix memory leak in mail_storage_set_internal_error() - This enables updating a dictionary with mailbox status information when the - mailbox changes. - It requires notify_status_dict setting for specifying the dict where the - data is stored. +M src/lib-storage/mail-storage.c - One can optionally use notify_status_mailbox patterns for specifying which - box(es) the status update is done. Subsequent patterns are - notify_status_mailbox2 and so forth. +2018-06-19 17:42:55 +0300 Timo Sirainen (087bcbb43) - One can also specify data format using notify_status_value plugin setting. + lib: Fix memory leak at deinit if log_core_filter is set -M configure.ac -M src/plugins/Makefile.am -A src/plugins/notify-status/Makefile.am -A src/plugins/notify-status/notify-status-plugin.c -2017-09-12 14:54:57 +0300 Timo Sirainen (6a6bda313) +M src/lib/lib-event.c - lib: file_lock_set_unlink_on_free() - Avoid unlink() if another process is - waiting on the lock +2018-06-13 20:09:32 +0300 Timo Sirainen (cb3e7b8ea) + doveadm dump: Fix dumping "vsize" header in dovecot.index -M src/lib/file-create-locked.h -M src/lib/file-lock.c -M src/lib/file-lock.h + It was trying to print it as the "vsize" header in dovecot.list.index. This + caused confusing output, as well as potentially accessing memory out of + bounds. -2017-08-30 20:49:17 -0400 Anton Yuzhaninov (c27f060a0) +M src/doveadm/doveadm-dump-index.c - lib-compression: Fix assert in i_stream_zlib_seek +2018-06-13 20:08:08 +0300 Timo Sirainen (818791b1d) - Also fix same bug in i_stream_bzlib_seek, i_stream_lz4_seek, - i_stream_lzma_seek. + doveadm log find: Fix memory leak -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c -2017-07-14 17:00:21 +0300 Timo Sirainen (b20a071c9) +M src/doveadm/doveadm-log.c - master: Change service "connections are being dropped" warning interval to 1 - second +2018-06-13 20:07:52 +0300 Timo Sirainen (d8bf63494) - When this is happening, it's often accompanied with all kinds of other - errors and these warnings drown in them. Make them easier to notice by - reducing the interval from 60 seconds to 1 second. + doveadm user: Fix memory leak -M src/master/service-monitor.c -2017-06-13 21:00:23 +0300 Timo Sirainen (740832474) +M src/doveadm/doveadm-auth.c - dsync: Fix panic if syncing fails during attribute iteration +2018-06-13 20:07:28 +0300 Timo Sirainen (6799c8677) - Fixes: Panic: file dict.c: line 104 (dict_deinit): assertion failed: - (dict->iter_count == 0) + dsync: Fix memory leak - unreference iostreams at deinit -M src/doveadm/dsync/dsync-mailbox-export.c + Only some of the code paths need unreferencing, so also add a reference to + the other code paths. -2017-08-25 18:02:44 +0300 Timo Sirainen (4ec65105a) +M src/doveadm/doveadm-dsync.c - lib-storage: mail_storage_set_critical() - don't free old error_string too - early +2018-06-13 20:06:11 +0300 Timo Sirainen (9705af1fa) - It may be used in one of the parameters. + dsync: ibc - reference iostreams internally -M src/lib-storage/mail-storage.c + This makes it clearer who needs to reference and unreference the streams. -2017-09-13 00:28:38 +0200 Stephan Bosch (6f967d6c4) +M src/doveadm/doveadm-dsync.c +M src/doveadm/dsync/dsync-ibc-stream.c - lib-smtp: lmtp-client: Fixed handling of unexpected reply while sending RCPT - TO commands. +2018-06-13 00:58:55 +0300 Timo Sirainen (4f290b892) - It caused a segfault. + lib-master: Allow calling master_service_deinit() without _init_finish() -M src/lib-smtp/lmtp-client.c -2017-09-08 16:00:53 +0300 Timo Sirainen (234a8fcc7) +M src/lib-master/master-service-private.h +M src/lib-master/master-service.c - doveadm director kick: Fix -f parameter to work +2018-06-12 22:05:52 +0300 Timo Sirainen (af212405a) - It already worked as --passdb-field, but now it matches the usage string. + lib: restrict-access: Free chroot_dir at deinit -M src/doveadm/doveadm-director.c -2017-09-05 10:43:46 +0300 Aki Tuomi (c4dd8ff2a) +M src/lib/lib.c +M src/lib/restrict-access.c +M src/lib/restrict-access.h - dsync: Ignore missing remote mailbox when doing unidirectional sync +2018-06-12 22:05:35 +0300 Timo Sirainen (e7dd8e44d) - If there are some folders on remote system that are being ignored by remote - brain, do not error out. + lib: Free global_event_stack array at deinit -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-mails.c -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-mailbox.h -2017-08-18 14:58:37 +0300 Aki Tuomi (8cd9a623d) +M src/lib/lib-event.c - doveadm: Actually use resolved IP address(es) in director flush +2018-06-12 18:01:21 +0300 Timo Sirainen (0449b581e) - It left the IP variable unitialized which caused host parameter to be left - empty causing flush all. Flushing with IP address was not affected. + virtual: Fix memory leak when selecting mailboxes with '-' or /metadata -M src/doveadm/doveadm-director.c -2017-08-10 17:50:04 +0300 Timo Sirainen (c00c41e56) +M src/plugins/virtual/virtual-config.c - director: Make sure users gets expired even on an idle director +2018-06-12 17:23:35 +0300 Timo Sirainen (035b9c3ab) - Normally expiring gets done while looking up users, but if nothing is doing - that on an idle director the users won't get expired. This can cause - confusion in "doveadm director status" output. + mail-crypt-acl: Fix memory leak when updating ACLs -M src/director/test-user-directory.c -M src/director/user-directory.c -2017-06-08 01:03:13 +0300 Timo Sirainen (bf005139d) +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c - doveconf: Preserve import_environment when execing binary +2018-06-12 17:08:04 +0300 Timo Sirainen (8cbc2c1c1) - This allows import_environment setting to work with doveadm and other - standalone tools. + lib-dcrypt, mail-crypt: Fix leaking memory when using non-global keys -M src/config/config-request.c -M src/config/config-request.h -M src/config/doveconf.c + The users' private keys had one reference too much. Because of key cache, + most likely the keys were leaked only once at deinit. -2017-06-08 00:40:12 +0300 Timo Sirainen (6766ea3d4) + Changed the i_stream_create_decrypt_callback() API so that it allows the + callback to create the key itself without having to store it anywhere. - lib-master, config: Move the responsibility of cleaning environment to - doveconf + In this case the key was already added to cache, which increased its + refcount. So an alternative fix would have been to simply unreferenced the + key before returning it. It's a bit ugly though to rely on such caches, + since without the cache the code would be buggy. +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/istream-decrypt.h +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-crypt/mail-crypt-plugin.c -M src/config/doveconf.c -M src/lib-master/master-service-settings.c +2018-06-12 16:56:51 +0300 Timo Sirainen (d5dccffc2) -2017-06-08 00:35:08 +0300 Timo Sirainen (63eb42ba4) + mail-crypt: Fix memory leak in "doveadm mailbox cryptokey generate" - lib-master: Use master_service_import_environment() for preserving - environments +M src/plugins/mail-crypt/doveadm-mail-crypt.c -M src/lib-master/master-service-settings.c +2018-06-12 16:49:36 +0300 Timo Sirainen (bb813051d) -2017-06-08 00:33:32 +0300 Timo Sirainen (caac93845) + lib-smtp: server: Fix memory leak when handling BDAT command - lib-master: master_service_import_environment() - use a data stack frame - This way the caller doesn't have to do it. +M src/lib-smtp/smtp-command-parser.c -M src/lib-master/master-service.c -M src/master/main.c +2018-06-12 16:45:26 +0300 Timo Sirainen (413dfa5b4) -2017-06-08 00:24:19 +0300 Timo Sirainen (10e65f3bc) + imapc: Fix leaking memory when sending imapc commands after authentication + failure - master: Move master_set_import_environment() to lib-master +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/plugins/quota/quota-imapc.c -M src/lib-master/master-service.c -M src/lib-master/master-service.h -M src/master/main.c +2018-08-06 11:34:35 +0300 Aki Tuomi (efdd30284) -2017-06-08 00:20:38 +0300 Timo Sirainen (e67bd1b80) + lib: test-strfuncs - Rename test i_strbegins to str_begins - master: Append to existing DOVECOT_PRESERVE_ENVS instead of overwriting it + Matches the real name +M src/lib/test-strfuncs.c -M src/master/main.c +2018-08-06 11:36:41 +0300 Aki Tuomi (9fde31dee) -2017-06-08 00:14:30 +0300 Timo Sirainen (2a7c4f904) + doveconf: Fix compiler nit - master: Move import_environment setting to lib-master's - master_service_settings + Ensure secret_r cannot be NULL unless none was found. +M src/config/doveconf.c -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-settings.h -M src/master/main.c -M src/master/master-settings.c -M src/master/master-settings.h +2018-08-14 15:25:40 +0300 Aki Tuomi (d79f6b110) -2017-09-11 12:27:17 +0300 Timo Sirainen (6eacca95a) + doveconf: Improve secret hiding - lib-storage: Fix mailbox list notification assert-crash when mailbox is - deleted + Hide with more wide filtering. - Reproduced with if IMAP NOTIFY is used for non-selected mailboxes without - MailboxName being specified. Another session then does changes to a mailbox - and immediately deletes it, which causes the crash. +M src/config/doveconf.c - Fixes: Panic: file mailbox-list-index-notify.c: line 751: unreached +2018-08-14 15:24:56 +0300 Aki Tuomi (bf11f4dc3) -M src/lib-storage/list/mailbox-list-index-notify.c + doveconf: Use key_ends_with to compare suffixes -2017-09-11 12:59:27 +0300 Timo Sirainen (767da2543) + Fixes key hiding. - lib-index: mail_index_use_existing_permissions() - Ignore with INDEX=MEMORY + Broken in 1518e085 +M src/config/doveconf.c -M src/lib-index/mail-index.c +2018-08-01 08:47:34 +0300 Aki Tuomi (5bd69c6e2) -2017-09-11 12:58:28 +0300 Timo Sirainen (fb57fe1aa) + doveconf: Do not skip over secrets when hiding them - lib-index: mail_index_use_existing_permissions() - Log error if stat() - unexpectedly fails + All candidates for hiding need to be considered, otherwise it might skip + over some of them and leave them unhidden. +M src/config/doveconf.c -M src/lib-index/mail-index.c +2018-05-30 14:10:41 +0300 Aki Tuomi (57d83da4f) -2017-07-27 16:34:34 +0200 Stephan Bosch (ce26649bb) + doveconf: Hide URL userpart - lib-http: message parser: Reject messages with invalid Date header when - HTTP_MESSAGE_PARSE_FLAG_STRICT flag is enabled. +M src/config/doveconf.c -M src/lib-http/http-message-parser.c -M src/lib-http/test-http-request-parser.c -M src/lib-http/test-http-response-parser.c +2018-06-19 14:26:29 +0300 Aki Tuomi (20f3be300) -2017-07-27 16:30:20 +0200 Stephan Bosch (cdde7190c) + doveconf: Add find_next_secret - lib-http: Fixed bug in date parser: sometimes read one byte past end of - input. + Find start of possible next secret, and return what the found secret was. + Makes next commit easier. - This caused spurious parse errors. +M src/config/doveconf.c -M src/lib-http/http-date.c +2018-05-09 10:19:02 +0300 Aki Tuomi (86294b107) -2017-07-27 16:03:44 +0200 Stephan Bosch (3797b21e5) + config: Fix crash in doveconf -n when hiding sensitive information - lib-http: test-http-response-parser: Show error message for tests of invalid - responses. + Broken by fc02343f +M src/config/doveconf.c -M src/lib-http/test-http-response-parser.c +2018-05-09 10:18:39 +0300 Aki Tuomi (4a45ccea7) -2017-07-19 16:53:17 +0300 Timo Sirainen (380127c45) + lib: Add str_append_escaped and use it with str_escape - *-login: Cache director_username_hash between KICK-DIRECTOR-HASH commands - This should make the kicking much faster, which is important when director - is moving thousands of users. +M src/lib/strescape.c +M src/lib/strescape.h -M src/login-common/client-common.h -M src/login-common/login-proxy.c +2018-04-12 16:07:31 +0300 Timo Sirainen (9ea342b7b) -2017-07-19 16:49:18 +0300 Timo Sirainen (b1f56afa6) + doveconf: Fix infinite loop when hiding sensitive information - lib-mail: Make sure mail_user_hash() won't return 0 as the hash. + For example with "nopassword=y". Broken in + fc02343fd81a6fab272ac0366b15fc60ec44a8b6 - It doesn't seem to actually happen, but this makes sure of it. +M src/config/doveconf.c -M src/lib-mail/mail-user-hash.c -M src/lib-mail/mail-user-hash.h +2018-03-12 09:11:53 +0200 Aki Tuomi (18b3f83be) -2017-07-06 15:45:24 +0300 Sergey Kitov (f3e5cc34d) + config: Hide more sensitive information - lmtp: Fix for wrong session id of mail user when saving mail, quota checking - on + Hide parts of values where we can see a key that has word key, secret or + pass as prefix and is a key-value pair separated by =. - When quota is checked mail user is allocated with custom ":quota" session id - suffix without incrementing service user session id counter +M src/config/doveconf.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h -M src/lmtp/commands.c +2018-03-12 09:11:14 +0200 Aki Tuomi (0225967c0) -2017-08-25 18:40:23 +0300 Timo Sirainen (b700b7ffd) + config: Move sensitive value hiding to own function - sdbox: Don't open mail files when expunging + Simplifies next change - It was done when mail_attachment_fs was non-empty (and default is - non-empty), even though mail_attachment_dir was empty. +M src/config/doveconf.c -M src/lib-storage/index/dbox-common/dbox-attachment.c -M src/lib-storage/index/dbox-common/dbox-storage.c +2018-03-10 18:20:32 +0200 Aki Tuomi (b27489cd8) -2017-08-21 15:44:41 +0300 Timo Sirainen (291ad7bae) + lib: Add str_nescape - mdbox: Use mail_storage_set_index_error() instead of poorly duplicating it + For partial escaping +M src/lib/strescape.c +M src/lib/strescape.h +M src/lib/test-strescape.c -M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +2018-03-10 17:56:33 +0200 Aki Tuomi (df48e6a8d) -2017-08-21 15:34:40 +0300 Timo Sirainen (0991c1529) + lib: Add i_strstr_arr for searching string for multiple needles - lib-storage: Add mail_storage_set_index_error() +M src/lib/strfuncs.c +M src/lib/strfuncs.h -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c +2018-03-09 17:09:28 +0200 Aki Tuomi (6a4d482e5) -2017-08-21 15:29:46 +0300 Timo Sirainen (969fddbd7) + man: doveconf - Document -P flag - lib-storage: index_mail_set_cache_corrupted() - Don't reset internal error - string - It's already set correctly by the earlier functions. +M doc/man/doveconf.1.in -M src/lib-storage/index/index-mail.c +2018-05-28 10:32:21 +0300 Timo Sirainen (2e1f46151) -2017-08-21 15:27:48 +0300 Timo Sirainen (c8c87b613) + imap: Fix assert-crash when client is disconnected during a long COPY/MOVE - lib-storage: mail_set_mail_cache_corrupted() - set also internal error - string + Similar fix than 481992bfe2740bdec70fcd7366dea50ed9128966 + Fixes: Panic: file cmd-copy.c: line 50 (fetch_and_copy): assertion failed: + (o_stream_is_corked(client->output)) -M src/lib-storage/mail-storage.c +M src/imap/cmd-copy.c -2017-08-21 15:26:13 +0300 Timo Sirainen (94811d840) +2017-12-15 00:44:51 +0200 Phil Carmody (08d35272c) - lib-storage: mailbox_set_index_error() - Set internal error string to - index's error + lib/data-stack - in panic scenarios, use the panic memory buffer + Signed-off-by: Phil Carmody -M src/lib-storage/mail-storage.c +M src/lib/data-stack.c -2017-08-21 15:11:30 +0300 Timo Sirainen (22e6232cc) +2017-12-15 00:35:39 +0200 Phil Carmody (a58d5b080) - lib-storage: Fix error logging after mail_storage_set_internal_error() + lib/datastack - remove useless thing - The function doesn't actually set the last_internal_error and it also - doesn't update last_error_is_internal, so calling - mail_storage_get_last_internal_error() afterwards could be returning an - error for some different older error. + It was useless. - Since there's no parameter to set the internal error string, just reset - last_error_is_internal=FALSE. + Signed-off-by: Phil Carmody -M src/lib-storage/mail-storage.c -M src/lib-storage/test-mail-storage.c +M src/lib/data-stack.c -2017-09-08 12:20:21 +0300 Timo Sirainen (2dceda4a6) +2016-07-21 08:32:52 -0600 Timo Sirainen (fea6c3e11) - lib-storage: Preserve messages' vsize record when rebuilding index + lib-storage: Deduplicate headers in struct mailbox_header_lookup_ctx - Since vsize is often used by quota, losing this can be very expensive. If - the vsize is wrong, it gets fixed automatically when fetching the message - body. + This might slightly improve performance. -M src/lib-storage/index/index-rebuild.c +M src/lib-storage/mailbox-header.c -2017-08-25 15:12:06 +0300 Timo Sirainen (575dc5147) +2018-07-31 17:40:08 -0600 Michael M Slusarz (bcd48b208) - lib-index: Avoid opening .log.2 file if .log was reset + man: Add missing commands to doveadm - After a reset there's no point in trying to read the older log files. This - avoids trying to open .log.2 at least for newly created mailboxes when - trying to lookup log file sequence 1 (since due to some bug/feature the log - files start from sequence 2). -M src/lib-index/mail-transaction-log.c +M doc/man/doveadm.1.in -2017-08-24 10:01:02 +0300 Sergey Kitov (0d5f8a652) +2018-06-30 10:13:10 -0400 Josef 'Jeff' Sipek (47418f3ab) - lib-settings: Escape comma in section name. + global: Start relying on event_set_forced_debug(e, FALSE) being a no-op - Comma is valid symbol in encoded non-ascii section names, so it shouldn't be - used as splitting symbol in section name. + Converted using the following semantic patch: -M src/lib-settings/settings-parser.c + @@ + expression event; + expression cond; + @@ + + - if (cond) { + - event_set_forced_debug(event, + ( + - TRUE + | + - cond + ) + - ); + - } + + event_set_forced_debug(event, cond); -2017-08-17 13:20:26 +0300 Timo Sirainen (6983e2035) +M src/auth/auth-client-connection.c +M src/auth/auth-request.c +M src/auth/auth.c +M src/imap-urlauth/imap-urlauth-client.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c +M src/lib-storage/mail-storage-service.c +M src/login-common/main.c - global: Add/change switch case "fall through" comments +2018-06-30 10:08:27 -0400 Josef 'Jeff' Sipek (c5dc248e7) - These fix warnings with gcc 7's -Wimplicit-fallthrough + lib: Change event_set_forced_debug(e, FALSE) to be a no-op -M src/auth/password-scheme.c -M src/lib-fts/fts-filter-contractions.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-ldap/ldap-connection.c -M src/lib-mail/istream-attachment-extractor.c -M src/lib-mail/message-header-encode.c -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/mail-search.c -M src/lib/json-parser.c -M src/plugins/fts/fts-search-args.c -2017-08-17 14:42:07 +0300 Timo Sirainen (b3db38ab5) +M src/lib/event-log.c +M src/lib/event-log.h - lib: Add missing parenthesis to timeout_add()'s msecs parameter checks +2018-06-30 10:06:04 -0400 Josef 'Jeff' Sipek (ff4ab7caa) - This caused wrong results when the msecs parameter contained e.g. var?1:2 + lib: Add event_unset_forced_debug() -M src/lib/ioloop.h -2017-08-17 13:14:16 +0300 Timo Sirainen (71a14afa6) +M src/lib/event-log.c +M src/lib/event-log.h - lib: Fix compiler warning about mixing boolean with multiplication +2018-06-27 17:16:24 +0300 Timo Sirainen (48e3a1954) + lib-storage: Initialize reset_id in index_index_copy_cache -M src/lib/macros.h + Makes valgrind happy with clang's optimizations. -2017-08-16 13:53:55 +0300 Michael Koch (5a4ba1e4e) +M src/lib-storage/index/index-rebuild.c - push-notification plugin: properly terminate strings +2018-06-20 10:49:46 +0300 Timo Sirainen (d03413efb) - Without this fix, if the new message does not contain a from, a subject, and - a snippet the generated JSON will be malformed (the status check at the end - appended a '"' when it shouldn't have). + lmtp, submission: Remove extra spaces from "state = X" in disconnect log + line -M src/plugins/push-notification/push-notification-driver-ox.c + Other Dovecot log messages don't have spaces in key=value. -2017-07-25 09:35:31 +0300 Timo Sirainen (bb82aeaf0) +M src/lmtp/client.c +M src/submission/submission-client.c - lib-storage: If root dir already exists as file, log better error message. +2018-06-11 14:22:38 +0300 Aki Tuomi (944e0e801) + doveadm-dict: Initialize set variable in cmd_dict_init -M src/lib-storage/mailbox-list.c + Makes valgrind happy with clang's optimizations -2017-07-24 21:08:33 +0300 Timo Sirainen (72abc81ad) +M src/doveadm/doveadm-dict.c - lib-storage: Try to get mailbox list index's permissions from its parent - directory +2018-06-11 14:06:20 +0300 Aki Tuomi (1b34e02e1) - This avoids stat()ing the mail/index root directory, which is especially - useful when mailbox list index is stored in tmpfs. + doveadm-dict: Remove spurious `key =` debug logging -M src/lib-storage/list/mailbox-list-index.c + Was added in 42db3821 -2017-07-24 21:07:44 +0300 Timo Sirainen (19ac276c5) +M src/doveadm/doveadm-dict.c - lib-index: Add mail_index_use_existing_permissions() +2018-07-31 12:40:28 +0300 Timo Sirainen (ee194004b) - This has annoyingly lot of copy&pasting from - mailbox_list_get_permissions_stat(), but there didn't seem to be any nice - place where to share the code. + lib-dict-backend: Fix linking order for test-dict-sql -M src/lib-index/mail-index.c -M src/lib-index/mail-index.h -2017-07-24 20:48:25 +0300 Timo Sirainen (fe85c16b9) +M src/lib-dict-backend/Makefile.am - lib-storage: If ITERINDEX is set, delay checking whether mail root exists +2018-05-25 14:44:10 +0300 Timo Sirainen (d82d80113) - In future this could be done even without ITERINDEX. It's not done yet, - since it might break backwards compatibility with some systems. + lib-dict-backend: Fix building --with-cdb --without-shared-libs -M src/lib-storage/mail-storage.c -2017-09-04 17:48:52 +0300 Timo Sirainen (3c28795b1) +M src/lib-dict-backend/Makefile.am - lib-storage: Fix INBOX notifications to set correct events +2018-05-22 10:24:33 +0300 Timo Sirainen (241cee9c8) - This fixes IMAP NOTIFY so it doesn't send STATUS notifications to INBOX when - it doesn't have to. + log: Fix the default prefix -M src/lib-storage/list/mailbox-list-index-notify.c + "listen_fd(123): foo" is better than "listen_fd 14foo" -2017-09-04 17:37:05 +0300 Timo Sirainen (b961a59a2) +M src/log/log-connection.c - lib-storage: List index notify cleanup - move code to separate functions +2018-05-20 15:56:51 +0300 Timo Sirainen (fcc1bf46f) - No functional changes. In preparation for the next commit. + lib-index: fsck: Fix small log offsets to file's correct header size -M src/lib-storage/list/mailbox-list-index-notify.c + Use the file's actual current header size, not + MAIL_TRANSACTION_LOG_HEADER_MIN_SIZE, which is nowadays smaller. This + resulted in unnecessary errors like: -2017-09-04 16:59:52 +0300 Timo Sirainen (431ccc85e) + Corrupted transaction log file ...: Invalid min_file_offset: ..., + min_file_offset (24) < hdr_size (40) - lib-storage: Remove INBOX notification checks if mailbox events aren't - requested +M src/lib-index/mail-index-fsck.c - Nothing would be done with the results of those checks. +2018-05-20 15:55:03 +0300 Timo Sirainen (79168d056) - Note that MAILBOX_LIST_NOTIFY_UIDVALIDITY can be handled using mailbox list - index, even for INBOX with mailbox_list_index_include_inbox=no. + lib-index: fsck: Don't change log_file_tail_offset=0 -M src/lib-storage/list/mailbox-list-index-notify.c -2017-09-04 16:55:30 +0300 Timo Sirainen (7b156140a) +M src/lib-index/mail-index-fsck.c - lib-storage: Optimize INBOX notifications with - mailbox_list_index_include_inbox=yes +2018-04-22 13:11:16 +0300 Timo Sirainen (d54b20562) - There's no need for special INBOX checks in that case, because INBOX is - tracked in the mailbox list index the same as any other mailbox. + imap-hibernate: Log error when connect(imap-master) fails -M src/lib-storage/list/mailbox-list-index-notify.c + It was previously logged only with info-level. -2017-09-04 19:37:12 +0300 Timo Sirainen (046edb80f) +M src/imap-hibernate/imap-client.c - pop3-migration: Fail if all IMAP mails were matched by size, but POP3 had - extra mails +2018-05-21 01:30:36 +0300 Timo Sirainen (a098ab8f9) - This makes the handling same as what happens when the same situation happens - and the last mails were matched by headers. That's an error, unless - pop3_migration_ignore_*_uidls=yes. + lib-index: Remove #if'ed out code -M src/plugins/pop3-migration/pop3-migration-plugin.c + Originally added by 0b2d4626c6fb4e40bc81c56d8227191f3c7e1ea3. Possibly + accidentally. -2017-09-04 18:32:15 +0300 Timo Sirainen (6bbd48066) +M src/lib-index/mail-index-sync-ext.c - pop3-migration: Add pop3_migration_ignore_extra_uidls=yes setting +2018-06-28 00:34:14 +0300 Martti Rannanjärvi (9fbab16a9) + indexer: Don't log error when getting path to nonexistent mailbox fails -M src/plugins/pop3-migration/pop3-migration-plugin.c -2017-09-04 12:40:49 +0300 Timo Sirainen (e88636f3f) +M src/indexer/master-connection.c - pop3-migration: Strip away invalid header lines. +2018-06-28 00:05:26 +0300 Martti Rannanjärvi (cf471fd4d) - If there's no ":" in the header, remove it. Fixes matching mails with - Zimbra. + indexer: Don't log mailbox was deleted under us error -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/pop3-migration/test-pop3-migration-plugin.c -2017-08-25 13:38:35 +0300 Timo Sirainen (5af0c9f99) +M src/indexer/master-connection.c - pop3-migration: Try to assign UIDLs based on dovecot.index.cache +2018-06-27 23:58:11 +0300 Martti Rannanjärvi (43d1451ed) - Add the UIDLs to (imapc) mailbox cache after they've been assigned. Try to - read them from the cache on the next sync to avoid reading mails' headers. + indexer: Don't log error when mailbox was not found - This can be disabled with pop3_migration_skip_uidl_cache=yes, just in case - there's some kind of a problem with it. -M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/indexer/master-connection.c -2017-08-25 13:36:11 +0300 Timo Sirainen (f7590c10e) +2018-06-27 17:19:38 +0300 Martti Rannanjärvi (cc92bce8d) - pop3-migration: Delete unnecessary POP3 order checking code + fts-solr: Properly URL encode quotes for empty string - Nothing is actually using the result. + Invalid URL encoding of empty string made Solr server give 400 Bad Request + HTTP responses for searches like SEARCH HEADER FROM "". -M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/fts-solr/fts-backend-solr.c -2017-08-25 13:16:26 +0300 Timo Sirainen (1c82a1bff) +2018-06-27 17:27:15 +0300 Martti Rannanjärvi (280c8a52b) - lib-storage: Support LISTINDEX= to disable it + fts-solr: Fix default_ns parameter parsing + This version makes it possible to specify a value to the setting as well. -M src/lib-storage/list/mailbox-list-index.c +M src/plugins/fts-solr/fts-solr-plugin.c -2017-07-13 10:02:26 +0300 Aki Tuomi (799e0498e) +2018-06-26 12:38:50 +0300 Martti Rannanjärvi (ec4592e61) - apparmor: Add apparmor plugin + fts-solr: Append '/' to URL path when missing in configuration - It lets dovecot temporarily switch to a new apparmor context for a user. + This fixes a crash when url parameter has empty path like + http://localhost:8080 instead of http://localhost:8080/ and makes using url + like http://localhost:8080/solr behave the same as + http://localhost:8080/solr/ -M configure.ac +M src/plugins/fts-solr/solr-connection.c -2017-08-18 11:09:41 +0300 Timo Sirainen (10db88971) +2018-07-31 08:45:29 +0300 Aki Tuomi (f88610824) - director: Fix rapid reconnection on failed outgoing connections + lib-master: Copy ssl_curve_list setting - last_network_failure wasn't set, which caused a failed outgoing connection - to immediately reconnect to it. This resulted in rapid logging of connect() - errors. + Otherwise it won't get used. -M src/director/director-connection.c + Broken in 30dca95419 -2017-08-18 11:22:52 +0300 Aki Tuomi (2326cebd6) +M src/lib-master/master-service-ssl-settings.c - doveadm-server: Deinitialize print on connection destroy +2018-07-31 12:26:35 +0300 Aki Tuomi (b9cf3d7cc) - Otherwise print remains initialized and can break when reusing the service. + lib-ssl-iostream: Remove unused DH members -M src/doveadm/client-connection.c + These are not being used anywhere. -2017-07-13 10:02:26 +0300 Aki Tuomi (3a67e54a4) +M src/lib-ssl-iostream/iostream-openssl.h - apparmor: Add apparmor plugin +2018-07-30 20:26:19 +0300 Aki Tuomi (a43b54fe9) - It lets dovecot temporarily switch to a new apparmor context for a user. + lib-ssl-iostream: Make DH parameters optional -M configure.ac -A m4/want_apparmor.m4 -M src/plugins/Makefile.am -A src/plugins/apparmor/Makefile.am -A src/plugins/apparmor/apparmor-plugin.c + Since a lot of connections use elliptic curve Diffie-Hellman these days, + make it possible to use dovecot without providing Diffie-Hellman parameters. + This reduces setup cost as the parameters do not need to be generated, which + can be a time consuming task. -2017-08-18 17:38:34 +0300 Timo Sirainen (b67fe203a) +M src/lib-master/master-service-ssl-settings.c +M src/lib-ssl-iostream/iostream-openssl-context.c - lib-storage: Call mail_cache_close_mail() when mail is closed +2018-07-09 11:39:59 +0300 Timo Sirainen (920369da7) - Fixes caching problems with INDEX=MEMORY + m4, quota: Support rquota using libtirpc -M src/lib-storage/index/index-mail.c -2017-08-18 17:34:14 +0300 Timo Sirainen (9ae8da0b6) +M m4/quota.m4 +M src/plugins/quota/Makefile.am - lib-index: Add mail_cache_close_mail() to smartly drop cached data with - INDEX=MEMORY +2018-07-09 11:33:23 +0300 Timo Sirainen (75a4b80f7) - Instead of reseting the entire transaction buffer when 256 kB is reached, - just drop mails have have been marked closed with mail_cache_close_mail(). - If that's not enough, continue deleting forcibly until the buffer is below - 256 kB. + m4: Enable rquota only if rpc/rpc.h exists - This is especially important when mail_prefetch_count>0 and INDEX=MEMORY. In - that case there can be multiple mails that are being added to cache and used - later on. If they were dropped from cache too early, the work would have to - be done all over again. + It's been removed in glibc 2.26 -M src/lib-index/mail-cache-transaction.c -M src/lib-index/mail-cache.h +M m4/quota.m4 -2017-08-16 12:44:02 +0300 Timo Sirainen (b048e2dab) +2018-06-27 09:10:39 +0300 Aki Tuomi (4b13e3ead) - lib-index: Fix compiler warning in test-mail-transaction-log-file + lib-ssl-iostream: Turn on SSL_OP_SINGLE_DH_USE + Improves forward secrecy in case a DH cipher is used. -M src/lib-index/test-mail-transaction-log-file.c +M src/lib-ssl-iostream/iostream-openssl-context.c -2017-08-07 16:03:46 +0300 Sergey Kitov (81db0272d) +2018-06-13 17:26:57 +0300 Timo Sirainen (b25ab36ca) - doveadm: mailbox_list_index_very_dirty_syncs disabled for force-resync + lib: Assert-crash if duplicate event categories are tried to be registered - prerun of cmd force-resync sets mailbox_list_index_very_dirty_syncs to no - for mail_storage_service_user befor mail_user is allocated. -M src/doveadm/doveadm-mail.c +M src/lib/lib-event.c -2017-08-07 15:59:35 +0300 Sergey Kitov (2bfe0fdc3) +2018-06-21 22:55:50 +0200 Stephan Bosch (31ab72c49) - lib-storage: added settings updating function for the mail_storage_service - user + lib-smtp: server: data command: Hold a reference to the connection while + handling input. + Makes sure connection object remains available while command is handled. + Fixes a valgrind error reported for accessing the connection object after it + is freed, which happens for the destroy debug message of the command (even + when debugging is not enabled). -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h +M src/lib-smtp/smtp-server-cmd-data.c -2017-07-20 13:24:21 +0300 Aki Tuomi (8a4671318) +2018-06-21 22:51:26 +0200 Stephan Bosch (eff8c5ebf) - auth: Escape LDAP search filter properly + lib-smtp: server: data command: Dereference command at single place during + input handling. - This is syntaxical escaping to make ldap servers accept queries with - escapable characters, instead of erroring out. -M src/auth/db-ldap.c +M src/lib-smtp/smtp-server-cmd-data.c -2017-07-20 08:49:25 +0300 Aki Tuomi (069ad83cf) +2018-06-26 13:18:20 +0300 Aki Tuomi (5a460b7ee) - dict-ldap: Escape LDAP search filter properly + lib-storage: Turn on debug early if MAIL_STORAGE_SERVICE_FLAG_DEBUG set - This is syntaxical escaping to make ldap servers accept queries with - escapable characters, instead of erroring out. It is possible that the - filter could have been modified in unexpected ways if the input comes from - untrusted sources. -M src/plugins/dict-ldap/dict-ldap.c +M src/lib-storage/mail-storage-service.c -2017-07-20 08:48:30 +0300 Aki Tuomi (06bd7c80e) +2018-06-26 13:22:20 +0300 Aki Tuomi (08b76654d) - lib-ldap: Store error if sending request to LDAP fails + lib-storage: Use provided flags in mail_storage_service_first_init - If the request cannot be sent e.g. due to bad search filter store the error - into the result. - Fixes Panic: file ldap-connection.c: line 709 (ldap_result_has_failed): - assertion failed: ((result->openldap_ret == LDAP_SUCCESS) == - (result->error_string == NULL)) +M src/lib-storage/mail-storage-service.c -M src/lib-ldap/ldap-connection.c +2018-06-26 13:18:00 +0300 Aki Tuomi (d87ce31b6) -2017-07-26 19:42:48 +0300 Aki Tuomi (ee5ac22d1) + lib-storage: Fix MAIL_STORAGE_SERVICE_FLAG_DEBUG work again - imap: Set client created before initializing namespaces - Fixes Panic: file master-service.c: line 819 - (master_service_client_connection_destroyed): assertion failed: - (service->master_status.available_count < service->total_available_count) +M src/lib-storage/mail-storage-service.c -M src/imap/imap-master-client.c +2018-05-23 14:39:44 +0300 Sergey Kitov (d3afdadc8) -2017-07-06 13:24:31 +0300 Timo Sirainen (2b54e117b) + auth: pass overriden auth_debug setting to auth process - lib: file_create_locked() - Treat mkdir() EEXIST error as success - This can happen in race conditions when multiple processes are mkdir()ing - the same directory. It shouldn't result in failure. +M src/auth/auth-request.c -M src/lib/file-create-locked.c +2018-03-20 11:22:43 +0200 Sergey Kitov (b1a34a6d4) -2017-07-26 19:47:16 +0300 Aki Tuomi (357c3b5c2) + lib-storage: Replace "if(mail_debug)" with "if(event_want_debug_log)" - imap: Flush response to client before starting possibly long operation - Fixes Error: Timeout communicating with /var/run/dovecot/imap-master - (version received) +M src/lib-storage/list/subscription-file.c +M src/lib-storage/mail-storage.c -M src/imap/imap-master-client.c +2018-03-20 11:20:44 +0200 Sergey Kitov (f4922ff56) -2017-08-14 15:44:24 +0300 Timo Sirainen (4702aae4e) + plugins: replace "if(mail_debug){i_debug}" with "e_debug" - cassandra: Fix confusing debug logging for paged query results. - Even when caller supported paged queries, the debug output contained - "Paged query has more results, but not supported by the caller". Clear out - the error after sql_result_more() is called, so it won't be logged. +M src/plugins/acl/acl-backend.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-storage.c +M src/plugins/apparmor/apparmor-plugin.c +M src/plugins/charset-alias/charset-alias-plugin.c +M src/plugins/expire/expire-plugin.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/fts/fts-storage.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/mail-crypt/mail-crypt-plugin.c +M src/plugins/mail-crypt/mail-crypt-userenv.c +M src/plugins/mail-filter/mail-filter-plugin.c +M src/plugins/notify-status/notify-status-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/push-notification/push-notification-drivers.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/quota-storage.c +M src/plugins/replication/replication-plugin.c +M src/plugins/trash/trash-plugin.c +M src/plugins/virtual/virtual-storage.c +M src/plugins/welcome/welcome-plugin.c -M src/lib-sql/driver-cassandra.c +2018-03-20 11:05:13 +0200 Sergey Kitov (1fa6289e1) -2017-07-02 12:05:36 +0200 Stephan Bosch (1e11badc1) + lib-storage: Replace "if(mail_debug){i_debug}" "e_debug" - lib: Created basic test suite for ostream-buffer. +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-status.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-list.c -M src/lib/Makefile.am -M src/lib/test-lib.c -M src/lib/test-lib.h -A src/lib/test-ostream-buffer.c +2018-05-24 15:18:30 +0300 Sergey Kitov (4b2389fa1) -2017-08-08 16:56:02 +0300 Timo Sirainen (f39bde1e1) + lib-storage: Force mail_storage_service_user event debug when mail_debug=yes - lib-index: Fix wrong mail_index_modseq_header automatically - It happens only on the next sync, although that isn't actually guaranteed to - happen. Still, it happens almost always so this should be good enough. +M src/lib-storage/mail-storage-service.c -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.c -M src/lib-index/test-mail-transaction-log-file.c +2018-03-20 10:51:21 +0200 Sergey Kitov (4bf907ebf) -2017-08-08 16:54:42 +0300 Timo Sirainen (7197306fc) + lda & lib-lda: "if(mail_debug){i_debug}" with "e_debug" - lib-index: Code cleanup - move code to get_modseq_next_offset_at() - In preparation for making the next commit smaller. +M src/lda/main.c +M src/lib-lda/mail-send.c -M src/lib-index/mail-transaction-log-file.c +2018-03-20 10:49:08 +0200 Sergey Kitov (92b4d9440) -2017-08-08 14:55:48 +0300 Timo Sirainen (d9cfad23b) + indexer: Replace "if(mail_debug){i_debug}" with "e_debug" - lib-index: Add unit tests to - mail_transaction_log_file_get_modseq_next_offset() and - _get_highest_modseq_at() +M src/indexer/master-connection.c -M src/lib-index/test-mail-transaction-log-file.c +2018-03-20 10:46:19 +0200 Sergey Kitov (79ecdaea8) -2017-08-08 14:01:18 +0300 Timo Sirainen (838770031) + imap: Replace "if(mail_debug){i_debug}" with "e_debug" - lib-index: Add unit test to mail_transaction_update_modseq() +M src/imap/cmd-urlfetch.c +M src/imap/imap-client-hibernate.c +M src/imap/imap-master-client.c +M src/imap/imap-state.c -M src/lib-index/Makefile.am -A src/lib-index/test-mail-transaction-log-file.c +2018-03-20 10:17:27 +0200 Sergey Kitov (aef4bf628) -2017-08-05 14:38:50 +0900 Timo Sirainen (b31ba3c26) + lib-imap-urlauth & imap-urlauth: replace "if(mail_debug){i_debug}" with + "e_debug(client->event)" - lib-index: Remove tracking of mail_index_modseq_sync.highest_modseq - It's no longer necessary after the previous changes. +M src/imap-urlauth/imap-urlauth-client.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-imap-urlauth/imap-urlauth-fetch.c -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-modseq.h -M src/lib-index/mail-index-sync-update.c +2018-03-20 09:52:38 +0200 Sergey Kitov (9db0b7b12) -2017-08-05 14:33:12 +0900 Timo Sirainen (85d78d5db) + imap-urlauth: Add event with "imap-urlauth" category to struct client of + imap-urlauth - lib-index: Fix setting highest_modseq correctly in mail_index_modseq_header - The internally counted ctx->highest_modseq wasn't correct if all of the - records weren't synced. This could have happened for various reasons. Since - the view's current log seq/offset is used for the header, we can also use - the current highest_modseq from the view as well and it's guaranteed to be - correct. +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-client.h - This fixes various potential problems with using QRESYNC and CONDSTORE - extensions. It also fixes potential errors with unhibernating imap clients, - including: +2018-03-20 09:05:26 +0200 Sergey Kitov (b103d44fc) - Error: .../dovecot.index.log: Transaction log changed unexpectedly, can't - get modseq + global: Replace check for auth_debug with event_want_debug_log in + doveadm-auth::auth_connected() -M src/lib-index/mail-index-modseq.c + These functions will create event with "auth" category and unref it in the + end. -2017-08-05 14:29:12 +0900 Timo Sirainen (6eb78e38a) +M src/doveadm/doveadm-auth.c - lib-index: Update per-flag modseq value a bit more correctly. +2018-03-19 16:10:49 +0200 Sergey Kitov (aa509b955) - This changes the code to be similar to the per-mail modseq updating in - mail_index_modseq_update(). It probably wasn't exactly wrong previously - either, but this change is required for the following commits. + global: Replace "if(auth_debug){i_debug(...)}" with e_debug(event, ...) -M src/lib-index/mail-index-modseq.c + event is one of: global auth::auth_event, auth_client_connection->event, + auth_request->event, login-common::event_auth. These event have category + "auth". -2017-08-05 14:16:31 +0900 Timo Sirainen (670ac7454) +M src/auth/auth-client-connection.c +M src/auth/auth-master-connection.c +M src/auth/auth-postfix-connection.c +M src/auth/auth-request.c +M src/auth/auth-token.c +M src/auth/userdb-ldap.c +M src/login-common/client-common-auth.c - lib-index: Fix checking if modseq header is up-to-date +2018-03-19 14:50:31 +0200 Sergey Kitov (c0c8e87ff) - We were almost always assuming that it is. + global: Remove unnecessary checks for mail_debug and auth_request->debug -M src/lib-index/mail-index-modseq.c + These checks are performed before calling auth_request_log_debug() and + push_notification_driver_debug(), while the same checks are performed inside + of these functions, and they return without doing anything. -2017-08-05 14:11:17 +0900 Timo Sirainen (6dc9d7d18) +M src/auth/db-oauth2.c +M src/auth/userdb-prefetch.c +M src/plugins/push-notification/push-notification-driver-ox.c - lib-index: Fix modseq tracking with multiple flag updates +2018-03-19 13:53:33 +0200 Sergey Kitov (3bbc48ee8) - The earlier code was checking only the first flag record update. If the - first one had only internal flag changes but (some of) the rest didn't, the - modseq wasn't counted correctly. This was probably pretty rare. + auth: Add event with category "auth" to struct auth_request. -M src/lib-index/mail-transaction-log-file.c -2017-08-05 14:07:58 +0900 Timo Sirainen (ad1083080) +M src/auth/auth-request-handler.c +M src/auth/auth-request.c +M src/auth/auth-request.h - lib-index: Fix modseq tracking for MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ +2018-03-19 12:16:23 +0200 Sergey Kitov (b2f113588) - This is used to increase modseq for mails when their private flags change. - Use an already existing MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL() that does - this properly. + auth: Add event with category "auth" to struct auth_client_connection. - (This change preserves another bug, which is fixed in the next commit.) -M src/lib-index/mail-transaction-log-file.c +M src/auth/auth-client-connection.c +M src/auth/auth-client-connection.h -2017-07-23 12:32:38 +0300 Timo Sirainen (a9a011b6b) +2018-03-19 11:44:59 +0200 Sergey Kitov (c903a54fb) - lib-master: Allow userdb to return postlogin socket path. + login-common: Add global event_auth with "auth" category. - Returning "postlogin=socketpath" as userdb extra field overrides the - postlogin socket path in the service { executable } parameter. -M src/lib-master/master-login.c +M src/login-common/login-common.h +M src/login-common/main.c -2017-08-09 13:23:36 +0300 Timo Sirainen (586c11a1b) +2018-03-19 11:20:58 +0200 Sergey Kitov (c99dc72e2) - push-notification: Switch to main ioloop while calling drivers' - deinit/cleanup callbacks + lib: Add event_want_debug and event_want_debug_log macros - Continues a44595f7b1afc7ccbd8653598753b32899d01c76 to other functions. For - example the OX backend would call http_client_wait(), which would move the - I/Os and timeouts to the current ioloop, which might not be main_ioloop - always. When that ioloop gets destroyed, I/O and timeout leaks are logged - and eventually the process crashes when calling http_client_deinit() in - cleanup() (this would happen later for another mail_user). -M src/plugins/push-notification/push-notification-plugin.c +M src/lib/event-log.c +M src/lib/event-log.h -2017-07-26 12:53:16 +0300 Aki Tuomi (473574bb4) +2018-03-19 11:14:22 +0200 Sergey Kitov (39f0972a3) - virtual: Sync backend flags on initial sync when UIDVALIDITY hasn't changed + auth: Add global auth_event with category "auth". - Before recent fixes the UIDVALIDITY was thought to change almost every time, - so this bug wasn't visible. -M src/plugins/virtual/virtual-sync.c +M src/auth/auth-common.h +M src/auth/auth.c -2017-07-26 13:35:36 +0300 Aki Tuomi (6758aa2c5) +2018-05-24 21:43:42 -0600 Michael Slusarz (516d9657a) - virtual: Do not store recent flags to virtual index + push-notification: Add SSL support for OX driver - Setting the flag here would case unnecessary index update to clear the flag - later on. -M src/plugins/virtual/virtual-sync.c +M src/plugins/push-notification/Makefile.am +M src/plugins/push-notification/push-notification-driver-ox.c -2017-08-08 00:31:57 +0300 Timo Sirainen (0585f7f2f) +2018-07-31 16:32:48 -0600 Michael M Slusarz (4d4b1f2a8) - mdbox: "Inconsistency in map index" wasn't fixing itself automatically + config: generation of clean config should copy sensitive data - Broken by b9da8540e665138b3cad0b637c08c0ab7d7a7eeb + Add -P parameter to the CLI warning doveconf example -M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/config/old-set-parser.c -2017-08-01 13:48:55 +0900 Timo Sirainen (4e97f0131) +2018-05-11 09:19:21 +0300 Phil Carmody (899807f46) - lib-imap-client: Log an info-line when connected to remote server + lib: bits - macros to simplify expressions when using -Wstrict-bool - Include the remote IP:port ad local IP:port. This allows matching the - connection with the remote server's logs (or e.g. haproxy logs). + To be strict-bool compliant, your expressions need to be a bit verbose, + these might simplify things. -M src/lib-imap-client/imapc-connection.c + There are presently over 400 instances matching HAS_NO_BITS(), and nearly + 1300 instances matching HAS_ANY_BITS(), so it's a very common pattern. -2017-06-18 13:07:14 +0300 Timo Sirainen (859794b0b) + Signed-off-by: Phil Carmody - fts: Log when indexing requires adding more mails to index than requested +M src/lib/bits.h +M src/lib/test-bits.c - This should mainly happen when FTS indexing is requested for a virtual - mailbox. +2018-05-11 10:53:46 -0400 Josef 'Jeff' Sipek (6bda3e3fa) -M src/plugins/fts/fts-storage.c + lib-storage: Harden check for imapdir list name -2017-06-18 12:18:31 +0300 Timo Sirainen (db436d158) + Comparing char pointers to determine string equality is asking for trouble. + Use strcmp() instead. - indexer-worker: Log first and last UID of which mails were indexed +M src/lib-storage/list/mailbox-list-maildir.c +2018-05-11 10:41:01 -0400 Josef 'Jeff' Sipek (3c6030bfc) -M src/indexer/master-connection.c + auth: Use PRIuUOFF_t to print process VSZ limit -2017-06-18 13:04:43 +0300 Timo Sirainen (9bd9dc672) + This doesn't change the behavior, but it makes it more obviously correct. - indexer-worker: Log number of indexing attempts in transaction commit - failure +M src/auth/passdb-cache.c - This could be interesting if the number is large. +2018-05-11 10:38:32 -0400 Josef 'Jeff' Sipek (c9bda0efc) -M src/indexer/master-connection.c + auth: Avoid comparison of ints of different signs on FreeBSD -2017-06-18 13:00:57 +0300 Timo Sirainen (43d8925cd) + For legacy reasons, rlim_t on FreeBSD is defined as int64_t. - indexer-worker: Log "Indexed .. messages" even if mailbox_search fails +M src/auth/passdb-cache.c - The transaction is still being committed. +2018-05-11 10:50:16 -0400 Josef 'Jeff' Sipek (3b117f83f) -M src/indexer/master-connection.c + lib-storage: Return correct root path for PATH_TYPE_ALT_MAILBOX -2017-06-15 09:18:03 +0200 Stephan Bosch (23c1e6fdd) + mailbox_list_set_get_root_path(..., MAILBOX_LIST_PATH_TYPE_ALT_MAILBOX, ...) + must return one of three values: - lib: Fix ostream-buffer to return buffer contents size in - o_stream_get_buffer_used_size(). + 1. if there is no alt storage, return NULL 2. if there is alt storage and + MAILBOXDIR is set, + return ${alt_dir}/${mailbox_dir_name} 3. if there is alt storage but + MAILBOXDIR is not set, return ${alt_dir} - This is necessary for querying o_stream_get_buffer_avail_size() with respect - to a limit set earlier using o_stream_set_max_buffer_size(). This is mainly - useful for test suites. + Case number 3 was broken, and it mistakenly returned ${root_dir} - in other + words, it behaved as MAILBOX_LIST_PATH_TYPE_MAILBOX. -M src/lib/ostream-buffer.c + This correction changes the behavior, but this shouldn't cause + incompatibilities since: -2017-08-10 10:23:32 +0300 Timo Sirainen (f5085e52a) + 1. it affects only storages that support alternate storage 2. it affects + only configurations that use empty MAILBOXDIR - config: Log a warning about plugin { ...=no } probably being treated as - "yes" + The only storage that supports alternate storage setting is dbox but dbox + defaults to MAILBOXDIR=mailboxes. Additionally, it appears to be impossible + to override it to an empty string (setting it to an empty strings causes + dbox to override it with the default - "mailboxes"). Therefore, nobody + should be affected by this change. - This is properly fixed in v2.3. This should be good enough for now. +M src/lib-storage/mailbox-list.c -M src/config/config-parser-private.h -M src/config/config-parser.c -M src/config/old-set-parser.c +2018-04-24 17:22:00 +0300 Timo Sirainen (9113edbed) -2017-08-08 11:25:10 +0300 Timo Sirainen (36079b467) + doveadm stats dump: Add stddev field - quota-status: Fix compiling + Include it in default output as well. +M src/doveadm/Makefile.am +M src/doveadm/doveadm-stats.c -M src/plugins/quota/quota-status.c +2018-04-24 16:29:49 +0300 Timo Sirainen (c7c7cd410) -2017-07-03 18:40:47 +0300 Aki Tuomi (4118e8671) + doveadm stats dump: Add -f parameter - quota-status: Support recipient_delimiter + This allows specifying which fields are wanted to be dumped. +M src/doveadm/doveadm-stats.c -M src/plugins/quota/Makefile.am -A src/plugins/quota/quota-status-settings.c -A src/plugins/quota/quota-status-settings.h -M src/plugins/quota/quota-status.c +2018-04-24 17:32:21 +0300 Timo Sirainen (023a023d7) -2017-07-03 18:31:56 +0300 Aki Tuomi (8932a6aac) + stats: Support dumping any given percentile - quota-status: Use pooled memory for globals +M src/stats/client-reader.c -M src/plugins/quota/quota-status.c +2018-04-24 09:52:32 +0300 Timo Sirainen (d2ec5072a) -2017-07-03 18:27:53 +0300 Aki Tuomi (25905dfda) + stats: Support dumping variance - lmtp: Use message_detail_address_parse +M src/stats/client-reader.c -M src/lmtp/commands.c +2018-03-25 19:54:48 +0300 Aki Tuomi (03a166b2c) -2017-07-03 19:00:14 +0300 Aki Tuomi (ff9619cc9) + lib: Add test for rng - lib-mail: Add unit test for message detail address parser +M src/lib/Makefile.am +M src/lib/test-lib.inc +A src/lib/test-random.c -M src/lib-mail/test-message-address.c +2018-03-25 21:04:49 +0300 Aki Tuomi (4bd4daca2) -2017-07-03 18:18:36 +0300 Aki Tuomi (fc9c4c807) + lib: stats-dist - Add accessor for samples - lib-mail: Add message_detail_address_parse - Parses e.g. username+foo@domain into username@domain with detail foo, when - delimiter is set to + +M src/lib/stats-dist.c +M src/lib/stats-dist.h -M src/lib-mail/message-address.c -M src/lib-mail/message-address.h +2018-03-25 19:59:15 +0300 Aki Tuomi (4720956fe) -2017-08-04 13:31:19 +0900 Timo Sirainen (3589de148) + lib: stats-dist - Add variance - lib-storage: If mailbox_list_index_very_dirty_syncs=yes, still rebuild empty - list index +M src/lib/stats-dist.c +M src/lib/stats-dist.h -M src/lib-storage/list/mailbox-list-index-sync.c +2018-03-25 19:49:13 +0300 Aki Tuomi (75c248efb) -2017-08-02 08:09:23 +0300 Timo Sirainen (57df1c152) + lib: rand - Fix potential modulo bias - lib-storage: Fix using BROKENCHAR - f3f617e25186daac43833d94b37833f0a43af917 was incorrectly merged from master. +M src/lib/rand.c -M src/lib-storage/mailbox-list.c +2018-04-26 21:35:15 +0300 Timo Sirainen (8c6c5abc4) -2017-06-12 17:34:59 +0300 Josef 'Jeff' Sipek (0a127993e) + example-config: Add log_debug and log_core_filter - lib: add explicit casts to byteorder macros - Some consumers of lib.h are in C++ and therefore they try to compile - byteorder.h as C++ code. C++ compilers don't like the implicit void * - -> struct anything * conversion, so we squelch those by adding explicit - casts. +M doc/example-config/conf.d/10-logging.conf -M src/lib/byteorder.h +2018-04-16 15:00:27 +0300 Timo Sirainen (f82f62442) -2017-06-08 14:49:56 +0300 Josef 'Jeff' Sipek (a6fdcbc8e) + lib-master: Add improved log filter parsing - global: use new byte ordering API + It now supports parenthesis to perform ANDs within a query. For example: + "(ruleA1 ruleA2) ruleB (ruleC1 ruleC2 ruleC3)" has 3 ORed rules. + Rules can contain: -M src/doveadm/doveadm-dump-mailboxlog.c -M src/doveadm/dsync/dsync-mailbox-state.c -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-zlib.c -M src/lib-dcrypt/istream-decrypt.c -M src/lib-index/mail-index-util.c -M src/lib-index/mailbox-log.c -M src/lib-ntlm/ntlm-des.c -M src/lib/test-guid.c + - event: + - source:[:] + - field:= can be used multiple times + - cat[egory]: can be used multiple times -2017-06-08 13:20:18 +0300 Josef 'Jeff' Sipek (dda0bbabf) + For example: - lib: import byte swapping & endian converting functions + event:http_request_finished (cat:error cat:storage) + This matches either the "http_request_finished" named event, or + alternatively any error event that belongs to "storage" category. -M src/lib/Makefile.am -A src/lib/byteorder.h -M src/lib/lib.h -A src/lib/test-byteorder.c -M src/lib/test-lib.c -M src/lib/test-lib.h +M src/lib-master/master-service-settings.c -2017-06-30 15:02:40 +0300 Timo Sirainen (f3f617e25) +2018-04-26 21:29:23 +0300 Timo Sirainen (82ab59cc0) - lib-storage: Add BROKENCHAR to mail_location + lib: Event filter - Source line number 0 now means "any" - This makes the mailbox_list_settings.broken_char configurable. Mainly useful - with imapc when remote server doesn't contain valid mUTF-7 mailbox names. -M src/lib-storage/mailbox-list.c +M src/lib/event-filter.c -2017-06-26 19:44:43 +0300 Timo Sirainen (4ac47a954) +2018-04-26 21:21:40 +0300 Timo Sirainen (ec36bacc3) - lib-storage: Don't autocreate mailbox during deletion. + lib: Event filter - Support wildcards in event names - Trying to delete a nonexistent autocreated mailbox first created it and then - immediately deleted it. + This allows for example log_debug=event:* -M src/lib-storage/index/index-storage.c -M src/lib-storage/mail-storage.c +M src/lib/event-filter.c +M src/lib/event-filter.h -2017-06-27 14:22:50 +0300 Timo Sirainen (a0a9861a7) +2018-05-24 14:55:59 +0300 Martti Rannanjärvi (728fa5d61) - lib-storage: Make mailbox_is_autocreated() public + lib-master: Move const char *error declaration inside ifdef HAVE_SSL - This also removes duplicated code from acl plugin. + This is so you can compile dovecot without ssl. -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -M src/plugins/acl/acl-mailbox.c +M src/lib-master/master-service.c -2017-06-22 01:12:56 +0300 Timo Sirainen (7c8ccc767) +2018-04-11 15:27:42 +0300 Aki Tuomi (1c717024b) - acl: Don't read/write dovecot-acl-list with acl_globals_only=yes + lib-master: Add own boolean for SSL module loading - It's only an optimization for the dovecot-acl files, which don't exist with - acl_globals_only=yes + want_ssl_settings isn't reliable enough. -M src/plugins/acl/acl-backend-vfile-acllist.c +M src/lib-master/master-service-private.h +M src/lib-master/master-service.c -2017-06-21 16:54:25 +0300 Timo Sirainen (c30e29cf6) +2018-04-10 16:00:38 +0300 Aki Tuomi (946dd1bf6) - lib/bits.c: Finish fix for compiling with gcc 3.0 .. 3.3 + lib-master: Do not attempt to load SSL module if no SSL support is compiled + in + Fixes imap-login: Error: imap-login(init): Fatal: Cannot load SSL module: + SSL support not compiled in -M src/lib/bits.c + Broken in 754896551f0422cda5d78500b26700eec5343c5b -2017-06-21 16:14:14 +0300 Timo Sirainen (62cbd7285) + Found by bjornar - lib/bits.h: Fix compiling with gcc 3.0 .. 3.3 +M src/lib-master/master-service.c - According to gcc's online manuals, 3.4 is the first version with - __builtin_clzll +2018-02-27 10:45:26 +0100 Stephan Bosch (3bb4224d1) -M src/lib/bits.h + lib-http: client: Fix request statistics text to properly report send + attempts. -2017-07-30 09:39:18 +0300 Timo Sirainen (956bcf69b) + If the request was first sent in the same ioloop cycle in which the text is + generated, the text would claim it was not sent at all yet. - lib-storage: MAIL_STORAGE_SERVICE_FLAG_NO_PLUGINS wasn't working correctly + With this commit the text now explicitly makes the distinction between + request attempts and actual send attempts. The number of attempts is + increased at each retry, while the send attempts are increased each time the + request is actually being sent to a server. - Especially with "doveadm user" it still triggered running the plugins, - because doveadm loads all the plugins early. +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h -M src/lib-storage/mail-storage-service.c +2018-02-17 14:28:48 -0500 codarrenvelvindron (9a90f5a2a) -2017-07-11 14:34:06 +0200 Stephan Bosch (2b03791b1) + configure: Add spectre variant 2 mitigations - lib-http: message parser: Allow duplicate date header if - HTTP_MESSAGE_PARSE_FLAG_STRICT is not set. + --enable-hardening adds -mfunction-return=thunk and -mindirect-branch=thunk + compiler options if supported. - The last instance of the date header is used. +M configure.ac +A m4/cc_retpoline.m4 -M src/lib-http/http-message-parser.c -M src/lib-http/test-http-request-parser.c -M src/lib-http/test-http-response-parser.c +2018-02-22 15:55:20 +0200 Timo Sirainen (1333d1d42) -2017-07-11 14:18:47 +0200 Stephan Bosch (d2ac627f4) + imapc: Avoid duplicate FETCH BODY.PEEK[] when mail is already expunged - lib-http: Restructured the header, message, request, and response parsers to - have an extensible and consistent API using flags. + When the first FETCH (e.g. as part of mail_prefetch()) indicated that the + mail is already expunged, there's no need to do it again. - Extended the test suites with a few cases that test parsing with and without - the STRICT flag. +M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-http/http-client-connection.c -M src/lib-http/http-header-parser.c -M src/lib-http/http-header-parser.h -M src/lib-http/http-message-parser.c -M src/lib-http/http-message-parser.h -M src/lib-http/http-request-parser.c -M src/lib-http/http-request-parser.h -M src/lib-http/http-response-parser.c -M src/lib-http/http-response-parser.h -M src/lib-http/http-server-connection.c -M src/lib-http/http-transfer-chunked.c -M src/lib-http/test-http-header-parser.c -M src/lib-http/test-http-request-parser.c -M src/lib-http/test-http-response-parser.c +2018-02-13 09:14:37 +0200 Aki Tuomi (589156cae) -2017-05-12 04:25:08 +0200 Stephan Bosch (c4be16232) + lib: Fix usec comparison in timeout_update_next - lib-http: Changed test-http-server to actually use the http-server API. + When tv_usec is exactly 1000000, call to kevent() will fail because tv_sec + does not get incremented. - This currently serves as a simple demonstration of how to structure an HTTP - server. + Found by Adrian Gonzalez -M src/lib-http/test-http-server.c +M src/lib/ioloop.c -2017-07-25 20:53:18 +0300 Timo Sirainen (aebe1e749) +2018-05-21 01:42:27 +0300 Timo Sirainen (978fa8c66) - lib-storage: Hide and rmdir \NoSelect leaf mailboxes with NO-NOSELECT + lib: Fix ioloop-poll and ioloop-select to work with io_add_istream() - If the leaf is successfully rmdir()ed, rmdir() also its parents. - This doesn't work perfectly with if there are multiple levels of \NoSelect - mailboxes. For example with "a/b/c" the listing will already have returned - "a" and "a/b" before it reaches the "a/b/c" code, which will rmdir all of - them, but it's a bit too late at that point. It's too much work to fix - though, and the situation will be fixed on the next list anyway. +M src/lib/ioloop-poll.c +M src/lib/ioloop-select.c -M src/lib-storage/list/mailbox-list-delete.c -M src/lib-storage/list/mailbox-list-delete.h -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-iter-private.h +2018-04-16 15:22:41 +0300 Timo Sirainen (da5f06dd9) -2017-07-25 16:10:51 +0300 Timo Sirainen (a90bb1283) + lib-storage: Add mail_storage.event and use it wherever possible - lib-storage: Add setting to disable \NoSelect mailboxes - Enabled using mail_location = ...:NO-NOSELECT +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/index-rebuild.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/test-mail-storage.c - Trying to create \NoSelect "dir/" will result just creating "dir", similar - to how Maildir++ layout already did it. +2018-05-20 21:32:12 +0300 Timo Sirainen (b689d7111) - Deleting a mailbox will delete all of its \NoSelect parents. + auth: Fix assert-crash if auth client sends 0 as ID -M src/lib-storage/index/index-storage.c -M src/lib-storage/list/mailbox-list-delete.c -M src/lib-storage/list/mailbox-list-fs.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h + This could be triggered by anyone having (local) write access to the auth + socket. -2017-07-25 15:54:37 +0300 Timo Sirainen (224566864) +M src/auth/auth-request-handler.c - lib-storage: Mailbox rename shouldn't auto-rmdir parent index dirs with - ITERINDEX +2018-07-24 15:00:19 +0300 Timo Sirainen (cebf45d73) - For example: - - create a/b - - rename a/b c + lib-imap: Remove content_subtype==NULL checks - This resulted in "a" existing in mail root directory, but not in index - directory. With ITERINDEX this meant that the "a" was lost. + This can never happen after the previous commit. This also changes the + BODYSTRUCTURE output for invalid Content-Types, but since they're invalid + anyway it doesn't really matter what the output is. -M src/lib-storage/list/mailbox-list-delete.c +M src/lib-imap/imap-bodystructure.c -2017-07-24 16:37:42 +0300 Timo Sirainen (5d3974858) +2018-07-24 14:55:25 +0300 Timo Sirainen (8ad6de3dc) - lib-storage: If userdb returns chdir extra field, chdir() there instead of - home + lib-mail: If message_part_data.content_type is set, make sure + content_subtype isn't NULL - This can avoid unnecessary home directory accesses if indexes are stored - outside the home and there's no other reason to chdir() to home. + This fixes a crash in index_mail_find_first_text_mime_part() where snippet + generation assumed that content_subtype isn't NULL. -M src/lib-storage/mail-storage-service.c +M src/lib-mail/message-part-data.c -2017-07-24 16:36:45 +0300 Timo Sirainen (ab9ee2673) +2018-07-25 13:17:45 +0300 Timo Sirainen (11fb30857) - lib-storage: If chdir(home) fails due to EACCES, don't log two errors. + lib-storage: Fix bodystructure parsing crash if header is parsed twice + The second parsing will recreate the parser_ctx, discarding the old parsed + message_part.data for the header. On the second parsing + save_bodystructure_header=FALSE so the message_part.data isn't filled for + the header. Later on the bodystructure parsing assumes the data is set, and + crashes. + + This only happened with mail_attachment_detection_options=add-flags-on-save + and Sieve script that first accessed a non-cached header and then used the + "body" extension. -M src/lib-storage/mail-storage-service.c + Fixes segfault and also: Panic: file imap-bodystructure.c: line 116 + (part_write_body_multipart): assertion failed: (part->data != NULL) -2017-07-24 14:17:22 +0300 Timo Sirainen (1164ceb8c) +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h - lib-storage: Add mailbox_list_index_include_inbox setting +2018-07-25 13:17:05 +0300 Timo Sirainen (b9dbe12ba) - This controls whether to update INBOX's STATUS information in the mailbox - list index. It can be useful especially if LISTINDEX points to a tmpfs, but - perhaps also in other situations. + lib-mail: Add asserts to message_part_*() to make sure part->data isn't NULL - I considered adding a more generic setting to exclude other mailboxes, but - the namespace prefixes and hierarchy separators get a bit complicated with - shared mailboxes. It's probably also not very useful to change this for - anything but the INBOX. + This makes it easier to debug the crashes than just having a segfault. -M doc/example-config/conf.d/10-mail.conf -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h +M src/lib-mail/message-part-data.c -2017-07-24 14:12:55 +0300 Timo Sirainen (8dd7bf6a0) +2018-06-20 08:52:52 +0300 Aki Tuomi (d4e4240cb) - example-config: Add mailbox_list_index_very_dirty_syncs + lib-ssl-iostream: Enable partial writes and moving buffers + Dovecot is able to provide same content to SSL_write, and can also take care + of consuming written data from the buffer. -M doc/example-config/conf.d/10-mail.conf + Fixes SSL_write failed:error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad + write retry -2017-07-22 18:39:19 +0300 Timo Sirainen (9d8d261b0) +M src/lib-ssl-iostream/iostream-openssl-context.c - lib-storage: Allow LISTINDEX to point to a different directory +2018-06-26 22:33:33 +0300 Timo Sirainen (13b36eb23) - Most importantly because the mailbox list index is only a cache, it could be - safely pointed to e.g. tmpfs to save disk I/O. + quota-clone: Fix assert-crash at deinit if quota_clone update fails -M src/lib-storage/index/mbox/mbox-storage.c -M src/lib-storage/list/mailbox-list-fs.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-maildir.c -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h + The timeout isn't removed on failure, so it crashed with: Panic: file + quota-clone-plugin.c: line 257 (quota_clone_mail_user_deinit_pre): assertion + failed: (quser->to_quota_flush == NULL) -2017-07-21 19:52:23 +0300 Timo Sirainen (88b2ef526) +M src/plugins/quota-clone/quota-clone-plugin.c - virtual: Make sure index is rewritten when new mailboxes are added +2018-06-19 15:46:41 +0300 Timo Sirainen (ea26c32b7) - Otherwise multiple bbox->sync_mailbox_idx point to 0 and they keep - overwriting each others in the header. This causes the header to be - constantly updated with wrong contents. + quota-clone: Send quota clone data to dict asynchronously -M src/plugins/virtual/virtual-storage.h -M src/plugins/virtual/virtual-sync.c + Based on patch by Michael Slusarz -2017-07-21 17:01:05 +0300 Timo Sirainen (4fc54fc26) +M src/plugins/quota-clone/quota-clone-plugin.c - dict-sql: Do not increment on set (again) +2018-06-19 15:00:02 +0300 Timo Sirainen (4e5e57d01) - Reverts f1fc1560914f87dc44a0d48f40b97250adb33e73, which was a broken merge - caused by accidentally trying to re-merge - 595b94c8d8e2700a0c50f3a9c06a535adb63f8f3 and somehow ended up reverting - 29e8c5a8e26a9ed398c37d4a6e1488d4630f5627. + quota-clone: Move state tracking to user context -M src/lib-dict/dict-sql.c + This way there's no need to do multiple flushes when e.g. multiple mailboxes + change. -2017-07-11 13:12:46 +0300 Martti Rannanjärvi (39e7abd34) + The flush had to be removed from close(), because the code path recurses: - imap: Add %{appended} to imap_logout_format + * mailbox_transaction_commit() when mail is saved + * quota_count() starts counting the quota, which opens and closes mailbox + * quota_clone_mailbox_close() attempts to flush quota, which again recurses + into quota_count(), which returns 0 for the quota value. + Based on patch by Michael Slusarz -M doc/example-config/conf.d/20-imap.conf -M src/imap/cmd-append.c -M src/imap/imap-client.c -M src/imap/imap-client.h +M src/plugins/quota-clone/quota-clone-plugin.c -2017-07-03 17:12:08 +0300 Martti Rannanjärvi (73ec1eea8) +2018-06-19 14:12:45 +0300 Timo Sirainen (311728518) - imap-client: Add %{autoexpunged} to imap_logout_format + quota: Add quota_root_iter_init_user() -M doc/example-config/conf.d/20-imap.conf -M src/imap/imap-client.c -M src/imap/imap-client.h +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h -2017-07-04 09:25:21 +0300 Martti Rannanjärvi (9f5272174) +2018-05-28 12:57:03 +0300 Aki Tuomi (924fca6a4) - imap-client: Add const char *disconnect_reason to client + quota-clone: Fix CONTEXT_REQUIRE use - This is to allow using reason given to client_disconnect() via timeout - context. + Fixes Panic: Module context quota_clone_user_module missing -M src/imap/imap-client.c -M src/imap/imap-client.h + Broken in 7f7e7c16d956de8e92376a0633ca6e4cb85e8d84 -2017-07-19 13:43:09 +0300 Timo Sirainen (7e4af9856) +M src/plugins/quota-clone/quota-clone-plugin.c - lib-index: Fix next_uid lookup in open transaction that has appended mails +2018-06-25 13:13:43 +0300 Aki Tuomi (0d8506363) - The appended mails were used for returning an updated - mail_index_header.next_uid, but only if the mails were assigned UIDs in - mail_index_append(). It should have updated the next_uid also after - mail_index_append_finish_uids() was used to assign the UIDs. + virtual: Clamp backend uids to available uids in virtual_get_virtual_uids - This fixes setting first_recent_uid correctly for virtual mailboxes when the - sync finds new mails. Avoids multiple sessions from getting \Recent flags - for the same mails. -M src/lib-index/mail-index-transaction-update.c +M src/plugins/virtual/virtual-storage.c -2017-07-20 09:46:00 +0300 Martti Rannanjärvi (bf2fa3606) +2018-05-24 12:48:58 +0000 Aki Tuomi (237217ef1) - lib-sql: Remove duplicate Cassandra consistency names + acl: Fix return value of acl_attribute_get_acl + If matching acl entry is not found, it must return 0 and not 1 because it + did not find anything. -M src/lib-sql/driver-cassandra.c + Fixes dsync: Panic: file mailbox-attribute.c: line 362 + (mailbox_attribute_get_stream): assertion failed: (value_r->value != NULL || + value_r->value_stream != NULL) -2017-07-20 11:01:37 +0300 Aki Tuomi (adaecdb1f) + Broken in 37c72fa0cd3f1d74d79b64afb3fb6da5ffd4fe3a - virtual: Do not remove mailbox notify if the mailbox is closed + Found by @dl8bh - The backend mailbox close/open status is not related to the notify API - usage. The notify is removed in virtual_mailbox_close_internal instead when - we are actually deinitializing. +M src/plugins/acl/acl-attributes.c -M src/plugins/virtual/virtual-storage.c +2018-05-30 00:38:45 +0300 Timo Sirainen (ed1e20155) -2017-07-19 23:19:12 +0300 Timo Sirainen (67e951d6a) + man: doveadm-search-query.7 - Add sequence-set and update UID - virtual: Optimize mailbox_notify_changes() when there's only a single - backend mailbox +M doc/man/doveadm-search-query.7 -M src/plugins/virtual/virtual-storage.c +2018-04-16 10:38:21 -0600 Michael Slusarz (f1c9aab97) -2017-07-19 23:11:12 +0300 Timo Sirainen (1062a885a) + last-login: Remove superfluous semicolon - lib-storage: mailbox_watch_extract_notify_fd() - give better reason if - mailbox has no IOs - This happens currently with virtual mailboxes. +M src/plugins/last-login/last-login-plugin.c -M src/lib-storage/mailbox-watch.c +2018-04-16 10:37:32 -0600 Michael Slusarz (32ceb4a7b) -2017-07-19 23:09:13 +0300 Timo Sirainen (f21d653d0) + last-login: Username is already output as part of log prefix - lib: io_loop_extract_notify_fd() - Don't crash if no notifys have been added +M src/plugins/last-login/last-login-plugin.c -M src/lib/ioloop-notify-inotify.c -M src/lib/ioloop-notify-kqueue.c +2018-05-20 18:20:47 +0300 Timo Sirainen (170bd2673) -2017-07-19 10:37:25 +0300 Timo Sirainen (75c14416c) + director: Make sure host's last_updown_change never shrinks. - cassandra: Fix read/write buffer overflows after adding - CASSANDRA_QUERY_TYPE_READ_MORE + Otherwise the ring might get into a loop where two HOST updates keep + fighting each others. This could probably happen if one update comes at + "desynced" state and other one in non-desynced state. + I'm not entirely sure if this is fixing such a loop or not, but it at least + shouldn't hurt. -M src/lib-sql/driver-cassandra.c +M src/director/director-connection.c -2017-07-19 10:35:43 +0300 Timo Sirainen (fc48ce200) +2018-06-25 14:04:31 +0300 Aki Tuomi (c65501c62) - lib-sql: Add assert to sql_result_more_s() + lib: event-filter - Increase initial allocation - Should avoid a warning from static analyzer. + Reduces reallocations on startup. -M src/lib-sql/sql-api.c +M src/lib/event-filter.c -2017-07-19 12:03:58 +0300 Aki Tuomi (57e13493a) +2018-06-26 13:45:54 +0300 Timo Sirainen (9bcbd7c55) - virtual: Stop watching notification on backend box close + lib-http: Add/fix default value comments in http_client_settings - Fixes Panic: file mail-index.c: line 662 (mail_index_close_nonopened): - assertion failed: (index->views == NULL) -M src/plugins/virtual/virtual-storage.c +M src/lib-http/http-client.h -2017-07-18 21:04:47 +0300 Aki Tuomi (fd994bf5b) +2018-03-20 18:14:39 +0100 Stephan Bosch (3611b0413) - virtual: Stop notifications only if they were started + lib-http: server: Properly handle corrupt payload while finishing a request. - Fixes Panic: file mail-storage.c: line 1950: assertion failed: (box->opened) + The HTTP_REQUEST_PARSE_ERROR_BROKEN_REQUEST was not handled, causing an + assertion panic. This situation occurred when the chunked transfer encoding + was invalid. -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-storage.h +M src/lib-http/http-server-connection.c -2017-07-19 10:58:43 +0300 Timo Sirainen (7adabf282) +2018-03-20 18:10:42 +0100 Stephan Bosch (5f54a3ae0) - pop3-migration: Add unit test for checking that trailing tabs are stripped + lib-http: server: Properly handle payload stream errors while finishing a + request. + Errors from the (chunked) payload stream would cause assertion panics at + that point. -M src/plugins/pop3-migration/test-pop3-migration-plugin.c +M src/lib-http/http-server-connection.c -2017-07-19 10:57:36 +0300 Timo Sirainen (736eaae8f) +2018-03-20 18:04:36 +0100 Stephan Bosch (7644d4ef6) - lib-mail: message_header_hash() - add v4 that strips tabs + lib-http: server: Allow resubmitting a response, as long as it is not sent + yet. - This helps with Zimbra, which strips away trailing tabs in BODY[HEADER]. -M src/lib-mail/message-header-hash.c -M src/lib-mail/message-header-hash.h -M src/lib-mail/test-message-header-hash.c +M src/lib-http/http-server-request.c +M src/lib-http/http-server-response.c -2017-07-18 14:42:23 +0300 Timo Sirainen (0bee28006) +2018-05-23 15:14:50 +0300 Timo Sirainen (7e5171207) - lib-index: Fix mail_index_get_modification_time() to work when index isn't - open. + lib-master: If stats process wants no events, send nothing to it - index->filepath may be NULL after a failed index open, and it's a bit unsafe - to trust that index->log->filepath isn't NULL either. So just build the - full path from elements that are definitely non-NULL. + Instead of sending everything to it.. - Also stat() only dovecot.index.log, because it's always supposed to exist. - If it doesn't, something's broken and stat()ing dovecot.index doesn't make - much sense. +M src/lib-master/stats-client.c - This commit removes mail_transaction_log_get_mtime(), which is no longer - needed. +2018-06-08 23:17:04 +0300 Timo Sirainen (5e6b52393) - Fixes: Panic: file mail-index.c: line 931 - (mail_index_file_set_syscall_error): assertion failed: (filepath != NULL) + lib: istream-try - Don't assert-crash with empty parent istream -M src/lib-index/mail-index.c -M src/lib-index/mail-index.h -M src/lib-index/mail-transaction-log.c -M src/lib-index/mail-transaction-log.h + Fixes: Panic: file istream.c: line 327 (i_stream_read_memarea): assertion + failed: (stream->eof) -2017-07-18 14:37:53 +0300 Aki Tuomi (3a61bed93) +M src/lib/istream-try.c +M src/lib/test-istream-try.c - lib-index: Mark index deleted if index log file is missing +2018-05-29 10:29:50 +0300 Hannu Ylitalo (beebf64fe) - This fixes all kinds of errors caused by mailbox being deleted by another - process. + dovecot.service: Update LimitNOFILE=65535 -M src/lib-index/mail-index.c + Current value of 8192 is too low for most production setups and it needs to + be changed every time something is deployed. Setting the default to 65535 is + enough for most production environments so this would be one task less when + deploying a production platform. -2017-07-18 12:39:44 +0300 Timo Sirainen (934650a50) +M dovecot.service.in - lib-storage: Don't allow removing \Recent flags with mail_update_flags() +2018-04-23 15:05:06 +0300 Timo Sirainen (ba1c32cdd) - Reverts an ancient commit 7deb24e7453249d09741641bff0f269f68165033. I don't - know why it was added in the first place. Normally \Recent flags are removed - during sync with MAIL_INDEX_SYNC_FLAG_DROP_RECENT. This should be enough, - especially since it's not even possible to remove a single \Recent flag - - only update the first_recent_uid. + doveadm save: Fix using (f5bfceed9) +2018-01-02 13:57:45 +0200 Aki Tuomi (b547590da) - lib-storage: If mail_index_header.first_recent_uid shrinks, reset \Recent - flags + dsync: Set brain->failed to TRUE when UIDVALIDITY changes - This should never happen. + This happens if UIDVALIDITY changes during stateful sync. -M src/lib-storage/index/index-storage.h -M src/lib-storage/index/index-sync.c + Fixes Panic: doveadm: file dsync-brain-mailbox.c: line 377 + (dsync_brain_sync_mailbox_deinit): assertion failed: (brain->failed) -2017-07-17 18:10:49 +0300 Timo Sirainen (92a480376) +M src/doveadm/dsync/dsync-brain-mailbox.c - cassandra: Improve logging for multipage queries +2018-07-02 11:52:14 +0100 Paul Howarth (64f446438) - warn_timeout is applied to both individual page requests as well as the sum - of all the page requests. + lib-compression: Fix assert-crash in test suite on 32bit systems -M src/lib-sql/driver-cassandra.c + Fix compilation warnings in test-compression.c due to mismatches between + size_t and uoff_t, which then manifests in assert-crashes running the test + suite on 32bit systems. -2017-07-17 17:54:07 +0300 Timo Sirainen (755feaf20) +M src/lib-compression/test-compression.c - cassandra: Add page_size setting to enable paged results for queries +2018-07-06 11:25:07 +0300 Timo Sirainen (81e5ec150) + lib-ssl-iostream: Shutdown connection cleanly whenever i/ostream is + destroyed -M src/lib-sql/driver-cassandra.c + Do this while both istream and ostream still exist. Fixes crash where + openssl_iostream_destroy() attempts to flush the shutdown, but ssl_input is + NULL and it crashes. -2017-07-17 17:51:03 +0300 Timo Sirainen (00bdefb1d) +M src/lib-ssl-iostream/istream-openssl.c +M src/lib-ssl-iostream/ostream-openssl.c - cassandra: Add wrapper functions in preparation for following commits +2018-07-06 11:24:41 +0300 Timo Sirainen (9dba039be) - No functional changes. Shrinks the following commits. + lib-ssl-iostream: Split code to openssl_iostream_shutdown() -M src/lib-sql/driver-cassandra.c -2017-07-17 17:54:36 +0300 Timo Sirainen (bb97e85f9) +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h - dict-sql: Add support for sql_result_more() +2018-06-12 16:07:25 +0300 Timo Sirainen (4436b0fc0) + lib-storage: Fix memory leak when mail_storage_service_next() is called + multiple times -M src/lib-dict/dict-sql.c + dsync uses it twice for the same mail_storage_service_user. -2017-07-17 14:22:35 +0300 Timo Sirainen (734965086) +M src/lib-storage/mail-storage-service.c - lib-sql: Add API support for asynchronously iterating over rows. +2018-06-18 13:15:55 +0300 Timo Sirainen (68ba703ac) - sql_query() can already do an async lookup, but the full result needs to be - available immediately. This can be inefficient for large results. Add a new - SQL_RESULT_NEXT_MORE return value and sql_result_more() for asynchronously - requesting more results. + lib-imap-client: Fix crash when ostream output blocks before connection + finishes - This changes the API a bit, but isn't done by default by any drivers yet. - Also callers that can't handle this are hopefully checking for "ret < 0", - which allows them to handle such an async-more request as an error instead. + It's possible that ostream tries to add IO_WRITE callback before + imapc_connection_connected() callback is called. - sql_result_next_row() will be changed to return enum in a separate commit to - keep backwards compatibility in v2.2.x. + Fixes: Panic: io_add(0x2) called twice fd=15, callback=0x... -> 0x... -M src/lib-sql/driver-cassandra.c -M src/lib-sql/driver-mysql.c -M src/lib-sql/driver-pgsql.c -M src/lib-sql/driver-sqlite.c -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c -M src/lib-sql/sql-api.h +M src/lib-imap-client/imapc-connection.c -2017-07-06 12:40:33 +0300 Aki Tuomi (164471161) +2018-06-18 19:13:30 +0300 Timo Sirainen (bb336da16) - virtual: If virtual_uid is not assigned skip it + imapc: Don't trust mail stream to have correct CRLFs - We cannot lookup mails with uid 0, so if we see that mail has virtual uid 0, - do not attempt to look it up from index, but skip it. + It's not that expensive to just recalculate them. If they're not correct in + the stream, it can result in e.g. truncated emails due to wrong virtual_size + being used in body_size calculation. The wrong CRLFs can especially happen + if plugins modify the stream in istream_opened() hook. - Fixes Panic: file mail-index-map.c: line 549 - (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0) +M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/plugins/virtual/virtual-sync.c +2018-06-16 19:58:57 +0300 Timo Sirainen (a4a1c8424) -2017-07-05 15:20:32 +0300 Aki Tuomi (3ce4bc927) + lib-imap-client: Remove assert from imapc_client_mailbox_reconnect - virtual: Append virtual mailbox name to open reason on box alloc + It's possible for the assert to trigger if there are multiple reconnections. + imapc_connection_can_reconnect() checks a bit later whether the reconnection + can still be done. +M src/lib-imap-client/imapc-client.c -M src/plugins/virtual/virtual-storage.c +2018-06-16 19:40:34 +0300 Timo Sirainen (6a20890a4) -2017-07-05 15:20:18 +0300 Aki Tuomi (941561f58) + imapc: Fix assert-crash if syncing adds delayed expunges, but fails + afterwards - virtual: Append virtual mailbox information to get stream reason + Fixes: Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): + assertion failed: (mail_index_is_expunged(view, lseq) || + seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid)) +M src/lib-storage/index/imapc/imapc-sync.c -M src/plugins/virtual/virtual-mail.c +2018-06-16 19:37:27 +0300 Timo Sirainen (b352767f8) -2017-07-05 14:24:49 +0300 Aki Tuomi (75c35656b) + imapc: Fix potential assert-crash when reconnecting during syncing - virtual: Expunge virtual mails if backend box is deleted + Fixes: Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): + assertion failed: (mail_index_is_expunged(view, lseq) || + seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid)) - When mail is added to a mailbox and then deleted, expunge the sequences from - virtual index in sync. +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-sync.c - Fixes Error: Unexpectedly lost Mailbox ID 4 +2018-06-16 15:56:26 +0300 Timo Sirainen (56b939c19) -M src/plugins/virtual/virtual-sync.c + imapc: Fix assert-crash when reconnecting during initial FETCH finds + expunges -2017-07-03 13:53:49 +0300 Aki Tuomi (f01df5783) + The initial FETCH is automatically retried on failure, but the FETCH state + wasn't reset during the reconnection. - virtual: Do not mark broken folder as initialized + Fixes: Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): + assertion failed: (mail_index_is_expunged(view, lseq) || + seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid)) - Otherwise it won't get repaired +M src/lib-storage/index/imapc/imapc-storage.c -M src/plugins/virtual/virtual-sync.c +2018-06-16 15:09:53 +0300 Timo Sirainen (7a52620e0) -2017-07-03 13:53:31 +0300 Aki Tuomi (d967ba782) + imapc: Fix assert-crash when reconnecting expunges newly added messages - virtual: Fix highest_mailbox_id if it's wrong + The initial FETCH 1:* during reconnection may notice some messages that are + missing and tries to expunge them. But those messages could still be in + delayed_sync_trans, and currently lib-index doesn't support expunging + anything but the latest mail from a transaction. + Fixes: Panic: file mail-index-transaction-update.c: line 337 + (mail_index_expunge_last_append): assertion failed: (seq == t->last_new_seq) -M src/plugins/virtual/virtual-sync.c +M src/lib-storage/index/imapc/imapc-mailbox.c -2017-07-03 13:25:35 +0300 Aki Tuomi (f109cdce3) +2018-06-16 15:08:26 +0300 Timo Sirainen (7c58144cb) - virtual: Force header rewrite if header not found or crc32 changed + imapc: Move expunging from index to imapc_mailbox_index_expunge() - Otherwise the header gets only partially written -M src/plugins/virtual/virtual-sync.c +M src/lib-storage/index/imapc/imapc-mailbox.c -2017-06-29 13:22:32 +0300 Aki Tuomi (830a446db) +2018-06-04 19:16:04 +0300 Timo Sirainen (42625103e) - lib-storage: Clarify keywords handling in mail_save_finish + lib-storage: Set index_mail_data.body_size if it can be calculated easily + Probably doesn't help with anything currently, but makes the code more + consistent in how it works. -M src/lib-storage/mail-storage.c +M src/lib-storage/index/index-mail.c -2017-06-28 13:45:19 +0300 Aki Tuomi (792262268) +2018-05-31 16:52:54 +0300 Timo Sirainen (440645ada) - virtual: Fix keywords handling + imapc: Don't use RFC822.SIZE values for message body size calculation - Keywords are per-mail object, and should be treated as one. The old code - left pointer to keywords dandling which lead into double-free. Now the - ctx->data is treated in similar way as other backends. + If the RFC822.SIZE doesn't match the exact stream size, the body size + calculation will become wrong. The only downside to this patch is that now + the body size will need to be calculated by parsing the stream, but there + shouldn't be any need to do that unless the body was already FETCHed, so it + shouldn't cause any extra IMAP traffic. - Fixes Panic: file mail-index.c: line 417 (mail_index_keywords_unref): - assertion failed: (keywords->refcount > 0) Fixes Panic: file mail-storage.c: - line 2311 (mailbox_save_context_reset): assertion failed: (!ctx->unfinished) +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h -M src/plugins/virtual/virtual-save.c +2018-06-04 19:03:20 +0300 Timo Sirainen (69b714836) -2017-06-27 14:19:16 +0300 Aki Tuomi (dc672efe3) + lib-storage: Move code to index_mail_try_set_body_size() - virtual: Fix recent flag updates + This also adds a check to make sure virtual_size is set. With the current + caller it was already guaranteed to be set. - View must be updated before looking up seqs +M src/lib-storage/index/index-mail.c -M src/plugins/virtual/virtual-sync.c +2018-05-31 16:49:34 +0300 Timo Sirainen (764e86b8b) -2017-06-29 13:46:06 +0300 Aki Tuomi (e16621272) + lib-storage: Don't set virtual_size from index record if it's already set - virtual: Call mailbox_save_context_deinit before freeing context + The existing virtual_size may be a correct one, while the one in the index + may be wrong. This will be an especially important fix with the next commit, + because it would make the existing inexact_total_sizes=FALSE wrong. - Otherwise dest_mail does not get free'd +M src/lib-storage/index/index-mail.c -M src/plugins/virtual/virtual-save.c +2018-06-04 19:37:15 +0300 Timo Sirainen (6dc1296d0) -2017-06-27 12:51:51 +0300 Aki Tuomi (a565f19f9) + lib-storage: Don't enforce creation of vsize header. - virtual: Use mailbox_notify_list API when mailbox_list_index is enabled + It's useful for caching quota=count and for STATUS (X-SIZE). If neither is + used the header shouldn't be created and kept up-to-date. If the header is + enabled, it also triggers creation of per-email vsize records. +M src/lib-storage/index/index-mailbox-size.c -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-storage.h +2018-06-19 12:33:49 +0300 Timo Sirainen (6eb02203a) -2017-06-27 10:54:08 +0300 Aki Tuomi (c9a7794a9) + imapc: Fix handling UIDVALIDITY changes - virtual: Generate GUID for virtual folder + Index was being correctly reset, but the transaction was rolled back. - GUID is generated when index is first created or the rules change. +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-storage.h -M src/plugins/virtual/virtual-sync.c +2018-06-19 12:31:43 +0300 Timo Sirainen (ada9a6b35) -2017-06-27 12:42:27 +0300 Aki Tuomi (dc5ad5760) + lib-index: Make sure error is set on sync & commit failures - lib-storage: Add type checking for mailbox_list_notify_wait + This avoids "BUG: Unknown internal index error" after view is marked + inconsistent or after index is deleted. +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index-transaction.c -M src/imap/imap-notify.c -M src/lib-storage/mailbox-list-notify.c -M src/lib-storage/mailbox-list-notify.h +2018-06-18 17:03:01 +0300 Timo Sirainen (9fdfc0359) -2017-07-06 11:24:35 +0300 Timo Sirainen (56064874c) + lib: When log writing keeps returning EAGAIN, change process title only once - virtual: Avoid assert-crash if backend mailbox's have_guid lookup fails + Otherwise each call will use up data stack memory. - The MAIL_ERROR_NOTFOUND can happen if the mailbox was already deleted. Other - errors aren't expected to happen and possibly point to a bug. +M src/lib/failures.c - Fixes: Panic: file mail-storage.c: line 1831: unreached +2018-06-18 16:19:55 +0300 Timo Sirainen (98d021781) -M src/plugins/virtual/virtual-storage.c + lib: If log write returns EAGAIN, use poll() instead of ioloop for waiting -2017-05-18 14:59:51 +0300 Aki Tuomi (a2b679e4f) + As explained in 861d40b9aebabccae7d48e49a18cbc631ab1fefe commit message, + ioloop can call various callbacks and it can also recurse back to error + logging. Using poll() directly is safer. - virtual: Match any metadata condition +M src/lib/failures.c - The old code ignored succesful earlier matches for patterns, and stopped - looking on first non-matching metadata pattern. Now it breaks on error or on - first matching pattern. +2018-06-18 16:07:30 +0300 Timo Sirainen (c39d796ba) -M src/plugins/virtual/virtual-config.c + lib: Revert earlier "log write is blocking" handling change -2017-07-17 14:05:45 +0300 Timo Sirainen (2ce54add9) + 1) It was buggy, because it set O_NONBLOCK rather than removing it. - imapc: Fix caching >= 32 kB mail bodies + 2) fd flags are shared across all the processes using the fd. We can't + reliably implement the process title update, because some processes are + blocking on the log write() before they change the process title. - When closing the mail, only in-memory mail bodies were stored to cache. + Reverts 861d40b9aebabccae7d48e49a18cbc631ab1fefe -M src/lib-storage/index/imapc/imapc-mail.c +M src/lib/failures.c -2017-07-14 02:11:56 +0300 Timo Sirainen (ba8eb17a3) +2018-05-03 15:22:09 +0300 Timo Sirainen (cb1b482a4) - lib-storage: When index dir rmdir() fails with ENOTEMPTY, retry it for 1 - second + fs-posix: mkdir missing directory if it's changed by FS_METADATA_WRITE_FNAME - This helps to avoid leaving those index directories lying around with NFS. - Hopefully within the 1 second any existing processes that have been keeping - those files open have finished their task. Especially IMAP IDLE will take - 0.5 seconds to start syncing indexes and realize that they're deleted. + The temp file is created to the initial directory. If the directory is + changed by FS_METADATA_WRITE_FNAME, the new destination directory didn't + necessarily exist. If the link() or rename() fails with ENOENT, try to mkdir + the missing directories. -M src/lib-storage/list/mailbox-list-delete.c +M src/lib-fs/fs-posix.c -2017-07-14 01:54:31 +0300 Timo Sirainen (aa63277c6) +2018-02-25 19:13:18 +0100 Stephan Bosch (3a8cf378c) - lib-index: If refreshing finds dovecot.index.log gone, assume the mailbox - was deleted + lib: iostream-pump: Make iostream_pump_unref() implementation match other + similar code. - Don't try to recreate the log file again. It can just cause further - problems. + This also means that iostream_pump_unref(NULL) is now a no-op. - A way to reproduce this problem with NFS when INDEX dir is specified: - * create mailbox foo, select foo, IDLE - * delete mailbox foo - --> foo's index is recreated back by IDLEing process +M src/lib/iostream-pump.c +M src/lib/iostream-pump.h -M src/lib-index/mail-transaction-log.c +2018-05-25 11:07:38 -0400 Josef 'Jeff' Sipek (0f972d2b1) -2017-07-13 03:15:36 +0300 Timo Sirainen (a2f1aba45) + lib-fs: fs_unlock(NULL) should be a no-op - quota: Fix negative storage-based quota_warnings to work with count backend - Finishes f9362223346d10a5866b376ed227b77b26ea4292, which fixed it for - "messages" but not for "storage". +M src/lib-fs/fs-api.c -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota-util.c -M src/plugins/quota/quota.c +2018-05-25 11:03:25 -0400 Josef 'Jeff' Sipek (60627f9f1) -2017-07-13 02:56:33 +0300 Timo Sirainen (3657c143d) + global: start relying on fs_iter_deinit(NULL) being a no-op - quota: When setting auto_updating to transaction, skip invisible quota roots - Skip the quota root also if the mailbox matches "ignore" quota_rule. This is - only an optimization fix so that unnecessary work isn't done for quota roots - that aren't actually used. +M src/lib-dict-extra/dict-fs.c -M src/plugins/quota/quota.c +2018-05-25 11:02:56 -0400 Josef 'Jeff' Sipek (5f12eca8d) -2017-07-11 10:45:16 +0300 Aki Tuomi (93cb5802e) + lib-fs: fs_iter_deinit(NULL) should be a no-op - lib-storage: Remove user namespaces on hook error - If there is a hook error during namespaces added remove the namespaces from - user. This avoids attempts to use the namespaces later on without proper - initialization. +M src/lib-fs/fs-api.c -M src/lib-storage/mail-namespace.c +2018-05-25 10:53:54 -0400 Josef 'Jeff' Sipek (8e68c0cac) -2017-07-11 10:26:38 +0300 Aki Tuomi (600933680) + global: start relying on fs_deinit(NULL) and fs_unref(NULL) being no-ops - lib-storage: Ensure list index is present + Cleanup performed with the following semantic patch: - Otherwise we end up with signal 11 crash later on. + @@ + expression E; + @@ -M src/lib-storage/list/mailbox-list-index.c + - if (E != NULL) { + - fs_unref(&E); + - } + + fs_unref(&E); -2017-07-12 16:18:42 +0300 Timo Sirainen (91ee70ed0) + @@ + expression E; + @@ - lib-storage: mailbox_create_missing_dir() - Handle mailbox delete race - condition + - if (E != NULL) { + - fs_deinit(&E); + - } + + fs_deinit(&E); - Make sure the directory isn't created if the mail root directory no longer - exists. This might happen during mailbox deletion when another process is - opening the mailbox at the same time. +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/fs-crypt-common.c -M src/lib-storage/mail-storage.c +2018-05-25 10:48:29 -0400 Josef 'Jeff' Sipek (f72bc8eb7) -2017-07-12 16:15:13 +0300 Timo Sirainen (4060dbc68) + lib-fs: fs_unref(NULL) should be a no-op - lib-storage: Improve MAILBOX_LIST_PROP_AUTOCREATE_DIRS related comments +M src/lib-fs/fs-api.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-list.h +2018-05-25 10:38:36 -0400 Josef 'Jeff' Sipek (018d23e16) -2017-07-11 14:14:47 +0300 Timo Sirainen (d662a5ab2) + global: start relying on fs_file_close(NULL) being a no-op - sdbox: Create missing mail directory on resync if index directory exists + Cleanup performed with the following semantic patch: - This problem should be visible only with ITERINDEX enabled. + @@ + expression E; + @@ -M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-storage.h + - if (E != NULL) { + - fs_file_close(E); + - } + + fs_file_close(E); -2017-07-12 17:54:44 +0300 Timo Sirainen (9f3f346d3) +M src/lib-fs/fs-metawrap.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/fs-crypt-common.c - lib-index: Fix compiler warning with 32bit time_t +2018-05-25 10:35:35 -0400 Josef 'Jeff' Sipek (6394956f7) + lib-fs: fs_file_close(NULL) should be a no-op -M src/lib-index/mail-transaction-log.c -2017-07-11 15:35:16 +0300 Timo Sirainen (ddd0a7854) +M src/lib-fs/fs-api.c - lib-index: Track .log.2 rotation time in index header +2018-05-25 10:31:27 -0400 Josef 'Jeff' Sipek (873ec0391) - This avoids unnecessarily stat()ing the file. Also it's a bit better since - it's tracking the actual rotation time, not the mtime of what the - .log file happened to have at the time of rotation. + global: start relying on fs_file_deinit(NULL) being a no-op - The initial rotation timestamp is written only to the dovecot.index header - without going through dovecot.index.log. This works, because the - dovecot.index is written practically always after a log rotation. For the - rare cases when it doesn't happen, the dovecot.index.log.2 just gets deleted - later after the next log rotation. + Cleanup performed with the following semantic patch: -M src/doveadm/doveadm-dump-index.c -M src/lib-index/mail-index-map-hdr.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index-write.c -M src/lib-index/mail-index.h -M src/lib-index/mail-transaction-log.c + @@ + expression E; + @@ -2017-07-11 15:33:56 +0300 Timo Sirainen (c49d18350) + - if (E != NULL) { + - fs_file_deinit(&E); + - } + + fs_file_deinit(&E); - lib-index: Check .log.2 rotation only when syncing +M src/doveadm/doveadm-fs.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-sis-queue.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/fs-crypt-common.c - Instead of also whenever appending transactions to .log file. This shouldn't - change the behavior much, and it's needed for the following change to work - correctly. +2018-05-25 10:18:34 -0400 Josef 'Jeff' Sipek (a9ec4cdac) -M src/lib-index/mail-transaction-log.c + lib-fs: fs_file_deinit(NULL) should be a no-op -2017-07-11 15:32:33 +0300 Timo Sirainen (943fc4d71) - doveadm dump: Include "last temp file scan" in index header dump +M src/lib-fs/fs-api.c +2018-01-31 19:48:49 +0200 Aki Tuomi (1e2e986e4) -M src/doveadm/doveadm-dump-index.c + lib-imap: imap_match_deinit(NULL) should be a no-op -2017-07-11 14:31:10 +0300 Timo Sirainen (6e92a6fa5) - lib-index: Use nfs_safe_stat() to avoid having to handle stat() ESTALE error - - Slightly simplifies the code. - -M src/lib-index/mail-transaction-log.c - -2017-07-10 16:11:48 +0300 Timo Sirainen (994e82a7f) - - lib-storage: Fix mailbox_update() to always update mailbox list index. - - It previously was updating it only if the list index for the mailbox was - already fully up-to-date. But that doesn't really matter, because - mailbox_update() is supposed to be changing the values regardless. +M src/lib-imap/imap-match.c - This fixes mailbox_update() to always work with LAYOUT=index. It also fixes - mailbox_update() for INBOX to update UIDVALIDITY/GUID. +2018-05-25 19:13:30 -0400 Josef 'Jeff' Sipek (8201a540b) -M src/lib-storage/list/mailbox-list-index-status.c + global: start relying on http_client_request_abort(NULL) being a no-op -2017-07-10 15:54:07 +0300 Timo Sirainen (7273d9768) + Cleanup performed with the following semantic patch: - lib-storage: Don't use mailbox list index if it has refresh_flag set + @@ + expression E; + @@ - For example if INBOX is deleted, looking up its GUID shouldn't be returned - from the list index since it contains the old GUID. + - if (E != NULL) { + - http_client_request_abort(&E); + - } + + http_client_request_abort(&E); -M src/lib-storage/list/mailbox-list-index-status.c +M src/auth/auth-policy.c +M src/lib-http/http-client-connection.c +M src/lib-oauth2/oauth2.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts/fts-parser-tika.c -2017-07-10 13:34:17 +0300 Timo Sirainen (15ac63553) +2018-05-25 19:11:35 -0400 Josef 'Jeff' Sipek (6332c5972) - lib-storage: Track INBOX UIDVALIDITY and GUID in mailbox list index + lib-http: http_client_request_abort(NULL) should be a no-op - This allows existence checks and GUID lookups for INBOX to be done from the - index. -M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-http/http-client-request.c -2017-07-06 19:00:35 +0300 Timo Sirainen (e67a75f99) +2018-06-07 14:20:33 +0300 Timo Sirainen (3468508c8) - lib-storage: Avoid index refresh with - mailbox_list_index_very_dirty_syncs=yes + imap: Finish client ostream at disconnect + With IMAP COMPRESS this sends the EOF marker, indicating cleanly closed + connection. -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index-sync.h -M src/lib-storage/list/mailbox-list-index.c +M src/imap/imap-client.c -2017-07-06 17:48:19 +0300 Timo Sirainen (c6c602e7b) +2018-03-04 20:09:21 +0200 Aki Tuomi (7d90b8f27) - lib-storage: Refresh mailbox list index if mailbox's existence differs from - index + lib-lua: Remove script from linked list on destroy + Otherwise it might cause a crash -M src/lib-storage/list/mailbox-list-index.c +M src/lib-lua/dlua-script.c -2017-07-06 17:45:02 +0300 Timo Sirainen (263ffaea0) +2018-04-17 12:20:26 +0300 Aki Tuomi (ff5fb6e3d) - lib-storage: Set mailbox list index to be refreshed after changes, not - before + lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage - Mailbox deletion and rename set the refresh-flag before the change was done. - This was unnecessary if the change didn't happen. Also there was a race - condition that another process could have done the refresh before the change - was even done. + f8aaa6e63a56085f61f128838ad7a3aa080d9d5b introduced warnings on gcc -M src/lib-storage/list/mailbox-list-index.c +M src/lib-ssl-iostream/iostream-openssl-context.c -2017-07-06 17:36:28 +0300 Timo Sirainen (06b5107a5) +2018-06-12 15:31:35 +0300 Timo Sirainen (84f32ea22) - lib-storage: Add mailbox_list_last_error_push/pop() + global: Fix str_begins() usage - These are similar to mail_storage_last_error_push/pop() + I messed up their cherry-pick merging. -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h +M src/lib-fs/fs-posix.c +M src/lib-program-client/program-client.c -2017-07-10 14:37:04 +0300 Timo Sirainen (55006e65f) +2018-03-07 18:56:00 +0100 Stephan Bosch (39805c39b) - lib-storage: Try to avoid opening mailbox list index on mailbox access + lda: Fix error message for invalid -r parameter to mention `-r' rather than + `-a'. - Perform the STATUS (and other relevant) updates only if syncing or - transaction commits changed anything. This could be optimized further to - check even more strongly whether the seen changes could cause changes to the - list index, but it's probably not worth the effort. -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index-storage.h +M src/lda/main.c -2017-07-10 14:20:50 +0300 Timo Sirainen (40d0717af) +2018-03-07 18:54:38 +0100 Stephan Bosch (7838684b5) - lib-storage: Storage backend sync_init()s no longer need to check if mailbox - is open + lda: Add -r parameter to usage help message. - The previous change guarantees it. -M src/lib-storage/index/cydir/cydir-sync.c -M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c -M src/lib-storage/index/dbox-multi/mdbox-sync.c -M src/lib-storage/index/dbox-single/sdbox-sync.c -M src/lib-storage/index/imapc/imapc-sync.c -M src/lib-storage/index/maildir/maildir-sync.c -M src/lib-storage/index/mbox/mbox-sync.c -M src/lib-storage/index/pop3c/pop3c-sync.c -M src/lib-storage/index/raw/raw-sync.c +M src/lda/main.c -2017-07-10 14:19:47 +0300 Timo Sirainen (f88cdc29e) +2018-05-03 18:33:25 +0300 Timo Sirainen (907f0bdd1) - lib-storage: mailbox_sync_init() - open mailbox immediately if it's not open - yet + fts: When indexing virtual mailbox, index each real mailbox entirely - This simplifies the work for plugins that want to hook into - mailbox.sync_init() so they no longer have to handle the "mailbox isn't - opened" case. + Index all the unindexed messages in them at once, instead of jumping between + real mailboxes and indexing them in small pieces. -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c +M src/plugins/fts/fts-storage.c -2017-07-10 13:56:49 +0300 Timo Sirainen (f49b532f2) +2018-05-03 18:33:00 +0300 Timo Sirainen (99d2ff981) - imap: Don't do autoexpunging when IMAP client is hibernated + fts: Indexing virtual mailbox didn't always index the last mails -M src/imap/imap-client-hibernate.c -M src/imap/imap-client.c -M src/imap/imap-client.h +M src/plugins/fts/fts-storage.c -2016-10-20 17:45:44 +0300 Timo Sirainen (9ba5a9d52) +2018-05-03 18:30:51 +0300 Timo Sirainen (b4956dbc1) - global: Replaced t_strsplit_tab() calls with t_strsplit_tabescaped() + fts: Make sure indexing virtual mailbox doesn't recurse and index mail + multiple times - This is useful especially in auth code to support LFs in extra fields. - Other pieces of code were also tab-escaping strings, but never unescaping - them. Usually it didn't matter, because nobody would use the escaped - characters. Still, the code wasn't exactly behaving correctly. +M src/plugins/fts/fts-storage.c - One downside to this change is that it's now possible to pass through TABs, - CRs and LFs through the various protocols. In theory this shouldn't cause - any problems, but combined with other bugs this could trigger some security - problems. +2018-06-08 19:56:01 +0300 Timo Sirainen (f769a22d4) -M src/anvil/anvil-connection.c -M src/auth/auth-fields.c -M src/auth/auth-master-connection.c -M src/auth/passdb-blocking.c -M src/auth/passdb-cache.c -M src/config/config-connection.c -M src/director/director-connection.c -M src/director/director-test.c -M src/director/login-connection.c -M src/doveadm/doveadm-director.c -M src/doveadm/doveadm-penalty.c -M src/doveadm/doveadm-proxy.c -M src/doveadm/doveadm-replicator.c -M src/doveadm/doveadm-who.c -M src/doveadm/dsync/dsync-ibc-stream.c -M src/ipc/ipc-connection.c -M src/lib-auth/auth-master.c -M src/lib-auth/auth-server-connection.c -M src/lib-master/master-login-auth.c -M src/lib-master/master-service-settings.c -M src/login-common/login-proxy.c -M src/plugins/push-notification/push-notification-driver-ox.c + doveadm: Fix compiler warning -2017-05-17 12:26:42 +0300 Aki Tuomi (90259b92b) - fts: Do not attempt to deinitialize backend if it's not set +M src/doveadm/client-connection-tcp.c - If FTS backend initialization fails or does not happen, flist->backend might - end up being NULL, and attempt to deinitialize NULL won't end well. +2018-05-17 18:35:04 +0300 Timo Sirainen (0db446f13) -M src/plugins/fts/fts-storage.c + lib-master: postlogin: Don't unreference already closed login-connection -2017-06-30 17:51:34 +0300 Timo Sirainen (cfec5b24b) + If the login-connection was already closed, this caused too many + unreferences. - imap: Add more error checking to NOTIFY parameter parsing + Fixes: Panic: file master-login.c: line 544 (master_login_conn_unref): + assertion failed: (conn->clients == NULL) - This should make it clearer to realize when invalid syntax is being used - rather than just ignoring the problem. +M src/lib-master/master-login.c -M src/imap/cmd-notify.c +2018-05-04 15:27:14 +0300 Timo Sirainen (4c7f044d8) -2017-06-30 17:33:15 +0300 Timo Sirainen (e121387ff) + auth: Improve auth-master connections' error logging - imap: Fix NOTIFY parameter parsing by reverting earlier change + Include connect and handshake times in the error message. - I misread the RFC and wrote broken tests. Reverts - 64d2efdc4b0bdf92249840e9db89b91c8dc0f3a3 +M src/auth/auth-master-connection.c +M src/auth/auth-master-connection.h +M src/auth/auth-request-handler.c -M src/imap/cmd-notify.c +2018-05-04 14:14:35 +0300 Timo Sirainen (e8cddebde) -2017-06-25 09:10:52 +0300 Timo Sirainen (19fd49921) + lib-master: Add auth connect & handshake times to master_login_auth_request + errors - lib-storage: mail_add_temp_wanted_fields() - delay opening stream - Allows plugins to call it in mail.get_stream() without infinite loop. +M src/lib-master/master-login-auth.c -M src/lib-storage/index/index-mail.c +2018-05-04 14:10:49 +0300 Timo Sirainen (9d00608a6) -2016-05-03 00:25:43 +0300 Timo Sirainen (614f18a2e) + lib-master: Add request time also for internal failure error messages - lib-storage: Another fix to mail storage initialization. - Allow mail_namespaces_init_location() to add the namespace directly to user, - since that's what the current callers always want. But compared to the - original code we're now calling mail_namespaces_init_finish() rather than - doing the same things ourself. +M src/lib-master/master-login-auth.c -M src/lib-storage/mail-namespace.c +2018-05-04 14:03:46 +0300 Timo Sirainen (207dcaf69) -2016-05-02 17:00:22 +0300 Timo Sirainen (27817e4f3) + lib-master: Use more exact timestamp in master_login_auth_request failures - lib-storage: Changed mail storage initialization. - Most importantly require mail_namespaces_init_finish() after - mail_storage_create(). This was needed so that mail_namespaces_created/added - hook would always have the ns->list set, which is required for several of - the hooks to work (e.g. mailbox list index) +M src/lib-master/master-login-auth.c -M src/lib-storage/index/raw/raw-storage.c -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-user.c +2018-05-04 13:56:45 +0300 Timo Sirainen (5da2d47ca) -2017-07-03 21:08:02 +0300 Timo Sirainen (ce2eb23d2) + lib-master: Improve error logging for master_auth_connection failures - imapc: Prefech - Initialize cached stream only if needed - If the mail is immediately accessed for other purposes (e.g. fetching - message flags), there's no need to go through all the trouble of - initializing the mail stream. +M src/lib-master/master-auth.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/imapc/imapc-mail.h +2018-05-04 13:42:23 +0300 Timo Sirainen (e2250ad44) -2017-06-30 13:46:22 +0300 Timo Sirainen (643c367f5) + lib-master: Improve error logging for post-login script failures - lib-storage: Fix ITERINDEX to leave \NoSelect parents after deleting child - mailbox - For example if "a/b" was created and deleted, "a" should be left behind. - (Or at least it shouldn't have left "a" to mail root directory and kept it - invisible since it didn't exist in index dir.) +M src/lib-master/master-login.c +M src/lib-master/master-login.h -M src/lib-storage/list/mailbox-list-delete.c +2018-05-04 13:23:07 +0300 Timo Sirainen (082f6f244) -2017-06-26 19:06:26 +0300 Timo Sirainen (ac9f468cf) + lib-master: Improve error logging when master_login_connection gets + disconnected - dbox: Check mailbox existence from index directory with ITERINDEX +M src/lib-master/master-login.c +M src/lib-master/master-login.h -M src/lib-storage/index/dbox-common/dbox-storage.c +2018-05-04 13:07:50 +0300 Timo Sirainen (54c421010) -2017-06-28 19:46:01 +0300 Timo Sirainen (8c2f60b2c) + lib-master: Keep linked list of master_login_clients per connection - dbox: Use mail_index_header.last_temp_file_scan instead of directory's atime + This allows improving logging on connection errors. - This will be required for the following ITERINDEX change. +M src/lib-master/master-login.c +M src/lib-master/master-login.h -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-common/dbox-storage.h -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c +2018-04-13 16:14:18 +0300 Timo Sirainen (f37d91677) -2017-06-28 19:41:21 +0300 Timo Sirainen (44fda550f) + lib-master: If connect() to backend UNIX socket is retried, log a warning - lib-index, lib-storage: Add mail_index_header.last_temp_file_scan + For example if imap-login process needs to retry before it successfully + connects to imap process's socket, a warning is logged. This warning is + important because it means that the imap-login process may have been + sleeping up to 0.5 seconds and causing all the other connections to hang + during it. - Also add index_mailbox_update_last_temp_file_scan() for easily updating it. + It would be better to make this retrying asynchronous, but before spending + time on doing that, lets see if this warning is ever even being logged. - This is reusing an old "sync timestamp" field. Because it was a timestamp, - it doesn't matter if the old data still exists in it. This field could have - been added as an extension, but that's more work and this feature is generic - enough that it should be useful for many of the mail storage backends. +M src/lib-master/master-auth.c -M src/lib-index/mail-index-map-hdr.c -M src/lib-index/mail-index.h -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-storage.h +2018-04-13 16:12:27 +0300 Timo Sirainen (7cf910e89) -2017-06-26 18:59:17 +0300 Timo Sirainen (40aabe371) + lib-master: Add how long request took for "Internal auth failure" errors - dbox: Cleanup - reorganize old temp file cleanup code - No functional changes. In preparation for the next commits. +M src/lib-master/master-login-auth.c -M src/lib-storage/index/dbox-common/dbox-storage.c +2018-01-11 15:35:42 +0200 Phil Carmody (1367401f9) -2017-06-26 19:30:11 +0300 Timo Sirainen (a9f112f91) + global - migrate more complicated strncmp expressions to str_begins - lib-storage: Check for storage existence from index dir with ITERINDEX + Simplify a bunch of verbose var=strlen(); strncmp(,,var) calls. Fortunately, + all of these examples use the length variable, so no + "unused value" warnings occur. - The root path creation doesn't really even seem to be necessary, because any - mailbox access will automatically mkdir the missing directories anyway. - Although writing other files might not work so well, such as - mail_attribute_dict that points inside the mail directory. + --- 8< --- strncmp2.cocci --- + @@ expression e1, e2; identifier i2; + @@ - This change simply changes the mailboxes/ directory to be looked up from - index directory instead of the mail root directory. It also mkdirs the - index/mailboxes/ directory afterwards if it didn't exist. So practically - this change shouldn't break anything, since the mailboxes/ directory should - always exist for both root and the indexes. + i2 = strlen(e2) + ... + - strncmp(e1, e2, i2) == 0 + + str_begins(e1, e2) -M src/lib-storage/mail-storage.c + @@ expression e1, e2; identifier i2; + @@ -2017-06-26 18:50:24 +0300 Timo Sirainen (cfc2d1192) + i2 = strlen(e2) + ... + - strncmp(e1, e2, i2) != 0 + + !str_begins(e1, e2) - lib-storage: mailbox_list_get_permissions() - Use index dir with ITERINDEX + @@ expression e1, e2; identifier i1; + @@ + i1 = strlen(e1) + ... + - strncmp(e1, e2, i1) == 0 + + str_begins(e2, e1) -M src/lib-storage/mailbox-list.c + @@ expression e1, e2; identifier i1; + @@ -2017-06-26 18:46:30 +0300 Timo Sirainen (6887dab8a) + i1 = strlen(e1) + ... + - strncmp(e1, e2, i1) != 0 + + !str_begins(e2, e1) - lib-storage: mailbox_list_get_permissions() - Use index dir for storage - without mails + --- 8< --------------------- - The index dir might still exist. + Signed-off-by: Phil Carmody +M src/auth/auth-cache.c +M src/config/old-set-parser.c +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-mail.c +M src/doveadm/dsync/dsync-brain-mailbox-tree.c +M src/imap/cmd-notify.c +M src/imap/cmd-rename.c +M src/imap/imap-notify.c +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/index-search-mime.c +M src/lib-storage/index/shared/shared-list.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-iter.c M src/lib-storage/mailbox-list.c -2017-06-26 18:41:27 +0300 Timo Sirainen (0bb84b9ee) - - lib-storage: Cleanup - move code to mailbox_list_get_permissions_stat() - - Comments changed also a bit, but no functional changes. +2018-01-11 15:20:09 +0200 Phil Carmody (d026e2d2e) -M src/lib-storage/mailbox-list.c + global - migrate from strncmp to str_begins -2017-06-26 18:23:01 +0300 Timo Sirainen (332d4db8c) + Simplify a bunch of verbose strncmp(,,strlen()) calls. - lib-storage: Cleanup - Use mailbox_permissions_copy() instead of duplicating - it + --- 8< --- strncmp.cocci --- + @@ expression e1, e2; + @@ + - strncmp(e1, e2, strlen(e2)) == 0 + + str_begins(e1, e2) -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-list.c + @@ expression e1, e2; + @@ -2017-06-26 18:19:17 +0300 Timo Sirainen (7500e3407) + - strncmp(e1, e2, strlen(e2)) != 0 + + !str_begins(e1, e2) - lib-storage: Add mailbox_permissions_copy() + @@ expression e1, e2; + @@ + - strncmp(e1, e2, strlen(e1)) == 0 + + str_begins(e2, e1) -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c + @@ expression e1, e2; + @@ -2017-06-26 20:10:17 +0300 Timo Sirainen (6db182379) + - strncmp(e1, e2, strlen(e1)) != 0 + + !str_begins(e2, e1) - lib-storage: Add mail_location=..:ITERINDEX + --- 8< --------------------- - This changes mailbox list iteration to work using INDEX directory instead of - the normal mail directory. This can be helpful when the indexes are stored - on a faster storage. + Signed-off-by: Phil Carmody -M src/lib-storage/index/index-storage.c -M src/lib-storage/list/mailbox-list-fs-flags.c -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-fs.c -M src/lib-storage/list/mailbox-list-maildir-iter.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h +M src/doveadm/doveadm-dict.c +M src/imap-hibernate/imap-client.c +M src/imap-login/imap-proxy.c +M src/lib-dict-backend/dict-cdb.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-redis.c +M src/lib-dict/dict.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-posix.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-storage/index/index-search-mime.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-attribute.h +M src/lib-storage/mailbox-list.c +M src/lib/mempool-alloconly.c +M src/lib/test-strfuncs.c +M src/master/main.c +M src/plugins/acl/acl-api.c +M src/plugins/acl/acl-attributes.c +M src/plugins/imap-acl/imap-acl-plugin.c -2017-06-27 16:55:34 +0300 Timo Sirainen (ea4d5455d) +2018-01-11 15:03:36 +0200 Phil Carmody (9be765076) - sdbox: Don't create index directory when trying to open nonexistent - mailboxes + global - migrate strncmp literals to str_begins + Simplify a bunch of strncmp(,,number) calls. -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-common/dbox-storage.h -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c + git ls-files \*.[ch] | xargs perl -p -i -e 's/strncmp\((.*?), ?(\".*?\"), + ?(\d+)\) == 0/str_begins($1, $2)/g' git ls-files \*.[ch] | xargs perl -p -i + -e 's/strncmp\((.*?), ?(\".*?\"), ?(\d+)\) != 0/!str_begins($1, $2)/g' -2017-06-30 13:56:54 +0300 Timo Sirainen (13996627c) + I ran a longer script to verify that all of the string literals and the + length matched. They didn't: - lib-storage: Fix mailbox delete to not delete childrens' INDEX or CONTROL - dirs + $ git grep strncmp | perl -ne 'print + if(m/strncmp\([^,]*,\s*"(.*?)",\s*(\d+)/ and + ($s=$1,$t=$2,$s=~s/\\[tn]/#/g,length($s)) != $t)' src/auth/db-oauth2.c: + if (strncmp(field, "oauth2:", 8) == 0 && - If mail_location had separate INDEX and/or CONTROL set, deleting a mailbox - with children caused the childrens' index and/or control directories to be - deleted (but the mail/ALT directories weren't). + With the new functions, that kind of typo is impossible. - I'm not sure why the _FLAG_MAILBOX_FILES was treated as a special case - earlier. It shouldn't make a difference. + Signed-off-by: Phil Carmody -M src/lib-storage/list/mailbox-list-delete.c +M src/auth/auth-client-connection.c +M src/auth/auth-master-connection.c +M src/auth/auth-request.c +M src/auth/auth-worker-server.c +M src/auth/db-ldap.c +M src/auth/db-oauth2.c +M src/auth/main.c +M src/auth/mech-oauth2.c +M src/auth/mech-otp.c +M src/auth/passdb-blocking.c +M src/auth/passdb-bsdauth.c +M src/auth/passdb-checkpassword.c +M src/auth/passdb-lua.c +M src/auth/passdb-pam.c +M src/auth/passdb-vpopmail.c +M src/auth/password-scheme-crypt.c +M src/auth/password-scheme.c +M src/auth/userdb-blocking.c +M src/auth/userdb-checkpassword.c +M src/auth/userdb-lua.c +M src/auth/userdb-passwd-file.c +M src/auth/userdb-vpopmail.c +M src/config/config-connection.c +M src/config/old-set-parser.c +M src/config/sysinfo-get.c +M src/director/login-connection.c +M src/dns/dns-client.c +M src/doveadm/client-connection-tcp.c +M src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-auth.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-dump-dbox.c +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail-server.c +M src/doveadm/doveadm-oldstats.c +M src/doveadm/doveadm-proxy.c +M src/doveadm/doveadm-util.c +M src/doveadm/doveadm-zlib.c +M src/doveadm/server-connection.c +M src/imap-hibernate/imap-client.c +M src/imap-login/imap-proxy.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/cmd-notify.c +M src/imap/imap-fetch-body.c +M src/imap/imap-sync.c +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dict-backend/dict-sql-settings.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-redis.c +M src/lib-dns/dns-lookup.c +M src/lib-fs/fs-posix.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-imap/imap-base-subject.c +M src/lib-index/mail-index.c +M src/lib-mail/test-message-header-encode.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-login.c +M src/lib-master/master-service-settings-cache.c +M src/lib-master/master-service-settings.c +M src/lib-master/master-service.c +M src/lib-program-client/program-client.c +M src/lib-settings/settings-parser.c +M src/lib-smtp/test-smtp-client-errors.c +M src/lib-sql/driver-pgsql.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/index-status.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/pop3c/pop3c-storage.c +M src/lib-storage/list/mailbox-list-fs-flags.c +M src/lib-storage/list/mailbox-list-maildir-iter.c +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-search-register-imap.c +M src/lib-storage/mail-storage-hooks.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/test-mail-storage.c +M src/lib/iostream-rawlog.c +M src/lib/module-dir.c +M src/lib/test-str-sanitize.c +M src/lib/unlink-directory.c +M src/log/log-connection.c +M src/login-common/client-common-auth.c +M src/login-common/sasl-server.c +M src/master/main.c +M src/old-stats/client-export.c +M src/old-stats/mail-session.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/acl/acl-backend.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/fts-lucene/fts-lucene-plugin.c +M src/plugins/fts-solr/fts-solr-plugin.c +M src/plugins/fts-squat/fts-backend-squat.c +M src/plugins/fts-squat/squat-test.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-indexer.c +M src/plugins/old-stats/mail-stats-fill.c +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-util.c +M src/plugins/quota/quota.c +M src/pop3-login/pop3-proxy.c +M src/util/script.c -2017-06-27 15:39:12 +0300 Timo Sirainen (a00dcef10) +2017-02-02 14:27:58 +0200 Phil Carmody (ad6c57faf) - lib-storage: mailbox_list_delete_mailbox_nonrecursive() - Fix error handling + lib: strfuncs - string match length and prefix checking helpers - It should return error on unexpected readdir(), closedir() and unlink() - failures. Also fix handling a race condition with another process deleting - the mailbox at the same time. + strncmp(input, "literal", 7) is an idiom used everywhere, but leaves room + for human error in calculating the length. -M src/lib-storage/list/mailbox-list-delete.c + strncmp(input, "literal", strlen("literal")) is an idiom also used + everywhere, but is both verbose and might be inefficient on some legacy or + ultralightweight compilers. -2017-06-27 16:56:08 +0300 Timo Sirainen (0e30932db) + The old techniques are presumed to be optimal code-wise, but are verbose + (and, containing redundancy, they leave room for human error), so make the + macro fall back onto this operation, simply avoiding the + redundancy/verbosity. - lib-storage: mailbox_list_delete_trash() - Don't ignore errors + The macro expansion does not multiply evaluate any of its parameters, so + should be safe even in the strangest of situations. + Signed-off-by: Phil Carmody -M src/lib-storage/list/mailbox-list-delete.c +M src/lib/strfuncs.c +M src/lib/strfuncs.h +M src/lib/test-strfuncs.c -2017-06-27 16:37:16 +0300 Timo Sirainen (e547d6cf2) +2018-06-05 20:28:45 +0300 Timo Sirainen (d7b27d1c7) - lib-storage: Use mailbox_list_delete_finish_ret() for fs & maildir++ layout + doveadm: Simplify destroying ioloop using o_stream_switch_ioloop_to() - Fixes a problem where e.g. index directory existed but mail root didn't, and - the mailbox couldn't be fully deleted. This was especially a problem with - ITERINDEX enabled. -M src/lib-storage/list/mailbox-list-fs.c -M src/lib-storage/list/mailbox-list-maildir.c +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection-tcp.c -2017-06-27 16:36:56 +0300 Timo Sirainen (11767d2a9) +2018-06-05 20:23:52 +0300 Timo Sirainen (9db5a1d01) - lib-storage: Add mailbox_list_delete_finish_ret() + doveadm-server: Fix hang when sending a lot of output to clients - This simplifies deletion logic for mailbox list backends. + Nowadays ostream adds its io to the stream's specified ioloop, not to + current ioloop. -M src/lib-storage/list/mailbox-list-delete.c -M src/lib-storage/list/mailbox-list-delete.h +M src/doveadm/client-connection-tcp.c -2017-06-27 16:13:34 +0300 Timo Sirainen (4574408e5) +2018-04-06 17:57:30 +0200 Fabian Freyer (fefa9c470) - lib-storage: mailbox_list_delete_finish() - Return whether anything was - deleted + lib-storage: reintroduce mail_index_set_fsync_mode + This patch fixes a regression introduced in + 638600575ee95f2513c683ef09cb188f76eacd22 where mail_fsync=always would not + be honoured, leading to fatal "nfs flush requires mail_fsync=always" errors. -M src/lib-storage/list/mailbox-list-delete.c -M src/lib-storage/list/mailbox-list-delete.h +M src/lib-storage/index/index-storage.c -2017-06-27 16:16:21 +0300 Timo Sirainen (e1019a065) +2018-04-29 12:17:45 +0300 Timo Sirainen (21aa3158b) - lib-storage: Add mailbox_list_get_last_mail_error() + lib: event_add_str() - Ignore calls when value is NULL + Alternative could be to assert-crash instead. But perhaps this makes it + easier to use and avoids unnecessary assert-crashes? -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h +M src/lib/lib-event.c -2017-06-27 15:57:10 +0300 Timo Sirainen (4ff969304) +2018-05-18 15:56:15 +0200 Stephan Bosch (ca66aa9ed) - lib-storage: Add comments to mailbox-list-delete.h + lib-http: client: Drop the ioloop switch callback before freeing the global + client context. + This removes the possibility of recursion when the client context object + somehow triggers an ioloop switch (e.g., when debug logging starts blocking + at that inopportune moment). -M src/lib-storage/list/mailbox-list-delete.h +M src/lib-http/http-client.c -2017-06-28 23:37:22 +0300 Timo Sirainen (b16614d91) +2018-05-18 12:47:02 +0300 Timo Sirainen (a6ab92792) - lib: Fix file_create_locked() unit test to delete temp file afterwards + lib: Fix potential crashes when writing to log fails with EAGAIN - Also removed a path string that was never used. + The ioloop may nowadays call ioloop context switch callbacks. Since log + writing can happen just about anywhere, the callbacks may be confused and + cause crashes or other weird behavior. + + Even if the callbacks aren't called, all the extra code in ioloop can cause + potential problems. Especially any error logging in it wouldn't work + properly since it would just recurse back. So replace the ioloop code with + just setting the log fd to be blocking until the write succeeds. + + This commit also removes comments about writes to a blocking terminal fd + causing EAGAINs. This seems unlikely. Probably I was just somehow confused + when originally seeing it and writing the code. If it actually does happen + now, it's still not breaking anything, but it could get into a busy-loop of + write()s constantly returning EAGAIN until they succeed. -M src/lib/test-file-create-locked.c +M src/lib/failures.c -2017-06-22 01:28:57 +0300 Timo Sirainen (5a661d780) +2018-03-12 13:58:02 +0200 Timo Sirainen (19985774b) - lib-storage: Add VOLATILEDIR setting to mail_location + lib-ssl-iostream: Fix potential crash if istream is destroyed before ostream - This is useful for creating temporary locks that could exist in tmpfs. - Currently this is used for .vsize.lock and dovecot.autoexpunge.lock. + This happened if o_stream_destroy() triggered flush, which attempted to read + from the ssl_io->ssl_input. If the istream-ssl was already destroyed, it was + NULL and that caused a crash. -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-user.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/ostream-openssl.c -2017-06-22 02:44:12 +0300 Timo Sirainen (620f970cb) +2018-04-24 11:46:21 +0300 Aki Tuomi (45bda1946) - lib-storage: Move autoexpunge lock creation to a generic - mail_user_lock_file_create() + systemd: Indicate where changes should be made -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h +M dovecot.service.in -2017-06-22 02:33:03 +0300 Timo Sirainen (0c4b344f0) +2018-04-24 11:45:36 +0300 Aki Tuomi (4a87bf15b) - lib-storage: mailbox_autoexpunge_lock() - Don't hide ENOENT error + systemd: Increase file descriptors by default - It means that the user's home directory doesn't exist, which is pretty - unexpected. Home directory is supposed to be created when the storage is - initialized. -M src/lib-storage/mail-autoexpunge.c +M dovecot.service.in -2017-06-22 02:32:10 +0300 Timo Sirainen (b05f66b4d) +2018-04-24 11:45:07 +0300 Aki Tuomi (5eae0e4df) - lib-storage: mailbox_autoexpunge_lock() - small cleanup + systemd: Allow writing to home by default - No functional changes - just reorganizing code and adding comments. -M src/lib-storage/mail-autoexpunge.c +M dovecot.service.in -2017-06-22 02:24:08 +0300 Timo Sirainen (461aafd3a) +2018-04-24 11:44:33 +0300 Aki Tuomi (8f0265f98) - lib-storage: Use file_lock_set_*_on_free() for dovecot.autoexpunge.lock + systemd: Remove NoNewPrivileges and CAP_BOUNDING_SET + These break sieve by preventing SUID binary as sendmail_path. -M src/lib-storage/mail-autoexpunge.c +M dovecot.service.in -2017-06-22 02:19:18 +0300 Timo Sirainen (fa71a5811) +2018-06-05 13:57:26 +0300 Timo Sirainen (6472b5cc0) - lib-storage: Move .vsize.lock creation to a generic - mailbox_lock_file_create() + lib-compression: Use i_stream_nonseekable_try_seek() instead of + reimplementing it -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-compression/test-compression.c -2017-06-22 02:07:16 +0300 Timo Sirainen (e48fd415f) +2018-06-05 13:53:51 +0300 Timo Sirainen (70aaf84c3) - lib-storage: Move .vsize.lock creation to its own function + lib-compression: Use i_stream_default_stat() instead of reimplementing it -M src/lib-storage/index/index-mailbox-size.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-compression/test-compression.c -2017-06-22 02:05:16 +0300 Timo Sirainen (3a0d8032e) +2018-06-05 14:22:08 +0300 Timo Sirainen (7866c3ecf) - lib-storage: Use file_lock_set_*_on_free() for .vsize.lock + lib-compression: deflate ostream - Use Z_FINISH on final flush - This avoids storing the lock_path and lock_fd separately. + Nowadays we have o_stream_finish(), so we can differentiate between + intermediate flush and final flush. Using this allows istream-zlib to + cleanly see that the stream ends. -M src/lib-storage/index/index-mailbox-size.c +M src/lib-compression/ostream-zlib.c +M src/lib-compression/test-compression.c -2017-06-22 01:56:18 +0300 Timo Sirainen (466f4272c) +2018-06-05 13:34:47 +0300 Timo Sirainen (bd7afb3d1) - lib-storage: Fix error logging for failing to create .vsize.lock + lib: i_stream_default_stat() - Get seekable streams' sizes by reading the + stream + After the stream size is found, seek back to original offset. -M src/lib-storage/index/index-mailbox-size.c +M src/lib/istream-private.h +M src/lib/istream.c -2017-06-28 17:48:01 +0300 Timo Sirainen (faafc88b1) +2018-06-05 13:34:02 +0300 Timo Sirainen (3e626387c) - lib: file_create_locked() - Add settings to mkdir() missing parent - directories + lib-dcrypt: istream-decrypt - Add support for seeking -M src/lib/file-create-locked.c -M src/lib/file-create-locked.h -M src/lib/test-file-create-locked.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/test-stream.c -2017-06-28 17:40:20 +0300 Timo Sirainen (8336d087a) +2018-06-05 13:25:30 +0300 Timo Sirainen (86536a2f7) - lib: Add unit test for file_create_locked() + lib: Add i_stream_nonseekable_try_seek() + This can be used by istreams to more easily implement seeking backwards when + it has to be done by first seeking back to offset 0 and reading from there. -M src/lib/Makefile.am -A src/lib/test-file-create-locked.c -M src/lib/test-lib.c -M src/lib/test-lib.h +M src/lib/istream-private.h +M src/lib/istream.c -2017-06-22 01:52:29 +0300 Timo Sirainen (d9781e251) +2018-05-29 11:53:15 +0300 Aki Tuomi (8e9693f17) - lib: Add file_lock_set_close_on_free() + pop3c: Ensure pop3c index directory is autocreated + Otherwise we might think that the box has been unexpectedly autodeleted and + pop3_migration will fail. -M src/lib/file-lock.c -M src/lib/file-lock.h + Broken by 91ee70ed04d33fecd7fc94621f236013d520d7b3 -2017-06-22 01:47:51 +0300 Timo Sirainen (c11879778) +M src/lib-storage/index/pop3c/pop3c-storage.c - lib: Add file_lock_set_unlink_on_free() +2018-05-21 19:38:29 +0300 Aki Tuomi (755a4fe7c) + lib-storage: maildir - Remove unnecessary variable -M src/lib/file-lock.c -M src/lib/file-lock.h -2017-06-22 10:35:16 +0300 Timo Sirainen (104e4cdcf) +M src/lib-storage/index/maildir/maildir-save.c - lib: file_create_locked() - update lock path after link() +2018-05-21 14:31:58 +0300 Aki Tuomi (c1dc49287) + lib-storage: maildir - Use index keywords only when saving mail -M src/lib/file-create-locked.c + This fixes mail attachment keywords to work with maildir too. -2017-06-22 09:05:06 +0300 Timo Sirainen (56ae89638) +M src/lib-storage/index/maildir/maildir-save.c - lib: Add file_lock_set_path() +2018-05-21 14:28:03 +0300 Aki Tuomi (59eb90663) + lib-storage: maildir - Use array code for keywords when saving mail -M src/lib/file-lock.c -M src/lib/file-lock.h + This is safer alternative and makes following change easier. -2017-06-22 01:42:56 +0300 Timo Sirainen (5c2b8a9f6) +M src/lib-storage/index/maildir/maildir-save.c - lib: Add file_lock_get_path() +2018-05-18 10:24:46 +0200 Stephan Bosch (e3dc64746) - This allows getting the file path from the lock without having to preserve - it separately. + lib-smtp: client: Fix assertion panic occurring when DATA dot stream cannot + be finished immediately. -M src/lib/file-lock.c -M src/lib/file-lock.h + If o_stream_finish() returns 0, o_stream_send_istream() would be called + again later which causes the panic. Instead, it should only call + o_stream_finish() or o_stream_flush() again to finish the last bit of the + output. -2017-06-28 15:50:11 +0300 Timo Sirainen (1a14bfc1f) + Panic was: - pop3-migration: Drop lines with only spaces or tabs from comparison + Panic: file ostream.c: line 394 (o_stream_send_istream): assertion failed: + (!_outstream->finished) - Zimbra drops out those lines from IMAP BODY[HEADER] replies. +M src/lib-smtp/smtp-client-command.c +M src/lib-smtp/smtp-client-private.h -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/pop3-migration/test-pop3-migration-plugin.c +2018-05-27 15:48:42 +0300 Timo Sirainen (07660d37a) -2017-06-23 11:15:32 +0300 Timo Sirainen (ede5ce08e) + imap: Log unhibernation debug message only with mail_debug=yes - dsync: Use header hashing version 3 +M src/imap/imap-state.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.h -M src/doveadm/dsync/dsync-mailbox-export.c -M src/doveadm/dsync/dsync-mailbox-export.h -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-import.h +2018-05-23 17:13:23 +0300 Timo Sirainen (637b84dbd) -2017-06-23 11:02:24 +0300 Timo Sirainen (c789beb91) + doveadm director: Remove unnecessary extra newlines from output - pop3-migration: Replace trailing whitespace removal with new header hashing - version - This is now done by message_header_hash(), which makes it work correctly - also for dsync+imapc. +M src/doveadm/doveadm-director.c - Reverts 0cf3b30b86e6c39f43b8e13a718cd078187ca86d, except for the unit tests. +2018-04-16 16:29:38 +0300 Timo Sirainen (d2eaf7ac7) -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/pop3-migration/test-pop3-migration-plugin.c + lib-ssl-iostream: Make ssl_iostream_unref() private -2017-06-23 11:00:37 +0300 Timo Sirainen (86a0118f3) - lib-mail: message_header_hash_more() - add v3 that strips spaces +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.h - This helps with Zimbra, which strips away trailing whitespaces in - BODY[HEADER]. +2018-04-16 16:28:24 +0300 Timo Sirainen (1ea1304a2) -M src/lib-mail/message-header-hash.c -M src/lib-mail/message-header-hash.h -M src/lib-mail/test-message-header-hash.c + global: Replace ssl_iostream_unref() with ssl_iostream_destroy() -2017-06-23 09:24:40 +0300 Timo Sirainen (8dd87bfb9) + Destroying performs cleanups correctly. - lib-mail: test-message-header-hash - add more tests +M src/doveadm/server-connection.c +M src/lib-http/http-client-connection.c +M src/lib-http/http-server-connection.c +M src/lib-imap-client/imapc-connection.c +M src/lib-smtp/smtp-client-connection.c +M src/lib-storage/index/pop3c/pop3c-client.c +2018-04-17 15:58:58 +0300 Aki Tuomi (e165a7553) -M src/lib-mail/test-message-header-hash.c + lib-ssl-iostream: Do not handshake further if we are destroying -2017-06-23 09:14:40 +0300 Timo Sirainen (652b1bf65) - lib-mail: message_header_hash_more() - refactor to use switch() +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +2018-03-10 17:06:03 +0200 Aki Tuomi (2f13abc3d) -M src/lib-mail/message-header-hash.c + lib-ssl-iostream: Correctly build certificate chains -2017-06-22 11:43:05 +0300 Timo Sirainen (17031aa2a) + Prevents sending extraneous certificates when using alternative certs. - quota: Fix failing again if quota setting has invalid parameters + Reported by John Fawcett and Peter Linss + . - This was broken by the recent quota parameter parsing changes. +M m4/ssl.m4 +M src/lib-ssl-iostream/iostream-openssl-context.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota-fs.c -M src/plugins/quota/quota-imapc.c -M src/plugins/quota/quota.c +2018-01-09 16:01:42 -0500 Timo Sirainen (3a6537d59) -2017-06-20 12:11:37 +0300 Sergey Kitov (c65646e7a) + imap-login: Simplify ID handling code - lib-imap: imap_append_nstring_nolf() - fix crash with datastack_pool strings - T_BEGIN .. T_END is not used, when string_t is allocated from datastack - pool, unit test updated to verify the fix. +M src/imap-login/imap-login-cmd-id.c -M src/lib-imap/imap-quote.c -M src/lib-imap/test-imap-quote.c +2017-06-14 10:46:53 +0300 Timo Sirainen (82875d3a0) -2017-06-19 23:43:17 +0300 Timo Sirainen (81acc920b) + imap-login: Rewrite ID parameter handling to be less fragile - acl: Add acl_globals_only setting + There's no longer two places that need to be kept in sync. - The local dovecot-acl files aren't even attempted to be looked up if this is - set. This is mainly useful to avoid unnecessary stat()s to dovecot-acl files - that never exist. +M src/imap-login/imap-login-cmd-id.c -M src/plugins/acl/acl-api-private.h -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/acl/acl-backend.c +2017-06-14 10:34:57 +0300 Timo Sirainen (994202f32) -2017-06-19 12:05:30 +0300 Timo Sirainen (3a92a3bd2) + imap-login: Move ID command handling to its own file. - director: Fix logging last input/output time when there was no input/output +M src/imap-login/Makefile.am +M src/imap-login/imap-login-client.c +M src/imap-login/imap-login-client.h +A src/imap-login/imap-login-cmd-id.c -M src/director/director-connection.c +2018-05-12 13:11:59 +0200 Stephan Bosch (618b7e0da) -2017-06-19 12:03:13 +0300 Timo Sirainen (8ad704f6a) + submission: Perform variable substitution for the + submission_relay_rawlog_dir setting. - director: Fix whitespace position in some log messages +M src/submission/submission-settings.c -M src/director/director-connection.c +2018-05-12 12:20:08 +0200 Stephan Bosch (71375e3d5) -2017-05-31 14:27:16 +0300 Timo Sirainen (4cd5e45b0) + submission: Add support for making server rawlogs using the rawlog_dir + setting. - director: Use longer timeout for receiving user list in handshake + Similar services like pop3 and imap already support this setting, but for + submission this was omitted. - The sender also has a send timeout, so this allows the sender to abort early - and give a nicer error message. +M src/submission/submission-client.c +M src/submission/submission-settings.c +M src/submission/submission-settings.h -M src/director/director-connection.c +2018-05-12 13:33:20 +0200 Stephan Bosch (6d4f512aa) -2017-05-31 13:42:31 +0300 Timo Sirainen (1565c1940) + submission: Substitute variables in settings. - director: Log more connection state information on handshaking errors +M src/submission/main.c -M src/director/director-connection.c +2018-05-14 22:41:29 +0200 Stephan Bosch (3e3f82d39) -2017-05-31 13:17:37 +0300 Timo Sirainen (89986efaf) + submission: Move assignment of verbose_proctitle. - director: Use more accurate timestamps for handshake timeout logging + Makes it more consistent with other services like imap. - There could be some time between the create, connect and when ME was - received. +M src/submission/main.c -M src/director/director-connection.c +2018-05-14 23:56:21 +0200 Stephan Bosch (9b99269a5) -2017-05-31 13:15:04 +0300 Timo Sirainen (2d621f593) + lmtp: Fix segfault occurring when a user turns out to be over quota at DATA + transfer. - director: Fix "sending handshake timed out" error to be actually logged + The LMTP recipient context was not updated with the final recipient address + when the RCPT command was accepted. This left a dangling struct smtp_address + pointer which triggered the segfault when used. - io was never NULL here, so it was never logged. +M src/lmtp/lmtp-common.c -M src/director/director-connection.c +2018-04-17 12:11:05 +0300 Aki Tuomi (c560ada9b) -2017-05-31 13:11:08 +0300 Timo Sirainen (4cbe97939) + auth: test - make sure memory gets free'd - director: Fix handshake timeout lengths - They weren't too bad, but also they weren't what the #defines described. - Also added a separate connect() timeout. +M src/auth/test-auth.h +M src/auth/test-lua.c +M src/auth/test-main.c +M src/auth/test-mock.c -M src/director/director-connection.c +2018-04-17 10:55:53 +0300 Aki Tuomi (b264fa336) -2017-06-17 14:39:59 +0300 Timo Sirainen (827fb1e6b) + auth: Add test for lua password verify - imap: NOTIFY - Fix potential crash when reading invalid parameters +M src/auth/test-lua.c +M src/auth/test-main.c -M src/imap/cmd-notify.c +2018-04-12 13:39:58 +0300 Aki Tuomi (6f96dd4d4) -2017-06-17 14:38:22 +0300 Timo Sirainen (3ef0b4226) + auth: db-lua - Add password_verify to auth request - imap: Fix NOTIFY to parse more than just the first event-group + Allows verifying passwords with dovecot when necessary +M src/auth/db-lua.c -M src/imap/cmd-notify.c +2018-04-11 12:39:51 +0300 Aki Tuomi (47c7e193d) -2017-06-19 11:21:14 +0300 Timo Sirainen (9e6a7ba7e) + auth: db-lua - Expose some auth request members - lib-http: Fix memory leak in HTTP connection deinit + These are particularly useful for finding out if user has already been + authenticated. +M src/auth/db-lua.c -M src/lib-http/http-client-connection.c +2018-04-11 12:29:41 +0300 Aki Tuomi (29c3c0d18) -2017-06-19 00:01:17 +0300 Timo Sirainen (48aca45ca) + auth: db-lua - Remove extra space from log_error - imap: NOTIFY - Cleanup notify watch timeout handling + This makes it possible to use the log_error method. - It's not useful to set the timeout until all the commands are finished. + Broken in 9698cd24 -M src/imap/imap-notify.c +M src/auth/db-lua.c -2017-06-18 11:14:05 +0300 Timo Sirainen (cdad30b75) +2018-03-26 00:52:06 -0400 Bill Cole (a37bae913) - imap: NOTIFY - Fix crash due to not hooking into commands correctly + Fix arc4random build checks - The pre/post hooks aren't always called immediately when commands are - created. They're called only after the command input is being read. Call - notify hooks explicitly now immediately when commands are allocated. + The configure script checks for arc4random() but the actual code uses + arc4random_buf(). This breaks for FreeBSD <8.0 and MacOS X <10.7, which have + the former but not the latter. This change (and an autoreconf run) solves + the problem at the cost of not using the available ARC4 implementation. - Fixes a panic with for example: +M m4/arc4random.m4 - a notify set (selected (Messagenew (uid flags) MessageExpunge FlagChange) - personal (MessageNew MessageExpunge FlagChange)) b select inbox c store 1 - +flags \deleted d expunge e append inbox {10} +2018-03-26 11:27:45 -0400 Josef 'Jeff' Sipek (c1ca27048) - Which crashed with: Panic: file imap-notify.c: line 397 - (imap_notify_callback): assertion failed: (client->command_queue_size == 0) + lib: Simplify murmurhash3 LP64 vs. IPL32 test vectors -M src/imap/imap-client.c -M src/imap/imap-notify.c -M src/imap/imap-notify.h -2017-06-18 11:19:28 +0300 Timo Sirainen (207b9ed6d) +M src/lib/test-murmurhash3.c - imap: NOTIFY - Fix delayed setting notification callback +2018-03-26 10:34:25 -0400 Josef 'Jeff' Sipek (05808c7ce) - This was done in command-post hook, but then when command was soon freed the - callback was immediately added. + lib: murmurhash3 produces bytes (not uint32_t's) -M src/imap/imap-notify.c -2017-06-19 09:22:56 +0300 Timo Sirainen (d0045d3b8) +M src/lib/murmurhash3.c +M src/lib/test-murmurhash3.c - lib-lda: Fix memory leak in smtp_client_open() +2018-03-28 09:11:55 +0300 Aki Tuomi (0313b5f1d) + lib-http: test-http-client - Only load existing CAs -M src/lib-lda/smtp-client.c + Otherwise the SSL tests do not properly work. -2017-06-16 14:34:24 +0300 Timo Sirainen (b33182d9d) + Fixes Error: HTTP Request failed: Couldn't initialize SSL context: Can't + load CA certs from directory /etc/ssl/certs: error:02001002:system + library:fopen:No such file or directory: fopen('/etc/pki/tls/cert.pem','r'), + error:2006D080:BIO routines:BIO_new_file:no such file, error:0B084002:x509 + certificate routines:X509_load_cert_crl_file:system lib - *-login: Add client_vfuncs.free() that is called when client refcount=0 +M src/lib-http/test-http-client.c - This can be useful for plugins that want to run something after proxying - ends. +2018-03-27 10:31:53 +0300 Aki Tuomi (edbed11e3) - Use an empty default function so plugins can call super.free() without - having to check if it's NULL. + lib-http: test-http-client - Test against missing SAN name -M src/imap-login/imap-login-client.c -M src/imap-urlauth/imap-urlauth-login.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/pop3-login/client.c + Add test to make sure http client validates and ignores missing + subjectAltName in cert, when not validating names. -2017-06-12 22:52:56 +0300 Timo Sirainen (692f109a8) +M src/lib-http/test-http-client.c - *-login: Add client_vfuncs.input_next_cmd() +2018-03-27 10:20:54 +0300 Aki Tuomi (b2bae0783) - This allows plugins to hook into all the pre-login commands. For example - with imap-login most of the commands could already be hooked into, except - for ID and AUTHENTICATE because their parameters reading is handled - specially. This allows hooking into them as well. + lib-ssl-iostream: Do not skip cert name check if invalid cert is allowed - This is actually internal to all the login binaries, so it wouldn't have to - be in login-common. However, login-common already has all the code to handle - overriding functions nicely and this is a rather useful feature for all the - protocols anyway, so it's easier this way and not too ugly. + Caller should be responsible for ignoring this error, not us. All the + locations calling here are dealing this correctly. -M src/imap-login/imap-login-client.c -M src/imap-urlauth/imap-urlauth-login.c -M src/login-common/client-common.h -M src/pop3-login/client.c +M src/lib-ssl-iostream/iostream-openssl.c -2017-06-12 22:51:12 +0300 Timo Sirainen (4d42584d9) +2018-03-27 10:29:49 +0300 Aki Tuomi (9422fd782) - pop3-login: Cleanup - move command handling to pop3_client_input_next_cmd() + lib-ssl-iostream: Fix missing altName handling in openssl_cert_match_name + If name is not found in subjectAltNames, report it as error. -M src/pop3-login/client.c + Fixes Panic: file iostream-openssl-common.c: line 177 + (openssl_cert_match_name): assertion failed: (*reason_r != NULL) -2017-06-12 23:20:12 +0300 Timo Sirainen (d171b133b) +M src/lib-ssl-iostream/iostream-openssl-common.c - imap: Fix pipelining commands with SEARCH +2018-05-23 15:54:53 +0200 Stephan Bosch (8b052f502) - If the SEARCH wasn't a long-running one, it ends with going to sync. The - command state shouldn't then be changed to _WAIT_EXTERNAL. + lib-smtp: server: Fix the enforcement of the maximum DATA command message + size. -M src/imap/imap-search.c + The global setting from the server object was used, rather than the + per-connection setting. The latter is usually the one that is properly set, + while the global server setting is left at zero. For LMTP this meant that + the 40 Mb implicit limit was still in force. -2017-06-14 10:44:36 +0300 Sergey Kitov (a8f6bbf04) +M src/lib-smtp/smtp-server-connection.c - lib-imap: imap_bodystructure_write is changed to skip CRs and LFs. +2018-04-07 01:09:12 +0200 Stephan Bosch (bfd112eb8) + submission: Truly enforce a configurable message size limit (default 40 MB). -M src/lib-imap/imap-bodystructure.c + Before, it was only checking a provided SIZE parameter to the MAIL command + and not the size of the actually submitted message. -2017-06-14 10:44:01 +0300 Sergey Kitov (1618fcbcd) +M src/submission/submission-client.c +M src/submission/submission-settings.c - lib-imap: imap_write_envelope changed to skip CRs and LFs. +2018-04-07 01:08:34 +0200 Stephan Bosch (d5ee437f0) + lmtp: Explicitly disable message size limit enforcement. -M src/lib-imap/imap-envelope.c -2017-06-14 10:41:04 +0300 Sergey Kitov (83986ec38) +M src/lmtp/client.c - lib-imap: added imap_append_nstring_nolf(), which skips CRs and LFs. +2018-04-07 01:08:11 +0200 Stephan Bosch (8f863c4b7) + submission: Actively enforce message size limit while copying message data. -M src/lib-imap/imap-quote.c -M src/lib-imap/imap-quote.h -M src/lib-imap/test-imap-quote.c -2017-06-13 10:05:23 +0300 Sergey Kitov (5ec381a95) +M src/submission/cmd-data.c - lib-imap: escaping and quote/literal tests for imap_append_nstring() +2018-04-07 01:06:13 +0200 Stephan Bosch (0d4842809) + lmtp: Actively enforce message size limit while copying message data. -M src/lib-imap/test-imap-quote.c + This is actually currently not relevant to LMTP, but for future + implementation this code is added here already. -2017-06-13 00:57:08 +0300 Timo Sirainen (f288c579f) +M src/lmtp/commands.c - imapc: Fix prefetching specific headers +2018-04-07 01:05:15 +0200 Stephan Bosch (e34b3445b) - FETCH BODY[HEADER.FIELDS ...] shouldn't be used if imapc_features doesn't - include fetch-headers. Also neither this nor BODY[HEADER] should be sent if - we already have header/body stream. + lib-smtp: server: Implement enforcement of maximum message size. -M src/lib-storage/index/imapc/imapc-mail-fetch.c -2017-06-13 00:55:36 +0300 Timo Sirainen (51937e0b5) +M src/lib-smtp/smtp-server-cmd-data.c +M src/lib-smtp/smtp-server-cmd-helo.c +M src/lib-smtp/smtp-server-cmd-mail.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-private.h +M src/lib-smtp/smtp-server.c +M src/lib-smtp/smtp-server.h - imapc: Avoid sending FETCH BODY[HEADER] when BODY[] is already being fetched +2018-04-07 01:03:58 +0200 Stephan Bosch (61e6108ec) - This probably only shows up in some special situations with plugins. + lib-smtp: command parser: Provide more details in command data size limit + error. -M src/lib-storage/index/imapc/imapc-mail-fetch.c -2017-06-13 18:26:26 +0300 Timo Sirainen (0856f4c70) +M src/lib-smtp/smtp-command-parser.c - lib-oauth2: Handle non-2xx/4xx results for token validation without crash +2018-04-07 01:00:46 +0200 Stephan Bosch (8b684fefc) - Fixes: Panic: file oauth2-token-validate.c: line 33 - (oauth2_token_validate_continue): assertion failed: - (array_is_created(&req->fields)) + configure: Create a definition for UOFF_T_MAX. -M src/lib-oauth2/oauth2-token-validate.c -2017-06-06 12:47:53 +0300 Aki Tuomi (537f12013) +M configure.ac +A m4/uoff_t_max.m4 - lib-oauth2: Make sure fields are always initialized +2018-04-05 00:34:49 +0200 Stephan Bosch (18d4bda11) + lib-smtp: server: Fix error message logged for errors occurring in data + wrapper stream during DATA transfer. -M src/lib-oauth2/oauth2-introspect.c -M src/lib-oauth2/oauth2-refresh.c -M src/lib-oauth2/oauth2-token-validate.c + Used the connection stream rather than the data stream to obtain the error. + Obviously, there is no error on the low-level connection when there is a + data istream (e.g. message size) error. -2017-06-06 12:44:55 +0300 Aki Tuomi (de59864f2) +M src/lib-smtp/smtp-server-cmd-data.c - lib-oauth2: Accept empty responses +2018-05-11 19:26:45 +0200 Stephan Bosch (94d99972a) + lib-smtp: server: DATA command: Restore input handling upon failure. -M src/lib-oauth2/oauth2.c + Fixes command hanging upon failure during data transfer. -2017-06-15 12:46:47 +0300 Timo Sirainen (9924591e1) +M src/lib-smtp/smtp-server-cmd-data.c - imap-login: Fix storing ID NIL values into client_id +2018-03-17 18:00:54 +0100 Stephan Bosch (0d48dd64f) + lib-smtp: client: Increase the default BDAT chunk size. -M src/imap-login/imap-login-client.c + Reduces the number of roundtrips and keeps the TCP window filled better. The + default is now based on the NET_BLOCK_SIZE definition. -2017-06-14 11:47:00 +0300 Timo Sirainen (304630de7) +M src/lib-smtp/smtp-client.h - imap-login: Remove duplicate spaces between ID x-forward parameters +2018-05-22 09:42:00 +0200 Stephan Bosch (1fca10509) + lib: Define NET_BLOCK_SIZE. -M src/imap-login/imap-proxy.c + This defines the default size for data blocks transferred over the network. + It should be large enough to guarantee filling up the TCP window (for + efficiency), while still preventing sending much data while the peer has + already rejected the rest of the transfer. -2017-06-14 10:50:38 +0300 Timo Sirainen (818033fa4) +M src/lib/compat.h - imap-login: Fix crash in ID if trusted client sends NIL value to internal - field +2018-04-27 02:39:10 +0300 Timo Sirainen (4f4c87bc1) - Fixes: Panic: imap-login: file imap-login-client.c: line 215 - (cmd_id_handle_keyvalue): assertion failed: (client_id_str == - !client_id_reserved_word(key)) + lib: Fix returning error from unlink_directory() -M src/imap-login/imap-login-client.c + On non-ENOENT errors it was returning 1 instead of -1. -2017-06-13 22:14:11 +0300 Timo Sirainen (5c92541d8) +M src/lib/unlink-directory.c - lib-index: Fix cache lookups from uncommitted transactions with in-memory - indexes +2018-05-12 12:15:07 +0200 Stephan Bosch (2d207d296) - This especially fixes mail_get_header_stream() with imapc and - imapc_features=fetch-headers, because it works by first fetching the - specific headers and putting them to the cache transaction, then later on - relying on index_mail_get_header_stream() to get them from the transaction. - Before this fix they wouldn't be found, which triggered another unnecessary - FETCH BODY.PEEK[HEADER]. + lmtp: Properly apply the login_greeting setting. -M src/lib-index/mail-cache-transaction.c + It got ignored during migration of lmtp service to lib-smtp. -2017-06-13 21:54:00 +0300 Timo Sirainen (d8c688a98) +M src/lmtp/client.c - lib-mail: istream-header-filter - Fix HEADER_FILTER_ADD_MISSING_EOH with - empty input +2018-05-12 12:27:37 +0200 Stephan Bosch (49d5b83a1) - The result for "" should be "\n", not "\n\n". The second "\n" would belong - to the mail body. + lmtp: proxy: Add support for making proxy client rawlogs using the + lmtp_proxy_rawlog_dir setting. - This fixes calculating hashes for incremental dsync when mail didn't have - Date or Message-ID headers, resulting in e.g.: - Warning: Deleting mailbox 'INBOX': UID=1 already exists locally for a - different mail: Headers hashes don't match (e1c06d85ae7b8b032bef47e42e4c08f9 - vs 68b329da9893e34099c7d8ad5cb9c940) +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-settings.c +M src/lmtp/lmtp-settings.h -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c +2018-05-12 12:18:27 +0200 Stephan Bosch (915792e6d) -2017-06-14 03:21:19 +0300 Timo Sirainen (ffc731866) + lmtp: Add support for making server rawlogs using the lmtp_rawlog_dir + setting. - lib: istream-seekable - Fix reading when parent stream's content is larger - than max_buffer_size - When writing the parent stream to fd and trying to read it back, it would - try to enforce the max_buffer_size and fail with: +M src/lmtp/client.c +M src/lmtp/lmtp-settings.c +M src/lmtp/lmtp-settings.h - istream-seekable: Couldn't read back in-memory input ...: buffer full +2018-04-12 13:19:02 +0300 Aki Tuomi (bad6d9e6c) - But since the data was already in buffer, istream-seekable shouldn't try to - enforce it at this point anymore. + lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage -M src/lib/istream-seekable.c + Fixes compiler nit on clang -2017-06-12 23:45:05 +0300 Timo Sirainen (ca42174e6) +M src/lib-ssl-iostream/iostream-openssl-context.c - push-notification: Switch to main ioloop while calling drivers' commit - callbacks +2018-03-20 12:21:33 +0200 Kadlecsik József (5231b55f3) - There aren't any guarantees what ioloop happens to be active at the time the - commit is called. The active ioloop can also be destroyed early on, which - can cause an I/O leak and crashes later on. + lib-ssl-iostream: Fix openssl compatibility issue introduced in OpenSSL + 1.0.2f -M src/plugins/push-notification/push-notification-plugin.c + Fixes dovecot: imap-login: Debug: SSL error: SSL_read() failed: + error:140E0197:SSL routines:SSL_shutdown:shutdown while in init -2017-06-09 18:10:14 +0300 Timo Sirainen (9308ca615) +M src/lib-ssl-iostream/iostream-openssl.c - mail-crypt-acl: Fix assert-crash due to missing namespace initialization +2018-05-26 13:12:26 +0200 Stephan Bosch (c130ab7a6) - This was broken by e031d9aaae59a9f79710dc1138b76b69272615a3. + lda: Allow -f sender to omit domain. -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c + Several people complained about the original enforcement of the presence of + a domain (added for v2.3.0) to be too restrictive. Apparently, this + legitimately happens with bounce messages on certain platforms. -2017-05-23 14:12:49 +0300 Josef 'Jeff' Sipek (7f3ca7e66) +M src/lda/main.c - pop3: send back auth reply sooner +2018-05-24 01:32:40 +0300 Timo Sirainen (49544d7bb) - If possible (i.e., pop3_lock_session=no), we can send back the OK response - earlier. + cassandra: Fix empty binary parameters with prepared statements -M src/pop3/main.c + Fixes: Panic: Trying to allocate 0 bytes -2017-05-23 13:01:48 +0300 Josef 'Jeff' Sipek (9a0842411) +M src/lib-sql/driver-cassandra.c - pop3: initialize namespaces explicitly +2018-05-22 16:06:15 +0300 Timo Sirainen (7f198c367) - (instead of relying on mail user initialization to instantiate them for us) + fs-posix: Support FS_METADATA_WRITE_FNAME for fs_copy() -M src/pop3/main.c -M src/pop3/pop3-client.c -2017-05-19 10:58:18 +0300 Josef 'Jeff' Sipek (3172b0647) +M src/lib-fs/fs-posix.c +M src/lib-fs/test-fs-posix.c - pop3: client_create_from_input shouldn't process input +2018-05-22 10:59:11 +0300 Timo Sirainen (3596d2753) - This makes the pop3 code resemble the imap code more. Making the subsequent - changes easier. + man: doveadm-mailbox.1.in - Fix doveadm-search-query(7) section -M src/pop3/main.c -2017-05-19 10:51:22 +0300 Josef 'Jeff' Sipek (848ca852a) +M doc/man/doveadm-mailbox.1.in - pop3: client_create_from_input should return the client struct +2018-05-14 15:46:01 +0300 Timo Sirainen (fdf0ed9ca) - This makes the code more similar to imap's, making subsequent changes - easier. + fs-posix: Fix fs_iter_next() to return any kinds of files. -M src/pop3/main.c + Only regular files and symlinks were returned. It should return everything + else as well (fifos, sockets, devices). -2017-05-19 10:46:05 +0300 Josef 'Jeff' Sipek (914c9cb23) +M src/lib-fs/fs-posix.c - pop3: rename login_client_connected() client arg to login_client +2018-05-17 16:29:28 +0300 Timo Sirainen (685606282) - This makes the next commit cleaner. + cassandra: Fix consistency=quorum to work -M src/pop3/main.c + Previously it could have been used by setting "consistency=", but this was + an accident. -2017-05-19 10:42:03 +0300 Josef 'Jeff' Sipek (2e2048d87) +M src/lib-sql/driver-cassandra.c - pop3: move pop3 session locking out of client_create +2018-05-03 17:06:04 +0300 Timo Sirainen (bbe09dffc) - As a result, we can directly return the client structure (instead of passing - it back via a _r arg). + cassandra: Use fallback_consistency on more types of errors - This makes the pop3 client_create look more like the imap version. + This could allow for example read_consistency=local-quorum with + read_fallback_consistency=quorum, so most of the time the reads are from + local datacenter, but in case it has problems you can switch to other + datacenters. -M src/pop3/main.c -M src/pop3/pop3-client.c -M src/pop3/pop3-client.h +M src/lib-sql/driver-cassandra.c -2017-05-30 16:57:45 +0300 Timo Sirainen (e9799f25f) +2018-05-03 16:58:21 +0300 Timo Sirainen (313b5f5c5) - auth: Don't lose all forward_ fields if the first passdb lookup fails. + cassandra: Cleanup - Move code to query_error_want_fallback() + This allows extending it more easily. -M src/auth/auth-request.c +M src/lib-sql/driver-cassandra.c -2017-05-24 20:19:11 +0200 Stephan Bosch (6266ce1d9) +2018-05-15 17:50:27 +0300 Timo Sirainen (b6c7cd53e) - lib-http: client: Only drop queued requests when a DNS lookup fails; not - also the ones that are already in progress. + fs-posix: Strip trailing "/" from filenames + This is mainly because "doveadm fs delete -R" adds it to indicate to the + fs-driver that the whole directory is wanted to be deleted. This change + fixes fs-posix to work with NFS, where otherwise unlink("symlink-to-dir/") + fails with ENOTDIR. Without NFS the same call succeeds. -M src/lib-http/http-client-host.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c +M src/lib-fs/fs-posix.c -2017-05-24 21:59:32 +0200 Stephan Bosch (4d1487138) +2018-04-08 11:28:19 +0200 Stephan Bosch (9dbc51e77) - lib-http: client: When a request is destroyed prematurely during payload - input, consider the payload stream destroyed and act accordingly. + lda: Allow empty envelope sender. - The application may hold a reference to the payload stream still, and it may - be difficult to prevent that. This causes lib-http to keep waiting for the - payload to be destroyed. When nothing else is going on, the current ioloop - may then become empty, which caused the familiar assert failure. + Fix by Martin Waschbüsch. -M src/lib-http/http-client-connection.c +M src/lda/main.c -2017-05-24 19:08:43 +0200 Stephan Bosch (9dc6c1c26) +2018-04-08 11:19:18 +0200 Stephan Bosch (2a23e1dcc) - lib-http: client: Explicitly destroy the response payload timeout stream - when the request is destroyed while receiving payload. + lda: Reformatted main.c. - This way, the timeout is stopped. This caused ioloop panics. -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-request.c +M src/lda/main.c -2017-05-30 18:25:50 +0300 Timo Sirainen (3c93c5e73) +2018-04-23 18:15:51 -0400 Josef 'Jeff' Sipek (f505ba280) - lib-storage: Fix crash in mail_get_header_stream() when its previous stream - wasn't at EOF + mdbox: Assume that empty uid maps found during sync are harmless - At least this could have happened when indexes were disabled and running: + Instead of failing the sync and causing index rebuild, just skip over the + empty uid maps. Chances are that they these records came from various + plugins that create fake mails. - FETCH 1 (envelope body.peek[header.fields (foo)] bodystructure) +M src/lib-storage/index/dbox-multi/mdbox-sync.c - Fixes: Panic: file index-mail-headers.c: line 198 - (index_mail_parse_header_init): assertion failed: - (!mail->data.header_parser_initialized) +2018-04-13 13:33:56 +0300 Timo Sirainen (ced066a3a) -M src/lib-storage/index/index-mail-headers.c + po3pc: Handle unexpected server disconnections without assert-crash -2017-05-31 14:32:30 +0300 Sergey Kitov (e05d395ef) + Fixes: Panic: file pop3c-client.c: line 308 (pop3c_client_wait_one): + assertion failed: (client->fd != -1 || client->state == + POP3C_CLIENT_STATE_CONNECTING) - quota: assertion for *args != NULL is added in order to avoid warning from - static analyzer and *args[0] changed to (*args)[0] +M src/lib-storage/index/pop3c/pop3c-client.c +2018-03-29 14:24:11 -0400 Timo Sirainen (08e32bfc8) -M src/plugins/quota/quota.c + fs-posix: Fix iterating nonexistent symlinks when readdir() returns + DT_UNKNOWN -2017-05-24 18:27:10 +0300 Timo Sirainen (d4f652415) + This especially broke "doveadm fs delete -R" when the symlink destination + was deleted before the symlink. - quota: Fix infinite loop when parsing quota parameters +M src/lib-fs/fs-posix.c - Broken by previous quota changes. +2018-04-26 09:48:39 +0300 Sergey Kitov (d51c4d527) -M src/plugins/quota/quota.c + plugins/old-stats: Remove restrict_access_set_dumpable calls from + process_io_open(). -2017-05-19 11:00:22 +0300 Sergey Kitov (4ec11b4ac) + proc_io_fd is opened in preinit(), while process have root access, so + restrict_access_set_dumpable() calls are not needed. - Whitespace cleanup +M src/plugins/old-stats/mail-stats-fill.c +2018-04-18 13:30:50 +0300 Sergey Kitov (7c5a38b48) -M src/plugins/quota/quota-fs.c -M src/plugins/quota/quota-imapc.c -M src/plugins/quota/quota.c + lib: Call module's preinit function, when loading -2017-05-19 10:58:52 +0300 Sergey Kitov (39dd49027) - Dict backend parameters reading changed to use common parsing function +M src/lib/module-dir.c +2018-03-09 15:17:29 +0200 Sergey Kitov (9cacf5506) -M src/plugins/quota/quota-dict.c + plugins/old-stats: Add old-stats preinit() which opens mail stats io. -2017-05-19 10:57:02 +0300 Sergey Kitov (842aac4be) - fs backend parameter parsing changed to use common function +M src/plugins/old-stats/mail-stats-fill.c +M src/plugins/old-stats/mail-stats.h +M src/plugins/old-stats/stats-plugin.c +M src/plugins/old-stats/stats-plugin.h +2018-04-26 19:38:55 +0300 Timo Sirainen (b7a6241ca) -M src/plugins/quota/quota-fs.c + lib-fs: fs-posix - Add accurate-mtime parameter -2017-05-19 10:52:46 +0300 Sergey Kitov (1950f4f5e) + This is mainly useful for testing to find out whether one file was created + after another. - imapc backend parameter parsing changed to use common function +M src/lib-fs/fs-posix.c +2018-04-26 18:23:54 +0300 Timo Sirainen (2c0c4ca00) -M src/plugins/quota/quota-imapc.c + lib-fs: Update FS_METADATA_WRITE_FNAME comment -2017-05-19 10:49:01 +0300 Sergey Kitov (d5c67b0dc) - maildir backend parameter parsing changed to use common function +M src/lib-fs/fs-api.h +2018-04-26 18:14:27 +0300 Timo Sirainen (4c36f8fa9) -M src/plugins/quota/quota-maildir.c + lib-fs: fs-posix - FS_METADATA_WRITE_FNAME replaces the full path -2017-05-19 10:46:27 +0300 Sergey Kitov (70d781975) + This is how all the other fs drivers work, although the macro name is a bit + confusing. - quota root default init changed to use common param parse function +M src/lib-fs/fs-posix.c +M src/lib-fs/test-fs-posix.c +2018-04-26 18:14:46 +0300 Timo Sirainen (ee71a8109) -M src/plugins/quota/quota.c + lib-fs: fs-metawrap - Pass FS_METADATA_WRITE_FNAME through to parent fs -2017-05-18 13:30:25 +0300 Sergey Kitov (26327908c) + fs-metawrap in the middle pervented the renaming from working. - common quota parameter parsing function implemented +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-test.c +M src/lib-fs/test-fs-metawrap.c +2018-04-26 16:42:40 +0300 Timo Sirainen (749288665) -M src/plugins/quota/quota.c -M src/plugins/quota/quota.h + lib-storage: Remove mail_attachment_detection_options=add-flags-on-fetch + parsing -2017-06-07 19:54:10 +0300 Timo Sirainen (14d91e815) + It wasn't actually used yet. - lib-storage: test-mail-search-args-simplify - test with initialized args +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h +2018-04-26 16:41:55 +0300 Timo Sirainen (5e8fa3b90) -M src/lib-storage/test-mail-search-args-simplify.c + lib-storage: Fail if mail_attachment_detection_options has invalid options -2017-06-07 19:53:00 +0300 Timo Sirainen (ea05270b2) - lib-storage: mail_search_args_simplify() - Fix merging already-initialized - keywords +M src/lib-storage/mail-storage-settings.c - It was deinitializing the arg that was kept instead of the one being - removed. +2018-04-19 16:38:22 +0300 Timo Sirainen (798fe5eb1) -M src/lib-storage/mail-search-args-simplify.c + lib-storage: Set $Has[No]Attachment earlier among other cached data -2017-06-07 19:37:46 +0300 Timo Sirainen (c218bc42f) - lib-storage: Fix mail_search_args_simplify() to not deinit too many args +M src/lib-storage/index/index-mail.c +M src/lib-storage/mail-storage.c - Removing an arg should deinit it, but not its following siblings. +2018-04-29 12:31:23 +0300 Timo Sirainen (cc6d5085a) -M src/lib-storage/mail-search-args-simplify.c + lib-index: mail_index_sync_map() - Don't try to-resync extension updates -2017-06-07 19:36:19 +0300 Timo Sirainen (e97834675) + This was done to call extension record sync handlers, but the previous + commit removes them. Fixes a problem where obsolete cache offsets were used + in some situations: + + - Some cache updates are from external transactions and some are from + non-external transactions. This is because cache offset updates are being + added by whatever the parent index transaction is. + + - When mail_index_sync_map() is mapping MAIL_INDEX_SYNC_HANDLER_FILE, it + has already synced the map. But it's calling mail_index_sync_record() for + non-external transactions to call expunge handlers and extension update + handlers. It's calling the regular mail_index_sync_record() to do this work. + + - But mail_index_sync_record() is actually still updating the map. So now + mail_index_sync_record() is called for all non-external cache updates, but + not for external cache updates! And since these are somewhat randomly either + external or non-external, the end result is that the cache offset may be + obsolete. - lib-storage: Add mail_search_arg_one_deinit() +M src/lib-index/mail-index-sync-update.c +2018-04-29 12:23:49 +0300 Timo Sirainen (273054cb0) -M src/lib-storage/mail-search.c -M src/lib-storage/mail-search.h + lib-index: Remove extension record sync handlers -2017-06-14 02:15:34 +0300 Timo Sirainen (1d54f0db7) + This is no longer used by anything, and it makes the fix in the following + commit much easier. - quota-clone: Fix compile warning + This was originally added in 6a19e109ee8c5a6f688da83a86a7f6abeb71abdd to + allow dovecot.index.cache updating to hook into updating cache offsets to + link cache records together. This was reimplemented in a different way in + 131b073bdc3650083b00616dc778dd3017c2bbb5 +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index.c -M src/plugins/quota-clone/quota-clone-plugin.c +2018-04-25 15:23:35 +0300 Timo Sirainen (3246adaba) -2017-06-12 12:44:37 +0300 Timo Sirainen (f5870a09b) + lib: uni_utf8_get_valid_data() - Add ATTR_WARN_UNUSED_RESULT - welcome: Fix sending parameters to welcome script. + Ignoring the return value most likely leads to buggy code, so make sure it's + checked. - Broken by f38b0dafbffa9d79542e36b4b3e598ed4115e5a3 +M src/lib/unichar.h -M src/plugins/welcome/welcome-plugin.c +2018-04-25 15:22:37 +0300 Timo Sirainen (fac3484be) -2017-06-12 14:24:59 +0300 Timo Sirainen (53a377bc6) + lib-storage: Don't ignore uni_utf8_get_valid_data() return value - pop3-migration: Strip trailing spaces from headers when calculating hash + It's not supposed to happen, so call i_unreached() - Fixes matching mails with Zimbra. +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-maildir-iter.c -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/pop3-migration/test-pop3-migration-plugin.c +2018-04-25 15:20:58 +0300 Timo Sirainen (a3503eb62) -2017-06-12 14:35:22 +0300 Timo Sirainen (70cca5798) + lib-fts: Minor fix to randomness test in test-fts-tokenizer - imapc: If mailbox iteration fails, make sure error message isn't lost. + If the random input was entirely valid UTF-8, the input was truncated to + empty. +M src/lib-fts/test-fts-tokenizer.c -M src/lib-storage/index/imapc/imapc-list.c +2018-04-25 15:17:53 +0300 Timo Sirainen (9521a4e87) -2017-06-12 14:33:46 +0300 Timo Sirainen (4cfc234bc) + fts: Fix indexing input that contains NULs - lib-storage: Fail mailbox list iteration early if it fails to get INBOX - flags + Any message_block that contained NULs, but otherwise was valid UTF-8, was + simply dropped. - The resulting INBOX reply could be wrong in that case. +M src/plugins/fts/fts-parser.c - Also with imapc if the remote server is down, this causes two connection - errors instead of just one. +2018-04-12 14:27:50 +0300 Timo Sirainen (9002dc87f) -M src/lib-storage/list/mailbox-list-iter.c + lib-smtp: Fix empty address parsing -2017-06-12 14:16:13 +0300 Timo Sirainen (de8bdfb22) + sret wasn't initialized, which could have randomly caused "Path only + consists of source route" error with empty addresses. Broken by + 81c8955e3d1475c6ab1892b1d3edf91126683fda - lib-storage: If mailbox list iteration fails, don't add INBOX +M src/lib-smtp/smtp-address.c - It possibly should have been returned by the list iteration itself and we - could be returning it wrong here. +2018-04-08 15:53:37 +0200 Stephan Bosch (7bad32c8a) - Also calling this causes imapc to lost the error message in mailbox_list. + submission: Add workarounds for well-known MAIL and RCPT command syntax + deviations. -M src/lib-storage/list/mailbox-list-iter.c + This adds a new `submission_client_workarounds' setting that works analogous + to the `imap_client_workarounds' setting. -2017-06-12 12:18:28 +0300 Timo Sirainen (f8cd28e86) + Workarounds: - imapc: Don't reconnect on DELETE if auth failure was already seen. + - whitespace-before-path: Allow one or more spaces or tabs between `MAIL + FROM:' + and path and between `RCPT TO:' and path. + - mailbox-for-path: Allow using bare Mailbox syntax (i.e., without + <...>) + instead of full path syntax. +M doc/example-config/conf.d/20-submission.conf +M src/submission/submission-client.c +M src/submission/submission-settings.c +M src/submission/submission-settings.h -M src/lib-storage/index/imapc/imapc-list.c +2018-04-08 15:03:00 +0200 Stephan Bosch (921cd33c6) -2017-06-12 12:16:19 +0300 Timo Sirainen (e157d2a2a) + lib-smtp: test-smtp-server-errors: Add tests for RCPT command workarounds. - imapc: Don't reconnect on STATUS if auth failure was already seen. +M src/lib-smtp/test-smtp-server-errors.c -M src/lib-storage/index/imapc/imapc-storage.c +2018-04-08 14:59:17 +0200 Stephan Bosch (1efbd1289) -2017-06-12 11:57:52 +0300 Timo Sirainen (78afd5b38) + lib-smtp: test-smtp-server-errors: Add tests for MAIL command workarounds. - imapc: Remove root_sep_lookup_failed cache - The auth_failed_* should already be enough for this. This removal also fixes - the storage error message to be auth_failed_reason when possible. +M src/lib-smtp/test-smtp-server-errors.c -M src/lib-storage/index/imapc/imapc-list.c +2018-04-08 14:40:12 +0200 Stephan Bosch (a425b5f82) -2017-06-12 12:07:52 +0300 Timo Sirainen (67a01e6b3) + lib-smtp: test-smtp-server-errors: Add tests for bad RCPT command syntax. - imapc: Check for auth failures when saving messages - First, don't even attempt an APPEND if we've already seen an auth failure. - Second, if APPEND does fail because of auth error, set the correct error to - storage. +M src/lib-smtp/test-smtp-server-errors.c -M src/lib-storage/index/imapc/imapc-save.c +2018-04-08 14:07:50 +0200 Stephan Bosch (479d716f2) -2017-06-12 12:03:39 +0300 Timo Sirainen (5dc62de01) + lib-smtp: test-smtp-server-errors: Add tests for bad MAIL command syntax. - imapc: Fix APPEND error message to include APPEND, not COPY +M src/lib-smtp/test-smtp-server-errors.c -M src/lib-storage/index/imapc/imapc-save.c +2018-04-08 15:31:37 +0200 Stephan Bosch (044a32cef) -2017-06-12 11:40:03 +0300 Timo Sirainen (92ca4065a) + lib-smtp: test-smtp-server-errors: Implicitly stop server when all expected + client connections are closed. - imapc: Make sure storage error has the proper auth failure error string - The first failed command always had the correct error string, but the - following failed commands just returned -1 without updating storage error. - The storage error could have been something completely different by then. +M src/lib-smtp/test-smtp-server-errors.c -M src/lib-storage/index/imapc/imapc-storage.c +2018-04-08 15:28:59 +0200 Stephan Bosch (cc1252b84) -2017-06-12 11:33:38 +0300 Timo Sirainen (767e8356e) + lib-smtp: test-smtp-server-errors: Add more debug messages for the server. - imapc: Cleanup - Rename auth_error to auth_failed_reason for consistency +M src/lib-smtp/test-smtp-server-errors.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h +2018-04-08 15:20:22 +0200 Stephan Bosch (a936583f5) -2017-06-12 11:32:23 +0300 Timo Sirainen (b13934850) + lib-smtp: test-smtp-server-errors: Make detection of early termination of + child processes part of each test. - imapc: Change auth_failed boolean to more specific auth_failed_state - Since we now rely on auth_failed_state being initialized to zero, explicitly - set IMAPC_COMMAND_STATE_OK to be defined as 0. +M src/lib-smtp/test-smtp-server-errors.c -M src/lib-imap-client/imapc-client.h -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h +2018-04-08 15:24:02 +0200 Stephan Bosch (d45a77f39) -2017-06-12 11:05:31 +0300 Timo Sirainen (5ce94fd6d) + lib-smtp: test-smtp-server-errors: Add log prefixes for client and server. - imapc: Remove auth_failed check from imapc_list_get_storage_name() + Makes it easier to distinguish which process is sending a log message while + debugging. - Reverts 9949dc3649ac7a00289f6bf0662c793bee3d4286. It doesn't seem to be - actually needed at least now, and it's breaking: +M src/lib-smtp/test-smtp-server-errors.c - * SELECT INBOX -> failure due to remote server being down - * SELECT INBOX -> NO [CANNOT] Invalid mailbox name: Name is empty +2018-04-08 15:16:05 +0200 Stephan Bosch (adfadd207) -M src/lib-storage/index/imapc/imapc-list.c + lib-smtp: test-smtp-server-errors: Add support for client-side connection + context data. -2017-06-08 20:34:39 +0300 Timo Sirainen (c044686c1) - imap-quota: If quota lookups fail, return NO for GETQUOTA/GETQUOTAROOT +M src/lib-smtp/test-smtp-server-errors.c +2018-04-10 03:12:41 +0200 Stephan Bosch (4cb2b08f8) -M src/plugins/imap-quota/imap-quota-plugin.c + lib-smtp: test-smtp-server-errors: Use o_stream_nsend*() rather than + o_stream_send*(). -2017-06-08 20:34:27 +0300 Timo Sirainen (701279638) + The result is not checked anyway. - quota: Update comments in quota.h +M src/lib-smtp/test-smtp-server-errors.c +2018-04-08 12:25:49 +0200 Stephan Bosch (78101f0b4) -M src/plugins/quota/quota.h + lib-smtp: server: Add workarounds for well-known MAIL and RCPT command + syntax deviations. -2017-06-08 20:25:11 +0300 Timo Sirainen (f0a71cb27) - quota: quota_root_iter_next() - Iterate all visible roots +M src/lib-smtp/smtp-server-cmd-mail.c +M src/lib-smtp/smtp-server-cmd-rcpt.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server.c +M src/lib-smtp/smtp-server.h - Don't try to skip the roots that don't have an active quota. imap_quota - plugin does the skipping now itself, and quota_clone shouldn't really be - even used with more than one quota root. +2018-04-08 12:13:16 +0200 Stephan Bosch (0f73d2443) -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota.c + lib-smtp: address parser: Do not allow source route for path with omitted + brackets. -2017-06-08 20:24:26 +0300 Timo Sirainen (27456d2cb) + Parse it strictly as a Mailbox, which makes more sense. - imap-quota: If quota root doesn't have any quotas, don't send empty QUOTA - reply +M src/lib-smtp/smtp-address.c +M src/lib-smtp/test-smtp-address.c - For example if GETQUOTA is asked for fs quota, but the user doesn't have fs - quota enabled. +2018-04-14 02:05:51 +0200 Stephan Bosch (2f86f050a) -M src/plugins/imap-quota/imap-quota-plugin.c + lib: Implement str_sanitize_utf8(). -2017-06-08 20:29:05 +0300 Timo Sirainen (81d10aff2) + Unlike str_sanitize(), this function truncates strings based on a UTF8 code + point limit rather than a maximum size in bytes. Also, the Unicode + replacement character is used to mark invalid/control characters and an + ellipsis character is used to indicate the string truncation. For the normal + str_sanitize() this is done using a question mark and triple dots + respectively. - quota-clone: Don't clone quota resources that aren't enabled. +M src/lib/str-sanitize.c +M src/lib/str-sanitize.h +M src/lib/test-str-sanitize.c - They would always just be zeros anyway, so this makes the update slightly - more efficient. Although practically this only matters with dirsize and fs - quotas, which people generally don't use with quota_clone. +2018-04-17 21:31:38 +0200 Stephan Bosch (bfc72f9d2) -M src/plugins/quota-clone/quota-clone-plugin.c + lib: unichar: Add Horizontal Ellipsis character. -2017-06-08 20:39:47 +0300 Timo Sirainen (b2dd04899) - lib-imap-client: Fix hang when imapc_client_get_capabilities() is called - without connection +M src/lib/unichar.h +2018-04-26 13:18:01 +0300 Martti Rannanjärvi (ed33a45fd) -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/test-imapc-client.c + .gitignore: Ignore doc/man/doveadm-rebuild.1 -2017-06-07 18:10:10 +0300 Timo Sirainen (a6a68d990) - lib-mail: message_address_parse() - Fix fill_missing==TRUE handling +M .gitignore - Mainly MISSING_DOMAIN wasn't set in all situations. Also added unit tests. +2018-04-12 14:09:10 +0300 Aki Tuomi (63f60a620) -M src/lib-mail/message-address.c -M src/lib-mail/test-message-address.c + doveadm: Add rebuild attachments command -2017-06-07 15:33:42 +0300 Timo Sirainen (e51455e76) + Goes thru given mails and resets the attachment indicator. - lib-mail: message_address_parse() - Handle invalid standalone phrases better +M doc/man/Makefile.am +A doc/man/doveadm-rebuild.1.in +M src/doveadm/Makefile.am +A src/doveadm/doveadm-mail-rebuild.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h - We'll treat "local-part" (without quotes) as a mailbox even without - @domain, but if it continues with anything or if it's a quoted-string, we'll - treat it as a display-name instead. +2018-04-12 14:07:54 +0300 Aki Tuomi (5a5cd70a8) - This is probably better than just converting everything to display-name, - since there are likely to exist headers like "To: localuser" + lib-storage: Parse mail parts in mail_set_attachment_keywords if not present -M src/lib-mail/message-address.c -M src/lib-mail/test-message-address.c -2017-06-07 15:22:22 +0300 Timo Sirainen (585eeb5d7) +M src/lib-storage/mail.c - lib-mail: Improve test-message-address to test invalid addresses in lists +2018-04-19 10:19:15 +0300 Aki Tuomi (86e5047a0) - Test in both a group and list of addresses. + lib-storage: Add error reporting to mail_set_attachment_keywords -M src/lib-mail/test-message-address.c -2017-06-07 15:21:10 +0300 Timo Sirainen (4be38dbed) +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail.c - lib-mail: message_address_parse() - don't stop at <> when parsing address - lists +2018-04-25 11:04:08 +0300 Aki Tuomi (093c2bd2a) - And similarly don't stop at <@domain> + doveadm: mailbox cache decisions - Fatally fail if fields are missing -M src/lib-mail/message-address.c -2017-06-07 15:08:27 +0300 Timo Sirainen (49c13c7cc) +M src/doveadm/doveadm-mail-mailbox-cache.c - lib-mail: message_address_parse() - don't stop at invalid addresses when - parsing group +2018-04-25 10:56:04 +0300 Aki Tuomi (69072fe4b) - Also the end-group's message_address shouldn't have invalid_syntax=TRUE, - except when we didn't actually find the ending ';' + man: Document doveadm mailbox cache commands -M src/lib-mail/message-address.c -2017-06-07 14:57:12 +0300 Timo Sirainen (2e9153d5d) +M doc/man/doveadm-mailbox.1.in - lib-mail: message_address_parse() - Fix reading out-of-bounds read on - invalid input +2018-04-13 13:28:47 +0300 Aki Tuomi (3fd124cb7) + doveadm: Add mailbox cache manipulation commands -M src/lib-mail/message-address.c -M src/lib-mail/test-message-address.c + This allows changing cache decisions and dropping cache pointer for wanted + mails. -2017-06-07 13:34:39 +0300 Timo Sirainen (a646e69ca) +M src/doveadm/Makefile.am +A src/doveadm/doveadm-mail-mailbox-cache.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h - lib-mail: message_address_parse() - Remove unnecessary NULL checks +2018-04-14 14:31:44 +0300 Aki Tuomi (8be73775b) - message_address_parse() always initialized rfc822_parser_init() with - last_comment string. + doveadm-mail: Handle field conversion to short opt better -M src/lib-mail/message-address.c + Convert non-string types as well -2017-06-07 13:19:40 +0300 Timo Sirainen (7b7f965c4) +M src/doveadm/doveadm-mail.c - lib-mail: test-message-address - add more and better organized tests +2018-04-24 18:50:38 +0300 Timo Sirainen (424ffa182) + dsync: If lock file can't be created because home is missing, mkdir the home -M src/lib-mail/test-message-address.c -2017-06-07 12:58:21 +0300 Timo Sirainen (8a1087fd6) +M src/doveadm/dsync/dsync-brain.c - lib-mail: message_address_parse() - Add INVALID_ROUTE/SYNTAX_ERROR only if - fill_missing==TRUE +2018-04-24 18:47:28 +0300 Timo Sirainen (320168246) - This allows message_address_write() to write the parsed invalid address in a - way that at least somewhat resembles the original input. + lib-storage: Add mail_user_home_mkdir() -M src/lib-mail/message-address.c -M src/lib-mail/test-message-address.c -2017-06-07 12:42:28 +0300 Timo Sirainen (a933364cd) +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h - lib-mail: message_address_write() - Write empy username as "" +2018-04-12 16:13:08 +0200 Stephan Bosch (5f5b5097e) - We can't output <@domain> because that conflicts with the <@route:...> - syntax. Also ""@domain seems to be a valid address. + lib-mail: message-address: Make the parser allow paths that omit `<' and + `>'. + + This is a syntax violation, but we allow it to account for a rather wide + selection of software that does not follow the standards. M src/lib-mail/message-address.c M src/lib-mail/test-message-address.c -2017-06-07 12:37:09 +0300 Timo Sirainen (175de9ec7) +2018-04-12 21:27:32 +0200 Stephan Bosch (206660e59) - lib-mail: message_address_write() - Always write as output + lib-mail: message-address: Make parser properly reject paths with spurious + trailing characters. - This is the standard format nowadays, so don't convert into - plain user@domain. M src/lib-mail/message-address.c M src/lib-mail/test-message-address.c -2017-06-07 12:35:35 +0300 Timo Sirainen (880012f92) +2018-04-12 22:16:54 +0200 Stephan Bosch (2f25c1390) - lib-mail: message_address_write() - Don't write empty <> + lib-mail: message-address: Make sure incomplete paths are rejected by + parser. M src/lib-mail/message-address.c M src/lib-mail/test-message-address.c -2017-06-07 12:34:17 +0300 Timo Sirainen (258c8f29b) +2018-04-12 21:59:40 +0200 Stephan Bosch (48470164f) - lib-mail: message_address_write() - Don't add '@' if domain is missing + lib-mail: message-address: Require paths with an invalid source route to + have at least a proper `:'. + Otherwise, the parser would allow a bare domain. M src/lib-mail/message-address.c M src/lib-mail/test-message-address.c -2017-06-07 12:33:10 +0300 Timo Sirainen (5e0e04969) +2018-04-12 20:29:36 +0200 Stephan Bosch (9684507e8) - lib-mail: test-message-address - Test also writing invalid addresses + lib-mail: message-address: Properly deinit RFC822 parser in + message_address_parse_path(). -M src/lib-mail/test-message-address.c +M src/lib-mail/message-address.c -2017-06-07 12:01:07 +0300 Timo Sirainen (fe4928cf2) +2018-04-12 20:54:50 +0200 Stephan Bosch (55fd5fe1f) - lib-mail: test-message-address cleanup + lib-mail: test-message-address: Add test for parsing empty path. - Merge input and output into the same struct to make it clearer. M src/lib-mail/test-message-address.c -2016-06-07 03:41:18 +0300 Timo Sirainen (3f0b3012a) +2018-04-12 23:01:03 +0200 Stephan Bosch (2e1682d44) - -Wstrict-bool warning fixes + lib-mail: test-message-address: Use i_memdup() rather than explicit + malloc(), memcpy(). -M src/lib-fs/fs-randomfail.c -M src/lib-mail/message-address.c -M src/lib/ioloop-epoll.c -M src/lib/ioloop-poll.c +M src/lib-mail/test-message-address.c -2016-06-06 17:10:12 +0300 Timo Sirainen (f088f5188) +2018-04-12 22:58:16 +0200 Stephan Bosch (ee1e41607) - lib-mail: Fixed to 91fdb25b5 + lib: Added i_memdup(). - Caused by my manual edits to avoid the -Wstrict-bool warnings. -M src/lib-mail/message-address.c +M src/lib/imem.c +M src/lib/imem.h -2016-06-05 15:48:20 +0200 Pali Rohár (82bc726ff) +2018-04-16 14:01:37 +0300 Timo Sirainen (f26570f17) - lib-mail: Update tests for message address + lib-master: Add log_core_filter setting to core dump on matching filter -M src/lib-mail/test-message-address.c +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-settings.h -2016-06-05 15:48:19 +0200 Pali Rohár (3e209e9d3) +2018-04-16 14:00:51 +0300 Timo Sirainen (edddfbd94) - lib-mail: message_address_write: Quote and escape strings if needed + lib: Add global core filter, which allows core dumping on matching events - ATEXT characters must be properly quoted when are in phrase. - Test case: +M src/lib/event-log.c +M src/lib/event-log.h - { name = "test\"test", mailbox = "user", domain = "host" } +2018-04-16 13:48:38 +0300 Timo Sirainen (8bb5f946c) - converts to: + lib: Add log types as event categories - "test\"test" + This allows using debug, info, warning, error, fatal and panic as + categories. -M src/lib-mail/message-address.c +M src/lib-master/stats-client.c +M src/lib/event-filter.c +M src/lib/event-filter.h +M src/lib/event-log.c +M src/stats/client-writer.c +M src/stats/stats-metrics.c +M src/stats/stats-metrics.h -2016-06-05 15:48:18 +0200 Pali Rohár (7e9b80a01) +2018-04-16 13:39:17 +0300 Timo Sirainen (15e4f2b2b) - lib-mail: parse_mailbox: Set display name instead mailbox when parsing - failed + lib-master, stats: Send event's log_type to stats process - It does not make sense to set mailbox without domain on incorrect input. - Rather set display name which is more likely useable value. + This makes the internal stats protocol incompatible with the previous + version, so major protocol version is increased. - Test case: +M src/lib-master/stats-client.c +M src/stats/client-writer.c - test +2018-04-16 13:32:47 +0300 Timo Sirainen (a95134b47) - is parsed as: + lib-master: If log_debug is empty, don't set global debug log filter at all - { name = "test", mailbox = NULL, domain = NULL } + global_debug_log_filter==NULL check is a bit faster. -M src/lib-mail/message-address.c +M src/lib-master/master-service-settings.c -2016-06-05 15:48:17 +0200 Pali Rohár (bde3ab4dd) +2018-04-16 13:32:15 +0300 Timo Sirainen (0aeb68b1c) - lib-mail: parse_addr_spec: Email address without local-part is invalid + lib-master: Cleanup - Add new helper function for parsing log filter + settings - Add explicit invalid_syntax flag also when end of input occure because - address is without domain invalid and in this case it was not correctly - propagated. -M src/lib-mail/message-address.c +M src/lib-master/master-service-settings.c -2016-06-05 15:48:16 +0200 Pali Rohár (eafb1c5a5) +2018-04-16 13:31:03 +0300 Timo Sirainen (bae0b5317) - lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if - last_comment is not NULL + lib-master: Rename master_service_log_debug_parse() to + master_service_log_filter_parse() - This will fix possible NULL pointer dereference when caller does not set - last_comment. + This function will be used for parsing other settings besides just + log_debug. -M src/lib-mail/message-address.c +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-settings.h +M src/lib-master/master-service.c -2016-06-05 15:48:15 +0200 Pali Rohár (62630b5c6) +2018-04-17 15:46:41 +0300 Timo Sirainen (06855565c) - lib-mail: message_address_write: Fix generating group list with empty name + imapc: Fix expunges+appends in same session with + imapc_features=no-msn-updates - Empty name for group list must be quoted. + Since the EXPUNGEs were ignored, the sequence numbers weren't updated. When + a new mail arrived, the sequence number sent by the remote IMAP server + pointed to existing mails in imapc's mapping. Fix this by changing the + sequence number if the returned UID is >= next_uid. - Test case: + Fixes "FETCH UID mismatch" errors. - { { name = NULL, mailbox = "", domain = NULL }, { name = NULL, mailbox = - NULL, domain = NULL } } +M src/lib-storage/index/imapc/imapc-mailbox.c - converts to: +2018-03-13 16:36:44 +0200 Sergey Kitov (54f4dfbf7) - "":; + lib-mail: html2text: do not parse entity when quote_level > 0. -M src/lib-mail/message-address.c + &entities inside blockquotes are added to text, while other text is not, + this leads to strange results. -2016-06-05 15:48:14 +0200 Pali Rohár (3ca901575) +M src/lib-mail/mail-html2text.c - lib-mail: message_address_write: Fix generating empty group list +2018-04-06 15:48:02 +0300 Sergey Kitov (3341cfd97) - Empty group list ends with ": " not with ", ". + lib-mail: Fix include guards for istream-nonuls.h - Test case: - { { name = NULL, mailbox = "group", domain = NULL }, { name = NULL, - mailbox = NULL, domain = NULL } } +M src/lib-mail/istream-nonuls.h - converts to: +2018-04-11 15:11:23 +0300 Aki Tuomi (6f74c7382) - group:; + lib-program-client: Wait longer in test-program-client-local -M src/lib-mail/message-address.c + Sometiems it can take longer than 1 second to execute, if the test + environment is loaded. -2017-06-09 23:32:28 +0300 Timo Sirainen (410ef08d7) +M src/lib-program-client/test-program-client-local.c - lib: ioloop-kqueue - Improve kevent() panic log message +2018-02-01 09:19:10 +0200 Aki Tuomi (ba095d224) + lib-ssl-iostream: Fix premature NULL deref -M src/lib/ioloop-kqueue.c + Broken in 4836d541b1c1354073e068aabe5cd92aa67fe61d -2017-06-09 12:42:51 +0300 Timo Sirainen (930f8be90) + Found by coverity - lib-storage: Fix sort index writing to not leave sort_id=0 gaps +M src/lib-ssl-iostream/iostream-ssl.c - This fixes errors like: Error: INBOX: Broken sort-f indexes, resetting +2018-04-10 02:41:44 +0200 Stephan Bosch (ba275209e) -M src/lib-storage/index/index-sort-string.c + lib-mail: message-address: Fix address parser to properly reject angle-addr + without `>'. -2017-06-09 12:25:36 +0300 Timo Sirainen (f723c6d72) - lib-storage: Add details to "Broken sort-* indexes" error +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c +2018-04-10 02:36:44 +0200 Stephan Bosch (dab43eda9) -M src/lib-storage/index/index-sort-string.c + lib-mail: message-address: Fix assert panic occurring in + message_address_parse_path() when no opening `<' is found. -2017-06-09 14:31:15 +0300 Timo Sirainen (be715b3a4) + Panic was: - lib-storage: Fix setting the correct cache record corrupted + Panic: file message-address.c: line 147 (parse_angle_addr): assertion + failed: (*ctx->parser.data == '<') - It was mixing UIDs and sequences, so a wrong mail could have been set - corrupted or it could have crashed with: +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2018-02-19 13:21:25 +0200 Timo Sirainen (044876914) + + lib-storage: Assert unique_root_dir is set with + MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT - Panic: file mail-index-transaction-update.c: line 1018 - (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= - mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq)) M src/lib-storage/mail-storage.c -2017-06-09 12:07:00 +0300 Timo Sirainen (b835c5acc) +2018-02-19 13:22:02 +0200 Timo Sirainen (8d5faabfd) - quota: Fix negative quota_warnings with count backend + lib-storage: shared driver - Remove copying the child storage's class_flags - For example this never triggered: + The shared storage root itself doesn't have any storage, so it shouldn't + need to copy the child storage's class_flags either. - quota_warning = -messages=100%% quota-warning %u -100 + This fixes a crash when shared namespace was created with mdbox storage, and + another mdbox namespace was created afterwards. This had + MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT set, but its unique_root_dir is NULL, + which caused a crash in mail_storage_match_class(). - The change to quota_alloc() to update the count_used doesn't seem to - actually fix anything right now, but it makes the code more correct. +M src/lib-storage/index/shared/shared-storage.c -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota.c +2018-03-12 15:29:48 +0200 Timo Sirainen (12c4e52b5) -2017-05-31 14:39:55 +0300 Aki Tuomi (ee339bbbd) + imapc: Fix errors when handling UIDVALIDITY change - lib: Use unix streams with connection when using unix socket + This mainly happened when imapc was used with index files and the backend + IMAP server recreated the mailbox. This caused errors like: Expunged message + uid=1 reappeared - reconnecting - This makes it easier to send file descriptors over connection +M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib/connection.c -M src/lib/connection.h +2018-02-17 21:51:00 +0100 Stephan Bosch (463362ac2) -2017-05-30 21:57:06 +0300 Timo Sirainen (1a1c693a7) + lib-dcrypt: Reformatted test-stream.c. - quota: Fix imapc backend not to try to find out mail's size. - This removes unnecessary FETCH RFC822.SIZE command sent to server when - expunging mails. +M src/lib-dcrypt/test-stream.c -M src/plugins/quota/quota-imapc.c +2018-02-17 21:43:06 +0100 Stephan Bosch (81bcc3084) -2017-05-30 10:37:24 +0300 Timo Sirainen (3618dc331) + lib-dcrypt: Reformatted test-crypto.c. - lib-imap-client: Fix test-imapc-client unit test to work on OSX - connect() to port 0 fails in it, so for the "connect failure" test first - open a random free listener port and then close it. Hopefully nothing else - reopens it in the mean time. +M src/lib-dcrypt/test-crypto.c -M src/lib-imap-client/test-imapc-client.c +2018-02-17 21:10:17 +0100 Stephan Bosch (0f8fd4252) -2017-05-31 00:07:46 +0300 Timo Sirainen (363233718) + lib-dcrypt: Reformatted ostream-encrypt.h. - imapc: Don't send UID FETCH 1:* after SELECT if mailbox is empty +M src/lib-dcrypt/ostream-encrypt.h -M src/lib-storage/index/imapc/imapc-sync.c +2018-02-17 21:09:16 +0100 Stephan Bosch (1a61c6610) -2017-05-31 00:00:32 +0300 Timo Sirainen (ac16ddf07) + lib-dcryp: Reformatted ostream-encrypt.c. - imapc: SEARCH - Don't add parenthesis around OR - There's no need to write "(OR a b)" when "OR a b" works just the same. +M src/lib-dcrypt/ostream-encrypt.c -M src/lib-storage/index/imapc/imapc-search.c +2018-02-17 20:49:14 +0100 Stephan Bosch (42c0f0e94) -2017-05-30 23:53:44 +0300 Timo Sirainen (46824ce07) + lib-dcrypt: Reformatted istream-decrypt.h. - lib-storage: mail_search_args_to_imap() - don't add parenthesis around OR - There's no need to write "(OR a b)" when "OR a b" works just the same. +M src/lib-dcrypt/istream-decrypt.h -M src/lib-storage/mail-search-args-imap.c -M src/lib-storage/mail-search-mime.c -M src/lib-storage/test-mail-search-args-imap.c -M src/lib-storage/test-mail-search-args-simplify.c +2018-02-17 20:47:19 +0100 Stephan Bosch (29dff4e30) -2017-06-09 13:17:38 +0300 Timo Sirainen (45f1cea3a) + lib-dcrypt: Reformatted istream-decrypt.c. - lib-mail: Fix compiler warnings +M src/lib-dcrypt/istream-decrypt.c -M src/lib-mail/test-istream-qp-encoder.c -M src/lib-mail/test-qp-encoder.c +2018-02-17 20:24:42 +0100 Stephan Bosch (5139e7def) -2017-06-07 11:35:18 +0300 Timo Sirainen (500f98cc5) + lib-dcrypt: Reformatted dcrypt-private.h. - global: Use i_realloc_type() wherever possible +M src/lib-dcrypt/dcrypt-private.h -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache-transaction.c -M src/lib/ioloop-poll.c +2018-02-17 20:15:24 +0100 Stephan Bosch (56e36839d) -2017-06-07 11:24:38 +0300 Timo Sirainen (df4d45517) + lib-dcrypt: Reformatted dcrypt-openssl.c. - lib: Add test-mempool unit test. - It verifies that the p_new() and p_realloc_type() handle overflows - correctly. test-malloc-overflow already does this for the low-level - MALLOC_*() macros, but here we're cheking that the actually used memory - allocation macros also work. +M src/lib-dcrypt/dcrypt-openssl.c -M src/lib/Makefile.am -M src/lib/test-lib.c -M src/lib/test-lib.h -M src/lib/test-mempool-alloconly.c -A src/lib/test-mempool.c +2018-02-17 19:19:22 +0100 Stephan Bosch (9c41bf04d) -2017-06-07 11:24:03 +0300 Timo Sirainen (57bc6ece9) + lib-dcrypt: Reformatted dcrypt-iostream.h. - lib: Add i_realloc_type() for i_realloc() that checks for overflows +M src/lib-dcrypt/dcrypt-iostream.h -M src/lib/Makefile.am -M src/lib/imem.h -M src/lib/mempool.h -A src/lib/test-imem.c -M src/lib/test-lib.c -M src/lib/test-lib.h +2018-02-17 19:18:28 +0100 Stephan Bosch (329f2e069) -2016-05-12 05:40:29 -0400 Timo Sirainen (d9b9c96c0) + lib-dcrypt: Reformatted dcrypt-gnutls.c. - lmtp: Removed (Dovecot) from Received header. - Some people want to hide it, and I don't really see much benefit in - including it anyway. So lets just hide it from everyone. +M src/lib-dcrypt/dcrypt-gnutls.c -M src/lmtp/commands.c +2018-02-17 19:01:48 +0100 Stephan Bosch (79bf20c7e) -2017-06-08 11:35:58 +0300 Timo Sirainen (0229904b5) + lib-dcrypt: Reformatted dcrypt.h. - imapc: Fix potential crash if initial sync fails. - Happened at least if mailbox had 0 mails and a failing mailbox_sync() was - called twice. +M src/lib-dcrypt/dcrypt.h - Fixes: Panic: file imapc-sync.c: line 477 (imapc_sync_index): assertion - failed: (mbox->sync_fetch_first_uid == 1) +2018-02-17 18:53:19 +0100 Stephan Bosch (2265e47ef) -M src/lib-storage/index/imapc/imapc-sync.c + lib-drypt: Reformatted dcrypt.c. -2017-06-05 14:21:23 +0300 Josef 'Jeff' Sipek (2744ab671) - lib: test for guid_128_generate() time handling +M src/lib-dcrypt/dcrypt.c - Make sure that guids always increase regardless of what is happening to the - time. +2018-03-06 23:11:32 +0100 Stephan Bosch (bc7f0da3c) -M src/lib/test-guid.c + lib-storage: mail-storage-settings: Pre-parse postmaster_address as an SMTP + address. -2017-06-05 12:55:56 +0300 Josef 'Jeff' Sipek (26ee65a7d) + The pre-parsed address is not currently used anywhere, but this does check + that the postmaster address can successfully be converted to an SMTP + address, which is important for Pigeonhole. - lib: guid_128_generate() shouldn't generate invalid timestamps +M src/lib-storage/Makefile.am +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h - The nsec validity check must take into account the soon-to-be-done - increment. +2018-03-06 21:43:22 +0100 Stephan Bosch (5bfc88376) -M src/lib/guid.c + lib-smtp: address: Add source syntax check for conversion from RFC5322 + addresses. -2017-06-05 12:53:23 +0300 Josef 'Jeff' Sipek (f2cdf6415) + The message-address parser (for RFC 5322) allows UTF-8 characters in the + localpart, which is not acceptable for SMTP addresses. This change adds a + check that determines whether the source RFC5222 address can be converted + into a SMTP address. - lib: guid_128_generate() needs to correctly convert usecs to nsecs +M src/lib-lda/mail-deliver.c +M src/lib-smtp/smtp-address.c +M src/lib-smtp/smtp-address.h +M src/lib-smtp/smtp-params.c - The timestamp in the guid starts off with real time, but "runs ahead" if a - lot of guids are generated. If not many guids are being generated, the - timestamp is fast-forwarded to the current ioloop_timeval. The buggy - comparison prevented fast forwarding when tv_sec matched, but tv_nsec value - was > 0 (which was true most of the time). +2018-02-15 17:50:43 +0200 Martti Rannanjärvi (b0379686e) -M src/lib/guid.c + lib-master: Don't dup errors to service->set_pool in + master_service_settings_read -2017-06-06 17:18:27 +0300 Timo Sirainen (5afa083d8) + Use t_strdup() instead. - lib-index: Fix reset_id handling in mail_cache_get_missing_reason() cache +M src/lib-master/master-service-settings.c - Broken by bd897f82a5d9b00ba256b462d2056c2dc7df257c +2018-01-12 15:28:52 +0200 Martti Rannanjärvi (503ac5e23) -M src/lib-index/mail-cache-lookup.c -M src/lib-index/mail-cache-private.h + lib-master: Copy settings_parser_get_error() string so it's usable as + error_r -2017-06-06 09:39:34 +0300 Timo Sirainen (8bcb54747) + Also convert t_strdup()s in master_service_settings_read() into p_strdup()s + using service->set_pool. - lib-storage: Fix assert-crash in SORT caused by earlier changes +M src/lib-master/master-service-settings.c - Broken by 0a6a527f0c42b5478d80ac53ab357885676fd516 +2018-02-28 19:16:36 +0100 Stephan Bosch (44419807d) - Fixes: Panic: file index-sort-string.c: line 668 (index_sort_add_ids_range): - assertion failed: (str != NULL) + lmtp: proxy: Use proxy_not_trusted field if returned from passdb. -M src/lib-storage/index/index-sort-string.c + Before, this field was ignored. Now, if this field is set, no XCLIENT + command is ever sent to the remote proxy. -2017-06-05 21:53:18 +0300 Timo Sirainen (29e2a26bd) +M src/lmtp/lmtp-proxy.c - lib-index: Add cache to mail_cache_get_missing_reason() +2018-02-28 10:22:33 +0100 Stephan Bosch (40efd2329) - This avoids excessive CPU usage when it's called in a loop for many mails. + lmtp: proxy: Use ssl/starttls fields if returned from passdb. -M src/lib-index/mail-cache-lookup.c -M src/lib-index/mail-cache-private.h + Before, these fields were ignored. Now, these are used to determine whether + the proxy connection to the backend should be secured by SSL and how. -2017-06-05 21:44:45 +0300 Timo Sirainen (3641f0304) +M src/lmtp/lmtp-proxy.c - lib-index: mail_cache_get_missing_reason() - Minor code cleanup +2018-02-28 18:58:42 +0100 Stephan Bosch (da761519c) + login-common: Use client SSL certificate and key settings from lib-master. -M src/lib-index/mail-cache-lookup.c -2017-06-05 21:09:51 +0300 Timo Sirainen (5954998a7) +M src/login-common/login-proxy.c +M src/login-common/login-settings.c +M src/login-common/login-settings.h - lib-storage: Optimize error handling for SORT +2018-02-28 18:14:33 +0100 Stephan Bosch (48c6552ae) - If a lot of mails have failed in a large mailbox, this check reduces the CPU - usage significantly. + lib-master: Initialize key and certificate for client SSL settings. -M src/lib-storage/index/index-sort-string.c + This uses the ssl_client_cert and ssl_client_key settings. -2017-06-05 21:07:32 +0300 Timo Sirainen (521d502c7) +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h - lib-storage: Sort code cleanup - Change index_sort_get_string() to return - bool +2018-02-28 19:01:17 +0100 Stephan Bosch (c6eaa00c0) - None of the callers cared about the difference between "expunged" vs - "error". + login-common: Remove unused ssl_require_crl setting. -M src/lib-storage/index/index-sort-string.c -2017-06-05 21:05:07 +0300 Timo Sirainen (cb001ddb2) +M src/login-common/login-settings.c +M src/login-common/login-settings.h - lib-storage: Sort code cleanup - pass node to index_sort_get_string() +2018-03-10 19:13:24 +0100 Stephan Bosch (f4000dd82) + lib-smtp: client: Add smtp_client_connection_create_ip(). -M src/lib-storage/index/index-sort-string.c + This allows making SMTP client connections without performing a DNS lookup. + The optional hostname parameter is used to verify the hostname in the SSL + certificate from the server, if any. -2017-06-05 20:14:54 +0300 Timo Sirainen (f2450945b) +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-connection.h - lib-storage: Make sure istream-mail doesn't replace an existing storage - error +2018-03-10 19:07:26 +0100 Stephan Bosch (92a5be28e) - I'm not aware of it actually having broken anything, so this is just for - extra safety. + lib-smtp: client: smtp_client_connection_create(): ATTR_NULL() pointed to + wrong parameter. -M src/lib-storage/index/istream-mail.c -2017-06-05 20:12:43 +0300 Timo Sirainen (f02f20408) +M src/lib-smtp/smtp-client-connection.h - lib-storage: Fix SORT error message when reaching mail_sort_max_read_count +2018-03-10 19:05:40 +0100 Stephan Bosch (5c04ad2fd) - It should have been: NO [LIMIT] Requested sort would have taken too long + lib-smtp: client: connection: Perform IP lookup in a separate function. - Instead it was just: NO [SERVERBUG] Mail field not cached - It was broken for CC, FROM, TO, SUBJECT, DISPLAYFROM and DISPLAYTO. The - numeric sorting was working correctly. +M src/lib-smtp/smtp-client-connection.c -M src/lib-storage/index/index-sort.c +2018-03-10 19:22:19 +0100 Stephan Bosch (2a24666d4) -2017-05-29 13:39:18 +0300 Aki Tuomi (ee502bb6c) + lib: net: Avoid comparing the content of unassigned IPs in net_ip_cmp(). - lib-mail: Add qp encoder +M src/lib/net.c -M src/lib-mail/Makefile.am -A src/lib-mail/istream-qp-encoder.c -M src/lib-mail/istream-qp.h -A src/lib-mail/qp-encoder.c -A src/lib-mail/qp-encoder.h -A src/lib-mail/test-istream-qp-encoder.c -A src/lib-mail/test-qp-encoder.c +2018-02-27 22:56:20 +0100 Stephan Bosch (849e6363a) -2017-05-25 19:03:32 +0300 Aki Tuomi (2c1b3c1c8) + lmtp: proxy: Use source_ip proxy field if it is returned from passdb. - lib-mail: Link test binaries to libmail.la instead of .lo files + Before, it was ignored. Now, it is used as the source IP for the outgoing + LMTP client connection. +M src/lmtp/lmtp-proxy.c -M src/lib-mail/Makefile.am +2018-02-27 21:58:17 +0100 Stephan Bosch (fce763804) -2017-05-30 09:36:49 +0300 Timo Sirainen (7ef5f4574) + lib-smtp: client: Add support for connecting from an explicit source IP. - lib-storage: Fix LAYOUT=fs potentially not ignoring ACLs when requested - fs_get_existence_info_flag() was only being called with LAYOUT=fs and - Maildir combination. This mainly affected that combination when using - mailbox_list_index=yes and trying to list mailboxes with ACL checking - disabled. +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client.c +M src/lib-smtp/smtp-client.h -M src/lib-storage/list/mailbox-list-fs-iter.c +2018-02-27 21:56:55 +0100 Stephan Bosch (763b1fe19) -2017-05-30 09:18:14 +0300 Timo Sirainen (b3f3151b5) + lib: connection: Added support for connecting from an explicit source IP. - lib-storage: Fix ACL in parent mailbox potentially hiding its children. - fs_get_existence_info_flag() was only being called with LAYOUT=fs and - Maildir combination, so only it was broken if the parent mailbox wasn't - visible but its children were. +M src/lib/connection.c +M src/lib/connection.h -M src/lib-storage/list/mailbox-list-fs-iter.c +2018-04-09 16:41:19 +0300 Timo Sirainen (b01048358) -2017-05-30 09:15:09 +0300 Timo Sirainen (e323ab796) + imapc: Fix crash when handling empty mailboxes. - lib-storage: fs_list_get_mailbox_flags() - Return mailbox files as - selectable + Broken by c05b4ac76c4c6012958f1cc37e2fccf7a7d31c33 - Avoids a second stat() later on, which would do the same anyway. +M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/list/mailbox-list-fs-flags.c +2018-03-25 23:15:58 +0300 Timo Sirainen (6d1388880) -2017-05-30 09:12:05 +0300 Timo Sirainen (788671da1) + imapc: Fix local state if mailbox is empty after reconnection - lib-storage: fs_list_get_mailbox_flags() - Don't assume directories always - have children. + If local indexes had more than 0 mails, but after reconnection the remote + IMAP server replied with "* 0 EXISTS", the mails in local index weren't + expunged. This could have resulted in: - This makes the directory handling code equivalent for type==UNKNOWN and - type==DIR. + Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): assertion + failed: (mail_index_is_expunged(view, lseq) || + seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid)) -M src/lib-storage/list/mailbox-list-fs-flags.c +M src/lib-storage/index/imapc/imapc-mailbox.c -2017-05-30 09:10:55 +0300 Timo Sirainen (4d1d65aeb) +2018-04-11 14:19:06 +0300 Timo Sirainen (4e881e9ee) - lib-storage: fs_list_get_mailbox_flags() - Add comments + imapc: If SELECT INBOX fails with NO, treat it as temporary failure + If it's treated as "mailbox doesn't exist", the INBOX autocreation code will + attempt to CREATE INBOX. This is very unlikely to work. -M src/lib-storage/list/mailbox-list-fs-flags.c +M src/lib-storage/index/imapc/imapc-storage.c -2017-05-30 09:09:39 +0300 Timo Sirainen (92e25c1bf) +2018-02-27 12:26:09 +0200 Timo Sirainen (d2d399fa3) - lib-storage: fs_list_get_mailbox_flags() - Reorganize code + imapc: Fix crash when untagged FETCH reply doesn't have key-value pairs - No functional changes. + The last key with the missing value is just silently ignored. -M src/lib-storage/list/mailbox-list-fs-flags.c +M src/lib-storage/index/imapc/imapc-mailbox.c -2017-05-29 17:58:35 +0300 Timo Sirainen (830af9a96) +2018-03-26 00:01:26 +0300 Timo Sirainen (188cc2cde) - acl: Global ACL file was parsed as if it was local ACL file + imapc: Ignore fetch-msn-workarounds/no-msn-updates during initial FETCH - This caused some of the ACL handling not work exactly as expected. + Otherwise duplicate UIDs aren't detected and it causes an assert-crash: -M src/plugins/acl/acl-global-file.c + Panic: file imapc-mailbox.c: line 533 (imapc_untagged_fetch): assertion + failed: (lseq == mbox->sync_next_lseq) -2017-05-29 17:26:52 +0300 Timo Sirainen (475db6733) +M src/lib-storage/index/imapc/imapc-mailbox.c - lib-storage: Make mailbox_list_iter_init_autocreate() static again +2018-03-16 13:40:26 +0200 Aki Tuomi (c8efc7e50) - It's no longer needed elsewhere. + istream-seekable: Record stream size in stat -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/mailbox-list-private.h + Otherwise the size is shown 0 -2017-05-29 17:20:48 +0300 Timo Sirainen (88470ba4a) +M src/lib/istream-seekable.c - lib-storage: Fix mailbox_list_index=yes + ACLs + auto=subscribe mailboxes +2018-03-16 13:39:40 +0200 Aki Tuomi (36025085b) - If the auto=subscribe mailbox didn't have a lookup ACL, it shouldn't have - been listed. This didn't work properly, because ACL plugin initialized the - autocreate_ctx only for the index iterator, while the autoboxes were listed - using the backend iterator. Fixed by not creating index iterator at all when - doing a passthrough iteration. + istream-mail: Move pos back when bailing out on error -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-index.h -M src/lib-storage/mailbox-list-private.h + Fixes Panic: file istream.c: line 276 (i_stream_read): assertion failed: + ((_stream->pos - _stream->skip) == (prev_pos - prev_skip)) -2017-05-29 16:44:44 +0300 Timo Sirainen (6b1bdc40b) +M src/lib-storage/index/istream-mail.c - lib-storage: Cleanup - Don't use ctx in iter_use_index() +2018-03-27 16:12:46 +0300 Aki Tuomi (92b59eaeb) - Shrinks the following change. + login-common: Indicate TLS secured transport on proxied TLS too -M src/lib-storage/list/mailbox-list-index-iter.c -2017-05-29 15:52:15 +0300 Timo Sirainen (c3472c8b6) +M src/login-common/sasl-server.c - lib-storage: Add \NoInferiors flag to autocreated mailboxes with mbox +2018-03-15 22:36:45 +0100 Stephan Bosch (89db074a7) - Once the mailboxes get autocreated, the \NoInferiors flag is added anyway. + lib-smtp: test-smtp-server-errors: Add test for DATA command erroneously + used with BODY=BINARYMIME. -M src/lib-storage/list/mailbox-list-iter.c -2017-05-29 15:30:36 +0300 Timo Sirainen (d10dd118c) +M src/lib-smtp/test-smtp-server-errors.c - lib-storage: Don't list duplicate autocreated mailboxes' parents +2018-03-15 22:34:34 +0100 Stephan Bosch (346e837b4) + lib-smtp: test-smtp-server-errors: Add tests for missing MAIL and RCPT + commands before DATA command. -M src/lib-storage/list/mailbox-list-iter-private.h -M src/lib-storage/list/mailbox-list-iter.c -2017-05-29 13:53:17 +0300 Timo Sirainen (71c823b56) +M src/lib-smtp/test-smtp-server-errors.c - acl: Skip auto=create|subscribe mailboxes that don't have lookup-right +2018-03-15 22:36:16 +0100 Stephan Bosch (431ab66c5) - Removing them entirely from the boxes and box_sets arrays in the list - context treats them as if they weren't configured at all. This way they - don't need any other special code. + lib-smtp: server: Check that BINARYMIME is not used without CHUNKING. -M src/plugins/acl/Makefile.am -M src/plugins/acl/acl-mailbox-list.c -2017-05-29 13:52:42 +0300 Timo Sirainen (9de37e819) +M src/lib-smtp/smtp-server-cmd-data.c - lib-storage: Add mailbox-list-iter-private.h with autocreate context structs +2018-03-14 01:54:20 +0100 Stephan Bosch (1801a0494) - Needed for the following ACL change. + submission: Add 8BITMIME and BINARYMIME back to supported capabilities. -M src/lib-storage/list/Makefile.am -A src/lib-storage/list/mailbox-list-iter-private.h -M src/lib-storage/list/mailbox-list-iter.c + These are supported when the backend provides support. These were + erroneously disabled earlier by 3bf0c0e211ba1e4ee9977a9dfea32e14ebc50aab. -2017-05-20 18:13:45 +0300 Timo Sirainen (98567fced) +M src/submission/submission-common.h - config: When showing an "Unknown setting" error, show the full section path +2018-03-21 11:29:26 +0200 Arkadiusz Miśkiewicz (33ec2f44b) - For example with: + lib-master: Fix dns_wildcard_match usage - service foo { - inet_listener bar { - key = value - } - } + Broken by 446c0b02a7802b676e893ccc4934fc7318d950ea - Instead of showing just: +M src/lib-master/master-service-settings-cache.c - Unknown setting: key +2018-03-19 11:34:49 +0200 Aki Tuomi (29dff4512) - Show the entire path: + NEWS: Update to 2.3.0.1 - Unknown setting: service { inet_listener { key - Any filters won't be shown, because they don't affect the result. +M NEWS -M src/config/config-parser-private.h -M src/config/config-parser.c +2018-03-12 14:50:32 +0200 Aki Tuomi (857df38db) -2017-05-17 15:20:35 +0300 Aki Tuomi (c55cb3264) + lib-dcrypt: test-stream - Ensure more is read when buffer becomes empty - lib-storage: Apply mailbox_list_iter_autocreate_filter on - mailbox_list_index_iter_next - It skips mailbox_list_iter_next, so it needs to be applied here as well. +M src/lib-dcrypt/test-stream.c -M src/lib-storage/list/mailbox-list-index-iter.c +2018-03-12 14:48:41 +0200 Aki Tuomi (3e12b7187) -2017-05-17 15:19:44 +0300 Aki Tuomi (ff6e6aede) + lib-dcrypt: istream-decrypt - Read more if buffer is empty - lib-storage: Rename autocreate_iter_existing to - mailbox_list_iter_autocreate_filter + If there is no more buffered data, try to decrypt more. - It makes next commit possible + - Fixes Panic: file istream.c: line 192 (i_stream_read): assertion failed: + (!stream->blocking) + - Fixes infinite loop when stream is not blocking -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/mailbox-list-private.h +M src/lib-dcrypt/istream-decrypt.c -2017-05-17 12:16:31 +0300 Aki Tuomi (1e7f85e6d) +2018-03-15 13:19:53 +0200 Timo Sirainen (28cbdea85) - lib-storage: Do not drop autocreate boxes when listing them + imapc: Update mail size also when RFC822.SIZE is smaller than fetched header + size - Otherwise we skip folders, because array_delete() is removing boxes while - they're being iterated. + If this isn't done, istream-mail will detect that the fetched header is + larger than RFC822.SIZE and fail with "Cached message size smaller than + expected" -M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c -2017-04-06 16:09:00 +0300 Aki Tuomi (d830a9952) +2018-03-15 12:20:14 +0200 Timo Sirainen (5ecfbaee5) - lib-master,login-common: Add dual cert support + imapc: Update mail size also when istream_opened() hook is called - Adds new settings ssl_alt_cert and ssl_alt_key + When fetching a message body the cached message size was set. However, if + istream_opened() hook was used this wasn't done. If a client had fetched + both (RFC822.SIZE BODY.PEEK[]) and the server sent a wrong RFC822.SIZE, that + size was used for the message body size, which resulted in "Cached message + size larger than expected" errors. -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/master-service-ssl-settings.h -M src/login-common/ssl-proxy-openssl.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c -2017-06-02 21:11:19 +0300 Aki Tuomi (3986070a0) +2018-03-01 12:17:16 +0200 Timo Sirainen (597512ddc) - lib-dict: Update cdb_dict_init to match with new API + sdbox: Delete .temp* files on when save/copy transaction is rolled back + For example when copying was aborted due to user being over quota, temp + files were left behind. -M src/lib-dict/dict-cdb.c +M src/lib-storage/index/dbox-single/sdbox-save.c -2016-04-30 12:50:53 +0200 Stephan Bosch (1472a6db7) +2018-03-07 11:24:30 +0200 Timo Sirainen (b2c7388a2) - lib: Added ostream-unix for writing fd sockets via ostream. + notify: Fix crash if NO_NOTIFY transaction is rolled back during commit + Fixes: Panic: no notify_mail_txn found -M src/lib/Makefile.am -A src/lib/ostream-unix.c -A src/lib/ostream-unix.h +M src/plugins/notify/notify-storage.c -2017-06-05 19:05:58 +0300 Timo Sirainen (1d0a9371e) +2018-03-06 15:15:01 +0200 Aki Tuomi (e8826dcf3) - push-notification: Fix crash in OX driver's deinit + lib-master: Correctly match when local_name has multiple names - The http_client doesn't always exist. + Reported by J. Nick Koston -M src/plugins/push-notification/push-notification-driver-ox.c +M src/lib-master/master-service-settings-cache.c -2017-06-05 12:14:57 +0300 Aki Tuomi (7d84daaf5) +2018-03-06 10:33:27 +0200 Aki Tuomi (eee017f9b) - auth: Access always first entry when flushing failures + lib-master: Reply from config process is tabescaped - The code is deleting the first item after accessing it, and then moving - forward. It will eventually go beyond the array and get NULL ptr and fail. + Found by J. Nick Koston - Instead we need to always get the first item, since the array deletion is - moving the queued items forward. +M src/lib-master/master-service-settings-cache.c - Broken by e18b4e41 +2018-03-10 19:43:27 +0200 Aki Tuomi (8aaf3826c) -M src/auth/auth-request-handler.c + config: tabescape local name and service -2017-05-31 10:09:41 +0300 Aki Tuomi (215fd61e4) - auth: Fix vpopmail for 2.2 +M src/config/config-connection.c +2018-03-06 10:31:51 +0200 Aki Tuomi (ab1a8581f) -M src/auth/userdb-vpopmail.c + config: Make local_name comparison faster -2017-05-31 13:03:47 +0300 Aki Tuomi (49f5e58ed) + Based on patch by J. Nick Koston - quota: Update version number for script client +M src/config/config-filter.c +2018-03-12 15:06:13 +0200 Timo Sirainen (134e7d2a6) -M src/plugins/quota/quota.c + imapc: Don't try to add mails to index if they already exist there -2017-05-30 14:03:23 +0300 Aki Tuomi (86b613a91) + Broken by 259a4ca5943123915a019799623d2e4a4ef7fd15 when imapc was used with + (not in-memory) index files. - mail-filter: tabescape args, this is required by script client 4 + This caused errors like "Append with UID 200, but next_uid = 201" +M src/lib-storage/index/imapc/imapc-mailbox.c -M src/plugins/mail-filter/istream-ext-filter.c -M src/plugins/mail-filter/ostream-ext-filter.c +2018-03-09 16:09:16 +0100 Stephan Bosch (c4688bd12) -2017-05-30 14:01:39 +0300 Aki Tuomi (9ce915204) + lmtp: Provide hidden support for ORCPT RCPT parameter. - welcome: tabescape args, this is required by script client 4 + This is normally only available with the DSN capability, but we use it to + forward the original recipient in proxy setups. + This feature was available in the original Dovecot v2.2 LMTP, but it got + lost in the new lib-smtp implementation. -M src/plugins/welcome/welcome-plugin.c +M src/lmtp/client.c +M src/lmtp/lmtp-proxy.c -2017-05-30 14:01:17 +0300 Aki Tuomi (39544cfbe) +2018-02-27 23:13:33 +0100 Stephan Bosch (954d65a35) - global: Update script client version number + lmtp: proxy: Use per-connection SMTP client settings. - Broken by b383ed51d75bce0f69f126bc4ff7192985ca30f2 + This is needed for setting source IP in later change. The peer_trusted + setting must me moved, since this setting is overriden by per-connection + settings, rather than merged. -M src/plugins/fts/fts-parser-script.c -M src/plugins/mail-filter/istream-ext-filter.c -M src/plugins/mail-filter/ostream-ext-filter.c -M src/plugins/welcome/welcome-plugin.c +M src/lmtp/lmtp-proxy.c -2017-05-30 16:24:52 +0300 Timo Sirainen (ed7e15a88) +2018-03-09 16:03:23 +0100 Stephan Bosch (73654d4e9) - auth: Fix unescaping tabs in auth client input. + lib-smtp: client: Add support for forcibly enabling support for a + capability. - This mainly broke forward_fields when there was more than one of them. + Then it is enabled even when the server does not list it in the EHLO + response. -M src/auth/auth-request-handler.c +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client.c +M src/lib-smtp/smtp-client.h -2017-05-30 11:30:10 +0300 Timo Sirainen (4fd29783d) +2018-03-09 16:01:50 +0100 Stephan Bosch (32b2ef232) - auth: Fix crash on passdb lookup when all passdbs were skipped + lib-smtp: params: Make ORCPT parameter available separately if hidden + capability is enabled. - Finishes the fix in 614f5b6febaf3c825f9200ab3b62d9d047197b0e - Fixes: auth: Panic: file auth-request.c: line 2493 (get_log_prefix): - assertion failed: (auth_request->mech != NULL) +M src/lib-smtp/smtp-common.h +M src/lib-smtp/smtp-params.c -M src/auth/auth-request.c +2018-03-09 15:47:06 +0100 Stephan Bosch (8abbd4ad3) -2017-05-30 10:01:20 +0300 Timo Sirainen (b61bb2ed8) + lib-smtp: common: Use the BIT() macro for defining the capability flags. - lib-storage: Fix compiler warning in test-mail-storage +M src/lib-smtp/smtp-common.h -M src/lib-storage/test-mail-storage.c +2017-12-24 14:35:15 +0100 Stephan Bosch (b4534c9f0) -2017-05-24 23:49:43 +0300 Timo Sirainen (6f6e929f8) + lib-smtp: client: Fix rawlog input stream inconsistency by updating streams + right after initializing TLS. - lib-storage: Fix crash in test-mail-storage + Restructured the code to call a new function called + smtp_client_connection_streams_changed() which performs all the necessary + updates. Before, enabling rawlog could break the TLS handshake. +M src/lib-smtp/smtp-client-connection.c -M src/lib-storage/test-mail-storage.c +2017-12-01 13:46:10 +0200 Aki Tuomi (af014a893) -2017-05-15 15:35:37 +0300 Aki Tuomi (93621ce3a) + auth: Include tls=true/false in policy server request - mail-crypt-plugin: Set copy-hook only if save_version > 0 - Otherwise we might use it in read-only mode, too. +M src/auth/auth-policy.c -M src/plugins/mail-crypt/mail-crypt-plugin.c +2017-12-01 13:30:43 +0200 Aki Tuomi (b06ad24cb) -2017-05-04 09:14:17 +0300 Aki Tuomi (cb52140b1) + auth: Support secured=tls - mail-crypt: Re-encrypt mails when copying/moving - Otherwise the mail cannot be opened after moving +M src/auth/auth-request-var-expand.c +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/auth/test-auth-request-var-expand.c -M src/plugins/mail-crypt/mail-crypt-plugin.c +2017-12-11 11:16:02 +0200 Aki Tuomi (b205e8519) -2017-05-24 22:31:59 +0300 Timo Sirainen (dccb98446) + login-common: Pass SSL protocol details to auth - lib-storage: Fix memory leak in test-mail-storage +M src/login-common/sasl-server.c -M src/lib-storage/test-mail-storage.c +2017-12-01 13:16:34 +0200 Aki Tuomi (192a9908d) -2017-05-24 21:56:03 +0300 Timo Sirainen (216ad31fa) + login-common: Indicate TLS encryption if haproxy says it was - lib-storage: Add unit test for set/get/push/pop storage error operations +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/sasl-server.c -M src/lib-storage/Makefile.am -A src/lib-storage/test-mail-storage.c +2017-12-11 11:08:08 +0200 Aki Tuomi (b7fafd613) -2017-05-24 21:29:49 +0300 Timo Sirainen (e4c8ed209) + lib-auth: Include ssl protocol details in request when present - lib-storage: Fix mail_storage_set_critical() when input parameter is an old - internal error - This could have caused garbage in the error string. +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-client.h -M src/lib-storage/mail-storage.c +2017-12-01 13:16:07 +0200 Aki Tuomi (3dffa06b4) -2017-05-24 19:16:03 +0300 Timo Sirainen (4cb79ce30) + lib-auth: Add AUTH_REQUEST_FLAG_TLS - lib-storage: Fix mail_storage_last_error_push/pop() to work with internal - errors + Indicates whether connection is over TLS encryption. +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-client.h -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c +2017-12-11 11:00:41 +0200 Aki Tuomi (8230e3df4) -2017-05-22 17:56:15 +0300 Timo Sirainen (f328c5f1e) + lib-ssl-iostream: Add accessors for additional SSL protocol details - imap: Fix unhibernation after earlier change + This is needed in order to send these details as fields to auth process +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h -M src/imap/imap-master-client.c +2017-12-13 09:52:16 +0200 Aki Tuomi (36b9d01cf) -2017-05-17 19:02:06 +0300 Timo Sirainen (575f81ed8) + m4: Check for SSL_CIPHER_get_kx_nid - imap NOTIFY: Flush any pending notifications on NOOP - This is mainly to allow testing NOTIFY easily with imaptest scripts. This is - cheap anyway, because mailbox_list_notify_flush() doesn't do any syscalls - when there's no work. +M m4/ssl.m4 -M src/imap/cmd-noop.c -M src/imap/imap-notify.c -M src/imap/imap-notify.h +2018-01-11 16:10:48 +0200 Aki Tuomi (19ccc8658) -2017-05-17 19:01:57 +0300 Timo Sirainen (1d9ac0665) + auth: Ensure crypt schemes match with samples - lib-storage: Implement mailbox_list_notify_flush() - This flushes any pending notifications. For now it only checks if there's a - pending notification waiting for a timeout. It could also stat() the files - to make sure, but that's probably unnecessary. +M src/auth/password-scheme-crypt.c -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h -M src/lib-storage/mailbox-list-notify.c -M src/lib-storage/mailbox-list-notify.h -M src/lib-storage/mailbox-list-private.h +2018-01-11 15:22:30 +0200 Aki Tuomi (50d398fc6) -2017-05-17 18:13:09 +0300 Timo Sirainen (63aca9f0d) + auth: Fix crypt scheme detection - lib-storage: Explicitly name function pointers in mailbox lists + Broken by 1ebb6094e5105ba7ef521a0177c42d3ea81243f0 - This allows adding more fields to struct mailbox_list_vfuncs without - compiler warnings. +M src/auth/password-scheme-crypt.c -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/shared/shared-list.c -M src/lib-storage/list/mailbox-list-fs.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-maildir.c -M src/lib-storage/list/mailbox-list-none.c +2018-02-08 15:45:55 +0200 Aki Tuomi (8b9b3d48c) -2017-05-17 17:49:25 +0300 Timo Sirainen (9dbd45d67) + auth: Support standard auth variables in LDAP subqueries - lib-storage: Always update highestmodseq in mailbox list index - This is required for mailbox-list-notify API to work correctly. For example - IMAP NOTIFY session with CONDSTORE enabled could be listening for - FlagChanges, but another session without CONDSTORE enabled could be updating - flags in a mailbox that has never been opened with CONDSTORE enabled. NOTIFY - wouldn't see this change, unless it was always written to - dovecot.list.index. +M src/auth/db-ldap.c -M src/lib-storage/list/mailbox-list-index-status.c +2018-01-28 21:39:07 +0100 Stephan Bosch (a61c327be) -2017-05-17 17:14:05 +0300 Timo Sirainen (8bfa9cb19) + lib-http: client: Assert that req->client != NULL in + http_client_request_send_error(). - lib-storage: Fix mailbox list index notifications when modseqs aren't - enabled. + Applies when blocking payload output API is being used. Addresses a report + by scan-build. - No notifications were sent if highest_modseqs weren't updated in mailbox - list index. +M src/lib-http/http-client-request.c -M src/lib-storage/list/mailbox-list-index-notify.c +2018-01-20 18:48:00 +0100 Stephan Bosch (1ab6917df) -2017-05-17 11:40:53 +0300 Josef 'Jeff' Sipek (046da899e) + lib-http: test-http-payload: Initialize http_context in + test_client_create_clients(). - imap: login reply should be sent sooner + Fixes complaint from scan-build. +M src/lib-http/test-http-payload.c -M src/imap/main.c +2018-01-20 16:48:03 +0100 Stephan Bosch (1acfddc13) -2017-04-04 00:32:07 +0200 Stephan Bosch (05e721c72) + lib-smtp: address: Remove useless local variable initialization in + smtp_address_clone(). - lib-http: client: Fixed race condition between DNS refresh lookup and a soft - connection timeout. + Fixes complaint from scan-build. - The refreshing DNS lookup cleared all the IPs, but the soft connection - timeout (and maybe other code) still relied on them. Adding tests everywhere - for host->ips_count == 0 is annoying, so I changed the DNS lookup code such - that the stale IPs remain present while the DNS lookup is being performed. - The pending lookup prevents new connections through - http_client_host_refresh(), so this will not create potentially useless - connections. +M src/lib-smtp/smtp-address.c -M src/lib-http/http-client-host.c +2018-02-08 13:27:25 +0200 Timo Sirainen (036defc8f) -2017-05-24 17:19:36 +0300 Timo Sirainen (f0802d0ab) + lib-http: client: Fix using non-context SSL settings - lib-master: Replace listeners with /dev/null in SIGQUIT instead of closing + The SSL settings were used for the SSL context, but they weren't used for + individual SSL streams. This broke stream-only settings, like + allow_invalid_cert=TRUE. - This should be somewhat safer. +M src/lib-http/http-client-connection.c -M src/lib-master/master-service-private.h -M src/lib-master/master-service.c +2018-03-08 14:10:42 +0200 Timo Sirainen (dc030eac6) -2017-05-22 10:13:21 +0300 Timo Sirainen (25dce54be) + lib: Remove ostream.get_used_size() - lib-index: Fix crash in mail_transaction_log_view_set_all() error handling + Removes backwards compatibility. +M src/lib/ostream-private.h +M src/lib/ostream.c -M src/lib-index/mail-transaction-log-view.c - -2017-05-22 10:11:30 +0300 Timo Sirainen (6ad0dcf16) +2018-03-08 14:08:50 +0200 Timo Sirainen (1ea0f535f) - lib-index: Fix start_offset > sync_offset error handling for in-memory - indexes + lib-test: test-ostream - Implement the new ostream.get_buffer_used_size() + API + It's implemented the same way as the old get_used_size(). The default + implementation for get_buffer_avail_size() also works with this. -M src/lib-index/mail-transaction-log-file.c +M src/lib-test/test-ostream.c -2017-05-19 10:45:09 +0300 Timo Sirainen (4ac005086) +2018-03-08 14:08:43 +0200 Timo Sirainen (f6a49ec42) - auth: Fix linking duplicate .a libraries to unit test + lib: ostream-buffer - Implement the new ostream.get_buffer_used_size() API + It's implemented the same way as the old get_used_size(). The default + implementation for get_buffer_avail_size() also works with this. -M src/auth/Makefile.am +M src/lib/ostream-buffer.c -2017-05-08 12:49:39 +0200 Stephan Bosch (231278a7c) +2018-03-08 14:07:34 +0200 Timo Sirainen (884e2a16f) - util: script: Increased the major protocol version due to earlier changes. + lib: ostream-file - Implement the new ostream.get_buffer_used_size() API + It's implemented the same way as the old get_used_size(). The default + implementation for get_buffer_avail_size() also works with this. -M src/lib-program-client/program-client-remote.c -M src/util/script.c +M src/lib/ostream-file.c -2017-05-09 13:33:23 +0200 Stephan Bosch (262a9b6d8) +2018-02-24 22:04:49 +0200 Timo Sirainen (25c0f5136) - util: script: Amended protocol with the ability to convey a set of - environment variables that are passed to the script. + lib-compression: Implement the new ostream.get_buffer_used/avail_size() APIs - The acceptable environment variables are selected using the -e parameter; - others are ignored silently. + The avail_size() implementation isn't fully correct for bzlib/zlib/lzma. + Fixing it requires larger changes though. -M src/lib-program-client/program-client-remote.c -M src/util/script.c +M src/lib-compression/ostream-bzlib.c +M src/lib-compression/ostream-lz4.c +M src/lib-compression/ostream-lzma.c +M src/lib-compression/ostream-zlib.c -2017-05-08 12:48:08 +0200 Stephan Bosch (2dcb39ce5) +2018-02-24 22:04:27 +0200 Timo Sirainen (159d7780c) - util: script: Amended the protocol to pass arguments escaped to prevent - problems with newlines. + lib-ssl-iostream: Implement the new ostream.get_buffer_used/avail_size() + APIs - Newlines are used as argument delimiters in the protocol, which will cause - problems. -M src/lib-program-client/program-client-remote.c -M src/util/script.c +M src/lib-ssl-iostream/ostream-openssl.c -2017-05-09 13:43:39 +0200 Stephan Bosch (b49324057) +2018-02-24 22:04:11 +0200 Timo Sirainen (7b4f32ab7) - lib-program-client: local: Fixed use of unterminated string array of - environment variables in exec_child(). + lib: ostream-multiplex - Implement the new get_buffer_used/avail_size() APIs -M src/lib-program-client/program-client-local.c +M src/lib/ostream-multiplex.c -2017-05-09 14:22:06 +0200 Stephan Bosch (61d198b47) +2018-02-26 15:17:36 +0200 Timo Sirainen (d941f9c24) - lib-program-client: Made the test suite ignore the protocol version. + lib: Remove ostream-escaped + It can't implement o_stream_get_buffer_avail_size() correctly with its + current API. Nothing uses it currently, so easier to just remove it + entirely. -M src/lib-program-client/test-program-client-remote.c +M src/lib/Makefile.am +D src/lib/ostream-escaped.c +D src/lib/ostream-escaped.h +M src/lib/test-lib.inc +D src/lib/test-ostream-escaped.c -2016-10-20 15:41:54 +0200 Stephan Bosch (a6d2ab1f7) +2018-02-24 22:03:10 +0200 Timo Sirainen (dafdbfdbc) - lib-program-client: Gave variables pointing to a program-client more logical - names. + lib: Change/clarify o_stream_get_buffer_used/avail_size() APIs - Was still based on when it was called the script-client. + ostream.get_used_size() is deprecated and replaced by get_buffer_used_size() + and get_buffer_avail_size(). -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client-remote.c +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h -2017-05-19 17:44:30 +0300 Timo Sirainen (f193b50ac) +2018-01-20 15:44:56 +0200 Aki Tuomi (976105f17) - imap: Move struct client_sync_context to imap-sync-private.h and add imap_ - prefix + auth: db-lua - Do not assert-crash if given parameter was not auth_request + Use luaL_error instead that will back out more gracefully. -M src/imap/imap-client.h -M src/imap/imap-sync-private.h -M src/imap/imap-sync.c + Fixes Panic: file db-lua.c: line 279 (auth_lua_check_auth_request): + assertion failed: (lua_istable(script->L, arg)) -2017-05-19 16:34:29 +0300 Timo Sirainen (41e71d7cf) +M src/auth/db-lua.c - imap: Allow plugins to replace existing FETCH handlers +2018-01-20 20:33:01 +0200 Aki Tuomi (cca32a311) - They can use imap_fetch_handler_lookup() to get the old init() function. - Then they can imap_fetch_handler_unregister() the existing handler and - register a new handler, which can do its own work and call the old init() if - needed. + auth: db-lua - Use luaL_error correctly -M src/imap/imap-fetch.c -M src/imap/imap-fetch.h -2017-05-17 16:47:43 +0300 Timo Sirainen (55206cb57) +M src/auth/db-lua.c - lib-index: Improve "start_offset > current sync_offset" error message. +2017-06-08 12:18:30 +0300 Aki Tuomi (5403eb2c1) - Try to make it clear what is the root cause of it. + lib-auth: Require being connected before adding requests -M src/lib-index/mail-transaction-log-file.c -2017-05-17 16:28:58 +0300 Timo Sirainen (b2b482521) +M src/lib-auth/auth-server-connection.c +M src/lib-auth/auth-server-connection.h - lib-index: mail_transaction_log_file_get_highest_modseq_at() - return error - string +2017-06-05 12:44:06 +0300 Aki Tuomi (6e1e25eb9) - This can help figuring out why some error happened when more context is - provided in the caller's error messages. + lib-auth: Prevent double-disconnect -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/test-mail-transaction-log-view.c + When disconnecting, it's possible that disconnect gets called twice by some + callback, so protect it with a boolean. -2017-05-17 16:21:54 +0300 Timo Sirainen (c95d24a31) + Fixes Panic: file hash.c: line 152 (hash_table_clear): assertion failed: + (table->frozen == 0) - lib-index: Add missing error logging for mail_index_view_sync_begin() +M src/lib-auth/auth-server-connection.c +M src/lib-auth/auth-server-connection.h +2018-03-06 22:11:34 +0100 Stephan Bosch (c3df1c9ef) -M src/lib-index/mail-index-view-sync.c + lib-lda: Do not convert "From:" message address to STMP address, just to + make a string for logging. -2017-05-17 13:33:44 +0300 Timo Sirainen (0e0d6865e) + This leads to problems when the message address (RFC5322) has UTF-8 code + points in the local part, which is (currently) allowed for message + addresses, but not for SMTP addresses (RFC5321). - lib-index: mail_transaction_log_file_map() - return reason/error string +M src/lib-lda/mail-deliver.c - This can help figuring out why some error happened when more context is - provided in the caller's error messages. +2018-03-06 13:27:17 +0200 Martti Rannanjärvi (2677b2c91) -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/mail-transaction-log.c -M src/lib-index/test-mail-transaction-log-view.c + master: Strip '\n' from suid_dumpable read buffer before str_to_uint() -2017-05-17 13:31:09 +0300 Timo Sirainen (f71db3011) - lib-index: mail_transaction_log_view_set_all() - don't entirely ignore - corrupted logs +M src/master/service-process.c - Ignore them only if it's followed by an index reset. +2018-03-01 18:38:43 +0200 Timo Sirainen (f6b8fa45a) -M src/lib-index/mail-transaction-log-view.c + master: Improve "core not dumped" error messages with Linux -2017-05-18 23:13:38 +0300 Timo Sirainen (65e20e887) + Recommend setting /proc/fs/suid_dumpable to 2 and + /proc/sys/kernel/core_pattern to absolute path, if they already aren't. - lib-storage: Fix mailbox list index records without guid having invalid - flags +M src/master/common.h +M src/master/main.c +M src/master/service-process.c - With LAYOUT=index the mailbox is found with its GUID. If it doesn't exist, - the mailbox has to be either \NonExistent or \NoSelect. It probably doesn't - make much difference which one, so we'll fix them by adding \NoSelect. +2018-03-01 18:37:43 +0200 Timo Sirainen (ab1b7f2c5) - With other layouts the GUID is allowed to be empty, because it can be looked - up from the actual mailbox. + master: Add explanation URL to "core dumps disabled" and "core not dumped" + errors -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h -2017-05-18 23:06:20 +0300 Timo Sirainen (0ab7379e9) +M src/master/service-process.c - lib-storage: Fix mailbox list index records with name_id=0 +2018-02-19 19:22:42 +0200 Aki Tuomi (b194576cd) - name_id=0 isn't valid, so it needs to be changed and writen to the disk. The - write-to-disk part wasn't working. + global: Use unix_socket capability in connection.c -M src/lib-storage/list/mailbox-list-index.c + This is more reliably way to correctly create input stream with unix socket + capability for passing fd's around -2017-05-19 09:45:28 +0300 Timo Sirainen (90caca5b4) +M src/imap-hibernate/imap-hibernate-client.c +M src/imap/imap-master-client.c - lib: Fix memory leak in test-istream-concat +2018-02-19 19:09:46 +0200 Aki Tuomi (2a2cdd98b) + lib: connection - only switch created iostreams -M src/lib/test-istream-concat.c + Fixes imap-hibernate: Fatal: master: service(imap-hibernate): child killed + with signal 11 (core dumps disabled) -2017-05-18 22:18:15 +0300 Timo Sirainen (8b4a5a209) + Broken in 086b73efd1a5812a64acc951366a499d325509a6 - lib: Fix crash when seeking istream-concat to EOF and trying to read it +M src/lib/connection.c +2018-01-28 00:14:21 +0100 Stephan Bosch (689971234) -M src/lib/istream-concat.c -M src/lib/test-istream-concat.c + submission: Properly handle omission of required authentication for relay + connection. -2017-05-18 21:10:33 +0300 Timo Sirainen (c8be24bae) + Particularly, do not forward the 530 error to the client. Instead, log the + problem and close the client connection with an internal error. - imapc: Make sure a valid UIDVALIDITY is returned by SELECT +M src/submission/submission-commands.c - Fixes errors such as: Error: Synchronization corrupted index header - (in-memory index): uidvalidity=0, but next_uid=9 +2018-01-28 00:10:11 +0100 Stephan Bosch (f199f594a) -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.c + lib-smtp: server: Fix overwriting a previously submitted reply. -2017-05-18 21:08:23 +0300 Timo Sirainen (d13fe7913) + The submitted flag was not reset, nor was the replies_submitted counter + decreased. This caused assertion failures. - imapc: Fix assert-crash if server doesn't send EXISTS reply to SELECT +M src/lib-smtp/smtp-server-reply.c - Fixes: Panic: file imapc-sync.c: line 477 (imapc_sync_index): assertion - failed: (mbox->sync_fetch_first_uid == 1) +2018-03-05 21:02:49 +0100 Stephan Bosch (e7482beba) -M src/lib-storage/index/imapc/imapc-storage.c + submission: Limit the set of capabilities to those that are actually + supported. -2017-05-18 20:18:24 +0300 Timo Sirainen (dacfe2acf) + Particularly, the XCLIENT capability was inappropriately enabled when the + backend MTA announced support. XCLIENT is not supported by Dovecot + post-login. - lib-imap-client: Change server IP only on connect() failures +M src/submission/submission-client.c +M src/submission/submission-common.h - Also log an warning-level message about it. This is mainly useful to see - that a slow connection could be caused by a connect() timeout. Since more - IPs are still available, it's not yet an error. +2018-03-01 14:53:11 +0100 Stephan Bosch (46cae2d2d) -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-connection.h + lib-smtp: server: Only accept XCLIENT command when the XCLIENT capability is + active. -2017-05-18 19:42:03 +0300 Timo Sirainen (ec7aec974) + Report "502 Unsupported command" otherwise. Before, it would complain about + the client not being trusted, which is confusing. - imapc: Fix infinite reconnection when server keeps sending corrupted state +M src/lib-smtp/smtp-server-cmd-xclient.c +M src/lmtp/client.c +M src/submission-login/client.c - When corrupted state was found, imapc_client_mailbox_reconnect() is called - to reconnect. This call skipped the normal "is it safe to reconnect?" checks - causing potentially infinite reconnections. +2018-03-01 14:52:06 +0100 Stephan Bosch (34f492adf) -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-connection.h -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.c + lib-smtp: client: Make clear that XCLIENT is not sent if the server has no + support. -2017-05-18 19:40:04 +0300 Timo Sirainen (5e1694a57) - lib-imap: imap_parser_unref() should always set parser=NULL +M src/lib-smtp/smtp-client-connection.c - Not just when the last reference is cleared. This is how *_unref()s should - work everywhere in Dovecot. This fixes a bug in lib-imap-client where a - parser could have been accessed after it was already freed. +2017-12-23 22:51:37 +0100 Stephan Bosch (57d3c493a) -M src/lib-imap/imap-parser.c + lib-smtp: client: Add assertion to smtp_client_command_write(). -2017-05-18 18:09:56 +0300 Timo Sirainen (cd56eb08b) + Makes sure it is not used after the command is submitted. - imapc: Avoid resending duplicate FETCH when reconnecting during the initial - sync +M src/lib-smtp/smtp-client-command.c +2017-12-23 22:49:57 +0100 Stephan Bosch (ee9ceafb2) -M src/lib-storage/index/imapc/imapc-sync.c + lib-smtp: client: Fix smtp_client_command_name_equals() to work properly + after the command is submitted. -2017-05-18 18:01:27 +0300 Timo Sirainen (890b2c9bb) + At command submission, CRLF is appended to command data. This messed up the + name comparison. This in turn caused a spurious QUIT command to be sent to + the server at connection close. - imapc: If initial SELECT fails, don't resend it twice on reconnect. +M src/lib-smtp/smtp-client-command.c +2017-12-23 22:14:16 +0100 Stephan Bosch (18f762ed7) -M src/lib-storage/index/imapc/imapc-storage.c + lib-smtp: client: Make smtp_client_connection_commands_abort() more reliable + by copying the command lists. -2017-05-18 17:36:27 +0300 Timo Sirainen (7eb0f6c02) + Copy the current lists of queued and waiting commands and reference each + command before calling smtp_client_command_abort(). Aborting one command can + cause other dependent commands to be aborted (in a transaction or from + submission service), which could have caused trouble in this function. - lib-imap-client: Avoid infinite reconnection loops when retrying command - fails +M src/lib-smtp/smtp-client-command.c +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-private.h - reconnect_command_count wasn't calculated correctly, because the SELECT and - potentially other following sync commands weren't included in it. +2017-12-23 22:04:13 +0100 Stephan Bosch (0ac8caa0e) -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c + lib-smtp: client: Make smtp_client_connection_commands_fail_reply() more + reliable by copying the command lists. -2017-05-18 12:32:12 +0300 Timo Sirainen (5fbdfc545) + Copy the current lists of queued and waiting commands and reference each + command before calling smtp_client_command_fail_reply(). Failing one command + can cause other dependent commands to be aborted (in a transaction or from + submission service), which could have caused trouble in this function. + Problems would likely occur at connection disconnect. - lib: Add dovecot_build_info variable containing Dovecot build information. +M src/lib-smtp/smtp-client-command.c +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-private.h - By default this includes the version, including the git hash. The idea is - that this version information would be available in all the core dumps. +2018-02-01 23:04:12 +0200 Timo Sirainen (3d61168a1) - The DOVECOT_BUILD_INFO can be overridden by compiling with: + dsync: Log a warning if copying a mail fails unexpectedly - DOVECOT_BUILD_INFO='"build info"' make + Don't log a warning if it happens because the source message was expunged. + That's an expected failure. -M src/lib/lib.c -M update-version.sh +M src/doveadm/dsync/dsync-mailbox-import.c -2017-05-16 17:53:23 +0300 Timo Sirainen (88bb9783d) +2018-03-07 15:14:52 +0100 Stephan Bosch (f431eff6b) - auth: If passdb/userdb ldap has blocking=yes, auth master shouldn't connect - to ldap + submission-login: Only send HELO domain to post-login service when it is + valid. -M src/auth/passdb-ldap.c -M src/auth/userdb-ldap.c +M src/submission-login/client-authenticate.c -2017-05-18 11:57:38 +0300 Timo Sirainen (0776684f9) +2018-03-07 15:03:42 +0100 Stephan Bosch (d70971de9) - director: Add old host's up/down and vhost count parameters to - director_flush_socket + lib-smtp: server: Fix application of pre-login HELO domain when no + post-login HELO is issued. - The "down" status allows the script to determine whether it should try to - perform any work on the old host. The vhost count may be unnecessary, but - might be useful for some purpose. + The substituted domain was not marked as valid, which caused the HELO field + of the produced received line to be set to 'unknown'. -M src/director/director.c -M src/director/director.h +M src/lib-smtp/smtp-server-cmd-mail.c -2017-04-30 12:31:48 +0300 Timo Sirainen (0da3e95e5) +2018-03-04 23:43:55 +0100 Stephan Bosch (ab4b3fd00) - dsync: Try to commit transactions every dsync_commit_msgs_interval messages + lib-smtp: server: RCPT command: Make sure conn->state.pending_rcpt_cmds + cannot decrement through zero. - This was first attempted to be implemented by - ec0cc8fa647794e44a1afaa448f495a713048dc4, but it was later partially - reverted by 5973d496b16721af6d2c1fa90b016aacddf13554. This current commit - should fix its problems. + Added assertion. -M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-settings.h -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.h -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-import.h +M src/lib-smtp/smtp-server-cmd-rcpt.c -2017-05-12 12:44:27 +0300 Josef 'Jeff' Sipek (00bc3011b) +2018-03-04 23:42:45 +0100 Stephan Bosch (f0908f013) - lib-storage: add a mail user pre-deinit vfunc + lib-smtp: server: MAIL command: Make sure conn->state.pending_mail_cmds + cannot decrement through zero. - This allows plugins to perform checks right before the deinit call. + Added assertion. -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h +M src/lib-smtp/smtp-server-cmd-mail.c -2017-05-04 19:59:41 +0300 Timo Sirainen (ab396a8a0) +2018-03-04 23:35:53 +0100 Stephan Bosch (0f9b9561c) - imapc: Try to merge STOREs together as much as possible when syncing + lib-smtp: server: Fix double decrement of RCPT pending counter upon error. + The pending counter was sometimes decremented twice in specific error + conditions, leading to an assert panic in the DATA command. This was caused + by some dead code. If the MAIL command failed in a pipeline before the RCPT + command, the assert was triggered. -M src/lib-storage/index/imapc/imapc-sync.c -M src/lib-storage/index/imapc/imapc-sync.h + Panic was: -2017-05-05 15:20:05 +0300 Timo Sirainen (d9d4a247b) + Panic: file smtp-server-cmd-data.c: line 354 (cmd_data_start): assertion + failed: (conn->state.pending_mail_cmds == 0 && conn->state.pending_rcpt_cmds + == 0) - lib-storage: Avoid unnecessary UIDNEXT lookups after saving a mail +M src/lib-smtp/smtp-server-cmd-rcpt.c - The vsize checking code was expecting that this would always be a cheap - operation, but with imapc code it could trigger a remote STATUS (UIDNEXT) - call. Do this only when we've checked that this mailbox is updating vsize - header at all. +2018-02-01 00:14:55 +0100 Stephan Bosch (61f649746) -M src/lib-storage/index/index-mailbox-size.c + lib-lda: Parse Return-Path header using RFC5322 (IMF) "path" syntax, rather + than RFC5321 (SMTP) "Path" syntax. -2017-05-12 15:42:31 +0300 Timo Sirainen (c7a5b3b62) + SMTP does not allow white space, which causes all kinds of trouble when the + address is parsed from a header field. - imapc-quota: Avoid sending unnecessarily many GETQUOTA[ROOT] commands +M src/lib-lda/mail-deliver.c - The last_refresh == ioloop_timeval check didn't work, because the refresh - itself updated ioloop_timeval. This caused a single quota lookup to issue - multiple GETQUOTA[ROOT] commands to imapc. +2018-02-01 00:08:40 +0100 Stephan Bosch (435e4ffe5) -M src/plugins/quota/quota-imapc.c + lib-mail: message-address: Add support for parsing RFC5322 "path" syntax. -2017-05-10 12:44:25 +0300 Timo Sirainen (be741f4c5) + This is either a single angle-addr or just <>. This path syntax differs from + the RFC5321 "Path" syntax in that it allows whitespace, which is very + important when it is parsed from a header. - doveadm mailbox status: Add "firstsaved" field. +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h +M src/lib-mail/test-message-address.c +2018-03-12 12:42:46 +0200 Ville Savolainen (db0373bfb) -M doc/man/doveadm-mailbox.1.in -M src/doveadm/doveadm-mail-mailbox-status.c + Fixup "lib-mail: message_address_write() - don't crash with NULL address" -2017-05-09 14:29:04 +0300 Aki Tuomi (962cc84da) + Remove content that did not belong to + 9f2fe2782224266bf2a403f430de011cf3b9da9d - lib-index: Add mail_cache_expunge_count +M src/lib-mail/message-address.c - It can be called to correctly handle cache counters when records are - removed. +2018-02-02 18:07:43 +0200 Timo Sirainen (6418419ec) -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache-sync-update.c + lib-storage: Fix mailbox rename checking child mailbox name lengths -2017-05-02 12:18:40 +0300 Timo Sirainen (ed2df3534) + It was supposed to prevent allowing renames that would cause any child + mailbox name to be too long. However, the check wasn't working. - lib-imap: imap_append_string_for_humans() - Change CR/LF to space +M src/lib-storage/mail-storage.c - Practically this shouldn't matter, because in email headers a CR/LF is - always followed by a space/tab. But maybe this can be used for some other - purposes in future, and it makes the unit tests clearer. :) +2018-03-01 17:59:34 +0200 Timo Sirainen (59eb3b664) -M src/lib-imap/imap-quote.c -M src/lib-imap/test-imap-quote.c + lib-storage: Fix memory leak when search accessed headers but found no mails -2017-05-12 11:13:09 +0300 Timo Sirainen (5d231243a) + For example fetching headers with UID FETCH for a nonexistent UID. - lib-storage: Add missing ATTR_FORMAT to mail_set_mail_cache_corrupted() +M src/lib-storage/index/index-mail.c +2018-03-01 17:55:50 +0200 Timo Sirainen (5d3a81e1b) -M src/lib-storage/mail-storage-private.h + lib-storage: Code cleanup - remove unnecessary temporary variable -2017-05-09 14:01:07 +0300 Aki Tuomi (be2c388bd) - lib-storage: Use new mail_cache_set_seq_corrupted_reason +M src/lib-storage/index/index-mail.c +2018-01-29 08:43:05 -0500 Josef 'Jeff' Sipek (8c6e305ad) -M src/lib-storage/index/index-mail-binary.c -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c + global: start relying on file_lock_free(NULL) being a no-op -2017-05-09 14:00:38 +0300 Aki Tuomi (12fef0362) + Cleanup performed with the following semantic patch: - lib-index: Add mail_cache_set_seq_corrupted_reason + @@ + expression E; + @@ - Marks a seq in cache corrupted, and removes that instead of the whole cache. + - if (E != NULL) { + - file_lock_free(&E); + - } + + file_lock_free(&E); M src/lib-index/mail-cache.c -M src/lib-index/mail-cache.h +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/mail-autoexpunge.c +M src/lib/file-lock.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c -2017-05-12 13:35:06 +0300 Aki Tuomi (b9d46a540) +2018-01-29 08:41:03 -0500 Josef 'Jeff' Sipek (e1d3ec5f9) - lib-storage: Remove index_storage_save_continue + global: start relying on mailbox_header_lookup_unref(NULL) being a no-op - It was not intended for v2.2 + Cleanup performed with the following semantic patch: -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-storage.h + @@ + expression E; + @@ -2017-05-12 07:47:56 +0300 Aki Tuomi (7b6002ebc) + - if (E != NULL) { + - mailbox_header_lookup_unref(&E); + - } + + mailbox_header_lookup_unref(&E); - lib-storage: Unconstify test functions +M src/doveadm/doveadm-mail-iter.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/imap/imap-fetch.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-search.c +M src/plugins/mail-log/mail-log-plugin.c +M src/plugins/virtual/virtual-mail.c - Removes a compiler warning +2018-01-29 08:40:27 -0500 Josef 'Jeff' Sipek (4db31f1f4) -M src/lib-storage/test-mail-search-args-simplify.c + lib-storage: mailbox_header_lookup_unref(NULL) should be a no-op -2017-05-12 07:41:27 +0300 Aki Tuomi (cacb6b19e) - lib: Use t_malloc instead of t_malloc_no0 +M src/lib-storage/mailbox-header.c - Broken in 4792d4bd +2018-01-29 08:38:45 -0500 Josef 'Jeff' Sipek (27aed64c7) -M src/lib/strfuncs.c + lib-mail: start relying on mail_html2text_deinit(NULL) being a no-op -2017-05-02 15:38:00 +0300 Timo Sirainen (4792d4bdd) + Cleanup performed with the following semantic patch: - lib: Add dec2str_buf() + @@ + expression E; + @@ - Conflicts: - src/lib/strfuncs.c + - if (E != NULL) { + - mail_html2text_deinit(&E); + - } + + mail_html2text_deinit(&E); -M src/lib/strfuncs.c -M src/lib/strfuncs.h +M src/lib-mail/message-snippet.c -2017-05-02 18:40:43 +0300 Timo Sirainen (ca9643929) +2018-01-29 08:38:16 -0500 Josef 'Jeff' Sipek (9c22e26cf) - master: Send SIGQUIT to processes running at deinit to close socket - listeners. + lib-mail: mail_html2text_deinit(NULL) should be a no-op - This allows Dovecot to be restarted even when some lmtp/doveadm process is - running for a long time. Otherwise it would keep the inet_listener socket - open and prevent the new Dovecot from binding to the port. -M src/master/service-monitor.c +M src/lib-mail/mail-html2text.c -2017-05-02 16:13:08 +0300 Timo Sirainen (64f36abd3) +2017-11-09 10:37:34 -0500 Josef 'Jeff' Sipek (f5ab340f1) - lib-master: When running under master, close listeners immediately on - SIGQUIT + global: start relying on ssl_iostream_destroy(NULL) being a no-op + Cleanup performed with the following semantic patch: -M src/lib-master/master-service.c + @@ + expression E; + @@ -2017-05-02 18:39:06 +0300 Timo Sirainen (aceadf8a8) + - if (E != NULL) { + - ssl_iostream_destroy(&E); + - } + + ssl_iostream_destroy(&E); - lib-master: Remove listener's IO earlier if possible +M src/doveadm/client-connection-tcp.c +M src/doveadm/doveadm-dsync.c +M src/lib-smtp/smtp-server-connection.c +M src/login-common/client-common.c +M src/login-common/login-proxy.c - This is needed for the next change to work properly. +2017-11-09 10:39:25 -0500 Josef 'Jeff' Sipek (ba110cd15) -M src/lib-master/master-service.c + ssl-iostream: ssl_iostream_destroy(NULL) should be a no-op -2017-05-02 15:56:40 +0300 Timo Sirainen (253e06979) - master: Wait more precisely 5 secs at deinit for child processes to die. +M src/lib-ssl-iostream/iostream-ssl.c - Use milliseconds granularity instead of seconds. +2017-11-09 10:34:21 -0500 Josef 'Jeff' Sipek (90c587569) -M src/master/service-monitor.c + global: start relying on iostream_proxy_unref(NULL) being a no-op -2017-05-02 15:41:41 +0300 Timo Sirainen (e1c225a51) + Cleanup performed with the following semantic patch: - lib: Use lib_signals_syscall_error() for write() failure in signal handler + @@ + expression E; + @@ + - if (E != NULL) { + - iostream_proxy_unref(&E); + - } + + iostream_proxy_unref(&E); -M src/lib/lib-signals.c +M src/login-common/client-common.c +M src/login-common/login-proxy.c -2017-05-02 15:41:04 +0300 Timo Sirainen (c0a5fa236) +2017-11-09 10:36:02 -0500 Josef 'Jeff' Sipek (431971ab7) - lib: Add lib_signals_syscall_error() + lib: iostream_proxy_unref(NULL) should be a no-op -M src/lib/lib-signals.c -M src/lib/lib-signals.h +M src/lib/iostream-proxy.c -2017-05-09 13:15:42 +0300 Timo Sirainen (983dd2b5a) +2017-11-09 10:30:51 -0500 Josef 'Jeff' Sipek (e741abe85) - man: Fix doveadm-flags examples + global: start relying on str_free(NULL) being a no-op - Patch by Frank Ebert + Cleanup performed with the following semantic patch: -M doc/man/doveadm-flags.1.in + @@ + expression E; + @@ -2017-05-09 12:25:49 +0300 Aki Tuomi (e56789765) + - if (E != NULL) { + - str_free(&E); + - } + + str_free(&E); - auth: Do not use AUTH_SUBSYS_MECH in logging when request->mech is NULL +M src/imap/imap-fetch.c +M src/lib-fs/fs-metawrap.c +M src/lib-fts/fts-filter.c +M src/lib-http/http-client-request.c +M src/lib-storage/index/cydir/cydir-sync.c +M src/lib-storage/index/index-search-mime.c +M src/lib/istream.c +M src/login-common/client-common.c +M src/plugins/acl/acl-attributes.c +M src/plugins/fts-solr/fts-backend-solr.c - This can happen when a lookup is done instead of authentication. +2017-11-09 10:32:32 -0500 Josef 'Jeff' Sipek (a7e32badb) - Fixes auth: Panic: file auth-request.c: line 2560 (get_log_prefix): - assertion failed: (auth_request->mech != NULL) + lib: str_free(NULL) should be a no-op -M src/auth/auth-request.c -2017-05-08 12:24:52 +0300 Aki Tuomi (395b6f66f) +M src/lib/str.c - passdb-imap: Make sure ssl verification is possible with current settings +2018-02-19 13:27:39 +0100 Stephan Bosch (f904b00fb) + lib-http: client: Add event fields for the number of bytes sent and received + for each request in the last attempt. -M src/auth/passdb-imap.c -2017-05-08 12:24:21 +0300 Aki Tuomi (f1cd65e3e) +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c - passdb-imap: Add ssl_ca_file setting +2018-02-19 13:24:57 +0100 Stephan Bosch (bac5c5855) - Allow setting SSL trust roots from a file + lib-http: response parser: Record input stream offset for the start of the + last parsed response. -M src/auth/passdb-imap.c -2017-04-28 20:28:23 +0300 Aki Tuomi (a92ae4ab1) +M src/lib-http/http-response-parser.c +M src/lib-http/http-response-parser.h - passdb-imap: Add option to control certificate verification +2018-02-19 13:20:11 +0100 Stephan Bosch (074fb5a42) - Turn it on by default + lib-http: message parsers: Record beginning of parsed data. -M src/auth/passdb-imap.c -2017-05-08 13:35:35 +0300 Aki Tuomi (66adc488b) +M src/lib-http/http-message-parser.h +M src/lib-http/http-request-parser.c +M src/lib-http/http-response-parser.c - lib-ssl-iostream: Support IP address SANs +2018-01-21 15:46:49 +0100 Stephan Bosch (457bd50cd) + lib-http: client: Trigger special events when a request is finished, retried + or redirected. -M src/lib-ssl-iostream/iostream-openssl-common.c -2017-05-05 12:35:23 +0300 Timo Sirainen (172461529) +M src/lib-http/http-client-request.c - imap: Set FETCH transactions hidden only when \Seen flags are implicitly set +2018-01-21 16:19:41 +0100 Stephan Bosch (187dd208c) - This simplifies implementing some plugins and has no downsides to core - functionality. + lib-http: client: Record last status code in the request object. -M src/imap/imap-fetch.c -2017-05-04 17:31:47 +0300 Timo Sirainen (914fd4146) +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c - lib-storage: Fix memory leak in mail_search_args_simplify() +2018-01-21 16:08:55 +0100 Stephan Bosch (6d1afbe24) - The leaks happened when search args were already initialized (which they - usually were at this point) and some of the args were dropped entirely. + lib-http: client: Reset redirect counter when the request is retried. - Improved the unit test to initialize search args before calling the - simplify, so valgrind would notice if there are any leaks. + The absence of this reset caused problems when there was a redirect limit + and the request was retried, in which case the limit is reached too soon. - Conflicts: - src/lib-storage/test-mail-search-args-simplify.c +M src/lib-http/http-client-request.c -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/test-mail-search-args-simplify.c +2018-01-21 16:06:19 +0100 Stephan Bosch (0333014cd) -2017-05-02 15:02:25 +0300 Timo Sirainen (e0b4f4c4f) + lib-http: client: Add "host" and "port" fields to request event. - lib-master: Add comments to struct master_service_connection - Conflicts: - src/lib-master/master-service.h +M src/lib-http/http-client-request.c -M src/lib-master/master-service.h +2018-01-21 16:00:31 +0100 Stephan Bosch (ba02f29f9) -2017-04-28 14:35:36 +0300 Timo Sirainen (f1d136a7d) + lib-http: client: Use the new http_url_get_port*() functions. - lib-storage: When save is aborted, close dest_mail without crashing - Fixes: Panic: file mail-index-transaction-update.c: line 1023 - (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= - mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq)) +M src/lib-http/http-client-request.c - Because cache was still attempted to be updated, but the mail was already - expunged from index. +2018-01-21 15:54:18 +0100 Stephan Bosch (71c28aac4) -M src/lib-storage/index/index-storage.c + lib-http: url: Add functions that obtain the effective port for the URL. -2017-04-28 14:06:43 +0300 Timo Sirainen (d670c0cf2) + When no port is set for the URL, it is set to 0. These functions substitute + the applicable default. - lib-storage: Move backend code to a common index_storage_save_abort_last() +M src/lib-http/http-url.h - Conflicts: - src/lib-storage/index/index-storage.c - src/lib-storage/index/index-storage.h +2018-01-21 15:50:37 +0100 Stephan Bosch (fb954a8f5) -M src/lib-storage/index/dbox-multi/mdbox-save.c -M src/lib-storage/index/dbox-single/sdbox-save.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-storage.h -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/mbox/mbox-save.c + lib-http: Create http-common.h, which contains global definitions shared by + client and server. -2017-04-27 14:09:08 +0300 Aki Tuomi (ca9ca6f68) + Currently contains only the default HTTP port definitions that used to be + private to the client. - auth: Log reason for skipping passdb +M src/lib-http/Makefile.am +M src/lib-http/http-client-private.h +M src/lib-http/http-client.c +M src/lib-http/http-client.h +A src/lib-http/http-common.h +M src/lib-http/http-server.h +2018-02-23 21:09:42 +0100 Stephan Bosch (c2de71917) -M src/auth/auth-request.c + lmtp: proxy: Do not forward 421 reply (server shutdown) from backend. -2017-04-28 12:49:37 +0300 Aki Tuomi (3edea8753) + This closes the LMTP connection implicitly. Instead, translate it into a 451 + 4.4.0 response, just like all the other connection-related failures. - auth: Add test suite for username filter +M src/lmtp/lmtp-proxy.c +2018-02-23 20:49:48 +0100 Stephan Bosch (6fb19467c) -M src/auth/Makefile.am -A src/auth/test-username-filter.c + lib-smtp: client: transaction: Better document the failure handling for + incomplete transactions. -2017-04-28 10:25:14 +0300 Aki Tuomi (05090e865) - auth: Refactor auth to use libauth.la +M src/lib-smtp/smtp-client-transaction.h - This makes writing new unit tests easier, as you can link to libauth.la. +2018-02-23 20:43:50 +0100 Stephan Bosch (82dd7ce14) -M src/auth/Makefile.am + lib-smtp: client: transaction: Don't call the DATA callbacks upon failure + until the transaction is complete. -2017-04-28 12:51:20 +0300 Aki Tuomi (6b2925709) + The transaction is not complete until smtp_client_transaction_send() is + called. - auth: Add username_filter for passdb block +M src/lib-smtp/smtp-client-private.h +M src/lib-smtp/smtp-client-transaction.c - username_filter lets you specify one or more pattern(s) for including or - excluding users. exclusion patterns are denoted with ! prefix. +2018-02-23 18:21:49 +0100 Stephan Bosch (f9ef860a3) - if any exclude matches the username, passdb will be skipped. if any - inclusions is specified, and the username does not match one of them, passdb - will be skipped. + lib-smtp: client: transaction: Properly advance the transaction to the DATA + state once the DATA command is to be sent. -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/auth-settings.c -M src/auth/auth-settings.h -M src/auth/passdb.c -M src/auth/passdb.h -2017-04-27 11:53:13 +0300 Aki Tuomi (0859ad412) +M src/lib-smtp/smtp-client-transaction.c - auth: Use MECH subsystem when logging error about skipping all password - databases +2018-02-23 18:16:57 +0100 Stephan Bosch (d3334edc2) - Otherwise it will assert-crash because all password databases were skipped. + lib-smtp: client: transaction: Use the correct callback for finish timeout. -M src/auth/auth-request.c -2017-04-27 12:54:20 +0300 Timo Sirainen (d644a2e2a) +M src/lib-smtp/smtp-client-transaction.c - lib-storage: mail_search_arg_to_imap() - Fix writing invalid keywords +2018-02-07 16:31:12 +0200 Timo Sirainen (3d2dd93d0) - Just write the original invalid keyword string as output. It might not be - entirely invalid - just invalid within this mailbox (e.g. a mailbox doesn't - allow new keywords). + global: Set extra_groups=$default_internal_group for various services -M src/lib-storage/mail-search-args-imap.c + Services with user=$default_internal_user are expected to already set the + group properly. This change is adding the group for mail processes. -2017-04-27 12:53:18 +0300 Timo Sirainen (0674091f8) +M src/doveadm/doveadm-settings.c +M src/imap-urlauth/imap-urlauth-worker-settings.c +M src/imap/imap-settings.c +M src/indexer/indexer-worker-settings.c +M src/lmtp/lmtp-settings.c +M src/pop3/pop3-settings.c +M src/submission/submission-settings.c - lib-storage: Fix searching when search query has invalid keywords. +2018-02-07 16:00:46 +0200 Timo Sirainen (12896fac9) - For example "SEARCH KEYWORD ]" was returning all mails instead of nothing. + lib: restrict_access_by_env() - Preserve RESTRICT_SETEXTRAGROUPS if root + isn't dropped -M src/lib-storage/index/index-search.c -M src/lib-storage/mail-search.h + This way service { extra_groups } is preserved for the whole duration of the + process lifetime (e.g. lmtp, doveadm) -2017-04-27 12:50:13 +0300 Timo Sirainen (0682df00d) +M src/lib/restrict-access.c - lib-index: mail_index_update_keywords() - don't assert if adding/removing 0 - keywords +2018-02-07 13:06:06 +0200 Timo Sirainen (86e748326) - Although it would be nice for the caller to check it, it's easier to do - here. It's mainly a problem with mailbox_keywords_create_valid() that may - unexpectedly create empty keywords. + imap-hibernate: Change imap-hibernate default socket permissions to allow + default_internal_group -M src/lib-index/mail-index-transaction-update.c + It would be enough to allow only imap processes access to it, but it + shouldn't really harm to allow other processes access to it also. -2017-04-26 23:41:03 +0300 Timo Sirainen (1164a6537) +M src/imap-hibernate/imap-hibernate-settings.c - quota: imapc backend now never enforces the quota itself +2018-02-07 13:05:09 +0200 Timo Sirainen (cc84498d3) - It just causes a lot of GETQUOTA/GETQUOTAROOT calls to remove. In theory we - could make this optional, but I doubt anyone would want it. + stats: Change stats-writer default socket permissions to allow + default_internal_group -M src/plugins/quota/quota-imapc.c + It's important that all dovecot processes can send statistics to the stats + process. -2017-04-26 23:43:24 +0300 Timo Sirainen (7dde6c642) +M src/stats/stats-settings.c - lib-storage: Fix crash in mail_get_parts() with a special plugin +2018-02-07 13:04:03 +0200 Timo Sirainen (51cc5e29c) - If plugin hooks into mail_get_stream() which causes data->parts to be set, - this code crashed with: + dict: Change dict and dict-async default socket permissions to allow + default_internal_group - Panic: file index-mail.c: line 1163 (index_mail_parse_body): assertion - failed: (data->parser_ctx != NULL) + Many mail processes need to talk to dict. This makes it easier to enable + dict without having to configure permissions. -M src/lib-storage/index/index-mail.c +M src/dict/dict-settings.c -2017-04-26 23:13:20 +0300 Timo Sirainen (16672e94f) +2018-02-07 13:03:23 +0200 Timo Sirainen (5cf6951e3) - imapc: Don't send NOOP on sync if MAILBOX_SYNC_FLAG_FAST is set + master: Add default_internal_group setting, defaulting to "dovecot" - Fast syncing should do only the minimal amount of work. + It's expected that this is the primary group of the default_internal_user. -M src/lib-storage/index/imapc/imapc-sync.c + This group will be used to provide access to sockets that are generally + required by all Dovecot processes, but aren't safe enough to be allowed + completely open access from untrusted processes. -2017-04-26 15:04:23 +0300 Timo Sirainen (10b70dc2e) +M src/master/master-settings.c +M src/master/master-settings.h - imap: Allow plugins to hook into syncing. +2018-02-16 00:44:07 +0100 Stephan Bosch (eaff427e5) - Ideally all of the existing pieces in the syncing code would start using - this at some point, so their code could be moved to a more logical location. + lib-smtp: server: Remove inappropriate assert from MAIL command. -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-sync-private.h -M src/imap/imap-sync.c + When the MAIL command is next to reply, it is possible to have RCPT commands + that are still pending. -2017-04-26 14:57:40 +0300 Timo Sirainen (98c5b9fc8) +M src/lib-smtp/smtp-server-cmd-mail.c - imap: Move struct imap_sync_context to imap-sync-private.h +2018-02-17 15:02:53 +0100 Stephan Bosch (2164b0f0a) + lib-http: client: Simplified return code handling in + http_client_request_send_real(). -M src/imap/Makefile.am -A src/imap/imap-sync-private.h -M src/imap/imap-sync.c -2017-04-18 15:55:08 +0300 Timo Sirainen (644ec4188) +M src/lib-http/http-client-request.c - lib-storage: mail_search_arg_to_imap() - minor keywords writing optimization +2018-02-17 14:54:47 +0100 Stephan Bosch (42d59cb71) - Avoid an extra str_delete() by checking whether the parenthesis are needed. + lib-http: client: Make sure output is used only when valid in + http_client_request_send_real(). -M src/lib-storage/mail-search-args-imap.c -2017-04-18 15:51:39 +0300 Timo Sirainen (fe4389584) +M src/lib-http/http-client-request.c - lib-storage: mail_search_arg_to_imap() - minor FLAGS writing optimization +2018-02-17 12:03:41 +0100 Stephan Bosch (98728242f) - Avoid an extra str_delete() by immediately calculating whether the - parenthesis are needed. + lib-http: client: Uncork and flush the output stream explicitly after + continuing request payload. -M src/lib-storage/mail-search-args-imap.c + This allows detecting any output stream errors. -2017-04-18 15:38:59 +0300 Timo Sirainen (cd955fdc0) +M src/lib-http/http-client-connection.c - lib: Add bits_is_power_of_two() +2018-02-17 15:17:06 +0100 Stephan Bosch (e1c3c7107) + lib-http: client: Hold reference to the connection while continuing request + payload. -M src/lib/bits.h -M src/lib/test-bits.c + Subsequent changes may cause the connection to be destroyed while sending. -2016-04-19 21:14:37 +0300 Timo Sirainen (cafe14c74) +M src/lib-http/http-client-connection.c - lib: Fixed bits_required64() with 32bit systems. +2018-02-17 12:01:47 +0100 Stephan Bosch (c742c97d1) - Broken by 84f697c5e30565823619abaaeb57164c789d4b66. + lib-http: client: Continue sending request payload in a separate function. -M src/lib/bits.h -2016-02-05 15:57:30 +0200 Phil Carmody (70176c9b9) +M src/lib-http/http-client-connection.c - lib: bits - GCC (and clang) provide bit-twiddle intrinsics, use them +2018-02-17 15:08:44 +0100 Stephan Bosch (c13f150f6) - Signed-off-by: Phil Carmody + lib-http: client: Hold reference to the connection while sending the next + request. -M src/lib/bits.c -M src/lib/bits.h + Subsequent changes may cause the connection to be destroyed while sending. -2016-02-03 18:34:13 +0200 Phil Carmody (b9735121d) +M src/lib-http/http-client-connection.c - lib: bits - new fractional log-like helper +2018-02-17 11:32:37 +0100 Stephan Bosch (38d87d024) - For stats gathering, where the data can have a wide range of values, you - don't necessarily need the same granularity along the full range of values. - For example, 1ms and 11ms latencies are very different, but 1.001s and - 1.011s latencies are not worth distinguishing. Something logarithmic seems - more apt. Simply looking at power-of-2 sized bands (e.g. doing log2(n)), - however, is too granular, so these new helpers let you specify how fine to - (linearly) subdivide each of those bands. 1 fractional bit splits each power - of 2 band into 2 halves. 2 fractional bits splits each power of 2 band into - 4 quarters, and so on. 0 fractional bits is just log2(). + lib-http: client: Perform output stream error handling in one place. - Exact identification of percentiles is impossible, but it was anyway, as you - simply cannot store all the data required to calculate them. However, a mere - 896 buckets will permit you to have 32 bands per power of 2, 5 fracional - bits. The above example would have buckets such as 2.432s-2.496s, and - 55.3s-56.3s. Assuming smooth distribution lets you calculate percentiles - more accurately, just assume within each bucket is a trapezial distribution. - This holds even if the distribution is multi-modal, which it will be. - However, maths required. - Signed-off-by: Phil Carmody +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c -M src/lib/bits.h +2018-02-17 11:10:05 +0100 Stephan Bosch (1aa3d3851) -2017-04-17 01:14:02 +0300 Andriy Syrovenko (3d6b8ea7b) + lib-http: client: Make http_client_connection_lost() available outside + http-client-connection.c. - auth: Fixed dovecot/auth hanging when child ntlm_auth crashes while - processing an authentication request +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h -M src/auth/mech-winbind.c +2018-02-17 11:08:20 +0100 Stephan Bosch (a3bf9c8ac) -2017-04-26 14:20:49 +0300 Timo Sirainen (86a8cb649) + lib-http: client: Handle output stream errors in a separate function. - imapc: Fix memory leak when closing mailbox with delayed changes +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h -M src/lib-storage/index/imapc/imapc-storage.c +2018-02-17 01:25:50 +0100 Stephan Bosch (979d0f237) -2017-04-25 12:39:04 +0300 Timo Sirainen (ce59b1bdd) + lib-http: client: Flush and check output for errors after uncorking. - imapc: Use UID SEARCH instead of SEARCH + Otherwise, a disconnection event may be missed. - UIDs work better for some broken IMAP servers, so it's safer to use it. +M src/lib-http/http-client-request.c - Keep using sequences for ESEARCH, since servers supporting it aren't at - least yet known to be broken and the search result with sequences is - smaller. +2018-02-17 15:37:20 +0100 Stephan Bosch (0c89791ae) -M src/lib-storage/index/imapc/imapc-search.c + lib-http: server: Simplified return code handling in + http_server_response_send_real(). -2017-04-24 17:59:53 +0300 Timo Sirainen (2c8407185) - quota: Add imapc backend +M src/lib-http/http-server-response.c - This allows using imapc storage with imapc quota. The quota acts as - read-only, so it's used only when the current quota usage is explicitly - asked. +2018-02-17 15:29:20 +0100 Stephan Bosch (e68885782) - The quota can be looked up using either a mailbox name or quota root name. - By default INBOX's quota is looked up. If there are multiple quota roots - returned for the mailbox, only the first quota root returned by the - QUOTAROOT reply is used. + lib-http: server: Make sure output is used only when valid in + http_server_response_send_real(). -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/plugins/quota/Makefile.am -A src/plugins/quota/quota-imapc.c -M src/plugins/quota/quota.c + This avoids the need to hold a reference to it. -2017-04-24 17:58:53 +0300 Timo Sirainen (7f4df18b2) +M src/lib-http/http-server-response.c - quota: Fix namespace deduplication when mailboxes don't have paths. +2018-02-17 01:26:02 +0100 Stephan Bosch (8acedb011) - Nothing requires a mailbox path for quota backends, especially imapc. Still - do namespace deduplication based on alias_for settings. + lib-http: server: Perform output stream error handling in one place. -M src/plugins/quota/quota.c -2017-04-24 17:10:10 +0300 Timo Sirainen (e019007dd) +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-private.h +M src/lib-http/http-server-response.c - imapc: include imapc-client.h in imapc-storage.h +2018-02-17 14:44:49 +0100 Stephan Bosch (5bf01fc9d) - It was already required to be able to successfully include imapc-storage.h. + lib-http: server: Flush and check output for errors after uncorking. -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/index/imapc/imapc-sync.c + Otherwise, a disconnection event may be missed. -2017-04-24 18:13:13 +0300 Timo Sirainen (fd541d4d1) +M src/lib-http/http-server-response.c - imap-plugins: Use client_add_capability() for adding dynamic capabilities +2018-02-17 14:28:36 +0100 Stephan Bosch (aeadb8e4b) + lib-http: server: Handle output stream errors in a separate function. -M src/plugins/imap-acl/imap-acl-plugin.c -M src/plugins/imap-quota/imap-quota-plugin.c -M src/plugins/imap-zlib/imap-zlib-plugin.c -2017-04-24 18:51:53 +0300 Timo Sirainen (2a02927d6) +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-private.h - imap: Use client_add_capability() for adding all dynamic capabilities +2018-02-17 10:26:30 +0100 Stephan Bosch (27d3781aa) + lib-smtp: client: Uncork and flush the output stream explicitly after + sending commands. -M src/imap/imap-client.c + This allows detecting any output stream errors. -2017-04-24 18:12:55 +0300 Timo Sirainen (3f2259e6d) +M src/lib-smtp/smtp-client-connection.c - imap: Add client_add_capability() +2018-02-17 01:46:15 +0100 Stephan Bosch (3fd43b094) + lib-smtp: client: Perform output stream error handling in one place. -M src/imap/imap-client.c -M src/imap/imap-client.h -2017-04-24 13:29:13 +0300 Timo Sirainen (4cce56915) +M src/lib-smtp/smtp-client-command.c +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-private.h - imapc: Add imapc_features=fetch-bodystructure +2018-02-16 23:49:31 +0100 Stephan Bosch (d6f83e187) - This allows using the remote IMAP server's BODY and BODYSTRUCTURE replies. + lib-smtp: client: Flush and check output for errors after uncorking. -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-settings.h -M src/lib-storage/index/imapc/imapc-storage.c + Otherwise, a disconnection event may be missed. -2017-04-24 13:27:43 +0300 Timo Sirainen (36a023555) +M src/lib-smtp/smtp-client-connection.c - lib-storage: Add mail_storage.nonbody_access_fields +2018-02-16 23:40:29 +0100 Stephan Bosch (3a6c4f95a) - This avoids index_mail_update_access_parts_pre() from opening the mail - stream unnecessarily for fields that can be looked up via other methods by - the storage. + lib-smtp: client: Handle output stream errors in a separate function. -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail-storage-private.h -2017-04-24 13:05:48 +0300 Timo Sirainen (1663aa037) +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-private.h - lib-storage: Add index_mail_get_cached_body[structure]() +2018-02-17 01:46:25 +0100 Stephan Bosch (141e29982) - This just moves the code to these functions without changing any of the - logic. + lib-smtp: server: Perform output stream error handling in one place. -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h -2017-04-24 14:04:01 +0300 Timo Sirainen (623ff664e) +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-private.h +M src/lib-smtp/smtp-server-reply.c - lib-imap: Make imap_bodystructure_parse_args() public +2018-02-17 10:37:55 +0100 Stephan Bosch (c116e38a0) + lib-smtp: server: Remove undefined smtp_server_reply_send_more() from + smtp-server-private.h. -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/imap-bodystructure.h -2017-04-24 12:50:10 +0300 Timo Sirainen (b53fb9a65) +M src/lib-smtp/smtp-server-private.h - lib-imap: Add imap_write_arg() to write only a single arg +2018-02-16 10:05:26 +0100 Stephan Bosch (4a823265d) + lib-smtp: server: Flush and check output for errors after uncorking. -M src/lib-imap/imap-util.c -M src/lib-imap/imap-util.h + Otherwise, a disconnection event may be missed. -2017-04-23 19:57:11 +0300 Timo Sirainen (954ba2536) +M src/lib-smtp/smtp-server-connection.c - lib-imap-client: Fix imapc_client_get_capabilities() when called without - connections +2018-02-16 10:13:35 +0100 Stephan Bosch (a7bff44c8) + lib-smtp: server: STARTTLS command: Properly handle output stream flush + error. -M src/lib-imap-client/imapc-client.c -2017-04-23 17:19:36 +0300 Timo Sirainen (57c33cb41) +M src/lib-smtp/smtp-server-cmd-starttls.c - imapc: Fix crash in mailbox_exists() when LAYOUT isn't imapc. +2018-02-16 10:11:01 +0100 Stephan Bosch (cc09ce430) - Especially breaks LAYOUT=none. + lib-smtp: server: Handle output stream errors in a separate function. -M src/lib-storage/index/imapc/imapc-storage.c -2017-04-23 13:35:18 +0300 Timo Sirainen (efcc1c4a6) +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-private.h - imapc: Support imapc_features=search without ESEARCH extension +2018-02-16 09:34:48 +0100 Stephan Bosch (9646fef92) + lib-smtp: server: Use the stream_errno to evaluate output stream errors. -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/index/imapc/imapc-search.h + Code was using global errno. -2017-04-23 19:14:54 +0300 Timo Sirainen (906bc95a5) +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-reply.c - imapc: Make sure client is logged in when checking capabilities +2018-02-16 14:26:11 +0200 Timo Sirainen (b44d1a08c) - Especially with imapc_features=delay-login the capability could have been - looked at before the client was even connected. + lib: Add o_stream_uncork_flush() to both uncork and flush -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c -2017-04-23 18:51:02 +0300 Timo Sirainen (3bcc8dffe) +M src/lib/ostream.h - imapc: Add imapc_mailbox.capabilities +2018-02-07 16:48:28 +0200 Timo Sirainen (a062bf63d) - Use it instead of imapc_client_get_capabilities(). Simplifies the following - patch. + ipc: Change ipc socket's owner to $default_internal_user -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/index/imapc/imapc-sync.c + This is mainly used by director process, which runs as + $default_internal_user. This setting change is always required for director + installations. Also the ipc process itself is already running as + $default_internal_user so this should be a rather safe change. -2017-04-23 18:57:15 +0300 Timo Sirainen (e3efff95a) +M src/ipc/ipc-settings.c - imapc: Rename imapc_storage_has_modseqs() to imapc_mailbox_has_modseqs() +2018-03-06 12:14:25 +0200 Timo Sirainen (9f2fe2782) - Simplifies the following patch. + lib-mail: message_address_write() - don't crash with NULL address -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/index/imapc/imapc-sync.c + message_address_parse() can return NULL on empty address, so writing it + should produce empty address as well. Broken by + 15581297511b658a29c707c6031a258bab7bf1a5 -2017-04-21 12:54:17 +0300 Timo Sirainen (1d567a410) +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c - cassandra: Use fallback consistency for CASS_ERROR_LIB_NO_HOSTS_AVAILABLE - errors +2018-01-06 21:22:11 +0200 Timo Sirainen (d9846c932) - I'm not entirely sure if this is always appropriate, but at least this error - happens every time when attempting to use write_consistency=two when there - is only a single Cassandra node. + ostream-zlib: Ignore missing finish if parent stream is ignoring errors -M src/lib-sql/driver-cassandra.c + This fixes panic with imap_zlib plugin when client enables the IMAP COMPRESS + extension and disconnects: -2017-04-21 20:59:55 +0300 Timo Sirainen (107b2177a) + Panic: file ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed: + (zstream->ostream.finished || zstream->ostream.ostream.stream_errno != 0) - dsync-server: Fix support for dsync_features=empty-header-workaround +M src/lib-compression/ostream-zlib.c - Fixes: Panic: Unknown key: empty_hdr_workaround +2018-01-06 22:11:30 +0200 Timo Sirainen (76838b866) -M src/doveadm/dsync/dsync-ibc-stream.c + doveadm dump: Fix imapzlib to handle input traffic -2017-04-21 13:35:33 +0300 Timo Sirainen (3c998a1ef) + This has been broken with newer Dovecot versions for a while now. - *-login: Add client_vfuncs.send_raw_data() +M src/doveadm/doveadm-zlib.c - This allows login plugins to hook into seeing all the data that is sent to - the imap/pop3 client. +2018-01-24 14:48:36 +0200 Aki Tuomi (dbc6de355) -M src/imap-login/imap-login-client.c -M src/imap-urlauth/imap-urlauth-login.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/pop3-login/client.c + lib-storage: Rename .vsize.lock file to dovecot-vsize.lock -2017-04-21 13:27:18 +0300 Timo Sirainen (3d235c3e6) + .vsize.lock can break maildir++ because it looks like a maildir folder, so + rename it to dovecot-vsize.lock. - imap: Add imap_client_vfuncs.send_tagline() + Introduced in 9963bef6 - This allows plugins to catch all the IMAP command replies. +M src/lib-storage/index/index-mailbox-size.c +M src/plugins/quota/quota-storage.c -M src/imap/imap-client.c -M src/imap/imap-client.h +2017-12-07 11:34:57 +0200 Sergey Kitov (0fe4a1ddf) -2017-04-18 10:23:37 +0300 Timo Sirainen (cd4ca14f6) + lib: array_idx_modifiable changed not to allocate space. - *-login: Unload plugins at deinit. +M src/lib/array.c +M src/lib/array.h -M src/login-common/main.c +2017-12-07 11:00:50 +0200 Sergey Kitov (053041e71) -2017-04-19 15:01:19 +0300 Timo Sirainen (b1e42d680) + global: Change calls to array_idx_modifiable to array_idx_get_space. - lib-storage: Allow mail_add_temp_wanted_fields() to be called before - mail_set_seq*() + Only calls that require space allocation are to be changed. - Quota plugin was already doing this, but it didn't actually work. It was - also crashing with imapc: +M src/auth/main.c +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-index-modseq.c +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-transaction-update.c +M src/lib-storage/index/index-thread-finish.c +M src/lib-storage/index/index-thread-links.c +M src/lib-storage/index/maildir/maildir-keywords.c +M src/lib/hash2.c +M src/lib/ioloop-epoll.c +M src/lib/module-context.h - Panic: file mail-cache-lookup.c: line 341 (mail_cache_field_exists): - assertion failed: (seq > 0) +2017-12-07 10:51:27 +0200 Sergey Kitov (b3cd198c5) -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/index-mail.c + lib: array_idx_get_space is defined as alias to array_idx_modifiable -2017-04-20 19:16:46 +0300 Timo Sirainen (a1cc76a31) - lib-storage: Add mailbox_attribute_unregister_internal[s]() +M src/lib/array.h - This allows plugins to unregister internal attributes when they're unloaded. +2018-02-09 23:57:29 +0100 Stephan Bosch (9d91b7ed5) -M src/lib-storage/mailbox-attribute.c -M src/lib-storage/mailbox-attribute.h + lib-http: server: Recreate connection IO after streams change. -2017-04-13 15:13:19 +0300 Timo Sirainen (07ca9043f) - lib-storage: mail_search_args_simplify() - deduplicate flags +M src/lib-http/http-server-connection.c - This needs to be done in a bit more complicated way because multiple - SEARCH_FLAGS parameters are wanted to be merged together using a single - shared value.flags. Move this merging last after all the deduplication is - done. +2018-02-09 23:56:55 +0100 Stephan Bosch (eb35204a8) -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/test-mail-search-args-simplify.c + lib-http: client: Recreate connection IO after streams change. -2017-04-13 15:09:19 +0300 Timo Sirainen (52a46341c) - lib-storage: mail_search_args_simplify() - simplify "x AND NOT x" +M src/lib-http/http-client-connection.c - Implemented for SEARCH_KEYWORD, SEARCH_TEXT, SEARCH_BODY and SEARCH_HEADER*. - Dates and sizes would need special code, which gets a bit complicated. +2018-02-10 00:07:37 +0100 Stephan Bosch (4a17af3f7) -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/test-mail-search-args-simplify.c + lib-smtp: server: Recreate connection IO after streams change. -2017-04-13 14:05:55 +0300 Timo Sirainen (9af86dfc7) - lib-storage: Add more tests to test-mail-search-args-simplify +M src/lib-smtp/smtp-server-connection.c +2018-02-10 10:29:44 +0100 Stephan Bosch (8df7b1fbc) -M src/lib-storage/test-mail-search-args-simplify.c + lib-http: server: Use the new connection_input_halt/resume() functions. -2017-04-13 13:57:41 +0300 Timo Sirainen (8a30756ef) - lib-storage: mail_search_arg_to_imap() - remove () around a single - flag/keyword +M src/lib-http/http-server-connection.c +2018-02-10 10:27:19 +0100 Stephan Bosch (a0b53dc85) -M src/lib-storage/mail-search-args-cmdline.c -M src/lib-storage/mail-search-args-imap.c -M src/lib-storage/test-mail-search-args-imap.c -M src/lib-storage/test-mail-search-args-simplify.c + lib-http: client: Use the new connection_input_halt/resume() functions. -2017-04-13 13:04:25 +0300 Timo Sirainen (9930a0de3) - lib-storage: mail_search_args_simplify() - deduplicate KEYWORDs +M src/lib-http/http-client-connection.c +2018-02-10 10:07:28 +0100 Stephan Bosch (c786a720c) -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/test-mail-search-args-simplify.c + lib-smtp: server: Use the new connection_input_halt/resume() functions. -2017-04-13 12:51:25 +0300 Timo Sirainen (72269e8b1) - lib-storage: mail_search_args_to_cmdline() - Fix writing FLAGS & KEYWORDS +M src/lib-smtp/smtp-server-connection.c +2018-02-10 10:01:20 +0100 Stephan Bosch (758b6496f) -M src/lib-storage/mail-search-args-cmdline.c + lib-smtp: client: Use the new connection_input_halt/resume() functions. -2017-04-13 12:36:30 +0300 Timo Sirainen (ec4d9184a) - lib-storage: mail_search_args_to_cmdline() - Write MAILBOX glob without X- - prefix +M src/lib-smtp/smtp-client-connection.c - Since SEARCH_MAILBOX is written out as "MAILBOX", SEARCH_MAILBOX_GLOB should - also be written as "MAILBOX" rather than "X-MAILBOX". +2018-02-09 17:24:28 +0100 Stephan Bosch (6d4e1c7ab) -M src/lib-storage/mail-search-args-cmdline.c + lib-ssl-iostream: ostream-openssl: Fix behavior of o_stream_flush() so that + 1 is only returned when buffer is empty. -2017-04-11 20:39:55 +0300 Aki Tuomi (aa2399c61) - auth: Check var_expand error in vpopmail +M src/lib-ssl-iostream/ostream-openssl.c +2018-02-15 15:47:48 +0100 Stephan Bosch (7b652dc1e) -M src/auth/userdb-vpopmail.c + lib-ssl-iostream: ostream-openssl: Create local variable for + sstream->ssl_io->plain_output in o_stream_ssl_flush(). -2017-04-11 15:50:14 +0300 Aki Tuomi (633e34e20) - auth: Filter passdbs on credentials lookup start +M src/lib-ssl-iostream/ostream-openssl.c - Consistency with how plain verify works. +2018-02-10 09:55:43 +0100 Stephan Bosch (f1d116e1f) -M src/auth/auth-request.c + lib: connection: Add connection_input_halt() and connection_input_resume(). -2017-04-11 15:47:33 +0300 Aki Tuomi (9ad7afac1) + These are convenience functions that remove and add conn->io respectively. - auth: Fix mechanism filter to support `none` +M src/lib/connection.c +M src/lib/connection.h - Otherwise credentials lookup can fail. None indicates that it should match - when no mech is specified. +2018-02-10 09:37:32 +0100 Stephan Bosch (99ef56d40) -M src/auth/auth-request.c + lib-smtp: client: Moved smtp_client_init_ssl_ctx() from smtp-client.h to + smtp-client-private.h. -2017-04-11 15:33:22 +0300 Timo Sirainen (bb087f91a) - auth: Use mem_equals_timing_safe() for all password hash comparisons. +M src/lib-smtp/smtp-client-private.h +M src/lib-smtp/smtp-client.h - It's unlikely these could be used to perform timing attacks, since the - attacker would have to have broken MD5/SHA badly enough to be able to - quickly generate string that result in wanted hashes. Still, the extra cost - is almost nothing and it's always better to be super paranoid! +2018-02-10 10:46:45 +0100 Stephan Bosch (de7ac2ee8) -M src/auth/auth-master-connection.c -M src/auth/mech-apop.c -M src/auth/mech-cram-md5.c -M src/auth/mech-digest-md5.c -M src/auth/mech-gssapi.c -M src/auth/mech-ntlm.c -M src/auth/mech-rpa.c -M src/auth/mech-scram-sha1.c -M src/auth/password-scheme-pbkdf2.c -M src/auth/password-scheme-scram.c -M src/auth/password-scheme.c + lib-http: client: Use conn->conn.ioloop rather than cctx->ioloop in + connection. -2017-04-09 15:31:11 +0300 Timo Sirainen (2d1959da1) + This leads to somewhat simpler code, and makes having connections on + different ioloops easier in the future. - auth: Shuffle failed auth requests before sending the failure replies. +M src/lib-http/http-client-connection.c - This might be helpful against some timing attacks. +2018-02-10 10:20:18 +0100 Stephan Bosch (241d9352a) - Using Fisher–Yates shuffle. + lib: connection: Record the ioloop the connection was last switched to. -M src/auth/auth-request-handler.c -2017-04-09 15:19:25 +0300 Timo Sirainen (fb7a68e3f) +M src/lib/connection.c +M src/lib/connection.h - doveadm: Make doveadm_password safe against timing attacks. +2018-02-10 10:53:00 +0100 Stephan Bosch (7372d2b2f) + lib-http: client: Move connection to shared context's ioloop, rather than + the current_ioloop. -M src/doveadm/client-connection.c + This is an omission. -2017-04-09 00:50:15 +0300 Timo Sirainen (4e11e0a48) +M src/lib-http/http-client-connection.c - auth: Make plaintext password comparisons safe against timing attacks +2018-01-29 19:10:38 +0100 Stephan Bosch (648a82367) + doveadm: dsync: Switch ioloop for input/output streams while making TCP + connection. -M src/auth/password-scheme.c + This task is performed in a sub-ioloop, and when returning from that ioloop, + the output stream would sometimes still have an object on the sub-ioloop + that was just destroyed. -2017-04-09 00:49:37 +0300 Timo Sirainen (31191949d) +M src/doveadm/doveadm-dsync.c - lib: Add mem_equals_timing_safe() +2018-01-29 18:28:25 +0100 Stephan Bosch (76f7e777d) + lib-ssl-iostream: openssl: Make verbose logging robust against i_debug() + writing to stream itself. -M src/lib/strfuncs.c -M src/lib/strfuncs.h -M src/lib/test-strfuncs.c + In dsync, i_debug() is overridden to write to the SSL stream itself through + a multiplexed data stream. So, during the i_debug() call all kinds of things + can happen to the persisted error string in the stream, which caused + problems. -2017-04-10 20:53:29 +0300 Aki Tuomi (8b4fe6f86) +M src/lib-ssl-iostream/iostream-openssl.c - fts: Initialize fts after namespaces have been added +2018-01-16 02:02:11 +0100 Stephan Bosch (080415ce4) - This way paths are correctly set, and fts indexes are written to correct - place. This affects mbox with lucene. + lib-http: client: Make sure all ioloop objects are created on the ioloop + that the client/context is switched to. - Fixes Panic: file mailbox-list.c: line 1158 (mailbox_list_try_mkdir_root): - assertion failed (strncmp(root_dir, path, strlen(root_dir)) == 0) -M src/plugins/fts/fts-plugin.c -M src/plugins/fts/fts-storage.c -M src/plugins/fts/fts-storage.h +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c -2017-04-11 15:05:53 +0300 Aki Tuomi (d9ce4356f) +2018-01-17 00:37:37 +0100 Stephan Bosch (083d7e26b) - fts: Remove indentation from fts_mailbox_list_created + lib-dns: Allow setting the ioloop that the dns_lookup/dns_client is started + on. - Preparation for next commit -M src/plugins/fts/fts-storage.c +M src/lib-dns/dns-lookup.c +M src/lib-dns/dns-lookup.h -2017-04-12 12:24:05 +0300 Timo Sirainen (b440bbfb2) +2018-01-17 02:50:05 +0100 Stephan Bosch (43b57457c) - Makefile: Another fix for make distcheck when using scan-build + lib: connection: Allow switching to a specific ioloop. - It seems to run two configures with different parameters, which results in - some of the files not being cleaned up. So this hopefully fixes: - ERROR: files left in build directory after distclean: - ./src/util/tcpwrap +M src/lib/connection.c +M src/lib/connection.h -M Makefile.am +2018-01-17 02:49:44 +0100 Stephan Bosch (860ba28cf) -2017-04-11 09:34:11 +0200 Stephan Bosch (9c8ed726b) + lib: ostream: Allow switching to a specific ioloop. - lib-imap: imap-bodystructure: Fixed handling of a multipart part without - children in imap_bodystructure_parse(). - In imap_bodystructure_write(), an empty multipart part is addressed by - generating an empty text/plain part. However, when parsing that back with - imap_bodystructure_parse() against a parsed message_part tree, this case - needs to be considered explicitly. Otherwise, it will not be able to match - the message part hierarchies. +M src/lib-ssl-iostream/ostream-openssl.c +M src/lib/ostream-file.c +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h - This adds a test suite item that tests both the write (previous commit) and - parse functions. +2018-01-17 02:48:43 +0100 Stephan Bosch (e364ae8bd) -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c + lib: istream: Allow switching to a specific ioloop. -2017-04-12 10:13:15 +0200 Stephan Bosch (b8dc77b45) - lib-imap: imap-bodystructure: Fixed handling of a multipart part without - children in imap_bodystructure_write(). +M src/lib-http/http-server-request.c +M src/lib/istream-multiplex.c +M src/lib/istream-private.h +M src/lib/istream-timeout.c +M src/lib/istream.c +M src/lib/istream.h - In that case it writes an empty text/plain part to prevent generating an - invalid BODYSTRUCURE. However, it always generated the basic BODY version - without the extra fields for a full BODYSTRUCTURE. +2018-01-24 23:02:03 +0100 Stephan Bosch (0cb6dc4e6) -M src/lib-imap/imap-bodystructure.c + lib: iostream: Record the ioloop that the iostream was last switched to. -2017-04-11 20:32:19 +0300 Aki Tuomi (b30e3dab8) - auth: Fix compile problem with vpopmail +M src/lib/iostream-private.h +M src/lib/iostream.c +M src/lib/istream.c +M src/lib/ostream.c - 79fe1b28df44ba22b230326bee895583c1df5a28 forgot to remove const from table. +2018-01-16 19:37:46 +0100 Stephan Bosch (f6ab416bb) -M src/auth/userdb-vpopmail.c + lib: ioloop: Add functions for adding/moving timeouts and ios to a specific + ioloop. -2017-04-11 14:55:04 +0300 Timo Sirainen (f82cd18fa) - Makefile: Fix make distcheck when using scan-build +M src/lib/ioloop.c +M src/lib/ioloop.h - The _build directory shouldn't be deleted afterwards or it'll just fail. +2018-01-03 02:11:19 +0100 Stephan Bosch (995c19778) -M Makefile.am + lib-http: test-http-client: Free the ssl_iostream_context cache. -2017-04-11 11:23:17 +0300 Timo Sirainen (7c33158f2) - Improve valgrind suppressions. +M src/lib-http/test-http-client.c +2017-12-29 03:19:34 +0100 Stephan Bosch (46f463558) -M run-test-valgrind.supp + lib-http: test-http-payload: Added test with clients using shared global + context. -2017-01-11 19:43:30 +0200 Aki Tuomi (f1fc15609) - lib-dict-sql: Try merge sets to single update +M src/lib-http/test-http-payload.c - This attempts to put mergeable keys into same update instead of using - multiple SQL statements. +2017-12-29 01:17:15 +0100 Stephan Bosch (08e718826) -M src/lib-dict/dict-sql.c + lib-http: client: Implicitly switch ioloop for global shared client context. -2017-04-11 10:11:00 +0300 Timo Sirainen (892ba92f5) + If the new ioloop is NULL, close the shared client context. In that case all + shared hosts, peers and idle connetions are closed and destroyed. The + context just remains as a container for settings and shared context. This is + only allowed when there are no clients left. - lib, userdb-vpopmail: Fully remove var_expand_table_build() +M src/lib-http/http-client.c - It was accidentally removed in master-2.2 as part of the changes in - 122014ad84488d6309dc7d1572dfc988fedc18c4 +2017-12-29 02:15:06 +0100 Stephan Bosch (39b0a7bb1) - This finishes up the removal as it was done in master in - 79fe1b28df44ba22b230326bee895583c1df5a28 + lib-http: client: Use merged DNS settings from all clients connected to a + shared context for DNS lookups. -M src/auth/userdb-vpopmail.c -M src/lib/var-expand.h -2017-04-10 17:07:28 +0300 Timo Sirainen (3a1c64363) +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client.c - lib-imap-client: Fix reconnection +2017-12-29 01:47:16 +0100 Stephan Bosch (56c77bb54) - There was already code for reconnection. We just shouldn't have gone very - far in imapc_connection_connect() if we were still waiting for reconnection - delay to pass. + lib-http: client: Base forcing shared context debug logging on the settings + of the context itself and each associated client. -M src/lib-imap-client/imapc-connection.c -2017-04-10 18:12:47 +0300 Timo Sirainen (fb4c9c0e0) +M src/lib-http/http-client.c - lib-imap-client: Fixes to unit test +2017-12-29 00:48:32 +0100 Stephan Bosch (4307246c8) + lib-http: client: Register client objects in the associated client shared + context. -M src/lib-imap-client/test-imapc-client.c -2017-04-10 17:10:21 +0300 Timo Sirainen (c47cdae23) +M src/lib-http/http-client-private.h +M src/lib-http/http-client.c - lib-imap-client: Add unit test +2017-12-29 00:30:27 +0100 Stephan Bosch (96215d67d) - Initially this tests some connection and reconnection problems. + lib-http: client: Call switching ioloop for shared peer from shared client + context. -M src/lib-imap-client/Makefile.am -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -A src/lib-imap-client/test-imapc-client.c + Before, it was called from the client peer. -2017-04-10 17:09:29 +0300 Timo Sirainen (dcd135e54) +M src/lib-http/http-client-peer.c +M src/lib-http/http-client.c - lib-imap-client: Include "ms" in reconnect warning message +2017-12-29 01:05:21 +0100 Stephan Bosch (8570767d0) + lib-http: client: Set req->client to NULL once the request is destroyed. -M src/lib-imap-client/imapc-connection.c + The http_client_request_destroy() function does not free the request + immediately, as long as it is still referenced. It can still be referenced + by a connection that has sent it and is waiting for a reply (payload). In + the mean time the actual client can be gone, so we want to make sure nothing + is pointing to that anymore. + + This change adds a few extra assertions to make sure nothing tries to use a + NULL client later on. Some direct references to req->client are replaced + with a local client variable if there is one. -2017-04-10 17:06:34 +0300 Timo Sirainen (ed10bddd8) +M src/lib-http/http-client-request.c - lib-imap-client: Remove hardcoded IMAPC_CONNECT_RETRY_WAIT_MSECS +2017-12-29 00:21:01 +0100 Stephan Bosch (f43229fe8) - We have a setting for it now. + lib-http: client: Merge socket buffer size settings with settings from + shared context. -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-connection.h + While using the default global context, per-client socket buffer size + settings were ignored. -2017-04-10 16:44:52 +0300 Timo Sirainen (4b32dbb65) +M src/lib-http/http-client.c - lib-imap-client: Disconnection during LOGIN should still have - state=disconnected +2017-12-29 00:16:30 +0100 Stephan Bosch (a26745123) - It's not an authentication failure, which would imply that the user or - password was wrong. + lib-http: client: Merge max_idle_time_msecs setting with setting from shared + context. -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c + While using the default global context, per-client max_idle_time_msecs + setting was ignored. -2017-04-10 16:18:46 +0300 Timo Sirainen (59a0265df) +M src/lib-http/http-client.c - lib-imap-client: Make command tag counter externally accessible +2017-12-29 16:19:53 +0200 Aki Tuomi (ff5d02182) - This allows unit tests to reset it. + doveadm: Unref header search context after use -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-connection.c + Fixes memory leak, found by valgrind -2017-04-10 15:49:24 +0300 Timo Sirainen (b522906dc) +M src/doveadm/doveadm-mail-iter.c - lib-imap-client: Call the public login callback exactly once. +2018-02-08 15:34:53 +0200 Aki Tuomi (1e5e3a186) - Previously it was also called only once, as long as there were only a single - imap connection. (The current imapc code wouldn't create more than one - connection.) It was a bit confusing what the expectation was, so now the - callback is never called more than once. + config: Fix ssl_params.dat conversion warning -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-connection.h + The command is dhparam, not dh. -2017-04-10 14:14:40 +0300 Timo Sirainen (19762b428) +M src/config/old-set-parser.c - lib-imap-client: imapc_client_deinit() didn't set client=NULL +2017-12-22 18:58:11 +0200 Timo Sirainen (3bad86a13) + global: Call rfc822_parser_deinit() wherever possible -M src/lib-imap-client/imapc-client.c -2017-04-10 13:50:40 +0300 Timo Sirainen (19554223c) +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/message-address.c +M src/lib-mail/message-date.c +M src/lib-mail/message-decoder.c +M src/lib-mail/message-id.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-part-data.c +M src/lib-mail/message-search.c +M src/lib-mail/test-rfc2231-parser.c +M src/lib-mail/test-rfc822-parser.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-parser-script.c - imapc: Change imapc_connection_retry_interval default to be 1 second. +2018-01-09 11:33:59 -0500 Timo Sirainen (eb7965367) - 10 secs at least is too high. Usually the connection problem is very - intermittent and even an immediate reconnection would succeed. + lib-mail: Refactor code to make the next commit smaller -M src/lib-storage/index/imapc/imapc-settings.c -2017-04-10 13:48:23 +0300 Timo Sirainen (0fa6c726a) +M src/lib-mail/message-address.c +M src/lib-mail/message-id.c +M src/lib-mail/message-parser.c - lib-imap-client: Change connect_retry_interval_secs to _msecs +2017-12-22 18:56:53 +0200 Timo Sirainen (a8459287b) - This allows caller to provide better precision. + lib-mail: Add rfc822_parser_deinit() -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-storage/index/imapc/imapc-storage.c + It's not a strict requirement to call this, but it assert-crashes if the + state isn't valid. -2017-04-10 13:46:03 +0300 Timo Sirainen (aca5aa784) +M src/lib-mail/rfc822-parser.h - lib-imap-client: Use struct timeval for tracking last_connect time. +2017-12-22 18:42:53 +0200 Timo Sirainen (afc789bdd) - This provides better accuracy when calculating how much time there's left - until reconnection. + lib-mail: Make sure parsers don't accidentally go much beyond end pointer -M src/lib-imap-client/imapc-connection.c -2017-04-10 13:02:17 +0300 Timo Sirainen (d4fed32b5) +M src/lib-mail/message-address.c +M src/lib-mail/message-date.c +M src/lib-mail/message-part-data.c +M src/lib-mail/rfc2231-parser.c +M src/lib-mail/rfc822-parser.c - lib-http: Improve request stats text. +2017-12-22 18:36:55 +0200 Timo Sirainen (497f356f6) - It's important to know how long the request was in queue before it was sent. + lib-mail: Fix out-of-bounds read when parsing an invalid email address - Also the "n attempts in m secs" makes more sense if it was counting only the - time after the initial request was sent, not including the queuing time. + The included unit test doesn't fail, but running it with valgrind shows + "Invalid read of size 1" error. - If there is more than 1 attempt, log separately how long all the attempts - were waited on vs. how long the last attempt took. + Broken in d6737a17a27402e7a262f7ba8a2ed588d576f23c -M src/lib-http/http-client-request.c + Discovered by Aleksandar Nikolic of Cisco Talos -2017-04-10 12:59:08 +0300 Timo Sirainen (e88a77033) +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c - lib-http: Add http_client_request_stats.first_sent_msecs +2017-12-22 18:36:09 +0200 Timo Sirainen (d297bf096) - Also rename sent_msecs to last_sent_msecs. + lib-mail: test-message-address - Add TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST + flag -M src/lib-http/http-client-request.c -M src/lib-http/http-client.h + This commit just adds the flag and sets it to 0 for all existing tests. -2017-04-10 12:53:43 +0300 Timo Sirainen (869fc2033) +M src/lib-mail/test-message-address.c - lib-http: Track request's first and last send attempt times separately. +2017-12-22 18:31:52 +0200 Timo Sirainen (8ef7b26cd) + lib-mail: rfc822-parser - Add asserts to make sure parser state is correct -M src/lib-http/http-client-private.h -M src/lib-http/http-client-request.c -2017-04-05 12:36:32 +0300 Timo Sirainen (1fbeeb371) +M src/lib-mail/rfc822-parser.c - *-login: Move code to login_anvil_init() +2018-02-19 14:19:08 +0200 Aki Tuomi (f69c32877) - Calling this allows plugins that need to talk to anvil make sure they have - an anvil connection even if mail_max_userip_connections=0. + lib-dns: Move before lib-master -M src/login-common/login-common.h -M src/login-common/main.c -2017-04-05 12:52:14 +0300 Timo Sirainen (86306a33c) +M src/Makefile.am - doveadm who: Don't aggregate empty usernames with different IPs +2018-02-26 12:53:19 +0200 Aki Tuomi (1fa0faa7d) - We'll assume that in that case anvil is used to track IP addresses rather - than usernames. (Dovecot core doesn't currently use this.) + lib-master: Fix dns_match_wildcard result value check -M src/doveadm/doveadm-who.c + It returns 0, not TRUE. -2017-04-07 09:28:55 +0300 Timo Sirainen (ab8b02a7a) +M src/lib-master/master-service-settings-cache.c - lib-http: Remove unnecessary enum declaration. +2018-02-23 15:31:11 +0200 Aki Tuomi (807eadc92) - Most of these were removed by a8fe899601735459641edae975c0fa08be8482e2 + lib-master: Check local_name only if both filter and input have it -M src/lib-http/http-client-private.h + Broken in cedc777a1acf830af4cf0b6e9b0f343c81e20adc -2017-04-05 14:14:57 +0300 Timo Sirainen (bffd1b36c) +M src/lib-master/master-service-settings-cache.c - example-config: Add blocking setting to dovecot-ldap.conf.ext +2017-11-30 20:52:11 +0200 Aki Tuomi (50bedd4a9) + login-common: Enable config filtering by local name -M doc/example-config/dovecot-ldap.conf.ext + Prevents servername misuse. -2017-04-08 09:58:57 +0300 Timo Sirainen (6e6a9dfc6) +M src/login-common/login-settings.c - auth-var-expand-crypt plugin: Add missing ldflags +2017-11-30 15:47:25 +0200 Aki Tuomi (d93e71ad6) + lib-master: Support validating config filters against requests -M src/plugins/var-expand-crypt/Makefile.am + Validation will sanitize the input request and drop any fields that have no + filter in config. E.g. if you have a local block with name, and nothing + else, then lip/rip will be dropped from the request. -2017-04-09 15:48:59 +0300 Timo Sirainen (161f40a42) +M src/lib-master/Makefile.am +M src/lib-master/master-service-settings-cache.c +M src/lib-master/master-service-settings-cache.h +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-settings.h +M src/lib-master/test-master-service-settings-cache.c - fts-solr: Don't double-escape headers. +2017-11-30 15:46:52 +0200 Aki Tuomi (424ca441b) + config: Add command to request all filters -M src/plugins/fts-solr/fts-backend-solr.c -2017-04-07 16:27:12 +0300 Timo Sirainen (b9ba6ce53) +M src/config/config-connection.c - auth: Fix crash in passdb imap on connection failures +2017-11-30 15:46:40 +0200 Aki Tuomi (aea4efba7) + config: Add config_filter_get_all -M src/auth/passdb-imap.c + Returns all filters -2017-04-07 16:13:13 +0300 Timo Sirainen (b8f84b0ca) +M src/config/config-filter.c +M src/config/config-filter.h - lib-ssl-iostream: Don't require SSL CA certs if require_valid_cert==FALSE +2018-03-05 14:55:04 +0200 Martti Rannanjärvi (9e1d3abab) - This happened only when verify_remote_cert was also TRUE. But this behavior - now allows verifying the cert without actually requiring it to be valid. + charset-alias: Don't return value from void functions -M src/lib-ssl-iostream/iostream-openssl-context.c -2017-04-07 15:47:27 +0300 Timo Sirainen (3a081fc03) +M src/plugins/charset-alias/charset-alias-plugin.c - auth: passdb imap: Use ssl_client_ca_* settings. +2018-02-14 01:30:14 +0100 Stephan Bosch (2d19ab14f) - The args = ssl_ca_dir=.. setting still overrides the ssl_client_ca_dir. + lib-smtp: server: Fix reporting of XCLIENT capability in EHLO response. -M src/auth/passdb-imap.c + The trusted connection check logic was inverted. -2017-04-07 09:34:39 +0300 Timo Sirainen (1716f294d) +M src/lib-smtp/smtp-server-reply.c - global: Remove extra ';' to fix compiler errors +2018-02-14 22:20:20 +0100 Stephan Bosch (5062b1895) - Sun C doesn't like them. + lib-smtp: server: Fix segfault occurring when XCLIENT command is handled. -M src/auth/auth-policy.c -M src/plugins/mail-crypt/mail-crypt-key.c + Occurs only when the application (in this case LMTP) has a + conn_proxy_data_updated() callback. The context parameter was the struct + smtp_server_connection object itself, rather than the application context. + This caused the connection object to be overwritten. -2017-04-07 09:32:30 +0300 Timo Sirainen (eedf482c6) +M src/lib-smtp/smtp-server-connection.c - global: Make sure all files end with newline +2018-02-13 20:42:30 +0100 Stephan Bosch (b2177e00e) - Fixes compiler warnings with Sun C. + lib-smtp: server: Fix segfault occurring during XCLIENT when no extension + fields are configured. -M src/lib-imap/imap-envelope.c -M src/lib-mail/message-part-data.c -M src/lib-mail/message-part-data.h -2017-04-07 10:55:40 +0300 Timo Sirainen (7712d8928) +M src/lib-smtp/smtp-server-cmd-xclient.c - fs-posix: Fix FS_METADATA_WRITE_FNAME to preserve the path +2018-02-13 21:19:18 +0100 Stephan Bosch (e3da84043) - It should only change the filename. + lib-imap-storage: imap-msgpart-url: Perform the check for a proper + messagepart URL in imap_msgpart_url_create(). -M src/lib-fs/fs-posix.c + Before, this was an assert in imap_msgpart_url_create(). The actual check + was performed only in imap_msgpart_url_parse(), meaning that + imap_msgpart_url_create() would fail with an assertion when provided with an + inappropriate URL. -2017-04-07 12:45:49 +0300 Timo Sirainen (b3f334774) + This surfaced as a problem for the submission BURL command. - doveadm force-resync: Skip autocreated mailboxes that don't exist yet. +M src/lib-imap-storage/imap-msgpart-url.c - Since they don't exist, there's nothing to resync in them either. This - avoids unnecessarily creating them. +2018-02-25 09:35:43 +0200 Aki Tuomi (7c4fa81fb) -M src/doveadm/doveadm-mail.c + m4: Use -U and -D in cc_fortify -2017-04-07 12:42:12 +0300 Timo Sirainen (59f5cb5fb) + Not just -D. This is to test the same thing that gets used. - dict-sql: Fix setting $variables to iteration key when map had multiple - values +M m4/cc_fortify.m4 +2018-02-25 09:35:19 +0200 Aki Tuomi (37b3c51f5) -M src/lib-dict/dict-sql.c + m4: Remove pthread from tests -2017-04-07 09:14:27 +0300 Timo Sirainen (90dbea8bc) - lib: Redefine NULL only if HAVE_TYPE_CHECKS is set +M m4/cc_fortify.m4 +M m4/cc_pie.m4 +M m4/cc_stack_protector.m4 +2018-02-08 17:19:24 +0200 Timo Sirainen (6e2ea69b4) -M src/lib/compat.h + replication: Don't trigger replication on changes not visible to dsync -2017-04-07 09:11:53 +0300 Timo Sirainen (be8a58d22) + For example if there's a write to .cache file, it doesn't require + replication. - lib: Add a common HAVE_TYPE_CHECKS +M src/plugins/replication/replication-plugin.c - I'm not sure if it should be checking gcc >= 3.0 or 3.3, but they're all old - so doesn't really matter. +2018-02-08 17:17:59 +0200 Timo Sirainen (3aa47de4a) - The __cplusplus check was added to both, since it wouldn't have done - anything anyway as COMPILE_ERROR_IF_TRUE() is 0 for __cplusplus. + lib-storage: Replace mail_transaction_commit_changes.changed with + changes_mask -M src/lib/compat.h -M src/lib/macros.h + This allows better finding out what changed in the transaction. -2017-04-05 15:59:51 +0300 Timo Sirainen (3d2437df5) +M src/lib-storage/index/index-transaction.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/mail-storage.h +M src/plugins/replication/replication-plugin.c - *-login: Minor logging cleanup if client is disconnected before sending - banner. +2018-02-08 17:14:53 +0200 Timo Sirainen (c837fee81) - Avoid unnecessarily adding "(no auth attempts in 0 secs)" when the reason - string already makes it clear that the user didn't even have a chance to - authenticate. + lib-storage: Include mail-index.h from mail-storage.h - This kind of disconnection currently happens only with some plugins. + This makes it a bit more acceptable to use mail-index.h API, without having + to go through the lib-storage layer. This is also needed by the next patch + to avoid duplicating the same enum in both lib-index and lib-storage layer. -M src/imap-login/imap-login-client.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/pop3-login/client.c +M src/imap-urlauth/Makefile.am +M src/lib-imap-urlauth/Makefile.am +M src/lib-storage/mail-storage.h +M src/plugins/imap-quota/Makefile.am +M src/pop3/Makefile.am -2017-04-06 20:43:20 +0300 Timo Sirainen (ddaf6ab23) +2018-02-08 17:00:38 +0200 Timo Sirainen (ced0220a7) - example-config: Add connect/read/write_timeout to mysql connect settings + lib-storage: Remove mailbox_transaction_context.nontransactional_changes + Nothing cares about them. It was only set for POP3 UIDL change with Maildir. + In theory dsync replication would want to replicate such a change, but it + doesn't actually support changing UIDLs for existing mails. Other mailbox + formats don't support it anyway. -M doc/example-config/dovecot-sql.conf.ext +M src/lib-storage/index/index-transaction.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/mail-storage-private.h -2017-04-06 20:00:31 +0300 Timo Sirainen (12ad349ec) +2018-02-08 16:53:15 +0200 Timo Sirainen (d4706609e) - imapc: Remove "_sec" suffix from imapc_connection_retry_interval_secs + lib-index: Add mail_index_transaction_commit_result.changes_mask - Its type is SET_TIME, so the value doesn't have to be in seconds. + This can be used to determine what type of changes were committed in a + transaction. -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-settings.h -M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-index/mail-index-transaction-export.c +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/mail-index-transaction.c +M src/lib-index/mail-index.h -2017-04-06 19:49:07 +0300 Aki Tuomi (5ca66e6ca) +2018-02-08 16:50:58 +0200 Timo Sirainen (c7eaa1987) - imap-login: Retain client ID only when enabled + lib-index: Cleanup - return bool in log_append_keyword_updates() + Simplifies the next commit. -M src/imap-login/imap-login-client.c +M src/lib-index/mail-index-transaction-export.c -2017-04-05 14:23:47 +0300 Aki Tuomi (ca65ac263) +2018-01-13 11:53:43 +0100 Stephan Bosch (999789eb1) - lib-storage: Set internal error in imapc_list_get_hierarchy_sep + lmtp: local: Don't deliver more than once to the same recipient. + Duplicate RCPT TO commands for local recipients are now mostly ignored, by + repeating the reply for the first instance of that RCPT TO command. -M src/lib-storage/index/imapc/imapc-list.c +M src/lmtp/lmtp-common.c +M src/lmtp/lmtp-common.h +M src/lmtp/lmtp-local.c -2017-04-05 14:23:26 +0300 Aki Tuomi (553fcd594) +2018-01-13 13:34:47 +0100 Stephan Bosch (2374eae04) - imapc: Use IMAPC_COMMAND_STATE_AUTH_FAILED to indicate auth failure + lmtp: Add recipient type to struct lmtp_recipient. -M src/auth/passdb-imap.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lmtp/lmtp-common.c +M src/lmtp/lmtp-common.h +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-proxy.c -2017-04-05 14:22:38 +0300 Aki Tuomi (0816664fb) +2018-01-13 13:25:01 +0100 Stephan Bosch (e365ad475) - lib-imap-client: Do not reset ips when reconnecting + lmtp: Move common recipient handling code to separate file. - Avoids infinite loop -M src/lib-imap-client/imapc-connection.c +M src/lmtp/Makefile.am +M src/lmtp/client.h +A src/lmtp/lmtp-common.c +A src/lmtp/lmtp-common.h +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-proxy.c -2017-04-05 13:27:57 +0300 Aki Tuomi (1b7b0f71d) +2018-01-13 13:10:53 +0100 Stephan Bosch (7a291da08) - lib-storage: Return empty value in imapc_list_get_storage_name on auth error + lib-smtp: server: Use smtp_server_reply_submit_duplicate() in + smtp_server_reply_allv(). - Avoids clobbering authentication error. + This is more efficient, since it doesn't need to compose new content for + each reply. -M src/lib-storage/index/imapc/imapc-list.c +M src/lib-smtp/smtp-server-reply.c -2017-04-05 12:48:31 +0300 Aki Tuomi (eedc4e47e) +2018-01-13 13:08:53 +0100 Stephan Bosch (0ec0a3fae) - lib-storage: Do not clobber error with imapc + lib-smtp: server: Add function that allows submitting duplicate replies. + The smtp_server_reply_submit_duplicate() function submits a new reply at the + specified index with content duplicated from an existing earlier reply. -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-smtp/smtp-server-reply.c +M src/lib-smtp/smtp-server.h -2017-04-05 12:47:24 +0300 Aki Tuomi (89867170f) +2018-01-13 13:03:48 +0100 Stephan Bosch (62a8c3750) - global: Fix imapc_client_login usage + lib-smtp: server: Move allocation of command replies to a separate function. -M src/auth/passdb-imap.c -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-smtp/smtp-server-reply.c -2017-04-05 12:09:57 +0300 Aki Tuomi (2cc26e4aa) +2018-01-13 12:43:08 +0100 Stephan Bosch (06d4b7aac) - lib-imap-client: Add login_callback setter + lib-smtp: server: Put reply content in a separate struct. - This way it can be set before actually calling login which might happen some - time later. + This allows duplicate replies to share content for a multi-reply command. -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h +M src/lib-smtp/smtp-server-command.c +M src/lib-smtp/smtp-server-private.h +M src/lib-smtp/smtp-server-reply.c -2017-04-04 23:33:51 +0300 Dmitry Yakunin (fab03d4e1) +2018-01-13 12:56:59 +0100 Stephan Bosch (c6c10f271) - imapc: Fix memory leak in disconnected state + lib-smtp: server: Allow part of the replies to be already sent in + smtp_server_reply_allv(). + This is not something observed to happen in existing code, but it is best to + deal with this properly, as it could happen in the future. -M src/lib-imap-client/imapc-connection.c +M src/lib-smtp/smtp-server-reply.c -2017-04-05 09:26:54 +0300 Aki Tuomi (076f7f56e) +2018-01-13 12:26:57 +0100 Stephan Bosch (7bab02676) - auth: Update default policy string to include device id and protocol + lib-smtp: server: transaction: Add function that finds duplicate recipients. + Duplicate means that both the path and parameters are equal. -M src/auth/auth-settings.c +M src/lib-smtp/smtp-server-transaction.c +M src/lib-smtp/smtp-server.h -2017-04-04 15:59:04 +0300 Timo Sirainen (879cad3d7) +2018-01-13 12:20:34 +0100 Stephan Bosch (e9afe2849) - imap: Set command reason strings using the new human_args + lib-smtp: server: Add RCPT parameters directly in + smtp_server_transaction_add_rcpt(). - This way the reason string is already suitable for logging, since it's - guaranteed to be valid UTF-8 without control chars. + This makes more sense. Before, these were added to the recipient in + smtp-server-cmd-rcpt.c, after the recipient was added. -M src/imap/imap-commands-util.c +M src/lib-smtp/smtp-server-cmd-rcpt.c +M src/lib-smtp/smtp-server-private.h +M src/lib-smtp/smtp-server-transaction.c -2017-04-04 15:58:42 +0300 Timo Sirainen (82e99cd7b) +2018-01-13 11:52:31 +0100 Stephan Bosch (af7fec168) - imap: Add client_command_context.human_args + lib-smtp: params: Add function that allows checking whether RCPT parameters + are equal. - Generated with imap_write_args_for_human() -M src/imap/imap-client.c -M src/imap/imap-client.h +M src/lib-smtp/smtp-params.c +M src/lib-smtp/smtp-params.h -2017-04-04 15:58:15 +0300 Timo Sirainen (5ffca7837) +2018-01-13 12:07:46 +0100 Stephan Bosch (7eb098b89) - lib-imap: Add imap_write_args_for_human() + lib-smtp: params: Add functions to evaluate any extra (non-standard) MAIL + and RCPT parameters. + These allow looking up the parameter based on its name. -M src/lib-imap/imap-util.c -M src/lib-imap/imap-util.h +M src/lib-smtp/smtp-params.c +M src/lib-smtp/smtp-params.h -2017-04-04 15:38:00 +0300 Timo Sirainen (57997bbfe) +2018-01-13 11:51:24 +0100 Stephan Bosch (52d91963a) - imap: Add imap_client_command_get_reason() + lib-smtp: address: Consistently allow address values to be NULL. - All the command -> reason string conversions now go through this function. + If the address pointer is NULL or the localpart field is NULL or empty, it + signifies that it is the NULL address "<>". -M src/imap/cmd-fetch.c -M src/imap/imap-commands-util.c -M src/imap/imap-commands-util.h + In the case of smtp_address_equals(), this also likely fixes crashes at + places where it may be used to compare "<>". -2017-04-04 13:28:44 +0300 Timo Sirainen (c2145f206) +M src/lib-smtp/smtp-address.c +M src/lib-smtp/smtp-address.h +M src/lib-smtp/test-smtp-address.c - lib: Increase net_connect*() EADDRNOTAVAIL retries to 20 +2018-01-13 11:59:54 +0100 Stephan Bosch (9d589f8b0) - 4 is too little, since on busy systems it's sometimes failing. These calls - should be pretty cheap, so lets try if 20 is enough. + lib-smtp: address: Rename 'poo' to 'pool' in declaration of + smtp_address_detail_parse(). - It would be nice if this was configurable, but the only practical way right - now would be to use environment variable, which is a bit ugly. We could try - it next if 20 is still not enough. -M src/lib/net.c +M src/lib-smtp/smtp-address.h -2017-04-03 18:44:52 +0300 Timo Sirainen (aa11368e1) +2017-12-14 11:44:52 +0200 Martti Rannanjärvi (8c077aa6d) - imapc: Compiler warning fix for 32bit systems + quota: Warn when quota check is blocked by background quota calculation + This was previously double logged as "Quota transaction has failed earlier" + error. -M src/lib-imap-client/imapc-connection.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c -2017-03-31 10:57:14 +0300 Aki Tuomi (b376929cd) +2018-01-10 15:45:51 +0200 Martti Rannanjärvi (185c9075e) - lib-imap-client: Make authentication failures more consistent + quota: Remove "Failed to set quota transaction limits" error - This way they always say the same prefix, which is easier to spot. + This error adds nothing that helps the user to debug a problem. -M src/lib-imap-client/imapc-connection.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c -2017-03-31 10:49:50 +0300 Aki Tuomi (803e34131) +2017-12-14 12:47:00 +0200 Martti Rannanjärvi (f478857ee) - lib-imap-client: Call login_callback on all authentication failures + quota-count: Remove extra "quota-count failed:" from error_r -M src/lib-imap-client/imapc-connection.c +M src/plugins/quota/quota-count.c -2017-03-31 10:12:58 +0300 Aki Tuomi (4efdfe977) +2018-02-28 15:09:02 +0200 Timo Sirainen (a5518a4fe) - lib-imap-client: Fix reconnection + example-config: Add mail_attachment_detection_options - This patch fixes reconnections to actually consider all IP addresses first - and then delay for interval and retry at most retry count times. -M src/lib-imap-client/imapc-connection.c +M doc/example-config/conf.d/10-mail.conf -2017-03-31 11:01:15 +0300 Aki Tuomi (c4da13191) +2018-02-16 16:03:46 +0200 Timo Sirainen (3087e07a6) - lib-imap-client: Remove io earlier to avoid hammering + doveadm sync/backup: Don't override BROKENCHAR if it's already set - If connection has failed and reconnection is not yet possible, io has to be - removed here, otherwise it will keep hammering the callback. + This allows migrating invalid mailbox names by specifying BROKENCHAR. + Previously it would always try to use \003 control character, which isn't + valid character in mailbox names so the mailbox creation would fail. -M src/lib-imap-client/imapc-connection.c +M src/doveadm/doveadm-dsync.c -2017-03-31 10:58:47 +0300 Aki Tuomi (1389e4797) +2018-02-26 18:20:30 +0200 Aki Tuomi (481a6a11e) - lib-imap-client: Only LOGOUT from connected connections + notify: Ignore flag and keywords update during saving + They are part of the saving event -M src/lib-imap-client/imapc-client.c +M src/plugins/notify/notify-plugin.c -2017-03-31 09:44:28 +0300 Aki Tuomi (555b4a3c3) +2018-01-11 13:38:14 -0500 Timo Sirainen (1c3b6f922) - lib-imap-client: Make retry count and interval configurable + *-login: Fix clients linked list corruption with SSL connections + This could have resulted in infinite loops or some of the clients being + skipped for some operations. -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-settings.h -M src/lib-storage/index/imapc/imapc-storage.c +M src/login-common/client-common.c -2017-03-31 09:59:02 +0300 Aki Tuomi (8293257bd) +2018-01-23 10:51:26 +0200 Aki Tuomi (74ef8506d) - lib-imap-client: Add imapc_client_try_stop + push-notification: PUSH_NOTIFICATION_USER_CONTEXT is now required + Satisfies static analyzers -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c +M src/plugins/push-notification/push-notification-plugin.c -2017-03-30 16:09:06 +0300 Aki Tuomi (036f34dd2) +2018-01-23 10:49:40 +0200 Aki Tuomi (76f93fb0e) - lib-sasl: Add missing input handler for xoauth2 + fts-lucene: Add and use FTS_LUCENE_USER_CONTEXT_REQUIRE + Satisfies static analyzers -M src/lib-sasl/mech-oauthbearer.c +M src/plugins/fts-lucene/fts-backend-lucene.c +M src/plugins/fts-lucene/fts-lucene-plugin.c +M src/plugins/fts-lucene/fts-lucene-plugin.h -2017-04-03 12:40:51 +0300 Timo Sirainen (dbed1a0ff) +2018-01-23 10:47:49 +0200 Aki Tuomi (595bb8680) - director: Fix mail_hosts_dup() to duplicate tags correctly. + welcome: WELCOME_CONTEXT is now required - The host->tag pointed to the old hosts list. Also the new hosts list's tags - array wasn't filled. + Satisfies static analyzers - This fixes USER-LOOKUP to return host with default configuration, which - fixes doveadm director status to not show "Initial config" as empty. +M src/plugins/welcome/welcome-plugin.c -M src/director/mail-host.c +2018-01-23 10:46:30 +0200 Aki Tuomi (3ae3e7f92) -2017-04-03 11:41:29 +0300 Martti Rannanjärvi (9ddb3f76f) + expire: DOVEADM_EXPIRE_MAIL_CMD_CONTEXT is now required - doveadm: Call mailbox_set_reason with initialized mailbox + Satisfied static analyzers +M src/plugins/expire/doveadm-expire.c -M src/doveadm/doveadm-mail-import.c +2018-01-23 10:44:02 +0200 Aki Tuomi (b230128c7) -2017-04-01 22:12:37 +0300 Timo Sirainen (cbe889f76) + virtual: Contexts are now required or checked - global: Add mailbox_transaction_set_reason() calls + Satisfies static analyzers - Added to the most important places. +M src/plugins/virtual/virtual-search.c +M src/plugins/virtual/virtual-storage.c +M src/plugins/virtual/virtual-storage.h -M src/imap/cmd-append.c -M src/imap/cmd-copy.c -M src/imap/cmd-fetch.c -M src/imap/cmd-select.c -M src/imap/cmd-store.c -M src/imap/cmd-thread.c -M src/imap/imap-commands-util.c -M src/imap/imap-commands-util.h -M src/imap/imap-expunge.c -M src/imap/imap-fetch.c -M src/imap/imap-fetch.h -M src/imap/imap-search.c -M src/imap/imap-state.c -M src/imap/imap-sync.c -M src/indexer/master-connection.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/mail-autoexpunge.c +2018-01-23 10:41:35 +0200 Aki Tuomi (fe1ec4bcd) + + quota: Add and use QUOTA_USER_CONTEXT_REQUIRE + + Satisfies static analyzers + +M src/plugins/quota/quota-plugin.h M src/plugins/quota/quota-storage.c -2017-04-01 21:54:30 +0300 Timo Sirainen (d28d40b18) +2018-01-23 10:40:23 +0200 Aki Tuomi (019febbd4) - lib-storage: Add mailbox_transaction_set_reason() + imap-zlib: Context is now required + Satisfies static analyzers -M src/lib-storage/index/index-transaction.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-storage.h +M src/plugins/imap-zlib/imap-zlib-plugin.c -2017-04-01 21:43:16 +0300 Timo Sirainen (136579236) +2018-01-23 10:39:30 +0200 Aki Tuomi (ae5c5eaf9) - global: Add mailbox_set_reason() calls + lazy-expunge: Fix context checking - Added to the most important places. + Was not done properly in 462a3d92adcde4bfa9a575875bd8ae740b89ce9e -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail-index.c -M src/doveadm/doveadm-mail-iter.c -M src/doveadm/doveadm-mail-mailbox-metadata.c -M src/doveadm/doveadm-mail-mailbox-status.c -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail-save.c -M src/doveadm/doveadm-mail.c -M src/imap/cmd-create.c -M src/imap/cmd-delete.c -M src/imap/cmd-getmetadata.c -M src/imap/cmd-notify.c -M src/imap/cmd-rename.c -M src/imap/cmd-resetkey.c -M src/imap/cmd-select.c -M src/imap/cmd-setmetadata.c -M src/imap/cmd-subscribe.c -M src/imap/imap-commands-util.c -M src/imap/imap-notify.c -M src/imap/imap-state.c -M src/imap/imap-status.c -M src/indexer/master-connection.c -M src/lib-imap-storage/imap-metadata.c -M src/lib-imap-storage/imap-msgpart-url.c -M src/lib-imap-urlauth/imap-urlauth-backend.c -M src/lib-lda/mail-deliver.c -M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-storage.c -M src/lmtp/commands.c M src/plugins/lazy-expunge/lazy-expunge-plugin.c -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-status.c -M src/plugins/trash/trash-plugin.c -M src/plugins/virtual/virtual-config.c -M src/plugins/virtual/virtual-storage.c -M src/pop3/pop3-client.c -2017-04-01 21:16:37 +0300 Timo Sirainen (b6726aea8) +2018-01-22 14:04:47 +0200 Aki Tuomi (cc90fd9ca) - lib-storage: Add mailbox_set_reason() + mail-crypt: Add and use MAIL_CRYPT_USER_CONTEXT_REQUIRE - Use it to log a debug message when mailbox is being opened. + Satisfies static analyzers -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-storage.h +M src/plugins/mail-crypt/mail-crypt-plugin.c -2017-03-27 18:05:29 +0300 Timo Sirainen (b6a369a3d) +2018-01-22 14:02:39 +0200 Aki Tuomi (358b6630d) - lib-index: Don't increase modseq for backend/dirty flag changes + fts-solr: Add and use FTS_SOLR_USER_CONTEXT_REQUIRE - These flags are used only for internal changes and they shouldn't be - triggering any modseq changes. + Satisfies static analyzers - To avoid modseqs from unexpectedly shrinking, the new modseq counting - behavior is enabled only for newly rotated transaction log files that have a - new minor_version. +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-solr-plugin.c +M src/plugins/fts-solr/fts-solr-plugin.h -M src/doveadm/doveadm-dump-log.c -M src/lib-index/mail-index-transaction-export.c -M src/lib-index/mail-transaction-log-append.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/mail-transaction-log.c -M src/lib-index/mail-transaction-log.h -M src/lib-index/test-mail-transaction-log-append.c -M src/lib-index/test-mail-transaction-log-view.c +2018-01-23 11:37:41 +0200 Aki Tuomi (11133c3ed) -2017-03-30 20:38:44 +0300 Timo Sirainen (0713b92ce) + acl: Fix ACL_CONTEXT check - lib-index: Add macros to check if transaction log file version is new - enough. + Was incorrect in 3131b3878de3245db7552234e66d437e8fde9351 - The version numbers are 8bit, so we can generate a single 16bit number out - of them. +M src/plugins/acl/acl-mailbox.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log.h +2018-01-23 10:38:41 +0200 Aki Tuomi (7536e28ad) -2017-03-29 01:25:21 +0200 Stephan Bosch (c8379b418) + acl: Add and use ACL_USER_CONTEXT_REQUIRE - lib-http: client: Implemented means to obtain request statistics. + Satisfies static analyzers +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-plugin.h +M src/plugins/acl/doveadm-acl.c -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-request.c -M src/lib-http/http-client.h +2018-01-22 14:00:37 +0200 Aki Tuomi (86f3bd939) -2017-03-31 23:12:47 +0300 Aki Tuomi (d4b3a9bae) + acl: Add and use ACL_LIST_CONTEXT_REQUIRE - lib: Fix strcasecmp mistake in var-expand + Satisfies static analyzers +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-mailbox.c +M src/plugins/acl/acl-plugin.h -M src/lib/var-expand.c +2018-01-22 13:57:12 +0200 Aki Tuomi (75f6ed7d0) -2017-03-31 16:42:55 +0300 Timo Sirainen (b73b1f9e2) + lib-storage: imapc - Ensure search ctx is not NULL - lmtp: Die at startup if config reading fails. + Satisfies static analyzers - Although most of the time it's not strictly required for config to be read - here, one exception is SSL server settings. If this config reading fails, - the SSL initialization just crashes. So this gives a better error message - than a crash. Also config reading really isn't supposed to fail anyway. +M src/lib-storage/index/imapc/imapc-search.c -M src/lmtp/main.c +2018-01-22 13:54:58 +0200 Aki Tuomi (603cac0df) -2017-03-30 23:25:40 +0300 Timo Sirainen (f2ed4eff7) + lib-storage: Add and use MAIL_STORAGE_CONTEXT_REQUIRE - lib-index: Assert in mail_index_append_finish_uids() to prevent UID wrapping + Satisfies static analyzers - This should be handled better eventually, but it's better to crash earlier - now than later. This avoids a later assert: +M src/lib-storage/index/index-transaction.c +M src/lib-storage/mail-storage-private.h - Panic: file mail-index-transaction-finish.c: line 187 - (mail_index_transaction_get_uid): assertion failed: (rec->uid != 0) +2018-01-22 13:52:37 +0200 Aki Tuomi (f6a72b464) -M src/lib-index/mail-index-transaction-update.c + lib-storage: Add and use MAIL_THREAD_CONTEXT_REQUIRE -2017-03-31 12:28:56 +0300 Timo Sirainen (738f09fb1) + Satisfies static analyzers - lib-fs: Add FS_METADATA_ORIG_PATH +M src/lib-storage/index/index-thread.c - This allows fs backends to keep track of the original filename and use it - for logging purposes and such. +2018-01-22 13:50:37 +0200 Aki Tuomi (850a34d95) -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h + lib-index: Add and use CACHE_TRANS_CONTEXT_REQUIRE -2017-03-31 12:28:01 +0300 Timo Sirainen (549888de0) + Satisfies static analyzers - lib-fs: Allow fs_set_metadata() to update already added metadata. +M src/lib-index/mail-cache-transaction.c - Previously we were just appending the metadata multiple times with different - values, which could have caused problems. +2018-01-22 09:38:26 +0200 Aki Tuomi (37aed1ab5) -M src/lib-fs/fs-api.c + lib-storage: Add and use INDEX_LIST_CONTEXT_REQUIRE -2017-03-31 01:02:49 +0300 Timo Sirainen (0545e6b8c) + Satisfies static analyzers - imap: Fix assert-crash when hibernation triggers during IDLE syncing +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/list/mailbox-list-notify-tree.c - Fixes: Panic: file cmd-idle.c: line 182 (idle_hibernate_timeout): assertion - failed: (ctx->sync_ctx == NULL) +2018-01-20 20:42:02 +0200 Aki Tuomi (8fc876d9e) -M src/imap/cmd-idle.c + mail-log: Contexts are now required or checked -2017-03-27 11:02:31 +0300 Aki Tuomi (bb8b63efc) + Satisfies static analyzers - var-expand-crypt: Fix data decryption +M src/plugins/mail-log/mail-log-plugin.c +2018-01-19 10:27:09 +0200 Aki Tuomi (511fba2e5) -M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + old-stats-plugin: Fix context requirements -2017-03-27 09:39:03 +0300 Aki Tuomi (ba0aa2d1b) + Fixes Panic: Module context stats_storage_module missing - var-expand-crypt: Add error handling for initialization + Broken by 6afdf0b6fce26c5492d5e56f6f16fb8a4d869566 +M src/plugins/old-stats/stats-plugin.c -M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +2018-01-18 15:29:42 +0200 Aki Tuomi (6ff57044c) -2017-03-27 09:34:50 +0300 Aki Tuomi (cbf8b2a12) + pop3-migration-plugin: Fix context requirements - var-expand-crypt: Do not free dcrypt context twice + Fixes Panic: Module context pop3_migration_storage_module missing - Found by coverity + Broken by a8703ce24540b7efaa51a8c7d3c72e72727f9789 -M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.c -2017-03-31 15:30:58 +0300 Aki Tuomi (c2f200c78) +2018-01-17 12:15:16 +0200 Aki Tuomi (bdf19e15b) - test-var-expand: Expect error + last-login: Contexts are now required or checked + Satisfies static analyzers -M src/lib/test-var-expand.c +M src/plugins/last-login/last-login-plugin.c -2017-03-23 15:17:44 +0200 Aki Tuomi (b82a1a409) +2018-01-17 12:14:22 +0200 Aki Tuomi (19b633012) - var-expand-crypt: Remove pointless assigment + mail-crypt: Contexts are now required or checked - It's never used + Satisfies static analyzers -M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/plugins/mail-crypt/mail-crypt-plugin.c -2017-03-23 15:12:45 +0200 Aki Tuomi (ffd9c6241) +2018-01-17 10:28:48 +0200 Aki Tuomi (4efb529ed) - var-expand-crypt: Fix base64 encoding + old-stats: Contexts are now required or checked - the break was missing, also removed confusing block. + Satisfies static analyzers -M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +M src/plugins/old-stats/mail-stats-connection.c +M src/plugins/old-stats/stats-plugin.c +M src/plugins/old-stats/stats-plugin.h -2016-11-18 14:47:05 +0200 Aki Tuomi (217905ea4) +2018-01-17 10:23:05 +0200 Aki Tuomi (afba4cf10) - var-expand-crypt: Encryption/decryption support for var-expand + quota-clone: Contexts are now required or checked - Registers new encrypt and decrypt processors for var-expand. + Satisfies static analyzers -M configure.ac -M src/plugins/Makefile.am -A src/plugins/var-expand-crypt/Makefile.am -A src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +M src/plugins/quota-clone/quota-clone-plugin.c -2016-12-25 10:36:59 +0200 Aki Tuomi (ec4485c4b) +2018-01-17 10:21:52 +0200 Aki Tuomi (f81b6623c) - lib: Add tests for extensions + zlib: Contexts are now required or checked + Satisfies static analyzers -M src/lib/test-var-expand.c +M src/plugins/zlib/zlib-plugin.c -2016-11-18 09:39:46 +0200 Aki Tuomi (122014ad8) +2018-01-17 10:10:41 +0200 Aki Tuomi (f96ddb379) - lib: Add extension support for var-expand + mailbox-alias: Contexts are now required or checked - This enables loading new var-expand features using plugins. + Satisfies static analyzers -M src/lib/Makefile.am -M src/lib/lib.c -A src/lib/var-expand-private.h -M src/lib/var-expand.c +M src/plugins/mailbox-alias/mailbox-alias-plugin.c -2017-03-27 13:55:28 +0300 Aki Tuomi (0314505e5) +2018-01-17 10:07:37 +0200 Aki Tuomi (9cc36d00c) - lib: Use error_r in var_expand_long and friends + mail-filter: Contexts are now required or checked - This is aligment commit for extensions, and differs from v2.3 so that error - is reported in var_expand_with_funcs since the public API is not changed. + Satisfies static analyzers -M src/lib/var-expand.c +M src/plugins/mail-filter/mail-filter-plugin.c -2017-03-30 23:46:02 +0300 Timo Sirainen (b74e23667) +2018-01-17 10:06:25 +0200 Aki Tuomi (0333ab0d6) - lib-http: http_client_request_delay_from_response() should use per-request - timeout as max + notify: Contexts are now required or checked - It was using the global request_timeout_msecs for the maximum timeout, which - could be different from the per-request timeout set by - http_client_request_set_attempt_timeout_msecs(). + Satisfied static analyzers -M src/lib-http/http-client-request.c +M src/plugins/notify/notify-storage.c -2017-03-30 22:29:13 +0200 Stephan Bosch (34c9aed77) +2018-01-17 09:31:44 +0200 Aki Tuomi (c0ffd5259) - lib-http: client: Fixed request-specific attempt timeout. + pop3-migration: Contexts are now required or checked - This is the timeout applied to a single request attempt. Using - http_client_request_set_attempt_timeout_msecs() this can be set for a - specific request. However, this was mostly ignored for requests that weren't - in the process of handling response payload. Instead, the global - request_timeout_msecs client setting was used. + Satisfies static analyzers - Also amended the (currently manual) test suite with tests that demonstated - the problem and now verify the fix. +M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/lib-http/http-client-connection.c -M src/lib-http/test-http-client-errors.c +2018-01-14 20:40:11 +0200 Aki Tuomi (3c18b2025) -2017-03-28 19:40:27 +0300 Timo Sirainen (4f67426cd) + quota: Contexts are now required or checked - lib-index: Use time_to_local_day_start() instead of reimplementing + Satisfied static analyzers +M src/plugins/quota/quota-storage.c -M src/lib-index/mail-index-transaction-update.c +2018-01-14 20:33:48 +0200 Aki Tuomi (86c945529) -2017-03-28 19:14:00 +0300 Timo Sirainen (6d9227e1c) + apparmor: Ensure auser is not NULL - lib: Add time_to_local_day_start() + Satisfies static analyzers +M src/plugins/apparmor/apparmor-plugin.c -M src/lib/test-time-util.c -M src/lib/time-util.c -M src/lib/time-util.h +2018-01-14 20:25:16 +0200 Aki Tuomi (fc4557f7f) -2017-03-27 17:44:45 +0300 Timo Sirainen (6129bb326) + lazy-expunge: Contexts are now required or checked - lib-index: Code cleanup - expand LOG_WANT_ROTATE() macro + Satisfied static analyzers - There was no reason it had to be a macro. Also this fixes off-by-one error - when checking for log_rotate_min_size. +M src/plugins/lazy-expunge/lazy-expunge-plugin.c -M src/lib-index/mail-transaction-log.c +2018-01-14 20:18:45 +0200 Aki Tuomi (18e78d322) -2017-03-17 10:28:36 +0200 Aki Tuomi (1389da1b9) + fts: Contexts are now required or checked - test: lib-http: Check write_full return value in test + Satisfied static analyzer - Makes static analyzers happier +M src/plugins/fts/fts-parser-script.c +M src/plugins/fts/fts-storage.c +M src/plugins/fts/fts-user.c -M src/lib-http/test-http-client.c +2018-01-14 20:08:11 +0200 Aki Tuomi (a9c19bb91) -2017-03-17 10:26:50 +0200 Aki Tuomi (b64df8253) + snarf: If sstorage is NULL, do not allocate box - test: fts-squat: Ignore gettimeofday return value in test + Old code would continue if sstorage was NULL. - Makes static analyzers happier + Found by static analyzer -M src/plugins/fts-squat/squat-test.c +M src/plugins/snarf/snarf-plugin.c -2017-03-17 10:26:06 +0200 Aki Tuomi (f5132aa88) +2018-01-14 20:07:31 +0200 Aki Tuomi (5f6be61dd) - test: lib-index: Ensure conficts_seqs is created in test + snarf: Contexts are now required or checked - Makes static analyzers happier + Satisfies static analyzers -M src/lib-index/test-mail-index-transaction-finish.c +M src/plugins/snarf/snarf-plugin.c -2017-03-17 10:25:01 +0200 Aki Tuomi (df6396438) +2018-01-14 20:00:04 +0200 Aki Tuomi (1e9fdc8bb) - test: lib: Ensure item is not null + expire: Contexts are now required or checked - Makes static analyzers happier + Satisfied static analyzers -M src/lib/test-priorityq.c +M src/plugins/expire/expire-plugin.c -2017-03-17 10:19:17 +0200 Aki Tuomi (3c269a88e) +2018-01-14 19:57:16 +0200 Aki Tuomi (e16d51458) - test: lib-fts: Ignore uni_utf8_get_valid_data return value + trash: Ensure quser is not NULL - Makes static analyzers happier + Satisfies static analyzers -M src/lib-fts/test-fts-tokenizer.c +M src/plugins/trash/trash-plugin.c -2017-03-17 10:17:59 +0200 Aki Tuomi (dc50da71b) +2018-01-14 19:56:19 +0200 Aki Tuomi (d5975daef) - test: mail-crypt: Check dcrypt_id_key_private_old return value + acl: Contexts are now required or checked - Makes static analyzers happier + Satisfies static analyzers -M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/acl/acl-attributes.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-mailbox.c +M src/plugins/acl/acl-plugin.h +M src/plugins/acl/acl-shared-storage.c +M src/plugins/acl/acl-storage.c -2017-03-17 10:16:11 +0200 Aki Tuomi (63bc80a8e) +2018-01-14 19:46:13 +0200 Aki Tuomi (fa4ab3937) - test: lib-http: Check o_stream_send return value + replication: Check ruser for NULL - Makes static analyzers happier + Satisfies static analyzers -M src/lib-http/test-http-server.c +M src/plugins/replication/replication-plugin.c -2017-03-17 10:13:59 +0200 Aki Tuomi (f76d3786a) +2018-01-14 19:43:39 +0200 Aki Tuomi (6b4986702) - test: lib: Check o_stream_send return value + imap-old-stats-plugins: Check suser for NULL - Make static analyzers happier + Satisfies static analyzers -M src/lib/test-ostream-escaped.c +M src/plugins/imap-old-stats/imap-stats-plugin.c -2017-03-27 19:50:53 +0300 Aki Tuomi (d2cda64e7) +2018-01-17 12:25:18 +0200 Aki Tuomi (42f95f63b) - driver-cassandra: Add metric for slow queries + lib-sql: SQL_DB_CACHE_CONTEXT now requires context + Satisfies static analyzers -M src/lib-sql/driver-cassandra.c +M src/lib-sql/sql-db-cache.c -2017-03-29 20:04:47 +0300 Martti Rannanjärvi (b4820284a) +2018-01-17 09:29:23 +0200 Aki Tuomi (f553314ac) - push-notification-driver-ox: Wait for http requests to finish in deinit + lib-storage: MBOX_LIST_CONTEXT now requires context - This is to make sure mail_user is still usable in http response callback. + Satisfies static analyzers -M src/plugins/push-notification/push-notification-driver-ox.c +M src/lib-storage/index/mbox/mbox-storage.c -2017-03-30 15:53:59 +0300 Martti Rannanjärvi (276dedbc7) +2018-01-17 09:29:53 +0200 Aki Tuomi (1fad1b8c3) - director: Log vhost count changes and HOST-UP/DOWN + lib-storage: INDEX_LIST_STORAGE_CONTEXT now requires context + Satisfies static analyzers -M src/director/director-connection.c -M src/director/doveadm-connection.c -M src/director/mail-host.c -M src/director/mail-host.h +M src/lib-storage/list/mailbox-list-index-storage.h -2017-03-30 01:42:53 +0300 Timo Sirainen (ac37a92a9) +2018-01-17 09:25:26 +0200 Aki Tuomi (4adaae0c7) - master: When logging fork() EAGAIN failure, include current ulimit -u value + lib-storage: INDEX_STORAGE_CONTEXT now requires context + Satisfies static analyzers -M src/master/service-process.c +M src/lib-storage/index/index-storage.h -2017-03-27 16:33:30 +0300 Timo Sirainen (6c6fe8d88) +2018-01-17 12:24:21 +0200 Aki Tuomi (04bdefa1a) - doveadm dump log: Use shared lib-index code for updating modseq + lib-lda: Require context in mail-deliver - When MAIL_TRANSACTION_MODSEQ_UPDATE records were seen, the printed modseqs - afterwards weren't correct. + Satisfies static analyzers - Now that mail_transaction_update_modseq() is used, we don't need to keep - this code synchronized with it. +M src/lib-lda/mail-deliver.c -M src/doveadm/doveadm-dump-log.c +2018-01-12 15:10:48 +0200 Aki Tuomi (bf055b4cb) -2017-03-27 16:30:16 +0300 Timo Sirainen (d49124818) + lib: Add MODULE_CONTEXT_REQUIRE - doveadm dump log: Cleanup - don't change hdr.size + This will panic instead of return NULL. Should satisfy static analyzers when + used. - Needed by the next commit. +M src/lib/module-context.h -M src/doveadm/doveadm-dump-log.c +2018-02-18 18:07:16 -0500 Josef 'Jeff' Sipek (4d90f3fb2) -2017-03-27 16:26:09 +0300 Timo Sirainen (8dca8b41c) + lib-storage: Generate snippet while saving new mails - doveadm dump log: Use istream for reading the file. - Cleans up the code a bit and removes the 1MB record limit. +M src/lib-storage/index/index-mail-headers.c -M src/doveadm/doveadm-dump-log.c +2018-02-19 15:43:31 +0200 Timo Sirainen (a1e1240aa) -2017-03-29 13:28:36 +0300 Timo Sirainen (d6baf552a) + lib-storage: Make index_mail_want_cache() global - lib-storage: Fix potential dict transaction leak on transaction rollback. +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h -M src/lib-storage/index/index-transaction.c +2018-02-18 18:06:48 -0500 Josef 'Jeff' Sipek (994ecfe78) -2017-03-29 13:27:32 +0300 Timo Sirainen (90927c83c) + lib-storage: move snippet generation to mail-save-finish - lib-dict: Keep a linked list of all transactions in dict. + This is necessary because some storage backends (most notably sdbox) do not + allow getting the mail stream before the mail is fully written out. + (See written_to_disk in sdbox-file.h.) - This helps debugging if a transaction is leaked. + If we could avoid getting the stream to generate a snippet we could leave + this where it is. -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c +M src/lib-storage/index/index-mail.c -2017-03-29 16:15:36 +0300 Aki Tuomi (c2bdba682) +2018-02-19 15:38:13 +0200 Timo Sirainen (424753d9d) - auth: Do not cache username unless it was changed by lookup + doveadm dump: Show body.snippet in human-readable form - This could've caused usernames to be unexpectedly changed because they were - cached by a lookup that did not include username in the cache key. -M src/auth/auth-request.c +M src/doveadm/doveadm-dump-index.c -2017-03-29 15:37:36 +0300 Aki Tuomi (b0fcc4f49) +2018-02-15 18:16:15 +0200 Timo Sirainen (f30a85a71) - auth: Mark username changed if it's changes in - auth_request_try_update_username + imap: Don't set storage callbacks before namespaces are created - It was forgotten in by 865a82c1 + This fixes sending untagged OK/NO notifications from storage (e.g. lock + waits/override notifications). It was broken by + e031d9aaae59a9f79710dc1138b76b69272615a3 -M src/auth/auth-request.c +M src/imap/imap-client.c -2017-03-07 13:32:15 +0200 Aki Tuomi (5f2a6395a) +2018-02-15 18:15:16 +0200 Timo Sirainen (4cf9cf959) - lib: Add uuid support to guid + imap: Add client_create_finish() to finish namespace creation. -M src/lib/guid.c -M src/lib/guid.h -M src/lib/test-guid.c +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-master-client.c +M src/imap/main.c -2017-03-23 14:09:01 +0200 Aki Tuomi (28cdaf643) +2018-02-15 18:13:20 +0200 Timo Sirainen (084a6f8e6) - mail-log: Differentiate autoexpunges from expunges + imap: When running standalone, delay initializing namespaces until PREAUTH + is sent + Most importantly this makes the code paths similar for standalone and + non-standalone clients, which is needed by the following commits. -M src/plugins/mail-log/mail-log-plugin.c +M src/imap/main.c -2017-03-23 14:08:30 +0200 Aki Tuomi (ee4ce072d) +2017-12-13 19:05:30 +0200 Martti Rannanjärvi (a9eca13a1) - lib-storage: Indicate mail is being autoexpunged + global: Flip MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT to ..._ALLOW_ROOT - This way plugins, such as mail_log, can detect this. -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/main.c +M src/indexer/indexer-worker.c +M src/lda/main.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lmtp/main.c +M src/plugins/quota/quota-status.c +M src/pop3/main.c +M src/submission/main.c +M src/util/script-login.c -2017-03-27 15:28:01 +0300 Timo Sirainen (1fdc2de58) +2017-09-29 14:16:52 +0300 Martti Rannanjärvi (9057b2f75) - config: Don't stop the process due to idling. + lib-storage: Flip disallow_root in service_drop_privileges() - If the config process restarts, it also reloads configuration. We'd rather - want the configuration reloads to always be explicit. -M src/config/config-settings.c +M src/lib-storage/mail-storage-service.c -2017-03-27 13:44:13 +0300 Timo Sirainen (454f3876b) +2017-09-29 13:47:22 +0300 Martti Rannanjärvi (63ef06755) - cassandra: Fallback consistency fix - it wasn't used permanently + master: Flip disallow_root in drop_privileges() - Because the "do I want to retry using primary consistency?" check was done - using the first failure timestamp, after 60 seconds that check always - returned TRUE. We should instead be checking the last timestamp for a query - that was sent with the primary consistency. -M src/lib-sql/driver-cassandra.c +M src/master/service-process.c -2017-03-27 13:33:18 +0300 Timo Sirainen (87c3d632c) +2017-09-29 13:40:12 +0300 Martti Rannanjärvi (f6a3f3eb8) - cassandra: Fallback consistency fix - max retry interval was set wrong + lib: Add restrict_access_flags enum to use with restrict_access[_by_env]() - The maximum msecs is _MAX_RETRY_MSECS, not _FIRST_RETRY_MSECS + Swap parameter locations in the functions to make sure plugins are updated + to use the new api. -M src/lib-sql/driver-cassandra.c +M src/anvil/main.c +M src/auth/main.c +M src/config/main.c +M src/dict/main.c +M src/director/main.c +M src/dns/dns-client.c +M src/doveadm/main.c +M src/imap-hibernate/main.c +M src/indexer/indexer-worker.c +M src/indexer/indexer.c +M src/ipc/main.c +M src/lib-program-client/program-client-local.c +M src/lib-storage/mail-storage-service.c +M src/lib/restrict-access.c +M src/lib/restrict-access.h +M src/lmtp/main.c +M src/log/main.c +M src/login-common/main.c +M src/master/service-process.c +M src/old-stats/main.c +M src/plugins/quota/quota-status.c +M src/replication/aggregator/aggregator.c +M src/replication/replicator/replicator.c +M src/stats/main.c +M src/util/rawlog.c +M src/util/script-login.c +M src/util/script.c +M src/util/tcpwrap.c -2017-03-26 19:08:18 +0200 Stephan Bosch (c1b218cd6) +2017-12-18 11:35:27 +0200 Martti Rannanjärvi (aeddc84b6) - lib-http: client: Fix aborting a request that has a delayed error. + lib: Flip drop_setuid_root in restrict_access_settings - Caused by recent changes in delayed error handling. -M src/lib-http/http-client-request.c -M src/lib-http/test-http-client-errors.c +M src/lib-storage/mail-storage-service.c +M src/lib/restrict-access.c +M src/lib/restrict-access.h -2017-03-19 15:35:14 +0200 Timo Sirainen (772535ebc) +2017-12-18 12:44:14 +0200 Martti Rannanjärvi (f7d20995c) - imapc: Add imapc_features=delay-login + lib-program-client: Remove extra drop_setuid_root flag copy - The connection to imapc_host is delayed until it's actually needed to be - performed. -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-settings.h -M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-program-client/program-client-local.c -2017-03-19 15:34:20 +0200 Timo Sirainen (c8e6aa69b) +2018-02-19 14:44:04 +0200 Timo Sirainen (9a2898fb8) - imap: Remove imapc-specific "is connection valid?" code + lib-storage: Unless LAYOUT=index, don't rebuild list index on missing INBOX - This is now done by imapc itself in the previous patch -M src/imap/main.c +M src/lib-storage/list/mailbox-list-index.c -2017-03-19 15:32:53 +0200 Timo Sirainen (a7b684786) +2018-02-19 12:54:53 +0200 Timo Sirainen (a82c0f030) - imapc: Fail user creation if login to imapc_host fails. + lib-storage: mailbox_list_index_handle_corruption() - Lock mailbox list + while rebuilding - This causes imapc to actually wait for the login to succeed or fail. Such a - wait was already done by the imap code, which will be removed by the next - patch. - -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h + This guards against simultaneous mailbox create/delete/rename. -2017-03-25 15:46:58 +0200 Aki Tuomi (e1275ba7a) +M src/lib-storage/list/mailbox-list-index.c - quota: Add backend register/unregister +2018-02-19 12:53:46 +0200 Timo Sirainen (a8bd6c9e9) - This way, other mail plugins can register their own quota backends. + lib-storage: mailbox_list_index_handle_corruption() - Move actual handling + to its own function -M src/plugins/quota/quota-plugin.c -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota.c -2017-03-24 14:46:05 +0200 Timo Sirainen (dfabd74c0) +M src/lib-storage/list/mailbox-list-index.c - lib-mail: Fix read overflow / crash in message_header_decode() +2018-02-19 09:57:17 +0200 Aki Tuomi (d9a1a7cbe) - If the input string was "=?charset?Q|B?text?", the code attempted to look up - the character after it. And if it was "=", the callback was called with - size=-1, which ends up in a crash. + lib-ssl-iostream: Use SSL_CTX_set_ecdh_auto macro -M src/lib-mail/message-header-decode.c -M src/lib-mail/test-message-header-decode.c + This macro is same for 1.0.2 and 1.1.0 and libressl. -2016-12-16 22:18:02 +0200 Martti Rannanjärvi (26fde3e21) +M src/lib-ssl-iostream/iostream-openssl-context.c - doc: mention no_ticket in ssl config example +2018-02-18 18:11:18 +0200 Aki Tuomi (0de790596) + imap: If snippet is not available return NIL -M doc/example-config/conf.d/10-ssl.conf -2017-03-23 20:16:44 +0200 Timo Sirainen (5f7ffdbe9) +M src/imap/imap-fetch-body.c - imap-login: Move forward_fields updating code to login-common +2018-02-18 00:53:12 +0200 Timo Sirainen (9e1a3a76d) - This allows using the new client_add_forward_field() in e.g. plugins. + imap: Fix FETCH SNIPPET -M src/imap-login/imap-login-client.c -M src/login-common/client-common.c -M src/login-common/client-common.h + 1) _BUFFERED flag wasn't set, which caused a missing space before the + "SNIPPET". 2) It caused \Seen flag to be added to the mail -2017-03-24 04:21:49 +0200 Timo Sirainen (a440c98a2) +M src/imap/imap-fetch-body.c - lib-storage: Fix mail_user_autoexpunge() return value to be initialized - properly +2018-02-16 14:49:59 +0200 Timo Sirainen (2f8165728) + imap: Don't enforce sending SNIPPET reply as literal -M src/lib-storage/mail-autoexpunge.c + Also change it to use "cur_str" since the reply is never very long. -2017-03-23 14:27:28 +0200 Timo Sirainen (35b5cca7a) +M src/imap/imap-fetch-body.c - lib-storage: Change mail_user_autoexpunge() to return number of autoexpunged - mails +2018-02-16 14:46:36 +0200 Timo Sirainen (bb80752f8) + imap: Add parenthesis to FETCH SNIPPET (FUZZY text) response -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-autoexpunge.h + Otherwise it violates the RFC 3501 text about FETCH responses. -2017-03-23 14:19:42 +0200 Timo Sirainen (bc72ba681) +M src/imap/imap-fetch-body.c - lmtp: Trigger autoexpunging only for the last RCPT TO. +2018-02-16 16:59:35 +0200 Martti Rannanjärvi (96d1d2d8d) - Otherwise if the autoexpunging takes a long time, the LMTP client could - disconnect due to a timeout. The mails would still eventually get delivered - though, so it would result in duplicate mails being delivered. + charset-alias: Fix keyvalues iteration - An alternative to this would be to keep all the mail_users referenced until - the delivery is finished and then autoexpunge all of them at the end. It - increases memory usage though and complicates the code, so at least for now - it's not implemented. + charset-alias-plugin.c:113:27: error: comparison between pointer and zero + character constant [-Werror=pointer-compare] + for (i = 0; keyvalues[i] != '\0'; i++) { + ^~ charset-alias-plugin.c:113:14: note: did you + mean to dereference the pointer? + for (i = 0; keyvalues[i] != '\0'; i++) { -M src/lmtp/commands.c +M src/plugins/charset-alias/charset-alias-plugin.c -2017-03-23 14:15:49 +0200 Timo Sirainen (70d00769d) +2018-02-16 16:53:04 +0200 Martti Rannanjärvi (c2a0b6170) - lib-storage: Replace MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE with explicit - mail_user_autoexpunge() + charset-alias: Cleanup whitespace - This allows better control of which users are being autoexpunged. This patch - changes behavior at least in two ways now: + Remove \r from end of lines and remove trailing whitespace. - 1) After shared folder access, the owner user isn't autoexpunged at deinit. - Although this is a bit questionable of whether it should be or not. +M src/plugins/Makefile.am +M src/plugins/charset-alias/Makefile.am +M src/plugins/charset-alias/charset-alias-plugin.c +M src/plugins/charset-alias/charset-alias-plugin.h - 2) LMTP's quota check at RCPT TO stage doesn't trigger autoexpunging. +2018-01-24 19:36:22 -0500 Hideo Yoshizane (6791b1e85) -M src/imap/imap-client.c -M src/imap/main.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h -M src/lmtp/commands.c -M src/lmtp/main.c -M src/pop3/main.c -M src/pop3/pop3-client.c + charset-alias-plugin -2017-03-23 14:08:53 +0200 Timo Sirainen (b551e46ca) - pop3: Start autoexpunging only after client is disconnected +M configure.ac +M src/plugins/Makefile.am +A src/plugins/charset-alias/Makefile.am +A src/plugins/charset-alias/charset-alias-plugin.c +A src/plugins/charset-alias/charset-alias-plugin.h +2018-01-31 10:27:54 +0100 Stephan Bosch (254cae66e) -M src/pop3/pop3-client.c + lmtp: local: Use recipient index in lmtp_local_rcpt_reply_overquota(). -2017-03-16 11:15:18 +0200 Martti Rannanjärvi (5c556ef3a) + When used during the DATA command, it should send a reply for the correct + recipient. During the RCPT command there is only one reply due. Added assert + that checks this. - global: Log internal storage error on failure +M src/lmtp/lmtp-local.c +2018-01-31 10:34:11 +0100 Stephan Bosch (c81bd718b) -M src/doveadm/doveadm-mail-altmove.c -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-deduplicate.c -M src/doveadm/doveadm-mail-expunge.c -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-mail-flags.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail-index.c -M src/doveadm/doveadm-mail-iter.c -M src/doveadm/doveadm-mail-mailbox-metadata.c -M src/doveadm/doveadm-mail-mailbox-status.c -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail-save.c -M src/doveadm/doveadm-mail-search.c -M src/doveadm/doveadm-mail.c -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-mailbox-export.c -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-tree-fill.c -M src/imap/imap-state.c -M src/indexer/master-connection.c -M src/lda/main.c -M src/lib-imap-urlauth/imap-urlauth-backend.c -M src/lib-lda/mail-deliver.c -M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-guid-cache.c -M src/lmtp/commands.c -M src/plugins/acl/doveadm-acl.c -M src/plugins/fts-lucene/fts-backend-lucene.c -M src/plugins/fts-lucene/lucene-wrapper.cc -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-build-mail.c -M src/plugins/lazy-expunge/lazy-expunge-plugin.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c -M src/plugins/mail-crypt/mail-crypt-key.c -M src/plugins/mail-crypt/test-mail-key.c -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/push-notification/push-notification-driver-ox.c -M src/plugins/push-notification/push-notification-event-mailboxcreate.c -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota.c -M src/pop3/pop3-client.c -M src/pop3/pop3-commands.c + lmtp: local: Add explicit cmd parameter to + lmtp_local_rcpt_reply_overquota(). -2017-03-17 09:23:00 +0200 Martti Rannanjärvi (6732ce37d) + Using the RCPT cmd is only valid for the RCPT command and not when quota + excess is detected during DATA. That would cause a segmentation fault, since + rcpt->rcpt.rcpt_cmd == NULL. - lmtp: Log internal error on STATUS_CHECK_OVER_QUOTA failure +M src/lmtp/lmtp-local.c +2018-01-31 10:30:23 +0100 Stephan Bosch (a2c36f57a) -M src/lmtp/commands.c + lmtp: local: Make local variable for rcpt->rcpt.rcpt_cmd in + lmtp_local_rcpt_check_quota(). -2017-03-16 11:12:29 +0200 Martti Rannanjärvi (dcf7e4f93) - lib-storage: Add mail_storage_get_last_internal_error() +M src/lmtp/lmtp-local.c - This returns the error given to mail_storage_set_critical(). +2018-01-17 21:26:44 +0100 Stephan Bosch (abc7aab27) -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-storage.h + lmtp: local: Fix segfault occurring when quota is exceeded. -2017-03-22 17:17:41 +0200 Martti Rannanjärvi (690f935be) - quota: Add quota_max_mail_size setting +M src/lmtp/lmtp-local.c +2018-01-25 22:24:05 +0100 Stephan Bosch (e0285e56f) -M doc/example-config/conf.d/90-quota.conf -M src/plugins/quota/Makefile.am -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota-status.c -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota.c -M src/plugins/quota/quota.h + lib-smtp: client: Fix ignoring invalid certificate from server. -2017-03-23 10:16:30 +0200 Martti Rannanjärvi (9edefd429) + Although it initially allowed the invalid certificate, it would still fail + later on while reading/writing the SSL streams. - quota: Use quota_alloc_result in quota_settings.test_alloc +M src/lib-smtp/smtp-client-connection.c +2018-02-12 12:28:37 +0200 Aki Tuomi (e15a37fda) -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota.c -M src/plugins/trash/trash-plugin.c + auth: Set correct context type when bypassing reporting in auth_success -2017-03-23 13:48:04 +0200 Martti Rannanjärvi (42edee2d7) + Broken in 41ff6e6a4a085786d4c15a58c7c50a28e2110c3f - quota: Introduce quota_alloc_result return type +M src/auth/auth-request.c +2018-02-06 09:48:11 +0200 Aki Tuomi (d3a3654dc) -M src/plugins/quota/quota-status.c -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota.c -M src/plugins/quota/quota.h + auth: Add policy check configuration options -2017-03-23 15:05:12 +0200 Timo Sirainen (2dec3731d) + Allows disabling before/after auth checks, or reporting. - dbox: Allow ":" separator between mail_attachment_fs driver and args. +M src/auth/auth-request-handler.c +M src/auth/auth-request.c +M src/auth/auth-settings.c +M src/auth/auth-settings.h - The ":" separator is nowadays commonly used elsewhere for the separator, so - it should work here as well. +2018-02-05 14:26:15 +0200 Aki Tuomi (e0b3e89dc) -M src/lib-storage/index/dbox-common/dbox-storage.c + auth: Use correct username is auth policy requests -2016-11-22 10:54:43 +0200 Aki Tuomi (ff271fae9) + When doing master authentication as first, use the username of the user, not + master user, for policy lookup. - lib: Fix whitespace in var-expand.c +M src/auth/auth-policy.c +M src/auth/auth-settings.c +2018-02-08 02:26:23 +0200 Timo Sirainen (4bbad8a8a) -M src/lib/var-expand.c + lib-ssl-iostream: Assert-crash if input stream has IO already set -2017-02-25 23:34:03 +0200 Aki Tuomi (6f1f9bac6) - lib-storage: Add and use default mailbox iterator +M src/lib-ssl-iostream/iostream-openssl.c - The idea is to allow mail plugins to see also the non-existent autoboxes by - feeding them thru the iterator. +2018-02-08 02:22:18 +0200 Timo Sirainen (abf71b6ab) - Fixes problem where autocreated boxes are not seen by ACL plugin. + lib: Add i_stream_get_root_io() and use it to deduplicate code -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/list/mailbox-list-maildir-iter.c -M src/lib-storage/list/mailbox-list-subscriptions.c -M src/lib-storage/mailbox-list-private.h -2017-03-21 13:14:41 +0200 Aki Tuomi (e8878afb9) +M src/lib/istream-private.h +M src/lib/istream.c - lib-storage: Expose mailbox_list_init_autocreate +2018-02-08 10:53:50 +0200 Timo Sirainen (8bcd5e5cb) - It is needed when backend_ctx is created on the fly + lib-smtp: Recreate connection IO after streams change -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/mailbox-list-private.h + This fixes hangs after STARTTLS. -2017-02-25 23:33:20 +0200 Aki Tuomi (f9586610b) + Originally by Stephan Bosch - acl: Use MODULE_CONTEXT for mailbox list iterator +M src/lib-smtp/smtp-client-connection.c +2018-02-08 10:52:57 +0200 Timo Sirainen (962e5953d) -M src/plugins/acl/acl-mailbox-list.c + lib: Add connection_streams_changed() -2017-02-25 23:59:21 +0200 Aki Tuomi (09b0bde68) + Originally by Stephan Bosch - acl: Use mailbox_list_context instead of ctx->ctx +M src/lib/connection.c +M src/lib/connection.h - This prepares for the next commit +2018-02-08 02:38:23 +0200 Timo Sirainen (186a3319e) -M src/plugins/acl/acl-mailbox-list.c + doveadm: client: Set IO only after enabling SSL -2017-03-22 12:01:18 +0200 Aki Tuomi (884394237) + io_add_istream() needs to be used with the SSL istream, otherwise it can + cause hangs. - lib-dict: Ensure all iterations and transactions are done in deinit +M src/doveadm/server-connection.c +2018-02-08 02:28:54 +0200 Timo Sirainen (b4e076dba) -M src/lib-dict/dict.c + lib-imap-client: Fix IO after enabling SSL -2017-03-22 12:01:07 +0200 Aki Tuomi (57906900c) + io_add_istream() needs to be used with the SSL istream, otherwise it can + cause hangs. - lib-dict: Track transaction counts +M src/lib-imap-client/imapc-connection.c +2018-02-06 15:12:26 +0200 Timo Sirainen (0b2363a89) -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c + replication: Don't send notification for changes done by dsync transactions -2017-03-22 10:33:20 +0200 Aki Tuomi (6440a3422) - lib-dict: Fix test-dict linkage +M src/plugins/replication/replication-plugin.c +2018-02-06 15:10:48 +0200 Timo Sirainen (ea2dbaa29) -M src/lib-dict/Makefile.am + lib-storage: Set mailbox_transaction_context.flags earlier -2017-03-22 10:32:58 +0200 Aki Tuomi (a0053e52a) + Set it in index_transaction_init() so plugins' transaction_begin() methods + see it after calling super.transaction_begin(). - lib-dict: Use dict-fail iterator and transaction when missing from dict - driver +M src/lib-storage/index/index-transaction.c +M src/lib-storage/mail-storage.c +2018-02-08 13:04:48 +0200 Aki Tuomi (977a292de) -M src/lib-dict/dict.c + old-stats: Set process dumpable during stats gathering -2017-03-22 12:05:32 +0200 Aki Tuomi (9cce4519d) + /proc/self/io is not accessible otherwise - dict: Update correct counter in dict_iterate_init +M src/plugins/old-stats/mail-stats-fill.c +2018-02-08 13:03:37 +0200 Aki Tuomi (07e126638) -M src/lib-dict/dict.c + lib: Add restrict_access_get/set_dumpable -2017-03-22 10:32:04 +0200 Aki Tuomi (08e468540) - lib-dict: Add dict-fail driver +M src/lib/restrict-access.c +M src/lib/restrict-access.h - It can be used for providing various failures +2018-02-08 13:01:50 +0200 Aki Tuomi (52d6f2db8) -M src/lib-dict/Makefile.am -A src/lib-dict/dict-fail.c -M src/lib-dict/dict-private.h + lib: Clarify restrict_access_allow_coredumps -2017-03-17 12:58:08 +0200 Martti Rannanjärvi (0e7af5e64) - global: Log mailbox_list internal errors +M src/lib/restrict-access.h +2018-02-07 16:17:13 +0200 Timo Sirainen (fbc2195f3) -M src/doveadm/doveadm-mail-index.c -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mailbox-list-iter.c -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c -M src/doveadm/dsync/dsync-mailbox-tree-fill.c -M src/imap/main.c -M src/lib-imap-urlauth/imap-urlauth-backend.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/mail-autoexpunge.c -M src/plugins/quota/quota-count.c -M src/plugins/virtual/virtual-config.c -M src/pop3/pop3-client.c + lib-index: Fix assert-crash with lock_method=dotlock -2017-03-17 12:38:21 +0200 Martti Rannanjärvi (99b77f8e5) + The dotlock wasn't deleted in all code paths. Fix this by simplifying the + unlocking to be done the same way with and without dotlock. - lib-storage: Add mailbox_list_get_last_internal_error() + Fixes: Panic: file mail-cache.c: line 624 (mail_cache_lock_file): assertion + failed: (cache->dotlock == NULL) - This returns the error given to mailbox_list_set_critical(). +M src/lib-index/mail-cache-private.h +M src/lib-index/mail-cache.c -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h +2018-01-09 15:37:25 -0500 Timo Sirainen (36c2a2f7e) -2017-03-22 23:19:51 +0200 Martti Rannanjärvi (7c75172b9) + lib-storage: Lock mailbox_list for mailbox create/delete/rename - lib: Download unicode.org files from dovecot.org + This is only required for mailbox creation to fix a race condition with + LAYOUT=index: If INBOX doesn't exist it will rescan the mailboxes to find + out if there are any missing ones. If INBOX creation isn't locked, it's + possible that the first process hasn't finished creating INBOX before the + second process find it and attempts to open it. + + The delete and rename locking are probably useful to guard against race + conditions when clients intentionally issues create/delete/rename commands + concurrently. +M src/lib-storage/mail-storage.c -M src/lib-fts/Makefile.am -M src/lib/Makefile.am +2018-01-09 15:36:58 -0500 Timo Sirainen (72b239b16) -2017-03-17 23:39:33 +0100 Stephan Bosch (06a748486) + lib-storage: Add mailbox_list_[un]lock() - lib-http: client: Implemented http_client_request_url_str() function that - accepts an URL string rather than a pre-parsed URL object. - If the provided HTTP URL is invalid, the callback with the error is called - some time later from the ioloop. This change also amends the - test-http-client-errors test suite with a new test for this new feature. +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c -M src/lib-http/http-client-request.c -M src/lib-http/http-client.h -M src/lib-http/test-http-client-errors.c +2018-01-09 15:35:13 -0500 Timo Sirainen (1ccc5eb7f) -2017-03-17 23:51:19 +0100 Stephan Bosch (452cc7b20) + lib-storage: mailbox_delete() - Fix cleanup in error handling - lib-http: client: Make sure a request's log label never gets a duplicate - request target part. + If removing index deletion mark failed, box->deleting wasn't set to FALSE + and the mailbox was left opened. - Make sure the URL part of the label always only consists of a - http://host:port part and nothing more. +M src/lib-storage/mail-storage.c -M src/lib-http/http-client-request.c +2018-01-09 15:33:26 -0500 Timo Sirainen (3ce6458ce) -2017-03-17 23:35:55 +0100 Stephan Bosch (7b846290f) + lib-storage: mailbox_rename() - Use source storage for errors - lib-http: client: Restructured the handling of delayed errors. + It was documented to use source storage for errors, but some of the errors + were set to destination storage. - The req->delayed_error* fields are cleared before the callback is called and - before the request is dereferenced. This way, freeing the request never - removes it from the delayed request list when the list is being processed. - It also makes it possible to resubmit the request from the callback (mainly - for future use). +M src/lib-storage/mail-storage.c -M src/lib-http/http-client-request.c -M src/lib-http/http-client.c +2018-02-06 18:01:04 +0200 Timo Sirainen (0deeb8555) -2017-03-17 23:18:52 +0100 Stephan Bosch (4d57187d0) + lib-storage: mail_storage_lock_create() - add support for dotlocks - lib-http: client: Clear request pointer immediately in - http_client_request_error(). +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-user.c -M src/lib-http/http-client-request.c +2018-02-06 17:49:15 +0200 Timo Sirainen (e5b99149c) -2017-03-17 23:00:42 +0100 Stephan Bosch (62852b807) + lib-storage: Change mail_user_lock_file_create() to use + mail_storage_lock_create() - lib-http: test-http-client-errors: Added test for using https:// while SSL - is not configured. +M src/lib-storage/mail-user.c -M src/lib-http/test-http-client-errors.c +2018-02-06 17:47:37 +0200 Timo Sirainen (f3065275d) -2017-03-19 15:47:41 +0100 Stephan Bosch (6da637fe3) + lib-storage: Add mail_storage_lock_create() - global: Use http_response_get_message() to log HTTP responses. + This is split off of mailbox_lock_file_create(). +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c -M src/auth/auth-policy.c -M src/lib-http/http-client-connection.c -M src/plugins/fts-solr/solr-connection.c -M src/plugins/fts/fts-parser-tika.c -M src/plugins/push-notification/push-notification-driver-ox.c +2018-02-06 17:35:18 +0200 Timo Sirainen (6b49608a2) -2017-03-19 15:09:03 +0100 Stephan Bosch (a47415838) + lib: Add file_lock_from_dotlock() - lib-http: Added a function to obtain a message suitable for logging from a - response object. + The dotlock creation requires various settings, so the file-lock.h API can't + easily be used to create it. But once created, it's simpler to keep all lock + types in the same struct file_lock, which can be unlocked/freed once + finished. - This prevents logging internal error codes (>= 9000). +M src/lib/file-lock.c +M src/lib/file-lock.h -M src/lib-http/http-response.h +2017-12-26 00:38:58 +0100 Stephan Bosch (4517f6335) -2017-03-19 15:06:13 +0100 Stephan Bosch (f6d2025b8) + lib-smtp: server: Fix assertion failure occurring for a second failed + BDAT/BURL command. - lib-http: Explicitly define the start of the range of internal response - status codes. + Assertion was: + Panic: file smtp-server-cmd-data.c: line 420 + (smtp_server_connection_data_chunk_init): assertion failed: + (data_cmd->chunk_first) -M src/lib-http/http-client.h -M src/lib-http/http-response.h +M src/lib-smtp/smtp-server-cmd-data.c -2017-03-17 23:03:03 +0100 Stephan Bosch (07b307039) +2017-12-27 14:38:41 +0100 Stephan Bosch (d5ed3c4f0) - lib-http: test-http-client-errors: Always use the proper error status code - definitions rather than an integer literal. + submission: EHLO command: Remove obsolete pending_ehlo handling. + This was used to wait with sending an EHLO reply until the proxy connection + to the relay server completes. The previous commit made this functionality + obsolete, since command input handling is blocked entirely until the proxy + connection is ready. -M src/lib-http/test-http-client-errors.c +M src/submission/cmd-helo.c +M src/submission/submission-client.h -2017-03-22 09:03:20 +0200 Aki Tuomi (0a812a18b) +2017-12-27 14:36:10 +0100 Stephan Bosch (ffd0514cb) - doveadm: Send and receive exit codes correctly + submission: Block server input handling until proxy connection to relay + server completes. - The old code would assume TEMPFAIL for almost everything. + This makes sure we are aware of the full extent of the backend server's + capabilities, before we start handling commands. Before, only EHLO commands + were blocked this way, but this did not account for MAIL/RCPT parameters, + which are equally dependent. Fixes problems with clients that send no EHLO + after AUTH, like Thunderbird. -M src/doveadm/client-connection.c -M src/doveadm/server-connection.c +M src/submission/submission-client.c -2017-03-22 19:21:55 +0200 Aki Tuomi (37f0284ba) +2017-12-27 17:02:12 +0100 Stephan Bosch (8eb9c8954) - doveadm: Add exit code/string conversion functions + lib-smtp: server: Add APIs for halting and resuming connection command + handling. + Also adds function to start the connection in a pending (halted) state. This + way the greeting can already be sent (over SSL if needed), while deferring + command handling until some external activity is completed. -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm.h +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-private.h +M src/lib-smtp/smtp-server.h -2017-03-02 23:12:45 +0100 Stephan Bosch (e8a8ae03e) +2017-12-27 16:31:12 +0100 Stephan Bosch (52bf7c543) - lib-lda: smtp-client: Fixed memory leak of the error message string. + lib-smtp: server: Prevent calling smtp_server_connection_login() after + smtp_server_connection_start(). + Added assertion. -M src/lib-lda/smtp-client.c +M src/lib-smtp/smtp-server-connection.c -2017-03-02 23:51:45 +0100 Stephan Bosch (17084e30a) +2017-12-27 16:22:22 +0100 Stephan Bosch (2dc83a5a7) - lib-lda: smtp-client: Fixed cleanup of LMTP client at end of transaction. + lib-smtp: server: Protect smpt_server_connection_start() from being called + multiple times. - It was not deinitialized, causing a memory leak. -M src/lib-lda/smtp-client.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-private.h -2017-03-02 00:42:13 +0100 Stephan Bosch (a3a4c12c3) +2017-12-27 16:18:16 +0100 Stephan Bosch (67c804150) - lib-smtp: lmtp-client: Fixed bug in timeout handling. + lib-smtp: server: Delay handling initial input (from login service) until + after smtp_server_connection_start(). - The timeout was erroneously stopped when lmtp_client_send() was invoked - before a connection was established. Once the connection finally got - established, the timeout was removed. This would cause the client to wait - indefinitely. + Instead, it is now handled in normal io callback. -M src/lib-smtp/lmtp-client.c +M src/lib-smtp/smtp-server-connection.c -2017-03-02 00:03:50 +0100 Stephan Bosch (14a37c403) +2017-12-27 15:56:03 +0100 Stephan Bosch (dbd340384) - lib-lda: smtp-client: Make sure only the first error determines the tempfail - status. + lib-smtp: server: Remove implicit smtp_server_connection_start() from + smtp_server_connection_login(). - The client is supposed to stop running the moment the first error occurs. - However, there is a (very unlikely) possiblity that the encapsulated LMTP - client issues both an RCPT and DATA error callback in sequence. In that - case, the second callback should not override the tempfail status of the - first (the second likely is a tempfail). If the server disconnects right - after failing the last of at least two recipients, the lmtp-client would - issue a DATA callback with a disconnection error. The disconnect error would - set the client->tempfail flag, which caused smtp_client_deinit*() to always - return -1 in this scenario. -M src/lib-lda/smtp-client.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server.h +M src/submission/submission-client.c -2016-11-05 22:00:09 +0100 Stephan Bosch (077b350eb) +2017-12-27 15:59:23 +0100 Stephan Bosch (04676afab) - lib-lda: smtp-client: Renamed "smtp_client" parameters to "client" for - consistency. + lib-smtp: server: Moved smtp_server_connection_start() after + smtp_server_connection_login(). + Also fixes an indent problem in the header comment implicitly. -M src/lib-lda/smtp-client.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server.h -2017-03-22 01:05:37 +0200 Timo Sirainen (fcb3ccff6) +2017-12-27 15:52:13 +0100 Stephan Bosch (4f9715726) - lib: Add missing error handling to o_stream_cork() + lib-smtp: server: Moved ssl_start argument from + smtp_server_connection_start() to smtp_server_connection_create(). - With ostream-file the corking could have called buffer_flush(), which could - have failed and set stream_errno, but nothing would set last_failed_errno. + This frees smtp_server_connection_start() for general use. - Fixes: Panic: file ostream.c: line 59 (o_stream_close_full): assertion - failed: (stream->last_failed_errno != 0) +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server.h +M src/lib-smtp/test-smtp-payload.c +M src/lib-smtp/test-smtp-server-errors.c +M src/lmtp/client.c +M src/submission-login/client.c +M src/submission/submission-client.c -M src/lib/ostream.c +2018-02-06 12:37:34 +0200 Timo Sirainen (20a8237da) -2017-03-20 20:21:56 +0200 Aki Tuomi (9945103c5) + fs-posix: Fix iterating directories when readdir() returns DT_UNKNOWN - lib-dict: Ensure init returns dict + Files were iterated correctly, but directories weren't. This mainly broke + directory iteration with NFS when nordirplus mount option was used. +M src/lib-fs/fs-posix.c -M src/lib-dict/dict.c +2018-02-05 22:21:13 +0200 Timo Sirainen (4031a87e9) -2017-03-10 10:05:14 +0200 Aki Tuomi (2c182e046) + fts: Don't reindex FTS mails if .cache file is deleted - pop3-login: Add FORWARD for XCLIENT + This means that if fts is enabled, "doveadm index" no longer adds mails to + dovecot.index.cache if it's deleted. However, it was rarely used for that + purpose. More likely due to a corrupted cache file all the mails were + unnecessarily being opened and reindexed. - This allows passing passdb variables. They are prefixed with forward_ when - imported to extra fields. +M src/plugins/fts/fts-storage.c -M src/pop3-login/client.c +2018-02-07 15:28:45 +0200 Timo Sirainen (f0abd0151) -2017-03-10 10:04:33 +0200 Aki Tuomi (870ed05d3) + cassandra: Make sure timestamp is always logged (if set) with + debug_queries=y - pop3-login: Pass forward_ passdb args using XCLIENT command + It wasn't logged in some code paths. +M src/lib-sql/driver-cassandra.c -M src/pop3-login/pop3-proxy.c +2018-02-07 15:27:07 +0200 Timo Sirainen (bf54fe6f9) -2017-02-20 20:37:09 +0200 Aki Tuomi (6ca2c6216) + cassandra: Fix setting timestamp for transaction queries with v3 protocol - imap-login: Allow x-forward- to specify forward fields from trusted networks + It was working for prepared statements, but not for non-prepared statements. +M src/lib-sql/driver-cassandra.c -M src/imap-login/imap-login-client.c -M src/imap-login/imap-proxy.c -M src/login-common/client-common-auth.c +2018-02-05 23:54:33 +0200 Timo Sirainen (abb1f862f) -2017-02-20 20:36:58 +0200 Aki Tuomi (dcdece5d5) + fts: Fix searching headers with TEXT/BODY - auth: Accept forward_fields from auth client + TEXT is searching headers and BODY is searching MIME headers. Those headers + were indexed with data language, so search must also include data language + when looking up words. We'll just include the data language for all searches + now, so it should always work correctly. +M src/plugins/fts/fts-user.c -M src/auth/auth-request.c -M src/lib-auth/auth-client-request.c -M src/lib-auth/auth-client.h -M src/login-common/client-common.h -M src/login-common/sasl-server.c +2018-02-05 23:51:51 +0200 Timo Sirainen (2778da25a) -2017-03-16 13:36:23 +0200 Aki Tuomi (d9ab90950) + fts: Fix searching SEARCH_HEADER_ADDRESS/COMPRESS_LWSP - auth: Add auth_fields_import_prefixed + These are "non-language" headers that are being searched, so they need to be + searched using data language. +M src/plugins/fts/fts-search-args.c -M src/auth/auth-fields.c -M src/auth/auth-fields.h +2018-01-12 21:03:41 +0100 Stephan Bosch (6f13a900c) -2017-03-14 10:01:51 +0200 Aki Tuomi (ccb936a8d) + lib-http: queue: Update the correct timout while dropping a request from the + delay queue. - auth: Support client_id variable + The absolute request timeout rather than the delay timeout was updated for + the removal of the request from the delay queue. - When imap_id_retain is turned on, contains the client ID request content - with dovecot special vars removed. +M src/lib-http/http-client-queue.c -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h +2018-02-06 15:50:19 +0100 Stephan Bosch (a2577af86) -2017-03-16 10:01:23 +0200 Aki Tuomi (7ee65ad6c) + lib: time-util: Fix timeval_cmp_margin() to correctly handle a margin + crossing the second boundary. - imap-login: Forward original client ID to next hop + The timeval_cmp_margin() function incorrectly assumed that the margin is + irrelevent when the tv_sec values are different. - This will be done if ID is present. +M src/lib/test-time-util.c +M src/lib/time-util.c -M src/imap-login/imap-proxy.c +2018-02-06 16:51:23 +0100 Stephan Bosch (7dc18d39a) -2017-02-20 19:11:01 +0200 Aki Tuomi (f1d4d448c) + lib: test-time-util: Put all test data for timeval_cmp() test in a single + struct array. - imap-login: Retain ID request without dovecot specials +M src/lib/test-time-util.c -M src/imap-login/imap-login-client.c -M src/login-common/client-common.h +2018-01-27 23:20:08 +0100 Stephan Bosch (daaf2a696) -2017-02-21 14:46:31 +0200 Aki Tuomi (5658aec7c) + submission: Add settings that configure the connect and command reply + timeouts. - imap-login: Add option to retain client id - This should be enabled if client_id is wanted for auth policy +M src/submission/submission-client.c +M src/submission/submission-settings.c +M src/submission/submission-settings.h -M src/imap-login/imap-login-settings.c -M src/imap-login/imap-login-settings.h +2018-01-19 23:32:31 +0100 Stephan Bosch (aab5da63d) -2017-02-20 18:58:21 +0200 Aki Tuomi (3b3dc40b2) + lib-smtp: client: Assign only connection settings during connection + initialization. - auth: Accept client_id from auth client + Due to some copy-paste mistake, some global client settings were assigned + instead. - Client ID contains the ID client request string for IMAP. +M src/lib-smtp/smtp-client-connection.c -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/lib-auth/auth-client-request.c -M src/lib-auth/auth-client.h -M src/login-common/client-common.h -M src/login-common/sasl-server.c +2018-01-19 23:31:05 +0100 Stephan Bosch (520f5469b) -2017-03-09 14:08:40 +0200 Aki Tuomi (f61eac37a) + lib-smtp: client: Always use per-connection settings in connection. - login-common: Add preproxy pool + Some part of the connection code referred to global client settings. - preproxy pool can be used to do allocations that are released once proxying - starts. +M src/lib-smtp/smtp-client-connection.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/login-common/login-proxy.c +2018-01-19 16:05:18 +0100 Stephan Bosch (b75ddaf75) -2017-01-29 01:03:00 +0200 Timo Sirainen (9fe890fdb) + lib-smtp: client: Properly allow per-connection SSL configuration. - imapc: Use LOGOUT to cleanly disconnect from server. + Although this was already partially possible, the connection was still + always using the global client SSL context. - This makes it clearer in the remote server's logs whether the disconnection - was intentional or not. +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-private.h - Use a hardcoded 5 second timeout for LOGOUT. It should be enough time for - the server to finish sending the tagged reply. +2018-01-19 14:44:50 +0100 Stephan Bosch (046fc74b3) -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-connection.h -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c + lib-smtp: client: Fix segfault occurring in connection when SSL certificate + is invalid. -2017-03-16 18:46:28 +0200 Timo Sirainen (7c5caf33b) + The connection is using its own local SSL settings to determine whether an + invalid certificate is allowed. However, these local settings were not + properly initialized. - lib-storage: Don't reset \Recent flags when rebuilding index +M src/lib-smtp/smtp-client-connection.c - The recent flags are tracked with first_recent_uid in the header. If the - first_recent_uid is valid in the old index, preserve it. This way all mails - don't show as having \Recent flag. +2018-01-22 18:51:21 +0100 Stephan Bosch (66f8ac510) - This was used by sdbox and mdbox code. + submission: Enable verbose reporting of relay server certificate problems. -M src/lib-storage/index/index-rebuild.c -2017-03-16 09:38:59 +0200 Aki Tuomi (265b99eaa) +M src/submission/submission-client.c - trash: Move config file to trash user +2018-01-29 09:55:51 -0500 Josef 'Jeff' Sipek (88305837a) - Makes static analyser happy + imap: Iterate over ns settings when deciding to add SPECIAL-USE capability -M src/plugins/trash/trash-plugin.c + To determine whether we should add the SPECIAL-USE capability to the OK + response to LOGIN, we have to iterate over namespace and mailbox + *settings* since the namespaces haven't been set up yet. -2017-03-05 19:45:04 +0100 Stephan Bosch (a39b5b285) +M src/imap/imap-client.c - lib-http: test-http-server-errors: Fixed logically dead code. +2018-01-25 12:27:41 +0200 Timo Sirainen (5fe57f396) - Problem reported by Coverity. + lib-storage: Fix adding body.snippet to cache -M src/lib-http/test-http-server-errors.c + Unless body.snippet was in mail_always_cache_fields, it didn't get added to + the cache file. -2017-03-02 18:32:15 +0200 Timo Sirainen (058ae8da2) +M src/lib-storage/index/index-mail.c - example-config: Update deliver_log_format comment +2018-01-25 12:35:51 +0200 Timo Sirainen (587facb5c) + lib-storage: Add comment to how mail_cache_field_can/want_add() is used -M doc/example-config/conf.d/10-logging.conf -2017-03-02 09:15:13 +0200 Aki Tuomi (3ad044975) +M src/lib-storage/index/index-mail.c - lib-ssl-iostream: Ensure verify_remote_cert is true +2018-01-25 12:35:35 +0200 Timo Sirainen (97ccc47ec) - Forgotten in 38424b8081a75be3ef93729fed4d30dbafca5885 + lib-index: Update comments for mail_cache_decision_*() -M src/lib-ssl-iostream/iostream-ssl.c -2017-02-20 09:32:15 +0200 Aki Tuomi (d7f6e4ab4) +M src/lib-index/mail-cache-private.h - lib-ssl-iostream: Fix ambiguity with SSL settings +2018-01-05 09:51:00 +0200 Aki Tuomi (83b1300b9) - - lib-ssl-iostream as client: Use only allow_invalid_cert. If it's not set, - verify the server cert. - - lib-ssl-iostream as server: If verify_client_cert=FALSE, don't ask for the - client cert. Otherwise, ask for client cert but still allow it if - allow_invalid_cert=TRUE. + lib-mail: mail-html2text - Validate UCS4 codepoint -M src/lib-ssl-iostream/iostream-openssl-context.c + Fixes: Panic: file unichar.c: line 160 (uni_ucs4_to_utf8_c): assertion + failed: (uni_is_valid_ucs4(chr)) -2017-03-01 13:12:41 +0200 Timo Sirainen (895a31a20) +M src/lib-mail/mail-html2text.c +M src/lib-mail/test-mail-html2text.c - imap-hibernate: Avoid using casts +2018-01-31 22:14:49 +0100 Stephan Bosch (5b2169951) + lib-imap-urlauth: Fix segfault occurring when userid part is missing for + "user+" or "submit+" URLAUTH access. -M src/imap-hibernate/imap-client.c -2017-03-01 09:15:29 +0200 Aki Tuomi (012969729) +M src/lib-imap-urlauth/imap-urlauth.c - trash: Read settings after namespaces are loaded +2017-12-23 23:49:02 +0100 Stephan Bosch (163ad616e) - Fixes Panic: file mail-namespace.c: line 709 (mail_namespace_find): - assertion failed: (ns != NULL) + submission-login: Fail CLIENT_AUTH_RESULT_MECH_SSL_REQUIRED authentication + result with 523 5.7.10 error. -M src/plugins/trash/trash-plugin.c + Defined in RFC5248, Section 2.4. -2017-02-27 16:23:09 +0200 Timo Sirainen (d82bad378) +M src/submission-login/client-authenticate.c - master: Try to listen on master socket even if all services couldn't be - listened to. +2017-12-27 15:18:14 +0100 Stephan Bosch (028fa1775) - This could happen during a settings reload. + submission: BURL command: Return more appropriate 554 5.7.14 error when + BURL/URLAUTH is not configured. -M src/master/service-listen.c + Defined in RFC5248, Section 2.4. -2017-02-27 16:22:52 +0200 Timo Sirainen (64c85d168) +M src/submission/cmd-data.c - master: Add missing error logging for master socket listening failure. +2018-01-08 11:38:37 +0200 Sergey Kitov (6dfadcd06) + lib-imap-client: continue imapc operation on parsing errors. -M src/master/service-listen.c -2017-02-27 16:22:08 +0200 Timo Sirainen (3b5d60f0c) +M src/lib-imap-client/imapc-connection.c - master: Don't crash if master socket couldn't be re-opened after settings - reload. +2017-11-11 10:07:42 +0200 Aki Tuomi (39f339f79) + lib-storage: Set keyword based on attachment presence when saving -M src/master/service-monitor.c + If attachment is detected, use $HasAttachment, if not use $HasNoAttachment -2017-02-23 11:47:20 +0200 Aki Tuomi (8f02dfd83) +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h +M src/lib-storage/mail.c - imap-hibernate: Support userdb in var_expand +2017-11-20 10:09:23 +0200 Aki Tuomi (08a89a646) + lib-storage: Add attachment detection settings -M src/imap-hibernate/imap-client.c -2017-02-26 16:10:58 +0200 Timo Sirainen (35b347051) +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h - lib-index: Fix test-mail-index-transaction-update +2017-11-10 14:32:44 +0200 Aki Tuomi (ce0a94fd3) - It was broken with TZ=Australia/ACT. Fixing it seems too troublesome, so - just use TZ=UTC during the test. + lib-mail: Add message_part_has_attachment -M src/lib-index/test-mail-index-transaction-update.c -2017-02-26 16:09:13 +0200 Timo Sirainen (9e3c2654f) +M src/lib-mail/message-part-data.c +M src/lib-mail/message-part-data.h - lib-index: Minor fix to day_first_uid updating +2018-01-28 11:44:26 +0100 Stephan Bosch (79ed2b3cb) - mktime() was getting a bit confused around day changes. Giving it only - year/month/day makes it less confused. + lib-smtp: client: Fix timeout leak sometimes occurring at unexpected remote + disconnect. -M src/lib-index/mail-index-transaction-update.c + While disconnected, newly submitted commands are queued, yet scheduled for + immediate failure. The timeout used for that was not cleaned up. -2017-03-11 19:20:30 +0200 Aki Tuomi (2f7bf1862) +M src/lib-smtp/smtp-client-connection.c - doveadm: Do not crash doveadm-server if input file missing +2017-12-27 12:05:50 +0200 Timo Sirainen (082a99e39) - save commands expects valid input file for it to work, if we are not running - for cli, and input file is not provided, provide EINVAL error to caller via - i_stream_error. + dovecot-config: Update lib-stats directory to lib-old-stats -M src/doveadm/doveadm-mail.c -2017-03-16 09:36:23 +0200 Aki Tuomi (07b27806c) +M dovecot-config.in.in - lib-dcrypt: Add asserts +2017-12-23 19:40:09 +0100 Stephan Bosch (16a10546b) - Fixes several static analysis reports + submission-login: Fixed handling of ssl=required for trusted connections. -M src/lib-dcrypt/dcrypt-openssl.c + Normally, SSL is not required for trusted connections (e.g. localhost), but + submission-login did not follow this standard. -2017-02-27 18:13:54 -0500 Josef 'Jeff' Sipek (edab7ec20) +M src/submission-login/client.c - lib-storage & imap: add MAIL_ERROR_UNAVAILABLE as [UNAVAILABLE] +2017-12-24 15:12:36 +0100 Stephan Bosch (3d71010cf) - [UNAVAILABLE] is defined in RFC 5530 and we were just missing a MAIL_ERROR_* - constant to make use of it. + submission: Restructure handling of QUIT command. -M src/doveadm/doveadm-mail.c -M src/imap/imap-commands-util.c -M src/lib-storage/mail-error.h + - Avoid explicitly proxying QUIT command when the proxy connection is not + ready: in that case the SMTP client connection will just send QUIT if + appropriate, without waiting for reply. + - Add timeout for proxied QUIT command, so that there are no problems when + the relay server hangs after QUIT (addresses FIXME). -2017-03-08 15:39:34 -0500 Timo Sirainen (8590275ec) +M src/submission/cmd-quit.c +M src/submission/submission-client.c +M src/submission/submission-client.h +M src/submission/submission-common.h - imap, pop3, indexer-worker: Add (deinit) to process title before - autoexpunging runs. +2017-12-24 14:52:07 +0100 Stephan Bosch (d99860b40) - lmtp should also do this, but it needs a bit larger changes. + submission: Dropped unused field from struct client. -M src/imap/imap-client.c -M src/imap/main.c -M src/indexer/master-connection.c -M src/pop3/main.c -M src/pop3/pop3-client.c -2017-03-08 17:09:12 -0500 Timo Sirainen (cc6a567ca) +M src/submission/submission-client.h - pop3: Add client.destroyed boolean +2017-12-24 12:17:48 +0100 Stephan Bosch (7a1eb3d24) + submission-login: Fix pipelining of commands beyond AUTH. -M src/pop3/pop3-client.c -M src/pop3/pop3-client.h + The master_data_prefix was initialized wrong; it omitted the expected '\0' + byte after the helo field. -2017-03-13 14:23:11 +0200 Timo Sirainen (ad5048758) +M src/submission-login/client-authenticate.c - auth: Auth workers shouldn't return username if it wasn't changed +2017-12-24 12:15:29 +0100 Stephan Bosch (1ab2e30e9) - This continues the previous fix where username was always added to - passdb/userdb cache, even if the username wasn't changed. That could have - resulted in wrongly changing usernames if the cache key didn't uniquely - identify the user. + submission: Initialize proxy connection before starting the SMTP server + connection. -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/auth-worker-client.c -M src/auth/passdb-blocking.c -M src/auth/userdb-blocking.c + The smtp_server_connection_login() function gets pre-login connection data + from login service, which can contain commands. The execution of commands + expects the proxy connection object to be initialized. -2017-03-13 13:49:04 +0200 Timo Sirainen (3b9d623c0) +M src/submission/submission-client.c - auth: passdb/userdb lookups via auth-worker cached too much of the replies +2018-01-26 20:37:32 +0100 Stephan Bosch (cdeb715d7) - Only the fields returned by the lookup itself were supposed to be cached. - This was especially problematic if the lookup via auth-worker didn't - uniquely identify the user. For example doing a passdb lookup for an - attribute shared by multiple users could have caused the reply to contain - the previous cached user's all extra fields. + lib-program-client: Make an explicit enum for the exit code. -M src/auth/auth-worker-client.c + Before, the meaning of the code was confusing, since the actual program + returns a different set of values. -2017-03-15 13:29:11 +0200 Aki Tuomi (3c87f3ede) +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c - auth: Properly hide all fields with passwords +2018-01-20 21:32:07 +0100 Stephan Bosch (c8f94f5cc) - client reply line wasn't hiding all items which contain 'pass' substring. - This was inconsistent behaviour since elsewhere this was done. + lib-program-client: local: Add test for big data I/O. -M src/auth/auth-client-connection.c -2017-03-15 18:20:31 +0200 Timo Sirainen (4325f1b85) +M src/lib-program-client/test-program-client-local.c - *-login: Change API for how login_plugins hook into client allocation. +2018-01-24 01:17:59 +0100 Stephan Bosch (009cc18b7) - The previous API worked badly when there were more than one plugin. The - current behavior works similarly to how mail_plugins work. + lib-program-client: Document the purpose of the use_dotstream setting. -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/login-common/main.c -2017-03-13 22:52:41 +0200 Timo Sirainen (170f62e6e) +M src/lib-program-client/program-client.h - cassandra: Treat CASS_ERROR_SERVER_UNAVAILABLE as "write success is - uncertain" +2018-01-23 21:14:18 +0100 Stephan Bosch (b6f7d7833) - Looks like the write could still have actually gone through. + lib-program-client: Add comments to program_input/program_output functions. -M src/lib-sql/driver-cassandra.c -2017-03-16 01:22:09 +0200 Timo Sirainen (45598d313) +M src/lib-program-client/program-client.c - lib-oauth2: Don't free oauth2_request too early. +2018-01-22 23:43:18 +0100 Stephan Bosch (fcc204af5) - Move the freeing explicitly to only after calling the callback. The previous - method of freeing it on when http_request was destroyed could have happened - too early when oauth2_parse_json() called i_stream_unref(), which released - the last reference to the http_request. + lib-program-client: Flush/finish the output stream after + o_stream_send_istream(). -M src/lib-oauth2/oauth2-introspect.c -M src/lib-oauth2/oauth2-refresh.c -M src/lib-oauth2/oauth2-token-validate.c + There may still be data in the output stream buffer. Failing to flush this + leads to truncated output. For the output towards the program + o_stream_finish() is used, since there may be an ostream_dot in between (or + something else for future features). -2017-03-16 01:12:57 +0200 Timo Sirainen (466217193) +M src/lib-program-client/program-client.c - lib-oauth2: Fix memory leak if HTTP URL parsing fails. +2018-01-24 01:09:16 +0100 Stephan Bosch (dd1570448) - Also delay calling the callback. The callers don't necessarily expect an - immediate callback (auth/db-oauth2.c doesn't). + lib-program-client: remote: Don't change exit_code in + program_client_remote_disconnect() when program_input is already NULL. -M src/lib-oauth2/oauth2-introspect.c -M src/lib-oauth2/oauth2-private.h -M src/lib-oauth2/oauth2-refresh.c -M src/lib-oauth2/oauth2-token-validate.c -M src/lib-oauth2/oauth2.c + When the program_input is NULL, the stream is finished, meaning that the + exit_code is set based on the return code. There can be a program_input for + remote streams, even when the program produces no output. -2017-03-16 00:54:44 +0200 Timo Sirainen (f72a75a57) +M src/lib-program-client/program-client-remote.c - auth: oauth2 - cleanup db_oauth2_lookup_callback_t +2018-01-23 21:38:27 +0100 Stephan Bosch (c37e0424b) - db parameter isn't needed, because request->db already contains it. Also - moved request parameter to be the first. + lib-program-client: Simplify cleanup of dot input stream in + program_client_program_input(). -M src/auth/db-oauth2.c -M src/auth/db-oauth2.h -M src/auth/passdb-oauth2.c -2017-03-16 00:51:15 +0200 Timo Sirainen (2eea5e3f5) +M src/lib-program-client/program-client.c - auth: oauth2 - make it easier to see where db_oauth2_callback() is called +2018-01-23 21:24:35 +0100 Stephan Bosch (2c572e480) - Doesn't fix anything, but places the db_oauth2_callback() calls into the end - of _continue() calls so it's clearer that they're always being called - exactly once. + lib-program-client: Restructure reading input from program to simplify + handling of dot input stream. -M src/auth/db-oauth2.c -2017-03-16 01:35:38 +0200 Timo Sirainen (92709fcc5) +M src/lib-program-client/program-client.c - auth: oauth2 - Clarify token validation success/valid error handling +2018-01-22 23:25:34 +0100 Stephan Bosch (2bfc6ba71) - result->error is NULL only if result->success && !result->valid. Also - !result->success is the more important error handling case. Write out these - cases explicitly so it's easier to understand. + lib-program-client: Use reliable means of checking for input stream EOF. -M src/auth/db-oauth2.c -2017-03-16 00:42:28 +0200 Timo Sirainen (91ae7a2a4) +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c - auth: oauth2 - remove db_oauth2_request.failed +2018-01-24 21:48:07 +0100 Stephan Bosch (4dc9b016b) - It is an unnecessary duplication of passdb_result. + lib-program-client: Remove check for -2 returned from i_stream_read_more(). -M src/auth/db-oauth2.c -M src/auth/db-oauth2.h -M src/auth/passdb-oauth2.c + The stream must have space for at least 1 byte. -2017-03-16 00:38:39 +0200 Timo Sirainen (0aa06a246) +M src/lib-program-client/program-client.c - auth: oauth2 - remove db_oauth2_request.result +2018-01-23 22:16:26 +0100 Stephan Bosch (505bb8dd3) - It's not a persistent state. When it's set, the callback needs to be called. - This way it's more difficult to forget to set it. + lib-program-client: Remove useless stream eof check. -M src/auth/db-oauth2.c -M src/auth/db-oauth2.h -M src/auth/passdb-oauth2.c + It also looks to be problematic. -2017-03-16 00:33:24 +0200 Timo Sirainen (693b6f93d) +M src/lib-program-client/program-client.c - auth: oauth2 - Template expand failure should be an internal error +2018-01-04 12:44:16 -0500 Josef 'Jeff' Sipek (23a46b915) - Not the default "password mismatch". Also changed the API to be closer to - the other nearby functions. + imap: support for FETCH SNIPPET -M src/auth/db-oauth2.c -2017-03-16 00:32:01 +0200 Timo Sirainen (3f1dde2d6) +M configure.ac +M src/imap/imap-fetch-body.c +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h - auth: oauth2 - make db_oauth2_template_export() static +2018-01-22 13:33:29 +0200 Timo Sirainen (bc78d9e57) - It's not used outside db-oauth2.c + imapc: Fix deleting mailbox -M src/auth/db-oauth2.c -M src/auth/db-oauth2.h + Broken by f8f30bd27e41e1041a8de0b97f35d7d75e0a412e -2017-03-16 00:25:19 +0200 Timo Sirainen (98fce3900) +M src/lib-storage/index/imapc/imapc-sync.c - auth: oauth2 - introspection lookup error should be internal failure +2018-01-26 10:55:54 +0200 Aki Tuomi (6910b6969) - Not the default, which is "password mismatch". + lib-auth: Remove request after abort -M src/auth/db-oauth2.c + Otherwise the request will still stay in hash table and get dereferenced + when all requests are aborted causing an attempt to access free'd memory. -2017-03-16 00:15:10 +0200 Timo Sirainen (e2065b361) + Found by Apollon Oikonomopoulos - auth: oauth2 - Make sure db_oauth2_request.req is set to NULL when it gets - freed. + Broken in 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 - Doesn't fix anything, but makes it clearer that req->req must not be aborted - anymore after this stage, because it gets freed anyway. +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-server-connection.c +M src/lib-auth/auth-server-connection.h -M src/auth/db-oauth2.c +2017-12-18 16:50:51 +0200 Timo Sirainen (77fe38480) -2017-03-16 00:13:08 +0200 Timo Sirainen (68df507e4) + lib-auth: Fix memory leak in auth_client_request_abort() - auth: oauth2 - Fix aborting auth requests on deinit. + This caused memory leaks when authentication was aborted. For example with + IMAP: - The auth_request needs to be finished by calling the callback. + a AUTHENTICATE PLAIN + * -M src/auth/db-oauth2.c + Broken by 9137c55411aa39d41c1e705ddc34d5bd26c65021 -2017-03-06 14:59:46 +0200 Aki Tuomi (21d083ffb) +M src/lib-auth/auth-client-request.c - auth: Do not double-expand key in passdb dict when authenticating +2018-01-24 18:01:48 +0200 Timo Sirainen (87dc9b69f) - Broken by 79042f8c + lib-index: Write forced cache decision changes immediately to cache file -M src/auth/db-dict.c + When mail_always/never_cache_fields doesn't match the current caching + decisions in the cache file, write the updated decisions to the file. -2017-03-09 11:32:21 -0500 Timo Sirainen (319959b04) +M src/lib-index/mail-cache-fields.c - *-login: Remove unused client.proxy_state +2018-01-24 18:01:23 +0200 Timo Sirainen (d5a4d84db) + lib-index: Code cleanup for reading caching decisions -M src/login-common/client-common-auth.c -M src/login-common/client-common.h + No functional changes. -2017-03-09 10:48:33 -0500 Timo Sirainen (c386ebe04) +M src/lib-index/mail-cache-fields.c - pop3-login: Remove usage of client.common.proxy_state +2018-01-24 17:58:57 +0200 Timo Sirainen (865a7496b) + lib-index: Finish fixing removal of forced cache decisions from existing + cache files -M src/pop3-login/client.h -M src/pop3-login/pop3-proxy.c + 6ef2504d020461b0f480766c41596595a4300023 didn't fix it for already known + fields. -2017-03-09 10:46:36 -0500 Timo Sirainen (7a690778e) +M src/lib-index/mail-cache-fields.c - pop3-login: Log proxy state as human-readable string. +2018-01-23 00:04:28 +0200 Timo Sirainen (1e06000a1) + lib-index: Fix removal of forced cache decisions from existing cache files -M src/pop3-login/client.c -M src/pop3-login/client.h -M src/pop3-login/pop3-proxy.c -M src/pop3-login/pop3-proxy.h + The forced-flags are written to the cache file when the file is created. + They were also read back, and the force-flag was preserved even when the + configuration was removed. -2017-03-09 10:41:52 -0500 Timo Sirainen (e7d9dd003) +M src/lib-index/mail-cache-fields.c - imap-login: Log proxy state as human-readable string. +2018-01-22 17:38:32 +0200 Timo Sirainen (faf444016) - Separate sent/received state and log them as strings. + lib-index: Fix adding forced cache decisions to existing cache files -M src/imap-login/imap-login-client.c -M src/imap-login/imap-login-client.h -M src/imap-login/imap-proxy.c -M src/imap-login/imap-proxy.h + If a field already existed in the cache file, the cache decision from the + file was always used. This caused force-decisions to be ignored. -2017-03-09 10:31:39 -0500 Timo Sirainen (043aa6532) +M src/lib-index/mail-cache-fields.c - *-login: Add client.proxy_get_state() for providing human-readable proxy - state +2018-01-08 15:08:10 +0200 Aki Tuomi (7b5357ea1) - If not implemented, it defaults to the old method of returning proxy_state - number. + auth: passdb-cache - Verify credentials with worker when enabled -M src/imap-urlauth/imap-urlauth-login.c -M src/login-common/client-common-auth.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/login-common/login-proxy.c -M src/pop3-login/client.c -2017-03-07 14:36:45 -0500 Timo Sirainen (be66ad91e) +M src/auth/auth-request.c +M src/auth/auth-settings.c +M src/auth/auth-settings.h +M src/auth/passdb-cache.c - pop3: Set process title before syncing mailbox. +2018-01-08 15:00:17 +0200 Aki Tuomi (6dddb5759) - The syncing could be taking a long time, so it's useful to have the username - in the process title during that. + auth: Expose auth_request_verify_plain_callback_finish -M src/pop3/pop3-client.c -2017-03-08 10:07:37 -0500 Timo Sirainen (7d4b3c6ac) +M src/auth/auth-request.c +M src/auth/auth-request.h - imap: If unhibernation fails due to a mailbox error, log the mailbox name. +2018-01-08 15:09:28 +0200 Aki Tuomi (c6efaa471) + auth-worker: Support PASSW request -M src/imap/imap-state.c + This will attempt to verify given credentials. -2017-03-08 09:28:14 -0500 Timo Sirainen (1a7641cce) +M src/auth/auth-worker-client.c - imap: When disconnecting due to FETCH failure, include "FETCH" in the log - message. +2018-01-08 14:52:10 +0200 Aki Tuomi (ff17366f9) + auth-worker: Add auth_worker_auth_request_new -M src/imap/cmd-fetch.c + Replaces worker_auth_request_new, moves in check for username and service. + Simplifies code. -2017-03-07 18:10:57 +0200 Aki Tuomi (7979af45b) +M src/auth/auth-worker-client.c +M src/auth/auth-worker-client.h - lib-sasl: Fix xoauth2 data format +2018-01-02 12:33:50 +0200 Aki Tuomi (f6ff6151e) - Authentication data was missing user= + auth: passdb-blocking - Expose passdb_blocking_auth_worker_reply_parse -M src/lib-sasl/mech-oauthbearer.c + Enables sharing code with passdb cache -2017-03-07 10:09:20 +0200 Aki Tuomi (c9e9cfac8) +M src/auth/passdb-blocking.c +M src/auth/passdb-blocking.h - db-oauth2: Make sure request is removed only once +2018-01-16 18:17:00 +0200 Timo Sirainen (1272b52e1) - Callback might be called twice. + imapc: Fix imap_features=no-msn-updates to not fail on SELECT -M src/auth/db-oauth2.c + The initial EXISTS reply shouldn't be ignored, only the following ones. -2017-03-07 10:08:08 +0200 Aki Tuomi (1ad320986) +M src/lib-storage/index/imapc/imapc-mailbox.c - lib-oauth2: Use http client destroy callback +2017-12-25 11:10:19 +0200 Timo Sirainen (19dd64eb2) - Avoids freeing memory early. + imapc: Add imapc_features=no-msn-updates - Fixes signal 11 crash in auth + This is a stricter version of fetch-msn-workarounds. The MSNs aren't trusted + at all. This means any new untagged EXISTS and EXPUNGE replies are ignored, + as well as untagged FETCH replies that don't include UID. + + A potential downside with this feature is that UID FETCH/STORE commands sent + to expunged messages will likely fail without the IMAP client being notified + of the EXPUNGEs. New mails are also not noticed, so this should be used only + when it's known that the clients don't keep the connection open for long. -M src/lib-oauth2/oauth2-introspect.c -M src/lib-oauth2/oauth2-refresh.c -M src/lib-oauth2/oauth2-token-validate.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h -2017-03-06 13:16:12 +0200 Aki Tuomi (3f97702b1) +2017-12-25 16:11:26 +0200 Timo Sirainen (9c7ec3fa6) - auth: Apply skips to first passdb + imapc: Fix sending initial FETCH after reconnection SELECTs mailbox - This is required to apply filters to first passdb, so that mechanism filters - can be applied. + Move sending the FETCH when the SELECT returns tagged OK reply instead of + delaying it until mailbox is next synced. Most importantly this allows + sending the FETCH before any retried commands that are also sent after + SELECT receives tagged reply. -M src/auth/auth-request.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c +M src/lib-storage/index/imapc/imapc-sync.h -2017-03-03 08:31:50 +0200 Aki Tuomi (665a2083e) +2017-12-25 22:48:00 +0200 Timo Sirainen (b5265b4a3) - lib-oauth2: Add missing content-type header + imapc: gmail-migration: Fetch X-GM-MSGID for new mails as well + I'm not sure why it was originally restricted only for the initial FETCH. + Fetching GUIDs for new mails can be just as useful. -M src/lib-oauth2/oauth2-introspect.c +M src/lib-storage/index/imapc/imapc-mailbox.c -2016-10-20 12:08:09 +0300 Timo Sirainen (0217804ec) +2017-12-25 20:21:40 +0200 Timo Sirainen (ddd79dd91) - lib: Added i_strchr_to_next() + imapc: Move imapc_mailbox_fetch_state*() to imapc-mailbox.c + Mainly to make the next commit smaller. -M src/lib/strfuncs.h +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c -2017-03-01 12:29:17 +0200 Martti Rannanjärvi (081097d89) +2017-12-25 19:19:09 +0200 Timo Sirainen (f3ccac7b4) - fts: Don't add NULL content disposition or type to HTTP header + imapc: Handle untagged UIDVALIDITY immediately + This is part of the changes to fix mailbox resyncing after reconnect. -M src/plugins/fts/fts-parser-tika.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-sync.c -2017-02-27 20:40:43 +0200 Aki Tuomi (de93e9557) +2017-12-25 19:34:31 +0200 Timo Sirainen (33b25be1b) - doveadm: Add missing newline to proxy kick output + imapc: If mailbox select fails, rollback any changes done to it + Required by the following changes that start adding changes immediately + after SELECT. If the initial syncing doesn't finish successfully, these + changes need to be reverted. -M src/doveadm/doveadm-proxy.c +M src/lib-storage/index/imapc/imapc-mailbox.c -2017-02-27 20:38:43 +0200 Aki Tuomi (67c6ef148) +2017-12-25 19:33:33 +0200 Timo Sirainen (ce651ecc1) - doveadm: Ensure -- is added to command line before positional arguments for - non-mails commands as well + imapc: Keep "selected" state TRUE only while mailbox is successfully + SELECTed - Was forgotten from 967efe37d1f10a28c0a086cc5919d4ce8917bed8 -M src/doveadm/doveadm-cmd.c +M src/lib-storage/index/imapc/imapc-storage.c -2017-02-27 19:12:32 +0200 Aki Tuomi (d466d48bd) +2018-01-17 15:05:38 +0200 Timo Sirainen (88e551a4b) - doveadm: Ensure -- is added to command line before positional arguments + imapc: Fix leaking mail_index_view on delayed expunge handling - This prevents parser from choking on dash. + Fixes: Panic: Leaked view for index (in-memory index): Opened in + imapc-mailbox.c:47 -M src/doveadm/doveadm-mail.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-sync.c -2017-02-27 19:04:55 +0200 Aki Tuomi (fcbeb4fc5) +2018-01-17 15:03:06 +0200 Timo Sirainen (41093d6fd) - doveadm: Fix allow-empty-mailbox-name handling + lib-imap-client: Avoid "Unknown tag" errors for aborted commands - It was supposed to be handled for metadata commands only. + If mailbox is closed before all command replies were received, the commands + were aborted but they'll still receive the replies from server. Remember the + aborted commands' tag numbers so they can be ignored. - Broken in 26c41874cf6019c3e39f0ed630b2a07a92b2635f +M src/lib-imap-client/imapc-connection.c -M src/doveadm/doveadm-mail-mailbox-metadata.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h +2018-01-17 15:02:09 +0200 Timo Sirainen (f98b9b4cd) -2017-02-27 14:21:48 +0200 Timo Sirainen (649b00f4a) + lib-imap-client: Fix reason text when unselecting mailbox aborts commands - doveadm move: Use mailbox_move() instead of copy+expunge - This allows for some optimizations to be done. +M src/lib-imap-client/imapc-connection.c -M src/doveadm/doveadm-mail-copymove.c +2017-12-25 21:31:05 +0200 Timo Sirainen (1421648d2) -2017-02-27 09:39:06 +0200 Martti Rannanjärvi (5cd4c53ef) + lib-imap-client: Add asserts for reconnect_command_count - master: add cassandra to printed build options +M src/lib-imap-client/imapc-connection.c -M src/master/main.c +2017-12-25 21:29:06 +0200 Timo Sirainen (5044de006) -2017-02-25 21:47:01 +0200 Timo Sirainen (8825f7a88) + lib-imap-client: Delay sending more commands while SELECT is running - lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks +M src/lib-imap-client/imapc-connection.c -M configure.ac -M src/lib-dcrypt/dcrypt-openssl.c +2017-12-25 18:49:15 +0200 Timo Sirainen (d405b0214) -2017-02-25 21:41:03 +0200 Timo Sirainen (9a1695882) + lib-imap-client: After reconnection send retried commands last - lib-dcrypt: Move most of the OpenSSL #if handling to macros + Previously only SELECT was sent before others. This allows sending more + commands on reconnection before the retried commands. - This avoids #if calls being littered all over the file. +M src/lib-imap-client/imapc-connection.c - This change can cause HMAC_CTX_free(NULL) to be called, but that seems to - work fine without crashing. +2018-01-03 19:46:58 +0100 Stephan Bosch (bdfa22623) -M src/lib-dcrypt/dcrypt-openssl.c + auth: client protocol: Recognize empty initial response field as an absent + initial response for older clients. -2017-02-26 15:37:36 +0200 Timo Sirainen (316fb8bb4) + Particularly, Exim sends an empty initial response field in the AUTH request + for an authentication command that has no initial response. Originally, + Dovecot allowed this, but this was recently changed so that the EXTERNAL + SASL mechanism works properly from ManageSieve. This commit makes it allowed + again for older authentication clients to send an empty initial response + field for an authentication command that has no initial response part. + Sending '=' for an empty initial response is still allowed in general. - lib: Fix t_strf*time() unit tests +M src/auth/auth-request-handler.c - Timezone isn't part of the standard struct tm, so %z doesn't necessarily - expand as expected outside Linux. +2018-01-03 19:26:33 +0100 Stephan Bosch (1bc0a2012) -M src/lib/test-time-util.c + auth: client protocol: Record minor version for authentication client + connection. -2017-02-26 15:21:13 +0200 Timo Sirainen (4d884cb9a) - dsync: Fix syncing attributes with large values. +M src/auth/auth-client-connection.c +M src/auth/auth-client-connection.h - This mainly meant that large Sieve scripts weren't synced properly, because - their last_change field was never deserialized, so it was set to 0. +2017-12-18 15:21:44 +0200 Timo Sirainen (e42d46d3a) -M src/doveadm/dsync/dsync-ibc-stream.c + global: Rename timing API to stats-dist API -2017-02-26 14:32:44 +0200 Timo Sirainen (39f751de9) + The API wasn't really about timings specifically, but about statistics in + general. The new stats service was already using it for tracking statistics + for non-timing related numbers. - lazy-expunge: Use mailbox_move() instead of mailbox_copy() +M src/dict/dict-commands.c +M src/dict/dict-commands.h +M src/dict/main.c +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib/Makefile.am +A src/lib/stats-dist.c +A src/lib/stats-dist.h +M src/lib/test-lib.inc +A src/lib/test-stats-dist.c +D src/lib/test-timing.c +D src/lib/timing.c +D src/lib/timing.h +M src/stats/client-reader.c +M src/stats/stats-metrics.c +M src/stats/stats-metrics.h - This allows some optimizations to be performed that are only possible when - moving messages. +2017-12-12 15:21:17 +0200 Phil Carmody (ccd2f7b04) - It's slightly strange now that mail_expunge() is triggered twice for the - same source mail, but lazy_expunge plugin is called very early so most - plugins won't see it called twice. Currently only acl plugin sees it, and it - doesn't care. + lib/timing - helper for arbitrary percentiles -M src/plugins/lazy-expunge/lazy-expunge-plugin.c + Replace fixed 95th %-ile helper with request for arbitrary percentiles, or + even arbitrary fractions of the range. -2017-02-24 12:27:02 +0200 Timo Sirainen (972576585) + Signed-off-by: Phil Carmody - mail-filter: Add missing error handling in ostream-ext-filter +M src/lib/timing.c +M src/lib/timing.h +2017-12-28 13:53:14 +0200 Jarkko Mourujärvi (9e61bf469) -M src/plugins/mail-filter/ostream-ext-filter.c + doveconf: add hostname to output -2017-02-24 12:17:21 +0200 Timo Sirainen (996155202) - auth: Removed dead code from oauth2 mechanism +M src/config/doveconf.c +2017-12-28 10:47:28 +0200 Aki Tuomi (fce72ce5a) -M src/auth/mech-oauth2.c + lib-http: Only depend on iostream openssl lib if building with openssl -2017-02-24 12:13:36 +0200 Timo Sirainen (e7b2e5936) + Fixes build without openssl - acl plugin: Fix Coverity warning +M src/lib-http/Makefile.am - Just switch the MALLOC_ADD() parameters, so that arithmetic doesn't get - inside a sizeof(). - -M src/plugins/acl/acl-cache.h - -2017-02-23 19:38:31 +0100 Stephan Bosch (8c173f2c5) - - lib-http: client: Fixed i_unreached() failure occurring when a host's list - of IPs changes while a connection is still pending. - - In that case, the IP of the pending connection may no longer be associated - with that host. If the IP was not found anymore, the i_unreached() error - occurred. - -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c - -2017-02-23 11:29:17 +0200 Aki Tuomi (770b0c36b) - - auth: Export oauth2 pass_attrs to passdb reply +2017-12-25 18:24:35 +0200 Timo Sirainen (5a69ecf5a) + lib-storage: mail_storage_set_index_error() - handle NULL index error -M src/auth/db-oauth2.c - -2017-02-23 01:24:43 +0200 Timo Sirainen (7e525eb50) - - virtual: Include virtual mailbox name in "Mailbox ID unexpectedly lost" - error - - -M src/plugins/virtual/virtual-sync.c + This avoids assert-crashing later on in mail*_get_last_internal_error(). -2017-02-22 15:29:34 +0200 Timo Sirainen (d02348d82) - - lib-storage: Allow mail_storage_set_error() to use existing error_string - - Fixes some code that may be attempting to copy an error from one storage to - another, but actually ends up trying to copy within the same storage. + This could potentially be an assert instead of setting it as "BUG", but it + looks like there are various code paths in lib-index that return -1 without + setting an error. (That's to avoid duplicate error logging, although it + could now be fixed with mail_index_set_error_nolog().) M src/lib-storage/mail-storage.c -2016-11-01 18:43:57 +0200 Timo Sirainen (9a19e1594) - - lib-mail: istream-attachment-connector now allows msg_size=-1 for "unknown". - - -M src/lib-mail/istream-attachment-connector.c -M src/lib-mail/istream-attachment-connector.h -M src/lib-mail/test-istream-attachment.c - -2016-11-01 18:42:31 +0200 Timo Sirainen (83ba28bcd) - - lib-mail: Make sure istream-attachment-connector detects wrong mail size. - - -M src/lib-mail/istream-attachment-connector.c -M src/lib-mail/test-istream-attachment.c - -2016-12-23 14:15:49 -0500 Timo Sirainen (a427bf499) - - lib-mail: Fix memory leak in test-istream-attachment - - -M src/lib-mail/test-istream-attachment.c - -2016-12-23 13:08:59 -0500 Timo Sirainen (a540d9ca5) - - lib-mail: Improve istream-attachment-extractor unit test for EIO errors - - -M src/lib-mail/test-istream-attachment.c - -2016-12-23 12:59:13 -0500 Timo Sirainen (e5e1659ec) - - lib-mail: istream-attachment-extractor - use EIO for internal errors - - These happen only if the attachment writing failed for some reason. The - input stream itself can't have any errors, so EINVAL isn't proper. - -M src/lib-mail/istream-attachment-extractor.c - -2016-12-23 12:56:24 -0500 Timo Sirainen (7e6a434ec) - - lib-mail: istream-attachment-extractor - remove unnecessary code - - It's enough to set the stream_errno. - -M src/lib-mail/istream-attachment-extractor.c - -2016-11-01 18:35:48 +0200 Timo Sirainen (f981b7177) - - lib: Added i_stream_create_min_sized*() - - -M src/lib/istream-sized.c -M src/lib/istream-sized.h -M src/lib/test-istream-sized.c - -2016-12-23 12:52:45 -0500 Timo Sirainen (a7ce88361) - - lib: istream-sized - consistently set stream_errno=EINVAL if stream is too - large - - Earlier it was sometimes done and sometimes not, depending on whether the - parent istream happened to stop at the expected boundary. - -M src/lib/istream-sized.c - -2016-12-23 12:51:41 -0500 Timo Sirainen (19d66fec1) - - lib: istream-sized - set stream_errno=EPIPE if stream is too small - - -M src/lib/istream-sized.c -M src/lib/istream-sized.h -A src/lib/test-istream-sized.c - -2016-12-23 12:26:17 -0500 Timo Sirainen (6f287dc05) - - lib: istream-sized - remove explicit i_error() logging - - The stream_errno is set, so it's the caller's responsibility to log the - error. There's no need to log it twice. - -M src/lib/istream-sized.c - -2016-05-16 20:17:41 +0300 Timo Sirainen (f43f9f5b0) - - lib: istream-sized should log errors with its own name, not parent's name - - -M src/lib/istream-sized.c - -2016-05-09 11:08:33 +0300 Martti Rannanjärvi (3d304f67d) - - lib: remove failed bool from sized_istream struct - - This is no longer needed as we are now checking for stream_errno also in - istream.c - -M src/lib/istream-sized.c - -2016-11-01 14:47:05 +0200 Timo Sirainen (043ee6769) - - lib: Added i_stream_create_sized_range() - - This is just a small wrapper to i_stream_create_sized() to specify stream's - start offset. - -M src/lib/istream-sized.c -M src/lib/istream-sized.h - -2017-02-22 20:05:16 +0200 Timo Sirainen (b0cd8e156) - - maildir: Fix checking vsize caching decision in "is this pop3 user?" - - If vsize extension is used, it's practically the same as if vsize's caching - decision was YES. - -M src/lib-storage/index/maildir/maildir-mail.c - -2017-02-22 20:04:28 +0200 Timo Sirainen (45cf4aca2) - - pop3c: Remove unnecessarily duplicated code setting vsize to cache - - This is important now that the vsize can be added also to index's vsize - extension. - -M src/lib-storage/index/pop3c/pop3c-mail.c - -2017-02-22 20:03:43 +0200 Timo Sirainen (6d520eebd) - - pop3c: Prefetched streams didn't call istream_opened() or set virtual_size - - -M src/lib-storage/index/pop3c/pop3c-mail.c - -2017-02-22 17:45:34 +0200 Timo Sirainen (27b2e8b87) - - trash plugin: Use correct hook for overriding mail_user vfuncs - - This was always wrong to do, and it crashes after - f32382d2da479a4371e08c443679528db37ea988 - -M src/plugins/trash/trash-plugin.c - -2017-02-22 17:21:56 +0200 Timo Sirainen (570fb4d05) - - expire plugin: Use correct hook for overriding mail_user vfuncs - - This was always wrong to do, and it crashes after - f32382d2da479a4371e08c443679528db37ea988 - -M src/plugins/expire/expire-plugin.c - -2017-02-22 15:32:19 +0200 Timo Sirainen (5a6d3f5ea) - - lazy-expunge: Fix error handling for GUID lookups - - If the mail is already expunged, the error should be ignored. In other - situations the original error string should be preserved as part of the - logged error message. - -M src/plugins/lazy-expunge/lazy-expunge-plugin.c - -2017-02-22 16:09:07 +0200 Timo Sirainen (a44239904) - - lib-storage: Add missing service_user ref when creating shared mailbox's - user. - - Was forgotten from d1bf4ae66b8bf3b9e28df1823d6d4adda2b923b6 - - Fixes: Panic: file mail-storage-service.c: line 1513 - (mail_storage_service_user_unref): assertion failed: (user->refcount > 0) - -M src/lib-storage/index/shared/shared-storage.c - -2017-01-30 21:53:01 +0200 Timo Sirainen (e591a396f) - - lib-mail: Fix message_part_data_is_plain_7bit() - - Content-Type parameters weren't handled exactly right. Broken by recent - changes. - -M src/lib-mail/message-part-data.c +2017-12-25 18:18:14 +0200 Timo Sirainen (8e4c41cde) -2017-02-22 13:02:27 +0200 Timo Sirainen (b61798c07) + lib-storage: Set index error on transaction commit() callback - quota: Don't log "Internal quota calculation error" - - It's not very informative and we can't give a better error message without - changing the APIs. The real error should have been logged already anyway, so - this is just duplication of an error. I think originally this was added - because some backend forgot to log an error. + The commit callback is setting errors to storage. However, it's being called + from mail_index_transaction_commit() whose callers are expecting the error + to be in index. If that index error was attempted to be used, it could have + been wrong or NULL. Fix this by setting the same storage error also to the + index. -M src/plugins/quota/quota-storage.c +M src/lib-storage/index/index-transaction.c -2017-02-22 13:30:00 +0200 Timo Sirainen (533b30023) +2017-12-25 18:17:57 +0200 Timo Sirainen (46105d626) - global: Replace mail_storage_service_user_free() with _unref() + lib-index: Add mail_index_set_error_nolog() -M src/doveadm/doveadm-auth-server.c -M src/doveadm/doveadm-auth.c -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail.c -M src/imap-urlauth/imap-urlauth-worker.c -M src/imap/imap-client.c -M src/imap/main.c -M src/indexer/master-connection.c -M src/lda/main.c -M src/lmtp/client.c -M src/lmtp/commands.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c -M src/plugins/mail-crypt/test-mail-key.c -M src/plugins/quota/quota-status.c -M src/pop3/pop3-client.c +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index.c -2017-02-22 13:28:43 +0200 Timo Sirainen (dc59f8c55) +2017-12-28 14:10:23 +0200 Timo Sirainen (8fe22c910) - lib-storage: Use refcounting for mail_storage_service_user + dsync: Add per-mailbox sync lock that is always used. - doveadm import was freeing the user too early, which resulted - mail_user._service_user pointing to freed memory. More importantly, after - 34512eaad8b1b2f929e6d6e3a2f7252c29fba97b user->set was pointing to already - freed memory. + Both importing and exporting gets the lock before they even sync the + mailbox. The lock is kept until the import/export finishes. This guarantees + that no matter how dsync is run, two dsyncs can't be working on the same + mailbox at the same time. -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h -M src/lib-storage/mail-user.c + This lock is in addition to the optional per-user lock enabled by the -l + parameter. If the -l parameter is used, the same lock timeout is used for + the per-mailbox lock. Otherwise 30s timeout is used. -2017-02-22 10:44:00 +0200 Timo Sirainen (544a3921f) + This should help to avoid email duplication when replication is enabled for + public namespaces, and maybe in some other rare situations as well. - lib-lda: Fix pigeonhole testsuite to not crash +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-mailbox.c +M src/doveadm/dsync/dsync-mailbox.h +2017-12-28 19:40:29 +0200 Timo Sirainen (e35a625b4) -M src/lib-lda/mail-deliver.c + lib: Make file_lock_free(NULL) no-op -2017-02-21 22:34:14 +0200 Timo Sirainen (d89a40c34) - lib: Fix again test-utc-mktime with 32bit time_t +M src/lib/file-lock.c +2017-12-28 10:27:27 +0200 Timo Sirainen (478f25379) -M src/lib/test-utc-mktime.c + dsync: Add debug logging for .dovecot-sync.lock locking/unlocking -2017-02-21 12:38:10 +0200 Timo Sirainen (87e4dd14a) - lib-lda: Fix delivery logging when Sieve performs multiple actions +M src/doveadm/dsync/dsync-brain.c - Previous code assumed that it would work like: - - save/copy - - transaction commit - - mail_deliver_ctx_get_log_var_expand_table() - - repeat for transaction 2 +2018-01-01 20:57:51 +0100 Stephan Bosch (393bfbea8) - While it really works: - - transaction 1: save/copy - - transaction 2: save/copy - - transaction 1: commit - - mail_deliver_ctx_get_log_var_expand_table() - - transaction 2: commit - - mail_deliver_ctx_get_log_var_expand_table() + Updated copyright notices to include the year 2018. - So the cache needs to be stored per transaction. This code still wouldn't - work correctly if Sieve saved mails multiple times within the same - transaction, but that doesn't happen (at least currently). - -M src/lib-lda/mail-deliver.c - -2017-02-21 12:36:52 +0200 Timo Sirainen (7c6a1def5) - - lib-lda: Refactor - mail_deliver_log_update_cache() doesn't need entire - deliver_ctx - - -M src/lib-lda/mail-deliver.c - -2017-02-21 12:34:59 +0200 Timo Sirainen (2d42ba728) - - lib-lda: Refactor - Add struct mail_deliver_mailbox - - -M src/lib-lda/mail-deliver.c - -2017-02-21 19:55:48 +0200 Timo Sirainen (1b41f473c) - - lib: Fix test-utc-mktime with 32bit time_t - - -M src/lib/test-utc-mktime.c - -2017-02-21 16:25:48 +0200 Martti Rannanjärvi (8aa80a36a) - - lib-mail: Place input/output of message-date tests in one struct - - Define both input and output of a message date test case in a single struct - so it is easier to follow and less error prone. Also add some leap second - tests. - -M src/lib-mail/test-message-date.c - -2017-02-21 17:00:14 +0200 Martti Rannanjärvi (bebf61818) - - lib: Place input/output of utc_mktime tests in one struct - - Define both input and output of a utc_mktime test case in a single struct so - it is easier to follow and less error prone. - -M src/lib/test-utc-mktime.c - -2017-02-21 16:25:25 +0200 Martti Rannanjärvi (fe7e8f486) - - lib: Accept leap second in utc_mktime - - Accept leap second at any time in utc_mktime since utc_mktime is being used - before applying the timezone offset everywhere. - -M src/lib/test-utc-mktime.c -M src/lib/utc-mktime.c -M src/lib/utc-mktime.h - -2017-02-21 14:42:01 +0200 Timo Sirainen (e69444414) - - imap: Fix error message in failed FETCH's NO reply. - - This was broken only with the new imap_fetch_failure = no-after setting. - -M src/imap/cmd-fetch.c -M src/imap/imap-fetch.c -M src/imap/imap-fetch.h - -2017-02-21 15:44:09 +0200 Timo Sirainen (95e2c9f27) - - imapc: Error handling wasn't setting storage error everywhere. - - This would have used the previous error, which might not have been correct. - -M src/lib-storage/index/imapc/imapc-mail-fetch.c - -2017-02-20 15:47:33 +0200 Aki Tuomi (86f26deab) - - lib-index: Unconstifty pointer array - - clang complained about the extra const. - -M src/lib-index/mail-index-transaction-private.h -M src/lib-index/mail-index-transaction.c - -2017-02-20 15:35:02 +0200 Aki Tuomi (d7904f9a5) - - lib-index: Add missing initialization for chained hooks - - -M src/lib-index/mail-index-transaction-private.h -M src/lib-index/mail-index-transaction.c - -2017-02-20 15:28:36 +0200 Aki Tuomi (58e93ef50) - - lib,lib-storage: Move hook building code to lib - - This allows it to be reused elsewhere - -M src/lib-storage/mail-storage-hooks.c -M src/lib/Makefile.am -A src/lib/hook-build.c -A src/lib/hook-build.h - -2017-02-20 14:34:25 +0200 Aki Tuomi (0510f81ff) - - lib-index: Allow multiple hooks for transaction creation - - -M src/lib-index/mail-index-transaction-private.h -M src/lib-index/mail-index-transaction.c - -2017-02-21 14:20:22 +0200 Timo Sirainen (b3443fcac) - - lib-storage: Fix mail.access_type for search prefetches - - -M src/lib-storage/index/index-search.c - -2017-02-21 13:48:36 +0200 Timo Sirainen (3d0de6167) - - lmtp: Fix lmtp_user_concurrency_limit when userdb changes the username - - Anvil LOOKUP was done with the original username, while CONNECT/DISCONNECT - was done with the changed username. So LOOKUP always thought that there were - zero concurrent sessions for the user. - -M src/lmtp/commands.c - -2017-02-21 11:55:55 +0200 Timo Sirainen (9be49acfa) - - cassandra: Don't use i_error() from non-main thread - - It will only cause crashes. This was done only if the internal communication - pipe couldn't be written to, which was pretty unlikely to happen. - -M src/lib-sql/driver-cassandra.c - -2017-02-21 13:08:59 +0200 Timo Sirainen (08e944594) - - lib-storage: Fix assert-crash on corrupted dovecot.list.index with - name_id==0 - - Fixes: Panic: file hash.c: line 213 (hash_table_insert_node): assertion - failed: (key != NULL) - -M src/lib-storage/list/mailbox-list-index.c - -2017-02-20 19:35:45 +0200 Timo Sirainen (a79136b95) - - lib-storage: Add asserts to make sure lookup_abort is being used correctly. - - -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-sort.c - -2017-02-20 19:34:25 +0200 Timo Sirainen (228a8ba8a) - - lib-storage, pop3-migration: Reset lookup_abort before continuing to search - - This doesn't really fix anything right now, but it'll allow adding the - asserts in the following commit. - -M src/lib-storage/index/index-mailbox-size.c -M src/plugins/pop3-migration/pop3-migration-plugin.c - -2017-02-21 11:52:59 +0200 Aki Tuomi (7a765d42a) - - auth: Make sure tokeninfo or introspection URL is given - - -M src/auth/db-oauth2.c - -2017-02-21 11:21:19 +0200 Aki Tuomi (7a5813e4e) - - auth: Make tokeninfo optional - - It is not supported by all OAuth2 solutions +M doc/man/doveadm-acl.1.in +M doc/man/doveadm-altmove.1.in +M doc/man/doveadm-auth.1.in +M doc/man/doveadm-batch.1.in +M doc/man/doveadm-deduplicate.1.in +M doc/man/doveadm-director.1.in +M doc/man/doveadm-dump.1.in +M doc/man/doveadm-exec.1.in +M doc/man/doveadm-expunge.1.in +M doc/man/doveadm-fetch.1.in +M doc/man/doveadm-flags.1.in +M doc/man/doveadm-force-resync.1.in +M doc/man/doveadm-fs.1.in +M doc/man/doveadm-fts.1.in +M doc/man/doveadm-help.1.in +M doc/man/doveadm-import.1.in +M doc/man/doveadm-index.1.in +M doc/man/doveadm-instance.1.in +M doc/man/doveadm-kick.1.in +M doc/man/doveadm-log.1.in +M doc/man/doveadm-mailbox-cryptokey.1.in +M doc/man/doveadm-mailbox.1.in +M doc/man/doveadm-move.1.in +M doc/man/doveadm-penalty.1.in +M doc/man/doveadm-proxy.1.in +M doc/man/doveadm-purge.1.in +M doc/man/doveadm-pw.1.in +M doc/man/doveadm-quota.1.in +M doc/man/doveadm-replicator.1.in +M doc/man/doveadm-save.1.in +M doc/man/doveadm-search-query.7 +M doc/man/doveadm-search.1.in +M doc/man/doveadm-stats.1.in +M doc/man/doveadm-sync.1.in +M doc/man/doveadm-user.1.in +M doc/man/doveadm-who.1.in +M doc/man/doveadm.1.in +M doc/man/doveconf.1.in +M doc/man/dovecot-lda.1.in +M doc/man/dovecot.1.in +M src/anvil/anvil-connection.c +M src/anvil/anvil-settings.c +M src/anvil/connect-limit.c +M src/anvil/main.c +M src/anvil/penalty.c +M src/anvil/test-penalty.c +M src/auth/auth-cache.c +M src/auth/auth-client-connection.c +M src/auth/auth-fields.c +M src/auth/auth-master-connection.c +M src/auth/auth-penalty.c +M src/auth/auth-policy.c +M src/auth/auth-postfix-connection.c +M src/auth/auth-request-handler.c +M src/auth/auth-request-stats.c +M src/auth/auth-request-var-expand.c +M src/auth/auth-request.c +M src/auth/auth-settings.c +M src/auth/auth-stats.c +M src/auth/auth-token.c +M src/auth/auth-worker-client.c +M src/auth/auth-worker-server.c +M src/auth/auth.c +M src/auth/db-checkpassword.c +M src/auth/db-dict-cache-key.c +M src/auth/db-dict.c +M src/auth/db-ldap.c +M src/auth/db-lua.c M src/auth/db-oauth2.c +M src/auth/db-passwd-file.c +M src/auth/db-sql.c +M src/auth/main.c +M src/auth/mech-anonymous.c +M src/auth/mech-cram-md5.c +M src/auth/mech-digest-md5.c +M src/auth/mech-dovecot-token.c +M src/auth/mech-external.c +M src/auth/mech-oauth2.c +M src/auth/mech-plain-common.c +M src/auth/mech-plain.c +M src/auth/mech.c +M src/auth/mycrypt.c +M src/auth/passdb-blocking.c +M src/auth/passdb-bsdauth.c +M src/auth/passdb-cache.c +M src/auth/passdb-checkpassword.c +M src/auth/passdb-dict.c +M src/auth/passdb-imap.c +M src/auth/passdb-ldap.c +M src/auth/passdb-lua.c +M src/auth/passdb-oauth2.c +M src/auth/passdb-passwd-file.c +M src/auth/passdb-passwd.c +M src/auth/passdb-shadow.c +M src/auth/passdb-sql.c +M src/auth/passdb-static.c +M src/auth/passdb-template.c +M src/auth/passdb-vpopmail.c +M src/auth/passdb.c +M src/auth/password-scheme-crypt.c +M src/auth/password-scheme-pbkdf2.c +M src/auth/password-scheme-rpa.c +M src/auth/password-scheme-sodium.c +M src/auth/password-scheme.c +M src/auth/test-auth-cache.c +M src/auth/test-auth-request-var-expand.c +M src/auth/test-auth.h +M src/auth/test-db-dict.c +M src/auth/test-libpassword.c +M src/auth/test-lua.c +M src/auth/test-main.c +M src/auth/test-mock.c +M src/auth/test-username-filter.c +M src/auth/userdb-blocking.c +M src/auth/userdb-checkpassword.c +M src/auth/userdb-dict.c +M src/auth/userdb-ldap.c +M src/auth/userdb-lua.c +M src/auth/userdb-passwd-file.c +M src/auth/userdb-passwd.c +M src/auth/userdb-prefetch.c +M src/auth/userdb-sql.c +M src/auth/userdb-static.c +M src/auth/userdb-template.c +M src/auth/userdb-vpopmail.c +M src/auth/userdb.c +M src/config/config-connection.c +M src/config/config-filter.c +M src/config/config-parser.c +M src/config/config-request.c +M src/config/config-settings.c +M src/config/doveconf.c +M src/config/main.c +M src/config/old-set-parser.c +M src/config/sysinfo-get.c +M src/dict/dict-commands.c +M src/dict/dict-connection.c +M src/dict/dict-settings.c +M src/dict/main.c +M src/director/auth-connection.c +M src/director/director-connection.c +M src/director/director-host.c +M src/director/director-request.c +M src/director/director-settings.c +M src/director/director-test.c +M src/director/director.c +M src/director/doveadm-connection.c +M src/director/login-connection.c +M src/director/mail-host.c +M src/director/main.c +M src/director/notify-connection.c +M src/director/test-user-directory.c +M src/director/user-directory.c +M src/dns/dns-client-settings.c +M src/dns/dns-client.c +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection-tcp.c +M src/doveadm/client-connection.c +M src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-auth.c +M src/doveadm/doveadm-dict.c +M src/doveadm/doveadm-director.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-dump-dbox.c +M src/doveadm/doveadm-dump-dcrypt-file.c +M src/doveadm/doveadm-dump-dcrypt-key.c +M src/doveadm/doveadm-dump-index.c +M src/doveadm/doveadm-dump-log.c +M src/doveadm/doveadm-dump-mailboxlog.c +M src/doveadm/doveadm-dump-thread.c +M src/doveadm/doveadm-dump.c +M src/doveadm/doveadm-fs.c +M src/doveadm/doveadm-instance.c +M src/doveadm/doveadm-kick.c +M src/doveadm/doveadm-log.c +M src/doveadm/doveadm-mail-altmove.c +M src/doveadm/doveadm-mail-batch.c +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-deduplicate.c +M src/doveadm/doveadm-mail-expunge.c +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-mail-flags.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-iter.c +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail-mailbox-status.c +M src/doveadm/doveadm-mail-mailbox.c +M src/doveadm/doveadm-mail-save.c +M src/doveadm/doveadm-mail-search.c +M src/doveadm/doveadm-mail-server.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mailbox-list-iter.c +M src/doveadm/doveadm-master.c +M src/doveadm/doveadm-mutf7.c +M src/doveadm/doveadm-oldstats.c +M src/doveadm/doveadm-penalty.c +M src/doveadm/doveadm-print-flow.c +M src/doveadm/doveadm-print-formatted.c +M src/doveadm/doveadm-print-json.c +M src/doveadm/doveadm-print-pager.c +M src/doveadm/doveadm-print-server.c +M src/doveadm/doveadm-print-tab.c +M src/doveadm/doveadm-print-table.c +M src/doveadm/doveadm-print.c +M src/doveadm/doveadm-proxy.c +M src/doveadm/doveadm-pw.c +M src/doveadm/doveadm-replicator.c +M src/doveadm/doveadm-settings.c +M src/doveadm/doveadm-sis.c +M src/doveadm/doveadm-stats.c +M src/doveadm/doveadm-util.c +M src/doveadm/doveadm-who.c +M src/doveadm/doveadm-zlib.c +M src/doveadm/doveadm.c +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-brain-mailbox-tree.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-mails.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-deserializer.c +M src/doveadm/dsync/dsync-ibc-pipe.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-ibc.c +M src/doveadm/dsync/dsync-mail.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-state.c +M src/doveadm/dsync/dsync-mailbox-tree-fill.c +M src/doveadm/dsync/dsync-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-mailbox-tree.c +M src/doveadm/dsync/dsync-mailbox.c +M src/doveadm/dsync/dsync-serializer.c +M src/doveadm/dsync/dsync-transaction-log-scan.c +M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c +M src/doveadm/main.c +M src/doveadm/server-connection.c +M src/doveadm/test-doveadm-util.c +M src/imap-hibernate/imap-client.c +M src/imap-hibernate/imap-hibernate-client.c +M src/imap-hibernate/imap-hibernate-settings.c +M src/imap-hibernate/imap-master-connection.c +M src/imap-hibernate/main.c +M src/imap-login/client-authenticate.c +M src/imap-login/imap-login-client.c +M src/imap-login/imap-login-commands.c +M src/imap-login/imap-login-settings.c +M src/imap-login/imap-proxy.c +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-login-settings.c +M src/imap-urlauth/imap-urlauth-login.c +M src/imap-urlauth/imap-urlauth-settings.c +M src/imap-urlauth/imap-urlauth-worker-settings.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/cmd-append.c +M src/imap/cmd-cancelupdate.c +M src/imap/cmd-capability.c +M src/imap/cmd-check.c +M src/imap/cmd-close.c +M src/imap/cmd-copy.c +M src/imap/cmd-create.c +M src/imap/cmd-delete.c +M src/imap/cmd-enable.c +M src/imap/cmd-examine.c +M src/imap/cmd-expunge.c +M src/imap/cmd-fetch.c +M src/imap/cmd-genurlauth.c +M src/imap/cmd-getmetadata.c +M src/imap/cmd-id.c +M src/imap/cmd-idle.c +M src/imap/cmd-list.c +M src/imap/cmd-logout.c +M src/imap/cmd-lsub.c +M src/imap/cmd-namespace.c +M src/imap/cmd-noop.c +M src/imap/cmd-notify.c +M src/imap/cmd-rename.c +M src/imap/cmd-resetkey.c +M src/imap/cmd-search.c +M src/imap/cmd-select.c +M src/imap/cmd-setmetadata.c +M src/imap/cmd-sort.c +M src/imap/cmd-status.c +M src/imap/cmd-store.c +M src/imap/cmd-subscribe.c +M src/imap/cmd-thread.c +M src/imap/cmd-unselect.c +M src/imap/cmd-unsubscribe.c +M src/imap/cmd-urlfetch.c +M src/imap/cmd-x-cancel.c +M src/imap/cmd-x-state.c +M src/imap/imap-client-hibernate.c +M src/imap/imap-client.c +M src/imap/imap-commands-util.c +M src/imap/imap-commands.c +M src/imap/imap-expunge.c +M src/imap/imap-fetch-body.c +M src/imap/imap-fetch.c +M src/imap/imap-list.c +M src/imap/imap-master-client.c +M src/imap/imap-notify.c +M src/imap/imap-search-args.c +M src/imap/imap-search.c +M src/imap/imap-settings.c +M src/imap/imap-state.c +M src/imap/imap-status.c +M src/imap/imap-sync.c +M src/imap/mail-storage-callbacks.c +M src/imap/main.c +M src/indexer/indexer-client.c +M src/indexer/indexer-queue.c +M src/indexer/indexer-settings.c +M src/indexer/indexer-worker-settings.c +M src/indexer/indexer-worker.c +M src/indexer/indexer.c +M src/indexer/master-connection.c +M src/indexer/worker-connection.c +M src/indexer/worker-pool.c +M src/ipc/client.c +M src/ipc/ipc-connection.c +M src/ipc/ipc-group.c +M src/ipc/ipc-settings.c +M src/ipc/main.c +M src/lda/main.c +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-client.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-charset/charset-iconv.c +M src/lib-charset/charset-utf8-only.c +M src/lib-charset/charset-utf8.c +M src/lib-charset/test-charset.c +M src/lib-compression/compression.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-compression/ostream-bzlib.c +M src/lib-compression/ostream-lz4.c +M src/lib-compression/ostream-lzma.c +M src/lib-compression/ostream-zlib.c +M src/lib-compression/test-compression.c +M src/lib-dcrypt/dcrypt-gnutls.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c +M src/lib-dict-backend/dict-cdb.c +M src/lib-dict-backend/dict-db.c +M src/lib-dict-backend/dict-ldap-settings.c +M src/lib-dict-backend/dict-ldap.c +M src/lib-dict-backend/dict-sql-settings.c +M src/lib-dict-backend/dict-sql.c +M src/lib-dict-backend/test-dict-sql.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict-extra/dict-register.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-fail.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-transaction-memory.c +M src/lib-dict/dict.c +M src/lib-dict/test-dict-client.c +M src/lib-dict/test-dict.c +M src/lib-dns/dns-lookup.c +M src/lib-dns/dns-util.c +M src/lib-dns/test-dns-util.c +M src/lib-fs/fs-api.c +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-common.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test-async.c +M src/lib-fs/fs-test.c +M src/lib-fs/fs-wrapper.c +M src/lib-fs/istream-fs-file.c +M src/lib-fs/istream-fs-stats.c +M src/lib-fs/istream-metawrap.c +M src/lib-fs/ostream-cmp.c +M src/lib-fs/ostream-metawrap.c +M src/lib-fs/test-fs-metawrap.c +M src/lib-fs/test-fs-posix.c +M src/lib-fts/fts-filter-common.c +M src/lib-fts/fts-filter-contractions.c +M src/lib-fts/fts-filter-english-possessive.c +M src/lib-fts/fts-filter-lowercase.c +M src/lib-fts/fts-filter-normalizer-icu.c +M src/lib-fts/fts-filter-stemmer-snowball.c +M src/lib-fts/fts-filter-stopwords.c +M src/lib-fts/fts-filter.c +M src/lib-fts/fts-icu.c +M src/lib-fts/fts-language.c +M src/lib-fts/fts-library.c +M src/lib-fts/fts-tokenizer-address.c +M src/lib-fts/fts-tokenizer-common.c +M src/lib-fts/fts-tokenizer-generic.c +M src/lib-fts/fts-tokenizer.c +M src/lib-fts/test-fts-filter.c +M src/lib-fts/test-fts-icu.c +M src/lib-fts/test-fts-language.c +M src/lib-fts/test-fts-tokenizer.c +M src/lib-http/http-auth.c +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c +M src/lib-http/http-date.c +M src/lib-http/http-header-parser.c +M src/lib-http/http-header.c +M src/lib-http/http-message-parser.c +M src/lib-http/http-parser.c +M src/lib-http/http-request-parser.c +M src/lib-http/http-request.c +M src/lib-http/http-response-parser.c +M src/lib-http/http-response.c +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-request.c +M src/lib-http/http-server-response.c +M src/lib-http/http-server.c +M src/lib-http/http-transfer-chunked.c +M src/lib-http/http-url.c +M src/lib-http/test-http-auth.c +M src/lib-http/test-http-client-errors.c +M src/lib-http/test-http-client.c +M src/lib-http/test-http-date.c +M src/lib-http/test-http-header-parser.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-response-parser.c +M src/lib-http/test-http-server-errors.c +M src/lib-http/test-http-server.c +M src/lib-http/test-http-transfer.c +M src/lib-http/test-http-url.c +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-msgmap.c +M src/lib-imap-client/test-imapc-client.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-imap-storage/imap-msgpart-url.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-imap-urlauth/imap-urlauth-fetch.c +M src/lib-imap-urlauth/imap-urlauth.c +M src/lib-imap/imap-arg.c +M src/lib-imap/imap-base-subject.c +M src/lib-imap/imap-bodystructure.c +M src/lib-imap/imap-date.c +M src/lib-imap/imap-envelope.c +M src/lib-imap/imap-id.c +M src/lib-imap/imap-keepalive.c +M src/lib-imap/imap-match.c +M src/lib-imap/imap-parser.c +M src/lib-imap/imap-quote.c +M src/lib-imap/imap-seqset.c +M src/lib-imap/imap-url.c +M src/lib-imap/imap-utf7.c +M src/lib-imap/imap-util.c +M src/lib-imap/test-imap-bodystructure.c +M src/lib-imap/test-imap-envelope.c +M src/lib-imap/test-imap-match.c +M src/lib-imap/test-imap-parser.c +M src/lib-imap/test-imap-quote.c +M src/lib-imap/test-imap-url.c +M src/lib-imap/test-imap-utf7.c +M src/lib-imap/test-imap-util.c +M src/lib-index/mail-cache-compress.c +M src/lib-index/mail-cache-decisions.c +M src/lib-index/mail-cache-fields.c +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-cache-sync-update.c +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-cache.c +M src/lib-index/mail-index-alloc-cache.c +M src/lib-index/mail-index-dummy-view.c +M src/lib-index/mail-index-fsck.c +M src/lib-index/mail-index-lock.c +M src/lib-index/mail-index-map-hdr.c +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-index-map.c +M src/lib-index/mail-index-modseq.c +M src/lib-index/mail-index-strmap.c +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-sync-keywords.c +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index-transaction-export.c +M src/lib-index/mail-index-transaction-finish.c +M src/lib-index/mail-index-transaction-sort-appends.c +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/mail-index-transaction-view.c +M src/lib-index/mail-index-transaction.c +M src/lib-index/mail-index-util.c +M src/lib-index/mail-index-view-sync.c +M src/lib-index/mail-index-view.c +M src/lib-index/mail-index-write.c +M src/lib-index/mail-index.c +M src/lib-index/mail-transaction-log-append.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-view.c +M src/lib-index/mail-transaction-log.c +M src/lib-index/mailbox-log.c +M src/lib-index/test-mail-index-map.c +M src/lib-index/test-mail-index-modseq.c +M src/lib-index/test-mail-index-sync-ext.c +M src/lib-index/test-mail-index-transaction-finish.c +M src/lib-index/test-mail-index-transaction-update.c +M src/lib-index/test-mail-transaction-log-append.c +M src/lib-index/test-mail-transaction-log-file.c +M src/lib-index/test-mail-transaction-log-view.c +M src/lib-lda/lda-settings.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-send.c +M src/lib-ldap/ldap-client.c +M src/lib-ldap/ldap-compare.c +M src/lib-ldap/ldap-connection-pool.c +M src/lib-ldap/ldap-connection.c +M src/lib-ldap/ldap-entry.c +M src/lib-ldap/ldap-iterator.c +M src/lib-ldap/ldap-search.c +M src/lib-lua/dlua-compat.c +M src/lib-lua/dlua-dovecot.c +M src/lib-lua/dlua-script.c +M src/lib-lua/test-lua.c +M src/lib-mail/istream-attachment-connector.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-binary-converter.c +M src/lib-mail/istream-dot.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/istream-nonuls.c +M src/lib-mail/istream-qp-decoder.c +M src/lib-mail/istream-qp-encoder.c +M src/lib-mail/mail-html2text.c +M src/lib-mail/mail-user-hash.c +M src/lib-mail/mbox-from.c +M src/lib-mail/message-address.c +M src/lib-mail/message-binary-part.c +M src/lib-mail/message-date.c +M src/lib-mail/message-decoder.c +M src/lib-mail/message-header-decode.c +M src/lib-mail/message-header-encode.c +M src/lib-mail/message-header-hash.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-id.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-part-data.c +M src/lib-mail/message-part-serialize.c +M src/lib-mail/message-part.c +M src/lib-mail/message-search.c +M src/lib-mail/message-size.c +M src/lib-mail/message-snippet.c +M src/lib-mail/ostream-dot.c +M src/lib-mail/qp-decoder.c +M src/lib-mail/qp-encoder.c +M src/lib-mail/quoted-printable.c +M src/lib-mail/rfc2231-parser.c +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-istream-attachment.c +M src/lib-mail/test-istream-binary-converter.c +M src/lib-mail/test-istream-dot.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-istream-qp-decoder.c +M src/lib-mail/test-istream-qp-encoder.c +M src/lib-mail/test-mail-html2text.c +M src/lib-mail/test-mbox-from.c +M src/lib-mail/test-message-address.c +M src/lib-mail/test-message-date.c +M src/lib-mail/test-message-decoder.c +M src/lib-mail/test-message-header-decode.c +M src/lib-mail/test-message-header-encode.c +M src/lib-mail/test-message-header-hash.c +M src/lib-mail/test-message-header-parser.c +M src/lib-mail/test-message-id.c +M src/lib-mail/test-message-parser.c +M src/lib-mail/test-message-part.c +M src/lib-mail/test-message-search.c +M src/lib-mail/test-message-snippet.c +M src/lib-mail/test-ostream-dot.c +M src/lib-mail/test-qp-decoder.c +M src/lib-mail/test-qp-encoder.c +M src/lib-mail/test-quoted-printable.c +M src/lib-mail/test-rfc2231-parser.c +M src/lib-mail/test-rfc822-parser.c +M src/lib-master/anvil-client.c +M src/lib-master/ipc-client.c +M src/lib-master/ipc-server.c +M src/lib-master/master-auth.c +M src/lib-master/master-instance.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-login.c +M src/lib-master/master-service-haproxy.c +M src/lib-master/master-service-settings-cache.c +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl.c +M src/lib-master/master-service.c +M src/lib-master/stats-client.c +M src/lib-master/syslog-util.c +M src/lib-master/test-master-service-settings-cache.c +M src/lib-oauth2/oauth2-introspect.c +M src/lib-oauth2/oauth2-private.h +M src/lib-oauth2/oauth2-refresh.c +M src/lib-oauth2/oauth2-token-validate.c +M src/lib-oauth2/oauth2.c +M src/lib-oauth2/oauth2.h +M src/lib-old-stats/stats-connection.c +M src/lib-old-stats/stats-parser.c +M src/lib-old-stats/stats.c +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h +M src/lib-program-client/test-program-client-local.c +M src/lib-program-client/test-program-client-net.c +M src/lib-program-client/test-program-client-unix.c +M src/lib-sasl/dsasl-client.c +M src/lib-sasl/mech-external.c +M src/lib-sasl/mech-login.c +M src/lib-sasl/mech-oauthbearer.c +M src/lib-sasl/mech-plain.c +M src/lib-settings/settings-parser.c +M src/lib-settings/settings.c +M src/lib-settings/test-settings-parser.c +M src/lib-smtp/smtp-address.c +M src/lib-smtp/smtp-client-command.c +M src/lib-smtp/smtp-client-connection.c +M src/lib-smtp/smtp-client-transaction.c +M src/lib-smtp/smtp-client.c +M src/lib-smtp/smtp-command-parser.c +M src/lib-smtp/smtp-common.c +M src/lib-smtp/smtp-params.c +M src/lib-smtp/smtp-parser.c +M src/lib-smtp/smtp-reply-parser.c +M src/lib-smtp/smtp-reply.c +M src/lib-smtp/smtp-server-cmd-auth.c +M src/lib-smtp/smtp-server-cmd-data.c +M src/lib-smtp/smtp-server-cmd-helo.c +M src/lib-smtp/smtp-server-cmd-mail.c +M src/lib-smtp/smtp-server-cmd-noop.c +M src/lib-smtp/smtp-server-cmd-quit.c +M src/lib-smtp/smtp-server-cmd-rcpt.c +M src/lib-smtp/smtp-server-cmd-rset.c +M src/lib-smtp/smtp-server-cmd-starttls.c +M src/lib-smtp/smtp-server-cmd-vrfy.c +M src/lib-smtp/smtp-server-cmd-xclient.c +M src/lib-smtp/smtp-server-command.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server-reply.c +M src/lib-smtp/smtp-server-transaction.c +M src/lib-smtp/smtp-server.c +M src/lib-smtp/smtp-submit-settings.c +M src/lib-smtp/smtp-submit.c +M src/lib-smtp/smtp-syntax.c +M src/lib-smtp/test-smtp-address.c +M src/lib-smtp/test-smtp-client-errors.c +M src/lib-smtp/test-smtp-command-parser.c +M src/lib-smtp/test-smtp-params.c +M src/lib-smtp/test-smtp-payload.c +M src/lib-smtp/test-smtp-reply-parser.c +M src/lib-smtp/test-smtp-server-errors.c +M src/lib-smtp/test-smtp-submit.c +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-mysql.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlite.c +M src/lib-sql/driver-sqlpool.c +M src/lib-sql/driver-test.c +M src/lib-sql/sql-api.c +M src/lib-sql/sql-db-cache.c +M src/lib-ssl-iostream/dovecot-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl-context-cache.c +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/istream-openssl.c +M src/lib-ssl-iostream/ostream-openssl.c +M src/lib-storage/fail-mail-storage.c +M src/lib-storage/fail-mail.c +M src/lib-storage/fail-mailbox.c +M src/lib-storage/index/cydir/cydir-mail.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/cydir/cydir-storage.c +M src/lib-storage/index/cydir/cydir-sync.c +M src/lib-storage/index/dbox-common/dbox-attachment.c +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/index/dbox-common/dbox-mail.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c +M src/lib-storage/index/dbox-multi/mdbox-file.c +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-multi/mdbox-settings.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-multi/mdbox-sync.c +M src/lib-storage/index/dbox-single/sdbox-copy.c +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-storage/index/dbox-single/sdbox-sync.c +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-sync.c +M src/lib-storage/index/index-attachment.c +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/index/index-pop3-uidl.c +M src/lib-storage/index/index-rebuild.c +M src/lib-storage/index/index-search-mime.c +M src/lib-storage/index/index-search-result.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/index/index-status.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-sync-changes.c +M src/lib-storage/index/index-sync-pvt.c +M src/lib-storage/index/index-sync-search.c +M src/lib-storage/index/index-sync.c +M src/lib-storage/index/index-thread-finish.c +M src/lib-storage/index/index-thread-links.c +M src/lib-storage/index/index-thread.c +M src/lib-storage/index/index-transaction.c +M src/lib-storage/index/istream-mail.c +M src/lib-storage/index/maildir/maildir-copy.c +M src/lib-storage/index/maildir/maildir-filename-flags.c +M src/lib-storage/index/maildir/maildir-filename.c +M src/lib-storage/index/maildir/maildir-keywords.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-settings.c +M src/lib-storage/index/maildir/maildir-storage.c +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-sync.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/maildir/maildir-util.c +M src/lib-storage/index/mbox/istream-raw-mbox.c +M src/lib-storage/index/mbox/mbox-file.c +M src/lib-storage/index/mbox/mbox-lock.c +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/mbox/mbox-md5-all.c +M src/lib-storage/index/mbox/mbox-md5-apop3d.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-settings.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/mbox/mbox-sync-list-index.c +M src/lib-storage/index/mbox/mbox-sync-parse.c +M src/lib-storage/index/mbox/mbox-sync-rewrite.c +M src/lib-storage/index/mbox/mbox-sync-update.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/pop3c/pop3c-settings.c +M src/lib-storage/index/pop3c/pop3c-storage.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/index/raw/raw-mail.c +M src/lib-storage/index/raw/raw-storage.c +M src/lib-storage/index/raw/raw-sync.c +M src/lib-storage/index/shared/shared-list.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-fs-flags.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/list/mailbox-list-maildir-iter.c +M src/lib-storage/list/mailbox-list-maildir.c +M src/lib-storage/list/mailbox-list-none.c +M src/lib-storage/list/mailbox-list-notify-tree.c +M src/lib-storage/list/mailbox-list-subscriptions.c +M src/lib-storage/list/subscription-file.c +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-copy.c +M src/lib-storage/mail-duplicate.c +M src/lib-storage/mail-error.c +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-search-args-cmdline.c +M src/lib-storage/mail-search-args-imap.c +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/mail-search-build.c +M src/lib-storage/mail-search-mime-build.c +M src/lib-storage/mail-search-mime-register.c +M src/lib-storage/mail-search-mime.c +M src/lib-storage/mail-search-parser-cmdline.c +M src/lib-storage/mail-search-parser-imap.c +M src/lib-storage/mail-search-parser.c +M src/lib-storage/mail-search-register-human.c +M src/lib-storage/mail-search-register-imap.c +M src/lib-storage/mail-search-register.c +M src/lib-storage/mail-search.c +M src/lib-storage/mail-storage-hooks.c +M src/lib-storage/mail-storage-register.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-thread.c +M src/lib-storage/mail-user.c +M src/lib-storage/mail.c +M src/lib-storage/mailbox-attribute-internal.c +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-get.c +M src/lib-storage/mailbox-guid-cache.c +M src/lib-storage/mailbox-header.c +M src/lib-storage/mailbox-keywords.c +M src/lib-storage/mailbox-list-notify.c +M src/lib-storage/mailbox-list-register.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-recent-flags.c +M src/lib-storage/mailbox-search-result.c +M src/lib-storage/mailbox-tree.c +M src/lib-storage/mailbox-uidvalidity.c +M src/lib-storage/mailbox-watch.c +M src/lib-storage/test-mail-search-args-imap.c +M src/lib-storage/test-mail-search-args-simplify.c +M src/lib-storage/test-mail-storage.c +M src/lib-storage/test-mailbox-get.c +M src/lib-test/test-common.c +M src/lib-test/test-istream.c +M src/lib-test/test-ostream.c +M src/lib/aqueue.c +M src/lib/array.c +M src/lib/askpass.c +M src/lib/backtrace-string.c +M src/lib/base32.c +M src/lib/base64.c +M src/lib/bits.c +M src/lib/bloomfilter.c +M src/lib/bsearch-insert-pos.c +M src/lib/buffer.c +M src/lib/child-wait.c +M src/lib/compat.c +M src/lib/connection.c +M src/lib/crc32.c +M src/lib/data-stack.c +M src/lib/eacces-error.c +M src/lib/env-util.c +M src/lib/event-filter.c +M src/lib/event-log.c +M src/lib/execv-const.c +M src/lib/failures.c +M src/lib/fd-util.c +M src/lib/fdatasync-path.c +M src/lib/fdpass.c +M src/lib/file-cache.c +M src/lib/file-copy.c +M src/lib/file-create-locked.c +M src/lib/file-dotlock.c +M src/lib/file-lock.c +M src/lib/file-set-size.c +M src/lib/guid.c +M src/lib/hash-format.c +M src/lib/hash-method.c +M src/lib/hash.c +M src/lib/hash2.c +M src/lib/hex-binary.c +M src/lib/hex-dec.c +M src/lib/home-expand.c +M src/lib/hook-build.c +M src/lib/hook-build.h +M src/lib/hostpid.c +M src/lib/imem.c +M src/lib/ioloop-epoll.c +M src/lib/ioloop-notify-fd.c +M src/lib/ioloop-notify-inotify.c +M src/lib/ioloop-notify-none.c +M src/lib/ioloop-poll.c +M src/lib/ioloop-select.c +M src/lib/ioloop.c +M src/lib/iostream-proxy.c +M src/lib/iostream-proxy.h +M src/lib/iostream-pump.c +M src/lib/iostream-pump.h +M src/lib/iostream-rawlog.c +M src/lib/iostream-temp.c +M src/lib/iostream.c +M src/lib/ipwd.c +M src/lib/iso8601-date.c +M src/lib/istream-base64-decoder.c +M src/lib/istream-base64-encoder.c +M src/lib/istream-callback.c +M src/lib/istream-chain.c +M src/lib/istream-concat.c +M src/lib/istream-crlf.c +M src/lib/istream-data.c +M src/lib/istream-failure-at.c +M src/lib/istream-file.c +M src/lib/istream-hash.c +M src/lib/istream-jsonstr.c +M src/lib/istream-limit.c +M src/lib/istream-mmap.c +M src/lib/istream-multiplex.c +M src/lib/istream-rawlog.c +M src/lib/istream-seekable.c +M src/lib/istream-sized.c +M src/lib/istream-tee.c +M src/lib/istream-timeout.c +M src/lib/istream-try.c +M src/lib/istream-unix.c +M src/lib/istream.c +M src/lib/json-parser.c +M src/lib/json-tree.c +M src/lib/lib-event.c +M src/lib/lib-signals.c +M src/lib/lib.c +M src/lib/log-throttle.c +M src/lib/memarea.c +M src/lib/mempool-allocfree.c +M src/lib/mempool-alloconly.c +M src/lib/mempool-datastack.c +M src/lib/mempool-system.c +M src/lib/mempool-unsafe-datastack.c +M src/lib/mempool.c +M src/lib/mkdir-parents.c +M src/lib/mmap-anon.c +M src/lib/mmap-util.c +M src/lib/module-dir.c +M src/lib/mountpoint.c +M src/lib/net.c +M src/lib/nfs-workarounds.c +M src/lib/numpack.c +M src/lib/ostream-buffer.c +M src/lib/ostream-escaped.c +M src/lib/ostream-failure-at.c +M src/lib/ostream-file.c +M src/lib/ostream-hash.c +M src/lib/ostream-multiplex.c +M src/lib/ostream-null.c +M src/lib/ostream-rawlog.c +M src/lib/ostream-unix.c +M src/lib/ostream.c +M src/lib/path-util.c +M src/lib/pkcs5.c +M src/lib/primes.c +M src/lib/printf-format-fix.c +M src/lib/priorityq.c +M src/lib/process-title.c +M src/lib/rand.c +M src/lib/randgen.c +M src/lib/read-full.c +M src/lib/restrict-access.c +M src/lib/restrict-process-size.c +M src/lib/safe-memset.c +M src/lib/safe-mkdir.c +M src/lib/safe-mkstemp.c +M src/lib/sendfile-util.c +M src/lib/seq-range-array.c +M src/lib/sort.c +M src/lib/str-find.c +M src/lib/str-sanitize.c +M src/lib/str-table.c +M src/lib/str.c +M src/lib/strescape.c +M src/lib/strfuncs.c +M src/lib/strnum.c +M src/lib/test-aqueue.c +M src/lib/test-array.c +M src/lib/test-base32.c +M src/lib/test-base64.c +M src/lib/test-bits.c +M src/lib/test-bloomfilter.c +M src/lib/test-bsearch-insert-pos.c +M src/lib/test-buffer.c +M src/lib/test-crc32.c +M src/lib/test-data-stack.c +M src/lib/test-failures.c +M src/lib/test-file-create-locked.c +M src/lib/test-guid.c +M src/lib/test-hash-format.c +M src/lib/test-hash-method.c +M src/lib/test-hash.c +M src/lib/test-hex-binary.c +M src/lib/test-hmac.c +M src/lib/test-imem.c +M src/lib/test-ioloop.c +M src/lib/test-iostream-proxy.c +M src/lib/test-iostream-pump.c +M src/lib/test-iostream-temp.c +M src/lib/test-iso8601-date.c +M src/lib/test-istream-base64-decoder.c +M src/lib/test-istream-base64-encoder.c +M src/lib/test-istream-chain.c +M src/lib/test-istream-concat.c +M src/lib/test-istream-crlf.c +M src/lib/test-istream-failure-at.c +M src/lib/test-istream-jsonstr.c +M src/lib/test-istream-multiplex.c +M src/lib/test-istream-seekable.c +M src/lib/test-istream-sized.c +M src/lib/test-istream-tee.c +M src/lib/test-istream-try.c +M src/lib/test-istream-unix.c +M src/lib/test-istream.c +M src/lib/test-json-parser.c +M src/lib/test-json-tree.c +M src/lib/test-lib-signals.c +M src/lib/test-lib.c +M src/lib/test-llist.c +M src/lib/test-log-throttle.c +M src/lib/test-malloc-overflow.c +M src/lib/test-memarea.c +M src/lib/test-mempool-allocfree.c +M src/lib/test-mempool-alloconly.c +M src/lib/test-mempool.c +M src/lib/test-multiplex.c +M src/lib/test-murmurhash3.c +M src/lib/test-net.c +M src/lib/test-numpack.c +M src/lib/test-ostream-buffer.c +M src/lib/test-ostream-escaped.c +M src/lib/test-ostream-failure-at.c +M src/lib/test-ostream-file.c +M src/lib/test-ostream-multiplex.c +M src/lib/test-path-util.c +M src/lib/test-pkcs5.c +M src/lib/test-primes.c +M src/lib/test-printf-format-fix.c +M src/lib/test-priorityq.c +M src/lib/test-seq-range-array.c +M src/lib/test-str-find.c +M src/lib/test-str-sanitize.c +M src/lib/test-str-table.c +M src/lib/test-str.c +M src/lib/test-strescape.c +M src/lib/test-strfuncs.c +M src/lib/test-strnum.c +M src/lib/test-time-util.c +M src/lib/test-timing.c +M src/lib/test-unichar.c +M src/lib/test-uri.c +M src/lib/test-utc-mktime.c +M src/lib/test-var-expand.c +M src/lib/test-wildcard-match.c +M src/lib/time-util.c +M src/lib/timing.c +M src/lib/unichar.c +M src/lib/unix-socket-create.c +M src/lib/unlink-directory.c +M src/lib/unlink-old-files.c +M src/lib/uri-util.c +M src/lib/utc-mktime.c +M src/lib/utc-offset.c +M src/lib/var-expand-if.c +M src/lib/var-expand.c +M src/lib/write-full.c +M src/lmtp/client.c +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-settings.c +M src/lmtp/main.c +M src/log/doveadm-connection.c +M src/log/log-connection.c +M src/log/log-error-buffer.c +M src/log/log-settings.c +M src/log/main.c +M src/login-common/access-lookup.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/login-proxy-state.c +M src/login-common/login-proxy.c +M src/login-common/login-settings.c +M src/login-common/main.c +M src/login-common/sasl-server.c +M src/master/capabilities-posix.c +M src/master/dup2-array.c +M src/master/main.c +M src/master/master-client.c +M src/master/master-settings.c +M src/master/service-anvil.c +M src/master/service-listen.c +M src/master/service-log.c +M src/master/service-monitor.c +M src/master/service-process-notify.c +M src/master/service-process.c +M src/master/service.c +M src/old-stats/client-export.c +M src/old-stats/client-reset.c +M src/old-stats/client.c +M src/old-stats/fifo-input-connection.c +M src/old-stats/global-memory.c +M src/old-stats/mail-command.c +M src/old-stats/mail-domain.c +M src/old-stats/mail-ip.c +M src/old-stats/mail-session.c +M src/old-stats/mail-stats.c +M src/old-stats/mail-user.c +M src/old-stats/main.c +M src/old-stats/stats-carbon.c +M src/old-stats/stats-settings.c +M src/plugins/acl/acl-api.c +M src/plugins/acl/acl-attributes.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-backend-vfile-update.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/acl/acl-backend.c +M src/plugins/acl/acl-cache.c +M src/plugins/acl/acl-global-file.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-mailbox.c +M src/plugins/acl/acl-plugin.c +M src/plugins/acl/acl-shared-storage.c +M src/plugins/acl/acl-storage.c +M src/plugins/acl/doveadm-acl.c +M src/plugins/apparmor/apparmor-plugin.c +M src/plugins/autocreate/autocreate-plugin.c +M src/plugins/expire/doveadm-expire.c +M src/plugins/expire/expire-plugin.c +M src/plugins/expire/expire-set.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/fts-lucene/doveadm-fts-lucene.c +M src/plugins/fts-lucene/fts-backend-lucene.c +M src/plugins/fts-lucene/fts-lucene-plugin.c +M src/plugins/fts-lucene/lucene-wrapper.cc +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-backend-solr.c +M src/plugins/fts-solr/fts-solr-plugin.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts-squat/fts-backend-squat.c +M src/plugins/fts-squat/fts-squat-plugin.c +M src/plugins/fts-squat/squat-test.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/fts/doveadm-dump-fts-expunge-log.c +M src/plugins/fts/doveadm-fts.c +M src/plugins/fts/fts-api.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-expunge-log.c +M src/plugins/fts/fts-indexer.c +M src/plugins/fts/fts-parser-html.c +M src/plugins/fts/fts-parser-script.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/fts/fts-parser.c +M src/plugins/fts/fts-plugin.c +M src/plugins/fts/fts-search-args.c +M src/plugins/fts/fts-search-serialize.c +M src/plugins/fts/fts-search.c +M src/plugins/fts/fts-storage.c +M src/plugins/fts/fts-user.c +M src/plugins/fts/xml2text.c +M src/plugins/imap-acl/imap-acl-plugin.c +M src/plugins/imap-old-stats/imap-stats-plugin.c +M src/plugins/imap-quota/imap-quota-plugin.c +M src/plugins/imap-zlib/imap-zlib-plugin.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/listescape/listescape-plugin.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-crypt/fs-crypt-settings.c +M src/plugins/mail-crypt/fs-crypt.c +M src/plugins/mail-crypt/fs-mail-crypt.c +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/plugins/mail-crypt/mail-crypt-global-key.c +M src/plugins/mail-crypt/mail-crypt-key.c +M src/plugins/mail-crypt/mail-crypt-plugin.c +M src/plugins/mail-crypt/mail-crypt-pluginenv.c +M src/plugins/mail-crypt/mail-crypt-userenv.c +M src/plugins/mail-crypt/test-mail-global-key.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/mail-filter-plugin.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/plugins/mail-log/mail-log-plugin.c +M src/plugins/mailbox-alias/mailbox-alias-plugin.c +M src/plugins/notify-status/notify-status-plugin.c +M src/plugins/notify/notify-plugin.c +M src/plugins/notify/notify-storage.c +M src/plugins/old-stats/mail-stats-connection.c +M src/plugins/old-stats/mail-stats-fill.c +M src/plugins/old-stats/mail-stats.c +M src/plugins/old-stats/stats-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c +M src/plugins/push-notification/push-notification-driver-dlog.c +M src/plugins/push-notification/push-notification-driver-ox.c +M src/plugins/push-notification/push-notification-drivers.c +M src/plugins/push-notification/push-notification-drivers.h +M src/plugins/push-notification/push-notification-event-flagsclear.c +M src/plugins/push-notification/push-notification-event-flagsclear.h +M src/plugins/push-notification/push-notification-event-flagsset.c +M src/plugins/push-notification/push-notification-event-flagsset.h +M src/plugins/push-notification/push-notification-event-mailboxcreate.c +M src/plugins/push-notification/push-notification-event-mailboxcreate.h +M src/plugins/push-notification/push-notification-event-mailboxdelete.c +M src/plugins/push-notification/push-notification-event-mailboxdelete.h +M src/plugins/push-notification/push-notification-event-mailboxrename.c +M src/plugins/push-notification/push-notification-event-mailboxrename.h +M src/plugins/push-notification/push-notification-event-mailboxsubscribe.c +M src/plugins/push-notification/push-notification-event-mailboxsubscribe.h +M src/plugins/push-notification/push-notification-event-mailboxunsubscribe.c +M src/plugins/push-notification/push-notification-event-mailboxunsubscribe.h +M src/plugins/push-notification/push-notification-event-message-common.h +M src/plugins/push-notification/push-notification-event-messageappend.c +M src/plugins/push-notification/push-notification-event-messageappend.h +M src/plugins/push-notification/push-notification-event-messageexpunge.c +M src/plugins/push-notification/push-notification-event-messageexpunge.h +M src/plugins/push-notification/push-notification-event-messagenew.c +M src/plugins/push-notification/push-notification-event-messagenew.h +M src/plugins/push-notification/push-notification-event-messageread.c +M src/plugins/push-notification/push-notification-event-messageread.h +M src/plugins/push-notification/push-notification-event-messagetrash.c +M src/plugins/push-notification/push-notification-event-messagetrash.h +M src/plugins/push-notification/push-notification-events-rfc5423.c +M src/plugins/push-notification/push-notification-events-rfc5423.h +M src/plugins/push-notification/push-notification-events.c +M src/plugins/push-notification/push-notification-events.h +M src/plugins/push-notification/push-notification-plugin.c +M src/plugins/push-notification/push-notification-plugin.h +M src/plugins/push-notification/push-notification-triggers.c +M src/plugins/push-notification/push-notification-triggers.h +M src/plugins/push-notification/push-notification-txn-mbox.c +M src/plugins/push-notification/push-notification-txn-mbox.h +M src/plugins/push-notification/push-notification-txn-msg.c +M src/plugins/push-notification/push-notification-txn-msg.h +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/doveadm-quota.c +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-plugin.c +M src/plugins/quota/quota-status-settings.c +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota-util.c +M src/plugins/quota/quota.c +M src/plugins/quota/test-quota-util.c +M src/plugins/replication/replication-plugin.c +M src/plugins/snarf/snarf-plugin.c +M src/plugins/trash/trash-plugin.c +M src/plugins/var-expand-crypt/test-var-expand-crypt.c +M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +M src/plugins/virtual/virtual-config.c +M src/plugins/virtual/virtual-mail.c +M src/plugins/virtual/virtual-plugin.c +M src/plugins/virtual/virtual-save.c +M src/plugins/virtual/virtual-search.c +M src/plugins/virtual/virtual-storage.c +M src/plugins/virtual/virtual-sync.c +M src/plugins/virtual/virtual-transaction.c +M src/plugins/welcome/welcome-plugin.c +M src/plugins/zlib/zlib-plugin.c +M src/pop3-login/client-authenticate.c +M src/pop3-login/client.c +M src/pop3-login/pop3-login-settings.c +M src/pop3-login/pop3-proxy.c +M src/pop3/main.c +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c +M src/pop3/pop3-settings.c +M src/replication/aggregator/aggregator-settings.c +M src/replication/aggregator/aggregator.c +M src/replication/aggregator/notify-connection.c +M src/replication/aggregator/replicator-connection.c +M src/replication/replicator/doveadm-connection.c +M src/replication/replicator/dsync-client.c +M src/replication/replicator/notify-connection.c +M src/replication/replicator/replicator-brain.c +M src/replication/replicator/replicator-queue-auth.c +M src/replication/replicator/replicator-queue.c +M src/replication/replicator/replicator-settings.c +M src/replication/replicator/replicator.c +M src/stats/client-reader.c +M src/stats/client-writer.c +M src/stats/main.c +M src/stats/stats-event-category.c +M src/stats/stats-metrics.c +M src/stats/stats-settings.c +M src/submission-login/client-authenticate.c +M src/submission-login/client.c +M src/submission-login/submission-login-settings.c +M src/submission-login/submission-proxy.c +M src/submission/cmd-data.c +M src/submission/cmd-helo.c +M src/submission/cmd-mail.c +M src/submission/cmd-noop.c +M src/submission/cmd-quit.c +M src/submission/cmd-rcpt.c +M src/submission/cmd-rset.c +M src/submission/cmd-vrfy.c +M src/submission/main.c +M src/submission/submission-client.c +M src/submission/submission-commands.c +M src/submission/submission-settings.c +M src/util/gdbhelper.c +M src/util/maildirlock.c +M src/util/rawlog.c +M src/util/script-login.c +M src/util/script.c +M src/util/tcpwrap-settings.c +M src/util/tcpwrap.c + +2017-12-22 15:12:30 +0200 Timo Sirainen (6f9ffa758) + + doveadm dump: Add "multiplex" dump type + + This allows dumping all channels from istream-multiplex stream. + +M src/doveadm/doveadm-dump.c + +2017-12-22 15:11:45 +0200 Timo Sirainen (baf3b9be9) + + doveadm dump: Allow doveadm_cmd_dump.test() to be NULL + + This means that there's no auto-detection for the dump type. + +M src/doveadm/doveadm-dump.c + +2017-12-22 15:10:00 +0200 Timo Sirainen (4fcc78432) + + lib: istream-multiplex - Return error if the last packet wasn't fully read + + +M src/lib/istream-multiplex.c + +2017-12-22 15:07:28 +0200 Timo Sirainen (1082d0bd0) + + doveadm: Fix potential crash or reading garbage from doveadm-server + + The connection's input buffer may have been reallocated or otherwise moved + while checking for log input. + +M src/doveadm/server-connection.c + +2017-12-22 13:36:32 +0200 Timo Sirainen (5bb288821) + + doveadm: Don't connect to stats-writer for the "quick init" commands + + +M src/doveadm/doveadm.c + +2017-12-22 13:20:41 +0200 Timo Sirainen (1d8edec1f) + + lib-master: Add master_service_init_stats_client() + + This allows initializing the stats client after master_service_init() if + necessary. + +M src/lib-master/master-service-settings.c +M src/lib-master/master-service.c +M src/lib-master/master-service.h + +2017-12-22 13:27:48 +0200 Timo Sirainen (aa572aa74) + + lib-master: Hide connect(stats-writer) errors when running via CLI + + Only hide errors that occur if the stats process isn't running, i.e. when + socket isn't found or there's no listener. This way e.g. permission errors + are still logged, which points to a wrong configuration. + +M src/lib-master/master-service-settings.c +M src/lib-master/stats-client.c +M src/lib-master/stats-client.h + +2017-12-22 13:34:45 +0200 Aki Tuomi (7b1c74874) + + auth: Fix password and scheme handling in Lua db + + This was only partially fixed in c86575ac9776d0995355d03719c82e7ceac802e6 + +M src/auth/db-lua.c +M src/auth/passdb-lua.c + +2017-12-22 09:42:50 +0200 Timo Sirainen (c0e0c9769) + + imap-old-stats plugin: Finish renaming the plugin + + The init functions and dependency were named wrong, so it didn't work. + +M src/plugins/imap-old-stats/imap-stats-plugin.c +M src/plugins/imap-old-stats/imap-stats-plugin.h + +2017-12-22 09:37:53 +0200 Timo Sirainen (73c823e0c) + + m4: Fix detecting libsodium to use LIBS instead of LDFLAGS + + Patch by Eray Aslan + +M m4/want_sodium.m4 + +2017-12-22 09:36:48 +0200 Timo Sirainen (88a301536) + + m4: Avoid _FORTIFY_SOURCE redefinition warnings + + Some source based distros like Gentoo already enable -D_FORTIFY_SOURCE=2 by + default resulting in the following warnings during build: + + :0:0: warning: "_FORTIFY_SOURCE" redefined + : note: this is the location of the previous definition + + Patch by Eray Aslan + +M m4/cc_fortify.m4 + +2017-12-22 09:59:27 +0200 Timo Sirainen (20b273fb5) + + example-config: Fix postmaster_address comment + + The default value was wrong. + +M doc/example-config/conf.d/15-lda.conf + +2017-12-22 11:25:06 +0200 Timo Sirainen (8fe339187) + + doveadm-server: Fix potential hangs with SSL connections + + +M src/doveadm/client-connection-tcp.c + +2017-12-18 21:58:16 +0200 Timo Sirainen (23ff476d9) + + auth: Don't include LIBSODIUM_LIBS in dependencies + + Put it into AUTH_LIBS among other libraries that are used by auth. + +M m4/want_sodium.m4 +M src/auth/Makefile.am + +2017-12-21 23:09:13 +0100 Stephan Bosch (70b97d678) + + lib-smtp: server: STARTTLS command: Call + smtp_server_connection_set_ssl_streams() after calling the conn_start_tls() + connection callback. + + This is called instead smtp_server_connection_set_streams(), so that the + connection is now marked as SSL-secured. This fixes a submission-login bug + that prevented client login when ssl=required. + +M src/lib-smtp/smtp-server-cmd-starttls.c + +2017-12-21 23:07:10 +0100 Stephan Bosch (7237272b0) + + lib-smtp: server: Add smtp_server_connection_set_ssl_streams(). + + It wraps smtp_server_connection_set_streams() and additionally marks the + connection as SSL-secured. + +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server.h + +2017-12-21 23:00:18 +0100 Stephan Bosch (6438494e2) + + lib-smtp: server: Change conn_start_tls() connection callback to return a + success status. + + +M src/lib-smtp/smtp-server-cmd-starttls.c +M src/lib-smtp/smtp-server.h +M src/submission-login/client.c + +2017-12-19 00:29:03 +0200 Timo Sirainen (7923e2c54) + + man: Update version number to v2.3 + + +M doc/man/doveadm-acl.1.in +M doc/man/doveadm-altmove.1.in +M doc/man/doveadm-auth.1.in +M doc/man/doveadm-batch.1.in +M doc/man/doveadm-deduplicate.1.in +M doc/man/doveadm-director.1.in +M doc/man/doveadm-dump.1.in +M doc/man/doveadm-exec.1.in +M doc/man/doveadm-expunge.1.in +M doc/man/doveadm-fetch.1.in +M doc/man/doveadm-flags.1.in +M doc/man/doveadm-force-resync.1.in +M doc/man/doveadm-fs.1.in +M doc/man/doveadm-fts.1.in +M doc/man/doveadm-help.1.in +M doc/man/doveadm-import.1.in +M doc/man/doveadm-index.1.in +M doc/man/doveadm-instance.1.in +M doc/man/doveadm-kick.1.in +M doc/man/doveadm-log.1.in +M doc/man/doveadm-mailbox-cryptokey.1.in +M doc/man/doveadm-mailbox.1.in +M doc/man/doveadm-move.1.in +M doc/man/doveadm-penalty.1.in +M doc/man/doveadm-proxy.1.in +M doc/man/doveadm-purge.1.in +M doc/man/doveadm-pw.1.in +M doc/man/doveadm-quota.1.in +M doc/man/doveadm-replicator.1.in +M doc/man/doveadm-save.1.in +M doc/man/doveadm-search-query.7 +M doc/man/doveadm-search.1.in +M doc/man/doveadm-stats.1.in +M doc/man/doveadm-sync.1.in +M doc/man/doveadm-user.1.in +M doc/man/doveadm-who.1.in +M doc/man/doveadm.1.in +M doc/man/doveconf.1.in +M doc/man/dovecot-lda.1.in +M doc/man/dovecot.1.in + +2017-12-18 16:45:23 +0100 Stephan Bosch (28fede787) + + lib-smtp: server: Fixed assertion in smtp_server_connection_next_reply() + checking whether command is fully replied. + + It did not handle LMTP DATA/BDAT command correctly, for which there can be + multiple replies. + + This fixes mixing local/remote recipients in LMTP, which used to crash: + Panic: file smtp-server-connection.c: line 610 + (smtp_server_connection_next_reply): assertion failed: (cmd->state == + SMTP_SERVER_COMMAND_STATE_READY_TO_REPLY && + smtp_server_command_is_replied(cmd)) + +M src/lib-smtp/smtp-server-connection.c + +2017-12-18 19:28:10 +0100 Stephan Bosch (cfb605f89) + + lib-smtp: server: Fix compile error in smtp-server-cmd-helo.c. + + Error was: + "smtp-server-cmd-helo.c", line 140: void function cannot return value + +M src/lib-smtp/smtp-server-cmd-helo.c + +2017-12-18 15:20:07 +0100 Stephan Bosch (97fad7a94) + + lib-smtp: command parser: Fix error recovery. + + Input characters were not skipped upon error, meaning that error recovery + would encounter these again. This would make the parser parse the same data + over and over again, yielding the same error. This in turn caused the SMTP + server application to hang in an infinite input loop, submitting error + replies in the process, thereby filling up the process memory until + exhaustion. Problem seen in submission service, but LMTP is also affected. + +M src/lib-smtp/smtp-command-parser.c + +2017-12-18 14:08:16 +0200 Timo Sirainen (a72c75064) + + lib-smtp: server: Fix panic when disconnecting client aborting commands + + This happened at least if the relay server simply disconnected without + sending any output. + + Fixes: Panic: file submission-commands.c: line 39: unreached + +M src/submission/submission-commands.c + +2017-12-18 14:04:48 +0200 Timo Sirainen (aa7058315) + + lib-smtp: smtp_server_connection_pending_command_data() - don't crash if + smtp_parser is NULL + + +M src/lib-smtp/smtp-server-connection.c + +2017-12-18 13:16:09 +0100 Stephan Bosch (b1e79edd1) + + doc: example-config: Properly document SSL configuration for submission + relay server. + + +M doc/example-config/conf.d/20-submission.conf + +2017-12-18 12:08:43 +0200 Timo Sirainen (c9d1ad790) + + submission: Fix memory leaks at deinit when submission_relay_host setting is + missing + + +M src/submission/main.c + +2017-12-18 12:06:43 +0200 Timo Sirainen (f8d6f8d9c) + + lib-smtp: server: Fix panic when io_remove() is called too late + + With submission-login the conn_disconnect() callback ends up in + login-common's client_disconnect(), which closes the file descriptor. The + io_remove() was done afterwards, which caused a crash: + + submission-login: Panic: epoll_ctl(del, 18) failed: Bad file descriptor + +M src/lib-smtp/smtp-server-connection.c + +2017-12-18 12:05:59 +0200 Timo Sirainen (2814b4731) + + lib-smtp: server: Fix infinite loop when client disconnects in initial state + + +M src/lib-smtp/smtp-command-parser.c +M src/lib-smtp/smtp-command-parser.h +M src/lib-smtp/test-smtp-command-parser.c + +2017-12-18 12:48:07 +0200 Timo Sirainen (9b375f535) + + old-stats plugin: Rename stats_* settings to old_stats_* + + +M src/plugins/old-stats/stats-plugin.c + +2017-12-18 12:47:47 +0200 Timo Sirainen (de6d2161a) + + auth: Install stats plugin to old-stats/ + + Fixes using auth_stats=yes + +M src/auth/Makefile.am + +2017-12-17 20:41:52 +0200 Timo Sirainen (52e8bf347) + + lib: Fix using appended log prefixes for events when full prefix isn't + replaced + + +M src/lib/event-log.c + +2017-12-17 20:39:39 +0200 Timo Sirainen (1a5b03701) + + lib: Fix using failure_context.log_prefix with internal log process + communication + + +M src/lib/failures.c + +2017-12-17 20:38:38 +0200 Timo Sirainen (bf882696e) + + log: Add "disable log prefix" flag to log lines + + +M src/lib/failures.c +M src/lib/failures.h +M src/log/log-connection.c + +2017-12-17 20:35:58 +0200 Timo Sirainen (c2c58ed42) + + lib: Add event_send() + + +M src/lib/lib-event-private.h +M src/lib/lib-event.c + +2017-12-17 20:35:42 +0200 Timo Sirainen (642f2bbc5) + + lib: Rename event_send() to event_vsend() + + +M src/lib/event-log.c +M src/lib/lib-event-private.h +M src/lib/lib-event.c + +2017-12-15 23:28:58 +0100 Stephan Bosch (4e29b62d6) + + lmtp: local: Properly handle a user being over quota. + + Recent changes caused quota enforcement to be ineffective. + +M src/lmtp/lmtp-local.c + +2017-12-15 21:31:44 +0100 Stephan Bosch (8d7c24743) + + lmtp: local: Make sure pending recipient is always destroyed. + + Before, the recipient was not freed when the server/connection ended + prematurely. + +M src/lmtp/lmtp-local.c + +2017-12-14 23:00:00 +0200 Timo Sirainen (c9f90d9eb) + + login-proxy: Add back support for ssl_client_cert/key + + Forgot to add these while rewriting login-proxy to use lib-ssl-iostream. + +M src/login-common/login-proxy.c + +2017-12-14 22:59:30 +0200 Timo Sirainen (024ca279d) + + lib-ssl-iostream: If allow_invalid_cert=TRUE, skip verifying hostname + + +M src/lib-ssl-iostream/iostream-openssl.c + +2017-12-15 14:42:54 +0200 Timo Sirainen (552d37ca8) + + lib-master: Fix master_service_ssl_settings_to_iostream_set() for client + settings + + ssl_verify_client_cert setting applies only to server side. For client side + we always verify the SSL certificate validity. + +M src/lib-master/master-service-ssl-settings.c + +2017-12-15 14:11:37 +0200 Timo Sirainen (88dac1aac) + + lib-http: Add http_client_init_private() + + This allows creating a HTTP client without a shared context, in case it's + needed for some reason. + +M src/lib-http/http-client.c +M src/lib-http/http-client.h + +2017-12-15 14:10:43 +0200 Timo Sirainen (00ef90726) + + lib-http: Change http_client_init() to use the global shared client context + + This is most likely what is usually wanted. + +M src/lib-http/http-client.c +M src/lib-http/http-client.h + +2017-12-15 14:08:20 +0200 Timo Sirainen (a9f37034e) + + lib-http: Add http_client_get_global_context() + + +M src/lib-http/http-client.c +M src/lib-http/http-client.h + +2017-12-14 21:49:08 +0200 Timo Sirainen (993b1b96f) + + fts: Code cleanup + + +M src/plugins/fts/fts-build-mail.c + +2017-12-14 21:42:45 +0200 Timo Sirainen (3813ebcae) + + fts: Don't try to retry parsing if indexing already fails + + +M src/plugins/fts/fts-build-mail.c + +2017-12-14 21:39:08 +0200 Timo Sirainen (d7c139d9a) + + fts: Use consistent naming for retriable_err_msg + + It's only for retriable errors, not errors in general + +M src/plugins/fts/fts-build-mail.c + +2017-12-14 21:34:31 +0200 Timo Sirainen (d8ebe885f) + + fts: Make sure may_need_retry is reset between attempts. + + It wasn't if the second attempt failed early. + +M src/plugins/fts/fts-build-mail.c + +2017-12-14 21:26:28 +0200 Timo Sirainen (f4c18fa75) + + fts: Add assert to make sure fts_parser.deinit() returns retriable_error_msg + when needed + + +M src/plugins/fts/fts-parser.c + +2017-12-14 21:25:54 +0200 Timo Sirainen (fc2b89b11) + + fts: fts-parser-tika - Add assert to make sure retriable_error_msg is set + + +M src/plugins/fts/fts-parser-tika.c + +2017-12-14 21:25:14 +0200 Timo Sirainen (cbe118de8) + + fts: fts-parser-script - Fix deinit return value + + +M src/plugins/fts/fts-parser-script.c + +2017-12-14 21:23:30 +0200 Timo Sirainen (07bfc948f) + + fts: fts-parser-html - Fix deinit return value + + +M src/plugins/fts/fts-parser-html.c + +2017-12-14 21:53:14 +0200 Timo Sirainen (76f255362) + + fts: fts_parser_deinit() - Fix default return value + + +M src/plugins/fts/fts-parser.c + +2017-12-14 21:24:10 +0200 Timo Sirainen (8c93c82c9) + + fts: Add comment to fts_parser_deinit() describing its API + + +M src/plugins/fts/fts-parser.h + +2017-12-14 10:31:26 +0200 Timo Sirainen (ec61c407c) + + lib: Fix static analyzer warning about uninitialized va_list + + +M src/lib/lib-event.c + +2017-12-14 12:01:33 +0200 Timo Sirainen (3b4d14637) + + lib-storage: Delay error handing for invalid postmaster_address setting + + +M src/lib-lda/mail-send.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2017-12-14 20:56:36 +0200 Timo Sirainen (117ae1417) + + cassandra: Fix crash when using prepared statements + + Broken by cae3c6903c10682429f9849ab1a25093e3f538e4 + +M src/lib-sql/driver-cassandra.c + +2017-12-14 23:10:22 +0200 Timo Sirainen (a074b1e40) + + *-login: Avoid unnecessary "OK Waiting for authentication process to + respond" + + These happened with SSL connections when the process was starting up. The + ssl-istream was triggering the IO callback, which was thinking that the + client was sending a command. If this happened early on before auth process + connection was finished, this caused several unnecessary notifications to + the client. + +M src/login-common/client-common.c + +2017-12-14 23:23:13 +0200 Timo Sirainen (99a6ea3fc) + + global: Finish fixing oldstats plugin/service rename + + +M src/old-stats/stats-settings.c +M src/plugins/old-stats/mail-stats.c +M src/plugins/old-stats/stats-plugin.h + +2017-12-14 21:50:58 +0100 Stephan Bosch (3c8a16354) + + lib-http: client: Check whether client is running in a wait loop with the + correct condition. + + This used to check client->ioloop != NULL, but now it should check + client->waiting. Previous commit (e8a1b62fe4a81b211dcccd1a58b44f254074eab6) + omitted a few instances where this should have been changed. + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c + +2017-12-14 10:46:39 +0100 Stephan Bosch (21bc26166) + + lda: Do not replace the NULL sender with a default address. + + Only do this substitution locally where a NULL sender would cause problems, + not everywhere else. This e.g. causes problems when determining whether to + send a rejection somewhere; attempts would be made to mail . + Also other envelope-based (Sieve) tests would get confused. + +M src/lda/main.c + +2017-12-14 10:42:07 +0100 Stephan Bosch (a1f1ff107) + + lib-lda: Properly check whether MAIL FROM is the NULL sender <>. + + There's a function for that, since comparison with NULL pointer is not + sufficient. + +M src/lib-lda/mail-deliver.c + +2017-12-13 20:53:09 +0200 Timo Sirainen (e36634029) + + lib-master: stats-client - Fix reconnection if handshake wait fails + + Fixes: Warning: Timeout leak: 0x5555556ac8d0 (stats-client.c:132) + +M src/lib-master/stats-client.c + +2017-12-14 13:02:10 +0100 Stephan Bosch (a46221f25) + + submission-login: Fix another NULL dereference occurring at an invalid reply + from the backend server. + + The text variable was still being used when it could be NULL. Made the + offending code dependent on the reply validity check. + + Problem found by Coverity. + +M src/submission-login/submission-proxy.c + +2017-12-14 14:13:11 +0200 Timo Sirainen (7a8063142) + + oldstats plugin: Fix init/deinit function names + + +M src/plugins/old-stats/stats-plugin.c + +2017-12-14 02:11:28 +0200 Timo Sirainen (75aaa1aba) + + lib-storage: mailbox_list_index - Don't overwrite INBOX's flags with + prefix/INBOX's + + This made the real INBOX appear as if it was \NoSelect + +M src/lib-storage/list/mailbox-list-index-sync.c + +2017-12-14 02:10:27 +0200 Timo Sirainen (6081f6a51) + + lib-storage: mailbox_list_index - indentation cleanup + + +M src/lib-storage/list/mailbox-list-index-sync.c + +2017-12-14 01:39:32 +0200 Timo Sirainen (65492363f) + + lib-storage: mailbox_list_index - List prefix/INBOX if it necessary + + +M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib-storage/list/mailbox-list-index.h + +2017-12-14 01:36:50 +0200 Timo Sirainen (874dc8408) + + LAYOUT=fs: Fix listing prefix/INBOX + + Removed some confusing special case code that didn't seem to work very well. + Implemented this now properly so that prefix/INBOX is listed as \NoSelect + mailbox whenever it has children. + + It's not actually possible to differentiate between INBOX and prefix/INBOX + in the storage for a inbox=yes namespace, because they both are converted + into the same storage_name=INBOX. + +M src/lib-storage/list/mailbox-list-fs-iter.c + +2017-12-14 01:34:25 +0200 Timo Sirainen (141aa0e60) + + LAYOUT=fs: List INBOX as \NoInferiors when necessary + + +M src/lib-storage/list/mailbox-list-fs-iter.c + +2017-12-14 01:31:10 +0200 Timo Sirainen (f7dd04ec9) + + LAYOUT=index: List INBOX as \NoInferiors when necessary + + +M src/lib-storage/list/mailbox-list-index-iter.c + +2017-12-14 01:23:45 +0200 Timo Sirainen (38e602683) + + LAYOUT=Maildir++: List INBOX as \NoInferiors when necessary + + +M src/lib-storage/list/mailbox-list-maildir-iter.c + +2017-12-14 01:23:01 +0200 Timo Sirainen (9a2149ccc) + + lib-storage: Add mail_namespace_is_inbox_noinferiors() + + +M src/lib-storage/mail-namespace.h + +2017-12-08 16:14:11 +0200 Timo Sirainen (50ba09cd2) + + imapc: Don't skip listing "INBOX" when INBOX/ namespace prefix is used. + + The INBOX was still listed as part of the autocreated mailboxes, unless + MAILBOX_LIST_ITER_NO_AUTO_BOXES was used. + +M src/lib-storage/index/imapc/imapc-list.c + +2017-12-13 19:11:02 +0200 Timo Sirainen (673ee24d1) + + lib: mempool-allocfree - make static analyzer happier with pool clearing + + It was thinking that already freed memory was being accessed. + +M src/lib/mempool-allocfree.c + +2017-12-13 20:55:59 +0200 Timo Sirainen (11d4b189a) + + dbox: Fix creating dbox-alt-root symlink when mail root directory doesn't + exist + + Broken by 74664ac6dcf88cfc2ae6378c87c20ba694385a23 + +M src/lib-storage/index/dbox-common/dbox-storage.c + +2017-12-13 21:52:41 +0100 Stephan Bosch (af7956fbd) + + lib-http: client: peer: Properly handle claiming an existing connection. + + If no other connections were being created, request handling was not + restarted. This problem sometimes caused the client to hang. Fixed by + calling http_client_peer_connection_success() upon claiming an existing + connection. + +M src/lib-http/http-client-peer.c + +2017-12-13 18:16:07 +0100 Stephan Bosch (20138b8f1) + + lib-http: test-http-payload: Terminate the test if it is hanging for some + reason. + + +M src/lib-http/test-http-payload.c + +2017-12-13 17:27:10 +0100 Stephan Bosch (b7f1ebf92) + + lib-http: test-http-payload: Amend shared client tests to do both download + and echo tests. + + Also, the original download tests were named wrong. + +M src/lib-http/test-http-payload.c + +2017-12-13 17:29:09 +0100 Stephan Bosch (c9f7a211d) + + lib-http: test-http-payload: Fixed indent problems. + + +M src/lib-http/test-http-payload.c + +2017-12-13 14:44:01 +0200 Timo Sirainen (f46a703b2) + + doveadm stats dump: Add -r parameter to reset stats after dumping + + +M src/doveadm/doveadm-stats.c + +2017-12-13 14:43:43 +0200 Timo Sirainen (9c675f5e2) + + stats: Add DUMP-RESET command to reset stats after dumping them + + +M src/stats/client-reader.c +M src/stats/stats-metrics.c +M src/stats/stats-metrics.h + +2017-12-12 21:38:46 +0200 Timo Sirainen (74664ac6d) + + lib-storage: Delay creating mail root directory until it's necessary + + +M src/lib-storage/mail-storage.c + +2017-12-12 21:36:07 +0200 Timo Sirainen (d95773f27) + + lib-storage: Make sure index root is created when it's the same as root + directory + + This is required by the following commit. + +M src/lib-storage/mailbox-list.c + +2017-08-09 20:06:00 +0200 Stephan Bosch (e8a1b62fe) + + lib-http: client: Made http_client record the current ioloop it is switched + to. + + This prevents http_client_wait() from switching the client to an ioloop it + was never explicitly switched to. + +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c +M src/lib-http/http-client.h + +2017-12-13 14:19:41 +0200 Timo Sirainen (481992bfe) + + imap: Fix o_stream_is_corked() assert check + + All the callers cork the stream, so this can only mean that the corking + failed because the connection was already closed. Continue handling the + input anyway. + + Fixes: Panic: file imap-client.c: line 1236 (client_handle_input): assertion + failed: (o_stream_is_corked(client->output)) + +M src/imap/imap-client.c + +2017-12-13 15:48:17 +0200 Timo Sirainen (a8200366c) + + LAYOUT=index: Fix crash in doveadm force-resync if storage doesn't implement + list_index_rebuild() + + Broken by recent changes. + +M src/lib-storage/list/mailbox-list-index-backend.c + +2017-12-12 18:10:40 +0200 Timo Sirainen (f54470684) + + LAYOUT=index: Fix updating STATUS changes in mailbox list index + + Mailbox list index backend code was overriding sync_init and sync_deinit + methods, which STATUS handling had already already overridden. They both + used the same super struct, so STATUS's sync_* were never called. + +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index-storage.h +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h + +2017-12-13 15:54:40 +0200 Timo Sirainen (583c5314e) + + lib-master: Fix logging "Expected FILTER" error + + +M src/lib-master/stats-client.c + +2017-12-13 15:54:11 +0200 Timo Sirainen (db2d8dff7) + + stats: Fix logging unknown client command error + + +M src/stats/client-writer.c + +2017-12-13 14:37:59 +0200 Martti Rannanjärvi (0e8ff50d2) + + .gitignore: Ignore src/old-stats/old-stats + + +M .gitignore + +2017-12-04 23:39:41 +0200 Timo Sirainen (324f41beb) + + lib-http: Add named event: http_request_finished + + +M src/lib-http/http-client-request.c + +2017-12-04 21:56:29 +0200 Timo Sirainen (285f3c4cf) + + doveadm: Add new "stats dump" command + + +M src/doveadm/Makefile.am +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-cmd.h +A src/doveadm/doveadm-stats.c + +2017-12-04 21:23:44 +0200 Timo Sirainen (838d6a475) + + global: Enable MASTER_SERVICE_FLAG_SEND_STATS for mail processes + + +M src/doveadm/doveadm.c +M src/doveadm/main.c +M src/imap/main.c +M src/indexer/indexer-worker.c +M src/lmtp/main.c +M src/pop3/main.c + +2017-12-04 20:39:05 +0200 Timo Sirainen (15dd18994) + + lib: connection - When receiving invalid VERSION line, log the line contents + + +M src/lib/connection.c + +2017-12-04 20:33:58 +0200 Timo Sirainen (2fb27941f) + + log: Fix restoring global log prefix + + It was allocated from data stack, which was freed by + master_service_init_finish(). This may have caused wrong prefix to be used + for log's internal error messages, or restoring the global log prefix could + have crashed: + + Panic: file strfuncs.c: line 147 (t_noalloc_strdup_vprintf): assertion + failed: ((unsigned int)ret == *size_r-1) + +M src/log/log-connection.h +M src/log/main.c + +2017-12-08 00:15:40 +0200 Timo Sirainen (36409af77) + + lib-http: client: Replace http_*_debug() with e_debug() + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c + +2017-12-04 12:58:47 +0200 Timo Sirainen (39018a601) + + lib-http: client: Remove redundant debug logging checks + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c + +2017-12-04 12:35:46 +0200 Timo Sirainen (2d1ad5742) + + lib-http: client: Add support for event API + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c +M src/lib-http/http-client.h + +2017-12-04 12:27:00 +0200 Timo Sirainen (a79ae29fa) + + lib-http: Cleanup - Add name parameter to http_client_host_create() + + +M src/lib-http/http-client-host.c + +2017-12-03 19:31:20 +0200 Timo Sirainen (b254b8ec1) + + lib-fs: Replace i_error() calls with e_error() + + +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-sis-common.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c + +2017-12-03 19:26:11 +0200 Timo Sirainen (fc59aba4b) + + lib-fs: Add fs_file/iter_init_with_event() + + Use the event for logging critical errors + +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-sis-common.c + +2017-12-04 15:06:36 +0200 Timo Sirainen (6d1218e68) + + lib-fs: Add fs_file/iter_init_parent() + + +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-wrapper.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/fs-crypt-common.c + +2017-12-04 14:55:01 +0200 Timo Sirainen (4110f968c) + + lib-fs: Set fs_iter.flags immediately in fs_iter_init() + + This way backends don't need to set it. + +M src/lib-fs/fs-api.c +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-test.c +M src/lib-fs/fs-wrapper.c + +2017-12-04 14:53:37 +0200 Timo Sirainen (4d71d712b) + + lib-fs: Split allocation from fs.iter_init() to a separate fs.iter_alloc() + + +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test.c +M src/lib-fs/fs-wrapper.c +M src/lib-fs/fs-wrapper.h +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/fs-crypt.c +M src/plugins/mail-crypt/fs-mail-crypt.c + +2017-12-04 14:43:53 +0200 Timo Sirainen (86ad48a2e) + + lib-fs: Split allocation from fs.file_init() to a separate fs.file_alloc() + + +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-crypt/fs-crypt.c +M src/plugins/mail-crypt/fs-mail-crypt.c + +2017-11-23 17:46:23 +0100 Timo Sirainen (b63e20ea9) + + lib-master: Add stats-client + + Enable it if MASTER_SERVICE_FLAG_SEND_STATS is set + +M src/lib-master/Makefile.am +M src/lib-master/master-service-private.h +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-settings.h +M src/lib-master/master-service.c +M src/lib-master/master-service.h +A src/lib-master/stats-client.c +A src/lib-master/stats-client.h +M src/lib/lib-event-private.h + +2017-11-22 17:36:09 +0100 Timo Sirainen (e9068f1c3) + + stats: Add new stats service + + +M configure.ac +M src/Makefile.am +A src/stats/Makefile.am +A src/stats/client-reader.c +A src/stats/client-reader.h +A src/stats/client-writer.c +A src/stats/client-writer.h +A src/stats/main.c +A src/stats/stats-event-category.c +A src/stats/stats-event-category.h +A src/stats/stats-metrics.c +A src/stats/stats-metrics.h +A src/stats/stats-settings.c +A src/stats/stats-settings.h + +2017-11-21 18:22:38 +0100 Timo Sirainen (9c9d84213) + + imap: Add imap_command_finished event. + + This can be used to get per-command statistics. + +M src/imap/imap-client.c + +2017-11-21 16:05:30 +0100 Timo Sirainen (1c02804cd) + + imap: Add client_command_context.event and use it as global event while + running + + +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-commands.c +M src/imap/imap-notify.c +M src/imap/imap-state.c + +2017-11-21 15:33:59 +0100 Timo Sirainen (fcad7b5f8) + + imap: Add client.event and use it as mail_*user's parent event + + +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-common.h +M src/imap/main.c + +2017-11-21 13:13:49 +0100 Timo Sirainen (ceac664d4) + + lib-index: mail_index_set_error() - log error using index's event + + +M src/lib-index/mail-index.c + +2017-11-21 13:13:40 +0100 Timo Sirainen (82d158d37) + + lib-index: Add mail_index.event + + +M src/doveadm/doveadm-dump-index.c +M src/lib-index/mail-index-alloc-cache.c +M src/lib-index/mail-index-alloc-cache.h +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h +M src/lib-index/test-mail-index-modseq.c +M src/lib-index/test-mail-transaction-log-file.c +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/index-rebuild.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/mail-storage.c +M src/lib-storage/test-mail-search-args-simplify.c + +2017-11-21 13:03:03 +0100 Timo Sirainen (6610dc505) + + lib-storage: mail_storage_set_critical() - log error using user's event + + Fix test-storage unit test to also initialize mail_user.event so it won't + crash. + +M src/lib-storage/mail-storage.c +M src/lib-storage/test-mail-storage.c + +2017-11-21 12:59:40 +0100 Timo Sirainen (c499c40ca) + + lib-storage: Add mail.event + + +M src/lib-storage/index/index-mail.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-11-21 12:51:10 +0100 Timo Sirainen (b644a77b0) + + lib-storage: Add mailbox.event + + +M src/lib-storage/index/index-storage.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-11-20 19:33:40 +0100 Timo Sirainen (677cc0d62) + + lib-storage: Add mail_user.event and give parent event in mail_user_alloc*() + + +M src/lib-storage/index/raw/raw-storage.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h + +2017-11-20 17:26:42 +0100 Timo Sirainen (d2729522f) + + lib-storage: Add mail_storage_service_user.event and use it as the global + event + + The event is set in the same place as where the user's default logging + prefix is changed. + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h + +2017-11-22 15:41:51 +0100 Timo Sirainen (1fd856f11) + + lib-master: Add log_debug setting + + lib-master understands only the global log_debug setting, which is passed to + it via environment from master process, or alternatively via doveconf when + executing standalone programs. Any per-user log_debug settings need to be + handled explicitly elsewhere. + +M src/lib-master/master-interface.h +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-settings.h +M src/lib-master/master-service.c +M src/master/service-process.c + +2017-11-22 14:51:47 +0100 Timo Sirainen (c6ab22366) + + lib: Add event filtering to debug logging + + +M src/lib/event-log.c +M src/lib/event-log.h +M src/lib/lib-event-private.h +M src/lib/lib-event.c + +2017-11-22 13:55:51 +0100 Timo Sirainen (918384d45) + + lib: Add event filter + + This currently supports matching events by: + + * name + * source file:line + * categories + * key=value fields + +M src/lib/Makefile.am +A src/lib/event-filter.c +A src/lib/event-filter.h +M src/lib/lib-event.c +M src/lib/lib.c + +2017-12-04 21:20:49 +0200 Timo Sirainen (53ea4ad7b) + + lib: Add event_import() and event_export() + + +M src/lib/lib-event-private.h +M src/lib/lib-event.c + +2017-10-23 11:18:59 +0300 Timo Sirainen (b8a1347a9) + + lib: Add event API + + The events are hierarchical and the child events inherit the parents' + fields. The events will be attached to "objects", which gives them some + context. For example each mail user, mailbox and mail will have its own + event. The events can also have a log prefix, so logging events to e.g. mail + will always log a consistent prefix that identifies which mail is being + logged about. + + The events will also be used for statistics. Typically this is done by + logging a debug event, which contains fields that are interesting for + statistics. The interesting events will have a name, which can be used to + identify them when configuring which statistics are wanted to be tracked. + It's possible to also track events that have no name, but that requires + using the source code's filename:line as the event name. That of course may + change between releases, so it's not very reliable. + +M src/lib/Makefile.am +A src/lib/event-log.c +A src/lib/event-log.h +A src/lib/lib-event-private.h +A src/lib/lib-event.c +A src/lib/lib-event.h +M src/lib/lib.c +M src/lib/lib.h + +2017-11-17 12:37:15 +0200 Timo Sirainen (982c30abd) + + lib: Add failure_context.log_prefix to override the default + + +M src/lib/failures.c +M src/lib/failures.h + +2017-11-13 16:08:15 +0200 Timo Sirainen (8009758e9) + + lib: Add i_log_typev() + + +M src/lib/failures.c +M src/lib/failures.h + +2017-12-12 01:04:29 +0200 Timo Sirainen (4b51ecbac) + + lib: ioloop.h - improve ioloop context comments + + +M src/lib/ioloop.h + +2017-12-12 01:20:52 +0200 Timo Sirainen (c4995cea8) + + lib-storage: Remove mail_storage_service_io_deactivate() + + We now require that ioloop context is always properly deactivated, so + there's no need for the function. + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h + +2017-12-12 01:19:04 +0200 Timo Sirainen (64c7bca60) + + imap, pop3: Remove unnecessary call to mail_storage_service_io_deactivate() + + The context is automatically deactivated when service user is freed. + +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/main.c +M src/pop3/main.c +M src/pop3/pop3-client.c +M src/pop3/pop3-client.h + +2017-12-12 01:17:22 +0200 Timo Sirainen (cafe72dae) + + lib-storage: mail_storage_service_io_[de]activate_user() - [de]activate the + whole ioloop context + + +M src/lib-storage/mail-storage-service.c + +2017-12-12 01:33:08 +0200 Timo Sirainen (b758c6027) + + lib-storage: mail_storage_service_user_unref() - deactivate user before + removing callbacks + + Otherwise the next commit won't work correctly. + +M src/lib-storage/mail-storage-service.c + +2017-12-12 01:12:43 +0200 Timo Sirainen (0f8663fcd) + + lib-storage: Create ioloop context regardless of logging settings + + This will be needed by the following commits. + +M src/lib-storage/mail-storage-service.c + +2017-12-12 01:04:06 +0200 Timo Sirainen (391fa1126) + + lib: io_loop_context_deactivate() - Assert that given context is currently + active + + +M src/lib/ioloop.c + +2017-12-12 01:02:27 +0200 Timo Sirainen (76da9d599) + + lib: io_loop_context_new() - deactivate old context + + Since it changes the current context, it needs to deactivate the old one. + +M src/lib/ioloop.c + +2017-12-12 01:01:33 +0200 Timo Sirainen (1da9355e6) + + lib: io_loop_destroy() - Assert-crash if ioloop contet is still set + + It may be too late to try to deactivate it at that point, so it points to a + bug. + +M src/lib/ioloop.c + +2017-12-12 00:50:36 +0200 Timo Sirainen (7446aaf9c) + + lib: Move io_loop_context_[de]activate() to be public + + +M src/lib/ioloop-private.h +M src/lib/ioloop.h + +2017-12-08 00:54:51 +0200 Timo Sirainen (92fc2c856) + + lib: timing - Allow changing sample buffer size + + +M src/lib/timing.c +M src/lib/timing.h + +2017-11-21 14:46:30 +0100 Timo Sirainen (6ef83bcdc) + + global: Renamed stats plugin and service to old-stats + + +M configure.ac +M src/Makefile.am +M src/auth/Makefile.am +M src/auth/auth-request-stats.c +M src/doveadm/Makefile.am +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-cmd.h +R096 src/doveadm/doveadm-stats.c src/doveadm/doveadm-oldstats.c +M src/doveadm/doveadm.c +R079 src/lib-stats/Makefile.am src/lib-old-stats/Makefile.am +R100 src/lib-stats/stats-connection.c src/lib-old-stats/stats-connection.c +R100 src/lib-stats/stats-connection.h src/lib-old-stats/stats-connection.h +R100 src/lib-stats/stats-parser.c src/lib-old-stats/stats-parser.c +R100 src/lib-stats/stats-parser.h src/lib-old-stats/stats-parser.h +R100 src/lib-stats/stats.c src/lib-old-stats/stats.c +R100 src/lib-stats/stats.h src/lib-old-stats/stats.h +R071 src/stats/Makefile.am src/old-stats/Makefile.am +R100 src/stats/client-export.c src/old-stats/client-export.c +R100 src/stats/client-export.h src/old-stats/client-export.h +R100 src/stats/client-reset.c src/old-stats/client-reset.c +R100 src/stats/client-reset.h src/old-stats/client-reset.h +R100 src/stats/client.c src/old-stats/client.c +R100 src/stats/client.h src/old-stats/client.h +R100 src/stats/fifo-input-connection.c src/old-stats/fifo-input-connection.c +R100 src/stats/fifo-input-connection.h src/old-stats/fifo-input-connection.h +R100 src/stats/global-memory.c src/old-stats/global-memory.c +R100 src/stats/global-memory.h src/old-stats/global-memory.h +R100 src/stats/mail-command.c src/old-stats/mail-command.c +R100 src/stats/mail-command.h src/old-stats/mail-command.h +R100 src/stats/mail-domain.c src/old-stats/mail-domain.c +R100 src/stats/mail-domain.h src/old-stats/mail-domain.h +R100 src/stats/mail-ip.c src/old-stats/mail-ip.c +R100 src/stats/mail-ip.h src/old-stats/mail-ip.h +R100 src/stats/mail-session.c src/old-stats/mail-session.c +R100 src/stats/mail-session.h src/old-stats/mail-session.h +R100 src/stats/mail-stats.c src/old-stats/mail-stats.c +R100 src/stats/mail-stats.h src/old-stats/mail-stats.h +R100 src/stats/mail-user.c src/old-stats/mail-user.c +R100 src/stats/mail-user.h src/old-stats/mail-user.h +R098 src/stats/main.c src/old-stats/main.c +R100 src/stats/stats-carbon.c src/old-stats/stats-carbon.c +R100 src/stats/stats-carbon.h src/old-stats/stats-carbon.h +R050 src/stats/stats-settings.c src/old-stats/stats-settings.c +R067 src/stats/stats-settings.h src/old-stats/stats-settings.h +M src/plugins/Makefile.am +R055 src/plugins/imap-stats/Makefile.am src/plugins/imap-old-stats/Makefile.am +R100 src/plugins/imap-stats/imap-stats-plugin.c src/plugins/imap-old-stats/imap-stats-plugin.c +R100 src/plugins/imap-stats/imap-stats-plugin.h src/plugins/imap-old-stats/imap-stats-plugin.h +A src/plugins/old-stats/Makefile.am +R100 src/plugins/stats/mail-stats-connection.c src/plugins/old-stats/mail-stats-connection.c +R100 src/plugins/stats/mail-stats-connection.h src/plugins/old-stats/mail-stats-connection.h +R100 src/plugins/stats/mail-stats-fill.c src/plugins/old-stats/mail-stats-fill.c +R100 src/plugins/stats/mail-stats.c src/plugins/old-stats/mail-stats.c +R100 src/plugins/stats/mail-stats.h src/plugins/old-stats/mail-stats.h +R099 src/plugins/stats/stats-plugin.c src/plugins/old-stats/stats-plugin.c +R100 src/plugins/stats/stats-plugin.h src/plugins/old-stats/stats-plugin.h +D src/plugins/stats/Makefile.am + +2017-12-12 12:41:29 -0500 Josef 'Jeff' Sipek (0cce67356) + + submission: remove unnecessary casts + + Casting from a void * to any pointer type is automatic and doesn't require + an explicit cast. + +M src/submission/cmd-data.c +M src/submission/cmd-helo.c +M src/submission/cmd-mail.c +M src/submission/cmd-noop.c +M src/submission/cmd-quit.c +M src/submission/cmd-rcpt.c +M src/submission/cmd-rset.c +M src/submission/cmd-vrfy.c +M src/submission/submission-client.c + +2017-12-12 11:55:15 -0500 Josef 'Jeff' Sipek (c4588e66e) + + submission-login: use container_of instead of casts + + +M src/submission-login/client-authenticate.c +M src/submission-login/client.c +M src/submission-login/submission-proxy.c + +2017-12-12 11:26:21 -0500 Josef 'Jeff' Sipek (0afd9a9ac) + + submission-login: remove unnecessary casts + + Casting from a void * to any pointer type is automatic and doesn't require + an explicit cast. + +M src/submission-login/client-authenticate.c +M src/submission-login/client.c +M src/submission-login/submission-proxy.c + +2017-12-12 11:18:10 -0500 Josef 'Jeff' Sipek (c5e46dba1) + + global: drop unnecessary parens in &(foo) + + This makes the code more consistent since most of the repo uses the + no-parens style. These inconsistencies were found using + `git grep '(&([^*]'` and any use of the parens in macros was ignored for + safety reasons. + +M src/auth/auth-policy.c +M src/doveadm/doveadm-cmd.c +M src/lib-dcrypt/dcrypt-gnutls.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/ostream-encrypt.c +M src/lib-dict-backend/dict-ldap.c +M src/lib-ldap/ldap-connection.c +M src/lib-ldap/ldap-entry.c +M src/lib-ldap/ldap-iterator.c +M src/lib-ldap/ldap-search.c + +2017-12-12 11:10:15 -0500 Josef 'Jeff' Sipek (4afd5b656) + + global: io_remove*(NULL) is a no-op + + +M src/lib-ldap/ldap-connection.c +M src/lib-master/master-service.c + +2017-11-27 14:11:40 -0500 Josef 'Jeff' Sipek (d90a92448) + + global: timeout_remove(NULL) is a no-op + + +M src/dict/dict-connection.c +M src/director/user-directory.c +M src/imap/imap-notify.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-queue.c +M src/lib-imap-client/imapc-connection.c +M src/lib-ldap/ldap-connection.c +M src/lib-master/anvil-client.c +M src/lib-master/master-service.c +M src/lib-sql/driver-pgsql.c +M src/plugins/fts-lucene/lucene-wrapper.cc + +2017-12-13 10:50:38 +0200 Aki Tuomi (47758f933) + + m4: Fix sodium checks + + Make sure it actually has password checking function + +M m4/want_sodium.m4 + +2017-12-12 21:53:42 +0100 Stephan Bosch (82bddf836) + + submission-login: Added default listener for secure submission on port 465 + (submissions). + + This is analogous to pop3s and imaps. Efforts to standardize the use of this + port are almost finished: + https://datatracker.ietf.org/doc/draft-ietf-uta-email-deep/ + +M src/submission-login/submission-login-settings.c + +2017-12-12 21:46:53 +0100 Stephan Bosch (4a1af46c8) + + submission-login: Fix NULL dereference occurring at an invalid reply from + the backend server. + + Problem found by Coverity. + +M src/submission-login/submission-proxy.c + +2017-12-12 12:18:06 -0500 Josef 'Jeff' Sipek (836ed7eb3) + + lib-smtp: fix uoff_t vs. size_t confusion + + +M src/lib-smtp/smtp-client-command.c +M src/lib-smtp/smtp-server-cmd-data.c +M src/lib-smtp/test-smtp-payload.c + +2017-12-12 16:07:52 +0200 Sergey Kitov (e7e3f4055) + + plugins/fts: Return back comment about Server Error. + + +M src/plugins/fts/fts-parser-tika.c + +2017-12-12 16:06:14 +0200 Sergey Kitov (71b43772a) + + plugins/fts: Retry all 5xx tika http statuses, not only 500 + + +M src/plugins/fts/fts-parser-tika.c + +2017-12-12 08:56:31 -0500 Josef 'Jeff' Sipek (70a88f28a) + + director: avoid comparison between signed and unsigned ints + + +M src/director/director-connection.c + +2017-12-12 08:55:58 -0500 Josef 'Jeff' Sipek (2e758d161) + + submission: use correct format string for printing uoff_t + + +M src/submission/cmd-helo.c + +2017-12-11 14:18:20 +0100 Stephan Bosch (5af1ff01b) + + Update README regarding supported RFCs. + + Some were missing and new ones are added by the recent lib-smtp and + submission service changes. + +M README.md + +2017-12-11 18:07:35 +0200 Timo Sirainen (f2cd173a0) + + config: Add a warning comment to the generated all-settings.c + + +M src/config/settings-get.pl + +2017-12-11 20:29:29 +0100 Stephan Bosch (0a6796cac) + + doc: example-config: Fix installation of the example configuration for the + submission service. + + Forgot to add it to Makefile.am. + +M doc/example-config/conf.d/Makefile.am + +2017-12-11 15:55:32 +0100 Stephan Bosch (b1aac3a1d) + + lmtp: Fix segfault occurring in client_read_settings(). + + This problem is caused by recent changes. The code attempts to access + client->conn to obtain connection security info, which is not yet assigned + at that point. It is doubtful whether assigning those security flags is + useful at that stage, but it now uses the ssl flag from the + master_service_connection instead. + +M src/lmtp/client.c + +2017-12-11 15:53:45 +0100 Stephan Bosch (823802b00) + + lmtp: Removed useless ssl_start parameter for client_create(). + + The same information is already contained in the conn parameter. + +M src/lmtp/client.c +M src/lmtp/client.h +M src/lmtp/main.c + +2017-11-11 14:20:59 +0100 Stephan Bosch (2cbbe9b48) + + Implemented SMTP submission proxy service. + + +M .gitignore +M TODO +M configure.ac +M doc/example-config/conf.d/10-director.conf +M doc/example-config/conf.d/10-master.conf +M doc/example-config/conf.d/10-ssl.conf +A doc/example-config/conf.d/20-submission.conf +M doc/example-config/dovecot.conf +M src/Makefile.am +A src/submission-login/Makefile.am +A src/submission-login/client-authenticate.c +A src/submission-login/client-authenticate.h +A src/submission-login/client.c +A src/submission-login/client.h +A src/submission-login/submission-login-settings.c +A src/submission-login/submission-login-settings.h +A src/submission-login/submission-proxy.c +A src/submission-login/submission-proxy.h +A src/submission/Makefile.am +A src/submission/cmd-data.c +A src/submission/cmd-helo.c +A src/submission/cmd-mail.c +A src/submission/cmd-noop.c +A src/submission/cmd-quit.c +A src/submission/cmd-rcpt.c +A src/submission/cmd-rset.c +A src/submission/cmd-vrfy.c +A src/submission/main.c +A src/submission/submission-client.c +A src/submission/submission-client.h +A src/submission/submission-commands.c +A src/submission/submission-commands.h +A src/submission/submission-common.h +A src/submission/submission-settings.c +A src/submission/submission-settings.h + +2017-12-09 02:09:35 +0100 Stephan Bosch (211caf3c2) + + lib-storage: mail-user: Added more information about the client connection. + + Submission service will need it to pass to the backend MTA in XCLIENT and + for creating the "Received:" header. + +M src/imap/main.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lib-storage/mail-user.h +M src/lmtp/client.c +M src/lmtp/lmtp-local.c +M src/pop3/main.c + +2017-12-09 02:34:52 +0100 Stephan Bosch (e213fe0f4) + + lib-master: master-auth: Pass more information about the user connection to + the backend in struct master_auth_request. + + Adds remote and local ports and security information about the connection. + This changes the master-auth protocol incompatibly, so the major version is + updated. + +M src/lib-master/master-auth.h +M src/login-common/sasl-server.c + +2017-12-09 02:33:16 +0100 Stephan Bosch (9666d130b) + + login-common: Added flag to client that indicates whether connection is + secured using SSL specifically. + + +M src/login-common/client-common.c +M src/login-common/client-common.h + +2017-12-09 01:52:28 +0100 Stephan Bosch (ff4ba036f) + + lib-storage: mail-user: Changed mail_user_set_vars() to accept struct + mail_user_connection_data, rather than individual fields. + + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h + +2017-12-09 01:29:06 +0100 Stephan Bosch (60670187b) + + lib-storage: Moved connection information in struct mail_user into separate + struct mail_user_connection_data. + + +M src/imap/cmd-idle.c +M src/imap/imap-client-hibernate.c +M src/imap/main.c +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h +M src/plugins/stats/mail-stats-connection.c +M src/pop3/main.c + +2017-12-09 01:11:53 +0100 Stephan Bosch (2ded32b16) + + imap: cmd-idle: Created local variable for client in + idle_add_keepalive_timeout(). + + +M src/imap/cmd-idle.c + +2017-12-09 01:04:48 +0100 Stephan Bosch (8c1199cac) + + imap: imap-client-hibernate: Created local variable for mail_user in + imap_hibernate_write_cmd(). + + +M src/imap/imap-client-hibernate.c + +2016-09-26 09:25:32 +0200 Stephan Bosch (f1edf7f20) + + imap-urlauth: Allow connections from services other than IMAP. + + The imap-urlauth service detects the new submission service and assigns the + appropriate privileges. The dovecot-token authentication mechanism provides + information on which service connected to it. + +M src/auth/mech-dovecot-token.c +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-client.h +M src/imap-urlauth/imap-urlauth-login.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/imap-client.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-imap-urlauth/imap-urlauth-connection.h +M src/lib-imap-urlauth/imap-urlauth-private.h +M src/lib-imap-urlauth/imap-urlauth.c +M src/lib-imap-urlauth/imap-urlauth.h + +2017-11-10 17:18:28 +0100 Stephan Bosch (dfafc4ac8) + + login-common: Added client_disconnect(), which allows explicitly + disconnecting the client before it is destroyed. + + This is sometimes needed to make sure the SSL layer is closed properly + before destroying the underlying connection. + +M src/login-common/client-common.c +M src/login-common/client-common.h + +2016-09-26 19:12:19 +0200 Stephan Bosch (a1852ab4c) + + login-common: Added support for login services that handle their own input + io. + + +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h + +2017-12-10 11:28:44 +0100 Stephan Bosch (4dd460cf1) + + lib-smtp: server: Added max_recipients setting, which enforces a recipient + limit per-transaction. + + +M src/lib-smtp/smtp-server-cmd-rcpt.c +M src/lib-smtp/smtp-server-connection.c +M src/lib-smtp/smtp-server.c +M src/lib-smtp/smtp-server.h +M src/lib-smtp/test-smtp-server-errors.c + +2017-12-10 11:26:10 +0100 Stephan Bosch (6d76b99eb) + + lib-smtp: server: transaction: Added smtp_server_transaction_rcpt_count(). + + +M src/lib-smtp/smtp-server-private.h +M src/lib-smtp/smtp-server-transaction.c + +2017-12-11 02:19:52 +0100 Stephan Bosch (1f4f829f8) + + lib-smtp: server: DATA/BDAT command: Make sure chunk stream is dereferenced + early. + + The submission BURL command - which uses part of the same code - runs into + trouble otherwise. This could also be an actual istream reference leak + outside BURL, but that is not confirmed. + +M src/lib-smtp/smtp-server-cmd-data.c + +2017-12-10 11:32:28 +0100 Stephan Bosch (090abb197) + + lib-smtp: server: DATA command: Continue processing connection input once + DATA reply is submitted. + + Fixes a potential connection hang. + +M src/lib-smtp/smtp-server-cmd-data.c + +2017-12-10 11:31:24 +0100 Stephan Bosch (e69ac57b1) + + lib-smtp: server: command: Added smtp_server_command_input_unlock(). + + Allows unlock input for a command that was earlier locked with + smtp_server_command_input_lock(). + +M src/lib-smtp/smtp-server-command.c +M src/lib-smtp/smtp-server.h + +2017-12-11 10:33:09 +0100 Stephan Bosch (237ff492d) + + lib-smtp: server: DATA command: Make sure there is a transaction in + smtp_server_connection_data_check_state() before using it. + + This fixes a potential NULL dereference. Found by Coverity. + +M src/lib-smtp/smtp-server-cmd-data.c + +2017-12-11 10:37:58 +0100 Stephan Bosch (eda1c4f68) + + lib-smtp: server: DATA command: Fixed check for valid recipients in + smtp_server_connection_data_check_state(). + + Can only decide whether we have valid recipients once there are no more + pending RCPT commands. + +M src/lib-smtp/smtp-server-cmd-data.c + +2017-12-11 04:18:54 +0100 Stephan Bosch (479f238c9) + + lib-smtp: server: Removed inappropriate NULL check in + smtp_server_connection_send_replies(). + + Caller holds a reference, so it can never be NULL. Found by Coverity. + +M src/lib-smtp/smtp-server-connection.c + +2017-12-11 10:41:53 +0100 Stephan Bosch (c13d3128f) + + lib-smtp: server: Remove useless o_stream_flush() in + smtp_server_connection_disconnect(). + + This is already performed implicitly by o_stream_uncork(). Fixes a problem + found by Coverity. + +M src/lib-smtp/smtp-server-connection.c + +2017-12-10 20:00:21 +0200 Timo Sirainen (21138be49) + + lib-test: istream-test - Don't modify existing snapshots' memareas + + At least with --enable-devel-checks this caused istream-sized unit test to + randomly panic: + + Panic: file istream.c: line 279 (i_stream_read): assertion failed: + (memcmp(prev_buf, prev_data + prev_skip, prev_pos - prev_skip) == 0) + +M src/lib-test/test-istream.c + +2017-12-11 12:59:58 +0100 Stephan Bosch (ea4a85f58) + + lib-http: client: Cleaned up initialization of client settings. + + There were checks for the client context not being NULL, which makes no + sense anymore, since a private context is always created when none is + provided. Problem reported by Coverity. + +M src/lib-http/http-client.c + +2017-12-05 17:05:27 +0200 Aki Tuomi (66bdf53db) + + lib: test-var-expand - Ensure var_get_key_range_full handles nested ifs + correctly + + +M src/lib/test-var-expand.c + +2017-12-01 19:46:58 +0200 Aki Tuomi (f5d1cfca5) + + lib: var-expand - handle \{ and \} correctly + + Do not treat these as embedded braces + +M src/lib/var-expand.c + +2017-12-01 14:53:46 +0200 Aki Tuomi (20a8a1265) + + lib: Support nested keys in var_get_key_range_full + + Fixes problems with %{if...} + + failed: if: requires four or five parameters, got 1 + +M src/lib/var-expand.c + +2017-12-11 12:52:38 +0200 Martti Rannanjärvi (53e4a0d5c) + + auth: Debug log an LDAP request result only once + + +M src/auth/db-ldap.c +M src/auth/db-ldap.h + +2017-12-11 12:47:32 +0200 Martti Rannanjärvi (5ced9eb9e) + + auth: Have ldap_request instead of auth_request in + db_ldap_result_iterate_context + + This makes it easier to access ldap_request where needed later. + +M src/auth/db-ldap.c + +2017-10-09 13:57:12 +0300 Sergey Kitov (dc1e69cd9) + + fts: fts_parser_tika replace empty path with "/" + + indexing doesn't crash if fts_tika = http://host:port setting is missing + trailing '/' + +M src/plugins/fts/fts-parser-tika.c + +2017-10-09 13:53:42 +0300 Sergey Kitov (8e1eaf849) + + fts: Retry indexing for tika backend in case of internal server error + + +M src/plugins/fts/fts-api-private.h +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/fts/fts-parser.h + +2017-10-09 13:13:05 +0300 Sergey Kitov (72d301f57) + + fts: Extend parser's deinit function interface with retriable_err_msg_r + parameter + + the new parameter will be set to a error string in case indexing may need + retrying, so it will be logged later when decision about retry will be made. + +M src/plugins/fts/fts-api-private.h +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-parser-html.c +M src/plugins/fts/fts-parser-script.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/fts/fts-parser.c +M src/plugins/fts/fts-parser.h + +2017-10-09 11:23:54 +0300 Sergey Kitov (43f4e550e) + + fts: Parser move try_init arguments to a single structure parser_context. + + +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-parser-html.c +M src/plugins/fts/fts-parser-script.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/fts/fts-parser.c +M src/plugins/fts/fts-parser.h +M src/plugins/fts/xml2text.c + +2017-11-27 14:19:34 +0200 Martti Rannanjärvi (d4002fe1f) + + global: Use mail_set_critical() and mailbox_set_critical() if possible + + Replace calls to mail_storage_set_critical() with mail_set_critical() or + mailbox_set_critical() in places where mailbox or mail are easily available. + +M src/imap/cmd-append.c +M src/imap/imap-fetch-body.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-storage/index/cydir/cydir-mail.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/cydir/cydir-storage.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-multi/mdbox-sync.c +M src/lib-storage/index/dbox-single/sdbox-copy.c +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-storage/index/dbox-single/sdbox-sync.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-sync.c +M src/lib-storage/index/index-attachment.c +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-sync-pvt.c +M src/lib-storage/index/index-sync.c +M src/lib-storage/index/index-thread.c +M src/lib-storage/index/index-transaction.c +M src/lib-storage/index/maildir/maildir-copy.c +M src/lib-storage/index/maildir/maildir-keywords.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-storage.c +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-sync.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/maildir/maildir-util.c +M src/lib-storage/index/mbox/mbox-file.c +M src/lib-storage/index/mbox/mbox-lock.c +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/mbox/mbox-sync-list-index.c +M src/lib-storage/index/mbox/mbox-sync-rewrite.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/index/pop3c/pop3c-storage.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/index/raw/raw-mail.c +M src/lib-storage/index/raw/raw-storage.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/mail-copy.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-recent-flags.c +M src/plugins/acl/acl-mailbox.c +M src/plugins/fts/fts-storage.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/mailbox-alias/mailbox-alias-plugin.c +M src/plugins/quota/quota-storage.c +M src/plugins/virtual/virtual-config.c +M src/plugins/virtual/virtual-storage.c +M src/plugins/zlib/zlib-plugin.c + +2017-11-27 14:09:21 +0200 Martti Rannanjärvi (1260d509f) + + lib-storage: Take mail_save_context parameter in save_check_write_error() + + This is in order to use mail_set_critical() in the function later. + +M src/lib-storage/index/index-attachment.c + +2017-11-27 13:52:07 +0200 Martti Rannanjärvi (0060557e0) + + quota: Take mailbox as parameter in quota_set_storage_error() + + This is to start using mailbox_set_critical() later. + +M src/plugins/quota/quota-storage.c + +2017-11-29 15:46:34 +0200 Martti Rannanjärvi (804bca734) + + lib-ssl-iostream: Use SSL_CTX_set_min_proto_version if available + + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c + +2017-11-07 14:47:01 +0200 Martti Rannanjärvi (a3a483da7) + + m4: Add SSL_CTX_set_min_proto_version detection + + +M m4/ssl.m4 + +2017-11-28 12:02:08 +0200 Martti Rannanjärvi (976dee538) + + Replace ssl_protocols config option with ssl_min_protocol + + Default to TLSv1. + +M doc/example-config/conf.d/10-ssl.conf +M src/config/old-set-parser.c +M src/lib-ldap/ldap-connection.c +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h +M src/lib-master/master-service-ssl.c +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-11-20 13:40:03 +0200 Aki Tuomi (e4f8e7a2f) + + lib-storage: mailbox-list-iter - Refresh subscriptions before setting flags + + This happens when list patterns match the namespace prefix, but + mailbox_list_ns_match_patterns() returns FALSE. And one of the ways for that + to happen is if namespace has alias_for set. + +M src/lib-storage/list/mailbox-list-iter.c + +2017-11-20 10:40:52 +0200 Aki Tuomi (a612b56da) + + lib-storage: mailbox-tree - Ensure tree is not NULL + + +M src/lib-storage/mailbox-tree.c + +2017-11-06 21:54:00 +0100 Stephan Bosch (b8b2cc4e5) + + lmtp: Changed message data handling to use iostream-temp. + + The existing code predates iostream-temp. + +M src/lmtp/client.c +M src/lmtp/client.h +M src/lmtp/commands.c + +2017-10-10 01:04:50 +0200 Stephan Bosch (1aae941fa) + + lmtp: Removed structural comments that are now useless. + + +M src/lmtp/client.c +M src/lmtp/commands.c + +2017-10-10 01:03:02 +0200 Stephan Bosch (88201d844) + + lmtp: client: Made client_remote_id() static. + + +M src/lmtp/client.c +M src/lmtp/client.h + +2016-11-23 10:43:53 +0100 Stephan Bosch (b73539ef2) + + lmtp: Ported to use lib-smtp/server. + + Implicitly fixes handling of multi-line replies from proxy backend. + Implicitly adds support for mixing local and proxy recipients. Implicitly + adds support for SMTP CHUNKING. RCPT failures are reported back to the + client immediately, rather than waiting for the DATA command. + +M TODO +M src/lmtp/client.c +M src/lmtp/client.h +M src/lmtp/commands.c +M src/lmtp/commands.h +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h +M src/lmtp/main.c +M src/lmtp/main.h + +2017-11-11 10:20:05 +0100 Stephan Bosch (b85d7b856) + + lib-smtp: Created test-smtp-server-errors, which tests the server's error + handling. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/test-smtp-server-errors.c + +2017-11-11 10:30:14 +0100 Stephan Bosch (8620dc793) + + lib-smtp: Created test-smtp-payload, which tests client<->server payload + exchange. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/test-smtp-payload.c + +2016-11-06 22:46:31 +0100 Stephan Bosch (56dd928c1) + + lib-smtp: Implemented SMTP server. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-server-cmd-auth.c +A src/lib-smtp/smtp-server-cmd-data.c +A src/lib-smtp/smtp-server-cmd-helo.c +A src/lib-smtp/smtp-server-cmd-mail.c +A src/lib-smtp/smtp-server-cmd-noop.c +A src/lib-smtp/smtp-server-cmd-quit.c +A src/lib-smtp/smtp-server-cmd-rcpt.c +A src/lib-smtp/smtp-server-cmd-rset.c +A src/lib-smtp/smtp-server-cmd-starttls.c +A src/lib-smtp/smtp-server-cmd-vrfy.c +A src/lib-smtp/smtp-server-cmd-xclient.c +A src/lib-smtp/smtp-server-command.c +A src/lib-smtp/smtp-server-connection.c +A src/lib-smtp/smtp-server-private.h +A src/lib-smtp/smtp-server-reply.c +A src/lib-smtp/smtp-server-transaction.c +A src/lib-smtp/smtp-server.c +A src/lib-smtp/smtp-server.h + +2016-11-06 22:36:57 +0100 Stephan Bosch (8141e6524) + + lib-smtp: Implemented SMTP command parser. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-command-parser.c +A src/lib-smtp/smtp-command-parser.h +A src/lib-smtp/smtp-command.h +A src/lib-smtp/test-smtp-command-parser.c + +2017-11-19 22:57:12 +0100 Stephan Bosch (a4985564b) + + lib: istream-failure-at: Allow setting the the stream_errno to something + other than EIO. + + +M src/lib-fs/fs-randomfail.c +M src/lib-smtp/test-smtp-client-errors.c +M src/lib/istream-failure-at.c +M src/lib/istream-failure-at.h +M src/lib/test-iostream-pump.c +M src/lib/test-istream-failure-at.c + +2017-10-31 01:12:44 +0100 Stephan Bosch (3f2f5e035) + + lmtp: proxy: Restructured proxy so that it has direct access to struct + client. + + This avoids the hassle of initializing using struct lmtp_proxy_settings and + uselessly reallocating stuff that is already persisted in struct client. + Moved the proxy from alloconly pool to default pool in the process. The + amount of allocated stuff will diminish further in subsequent commits. + +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-10-30 23:28:35 +0100 Stephan Bosch (8e32a7fe1) + + lmtp: proxy: Renamed pool to auth_pool in lmtp_proxy_rcpt() for clarity. + + +M src/lmtp/lmtp-proxy.c + +2017-10-30 21:09:25 +0100 Stephan Bosch (47af8777e) + + lmtp: proxy: Made struct lmtp_proxy_rcpt_settings private. + + +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-10-30 20:50:28 +0100 Stephan Bosch (0e0ce848d) + + lmtp: proxy: Merged lmtp_proxy_add_rcpt() into lmtp_proxy_rcpt(). + + +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-10-30 20:44:09 +0100 Stephan Bosch (11bb1153a) + + lmtp: proxy: Made lmtp_proxy_mail_from() private. + + +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-10-30 20:41:03 +0100 Stephan Bosch (dd34d6bf5) + + lmtp: proxy: Made lmtp_proxy_init() private. + + +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-10-30 01:24:37 +0100 Stephan Bosch (f0a4f00d0) + + lmtp: commands: Created local variable for client->dot_input in + client_input_data_handle(). + + +M src/lmtp/commands.c + +2017-10-30 01:19:18 +0100 Stephan Bosch (7bb879354) + + lmtp: commands: Renamed client_input_add() to cmd_data_input_add(). + + +M src/lmtp/commands.c + +2017-10-30 01:17:21 +0100 Stephan Bosch (d8720e440) + + lmtp: commands: Renamed client_input_add_file() to + cmd_data_input_add_file(). + + +M src/lmtp/commands.c + +2017-10-30 01:13:33 +0100 Stephan Bosch (d41037c2b) + + lmtp: commands: Renamed client_get_input() to cmd_data_get_input(). + + +M src/lmtp/commands.c + +2017-10-23 00:36:16 +0200 Stephan Bosch (755372f8e) + + lmtp: local: Renamed error variables in lmtp_local_rcpt_check_quota() to + match other code. + + +M src/lmtp/lmtp-local.c + +2017-10-30 02:00:38 +0100 Stephan Bosch (252a2911d) + + lmtp: local: Allocate recipients on the default pool, rather than the client + state pool. + + This prevents the pool from growing potentially indefinitely with failed + recipients. + +M src/lmtp/lmtp-local.c + +2017-10-22 23:29:21 +0200 Stephan Bosch (2b7d6fbaa) + + lmtp: Split off local delivery in a struct separate from the client. + + This mimics proxy delivery, making the implementation better structured. + +M src/lmtp/client.c +M src/lmtp/client.h +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-11-26 21:29:10 +0100 Stephan Bosch (4bc2df905) + + lmtp: local: Renamed local variable "dest_user" to "rcpt_user" in + lmtp_local_deliver(). + + This matches the rcpt_user field in struct mail_deliver_context. + +M src/lmtp/lmtp-local.c + +2017-09-19 03:56:39 +0200 Stephan Bosch (28585a427) + + lmtp: local: Created local variable for service_user in + lmtp_local_deliver(). + + +M src/lmtp/lmtp-local.c + +2017-09-19 03:53:45 +0200 Stephan Bosch (cfc330f2c) + + lmtp: local: Renamed trans variable in lmtp_local_open_raw_mail(). + + Preparation for new trans parameter. + +M src/lmtp/lmtp-local.c + +2017-09-19 03:33:12 +0200 Stephan Bosch (dafe33069) + + lmtp: local: Renamed client_deliver_to_rcpts() to + lmtp_local_deliver_to_rcpts(). + + +M src/lmtp/lmtp-local.c + +2017-09-19 02:07:22 +0200 Stephan Bosch (ce7a45d15) + + lmtp: client: Dropped useless rcpt_idx state. + + Recent refactoring made it obsolete. + +M src/lmtp/client.h +M src/lmtp/lmtp-local.c + +2017-09-19 00:29:02 +0200 Stephan Bosch (6fe14de90) + + lmtp: local: Always handle sending of error replies inside + lmtp_rcpt_to_is_over_quota(). + + Code was confusing. + +M src/lmtp/lmtp-local.c + +2017-09-19 03:40:56 +0200 Stephan Bosch (d5ddc86fb) + + lmtp: local: Renamed cmd_rcpt_finish() to lmtp_local_rcpt_anvil_finish(). + + +M src/lmtp/lmtp-local.c + +2017-09-19 03:29:03 +0200 Stephan Bosch (eb61a9ec4) + + lmtp: local: Renamed rcpt_anvil_lookup_callback() to + lmtp_local_rcpt_anvil_cb(). + + +M src/lmtp/lmtp-local.c + +2017-09-18 23:16:21 +0200 Stephan Bosch (bc1306f12) + + lmtp: commands: Moved RCPT command handling relating to local recipients to + lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-18 22:51:30 +0200 Stephan Bosch (70dfae6db) + + lmtp: client: Moved recipient deinitialization to lmtp-local.c. + + +M src/lmtp/client.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-19 03:21:39 +0200 Stephan Bosch (fd3bad187) + + lmtp: local: Renamed lmtp_rcpt_to_is_over_quota() to + lmtp_local_rcpt_check_quota(). + + +M src/lmtp/lmtp-local.c + +2017-09-19 01:33:28 +0200 Stephan Bosch (8a68f5bb8) + + lmtp: local: Renamed client_input_data_write_local() to lmtp_local_data(). + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-19 01:07:17 +0200 Stephan Bosch (d14a89631) + + lmtp: local: Renamed client_open_raw_mail() to lmtp_local_open_raw_mail(). + + +M src/lmtp/lmtp-local.c + +2017-09-19 00:59:27 +0200 Stephan Bosch (e5f4eb147) + + lmtp: local: Renamed client_deliver() to lmtp_local_deliver(). + + +M src/lmtp/lmtp-local.c + +2017-09-18 22:40:41 +0200 Stephan Bosch (95b2dd305) + + lmtp: local: Renamed client_rcpt_anvil_disconnect() to + lmtp_local_rcpt_anvil_disconnect(). + + +M src/lmtp/client.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-10-30 23:06:50 +0100 Stephan Bosch (652962cb6) + + lmtp: proxy: Changed return type of lmtp_proxy_rcpt() from bool to int. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-09-18 22:32:43 +0200 Stephan Bosch (e4161404d) + + lmtp: proxy: Renamed client_proxy_rcpt() to lmtp_proxy_rcpt(). + + +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-09-18 22:29:29 +0200 Stephan Bosch (2f73bf148) + + lmtp: proxy: Renamed client_proxy_is_ourself() to lmtp_proxy_is_ourself(). + + +M src/lmtp/lmtp-proxy.c + +2017-09-18 22:27:41 +0200 Stephan Bosch (582f781ce) + + lmtp: proxy: Renamed client_proxy_rcpt_parse_fields() to + lmtp_proxy_rcpt_parse_fields(). + + +M src/lmtp/lmtp-proxy.c + +2017-09-18 22:04:58 +0200 Stephan Bosch (447ae13a8) + + lmtp: Renamed struct mail_recipient to struct lmtp_recipient. + + +M src/lmtp/client.c +M src/lmtp/client.h +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-10-31 02:37:40 +0100 Stephan Bosch (bb0a27c17) + + lmtp: proxy: Added structural comments. + + +M src/lmtp/lmtp-proxy.c + +2017-09-18 21:14:05 +0200 Stephan Bosch (1c1396ed2) + + lmtp: local: Added structural comments. + + +M src/lmtp/lmtp-local.c + +2017-09-17 14:28:33 +0200 Stephan Bosch (ebdfdb765) + + lmtp: commands: Added structural comments. + + +M src/lmtp/commands.c + +2016-11-23 10:43:53 +0100 Stephan Bosch (124a7f9f3) + + lmtp: proxy: Removed dns_client_socket_path from struct lmtp_proxy_settings. + + It is globally accessible. + +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-10-10 00:36:37 +0200 Stephan Bosch (3a1c07860) + + lmtp: client: Moved soon-to-be-obsolete output handling functions to end of + the file. + + +M src/lmtp/client.c +M src/lmtp/client.h + +2017-09-17 19:03:06 +0200 Stephan Bosch (eac03bb79) + + lmtp: client: Moved soon-to-be-obsolete input handling functions to end of + the file. + + +M src/lmtp/client.c +M src/lmtp/client.h + +2017-09-17 18:39:08 +0200 Stephan Bosch (27d541423) + + lmtp: client: Moved client_state_reset(). + + +M src/lmtp/client.c + +2017-10-31 02:20:44 +0100 Stephan Bosch (a33e180a6) + + lmtp: proxy: Moved lmtp_proxy_connection_finish(). + + +M src/lmtp/lmtp-proxy.c + +2016-11-23 10:58:02 +0100 Stephan Bosch (1b8cec404) + + lmtp: proxy: Moved lmtp_proxy_rcpt_cb(). + + +M src/lmtp/lmtp-proxy.c + +2017-10-31 02:29:54 +0100 Stephan Bosch (b6e6966a2) + + lmtp: proxy: Moved lmtp_proxy_add_rcpt(). + + +M src/lmtp/lmtp-proxy.c + +2017-10-31 02:27:47 +0100 Stephan Bosch (122323b8d) + + lmtp: proxy: Moved lmtp_proxy_data_cb(). + + +M src/lmtp/lmtp-proxy.c + +2017-10-31 02:26:12 +0100 Stephan Bosch (65ff3f6ac) + + lmtp: proxy: Moved lmtp_proxy_data_dummy_cb(). + + +M src/lmtp/lmtp-proxy.c + +2016-11-06 17:34:25 +0100 Stephan Bosch (5f2855fe6) + + lmtp: Moved code relating to proxy from commands.c to lmtp-proxy.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-09-17 11:40:53 +0200 Stephan Bosch (cbd1d1a19) + + lmtp: Moved client_input_data_write_local() from commands.c to lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-17 11:13:17 +0200 Stephan Bosch (e3d554ca3) + + lmtp: Moved client_open_raw_mail() from commands.c to lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-18 23:48:51 +0200 Stephan Bosch (420dc25a3) + + lmtp: Moved client_rcpt_fail_all() from commands.c to lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-17 10:52:43 +0200 Stephan Bosch (fb2e20a30) + + lmtp: Moved client_deliver_to_rcpts() from commands.c to lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-17 10:29:15 +0200 Stephan Bosch (4c10d203d) + + lmtp: Moved client_deliver() from commands.c to lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-17 02:57:29 +0200 Stephan Bosch (a3259cc32) + + lmtp: Moved rcpt_anvil_lookup_callback() from commands.c to lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-17 02:11:58 +0200 Stephan Bosch (1d2e367e1) + + lmtp: Moved cmd_rcpt_finish() from commands.c to lmtp-local.c. + + +M src/lmtp/commands.c +M src/lmtp/lmtp-local.c +M src/lmtp/lmtp-local.h + +2017-09-17 00:07:34 +0200 Stephan Bosch (0029bf606) + + lmtp: Moved client_rcpt_anvil_disconnect() from client.c to lmtp-local.c. + + +M src/lmtp/Makefile.am +M src/lmtp/client.c +M src/lmtp/client.h +A src/lmtp/lmtp-local.c +A src/lmtp/lmtp-local.h + +2016-11-23 10:22:21 +0100 Stephan Bosch (4df5abb02) + + lmtp: Moved lmtp_anvil_init() from commands.c to main.c. + + It fits better there. + +M src/lmtp/commands.c +M src/lmtp/main.c +M src/lmtp/main.h + +2017-10-10 02:53:56 +0200 Stephan Bosch (24afb81b5) + + lmtp: client: Use client_remote_id() to construct proctitle. + + +M src/lmtp/client.c + +2017-10-10 00:19:02 +0200 Stephan Bosch (0807987e8) + + lmtp: client: Moved client_remote_id(). + + +M src/lmtp/client.c + +2017-10-10 02:36:34 +0200 Stephan Bosch (942b4f454) + + lmtp: client: Restructured client_state_set() to match + imap_refresh_proctitle(). + + +M src/lmtp/client.c + +2017-10-10 02:21:34 +0200 Stephan Bosch (7affd5e5e) + + lmtp: client: Restructured handling of verbose_proctitle setting. + + +M src/lmtp/client.c + +2017-12-05 14:49:17 +0100 Stephan Bosch (8b41f8f92) + + lib-smtp: common: Added support for having custom fields in struct + smtp_proxy_data. + + +M src/lib-smtp/smtp-common.h + +2017-12-04 11:01:31 +0200 Aki Tuomi (4a31bc036) + + pop3: Include mail user variables in logout format + + +M src/pop3/pop3-client.c + +2017-12-04 11:01:05 +0200 Aki Tuomi (ee1950c7d) + + imap: Include mail user variables in logout format + + +M src/imap/imap-client.c + +2017-12-05 23:49:27 +0200 Aki Tuomi (857a9e1f1) + + lib: var-expand - Add table size and merge utility functions + + +M src/lib/test-var-expand.c +M src/lib/var-expand.c +M src/lib/var-expand.h + +2017-12-07 01:44:56 +0100 Stephan Bosch (5644698fc) + + lib-http: test-http-payload: Added tests for running multiple clients in + parallel with shared context. + + +M src/lib-http/test-http-payload.c + +2017-12-06 23:43:18 +0100 Stephan Bosch (58e3ba776) + + lib-http: test-http-payload: Added support for running multiple parallel + clients. + + +M src/lib-http/test-http-payload.c + +2016-12-18 19:45:32 +0100 Stephan Bosch (6776cc851) + + lib-http: client: Amended the top comment explaining the structure of the + HTTP client. + + +M src/lib-http/http-client.c + +2016-12-04 21:54:02 +0100 Stephan Bosch (fd30e54bd) + + lib-http: client: Added identifier to client log messages. + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c + +2017-09-27 19:21:40 +0200 Stephan Bosch (faa4f87ec) + + lib-http: test-http-client: Run several clients simultaneously. + + +M src/lib-http/test-http-client.c + +2017-09-27 19:21:24 +0200 Stephan Bosch (27a2e59ea) + + lib-http: client: shared context: Allow sharing peer state between clients. + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c + +2016-12-18 19:27:05 +0100 Stephan Bosch (0a3bccd23) + + lib-http: client: peer: Moved http_client_peer_reset_backoff_timer() + function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 19:16:31 +0100 Stephan Bosch (49088f457) + + lib-http: client: peer: Moved http_client_peer_increase_backoff_timer() + function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 19:15:04 +0100 Stephan Bosch (aa65356a0) + + lib-http: client: peer: Moved http_client_peer_start_backoff_timer() + function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 19:13:00 +0100 Stephan Bosch (4a9bd6a85) + + lib-http: client: peer: Moved http_client_peer_connect_backoff() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-05 00:37:27 +0100 Stephan Bosch (01cfa2ea0) + + lib-http: client: peer: Moved http_client_peer_get() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 18:50:31 +0100 Stephan Bosch (9e1f10306) + + lib-http: client: peer: Moved http_client_peer_drop() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 18:46:01 +0100 Stephan Bosch (5a8d6f8db) + + lib-http: client: peer: Moved http_client_peer_close() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 18:44:05 +0100 Stephan Bosch (0dfe37d8e) + + lib-http: client: peer: Moved http_client_peer_unref() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 18:42:50 +0100 Stephan Bosch (1be73c463) + + lib-http: client: peer: Moved http_client_peer_ref() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 18:41:37 +0100 Stephan Bosch (4e629672b) + + lib-http: client: peer: Moved http_client_peer_disconnect() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-18 18:40:19 +0100 Stephan Bosch (90fa7fd47) + + lib-http: client: peer: Moved http_client_peer_create() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-peer.c + +2016-12-04 00:11:46 +0100 Stephan Bosch (e48102389) + + lib-http: client: shared context: Allow sharing host lookups between + clients. + + +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c +M src/lib-http/http-client.c + +2016-12-04 12:51:02 +0100 Stephan Bosch (2300bdf14) + + lib-http: client: host: Moved http_client_host_submit_request() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-host.c + +2016-12-04 12:40:29 +0100 Stephan Bosch (fbe111ce6) + + lib-http: client: host: Moved http_client_host_check_idle() function. + + This is a preparation for a subsequent change. + +M src/lib-http/http-client-host.c + +2016-11-30 02:04:11 +0100 Stephan Bosch (23fe024e1) + + lib-http: client: Avoid direct access to host object members from queue. + + +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c + +2016-11-29 19:29:25 +0100 Stephan Bosch (20493a543) + + lib-http: client: Moved connection pool handling from peer to separate + object. + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h + +2016-11-29 18:13:30 +0100 Stephan Bosch (9fe6a5587) + + lib-http: client: Moved connection list from client to shared context. + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client.c + +2016-11-29 16:17:59 +0100 Stephan Bosch (fab1a1c57) + + lib-http: client: Created basic shared context between clients. + + In this basic form it only shares default settings. + +M src/lib-http/http-client-private.h +M src/lib-http/http-client.c +M src/lib-http/http-client.h + +2016-12-04 19:35:30 +0100 Stephan Bosch (63a1359e6) + + lib-http: client: Cosmetic changes to http-client-private.h. + + +M src/lib-http/http-client-private.h + +2016-12-04 16:00:49 +0100 Stephan Bosch (3ad0a46f4) + + lib-http: client: Simplified initiation of connection setup upon request + submission. + + +M src/lib-http/http-client-host.c +M src/lib-http/http-client-queue.c + +2016-12-04 12:03:18 +0100 Stephan Bosch (8149ed57a) + + lib-http: client: Created separate http_client_queue_get() function. + + Before, this was combined in http_client_queue_create() which caused a large + code block to be indentet. Separating creation and obtaining the current + instance makes the code cleaner. + +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c + +2016-11-29 17:22:41 +0100 Stephan Bosch (d67f004eb) + + lib-http: client: Fixed whitespace in the top comment explaining the + structure of the HTTP client. + + +M src/lib-http/http-client.c + +2017-12-07 09:48:51 +0200 Aki Tuomi (cae3c6903) + + driver-cassandra: Free statement pool on update + + Otherwise the pool memory will leak. This was happening with non-prepared + statements when version was older than 4. + +M src/lib-sql/driver-cassandra.c + +2017-12-07 08:20:02 +0200 Aki Tuomi (7cc5fcc85) + + lib-http: test-http-client - conditionally depend on openssl + + Fixes compiling without openssl, broken by c45da70c + +M src/lib-http/test-http-client.c + +2017-12-06 17:41:14 +0200 Martti Rannanjärvi (80064363a) + + auth: passdb-ldap - Fix AUTH_LOG_MSG_PASSWORD_MISMATCH use in logging + + +M src/auth/passdb-ldap.c + +2017-04-04 12:40:10 +0300 Aki Tuomi (ab5c28d09) + + auth: Fix 'Password mismatch' casing consistency + + +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/auth/mech-cram-md5.c +M src/auth/mech-digest-md5.c +M src/auth/mech-scram-sha1.c +M src/auth/passdb-ldap.c +M src/auth/passdb-pam.c +M src/auth/password-scheme.c +M src/auth/password-scheme.h + +2017-11-28 11:39:52 +0200 Aki Tuomi (6699d5ab6) + + auth: Fix auth_request_is_disabled_master_user + + I assumed that lack of passdb means master authentication, but e.g. gssapi + does not require a passdb. Instead, check that if requested_login_uset is + non-null then check passdb is non-null too. + + Fixes auth: Panic: file auth-request.c: line 716 + (auth_request_is_disabled_master_user): assertion failed: + (request->requested_login_user != NULL) + +M src/auth/auth-request.c + +2017-12-04 17:55:15 +0200 Aki Tuomi (bfbd10067) + + doveadm-pw: Use CRYPT instead of CRAM-MD5 by default + + This is when generating new passwords. + +M src/doveadm/doveadm-pw.c + +2017-12-04 18:39:24 +0200 Aki Tuomi (4bed0c5f9) + + auth: Use bcrypt as default scheme for CRYPT scheme + + Only changes the type of password which is generated by default, password + verification is not changed. + +M src/auth/password-scheme-crypt.c + +2017-12-04 18:38:36 +0200 Aki Tuomi (cfb22f2f9) + + auth: Rename CRYPT scheme to DES-CRYPT + + +M src/auth/password-scheme-crypt.c +M src/auth/test-libpassword.c + +2017-11-29 15:20:29 +0200 Timo Sirainen (12a1ee081) + + lib-storage: Log an error when mailbox list index is rebuilt due to header + fsck flag + + +M src/lib-storage/list/mailbox-list-index.c + +2017-11-29 15:14:02 +0200 Timo Sirainen (b42817ce1) + + lib-storage: Rebuild list index when doing doveadm force-resync + + +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/mail-storage-private.h + +2017-11-29 14:51:02 +0200 Timo Sirainen (8049d5792) + + LAYOUT=index: Rebuild list index if INBOX is missing on inbox=yes namespace + + This avoids having to manually rebuild the list index afterwards if it + becomes lost. + +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/mail-storage-private.h + +2017-11-29 14:36:25 +0200 Timo Sirainen (82d1fe3d5) + + lib-storage: Rename mail_storage.list_index_corrupted() to + list_index_rebuild() + + Also add a new parameter to it to specify the rebuild reason. + +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/mail-storage-private.h + +2017-11-29 14:38:38 +0200 Timo Sirainen (2303cd3c6) + + lib-storage: Remove obsolete comment + + +M src/lib-storage/list/mailbox-list-index.c + +2017-11-30 12:52:23 +0200 Aki Tuomi (05b5b75e7) + + auth: passdb-lua - Fix mistake in nopassword handling + + If nopassword is given, check that password is not set. Previous code did + the opposite. + + Fixes Info: lua(): nopassword given and password is not empty + +M src/auth/passdb-lua.c + +2017-12-04 19:05:55 +0200 Aki Tuomi (208b68bb9) + + auth: Set cache key for lua auth database + + +M src/auth/db-lua.h +M src/auth/passdb-lua.c +M src/auth/userdb-lua.c + +2017-12-01 20:51:44 +0200 Martti Rannanjärvi (c9a7c4d24) + + lib: murmurhash3 - Fix Aki's email address + + +M src/lib/murmurhash3.c + +2017-12-01 18:15:18 +0200 Martti Rannanjärvi (035123383) + + lib: Add fall through comments to murmurhash3.c to fix gcc-7 warnings + + +M src/lib/murmurhash3.c + +2017-12-01 11:53:50 +0200 Aki Tuomi (aa6cd0d62) + + lib: murmurhash3 - Fix 128 bit hash on 32 bit systems + + +M src/lib/murmurhash3.c + +2017-11-27 18:26:00 +0200 Timo Sirainen (aa3998718) + + doveadm-server: Switch to TCP connection's ioloop while sending logs to + remote + + Fixes: Warning: I/O leak: 0x558d7c074ed0 (ostream-file.c:349, fd 16) Panic: + file ioloop.c: line 127 (io_remove_full): assertion failed: (io->callback != + NULL) + +M src/doveadm/client-connection-tcp.c + +2017-11-29 16:29:17 +0200 Aki Tuomi (a8cad1250) + + lib: randgen - Fallback to /dev/urandom in case getrandom does not work + + In some operating systems getrandom is defined, but not implemented, if this + happens, fallback into using /dev/urandom. + +M src/lib/randgen.c + +2017-11-27 13:46:40 +0200 Aki Tuomi (44d29bbfa) + + lib: Add bloom filter support + + +M src/lib/Makefile.am +A src/lib/bloomfilter.c +A src/lib/bloomfilter.h +A src/lib/test-bloomfilter.c +M src/lib/test-lib.inc + +2017-11-27 13:46:17 +0200 Aki Tuomi (f6de86ea2) + + lib: Add murmurhash3 support + + Needed for bloom filters + +M src/lib/Makefile.am +A src/lib/murmurhash3.c +A src/lib/murmurhash3.h +M src/lib/test-lib.inc +A src/lib/test-murmurhash3.c + +2017-11-27 13:45:56 +0200 Aki Tuomi (f1577719e) + + lib: bits - add circular rotation functions + + +M src/lib/bits.h +M src/lib/test-bits.c + +2017-11-21 13:27:18 +0200 Sergey Kitov (df65573ad) + + lib: Call prctl(PR_SET_DUMPABLE) only when PR_SET_DUMPABLE env variable is + set + + +M src/lib/restrict-access.c + +2017-11-22 11:34:47 +0200 Sergey Kitov (f5cc54027) + + lib: Add logging of prctl(PR_SET_DUMPABLE) failure. + + +M src/lib/restrict-access.c + +2017-11-29 09:00:08 +0200 Aki Tuomi (df0eef65a) + + auth: test-lua - fix memory leaks + + +M src/auth/test-lua.c + +2017-11-28 01:04:53 +0100 Stephan Bosch (80bd4f851) + + lib-smtp: client: Fixed sending payload with unknown size using the CHUNKING + capability. + + +M src/lib-smtp/smtp-client-command.c + +2017-11-28 01:03:48 +0100 Stephan Bosch (11142fd53) + + lib-smtp: client: command: Implemented callback that is called when command + is fully sent. + + +M src/lib-smtp/smtp-client-command.c +M src/lib-smtp/smtp-client-command.h +M src/lib-smtp/smtp-client-private.h + +2017-11-27 21:03:52 +0100 Stephan Bosch (1fc55bfb5) + + lib-smtp: client: transaction: Fix adding a recipient while the transaction + is already failed. + + This did not always trigger an immediate callback. + +M src/lib-smtp/smtp-client-transaction.c + +2017-11-28 21:15:17 +0200 Aki Tuomi (ecfca41e9) + + auth: test-lua - zero out auth settings in test + + Otherwise valgrind complains + +M src/auth/test-lua.c + +2017-11-28 19:01:19 +0200 Timo Sirainen (4ccb61822) + + director: Fix logging disconnection error reasons + + The previous commit set errno=0, which weren't logged. If error string is + provided, it doesn't matter what the errno is set (as long as it's not 0), + so we'll just use EINVAL. + +M src/director/director-connection.c + +2017-11-28 13:45:42 +0200 Timo Sirainen (acc6105bd) + + lib: mempool-alloconly - Make sure calloc() size isn't above SSIZE_T_MAX + + This avoids valgrind warnings when running unit tests: + + Argument 'nmemb' of function calloc has a fishy (possibly negative) value: + -9223372036854775808 + +M src/lib/mempool-alloconly.c + +2017-11-28 16:51:46 +0200 Aki Tuomi (04e49d622) + + auth: userdb-lua - Fix typo in logging + + +M src/auth/userdb-lua.c + +2017-11-28 16:51:06 +0200 Aki Tuomi (e99ddf2f3) + + auth: userdb-lua - Log error if lookup fails + + Previously the error would just be discarded. + +M src/auth/userdb-lua.c + +2017-11-28 16:50:13 +0200 Aki Tuomi (c86575ac9) + + auth: db-lua - Fix password scheme handling + + It was left as NULL and had misleading name in some of the handler functions + causing assert-crash. + +M src/auth/db-lua.c + +2017-11-28 16:48:19 +0200 Aki Tuomi (c2cda3fae) + + auth: db-lua - fix auth request registration + + It was registered in wrong manner so one could not easily extend it with + passdb and userdb subtables. + + The change itself was to change the object to a table, and register the + actual pointer as light userdata under index 'item', and the passdb and + userdb tables similarly with 'item' in each holding the pointer to request. + +M src/auth/db-lua.c + +2017-11-28 13:44:06 +0200 Aki Tuomi (6dd6dac82) + + auth: db-lua - Do not assume params is always present for passdb/userdb + field lookup + + +M src/auth/db-lua.c + +2017-11-28 16:07:12 +0200 Timo Sirainen (c8d80ba71) + + lib: Fix mempool unit tests to pass with 32bit OSes + + malloc(SSIZE_T_MAX) actually succeeds there, so we can't test it. + +M src/lib/test-mempool-allocfree.c +M src/lib/test-mempool-alloconly.c + +2017-11-17 11:37:45 -0500 Josef 'Jeff' Sipek (08259c1f2) + + lib: rename bswap_*() to i_bswap() + + +M src/lib/byteorder.h +M src/lib/test-byteorder.c + +2017-11-28 15:06:27 +0200 Timo Sirainen (1a85ac6b4) + + director: Log connection stats for all types of disconnections + + +M src/director/director-connection.c + +2017-11-28 14:57:27 +0200 Timo Sirainen (43edd1078) + + director: Log whether connection is synced when it's being disconnected. + + +M src/director/director-connection.c + +2017-11-28 13:10:35 +0200 Timo Sirainen (0bd3eb7c8) + + director: Fix crash when handling expired USER timestamps. + + The fix in 154f91726624265fce15097eb4bbbf6e55f8c477 wasn't complete. + +M src/director/director-connection.c + +2017-11-24 13:22:19 +0200 Aki Tuomi (a4fa5676a) + + password-scheme-sodium: ARGON2I - print errno on failure + + +M src/auth/password-scheme-sodium.c + +2017-11-24 13:18:16 +0200 Aki Tuomi (66db268d5) + + password-scheme-sodium: Support ARGON2ID when available + + +M src/auth/password-scheme-sodium.c +M src/auth/test-libpassword.c + +2017-11-24 12:50:00 +0200 Aki Tuomi (243701508) + + password-scheme-sodium: rename ARGON2 to ARGON2I + + +M src/auth/password-scheme-sodium.c +M src/auth/test-libpassword.c + +2017-11-24 12:47:58 +0200 Aki Tuomi (1806d8fcb) + + password-scheme-sodium: Call sodium_init to improve performance + + +M src/auth/password-scheme-sodium.c + +2017-10-28 20:58:58 +0200 Frank Denis (b2c5e11c7) + + configure: --with-sodium doesn't add support for scrypt (for now, at least) + + +M configure.ac + +2017-11-27 18:34:49 +0200 Timo Sirainen (3c1077b11) + + doveadm-server: Fix potential dsync-server panic at deinit + + If the ostream is still used (e.g. for logging) after dsync is finished, it + crashed with: + + Panic: file ostream.c: line 276 (o_stream_sendv_int): assertion failed: + (!_stream->finished) + +M src/doveadm/doveadm-dsync.c + +2017-11-25 15:57:16 +0100 Stephan Bosch (981f260cf) + + pop3-login: Properly recognize an empty SASL initial response. + + Pass only the empty string to the auth service and not "=". + +M src/pop3-login/client-authenticate.c + +2017-11-25 15:55:41 +0100 Stephan Bosch (ad3e5fb08) + + imap-login: Properly recognize an empty SASL initial response. + + Pass only the empty string to the auth service and not "=". + +M src/imap-login/client-authenticate.c + +2017-11-25 15:28:32 +0100 Stephan Bosch (e4b72bd73) + + auth: Properly recognize an empty initial SASL response. + + It was erroneously handled as an absent initial response. Restructured the + code for clarity and changed the comments: '=' should not be passed to SASL + layer at all. + +M src/auth/auth-request-handler.c + +2017-11-25 18:13:04 +0100 Stephan Bosch (451698c60) + + lib: strfuncs: Fixed value of uchar_empty_ptr not to be NULL. + + +M src/lib/strfuncs.c + +2017-11-27 21:11:30 +0100 Stephan Bosch (76553b164) + + lmtp: proxy: Fix connection settings comparison in + lmtp_proxy_get_connection() when hostip field is set. + + The IP in the hostip field overrides the host setting, which broke the + comparison. + +M src/lmtp/lmtp-proxy.c + +2017-11-27 15:17:52 +0200 Timo Sirainen (e4a7dbe5e) + + lib: mempool-alloconly - Cleanly fail allocations just below SSIZE_T_MAX + + Previously it would have assert-crashed in nearest_power(). + +M src/lib/mempool-alloconly.c + +2017-11-27 15:14:36 +0200 Timo Sirainen (ba1a5db87) + + lib: Use test_expect_fatal_string() for all fatal unit tests + + +M src/lib/test-array.c +M src/lib/test-data-stack.c +M src/lib/test-malloc-overflow.c +M src/lib/test-mempool-allocfree.c +M src/lib/test-mempool-alloconly.c +M src/lib/test-mempool.c +M src/lib/test-printf-format-fix.c + +2017-11-27 15:12:45 +0200 Timo Sirainen (a7d1bd5be) + + lib: Fix mempool-alloconly & mempool-allocfree unit tests + + The "physically impossible size" test was supposed to test calloc()==NULL + failure, but in reality it was triggering asserts before that. + +M src/lib/test-mempool-allocfree.c +M src/lib/test-mempool-alloconly.c + +2017-11-27 15:11:40 +0200 Timo Sirainen (ac72c147a) + + lib: mempool-allocfree - If calloc() fails, include "Out of memory" in the + log line + + +M src/lib/mempool-allocfree.c + +2017-11-27 14:48:25 +0200 Timo Sirainen (f2969642c) + + lib: Fix logging panic message if data stack canary corruption is detected + + The previous code just recursed into the same canary corruption check and + didn't end up logging anything. + +M src/lib/data-stack.c + +2017-11-27 14:42:36 +0200 Timo Sirainen (86ec22553) + + lib: Make sure panics/fatals don't recurse into loops + + +M src/lib/failures.c + +2017-11-27 14:24:41 +0200 Timo Sirainen (37bf0a205) + + lib-test: Add test_expect_fatal_string() + + +M src/lib-test/test-common.c +M src/lib-test/test-common.h + +2017-11-27 14:23:39 +0200 Timo Sirainen (a9a421035) + + lib-test: Cleanup - Move expected_error_str check to its own function + + +M src/lib-test/test-common.c + +2017-11-21 22:13:17 +0200 Aki Tuomi (86ad48745) + + lib-dcrypt: test-crypto and test-stream need lib-ssl-iostream.a fully + + Otherwise the .so file cannot be loaded due to missing symbols + +M src/lib-dcrypt/Makefile.am + +2017-11-21 22:12:56 +0200 Aki Tuomi (a40a4775e) + + login-common: Do not link lib-ssl-iostream.la twice + + It's already in libdovecot.la + +M src/login-common/Makefile.am + +2017-11-24 08:51:14 +0200 Aki Tuomi (83b6900e5) + + configure: Detect --whole-archive in linker + + +M configure.ac +A m4/ld_whole_archive.m4 + +2017-11-24 09:00:24 +0200 Aki Tuomi (dbb1816a7) + + m4: Use CC, not CXX in ld_relro + + +M m4/ld_relro.m4 + +2017-11-27 17:42:14 +0200 Timo Sirainen (24ede7e56) + + replicator: Keep user referenced while dsync is running + + Fixes a crash when user is removed with "doveadm replicator remove" while + dsync is still running. + +M src/replication/replicator/replicator-brain.c + +2017-11-27 17:42:06 +0200 Timo Sirainen (9b2129d5b) + + replicator: Add refcounting to user + + +M src/replication/replicator/replicator-queue.c +M src/replication/replicator/replicator-queue.h + +2017-11-27 01:38:09 +0100 Stephan Bosch (e40c4caaf) + + lmtp: proxy: Fixed use of hostip field after changing the implementation to + use lib-smtp/client broke it. + + Proxy was erroneously doing DNS queries while hostip field was returned from + passdb. + +M src/lmtp/lmtp-proxy.c + +2017-11-27 11:45:05 +0100 Stephan Bosch (933602635) + + lmtp: proxy: Fixed proxying reply from backend server. + + It contained an additional CRLF, which caused problems. + +M src/lmtp/lmtp-proxy.c + +2017-11-27 11:44:23 +0100 Stephan Bosch (57b18ecb6) + + lib-smtp: Implemented function to write an SMTP reply as a single line. + + Needed for proxying in current LMTP code. + +M src/lib-smtp/smtp-reply.c +M src/lib-smtp/smtp-reply.h + +2017-11-27 14:57:09 +0200 Aki Tuomi (c0660f13a) + + configure: Fix Lua conditionals + + +M configure.ac +M m4/want_lua.m4 +M src/auth/Makefile.am +M src/auth/test-lua.c +M src/lib-lua/Makefile.am + +2017-11-27 14:56:07 +0200 Aki Tuomi (d5b03874c) + + configure: Drop LuaJIT support + + Does not work with our custom allocator + +M configure.ac +M m4/want_lua.m4 + +2017-11-27 12:32:54 +0200 Aki Tuomi (6b98c595a) + + lib: mempool-allocfree - include overhead in size check + + Found by valgrind + +M src/lib/mempool-allocfree.c + +2017-11-27 11:58:39 +0200 Timo Sirainen (b2117031b) + + director: Fix logging of uninitialized PONG buffer size + + PONG always has 0 or 2 parameters. The easiest fix here is to just not even + try to support 1 parameter. + +M src/director/director-connection.c + +2017-11-27 00:54:56 +0100 Stephan Bosch (606ce50a4) + + lib-smtp: client: Fixed cleanup of untriggered transaction timeout. + + +M src/lib-smtp/smtp-client-transaction.c + +2017-11-26 23:00:30 +0200 Timo Sirainen (769f5c2d6) + + director: Fix delayed request count in ps title after request timeouts + + The timeouts weren't shrinking the delayed request count. This didn't cause + any other problems. + +M src/director/director-request.c + +2017-11-25 01:59:47 +0200 Timo Sirainen (e4e8301f2) + + lib-program-client: Ignore ostream error handling + + +M src/lib-program-client/program-client.c + +2017-10-29 18:36:25 +0100 Stephan Bosch (9051b704c) + + lib-smtp: Implemented test suite for client errors. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/test-smtp-client-errors.c + +2017-11-05 21:51:02 +0100 Stephan Bosch (6f0862951) + + lib-test: Reset expected errors state at each test. + + +M src/lib-test/test-common.c + +2017-11-08 01:51:19 +0100 Stephan Bosch (9e33e0ae1) + + lib-lda: Added support for message submission with SSL. + + +M src/lib-lda/Makefile.am +M src/lib-lda/mail-send.c + +2017-05-07 14:58:05 +0200 Stephan Bosch (ac8f4f30d) + + lib-smtp: smtp-submit: Added SSL support. + + +M src/lib-lda/mail-send.c +M src/lib-smtp/smtp-submit-settings.c +M src/lib-smtp/smtp-submit-settings.h +M src/lib-smtp/smtp-submit.c +M src/lib-smtp/smtp-submit.h +M src/lib-smtp/test-smtp-submit.c + +2017-09-16 20:10:39 +0200 Stephan Bosch (eea481b79) + + lib-smtp: smtp-submit: Use mail_debug setting to enable debug logging. + + When sendmail is used, this logs program_client debug messages. When SMTP is + used (submission_host), this logs smtp_client debug messages. + +M src/lib-smtp/smtp-submit-settings.c +M src/lib-smtp/smtp-submit-settings.h +M src/lib-smtp/smtp-submit.c +M src/lib-smtp/test-smtp-submit.c + +2017-09-16 20:09:22 +0200 Stephan Bosch (bce4997c6) + + lib-smtp: Dropped old lmtp-client. + + It is now unused. + +M src/lib-smtp/Makefile.am +D src/lib-smtp/lmtp-client.c +D src/lib-smtp/lmtp-client.h + +2017-01-22 15:27:29 +0100 Stephan Bosch (09cd81709) + + lmtp: proxy: Changed implemention to use lib-smtp/smtp-client. + + +M src/lmtp/client.h +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-01-22 15:26:32 +0100 Stephan Bosch (7c8257bb0) + + lib-smtp: smtp-submit: Changed submission_host implementation to use + lib-smtp/smtp-client. + + +M src/lib-lda/mail-send.c +M src/lib-smtp/smtp-submit.c +M src/lib-smtp/smtp-submit.h +M src/lib-smtp/test-smtp-submit.c + +2017-11-20 23:30:37 +0100 Stephan Bosch (70eaddb11) + + lib-smtp: smtp-submit: Small whitespace fix. + + +M src/lib-smtp/test-smtp-submit.c + +2017-11-04 14:38:39 +0100 Stephan Bosch (211fdbe70) + + lib-smtp: smtp-submit: Remove erroneously copy-pasted FIXMEs. + + +M src/lib-smtp/test-smtp-submit.c + +2016-11-06 22:15:45 +0100 Stephan Bosch (b38889445) + + lib-smtp: Implemented SMTP client. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-client-command.c +A src/lib-smtp/smtp-client-command.h +A src/lib-smtp/smtp-client-connection.c +A src/lib-smtp/smtp-client-connection.h +A src/lib-smtp/smtp-client-private.h +A src/lib-smtp/smtp-client-transaction.c +A src/lib-smtp/smtp-client-transaction.h +A src/lib-smtp/smtp-client.c +A src/lib-smtp/smtp-client.h +M src/lib-smtp/smtp-common.h + +2016-11-06 22:00:08 +0100 Stephan Bosch (a8433392e) + + lib-smtp: Implemented SMTP command reply parser. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-reply-parser.c +A src/lib-smtp/smtp-reply-parser.h +A src/lib-smtp/smtp-reply.c +A src/lib-smtp/smtp-reply.h +A src/lib-smtp/test-smtp-reply-parser.c + +2017-10-18 01:03:03 +0200 Stephan Bosch (ad8d2060a) + + lmtp: commands: Grouped deliver context field assignments by topic in + client_deliver(). + + +M src/lmtp/commands.c + +2016-11-06 19:09:30 +0100 Stephan Bosch (de0971aff) + + lib-lda: Added SMTP parameter fields to struct mail_deliver_context. + + This moves the original recipient field inside the SMTP parameters. This + also affects both lda and lmtp. Changes are applied there accordingly. + +M src/lda/main.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-deliver.h +M src/lmtp/client.h +M src/lmtp/commands.c + +2016-11-06 21:39:07 +0100 Stephan Bosch (39bf54004) + + lib-smtp: Implemented parsing, manipulation, and encoding for SMTP command + parameters. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-common.c +A src/lib-smtp/smtp-common.h +A src/lib-smtp/smtp-params.c +A src/lib-smtp/smtp-params.h +A src/lib-smtp/test-smtp-params.c + +2016-11-06 21:29:59 +0100 Stephan Bosch (3e2f71514) + + lib-smtp: Implemented parsing and encoding for common SMTP syntax elements. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-syntax.c +A src/lib-smtp/smtp-syntax.h + +2016-11-06 13:45:57 +0100 Stephan Bosch (c66368748) + + lib-lda: mail-send: Changed recipient argument type of mail_send_rejection() + to struct smtp_address. + + +M src/lda/main.c +M src/lib-lda/mail-send.c +M src/lib-lda/mail-send.h + +2017-10-29 23:39:55 +0100 Stephan Bosch (ca3aed470) + + lib-mail: message-address: Dropped message_detail_address_parse(), since it + is no longer used. + + +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h +M src/lib-mail/test-message-address.c + +2017-10-29 23:41:44 +0100 Stephan Bosch (52f611288) + + plugins/quota: quota-status service: Changed recipient address parsing to + use lib-smtp. + + +M src/plugins/quota/Makefile.am +M src/plugins/quota/quota-status.c + +2016-11-05 14:47:53 +0100 Stephan Bosch (3d7828efd) + + lib-lda: Changed struct mail_deliver_context address fields to use the new + struct smtp_address type. + + +M src/lda/Makefile.am +M src/lda/main.c +M src/lib-lda/Makefile.am +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-deliver.h +M src/lib-lda/mail-send.c +M src/lmtp/client.h +M src/lmtp/commands.c + +2016-11-04 18:35:59 +0100 Stephan Bosch (033c07cfd) + + lda: Renamed variables and parameters for consistency with lib-smtp. + + +M src/lda/main.c + +2016-11-03 00:20:55 +0100 Stephan Bosch (a77f136d3) + + lib-lda: Renamed struct mail_deliver_context fields for consistency with + lib-smtp. + + New fields are added in subsequent commits. + +M src/lda/main.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-deliver.h +M src/lib-lda/mail-send.c +M src/lmtp/commands.c + +2016-11-04 18:16:52 +0100 Stephan Bosch (d13bee3f3) + + lmtp: Removed lmtp_address_translate setting. + + It is assumed not to be used. + +M src/lmtp/commands.c +M src/lmtp/lmtp-settings.c +M src/lmtp/lmtp-settings.h + +2017-11-05 02:00:43 +0100 Stephan Bosch (fbad2d107) + + lib-mail: message-address: Added convenience functions that convert (single) + addresses to string. + + +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h + +2017-10-19 15:20:04 +0200 Stephan Bosch (cc77c1cfe) + + lib-mail: message-address: Added functions to initialize a struct + message_address. + + +M src/lib-mail/Makefile.am +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h + +2017-10-29 23:37:47 +0100 Stephan Bosch (61ae3dd36) + + lib-smtp: address: Created SMTP address detail parsing function from + message_detail_address_parse(). + + +M src/lib-smtp/smtp-address.c +M src/lib-smtp/smtp-address.h +M src/lib-smtp/test-smtp-address.c + +2016-11-06 21:15:41 +0100 Stephan Bosch (03f08e4ab) + + lib-smtp: Implemented parsing, manipulation and encoding of SMTP addresses. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-address.c +A src/lib-smtp/smtp-address.h +A src/lib-smtp/test-smtp-address.c + +2016-11-06 21:08:11 +0100 Stephan Bosch (93bedc855) + + lib-smtp: Implemented generic parser for basic SMTP data items. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-parser.c +A src/lib-smtp/smtp-parser.h + +2017-10-27 19:43:43 +0200 Stephan Bosch (4b9e7a875) + + lib: connection: Added means to initialize connection to just be added to + the connection list. + + +M src/lib/connection.c +M src/lib/connection.h + +2017-10-19 14:04:20 +0200 Stephan Bosch (e98ba66a8) + + lib-storage: Make parsed postmaster_address available in + mail_storage_settings->parsed_postmaster_address. + + +M src/config/Makefile.am +M src/lib-lda/mail-send.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h +M src/plugins/mail-crypt/test-mail-key.c + +2017-10-21 13:13:00 +0200 Stephan Bosch (3c0032978) + + lib-settings: Added support for running checks after variable expansion. + + +M src/lib-settings/settings-parser.c +M src/lib-settings/settings-parser.h + +2017-11-22 21:02:07 +0100 Stephan Bosch (6ee910623) + + lmtp: Accept XCLIENT ADDR field IPv6 address both with and without "IPV6:" + prefix. + + This is the format that Postfix actually prescribes. The new lib-smtp will + add the prefix by default. + +M src/lmtp/commands.c + +2017-11-20 01:26:21 +0100 Stephan Bosch (9ab7221da) + + lib: llist: Fixed setting (after)->next->prev in DLLIST2_INSERT_AFTER_FULL. + + This function was not yet used, so the problem did not affect existing code. + +M src/lib/llist.h + +2017-02-26 03:19:51 +0000 Josh Soref (29357a858) + + lib-settings: Fix spelling of 'expanded' + + +M src/lib-master/master-service-settings.c +M src/lib-settings/settings-parser.c +M src/lib-settings/settings-parser.h + +2017-11-26 02:11:57 +0200 Timo Sirainen (68953330a) + + imap: Make sure command handlers are called with ostream corked + + This wasn't done when client input was continued. If COPY/MOVE was called + there, it crashed with: + + Panic: file cmd-copy.c: line 50 (fetch_and_copy): assertion failed: + (o_stream_is_corked(client->output)) + +M src/imap/imap-client.c + +2017-11-26 12:33:33 +0200 Timo Sirainen (f0a21708f) + + director: DIRECTOR-LIST - Return results sorted by host + + +M src/director/doveadm-connection.c + +2017-11-26 12:26:27 +0200 Timo Sirainen (27f553b28) + + director: DIRECTOR-LIST - Move connection/host output to their own functions + + +M src/director/doveadm-connection.c + +2017-11-26 12:36:54 +0200 Timo Sirainen (6e54fd2be) + + director: Make director_host_cmp_p() public + + +M src/director/director-host.c +M src/director/director-host.h + +2017-11-24 18:46:19 +0200 Timo Sirainen (91b0bd6e7) + + director: Improve PING/PONG timeout errors and add new warnings + + Log a warning if PING-PONG takes over 5 secs in total, or also if the + recipient notices that the PING took >= 5 seconds to receive. + +M src/director/director-connection.c + +2017-11-24 18:22:04 +0200 Timo Sirainen (2adcf55dd) + + director: Add director_ping_idle/max_timeout setting. + + director_ping_idle_timeout is used when there's otherwise no input coming + from the connection. Changed its default from 10 secs to 30 secs. + + director_ping_max_timeout is used when the other director keeps sending + input, but among it is no PONG reply. + +M src/director/director-connection.c +M src/director/director-settings.c +M src/director/director-settings.h + +2017-11-24 18:18:45 +0200 Timo Sirainen (8506e63fd) + + director: Log exactly how long PING was waited on before it timed out. + + +M src/director/director-connection.c + +2017-11-26 12:20:26 +0200 Timo Sirainen (193a587e5) + + director: DIRECTOR-LIST - Add "ring " prefix to self's status + + This is to make it a bit easier to understand the difference between a + connection's "handshaking" state vs. "ring handshaking" state. + +M src/director/doveadm-connection.c + +2017-11-26 12:19:36 +0200 Timo Sirainen (5cdaaf2ec) + + director: DIRECTOR-LIST - Show number of USERs sent/received in + "handshaking" state + + +M src/director/director-connection.c +M src/director/director-connection.h +M src/director/doveadm-connection.c + +2017-11-26 12:13:35 +0200 Timo Sirainen (e5ef6fa61) + + director: Include number of users sent in handshake in disconnection log + lines + + +M src/director/director-connection.c + +2017-11-26 03:45:00 +0200 Timo Sirainen (dd19de9b6) + + director: Show number of incoming USERs/sec in ps title + + +M src/director/director-connection.c +M src/director/director.h +M src/director/main.c + +2017-11-25 23:28:12 +0200 Timo Sirainen (58a102564) + + director: Include number of USERs received in disconnection log lines + + Separate handshake and refresh USERs. + +M src/director/director-connection.c + +2017-11-25 10:01:31 +0200 Timo Sirainen (14660f677) + + director: Don't send USERs in handshake that were already sent between + handshake + + If the user was refreshed since the handshake was started, it means that the + same user was already sent to the other side (added to the stream + immediately after it was received/handled). There's no need to send it + again. + + This fixes a potentally infinite handshake when users are rapidly changing + and the handshake iterator never sees the end of the list. (Each refreshed + user is moved to the end of the list, so handshaking can keep sending the + same user over and over again.) + +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h +M src/director/doveadm-connection.c +M src/director/test-user-directory.c +M src/director/user-directory.c +M src/director/user-directory.h + +2017-11-25 10:05:27 +0200 Timo Sirainen (efd72f055) + + director: Delay sorting users until there are no more user iterators + + This shouldn't have normally happened. Only when an outgoing handshake was + going on at the same time as a) another outgoing handshake was going on, or + b) doveadm was doing HOST-RESET-USERS + +M src/director/user-directory.c + +2017-11-26 01:31:08 +0200 Timo Sirainen (edaa9f5c3) + + director: Avoid USER loops with >1s ring latency also with old directors + + Do this by ignoring USER refreshes that were already updated recently. The + "recently" is calculated by director_user_expire/4 seconds ago, but with an + upper limit of 15 secs. This means that the USER loops can now only exist if + the director ring latency is above 15 seconds. (Once all directors in the + ring are running the new version, there's no looping at any latency.) + +M src/director/director-connection.c + +2017-11-26 01:19:35 +0200 Timo Sirainen (b3e36790c) + + director: Avoid USER loops when ring latency is over 1 second + + Do this by adding a timestamp parameter to USER events. This way if it takes + over 1 second for the USER event to traverse the ring, it won't get into an + infinite loop getting the user updated over and over again. + +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h +M src/director/user-directory.h + +2017-11-26 01:14:01 +0200 Timo Sirainen (05b7b8f14) + + director: Replace USER command during handshake with "U" + + This clearly differentiates the two commands and allows extending the USER + command with new parameters without mixing it up with the handshake-USER. + +M src/director/director-connection.c +M src/director/director.h + +2017-11-26 01:06:43 +0200 Timo Sirainen (154f91726) + + director: Ignore refresh requests for already expired user timestamps + + +M src/director/director-connection.c + +2017-11-17 13:24:59 +0200 Timo Sirainen (94fb15fff) + + director: Keep users unsorted during handshake and sort them at the end + + This is simpler and sometimes more efficient than the current way of + immediately inserting the users to the correct place in the linked list. + This is especially useful if handshaking is mixed with regular USER updates, + because each switch between them required walking the linked list backwards + to find the proper insert position. + + It's not a big problem if the users list is temporarily unordered. It mainly + means that some of the users won't be expired as early as they should have. + +M src/director/director-connection.c +M src/director/user-directory.c + +2017-11-17 18:53:18 +0200 Timo Sirainen (0e94f6c27) + + director: Make sure users are sorted after unfinished handshake + + The users were sorted after the handshake was finished, but if the + connection was closed before that hapepned, the users were left unsorted. + This could have caused the users to not expire early enough. + +M src/director/director-connection.c + +2017-11-17 14:56:20 +0200 Timo Sirainen (04c8a9554) + + director: Make sure user's timestamp isn't set to future + + The sending director could have the system clock slightly in the future. + +M src/director/director-connection.c + +2017-11-21 23:07:56 +0200 Aki Tuomi (c147bff81) + + global: Use t_buffer_create + + sed -i -e 's/buffer_create_dynamic(pool_datastack_create(), + */t_buffer_create(/g' + +M src/auth/auth-policy.c +M src/auth/auth-request-handler.c +M src/auth/auth-request-stats.c +M src/auth/db-checkpassword.c +M src/auth/password-scheme-scram.c +M src/auth/password-scheme.c +M src/config/old-set-parser.c +M src/doveadm/client-connection-tcp.c +M src/doveadm/doveadm-fs.c +M src/doveadm/dsync/dsync-mailbox-state.c +M src/imap-login/client-authenticate.c +M src/lib-compression/test-compression.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/ostream-encrypt.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dict-backend/dict-sql.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap/imap-url.c +M src/lib-index/mail-cache-fields.c +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-index-sync-keywords.c +M src/lib-index/mail-index-transaction-export.c +M src/lib-index/mail-index-view-sync.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-mail/test-istream-binary-converter.c +M src/lib-mail/test-ostream-dot.c +M src/lib-mail/test-quoted-printable.c +M src/lib-master/master-auth.c +M src/lib-sql/driver-test.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/mail-search.c +M src/lib/base32.c +M src/lib/base64.c +M src/lib/hash-method.c +M src/lib/hmac.c +M src/lib/pkcs5.h +M src/lib/test-buffer.c +M src/lib/test-hex-binary.c +M src/lib/test-iostream-pump.c +M src/lib/test-numpack.c +M src/lib/test-ostream-failure-at.c +M src/login-common/client-common.c +M src/login-common/sasl-server.c +M src/plugins/acl/acl-cache.c +M src/plugins/fts-lucene/Snowball.cc +M src/plugins/imap-stats/imap-stats-plugin.c +M src/plugins/mail-crypt/mail-crypt-global-key.c +M src/plugins/mail-crypt/test-mail-global-key.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/stats/mail-stats-connection.c +M src/plugins/virtual/virtual-sync.c +M src/pop3-login/client-authenticate.c +M src/stats/mail-command.c +M src/stats/mail-session.c +M src/stats/mail-user.c +M src/util/script.c + +2017-11-21 22:57:30 +0200 Aki Tuomi (4d0200e20) + + lib: buffer - Add t_buffer_create + + Helper for making a datastack buffer + +M src/lib/buffer.h + +2017-11-24 12:31:22 +0200 Timo Sirainen (06ff86fc9) + + lib-storage: Fix sorting mails with the same primary sort key + + The sorting order may have been wrong when there was a combination of: + * Messages were sorted by a string (e.g. Subject) + * Some messages had the same sort key (e.g. same base subject) + * Within the messages with the same sort key, some of the messages already + had the "sort-*" index number in Dovecot indexes, but some of them + didn't. + + The result was that Dovecot found that the two messages had exactly the same + sort key. It should have continued with the secondary sort key (e.g. message + sequence number), but it didn't. + +M src/lib-storage/index/index-sort-string.c + +2017-11-08 15:42:32 +0200 Aki Tuomi (9698cd243) + + auth: Add lua passdb/userdb support + + +M src/auth/Makefile.am +M src/auth/auth-request-var-expand.h +A src/auth/db-lua.c +A src/auth/db-lua.h +A src/auth/passdb-lua.c +M src/auth/passdb.c +M src/auth/test-auth.h +A src/auth/test-lua.c +M src/auth/test-main.c +M src/auth/test-mock.c +A src/auth/userdb-lua.c +M src/auth/userdb.c +M src/lib-lua/dlua-script-private.h + +2017-11-11 11:55:21 +0200 Aki Tuomi (e88e76e78) + + lib-lua: Add lua helper library + + Provides a base lua library for lua extensibility + +M configure.ac +M src/Makefile.am +A src/lib-lua/Makefile.am +A src/lib-lua/dlua-compat.c +A src/lib-lua/dlua-dovecot.c +A src/lib-lua/dlua-script-private.h +A src/lib-lua/dlua-script.c +A src/lib-lua/dlua-script.h +A src/lib-lua/test-lua.c + +2017-11-08 14:09:26 +0200 Aki Tuomi (feaa7d395) + + configure: Detect lua + + +M configure.ac +A m4/want_lua.m4 + +2017-11-15 19:13:39 +0200 Aki Tuomi (38f53f9d3) + + auth: Add accessor for userdb-template fields + + It's needed in lua + +M src/auth/userdb-template.c +M src/auth/userdb-template.h + +2017-11-08 13:30:24 +0200 Aki Tuomi (8734467f3) + + mempool-allocfree: Add linked-list malloc allocation + + This is useful when you want to actually free memory from pool too + +M src/lib/Makefile.am +A src/lib/mempool-allocfree.c +M src/lib/mempool.h +M src/lib/test-lib.inc +A src/lib/test-mempool-allocfree.c + +2017-11-24 09:52:24 +0200 Aki Tuomi (2945c7c61) + + stats: Do not log errors if /proc/self/io is not accessible + + Some security options, used notably in docker, can prevent access to this + file even from root, so do not log errors if the error is EACCES. + +M src/plugins/stats/mail-stats-fill.c + +2017-11-20 09:46:48 -0500 Josef 'Jeff' Sipek (4ee65ee39) + + lib: test-path-util - whitespace & coding style cleanup in create_links() + + +M src/lib/test-path-util.c + +2017-11-22 10:49:49 +0200 Aki Tuomi (2bd58dc6e) + + auth: Check that key is not empty in passdb or userdb template + + Prevents nasty crash later on if template has 'key = value' + + dovecot: auth: Panic: file auth-request.c: line 1746 + (auth_request_set_field): assertion failed: (*name != '\0') + +M src/auth/passdb-template.c +M src/auth/userdb-template.c + +2017-11-22 12:16:46 +0200 Timo Sirainen (4e3b79ac7) + + lib-storage: Add mailbox_set_critical() and mail_set_critical() + + These add the mailbox vname and mail UID to the log prefix and then call + mail_storage_set_critical(). + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-11-22 12:02:11 +0200 Timo Sirainen (9f1038760) + + login-proxy: Fix hang in outgoing SSL connections + + The handshaking needs to be started explicitly. + +M src/login-common/login-proxy.c + +2017-11-21 16:52:24 +0200 Timo Sirainen (5783df913) + + login-proxy: Log connection errors using IP, not hostname + + The hostname can point to multiple IPs or there can be some other mismatch. + Logging the IP instead shows exactly what is happening. + +M src/login-common/login-proxy.c + +2017-11-20 21:17:24 +0100 Stephan Bosch (89155c663) + + lib: path-util: Improved conditional expressions in path_normalize() to + match the earlier adjusted assertions. + + Added some more assertions in the process to make sure subtractions are + always valid. + +M src/lib/path-util.c + +2017-11-20 15:53:55 +0200 Timo Sirainen (71acd1d08) + + lib: Improve test-path-util unit test to catch off-by-one memory allocation + errors + + +M src/lib/test-path-util.c + +2017-11-20 16:01:25 +0200 Aki Tuomi (569b5022d) + + lib: path-util - Allocate more space earlier + + Fixes assert crash in path_normalize when termination needs to happen at + asize boundary. + + Panic: file path-util.c: line 93 (path_normalize): assertion failed: + ((size_t)((npath_pos - npath) + 1) < asize) + +M src/lib/path-util.c + +2017-11-20 17:56:52 +0200 Martti Rannanjärvi (82e776175) + + lib-storage: Add a fall through comment to fix gcc-7 warning + + +M src/lib-storage/mailbox-list.c + +2017-11-20 17:03:47 +0200 Timo Sirainen (7f42dc942) + + mdbox: Fix rebuilding when dovecot.map.index is missing map/ref extension + + The rebuild kept just repeatedly failing with: Error: mdbox map + .../dovecot.map.index corrupted: missing map extension + +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c + +2017-11-18 23:14:25 +0200 Timo Sirainen (eaebd98a2) + + lib-storage: Fix mailbox_create_missing_dir() with storages that have no + mail root dir + + The mailbox still exists even if the mail root directory doesn't, so there's + no point in even trying to stat() it. + +M src/lib-storage/mail-storage.c + +2017-11-18 23:10:47 +0200 Timo Sirainen (3fdbff368) + + lib-storage: Make sure mailbox autocreation doesn't get into infinite loop + + If mailbox_create() -> mailbox_open() fails with MAIL_ERROR_NOTFOUND, it + would have looped back to mailbox_create() and continued this until running + out of stack. + +M src/lib-storage/mail-storage.c + +2017-11-18 18:57:51 +0200 Timo Sirainen (638600575) + + lib-storage: Add INDEXCACHE= to mail_location + + This allows configuring a different directory for dovecot.index.cache files + than the rest of the index files. + +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/list/mailbox-list-maildir.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-11-20 14:28:40 +0200 Timo Sirainen (da613017f) + + lib-storage: mailbox_rename() - Improve debug logging when namespaces are + incompatible + + +M src/lib-storage/mail-storage.c + +2017-11-18 18:12:10 +0200 Timo Sirainen (72af6886c) + + lib-index: Add mail_index_set_cache_dir() to change .cache's directory + + +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h + +2017-11-18 18:03:55 +0200 Timo Sirainen (2608ab449) + + lib-index: Add mail_cache_open_or_create_path() + + This allows moving cache file to another directory. + +M src/lib-index/mail-cache.c +M src/lib-index/mail-cache.h + +2017-11-18 00:44:12 +0200 Timo Sirainen (ca0cfbcd1) + + virtual: Fix crash when saving to virtual mailbox whose physical box doesn't + exist + + For example if using "!foo" in dovecot-virtual and "foo" doesn't exist, it + crashed. Now it gives a nice error message instead. + +M src/plugins/virtual/virtual-storage.c + +2017-11-18 19:06:55 +0100 Stephan Bosch (1c8b68cab) + + lib: path-util: Made assertions in path_normalize() more reliable and less + confusing to static analyzer. + + +M src/lib/path-util.c + +2017-11-17 22:37:00 +0200 Timo Sirainen (d7a2f56cd) + + lib: path-util - Add more code paths to test in path_normalize() + + +M src/lib/test-path-util.c + +2017-11-17 21:44:50 +0200 Timo Sirainen (489af46c6) + + virtual: Wrap mail.get_binary_stream() to fix it + + Fixes using FETCH BINARY[..] with virtual mailboxes crashing with: + + Panic: file index-mail-binary.c: line 585 (index_mail_get_binary_stream): + assertion failed: (mail->data.stream != NULL) + +M src/plugins/virtual/virtual-mail.c + +2017-11-17 20:56:28 +0200 Timo Sirainen (948dccd80) + + quota: Fix error handling if maildirsize rewrite fails after recalculation + + error could have been left uninitialized, potentially causing a crash. + +M src/plugins/quota/quota-maildir.c + +2017-11-17 20:55:55 +0200 Timo Sirainen (1f8e934c6) + + fts-lucene: Fix potential memory leak + + +M src/plugins/fts-lucene/lucene-wrapper.cc + +2017-11-17 20:53:41 +0200 Timo Sirainen (bcf23eed0) + + lib-dcrypt: test-stream - Make static analyzer happier + + Without this clang thinks it's possible that siz>sizeof(payload). + +M src/lib-dcrypt/test-stream.c + +2017-11-15 14:29:59 +0200 Aki Tuomi (c560fa078) + + doveadm-auth-server: Further fix json problems + + Remove excess comma from start, forgotten in + 3e06a782584ea2c4ae2a8cb0451e9952f05f9dc8 + +M src/doveadm/doveadm-auth-server.c + +2017-11-09 15:33:52 +0200 Timo Sirainen (6d548041b) + + lib-charset: Compile charset-utf8-only code always + + Mainly so that this code always gets compiled, so any bugs are found. + +M src/lib-charset/charset-utf8-only.c + +2017-11-09 15:18:29 +0200 Timo Sirainen (9c675d5e5) + + lib-charset: Allow plugins to replace charset_* functions + + They just need to point charset_utf8_vfuncs to their own implementation. + +M src/lib-charset/Makefile.am +M src/lib-charset/charset-iconv.c +M src/lib-charset/charset-utf8-only.c +A src/lib-charset/charset-utf8-private.h +M src/lib-charset/charset-utf8.c + +2017-11-09 15:12:05 +0200 Timo Sirainen (5b9bacdb8) + + lib-charset: Move non-iconv UTF-8 only translation code to its own file + + +M src/lib-charset/Makefile.am +A src/lib-charset/charset-utf8-only.c +M src/lib-charset/charset-utf8.c + +2017-11-16 13:27:23 +0200 Aki Tuomi (abd2ac9eb) + + mail-crypt: Do not free global keys if no error has occured + + +M src/plugins/mail-crypt/mail-crypt-pluginenv.c + +2017-11-16 00:53:34 +0200 Timo Sirainen (d59673943) + + director: Make sure a missing right-side connection is always reconnected + + This code shouldn't be needed, but add it just to be sure. + +M src/director/director.c + +2017-11-16 00:44:17 +0200 Timo Sirainen (3a7a8b368) + + director: Reconnect after detecting a write failure to director + + If disconnection is detected during write failure, or "Output buffer full" + occurs, the connection is disconnected. However, if this was the right side + connection, it wasn't automatically reconnected to. This left the ring + nonworking. + +M src/director/director-connection.c + +2017-11-15 12:57:34 +0200 Timo Sirainen (0a222deff) + + global: Replace o_stream_ignore_last_errors() with o_stream_abort() wherever + possible + + +M src/lib-fs/fs-api.c +M src/lib-mail/test-istream-attachment.c +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/list/subscription-file.c +M src/plugins/fts-squat/squat-uidlist.c + +2017-11-15 12:49:48 +0200 Timo Sirainen (7660a5183) + + lib: Add o_stream_abort() + + +M src/lib/ostream.c +M src/lib/ostream.h + +2017-11-15 12:51:12 +0200 Timo Sirainen (7112c5ac6) + + lib-smtp: Remove unnecessary o_stream_ignore_last_errors() call + + The stream is already marked with o_stream_set_no_error_handling(TRUE). + +M src/lib-smtp/smtp-submit.c + +2017-11-02 10:07:39 -0400 Josef 'Jeff' Sipek (8528048c7) + + lib-storage: Fix MAILBOX_LIST_INDEX_HIERARHCY_SEP spelling + + Original work by @jsoref + +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index.h + +2017-11-08 14:40:14 +0200 Timo Sirainen (b8f02c99e) + + doveadm: client - Cleanup: Simplify the input loop + + +M src/doveadm/server-connection.c + +2017-11-08 14:39:06 +0200 Timo Sirainen (4a913ff77) + + doveadm: client - Cleanup: Remove unnecessary stream_errno check + + +M src/doveadm/server-connection.c + +2017-11-09 16:17:26 +0200 Timo Sirainen (73d539741) + + doveadm: client - Cleanup: Remove unnecessary code indentation + + +M src/doveadm/server-connection.c + +2017-11-08 14:35:31 +0200 Timo Sirainen (9f869f9ab) + + doveadm: client - Cleanup: Handle input NULL first + + +M src/doveadm/server-connection.c + +2017-11-09 16:18:13 +0200 Timo Sirainen (20638158a) + + doveadm: client - Cleanup: Set authenticate_sent in a more proper location + + +M src/doveadm/server-connection.c + +2017-11-08 14:32:25 +0200 Timo Sirainen (fd91d0e92) + + doveadm: client - Cleanup: Don't check authenticate_sent twice + + +M src/doveadm/server-connection.c + +2017-11-08 14:20:49 +0200 Timo Sirainen (b52b16e9b) + + doveadm: client - Read any pipelined replies after authentication reply + + This practically shouldn't happen. + +M src/doveadm/server-connection.c + +2017-11-08 14:17:04 +0200 Timo Sirainen (1a492d1e2) + + doveadm: client - Cleanup: Read server input only once in the input handler + + +M src/doveadm/server-connection.c + +2017-11-08 14:11:51 +0200 Timo Sirainen (8a6710d67) + + doveadm: client - Fail if server sends more than one VERSION reply in + handshake + + +M src/doveadm/server-connection.c + +2017-11-15 16:12:15 +0200 Timo Sirainen (04d4432f5) + + *-login: Close SSL connections cleanly + + Don't close the socket before SSL "close notify" is sent. + +M src/login-common/client-common.c + +2017-11-15 15:53:03 +0200 Timo Sirainen (4c5c19b3b) + + lib-imap: imap_envelope_parse() - remove unnecessary data stack frame + + imap_envelope_parse_args() isn't using data stack at all, so this + unnecessarily complicates the code. It also prevents using datastack-pool as + the pool parameter. + +M src/lib-imap/imap-envelope.c + +2017-11-15 09:22:34 +0200 Aki Tuomi (dc8dc2ec4) + + lib-storage: mailbox-list-index - disable if MAILBOX_LIST_PROP_NO_LIST_INDEX + set + + +M src/lib-storage/list/mailbox-list-index.c + +2017-11-13 15:28:08 +0200 Aki Tuomi (18b3f4706) + + lib-storage: imapc - use MAILBOX_LIST_PROP_NO_LIST_INDEX + + mailbox list index does not work with imapc, so disable it. + + Panic: file mail-storage.c: line 1858 (mailbox_get_metadata): assertion + failed: ((items & MAILBOX_METADATA_GUID) == 0 || + !guid_128_is_empty(metadata_r->guid)) + +M src/lib-storage/index/imapc/imapc-list.c + +2017-11-15 09:16:12 +0200 Aki Tuomi (9d41eb0da) + + lib-storage: mailbox-list-none - use MAILBOX_LIST_PROP_NO_LIST_INDEX flag + + +M src/lib-storage/list/mailbox-list-none.c + +2017-11-13 15:27:07 +0200 Aki Tuomi (ba0b86cc4) + + lib-storage: Add MAILBOX_LIST_PROP_NO_LIST_INDEX + + If set, disables mailbox list index for the given list. + +M src/lib-storage/mailbox-list.h + +2017-11-15 10:28:37 +0200 Aki Tuomi (3e06a7825) + + doveadm-auth-server: Send comma only if we are sending field too + + Fixes json output + +M src/doveadm/doveadm-auth-server.c + +2017-11-14 13:49:22 +0200 Martti Rannanjärvi (8b478435d) + + lib-master: Drop support for SSL_TXT_SSLV2 in master-service-ssl-settings.c + + OpenSSL headers are not included in master-service-ssl-settings.c, so the + check for SSL_TXT_SSLV2 is broken at the moment, and the feature is not + worth supporting since SSLv2 is obsolete. + +M src/lib-master/master-service-ssl-settings.c + +2017-11-15 06:13:30 +0200 Martti Rannanjärvi (6f4c61d8c) + + m4: Refuse to build with OpenSSL version < 1.0.1 + + +M m4/ssl.m4 + +2017-11-14 20:14:09 +0200 Timo Sirainen (a0876e2be) + + lib: Add unit test for dec2str_buf() + + +M src/lib/test-strfuncs.c + +2017-11-14 16:51:37 +0200 Timo Sirainen (e1abe6d11) + + auth: Remove userdb nss + + Its original purpose was because getpwnam() couldn't differentiate between + "user doesn't exist" and "temporary error", but this was solved by using + getpwnam_r() instead. + + So all userdb nss users should be able to safely switch to userdb passwd. + +M src/auth/Makefile.am +D src/auth/userdb-nss.c +M src/auth/userdb.c + +2017-11-14 00:09:10 +0200 Timo Sirainen (d43692611) + + imap: SELECT/EXAMINE - Send * OK [CLOSED] before tagged BAD parameters reply + + +M src/imap/cmd-select.c + +2017-11-09 16:30:34 +0200 Timo Sirainen (488bdf71b) + + man: doveadm proxy -a parameter doesn't support TCP sockets + + +M doc/man/doveadm-proxy.1.in + +2017-11-09 07:08:24 +0100 Simon Frankenberger (f987ef063) + + fts-solr: Explicitly ask for XML responses + + With recent solr versions (7.0+) the default response writer changed from + XML to JSON. This commit sets the + "wt" query parameter for all requests, so that the right response type is + written. + +M src/plugins/fts-solr/fts-backend-solr.c + +2017-11-09 10:52:12 -0500 Josef 'Jeff' Sipek (2b55fff01) + + lib: fix illumos build issue + + The recent performance improvements to the net_addr2ip() code broke build on + illumos which has a 's_addr' #define in netinit/in.h. + +M src/lib/net.c + +2017-11-10 10:34:09 +0200 Martti Rannanjärvi (f4bc02a62) + + quota: Exit with EX_TEMPFAIL when doveadm quota get encounters an error + + +M src/plugins/quota/doveadm-quota.c + +2017-11-03 08:38:39 -0400 Josef 'Jeff' Sipek (f4169072a) + + lib: use temp var in i_stream_unref for clarity + + +M src/lib/istream.c + +2017-11-09 12:24:16 +0200 Timo Sirainen (b97e952db) + + director: Fix director_max_parallel_moves/kicks type + + Should be uint, not time. + +M src/director/director-settings.c + +2017-11-08 16:03:17 +0200 Timo Sirainen (f7292478c) + + doveadm: client - Fix connecting to UNIX sockets that don't need + authentication + + Trying to access doveadm UNIX socket that didn't require authentication + failed with: + + Error: doveadm server sent invalid handshake: ... + +M src/doveadm/server-connection.c + +2017-11-08 16:01:11 +0200 Timo Sirainen (d85b09627) + + doveadm: client - Cleanup: Rename handshaked to authenticate_sent + + This better describes what it does. + +M src/doveadm/server-connection.c + +2017-11-03 17:29:37 +0200 Martti Rannanjärvi (93b8808c9) + + quota: Include mailbox name in quota_transaction_set_limits() error_r + + +M src/plugins/quota/quota.c + +2017-11-03 16:17:44 +0200 Martti Rannanjärvi (12d7f667b) + + quota: Prefix quota errors with backend name in quota_get_resource() + + Remove quota backend name error_r prefixing from get_resource() vfuncs. + +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota.c + +2017-11-02 14:02:15 +0200 Martti Rannanjärvi (4f52de745) + + quota: Add error_result_r parameter to quota_count() + + +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-private.h + +2017-11-02 12:11:20 +0200 Martti Rannanjärvi (7ee626fd3) + + quota: Add QUOTA_GET_RESULT_BACKGROUND_CALC enum value + + +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.h + +2017-11-02 12:04:46 +0200 Martti Rannanjärvi (b14f93ea4) + + quota: Add QUOTA_ALLOC_RESULT_BACKGROUND_CALC enum value + + +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h + +2017-11-02 11:37:08 +0200 Martti Rannanjärvi (1379bb74c) + + quota: Return quota_get_result from quota_backend_vfuncs.get_resource() + + Add a QUOTA_UNKNOWN_RESOURCE_ERROR_STRING for returning error_r with + QUOTA_GET_RESULT_UNKNOWN_RESOURCE. + + Forbid backends from returning QUOTA_GET_RESULT_UNLIMITED in + quota_get_resource() with an i_panic(). + +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c + +2017-11-02 10:39:18 +0200 Martti Rannanjärvi (c975f4c0c) + + quota: Add error_result_r parameter to quota_transaction_set_limits() + + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c + +2017-11-02 16:20:39 +0200 Martti Rannanjärvi (e78fe2531) + + quota: Make quota_get_result errors <= QUOTA_GET_RESULT_INTERNAL_ERROR + + Reorder the enum to make a shortcut for distinguishing errors. + +M src/plugins/quota/quota.h + +2017-11-02 16:30:31 +0200 Martti Rannanjärvi (995c0a88e) + + quota-dict: Cleanup dict_quota_get_resource() whitespace + + +M src/plugins/quota/quota-dict.c + +2017-09-20 12:32:40 +0300 Martti Rannanjärvi (bb11a1957) + + quota-clone: Rename ret_bytes and ret_count to bytes_res and count_res + + This is because the variables do not contain the actual quota resource + values but whether the lookup was successful. + +M src/plugins/quota-clone/quota-clone-plugin.c + +2017-11-06 21:00:57 +0200 Timo Sirainen (07ca0c75d) + + lib: test-istream-jsonstr - Improve unit test + + +M src/lib/test-istream-jsonstr.c + +2017-11-08 14:06:00 +0200 Timo Sirainen (40b50a274) + + doveadm-server: Fix protocol handshake order + + With version 1.1 protocol, server sent the authentication "+" or "-" line + before the VERSION. doveadm client accepts the VERSION reply either before + or after, so this change doesn't break it. It makes the protocol cleaner + though. + + Based on patch by Manuel Mausz + +M src/doveadm/client-connection-tcp.c + +2017-11-08 14:04:12 +0200 Timo Sirainen (4addf3fa0) + + doveadm-server: Add client_connection_tcp.preauthenticated + + +M src/doveadm/client-connection-tcp.c + +2017-11-08 02:31:03 +0200 Timo Sirainen (b722fa7ac) + + lib-ssl-iostream: Simplify ssl_iostream_settings_equals() + + +M src/lib-ssl-iostream/iostream-ssl.c + +2017-11-07 17:36:05 +0200 Timo Sirainen (74c369c05) + + director: Add director_max_parallel_moves/kicks settings + + The director_max_parallel_moves setting controls the default limit, which + can still be increased by explicitly using the doveadm director flush + --max-parallel" parameter. + +M src/director/director-settings.c +M src/director/director-settings.h +M src/director/doveadm-connection.c + +2017-11-03 13:26:52 +0200 Aki Tuomi (c33930073) + + lib: istream-jsonstr - Properly handle unicode input + + Treat surrogates correctly, do not accept invalid codepoints + +M src/lib/istream-jsonstr.c +M src/lib/json-parser.c +M src/lib/test-istream-jsonstr.c + +2017-11-03 13:23:15 +0200 Aki Tuomi (d9d28856f) + + lib: istream-jsonstr - Move length check to unescape + + +M src/lib/istream-jsonstr.c + +2017-11-06 14:40:08 +0200 Aki Tuomi (c980536af) + + lib: json-parser - check for valid hex in unicode escape + + +M src/lib/json-parser.c +M src/lib/test-json-parser.c + +2017-11-03 09:50:40 +0200 Aki Tuomi (32bd32dcc) + + lib: json-parser - Insert properly escaped unicode + + +M src/lib/json-parser.c +M src/lib/json-parser.h +M src/lib/test-json-parser.c + +2017-11-07 18:28:37 +0200 Timo Sirainen (2ede3b415) + + configure: Fix writing LIBDOVECOT[_DEPS] in dovecot-config + + It needs to be in a single line or DC_DOVECOT's greping doesn't work + correctly. + +M configure.ac + +2017-11-06 10:36:07 +0200 Aki Tuomi (16a5712c1) + + director: Limit max kicking count + + +M src/director/doveadm-connection.c +M src/director/doveadm-connection.h +M src/director/main.c + +2017-11-07 14:34:32 +0200 Aki Tuomi (3e0c0a269) + + director: Add kick_callback to director + + This callback gets called whenever director has performed a kick. + +M src/director/director.c +M src/director/director.h +M src/director/main.c + +2017-10-27 16:45:16 +0300 Timo Sirainen (296acbadd) + + *-login: Add login_proxy_notify_path setting to configure proxy-notify path + + A single FIFO can be a bottleneck, so this could be set to e.g.: + + login_proxy_notify_path = proxy-notify%1R{pid} + + or: + + login_proxy_notify_path = proxy-notify%10N{pid} + +M src/login-common/login-settings.c +M src/login-common/login-settings.h +M src/login-common/main.c + +2017-10-27 16:24:54 +0300 Timo Sirainen (9dd8a7597) + + director: Allow proxy-notify to optionally be a socket + + Dovecot isn't using this currently, but it can be useful if external + services want to send notifications. + +M src/director/main.c +M src/director/notify-connection.c +M src/director/notify-connection.h + +2017-10-27 16:20:15 +0300 Timo Sirainen (57d65ae19) + + director: Support multiple proxy-notify connections + + +M src/director/main.c +M src/director/notify-connection.c +M src/director/notify-connection.h + +2017-11-07 03:57:49 +0200 Martti Rannanjärvi (d32f4c43d) + + quota-fs: Make it possible to set the mount= parameter + + Also free root->storage_mount_path before copying the given parameter in + order not to leak memory when there are duplicate mount= parameters. + +M src/plugins/quota/quota-fs.c + +2017-11-07 01:33:57 +0200 Timo Sirainen (84703c2f1) + + log: Fix log reopening on SIGUSR1 + + +M src/log/main.c + +2017-11-07 01:11:33 +0200 Timo Sirainen (9c04998b7) + + lib-ssl-iostream: Remove obsolete ssl_iostream_context_deinit() + + +M src/lib-ssl-iostream/iostream-ssl.h + +2017-11-05 18:35:57 +0200 Timo Sirainen (ebcf7d6c9) + + global: Replace ssl_iostream_context_init_client() with + ssl_iostream_client_context_cache_get() + + +M src/doveadm/doveadm-dsync.c +M src/lib-http/http-client.c +M src/lib-imap-client/imapc-client.c +M src/lib-storage/index/pop3c/pop3c-client.c + +2017-11-05 18:34:48 +0200 Timo Sirainen (b583cc2e5) + + lib-ssl-iostream: Call ssl_iostream_context_cache_free() automatically at + exit + + +M src/lib-ssl-iostream/iostream-ssl.c + +2017-11-02 23:36:57 +0200 Timo Sirainen (8d9f11a45) + + lib: Remove net_transmit() + + Its API was confusing, and it's no longer used anywhere. + +M src/lib/net.c +M src/lib/net.h + +2017-11-01 01:51:14 +0200 Timo Sirainen (71bd935db) + + login-common: Remove ssl-proxy code + + +M src/login-common/Makefile.am +D src/login-common/ssl-proxy-gnutls.c +D src/login-common/ssl-proxy-openssl.c +D src/login-common/ssl-proxy.c +D src/login-common/ssl-proxy.h + +2017-11-01 01:49:57 +0200 Timo Sirainen (3e06f836c) + + login-common: Stop using ssl-proxy entirely + + +M src/login-common/client-common.c +M src/login-common/main.c + +2017-11-01 01:49:04 +0200 Timo Sirainen (06704acb3) + + *-login: Remove unnecessary ssl-proxy.h include + + +M src/imap-login/imap-login-client.c +M src/pop3-login/client-authenticate.c +M src/pop3-login/client.c + +2017-11-01 01:47:54 +0200 Timo Sirainen (4635b36b0) + + login-common: Call io_stream_ssl_global_init() early + + +M src/login-common/login-common.h +M src/login-common/main.c + +2017-11-01 01:27:36 +0200 Timo Sirainen (feb8f7b94) + + login-common: Use lib-ssl-iostream for incoming SSL/TLS connections + + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/sasl-server.c + +2017-11-01 01:40:23 +0200 Timo Sirainen (15aa67e8a) + + lib-ssl-iostream: Add io_stream_ssl_global_init() + + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-11-01 01:38:19 +0200 Timo Sirainen (74b7b25c4) + + lib-ssl-iostream: io_stream_create_ssl_client() - Move code to set + verify_remote_cert=TRUE + + Enable it in the generic SSL code instead of OpenSSL-specific code. + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-ssl.c + +2017-11-01 01:21:38 +0200 Timo Sirainen (d920a34df) + + *-login: Use io_add_istream() instead of io_add() + + +M src/imap-login/imap-login-client.c +M src/imap-urlauth/imap-urlauth-login.c +M src/pop3-login/client.c + +2017-11-01 22:48:55 +0200 Timo Sirainen (025618004) + + login-common: Change process title to show different connection types + + Separate pre-login connections, proxy connections and post-login TLS + proxies. + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/login-proxy.c +M src/login-common/login-proxy.h +M src/login-common/main.c + +2017-11-01 22:40:58 +0200 Timo Sirainen (a7efba62b) + + login-common: Destroy all fd proxies at deinit. + + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/main.c + +2017-11-01 02:19:51 +0200 Timo Sirainen (87dbf3e85) + + login-common: Implement post-login proxying and use it with SSL connections + + Note: This temporarily breaks the SSL connections a bit. If post-login + process disconnects the client, it's not noticed by the login process. + Client connections are noticed by the post-login though. + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/sasl-server.c + +2017-11-01 01:06:05 +0200 Timo Sirainen (be6e55ff7) + + login-common: client_alloc() - remove unnecessary ssl parameter + + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/main.c + +2017-11-01 01:03:31 +0200 Timo Sirainen (9b450c91e) + + login-common: Use client_init_ssl() to initialize all SSL connections + + +M src/login-common/main.c + +2017-11-01 00:59:54 +0200 Timo Sirainen (b1485f269) + + login-common: Extract SSL/TLS initialization into client_init_ssl() + + +M src/login-common/client-common.c +M src/login-common/client-common.h + +2017-11-01 00:49:53 +0200 Timo Sirainen (66ea9eaaa) + + login-common: Split client_create() to client_alloc() and client_init() + + client_unref() can be used to free an allocated client that hasn't been + fully created. + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/main.c + +2017-11-02 01:05:01 +0200 Timo Sirainen (14a07d2bb) + + lib-ssl-iostream: Add TLS SNI callback and a way to change SSL context + + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-11-01 00:18:23 +0200 Timo Sirainen (6315f87da) + + lib-ssl-iostream: ssl_iostream_cert_match_name() - add reason_r parameter + + The callers were also changed to add the reason to error messages. + +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-11-01 00:12:24 +0200 Timo Sirainen (bbafd34da) + + lib-ssl-iostream: openssl_cert_match_name() - add reason_r parameter + + The returned string explains what exactly matched or why nothing matched. + +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/login-common/ssl-proxy-openssl.c + +2017-11-01 00:08:26 +0200 Timo Sirainen (18344a653) + + lib-ssl-iostream: ssl_iostream_cert_match_name() - Change to return bool + + The return value makes much more sense as a boolean TRUE/FALSE than 0/-1. + +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h +M src/login-common/ssl-proxy-openssl.c + +2017-10-31 19:34:05 +0200 Timo Sirainen (58c2ffe05) + + login-proxy: Use lib-ssl-iostream for outgoing SSL/TLS connections + + +M src/login-common/login-proxy.c +M src/login-common/main.c + +2017-11-01 00:35:33 +0200 Timo Sirainen (b5af146ec) + + lib-master: master_service_ssl_settings_to_iostream_set() - add + client/server parameter + + +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h + +2017-10-31 23:24:17 +0200 Timo Sirainen (8ca7d305e) + + lib-master: master_service_ssl_settings_to_iostream_set() - reorder + assignments + + Keep them in the same order as the fields in struct ssl_iostream_settings, + so it's easier to verify whether all fields are listed. + +M src/lib-master/master-service-ssl-settings.c + +2017-10-31 23:23:10 +0200 Timo Sirainen (30c5c1fc3) + + lib-master: master_service_ssl_settings_to_iostream_set() - add + ssl_require_crl + + +M src/lib-master/master-service-ssl-settings.c + +2017-10-31 18:57:29 +0200 Timo Sirainen (75eb71389) + + lib-master: master_service_ssl_settings_to_iostream_set() - don't go through + master_service + + It's more useful to convert any master_service_ssl_settings struct. + +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h + +2017-11-01 00:26:02 +0200 Timo Sirainen (6d4fb028a) + + lib-master: Add ssl_client_ca_file & _dir to master_service_ssl_settings + + +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h + +2017-11-02 01:04:00 +0200 Timo Sirainen (86cc86047) + + lib-ssl-iostream: Add ssl_iostream_context cache + + This can be used to easily get a shared ssl_iostream_context for either + server or client. There's no upper size limit for the cache. + +M src/lib-ssl-iostream/Makefile.am +A src/lib-ssl-iostream/iostream-ssl-context-cache.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-11-05 18:30:42 +0200 Timo Sirainen (85a594cdf) + + lib-ssl-iostream: Add ssl_iostream_settings_drop_stream_only() + + +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c + +2017-11-05 18:29:13 +0200 Timo Sirainen (1c1896564) + + lib-ssl-iostream: Add ssl_iostream_settings_equals() + + +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c + +2017-10-31 18:43:22 +0200 Timo Sirainen (3c376d8f5) + + lib-ssl-iostream: Keep ssl_iostream_context referenced while it has streams + + +M src/lib-ssl-iostream/iostream-openssl.c + +2017-10-31 18:41:47 +0200 Timo Sirainen (96359599b) + + lib-ssl-iostream: Add refcounting to ssl_iostream_context + + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-31 18:39:39 +0200 Timo Sirainen (15d19d6e4) + + global: Rename ssl_iostream_context_deinit() to ssl_iostream_context_unref() + + +M src/doveadm/doveadm-dsync.c +M src/lib-http/http-client.c +M src/lib-http/http-server.c +M src/lib-imap-client/imapc-client.c +M src/lib-master/master-service-ssl.c +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h +M src/lib-storage/index/pop3c/pop3c-client.c + +2017-10-30 16:55:43 +0200 Timo Sirainen (319bc5ff4) + + lib-ssl-iostream: Change ssl_iostream_context.set to not be a pointer + + It's just unnecessary memory usage. + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h + +2017-10-31 18:19:33 +0200 Timo Sirainen (25aa88dd9) + + lib-ssl-iostream: ssl_iostream_settings_dup() - rewrite using string offsets + array + + This array will be useful for other purposes as well. + +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-30 16:54:34 +0200 Timo Sirainen (cfa1edd02) + + lib-ssl-iostream: Add ssl_iostream_settings_init_from() + + This allows duplicating settings to an already existing struct without + having to allocate it. + +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-30 12:57:40 +0200 Timo Sirainen (e88f4d3dd) + + lib-ssl-iostream: ssl_iostream_settings_dup() - duplicate also dh + + +M src/lib-ssl-iostream/iostream-ssl.c + +2017-10-30 12:06:01 +0200 Timo Sirainen (4c21d44ce) + + lib-ssl-iostream: Add stream/context comments to all ssl_iostream_settings + + +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-30 00:44:41 +0200 Timo Sirainen (5f24bf9ba) + + login-proxy: Use iostream-proxy API to perform proxying + + +M src/login-common/login-proxy.c + +2017-10-30 00:59:01 +0200 Timo Sirainen (f8b6c3d6b) + + lib: Add o_stream_get_last_write_time() + + +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h + +2017-10-30 00:49:15 +0200 Timo Sirainen (a215abacb) + + lib: Add i_stream_get_last_read_time() + + +M src/lib/istream-private.h +M src/lib/istream.c +M src/lib/istream.h + +2017-11-01 23:53:42 +0200 Timo Sirainen (1312cf655) + + login-proxy: Move client fd closing to client_unref() + + +M src/login-common/client-common.c +M src/login-common/login-proxy.c + +2017-11-01 21:15:53 +0200 Timo Sirainen (86bca14f7) + + login-common: Move code in client_destroy_internal_failure() to its only + caller + + No need to have a function that has only a single caller. + +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h + +2017-11-01 21:09:56 +0200 Timo Sirainen (1a1159e58) + + login-common: Avoid using client_destroy_success() when + mail_max_userip_connections is reached + + This was currently the only way how data != NULL here. + + This change destroys ssl_proxy on client_destroy() instead of + client_unref(), but that doesn't make much of a practical difference. This + new behavior is a bit more correct though. + +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h + +2016-10-04 15:36:06 +0300 Aki Tuomi (8bcf6fd06) + + iostream-openssl: Refactor stream sync code + + When doing input or stream sync, specify the type of operation that we are + doing to make sure we do IO correctly. + +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/istream-openssl.c +M src/lib-ssl-iostream/ostream-openssl.c + +2017-11-05 18:07:28 +0200 Timo Sirainen (b4c64e78f) + + lib-ssl-iostream: Set error on clean connection closing during handshake. + + Set the error to "SSL connection closed during handshake". + +M src/lib-ssl-iostream/iostream-openssl.c + +2017-11-05 18:06:10 +0200 Timo Sirainen (497cdac28) + + lib-ssl-iostream: Cleanup disconnection handling + + Avoid code duplication. Set error to "Connection closed" if there's no other + error. + +M src/lib-ssl-iostream/iostream-openssl.c + +2017-11-05 17:47:15 +0200 Timo Sirainen (6c30d94bf) + + doveadm: Remove dead code + + ret can never be >0 at this point. If there are any unexpected JSON + elements, doveadm_http_server_json_parse_v1() returns -1. + +M src/doveadm/client-connection-http.c + +2017-11-05 23:51:56 +0200 Timo Sirainen (88734aa94) + + director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 + + The reset command would just hang in that case. doveadm would never have + sent this, so this is just an extra sanity check. + +M src/director/doveadm-connection.c + +2017-11-05 23:27:36 +0200 Timo Sirainen (5754fa860) + + director: Show in process title how many users are being kicked. + + +M src/director/director.c +M src/director/director.h +M src/director/main.c + +2017-11-05 23:01:56 +0200 Timo Sirainen (4dc8d682c) + + director: Show in process title how many requests are being delayed. + + +M src/director/director-request.c +M src/director/director.h +M src/director/main.c + +2017-11-06 10:57:03 +0200 Timo Sirainen (6f20cb522) + + director: Log an error if login process sends unexpected reply to KICK* + commands + + +M src/director/director.c + +2017-11-05 22:53:23 +0200 Timo Sirainen (2dfc39a56) + + director: Log whenever HOST-RESET-USERS is used + + +M src/director/doveadm-connection.c + +2017-11-05 22:38:27 +0200 Timo Sirainen (f534eb971) + + director: Include used CPU secs in director connection log messages + + It's counting the process's full CPU seconds used since the handshake + started, so it's not specific to the connection itself. Still, this is + likely to be very useful in debugging whether a slow handshake was due to + CPU usage or something else. + +M src/director/director-connection.c + +2017-11-05 22:37:27 +0200 Timo Sirainen (c83e45c82) + + director: Deduplicate code into director_connection_set_connected() + + +M src/director/director-connection.c + +2017-11-05 22:27:41 +0200 Timo Sirainen (ef996cb0e) + + director: Include peak output buffer size in director connection log + messages + + +M src/director/director-connection.c + +2017-11-04 14:33:52 +0200 Timo Sirainen (18da63ba6) + + cassandra: Include the used timestamp in logged queries + + +M src/lib-sql/driver-cassandra.c + +2017-11-06 11:00:06 +0200 Timo Sirainen (125081bc1) + + cassandra: Rename cassandra_sql_statement.pending_timestamp to just + timestamp + + +M src/lib-sql/driver-cassandra.c + +2017-11-06 18:59:34 +0200 Timo Sirainen (35e47c286) + + lib-storage: When copying mails, copy also empty cache fields + + This mainly means that it copies cache fields for nonexistent message + headers. Those are still important, because otherwise Dovecot doesn't know + whether they exist or not. + +M src/lib-storage/index/index-storage.c + +2017-11-06 01:30:13 +0200 Timo Sirainen (ad394c531) + + director: Don't block too long when sending users during director handshake + + All the other work is blocked while the users are being sent. + +M src/director/director-connection.c + +2017-07-26 18:34:59 +0900 Taizo Ito (ea1d2fc0e) + + auth: Disabling SMTP authentication in vpopmail users with NO_SMTP flag + + +M src/auth/passdb-vpopmail.c + +2017-11-05 21:36:55 +0200 Timo Sirainen (4039fdc26) + + lib: str_parse/to_*int*() - minor optimization + + +M src/lib/strnum.c + +2017-11-04 15:29:29 +0200 Timo Sirainen (6b740bf2d) + + director: Avoid str_printfa() in director_connection_send_users() + + Optimizes the CPU usage. + +M src/director/director-connection.c + +2017-11-04 02:17:55 +0200 Timo Sirainen (7b3acba3f) + + director: Avoid str_printfa() in login_host_callback() + + Optimizes the CPU usage. + +M src/director/login-connection.c + +2017-11-04 02:05:26 +0200 Timo Sirainen (1b418300c) + + director: Change request callback to take mail_host parameter + + This allows accessing the IP address both as struct and as string without + any conversions. + +M src/director/director-request.c +M src/director/director-request.h +M src/director/login-connection.c + +2017-11-04 01:59:27 +0200 Timo Sirainen (bd4bbe647) + + director: Use *_host.ip_str to avoid net_ip2addr() calls + + +M src/director/director-connection.c +M src/director/director-host.c +M src/director/director.c +M src/director/doveadm-connection.c +M src/director/mail-host.c + +2017-11-04 01:51:25 +0200 Timo Sirainen (b7650f081) + + director: Add director_host.ip_str + + This avoids having to use net_ip2addr() all the time to convert it into a + string. + +M src/director/director-host.c +M src/director/director-host.h + +2017-11-04 01:49:29 +0200 Timo Sirainen (cfc891de6) + + director: Add mail_host.ip_str + + This avoids having to use net_ip2addr() all the time to convert it into a + string. + +M src/director/mail-host.c +M src/director/mail-host.h + +2017-11-04 01:48:41 +0200 Timo Sirainen (e8d44b65a) + + director: Use t_strsplit_tabescaped_inplace() for director connection input + + +M src/director/director-connection.c + +2017-11-04 01:43:41 +0200 Timo Sirainen (1c0491ba0) + + lib: net_addr2ip() - Optimize for parsing IPv4 addresses + + +M src/lib/net.c +M src/lib/test-net.c + +2017-11-04 01:42:37 +0200 Timo Sirainen (8e9616d70) + + lib: net_ip2addr() - Optimize by allocating destination memory immediately + + It doesn't really matter if we allocate a few extra bytes. + +M src/lib/net.c + +2017-11-04 01:40:24 +0200 Timo Sirainen (b7b202953) + + lib: *_strsplit() - implement more efficient version for a single separator + char + + +M src/lib/strfuncs.c +M src/lib/test-strfuncs.c + +2017-11-05 21:30:30 +0200 Timo Sirainen (8587f4288) + + lib: test-strfuncs - Improve *_strsplit*() unit tests + + +M src/lib/test-strfuncs.c + +2017-11-04 01:39:38 +0200 Timo Sirainen (7de17a595) + + lib: Implement t_strsplit_tabescaped_inplace() + + This is a more efficient version of t_strsplit_tabescaped(), which modifies + the input string instead of duplicating it. + +M src/lib/strescape.c +M src/lib/strescape.h +M src/lib/test-strescape.c + +2017-11-05 21:14:41 +0200 Timo Sirainen (5d8ee65c0) + + lib: test-strescape - Refactor the unit test to use an array of tests + + +M src/lib/test-strescape.c + +2017-11-04 01:37:19 +0200 Timo Sirainen (4ec55911f) + + lib: t_strsplit_tabescaped() - don't create unnecessary data stack mempool + + unsafe_data_stack_pool is more efficient to use + +M src/lib/strescape.c + +2017-11-04 01:35:44 +0200 Timo Sirainen (60212a51e) + + lib: str_tabunescape() - optimize initial escape char lookup + + strchr() is faster than looping ourself. + +M src/lib/strescape.c + +2017-11-04 01:34:02 +0200 Timo Sirainen (27006b322) + + director: Don't recreate timeout on every user lookup + + Recreate it only when the timeout should change. + +M src/director/user-directory.c + +2017-11-05 23:11:25 +0200 Timo Sirainen (7d8c1ba76) + + director: Fix off-by-one when checking if user weakness is stuck + + When the weakness was exactly at the second, the weakness wasn't detected + and the next expiration timeout was removed entirely. This shouldn't have + caused any bigger problems, because another user lookup on the following + second would have then detected the weakness, removed the user and restored + the next expiration timeout. + +M src/director/user-directory.c + +2017-11-05 17:49:52 +0200 Timo Sirainen (872c2b120) + + mbox: Add assert to make static analyzer happier + + +M src/lib-storage/index/mbox/mbox-save.c + +2017-11-05 17:46:03 +0200 Timo Sirainen (58336fc49) + + lib-http: Remove dead code + + This code branch became dead after 22ee6e1e6193299034ab99f77a650290de2fd6ca + +M src/lib-http/http-transfer-chunked.c + +2017-11-03 17:28:57 +0200 Aki Tuomi (a6366f3b2) + + lib-ssl-iostream: Fix alt cert support + + It was only partially implemented in + 0577701d04beea222fc49a7318851ddcea3b99d3 + +M src/lib-ssl-iostream/iostream-openssl-context.c + +2017-11-02 00:00:00 +0200 Timo Sirainen (ba55ec8fd) + + lib: istream - Avoid panic in snapshot() with nonpersistent buffers + + +M src/lib/istream.c + +2017-11-02 22:57:00 +0200 Timo Sirainen (30517c760) + + lib: istream - Don't leak snapshot memory if close() triggers a read + + Also move the line_str freeing just before stream is freed. That didn't + cause any known memory leaks though. + +M src/lib/istream.c + +2017-11-02 23:24:38 +0200 Timo Sirainen (81a99eefd) + + lib: istream-jsonstr - Fix potential infinite loop if parent stream's + max_buffer_size is tiny + + +M src/lib/istream-jsonstr.c + +2017-11-02 23:22:14 +0200 Timo Sirainen (22ee6e1e6) + + global: i_stream_read_memarea() - Remove impossible ret==-2 checks + + If the stream's buffer is empty, i_stream_read_memarea() would have already + assert-crashed at this point. + +M src/lib-http/http-transfer-chunked.c +M src/lib-mail/istream-dot.c +M src/lib/istream-crlf.c + +2017-11-02 23:01:20 +0200 Timo Sirainen (7f4bcbb9f) + + imap, pop3: Don't access login_set.*_socket_path after they're freed from + data stack + + Call master_login_init() before master_service_init_finish(), which frees + all the data stack done in initialization. + + This didn't normally cause any visible problems, because data stack wasn't + currently being used in a way that the strings were invalidated. However, it + was causing failures if --enable-devel-checks was used. + +M src/imap/main.c +M src/pop3/main.c + +2017-11-02 15:45:09 +0200 Aki Tuomi (63e9db4f9) + + config: Properly fix ssl-parameters.dat handling + + It was done only partially right in a70d867d1fe3584149811c65eb6213deb72be824 + +M src/config/config-request.c +M src/config/config-request.h +M src/config/doveconf.c + +2017-11-01 21:44:54 +0200 Timo Sirainen (b83382498) + + login-common: client_unref() - always set client pointer to NULL + + This is the common coding practise elsewhere as well. + +M src/login-common/client-common.c + +2017-11-01 21:44:23 +0200 Timo Sirainen (5885eec2e) + + pop3-login: Cleanup - uncork output unconditionally before client_unref() + + +M src/pop3-login/client.c + +2017-11-01 21:41:18 +0200 Timo Sirainen (a44e36b9c) + + login-common: Remove unnecessary client_ref/unref from STARTTLS handling + + There used to be code between them that could have destroyed the connection, + but that was removed long time ago. + +M src/login-common/client-common.c + +2017-10-31 23:51:53 +0200 Timo Sirainen (1b7459fda) + + doveadm: Send hostname without ":port" as TLS SNI name for outgoing SSL + connections. + + +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-mail-server.c +M src/doveadm/doveadm-server.h +M src/doveadm/server-connection.c + +2017-11-02 12:00:42 +0200 Aki Tuomi (a70d867d1) + + config: Do not run ssl_dh check always + + Do it only when CONFIG_DUMP_FLAG_CHECK_SETTINGS is set. Fixes + + "Warning: You can generate it with: dd if=ssl-parameters.dat bs=1 + skip=88..." + +M src/config/config-request.c + +2017-07-03 11:17:16 +0300 Aki Tuomi (2644ab253) + + dict-redis: Include last_reply in communications failure error + + This way it's possible to determine what went wrong. + +M src/lib-dict/dict-redis.c + +2016-06-24 12:09:31 +0300 Timo Sirainen (c75555254) + + dict-redis: Added support for authentication. + + Patch by David Zambonini + +M src/lib-dict/dict-redis.c + +2017-11-02 01:34:11 +0200 Timo Sirainen (5aa1aa87a) + + lib: i_stream_w_buffer_realloc() - avoid passing NULL to memcpy() + + It happened only with size=0, so it shouldn't have mattered much. + +M src/lib/istream.c + +2017-11-02 00:03:57 +0200 Timo Sirainen (d69c66d77) + + imap-proxy: Don't discard the first pipelined command after LOGIN + + +M src/imap-login/imap-proxy.c + +2017-11-01 19:10:19 +0200 Aki Tuomi (b1390ca0b) + + lib-storage: imapc - Fix spelling mistakes + + Original work by @jsoref + +M src/lib-storage/index/imapc/imapc-list.c + +2017-11-01 19:10:07 +0200 Aki Tuomi (760357778) + + lib-fs: Fix spelling mistakes + + Original work by @jsoref + +M src/lib-fs/fs-api.c + +2017-11-01 19:09:55 +0200 Aki Tuomi (9cc05eaa6) + + test-quota: Fix spelling mistakes + + Original work by @jsoref + +M src/plugins/quota/test-quota-util.c + +2017-11-01 19:09:43 +0200 Aki Tuomi (a3e5780c9) + + lazy-expunge: Fix spelling mistakes + + Original work by @jsoref + +M src/plugins/lazy-expunge/lazy-expunge-plugin.c + +2017-11-01 19:09:28 +0200 Aki Tuomi (21bd3573f) + + plugin-fts: Fix spelling mistakes + + Original work by @jsoref + +M src/plugins/fts/fts-expunge-log.c + +2017-11-01 19:09:15 +0200 Aki Tuomi (ed4bd0ef7) + + fts-squat: Fix spelling mistakes + + Original work by @jsoref + +M src/plugins/fts-squat/squat-trie.c + +2017-11-01 19:09:04 +0200 Aki Tuomi (31281f7ff) + + imap: Fix spelling mistakes + + Original work by @jsoref + +M src/imap/cmd-urlfetch.c + +2017-11-01 19:08:54 +0200 Aki Tuomi (688653dfb) + + director: Fix spelling mistakes + + Original work by @jsoref + +M src/director/director-connection.c + +2017-11-01 19:08:40 +0200 Aki Tuomi (d47cf089b) + + mech-apop: Fix spelling mistake + + Original work by @jsoref + +M src/auth/mech-apop.c + +2017-11-01 19:08:30 +0200 Aki Tuomi (b8909228f) + + man: Fix spelling mistakes + + Original work by @jsoref + +M doc/man/doveadm-replicator.1.in +M doc/man/doveadm.1.in + +2017-11-01 19:07:26 +0200 Aki Tuomi (19557f192) + + global: Fix spelling mistakes in comments + + Original work by @andreasschulze and @jsoref + +M doc/example-config/conf.d/20-pop3.conf +M doc/example-config/conf.d/90-quota.conf +M m4/notify.m4 +M src/auth/auth-request-handler.c +M src/auth/db-checkpassword.c +M src/auth/db-passwd-file.c +M src/auth/mech-gssapi.c +M src/config/config-parser.c +M src/director/director-connection.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/cmd-sort.c +M src/lib-dcrypt/ostream-encrypt.c +M src/lib-fs/fs-metawrap.c +M src/lib-fts/fts-filter.h +M src/lib-http/test-http-client-errors.c +M src/lib-imap-client/imapc-connection.c +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-index-map-hdr.c +M src/lib-index/mail-index-map.c +M src/lib-index/mail-index-strmap.h +M src/lib-index/mail-index-transaction-finish.c +M src/lib-index/mail-index-view.c +M src/lib-index/mail-index.h +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log.h +M src/lib-mail/message-part-data.h +M src/lib-ntlm/ntlm-des.c +M src/lib-ntlm/ntlm-types.h +M src/lib-otp/otp-hash.c +M src/lib-settings/settings.c +M src/lib-smtp/lmtp-client.h +M src/lib-ssl-iostream/ostream-openssl.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/index/dbox-single/sdbox-file.h +M src/lib-storage/index/index-search-mime.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/maildir/maildir-sync.c +M src/lib-storage/index/mbox/mbox-sync-rewrite.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/mailbox-attribute.c +M src/lib/array.h +M src/lib/buffer.c +M src/lib/failures.c +M src/lib/ioloop-epoll.c +M src/lib/ioloop-kqueue.c +M src/lib/istream.h +M src/lib/net.h +M src/lib/path-util.c +M src/lib/sendfile-util.c +M src/lib/seq-range-array.h +M src/lib/wildcard-match.c +M src/master/sd-daemon.h +M src/master/service.h +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/pop3/pop3-client.c + +2017-11-01 18:04:57 +0200 Aki Tuomi (787bbd436) + + fts-lucene: Do not clobber return value + + Found by scanbuild + +M src/plugins/fts-lucene/fts-backend-lucene.c + +2017-10-26 13:56:25 +0300 Timo Sirainen (2a550de68) + + director: Show each director connection in doveadm DIRECTOR-LIST + + Previously the host was shown only once, regardless of how many connections + it had. This especially helps when there are just two directors, but also + can be useful when showing incoming/outgoing connections that are still in + handshaking phase. + +M src/director/doveadm-connection.c + +2017-10-26 14:10:51 +0300 Timo Sirainen (cb3f509b9) + + doveadm director ring status: Add more fields related to connection status + + +M src/director/doveadm-connection.c +M src/doveadm/doveadm-director.c + +2017-10-26 14:18:50 +0300 Timo Sirainen (3dc72a40e) + + director: Track show long the last ring sync took. + + +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h + +2017-10-26 14:07:56 +0300 Timo Sirainen (f1551f4a5) + + director: Track connections' last ping time + + +M src/director/director-connection.c +M src/director/director-connection.h + +2017-10-26 13:07:30 +0300 Timo Sirainen (56139ffc9) + + director: Add director_connection_get_status() + + Can be used to access connection-specific status information. + +M src/director/director-connection.c +M src/director/director-connection.h + +2017-10-26 13:02:32 +0300 Timo Sirainen (a1febfe04) + + director: Fix updating director connection's last_output timestamp + + It was previously updated only in ostream's flush callback, which was called + only when there were a lot of output. This only caused the "last output" + timestamp in disconnection log lines to be wrong. + +M src/director/director-connection.c + +2017-10-26 12:44:34 +0300 Timo Sirainen (20b6e495f) + + doveadm director: Parse timestamp parameters with str_to_time() + + +M src/doveadm/doveadm-director.c + +2017-10-25 17:22:42 +0300 Timo Sirainen (1511fc56b) + + director: Close director connection immediately when output buffer is full + + Only the ostream was closed, which didn't actually cause the disconnection + until the other side closed the connection. + +M src/director/director-connection.c + +2017-10-25 17:18:03 +0300 Timo Sirainen (311cf367b) + + director: Add director_output_buffer_size setting + + This allows configuring the max buffer size for outgoing connections. + Previously it was hardcoded to 10 MB, which wasn't necessarily enough for + very busy directors. + +M src/director/director-connection.c +M src/director/director-settings.c +M src/director/director-settings.h + +2017-10-31 23:37:44 +0200 Timo Sirainen (4584a0027) + + lib-ssl-iostream: Verify SSL server's hostname against cert if it's non-NULL + + The hostname verification was skipped when handshake-callback wasn't used. + All of the existing code used the callback though, so this doesn't fix any + bugs. + +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-31 19:49:56 +0200 Timo Sirainen (4cc68747a) + + lib-ssl-iostream: Fix checking cert validity when handshake callback isn't + used + + +M src/lib-ssl-iostream/iostream-openssl.c + +2017-11-01 12:58:46 +0200 Timo Sirainen (d185226aa) + + lib-ssl-iostream: Split host to connected_host and sni_host + + Using the same variable for both was causing confusion. + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h + +2017-09-22 11:38:10 +0300 Josef 'Jeff' Sipek (9a84b90d8) + + global: start relying on [io]_stream_close(NULL) being a no-op + + Cleanup performed with the following semantic patch (and a bit of + hand-editing): + + @@ + expression E; + @@ + + - if (E != NULL) { + - i_stream_close(E); + - } + + i_stream_close(E); + + @@ + expression E; + @@ + + - if (E != NULL) { + - o_stream_close(E); + - } + + o_stream_close(E); + +M src/auth/auth-master-connection.c +M src/auth/auth-postfix-connection.c +M src/lib-smtp/lmtp-client.c +M src/lib/connection.c +M src/lib/istream-seekable.c +M src/lib/istream.c +M src/lib/ostream.c +M src/login-common/client-common.c +M src/replication/aggregator/notify-connection.c + +2017-09-22 11:29:35 +0300 Josef 'Jeff' Sipek (660ecbaf8) + + lib: [io]_stream_close(NULL) should be no-ops + + +M src/lib/istream.c +M src/lib/ostream.c + +2017-11-01 14:40:51 +0200 Timo Sirainen (322400fb8) + + lib-index: Fix -Wstrict-bool warnings with --enable-devel-checks + + +M src/lib-index/mail-index-sync-update.c + +2017-10-27 21:20:36 +0300 Timo Sirainen (bcd286622) + + global: Use i_stream_read_memarea() wherever possible + + +M src/lib-dcrypt/istream-decrypt.c +M src/lib-fs/istream-metawrap.c +M src/lib-http/http-transfer-chunked.c +M src/lib-mail/istream-dot.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/istream-nonuls.c +M src/lib-mail/istream-qp-decoder.c +M src/lib-mail/istream-qp-encoder.c +M src/lib-program-client/program-client-remote.c +M src/lib-storage/index/mbox/istream-raw-mbox.c +M src/lib/istream-base64-decoder.c +M src/lib/istream-base64-encoder.c +M src/lib/istream-chain.c +M src/lib/istream-concat.c +M src/lib/istream-crlf.c +M src/lib/istream-jsonstr.c +M src/lib/istream-limit.c +M src/lib/istream-multiplex.c +M src/lib/istream-rawlog.c +M src/lib/istream-seekable.c +M src/lib/istream-sized.c +M src/lib/istream.c +M src/plugins/mail-filter/istream-ext-filter.c + +2017-10-27 21:32:10 +0300 Timo Sirainen (fa39c4275) + + lib: i_stream_compress() - assert-crash if trying to compress shared memarea + + The caller is always expected to check the refcount before calling this. + +M src/lib/istream.c + +2017-10-27 21:22:04 +0300 Timo Sirainen (66967e15d) + + lib: i_stream_read() - Add buffer validity checks if DEBUG is enabled + + +M src/lib/istream.c + +2017-10-27 21:17:23 +0300 Timo Sirainen (e0fab1460) + + lib: i_stream_read() - Use snapshots + + This guarantees that data returned by i_stream_get_data() won't be freed + until the next i_stream_read() returns >0. This is mainly important, because + often the error handling for <=0 doesn't update the buffer pointers + correctly and it leads to complicated bugs where already freed memory is + attempted to be read (but never written). + +M src/lib/istream-private.h +M src/lib/istream.c +M src/lib/istream.h + +2017-10-27 21:13:40 +0300 Timo Sirainen (25c833d3c) + + lib: Use ISTREAM_CREATE_FLAG_NOOP_SNAPSHOT where useful + + +M src/lib/istream-chain.c +M src/lib/istream-concat.c +M src/lib/istream-data.c +M src/lib/istream-tee.c + +2017-10-27 21:13:20 +0300 Timo Sirainen (89a89730a) + + lib: Add ISTREAM_CREATE_FLAG_NOOP_SNAPSHOT flag + + +M src/lib/istream-private.h +M src/lib/istream.c + +2017-10-27 21:08:26 +0300 Timo Sirainen (2974dca6b) + + global: Add flags parameter to i_stream_create() and set it to 0 + + This just changes the API - the following changes add the new flag. + +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-fs/istream-fs-file.c +M src/lib-fs/istream-fs-stats.c +M src/lib-fs/istream-metawrap.c +M src/lib-http/http-server-request.c +M src/lib-http/http-transfer-chunked.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-binary-converter.c +M src/lib-mail/istream-dot.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/istream-nonuls.c +M src/lib-mail/istream-qp-decoder.c +M src/lib-mail/istream-qp-encoder.c +M src/lib-program-client/program-client-remote.c +M src/lib-ssl-iostream/istream-openssl.c +M src/lib-storage/index/istream-mail.c +M src/lib-storage/index/mbox/istream-raw-mbox.c +M src/lib-test/test-istream.c +M src/lib/istream-base64-decoder.c +M src/lib/istream-base64-encoder.c +M src/lib/istream-callback.c +M src/lib/istream-chain.c +M src/lib/istream-concat.c +M src/lib/istream-crlf.c +M src/lib/istream-data.c +M src/lib/istream-failure-at.c +M src/lib/istream-file.c +M src/lib/istream-hash.c +M src/lib/istream-jsonstr.c +M src/lib/istream-limit.c +M src/lib/istream-mmap.c +M src/lib/istream-multiplex.c +M src/lib/istream-private.h +M src/lib/istream-rawlog.c +M src/lib/istream-seekable.c +M src/lib/istream-sized.c +M src/lib/istream-tee.c +M src/lib/istream-timeout.c +M src/lib/istream-try.c +M src/lib/istream.c +M src/plugins/mail-filter/istream-ext-filter.c + +2017-10-27 21:28:51 +0300 Timo Sirainen (58e397e90) + + lib-ssl-iostream: Simplify istream-openssl + + Partially reverts 739125f23e3312045e620014812fe2249a309cc4. This is no + longer needed because of the io_set_pending() changes. + +M src/lib-ssl-iostream/istream-openssl.c + +2017-10-27 20:49:07 +0300 Timo Sirainen (ef4661aec) + + lib-compression: Use i_stream_try_alloc*() + + +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c + +2017-10-27 20:45:41 +0300 Timo Sirainen (51d379cbc) + + lib: Add i_stream_try_alloc_avoid_compress() + + +M src/lib/istream-private.h +M src/lib/istream.c + +2017-10-27 20:38:49 +0300 Timo Sirainen (e05039894) + + lib-compression: istream-lz4 - Use i_stream_alloc() + + +M src/lib-compression/istream-lz4.c + +2017-10-26 18:36:09 +0300 Timo Sirainen (f5d8e0549) + + lib-mail: istream-attachment-extractor - Don't modify buffer during failure + + If i_stream_read() returns -1 because the attachment file couldn't be + created, don't add the trailing data to the main istream. It's not useful, + and the following extra checks will cause it to assert-crash. + +M src/lib-mail/istream-attachment-extractor.c + +2017-09-08 14:59:37 +0300 Timo Sirainen (d74c9f4bf) + + lib: istream-mmap - Use memarea API + + +M src/lib/istream-mmap.c + +2017-10-26 17:12:04 +0300 Timo Sirainen (448ab3576) + + lib: istream-seekable - Implement snapshot() + + +M src/lib/istream-seekable.c + +2017-10-26 16:37:49 +0300 Timo Sirainen (3e55775bc) + + lib: istream-seekable - Change to use i_stream_*alloc() + + This simplifies implementing the snapshotting. + +M src/lib/istream-seekable.c + +2017-10-26 17:10:57 +0300 Timo Sirainen (3fe5eaeb3) + + lib: istream-seekable - Fix fd leak if initial temp file couldn't be read + back + + That should normally never happen. + +M src/lib/istream-seekable.c + +2017-10-26 15:17:04 +0300 Timo Sirainen (82ea464c1) + + lib: Add istream.snapshot() method for referencing the current memarea + + It will be used by following commits. + +M src/lib/istream-private.h +M src/lib/istream.c + +2017-10-26 15:22:26 +0300 Timo Sirainen (5181e190e) + + lib-test: istream-test - use memarea API + + +M src/lib-test/test-istream.c + +2017-09-08 14:25:41 +0300 Timo Sirainen (5ca745ae8) + + lib: Use memarea for default istream memory allocations. + + +M src/lib/istream-private.h +M src/lib/istream.c + +2017-10-26 16:25:51 +0300 Timo Sirainen (54bd0fec0) + + global: Use i_stream_free_buffer() instead of freeing w_buffer directly + + +M src/lib-http/http-transfer-chunked.c +M src/lib-ssl-iostream/istream-openssl.c +M src/lib/istream-chain.c +M src/lib/istream-concat.c +M src/lib/istream-multiplex.c +M src/lib/istream.c + +2017-10-26 16:24:50 +0300 Timo Sirainen (785ee8bec) + + lib: Add i_stream_free_buffer() to free i_stream_*alloc()ed memory + + +M src/lib/istream-private.h +M src/lib/istream.c + +2017-09-08 13:33:27 +0300 Timo Sirainen (4c7d70440) + + lib: Add memarea API + + This can be used to create reference counted memory areas where a callback + is called once the refcount drops to zero. + +M src/lib/Makefile.am +A src/lib/memarea.c +A src/lib/memarea.h +M src/lib/test-lib.inc +A src/lib/test-memarea.c + +2017-10-26 14:56:26 +0300 Timo Sirainen (59a63791d) + + lib: istream-chain/concat cleanup - return early if no new data is read + + There's no need to change the buffer or other variables. This simplifies the + following changes. + + This cleanup is identical for istream-concat and istream-chain. + +M src/lib/istream-chain.c +M src/lib/istream-concat.c + +2017-01-20 17:34:50 +0200 Timo Sirainen (fdf15b2c4) + + lib-mail: istream-header-filter - Fix header read() when max_buffer_size=0 + + If the buffer was too small to read anything into it, read_header() returned + -2, but then it continued reading the header as if it was the body already. + This should instead be an error situation - max buffer size just shouldn't + be 0 at this point. + + This was originally changed in a72355fef49c512c13b7d8c3e07f4f76ebd57a10 as + some kind of a workaround, but since then we implemented support for reading + a mixed header/body in c2afdbf963d0564a542d71ca784deb0c2f7776d0. + +M src/lib-mail/istream-header-filter.c + +2017-10-30 13:58:54 +0200 Timo Sirainen (a6657bc03) + + imap: Set max buffer size for CATENATE istream-chain + + This fixes a crash with mbox when nonexistent CATENATE URL is attempted to + be used. The istream doesn't get any size, and istream-header-filter panics + due to having reached the maximum buffer size (0), even though the stream is + empty and there's nothing to read. + +M src/imap/cmd-append.c + +2017-01-20 16:28:53 +0200 Timo Sirainen (d506fc38c) + + lib: Add assert to io_stream_ref() + + This makes an assert-crash likely to happen if iostream was already freed. + +M src/lib/iostream.c + +2017-11-01 13:01:03 +0200 Timo Sirainen (97b6a92d5) + + doveadm: Ignore errors also on outgoing SSL connection ostreams + + Setting the errors as ignored on the plain ostream was done too late, so ssl + ostream didn't inherit the error handling flag. + +M src/doveadm/server-connection.c + +2017-10-30 00:30:13 +0200 Timo Sirainen (987c15a59) + + lib: iostream-proxy - Specify what failed in completion callback parameter + + +M src/lib/iostream-proxy.c +M src/lib/iostream-proxy.h +M src/lib/test-iostream-proxy.c + +2017-10-30 00:16:35 +0200 Timo Sirainen (39435f00a) + + lib: iostream-pump - Specify what failed in completion callback parameter + + This makes it easier for the caller to find out whether the failure was due + to istream or ostream. + +M src/lib-http/http-server-request.c +M src/lib/iostream-proxy.c +M src/lib/iostream-pump.c +M src/lib/iostream-pump.h +M src/lib/test-iostream-pump.c + +2017-10-29 23:53:16 +0200 Timo Sirainen (6ce52edd3) + + lib: iostream-proxy - Add iostream_proxy_is_waiting_output() + + +M src/lib/iostream-proxy.c +M src/lib/iostream-proxy.h + +2017-10-29 23:53:00 +0200 Timo Sirainen (fe4a5467c) + + lib: iostream-pump - Add iostream_pump_is_waiting_output() + + +M src/lib/iostream-pump.c +M src/lib/iostream-pump.h + +2017-10-30 01:07:36 +0200 Timo Sirainen (3bc5b80ae) + + lib: iostream-pump - Fix crash in iostream_pump_switch_ioloop() if io is + NULL + + This would happen when the pump's ostream is full and it has stopped + listening for input. + +M src/lib/iostream-pump.c + +2017-10-29 23:28:38 +0200 Timo Sirainen (84b746f56) + + lib: iostream-pump - Cork the ostream when writing + + This reduces latency for TCP connections by disabling Nagle algorithm. + +M src/lib/iostream-pump.c +M src/lib/test-iostream-pump.c + +2017-10-31 20:05:19 +0200 Timo Sirainen (103e63c7d) + + doveadm-server: Deinitialize log proxying before closing SSL iostream + + Otherwise the SSL iostream destroying may trigger debug/error logging, which + attempts to proxy logs when the stream is already closed. This caused a + panic. + +M src/doveadm/client-connection-tcp.c + +2017-10-31 19:24:21 +0200 Timo Sirainen (a36cac101) + + dbox: Don't finish dbox's ostream when mail is saved + + Fixes assert-crash when saving mail when using zlib plugin. + +M src/lib-storage/index/dbox-common/dbox-file.c + +2017-10-31 17:27:05 +0200 Timo Sirainen (8e8b9d01d) + + lib-compression: Fix unit test to not crash + + +M src/lib-compression/test-compression.c + +2017-10-31 17:24:06 +0200 Timo Sirainen (6519bf9a2) + + lib-mail: ostream-dot - Set o_stream_set_finish_also_parent(FALSE) by + default + + ostream-dot is always used inside another ostream to implement some kind of + data escaping. The ostream-dot always has to be finished to write the "." + line, but the caller never wants it to finish the parent stream. + +M src/lib-mail/ostream-dot.c + +2017-10-31 17:20:22 +0200 Timo Sirainen (03e102ddc) + + lib-fs: fs-metawrap - Don't try to write to an already finished ostream + + Fixes a crash after recent changes when trying to write an empty file via + fs-metawrap. + +M src/lib-fs/fs-metawrap.c + +2017-10-31 17:09:47 +0200 Timo Sirainen (8a4a0ef82) + + lib: connection - Use o_stream_set_finish_via_child(FALSE) + + This allows o_stream_finish() calls on child streams without closing this + parent stream. Since the stream has no error checking by default anyway, + this allows the connection stream to be used more easily. + +M src/lib/connection.c + +2017-10-31 17:07:44 +0200 Timo Sirainen (d6193a892) + + lib: Add o_stream_set_finish_also_parent() and _finish_via_child() + + These allow controlling on both directions whether o_stream_finish() should + be finishing the parent stream. If either one is set to FALSE, the parent + stream isn't finished. Which one of these to use depends on the situation. + +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h + +2017-10-31 15:05:01 +0200 Timo Sirainen (8109f3187) + + global: Use o_stream_flush_parent() + + +M src/lib-compression/ostream-bzlib.c +M src/lib-compression/ostream-lz4.c +M src/lib-compression/ostream-lzma.c +M src/lib-compression/ostream-zlib.c +M src/lib-dcrypt/ostream-encrypt.c +M src/lib-mail/ostream-dot.c +M src/lib/ostream-escaped.c +M src/lib/ostream-failure-at.c +M src/lib/ostream.c +M src/plugins/mail-filter/ostream-ext-filter.c + +2017-10-31 15:00:51 +0200 Timo Sirainen (5df4dbc38) + + lib: Add o_stream_flush_parent() + + +M src/lib/ostream-private.h +M src/lib/ostream.c + +2017-10-31 17:42:15 +0200 Timo Sirainen (b9b86a27a) + + lib: istream-base64-encoder - Fix getting size for empty stream + + +M src/lib/istream-base64-encoder.c +M src/lib/test-istream-base64-encoder.c + +2017-10-31 12:16:41 +0200 Aki Tuomi (f134770db) + + lib-master: Use skip_crl_check for ssl context + + +M src/lib-master/master-service-ssl.c + +2017-10-16 10:56:17 +0300 Aki Tuomi (754896551) + + lib-master: Load SSL module if wanted by service + + +M src/lib-master/master-service.c +M src/lib-master/master-service.h + +2017-10-16 10:47:36 +0300 Aki Tuomi (30dca9541) + + lib-master: Add master_service_ssl_settings_to_iostream_set + + +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h + +2017-10-31 10:10:39 +0200 Aki Tuomi (15707468f) + + lib-master: Support alternative cert in master_service_ssl_ctx_init + + +M src/lib-master/master-service-ssl.c + +2017-10-24 14:43:51 +0300 Aki Tuomi (98c2cac72) + + lib-ssl-iostream: Seed OpenSSL RNG earlier + + Make sure we give the RNG a chance to seed before we chroot. + +M src/lib-ssl-iostream/dovecot-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl.c + +2017-09-07 10:19:36 +0300 Aki Tuomi (997b30e40) + + lib-ssl-iostream: Expose ssl_module_load + + We need to load SSL module before we chroot in login-common. + +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2016-10-03 12:04:26 +0300 Aki Tuomi (c141f3682) + + lib-ssl-iostream: Use named initializers + + +M src/lib-ssl-iostream/iostream-openssl.c + +2016-09-26 13:55:17 +0300 Aki Tuomi (ca55f7e83) + + lib-ssl-iostream: Remove input_handler flag + + It is no longer needed after 87da941c + +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/istream-openssl.c + +2016-09-26 13:52:33 +0300 Aki Tuomi (48e243933) + + lib-ssl-iostream: Add get_compression accessor + + This is needed by login-common + +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2016-10-03 13:39:35 +0300 Aki Tuomi (1fea3af0b) + + lib-ssl-iostream: Close ostream before istream + + If i_stream is autoclose, then o_stream close will fail if done after + i_stream close. + +M src/lib-ssl-iostream/iostream-openssl.c + +2016-10-03 12:38:35 +0300 Aki Tuomi (978edad8f) + + lib-ssl-iostream: Allow skipping CRL check + + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-30 14:08:23 +0200 Aki Tuomi (0577701d0) + + lib-ssl-iostream: Add alternate certificate support + + +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-30 14:06:36 +0200 Aki Tuomi (9f7ba3807) + + global: Splice cert into separate struct from iostream_ssl_settings + + +M src/auth/db-oauth2.c +M src/lib-ldap/ldap-connection.c +M src/lib-master/master-service-ssl.c +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h + +2017-10-31 17:01:26 +0200 Timo Sirainen (c75fd9600) + + lib-fs: test-fs-posix - Fix checking whether unlink_directory() failed + + +M src/lib-fs/test-fs-posix.c + +2017-10-30 20:30:03 +0200 Aki Tuomi (65ef8330e) + + man: Update manpage for mailbox delete command + + +M doc/man/doveadm-mailbox.1.in + +2017-10-30 19:29:02 +0200 Martti Rannanjärvi (32c786578) + + lib: Don't use NEEDS_LOCAL_CREDS undefined + + +M src/lib/net.c + +2017-10-30 16:06:39 +0200 Timo Sirainen (1bc075e2e) + + global: Rename i_stream_is_eof() to i_stream_read_eof() + + This describes its behavior a bit better. + +M src/lib-compression/istream-zlib.c +M src/lib-fs/fs-sis.c +M src/lib-http/http-server-request.c +M src/lib-oauth2/oauth2.c +M src/lib-program-client/program-client.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/index-mail-binary.c +M src/lib/istream.c +M src/lib/istream.h + +2017-10-30 16:11:43 +0200 Timo Sirainen (a05250bd5) + + global: Avoid i_stream_is_eof() where it's not necessary + + +M src/lib-http/test-http-server-errors.c +M src/lib-smtp/test-smtp-submit.c +M src/lib/test-istream-chain.c +M src/lib/test-istream-concat.c +M src/lib/test-istream-seekable.c + +2017-10-30 16:06:21 +0200 Timo Sirainen (6a170d6d7) + + lib: Improve i_stream_is_eof() comment + + +M src/lib/istream.h + +2017-10-30 16:01:31 +0200 Timo Sirainen (7b29ccd79) + + lib: Update struct istream comments + + +M src/lib/istream.h + +2017-10-30 16:00:13 +0200 Timo Sirainen (2a8454fe9) + + lib-http: If istream read fails, preserve the istream's full error message + + +M src/lib-http/http-header-parser.c +M src/lib-http/http-message-parser.c +M src/lib-http/http-response-parser.c + +2017-10-30 15:59:46 +0200 Timo Sirainen (f48fad971) + + lib-http: test-http-client-errors - fix typo in error message + + +M src/lib-http/test-http-client-errors.c + +2017-10-30 15:58:43 +0200 Timo Sirainen (53393ea8b) + + lib-http: Detect istream errors correctly. + + i_stream_is_eof() returns TRUE also when streams have an error, so all + errors were logged the same as a regular disconnection. + +M src/lib-http/http-header-parser.c +M src/lib-http/test-http-client-errors.c + +2017-10-30 16:39:21 +0200 Martti Rannanjärvi (d61f31663) + + lib,lib-index: Use #ifdef with WORDS_BIGENDIAN + + Some were missing from the last change. + +M src/lib-index/mail-transaction-log-file.c +M src/lib/byteorder.h +M src/lib/sha1.c + +2017-10-28 02:57:37 +0300 Timo Sirainen (5bc75087b) + + global: Remove explicit o_stream_flush() calls from ostream.close() methods + + It's now being done automatically. + +M src/lib-compression/ostream-bzlib.c +M src/lib-compression/ostream-lz4.c +M src/lib-compression/ostream-lzma.c +M src/lib-fs/ostream-cmp.c +M src/lib/ostream-file.c +M src/lib/ostream-multiplex.c +M src/lib/ostream-rawlog.c + +2017-10-28 02:55:22 +0300 Timo Sirainen (5ec4fc44e) + + lib: Automatically flush ostream when it's closed + + Also verify that it unexpectedly didn't get fully flushed. + +M src/lib/ostream.c +M src/lib/ostream.h + +2017-10-28 02:45:58 +0300 Timo Sirainen (ec2c31007) + + mail-filter: ostream-ext-filter - Require o_stream_finish() to be called + + Similar to ostream-zlib. + +M src/plugins/mail-filter/ostream-ext-filter.c + +2017-10-28 02:43:16 +0300 Timo Sirainen (a25833972) + + lib-mail: ostream-dot - Require o_stream_finish() to write the trailer + + Similar to ostream-zlib. + +M src/doveadm/server-connection.c +M src/lib-mail/ostream-dot.c +M src/lib-mail/test-ostream-dot.c +M src/lib-program-client/program-client.c +M src/lib-program-client/test-program-client-net.c + +2017-10-28 02:35:58 +0300 Timo Sirainen (de535bbd1) + + lib: ostream-multiplex - Don't close parent streams at destroy + + The close() method is already called as needed. + +M src/lib/ostream-multiplex.c + +2017-10-28 02:21:48 +0300 Timo Sirainen (6630a5734) + + lib-dcrypt: ostream-dcrypt - Require o_stream_finish() to write the trailer + + Similar to ostream-zlib. + +M src/lib-dcrypt/ostream-encrypt.c + +2017-10-28 02:09:58 +0300 Timo Sirainen (6fb8641aa) + + lib-compression: ostream-zlib - Require o_stream_finish() to write the + trailer + + It's now possible to call o_stream_flush() without the trailer getting + written. + + It's also now required to call o_stream_finish() to write the trailer before + closing the ostream. This guarantees that the caller checks that the trailer + was successfully written. This isn't needed if the ostream already failed + before writing the trailer. + +M src/lib-compression/ostream-zlib.c +M src/lib-compression/test-compression.c + +2017-10-28 02:07:32 +0300 Timo Sirainen (4805c8a7d) + + lib: Remove o_stream_nfinish() + + +M src/lib/ostream.h + +2017-10-28 02:06:56 +0300 Timo Sirainen (d1ba8ecbb) + + global: Replace o_stream_nfinish() with o_stream_flush() + + +M src/auth/auth-worker-client.c +M src/lib-auth/auth-master.c +M src/lib-fs/fs-api.h +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib/iostream-rawlog.c +M src/lmtp/commands.c + +2017-10-28 01:55:12 +0300 Timo Sirainen (ad9afb646) + + global: Replace o_stream_nfinish() with o_stream_finish() whenever possible + + +M src/doveadm/client-connection-http.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/lib-compression/test-compression.c +M src/lib-dcrypt/test-stream.c +M src/lib-dict/dict-file.c +M src/lib-fs/fs-api.c +M src/lib-index/mail-cache-compress.c +M src/lib-index/mail-index-strmap.c +M src/lib-index/mail-index-write.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/test-istream-attachment.c +M src/lib-master/master-instance.c +M src/lib-program-client/test-program-client-net.c +M src/lib-program-client/test-program-client-unix.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/list/subscription-file.c +M src/lib-storage/mail-duplicate.c +M src/lib/test-istream-multiplex.c +M src/lib/test-multiplex.c +M src/lib/test-ostream-buffer.c +M src/lib/test-ostream-file.c +M src/lib/test-ostream-multiplex.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-backend-vfile-update.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/replication/replicator/replicator-queue.c +M src/util/rawlog.c + +2017-10-28 01:15:14 +0300 Timo Sirainen (84717f00d) + + lib: Add o_stream_finish() + + This marks the ostream as fully finished, with no further writes coming to + it. Otherwise it behaves like o_stream_flush(). + + The ostream.flush() methods are supposed to write their trailer (if the + ostream has one) when they see that ostream.finished is set. These will be + implemented by the following commits. + +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h + +2017-10-28 02:02:13 +0300 Timo Sirainen (34d5077c3) + + lib: o_stream_flush() - check for send overflows and reset error handling + + This begins the removal of o_stream_nfinish(). + +M src/lib/ostream.c +M src/lib/ostream.h + +2017-10-28 00:59:57 +0300 Timo Sirainen (b688884f2) + + lib: Remove o_stream_nflush() + + None of its previous callers were calling it correctly, so it's better to + remove it entirely to avoid more of such wrong calls. + +M src/lib/ostream.c +M src/lib/ostream.h + +2017-10-28 00:54:37 +0300 Timo Sirainen (401b336c8) + + imap: Make sure long COPY commands send "* OK Hang in there" packets + + o_stream_nflush() already flushed the writes to kernel, and Linux should + have sent them after 200ms delay, so this probably doesn't fix anything. + Using uncork+cork is a bit clearer way to indicate that the data really is + wanted to be sent now. + +M src/imap/cmd-copy.c + +2017-10-28 00:48:01 +0300 Timo Sirainen (414bbc6df) + + lib-imap: When sending "+ OK" to client, uncork ostream immediately + + This makes sure that it's sent to the client as soon as possible. + + Also removed o_stream_nflush(), since uncorking does that already. If there + is no corking, the "+ OK" was already attempted to be sent by the + o_stream_nsend() call and a flush is unlikely to help. + +M src/lib-imap/imap-parser.c + +2017-10-27 23:31:32 +0300 Timo Sirainen (f81141f5a) + + global: Remove unnecessary o_stream_nflush() calls + + The following o_stream_nfinish() or o_stream_uncork() calls it anyway. + +M src/imap/cmd-append.c +M src/imap/cmd-setmetadata.c +M src/imap/imap-client.c +M src/lib-http/http-server-connection.c +M src/lib-index/mail-index-write.c + +2017-10-27 23:31:56 +0300 Timo Sirainen (23c8c511f) + + lib: o_stream_uncork() - call o_stream_nflush() instead of o_stream_flush() + + Otherwise flush errors may be unintentionally ignored. This change requires + that all the o_stream_uncork() callers must call o_stream_nfinish() + afterwards, unless the ostream is set to ignore errors. + +M src/lib/ostream-file.c +M src/lib/ostream.c +M src/lib/ostream.h + +2017-10-28 00:13:28 +0300 Timo Sirainen (7e41ef20f) + + lib: test-ostream-* - Call o_stream_nfinish() after uncorking + + +M src/lib/test-ostream-buffer.c +M src/lib/test-ostream-file.c + +2017-10-30 11:56:32 +0200 Aki Tuomi (2fc183541) + + configure: Add support for EXTRA_LDFLAGS + + +M configure.ac + +2017-10-30 11:19:17 +0200 Timo Sirainen (e01ebd51a) + + imapc: Add imapc_features=fetch-empty-is-expunged + + When FETCH returns an empty mail, the mail is assumed to be expunged. + +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h + +2017-10-27 11:03:07 +0300 Martti Rannanjärvi (debc93e62) + + global: Use #ifdef instead of #if with WORDS_BIGENDIAN + + This is to not rely on undefined WORDS_BIGENDIAN being evaluated as 0. + +M src/lib-index/mail-index-map-hdr.c +M src/lib-index/mail-index-map.c +M src/lib-index/mail-transaction-log-file.c +M src/lib/byteorder.h +M src/lib/sha1.c +M src/lib/test-byteorder.c + +2017-10-27 11:08:36 +0300 Martti Rannanjärvi (d534a96e0) + + lib/compat.h: Undefine WORDS_BIGENDIAN when it's defined as 0 + + +M src/lib/compat.h + +2017-10-27 11:02:25 +0300 Martti Rannanjärvi (e3504130f) + + m4: Use AC_C_BIGENDIAN instead of custom m4 + + +M configure.ac +D m4/endian.m4 + +2017-10-24 10:27:23 +0300 Martti Rannanjärvi (111673ed6) + + lib-storage: Replace DBOX_GUID_BIN_LEN with GUID_128_SIZE + + DBOX_GUID_BIN_LEN define was removed in 0c909e, replace the use with + GUID_128_SIZE. + +M src/lib-storage/mail.c + +2017-10-24 10:24:23 +0300 Martti Rannanjärvi (0c347e983) + + director: Don't use undefined DIRECTOR_CONNECTION_PING_TIMEOUT_MSECS + + +M src/director/director-connection.c + +2017-10-24 10:23:20 +0300 Martti Rannanjärvi (0a8db75f7) + + auth: Don't use undefined SASL_VERSION_MAJOR + + +M src/auth/db-ldap.c + +2017-10-28 15:21:29 +0300 Aki Tuomi (6fc40674e) + + global: Rename client_connection_type to doveadm_connection_type + + +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection-private.h +M src/doveadm/client-connection-tcp.c +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-kick.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm.c +M src/doveadm/doveadm.h +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-10-27 21:57:31 +0300 Aki Tuomi (2ba5e7dcc) + + doveadm: Rename client_connection_type to doveadm_client_connection_type + + Move it to doveadm.h to allow plugins use doveadm-cmd.h + +M src/doveadm/client-connection-private.h +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm-kick.c +M src/doveadm/doveadm.h + +2017-10-27 22:06:28 +0300 Aki Tuomi (d29c67900) + + doveadm: Reorder includes + + This makes next commit possible + +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-print-formatted.c +M src/doveadm/doveadm-print-json.c +M src/doveadm/doveadm-print-server.c +M src/doveadm/main.c + +2017-10-23 12:01:27 +0300 Timo Sirainen (d81702ddd) + + quota: Improve error messages + + +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c + +2017-10-18 16:21:52 +0300 Timo Sirainen (39eefc53d) + + quota-fs: Default to quota API v2 if _LINUX_QUOTA_VERSION is undefined. + + glibc v2.25 drops v1 support in sys/quota.h and doesn't define + _LINUX_QUOTA_VERSION. + +M src/plugins/quota/quota-fs.c + +2017-10-17 15:44:38 +0200 Stephan Bosch (cf6131bda) + + doveadm-server: http: Properly implemented error handling for requests. + + +M src/doveadm/client-connection-http.c + +2017-10-17 18:03:59 +0200 Stephan Bosch (456e3b9c7) + + doveadm-server: http: Mark the HTTP request for connection closure right + away. + + This means that the connection is closed once the request finishes. Before, + each response did that individually. Once connection reuse is + implemented/needed this can now be turned off at one place. + +M src/doveadm/client-connection-http.c + +2017-10-11 00:57:08 +0200 Stephan Bosch (556a20280) + + doveadm-server: http: Restructured JSON parsing to improve code clarity. + + Made state machine more explicit and easier to understand. Also added more + comments. + +M src/doveadm/client-connection-http.c + +2017-10-16 23:27:45 +0200 Stephan Bosch (2511999c9) + + doveadm-server: http: Wrapped long code lines. + + +M src/doveadm/client-connection-http.c + +2017-10-11 00:10:38 +0200 Stephan Bosch (2341eb700) + + doveadm-server: http: Joined JSON parsing and handling in one function. + + +M src/doveadm/client-connection-http.c + +2017-10-10 23:51:57 +0200 Stephan Bosch (39e011148) + + doveadm-server: http: Split JSON handling into several sub-functions. + + +M src/doveadm/client-connection-http.c + +2017-10-08 13:27:26 +0200 Stephan Bosch (e97a359e4) + + doveadm-server: http: Split JSON parsing into several sub-functions. + + +M src/doveadm/client-connection-http.c + +2017-10-27 09:36:39 +0200 Stephan Bosch (2ccd63d6f) + + doveadm-server: http: Changed request parse error into an assertion. + + The condition can never occur when json-parser and the request parsing state + machine are behaving correctly. At that point only an object key can be + returned; the client cannot cause it to return anything else. + +M src/doveadm/client-connection-http.c + +2017-10-10 20:28:00 +0200 Stephan Bosch (664503c58) + + doveadm-server: http: Moved doveadm_http_server_command_execute(). + + +M src/doveadm/client-connection-http.c + +2017-10-08 01:19:34 +0200 Stephan Bosch (ce916cf4c) + + doveadm-server: http: Renamed parse state enum. + + +M src/doveadm/client-connection-http.c + +2017-10-07 22:33:26 +0200 Stephan Bosch (457869440) + + doveadm-server: http: Split off request handling in separate struct, so that + the connection can be reused. + + +M src/doveadm/client-connection-http.c + +2017-10-08 11:52:53 +0200 Stephan Bosch (14e38f290) + + doveadm-server: http: Added structural comments. + + +M src/doveadm/client-connection-http.c + +2017-10-08 11:44:40 +0200 Stephan Bosch (5927e94f4) + + doveadm-server: http: Moved doveadm_http_server_request_destroy(). + + +M src/doveadm/client-connection-http.c + +2017-10-07 19:11:04 +0200 Stephan Bosch (8bbeec794) + + doveadm-server: http: Moved doveadm_http_server_send_response(). + + +M src/doveadm/client-connection-http.c + +2017-10-07 19:08:03 +0200 Stephan Bosch (437eb0a37) + + doveadm-server: http: Moved connection-related code to the bottom of the + file. + + +M src/doveadm/client-connection-http.c + +2017-10-07 18:52:57 +0200 Stephan Bosch (3dee11217) + + doveadm-server: http: Make http_server_set a local variable of + doveadm_http_server_init(). + + +M src/doveadm/client-connection-http.c + +2017-10-07 18:47:53 +0200 Stephan Bosch (bcb83bf89) + + doveadm-server: http: Create the http_response once needed, not + preemptively. + + +M src/doveadm/client-connection-http.c + +2017-10-07 18:31:44 +0200 Stephan Bosch (8b24f7bd7) + + doveadm-server: http: Split authentication into multiple functions. + + +M src/doveadm/client-connection-http.c + +2017-10-07 17:37:41 +0200 Stephan Bosch (f607f622e) + + doveadm-server: http: Renamed conn->http_server_request to + conn->http_request. + + +M src/doveadm/client-connection-http.c + +2017-10-07 17:28:04 +0200 Stephan Bosch (1a7d36f61) + + doveadm-server: http: Removed http_request field from struct + client_connection_http. + + Not useful to put it there. + +M src/doveadm/client-connection-http.c + +2017-10-07 17:16:22 +0200 Stephan Bosch (2045a5dff) + + doveadm-server: http: Renamed conn->http_client to conn->http_conn. + + +M src/doveadm/client-connection-http.c + +2017-10-07 13:39:44 +0200 Stephan Bosch (80a225c0b) + + doveadm-server: Restructured client-connection code so that TCP and HTTP + connection types are properly separated. + + +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection-private.h +M src/doveadm/client-connection-tcp.c +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h +M src/doveadm/main.c + +2017-10-07 17:07:58 +0200 Stephan Bosch (ee063d661) + + doveadm-server: http: Moved client_connection_destroy_http(). + + +M src/doveadm/client-connection-http.c + +2017-10-07 17:07:10 +0200 Stephan Bosch (e60c3e17c) + + doveadm-server: tcp: Renamed client_connection_create() to + client_connection_tcp_create(). + + +M src/doveadm/client-connection-tcp.c +M src/doveadm/client-connection.h +M src/doveadm/main.c + +2017-10-07 17:06:09 +0200 Stephan Bosch (f300f9277) + + doveadm-server: http: Renamed client_connection_create_http() to + client_connection_http_create(). + + +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection.h +M src/doveadm/main.c + +2017-10-07 16:30:31 +0200 Stephan Bosch (4284e4925) + + doveadm-server: http: Renamed conn->client to conn->conn. + + +M src/doveadm/client-connection-http.c + +2017-10-07 16:57:45 +0200 Stephan Bosch (cd13c18ef) + + doveadm-server: tcp: Moved client_connection_destroy(). + + +M src/doveadm/client-connection-tcp.c + +2017-10-07 16:55:01 +0200 Stephan Bosch (57e356f69) + + doveadm-server: tcp: Cleaned up doveadm_server_log_handler(). + + +M src/doveadm/client-connection-tcp.c + +2017-10-07 16:48:14 +0200 Stephan Bosch (4e08875e5) + + doveadm-server: Moved common client code back from client-connection-tcp.c + to client-connection.c. + + +M src/doveadm/Makefile.am +M src/doveadm/client-connection-private.h +M src/doveadm/client-connection-tcp.c +A src/doveadm/client-connection.c + +2017-10-07 15:40:45 +0200 Stephan Bosch (c4292f96d) + + doveadm-server: Renamed client-connection.c to client-connection-tcp.c. + + Preparation for subsequent commits. + +M src/doveadm/Makefile.am +R100 src/doveadm/client-connection.c src/doveadm/client-connection-tcp.c + +2017-10-08 12:19:09 +0200 Stephan Bosch (e79e12174) + + doveadm-server: http: Changed index variables from size_t to unsigned int + where size_t makes no sense. + + +M src/doveadm/client-connection-http.c + +2017-10-18 19:01:10 +0200 Stephan Bosch (9cc49c886) + + doveadm-server: http: Changed initialization of parameters in + doveadm_http_handle_json_v1(). + + Use normal assignment, rather than memcpy(). This way, type checking is not + skipped unnecessarily. + +M src/doveadm/client-connection-http.c + +2017-10-08 12:04:11 +0200 Stephan Bosch (5381c92d0) + + doveadm-server: http: Use `ret' rather than `rc' as name for the local + variable used for return values. + + +M src/doveadm/client-connection-http.c + +2017-10-07 12:36:34 +0200 Stephan Bosch (df45032f2) + + doveadm-server: http: Cleaned up code formatting. + + +M src/doveadm/client-connection-http.c + +2017-10-09 14:38:52 +0200 Stephan Bosch (a602aa85c) + + doveadm-server: http: Created local variable for + conn->cmd_param->value.v_istream as an abbreviation. + + This is a preparation for subsequent commits. + +M src/doveadm/client-connection-http.c + +2017-10-09 13:57:27 +0200 Stephan Bosch (4b2c68685) + + doveadm-server: http: Created local variable for conn->client.output as an + abbreviation. + + This is a preparation for subsequent commits. + +M src/doveadm/client-connection-http.c + +2017-10-09 14:35:30 +0200 Stephan Bosch (f17ff90e3) + + doveadm-server: http: Created local variable for conn->http_request as an + abbreviation. + + This is a preparation for subsequent commits. + +M src/doveadm/client-connection-http.c + +2017-10-09 14:13:37 +0200 Stephan Bosch (28d5207fb) + + doveadm-server: http: Created local variable for conn->http_response as an + abbreviation. + + This also makes sure it is named consistently everywhere. This is a + preparation for subsequent commits. + +M src/doveadm/client-connection-http.c + +2017-10-09 13:43:42 +0200 Stephan Bosch (bf5c09951) + + doveadm-server: http: Created local variable for conn->http_server_request + as an abbreviation. + + This also makes sure it is named consistently everywhere. This is a + preparation for subsequent commits. + +M src/doveadm/client-connection-http.c + +2017-10-07 12:48:38 +0200 Stephan Bosch (db4c6cc02) + + doveadm-server: http: Moved loop body in + doveadm_http_server_read_request_v1() to separate function. + + +M src/doveadm/client-connection-http.c + +2017-10-10 15:58:33 +0200 Stephan Bosch (e16f28d4b) + + doveadm: mail: Removed redundant cur_username field from struct + doveadm_mail_cmd_context. + + +M src/doveadm/client-connection.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h + +2017-10-10 19:12:52 +0200 Stephan Bosch (2ff59d50f) + + doveadm: mail: Removed redundant cur_client_ip field from struct + doveadm_mail_cmd_context. + + +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h + +2017-10-10 19:04:20 +0200 Stephan Bosch (a435fb28f) + + doveadm: mail: Removed struct doveadm_cmd_context function parameters that + are now useless. + + It can be accessed from struct doveadm_mail_cmd_context. + +M src/doveadm/client-connection.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h + +2017-10-07 21:30:27 +0200 Stephan Bosch (1b58508a9) + + doveadm: Changed command contexts to contain the input, output, and + connection type values directly. + + Before, it used a direct pointer to the connection. It used also flags to + indicate the connection type, which is now consolidated in the connection + type enum. + +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection-private.h +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-kick.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h +M src/doveadm/doveadm.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-10-17 16:16:22 +0200 Stephan Bosch (001b7ca6a) + + lib-http: server: Implemented http_server_request_fail_text(), which allows + creating failure responses with verbose payload. + + +M src/lib-http/http-server-request.c +M src/lib-http/http-server.h + +2017-10-17 16:04:38 +0200 Stephan Bosch (a5886aec8) + + lib-http: server: Allow determining at any time whether the connection will + be closed after handling a request. + + Previously, this was only possible during response submission, which + potentially requires making a `close' parameter available for any API + function that submits a (failure) response. This would become very ugly and + inflexible. + +M src/lib-http/http-server-private.h +M src/lib-http/http-server-request.c +M src/lib-http/http-server-response.c +M src/lib-http/http-server.h + +2017-10-17 16:35:06 +0200 Stephan Bosch (359947c28) + + lib-http: server: Set `Connection:' header in response to `close' when + request contains the same. + + Before, it would set it to `Connection: keep-alive', which makes no sense. + +M src/lib-http/http-server-response.c + +2017-10-17 16:28:06 +0200 Stephan Bosch (e2a5de324) + + lib-http: server: Make sure broken connection input always causes the + connection to be closed after response. + + +M src/lib-http/http-server-request.c +M src/lib-http/http-server-response.c + +2017-10-20 11:04:41 +0300 Timo Sirainen (68969d3f5) + + maildir: Fix memory leak when mailbox opening fails + + +M src/lib-storage/index/maildir/maildir-storage.c + +2017-10-23 15:46:49 +0300 Aki Tuomi (0190b33c0) + + lib-fts: Fix test-fts-filter to use valid unicode + + +M src/lib-fts/test-fts-filter.c + +2017-10-20 15:15:35 +0300 Aki Tuomi (95f5b08fa) + + test-json-parser: Use idx to better identify failing case + + +M src/lib/test-json-parser.c + +2017-10-19 12:35:33 +0300 Aki Tuomi (a01faca54) + + test-json-parser: Update tests + + Now that we actually check for valid unicode, the tests need to have valid + unicode and invalid unicode in correct places. + +M src/lib/json-parser.c +M src/lib/test-json-parser.c + +2017-10-20 14:10:41 +0300 Aki Tuomi (9b26e0815) + + test-unichar: Add test for surrogate handling + + +M src/lib/test-unichar.c + +2017-10-19 11:55:01 +0300 Aki Tuomi (e7e451b7d) + + test-unichar: Update test to conform RFC3629 + + +M src/lib/test-unichar.c + +2017-10-19 11:54:20 +0300 Aki Tuomi (dcd2bdbf7) + + unichar: Do not accept invalid ranges + + As per RFC3629 + +M src/lib/unichar.c + +2017-10-20 14:36:32 +0300 Aki Tuomi (2f4060356) + + json-parser: Fix unicode parsing + + Check for surrogates and validate ucs4 codepoint. + +M src/lib/json-parser.c + +2017-10-23 15:03:30 +0300 Aki Tuomi (c47167da2) + + unichar: Use surrogate macros in ucs4 validity check + + +M src/lib/unichar.h + +2017-10-20 14:10:26 +0300 Aki Tuomi (2bb5b6721) + + unichar: Add surrogate handling + + +M src/lib/unichar.h + +2017-10-20 13:14:02 +0300 Aki Tuomi (5fc1d7c7c) + + unichar: Add uni_is_valid_ucs4 + + +M src/lib/unichar.h + +2017-10-23 13:34:56 +0300 Timo Sirainen (f8cd64fc6) + + lib-master: Change instances.lock settings to make it less likely to fail + + With use_io_notify it's spending less time usleep()ing. Use also a slightly + longer timeout just in case. + + If a lot of instances were started at the same time, some of them could have + failed with: master: Error: file_dotlock_open(.../instances) failed: + Resource temporarily unavailable + +M src/lib-master/master-instance.c + +2017-10-19 14:39:01 +0300 Timo Sirainen (5b0b45ba0) + + lib-storage: Fix assert-crash when searching header and MIMEPART + + For now this is just a bit kludgy workaround. The proper fix requires larger + changes, which aren't worth the effort right now. + + For example: doveadm fetch -u testuser uid MAILBOX inbox FROM foo MIMEPART + FILENAME CONTAINS bar BODY baz + + Crashes with: Panic: file index-mail-headers.c: line 294 + (index_mail_parse_header): assertion failed: (part != NULL) + +M src/lib-storage/index/index-search.c + +2017-10-20 07:57:17 +0300 Martti Rannanjärvi (bf20e0e1a) + + quota-maildir: Don't deref NULL pointer on list deinit + + +M src/plugins/quota/quota-maildir.c + +2017-10-21 00:36:55 +0200 Stephan Bosch (9dd47ae5c) + + lmtp: Fixed passing SMTP submit settings to plugins. + + This caused Sieve to crash upon SMTP message submission; e.g., during + redirect. + +M src/lmtp/commands.c + +2017-10-19 13:05:41 +0300 Timo Sirainen (85174bd65) + + lib: printf_format_fix*() - Support '*' in precision + + We're commonly using "%.*s" + +M src/lib/printf-format-fix.c +M src/lib/test-printf-format-fix.c + +2017-10-19 13:02:34 +0300 Timo Sirainen (686a3be71) + + lib: printf_format_fix*() - Move minimum field width check to its own + function + + +M src/lib/printf-format-fix.c + +2017-10-19 13:26:27 +0300 Timo Sirainen (92cb1ef4f) + + lib: printf_format_fix*() - Use the same 4 digits as maximum precision + length + + I forgot the precision can also be used to truncate strings, not just + specify the precision for floating point numbers. So it makes more sense + that the limit is the same as for minimum field width. + +M src/lib/printf-format-fix.c +M src/lib/test-printf-format-fix.c + +2017-10-16 15:55:16 +0300 Martti Rannanjärvi (6d1372638) + + quota-maildir: Improve error_r strings + + +M src/plugins/quota/quota-maildir.c + +2017-10-16 14:50:34 +0300 Martti Rannanjärvi (9a603e865) + + quota-fs: Improve error_r strings + + +M src/plugins/quota/quota-fs.c + +2017-10-17 10:26:41 +0300 Martti Rannanjärvi (3f0ef4a28) + + quota-dirsize: Improve error_r strings + + +M src/plugins/quota/quota-dirsize.c + +2017-10-16 14:05:00 +0300 Martti Rannanjärvi (2b4e421b7) + + quota-dict: Improve error_r strings + + +M src/plugins/quota/quota-dict.c + +2017-10-17 11:57:29 +0300 Martti Rannanjärvi (d2cbbecf7) + + quota-count: Improve error_r strings + + +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-private.h + +2017-10-16 09:58:24 +0300 Martti Rannanjärvi (b82a5c78f) + + quota-imapc: Improve error_r strings + + +M src/plugins/quota/quota-imapc.c + +2017-10-16 12:38:32 +0300 Martti Rannanjärvi (7b3b617e9) + + quota: Add error_r to update() of quota_backend_vfuncs + + +M src/plugins/quota/doveadm-quota.c +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c + +2017-10-17 10:12:48 +0300 Martti Rannanjärvi (a525be16a) + + quota: Add error_r to get_resource() of quota_backend_vfuncs + + +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c + +2017-10-16 12:18:53 +0300 Martti Rannanjärvi (e83a11eb1) + + quota: Add error_r parameter to init_limits() of quota_backend_vfuncs + + +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c + +2017-09-20 09:31:40 +0300 Martti Rannanjärvi (cf4131887) + + quota: Add error_r to quota_get_resource() + + +M src/plugins/imap-quota/imap-quota-plugin.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/doveadm-quota.c +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h + +2017-10-06 23:45:41 +0300 Martti Rannanjärvi (efd291767) + + quota: Add error_r to quota_transaction_set_limits() + + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c + +2017-09-20 08:18:11 +0300 Martti Rannanjärvi (4b5c9cdb6) + + quota: Add error string to quota_set_storage_error() + + +M src/plugins/quota/quota-storage.c + +2017-10-06 23:35:34 +0300 Martti Rannanjärvi (b62139aae) + + quota: Add error_r to quota_settings->test_alloc() + + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h +M src/plugins/trash/trash-plugin.c + +2017-10-16 22:52:59 +0300 Martti Rannanjärvi (17ec7fd70) + + quota-maildir: Remove T_BEGIN..T_END blocks + + This is to enable using t_strdup_printf() with error_r later on. + +M src/plugins/quota/quota-maildir.c + +2017-10-16 22:50:11 +0300 Martti Rannanjärvi (d77b5c30f) + + quota-fs: Remove T_BEGIN..T_END from fs_quota_get_resource() + + This is to enable using t_strdup_printf() with error_r later on. + +M src/plugins/quota/quota-fs.c + +2017-10-16 22:47:14 +0300 Martti Rannanjärvi (90bca08ad) + + quota-dirsize: Remove T_BEGIN..T_END from dirsize_quota_get_resource() + + This is to enable using t_strdup_printf() with error_r later on. + +M src/plugins/quota/quota-dirsize.c + +2017-10-16 22:35:31 +0300 Martti Rannanjärvi (572988271) + + quota-dict: Remove T_BEGIN..T_END blocks + + This is to enable using t_strdup_printf() with error_r later on. + +M src/plugins/quota/quota-dict.c + +2017-10-17 16:05:47 +0300 Martti Rannanjärvi (5997118fa) + + quota: Initialize quota_backends with designated initializers + + +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota-maildir.c + +2017-10-19 15:39:28 +0300 Timo Sirainen (a8adad33c) + + auth: Fix %{ldap_dn} not to leak memory + + +M src/auth/db-ldap.c + +2017-10-19 12:28:38 +0300 Martti Rannanjärvi (f4d6aeaa4) + + acl: Don't deref a potentially uninitialized pointer in acl_global_file_read + + +M src/plugins/acl/acl-global-file.c + +2017-10-17 17:39:32 +0300 Timo Sirainen (c398eca6b) + + lib: printf_format_fix*() - Be over-strict in what format strings are + allowed + + The checks could have been bypassed by some invalid format strings that were + handled differently by the printf_format_fix*() code and libc. For example + "%**%n" was passed through as ok, but glibc handled the %n in it. + + Found by cPanel Security Team. + +M src/lib/printf-format-fix.c +M src/lib/test-printf-format-fix.c + +2017-10-16 18:40:38 +0300 Aki Tuomi (32c261251) + + libpassword: Add unit tests + + +M src/auth/Makefile.am +A src/auth/test-libpassword.c + +2017-10-16 16:42:43 +0300 Timo Sirainen (a647edfc2) + + auth: Fix compiling crypt-blowfish with i386 + + We're not going to support any assembly code, so remove BF_ASM entirely. + +M src/auth/crypt-blowfish.c + +2017-10-17 03:19:19 +0200 Stephan Bosch (20939b554) + + doveadm-server: http: Fixed lingering connections after the request is sent. + + Turns out conn->http_client is already NULL while + doveadm_http_server_connection_destroy() is called. This is because + http_server_connection_unref() sets it to NULL; Fixed by removing useless + HTTP connection reference. + +M src/doveadm/client-connection-http.c + +2017-10-16 15:41:56 +0300 Timo Sirainen (344c44115) + + cassandra: Support "timestamp" type fields properly + + Fixes setting them with prepared statements. Reading them never worked + earlier. + +M src/lib-sql/driver-cassandra.c + +2017-10-16 15:12:12 +0300 Timo Sirainen (b6c9cc2bf) + + cassandra: Include "prepared" when logging about prepared statement queries + + Mainly useful for debugging/testing. + +M src/lib-sql/driver-cassandra.c + +2017-10-16 14:49:56 +0300 Timo Sirainen (27688ec19) + + cassandra: Fix using bigint types with unprepared statements + + This reverts the code to not using the statements with binding at all. + Alternative fix would be to start using explicit int32 or int64 parameter + types, but that breaks backwards compatibility a bit. + +M src/lib-sql/driver-cassandra.c + +2017-10-16 18:39:14 +0300 Aki Tuomi (42f8ce7c2) + + libpassword: Deinitialize hash iterator in password_scheme_detect + + Otherwise it will leak memory + +M src/auth/password-scheme.c + +2017-08-22 16:29:25 +0300 Timo Sirainen (68c4b2cd6) + + ipc: Improve error logging when IPC server is disconnected + + +M src/ipc/ipc-connection.c +M src/ipc/ipc-connection.h +M src/ipc/ipc-group.c + +2017-10-16 13:34:35 +0300 Timo Sirainen (d816ebd09) + + lib-dict-backend: Fix linking test-dict-sql + + dict_drivers_register_builtin() wasn't found. + +M src/lib-dict-backend/Makefile.am + +2017-10-10 15:04:28 +0300 Aki Tuomi (1ebb6094e) + + libpassword: Add BLF-CRYPT support independent of crypt + + +M AUTHORS +M src/auth/Makefile.am +A src/auth/crypt-blowfish.c +A src/auth/crypt-blowfish.h +M src/auth/password-scheme-crypt.c +M src/auth/password-scheme.c + +2017-10-10 14:24:44 +0300 Aki Tuomi (58d21a174) + + auth: Fix typo in blowfish name + + +M src/auth/password-scheme-crypt.c +M src/auth/password-scheme.h + +2017-10-16 13:53:58 +0300 Timo Sirainen (0cf4f39f6) + + lib-fs: Fix fs_wrapper_write_stream_finish() to work with async parent fs + + This only became a problem with the previous fs-compress change. + +M src/lib-fs/fs-wrapper.c + +2017-09-18 15:27:38 +0300 Aki Tuomi (b6fbc235f) + + login-common: Use HAproxy provided proxy.ssl information + + If the connection is proxied via system that can terminate ssl for us, such + as HAproxy, use that information only. + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/sasl-server.c + +2017-09-18 15:25:21 +0300 Aki Tuomi (b68b98e15) + + lib-master: Support HAproxy TLVs + + This allows passing in information about SSL and client certificate(s) and + other information from haproxy. + +M src/lib-master/master-service-haproxy.c +M src/lib-master/master-service.h + +2017-10-03 11:15:54 +0300 Aki Tuomi (894610212) + + lib-master: Use pooled memory for haproxy + + +M src/lib-master/master-service-haproxy.c + +2017-09-18 15:21:04 +0300 Aki Tuomi (f43567aab) + + lib-master: Fix haproxy reading code to read data incrementally + + +M src/lib-master/master-service-haproxy.c + +2017-10-10 17:58:03 +0300 Aki Tuomi (0babe1cf4) + + libpassword: Add support for ARGON2 scheme + + +M src/auth/Makefile.am +A src/auth/password-scheme-sodium.c +M src/auth/password-scheme.c +M src/auth/password-scheme.h +M src/doveadm/Makefile.am + +2017-10-10 15:24:17 +0300 Aki Tuomi (626421c24) + + configure: Detect libsodium presence + + +M configure.ac +A m4/want_sodium.m4 + +2017-10-11 16:33:57 -0400 Josef 'Jeff' Sipek (ca5b42cad) + + acl plugin: avoid "'struct stat' declared inside parameter list" warning + + +M src/plugins/acl/acl-api.h + +2017-10-13 12:34:01 +0300 Timo Sirainen (7542b9c48) + + fs-compress: Allow compress level 0 to skip compression + + This can be useful when combined with the "maybe-" prefix, so Dovecot will + support reading compressed files without creating new ones. + +M src/plugins/fs-compress/fs-compress.c + +2017-10-10 17:40:04 -0400 Bill Cole <18053819+grumpybozo@users.noreply.github.com> (0fbce082b) + + Added "ULL" to the hex literals that needed it. + + On 32-bit platforms with older compilers (e.g. gcc 4.2 on MacOS 10.6 running + on a 1st-gen Core Duo) a 'long' is 4 bytes and the compiler does not + automatically use a 'long long' when needed, but instead generates an error. + e.g.: + + libtool: compile: /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../../.. + -I../../../src/lib -I../../../src/lib-mail -I../../../src/lib-index + -I../../../src/lib-storage -I../../../src/plugins/fts -I../../../src/doveadm + -I/opt/local/include/openssl -I/opt/local/include + -I/opt/local/include/CLucene/ext -pipe -Os -arch i386 -D__STDC_LIMIT_MACROS + -MT lucene-wrapper.lo -MD -MP -MF .deps/lucene-wrapper.Tpo -c + lucene-wrapper.cc -fno-common -DPIC -o .libs/lucene-wrapper.o In file + included from ../../../src/lib/lib.h:33, + from lucene-wrapper.cc:4: + ../../../src/lib/byteorder.h:94: error: integer constant is too large for + ‘long’ type + ../../../src/lib/byteorder.h:95: error: integer constant is too large for + ‘long’ type + ../../../src/lib/byteorder.h:96: error: integer constant is too large for + ‘long’ type + ../../../src/lib/byteorder.h:97: error: integer constant is too large for + ‘long’ type make[4]: *** [lucene-wrapper.lo] Error 1 + + Adding the 'ULL' to the end of the 16-digit hex literals that are used to + test the structure of 64-bit integers fixes this and avoids any problem + which could arise from the compiler using a 32-bit type for those literals + that could fit in 32 bites. + +M src/lib/byteorder.h + +2017-10-14 12:54:18 +0300 Timo Sirainen (187fbf157) + + doveadm proxy: Don't crash if remote doesn't support log proxying + + +M src/doveadm/server-connection.c + +2017-10-09 16:37:08 +0300 Timo Sirainen (2ae85e9cc) + + lib-storage: Add settings to configure lib-index optimization parameters + + The defaults are expected to be pretty good, but these settings make it + easier to test whether other values might be more optimal. + +M src/lib-storage/index/index-storage.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2017-10-09 15:37:51 +0300 Timo Sirainen (67bbcd664) + + lib-index: Add mail_index_cache_optimization_settings + + +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/lib-index/mail-cache-compress.c +M src/lib-index/mail-cache-fields.c +M src/lib-index/mail-cache-private.h +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-cache.c +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h + +2017-10-09 15:24:45 +0300 Timo Sirainen (3a7832916) + + lib-index: Add mail_index_base_optimization_settings + + +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h + +2017-10-09 15:15:08 +0300 Timo Sirainen (7ce557e37) + + lib-index: Replace mail_index_set_log_rotation() with + mail_index_set_optimization_settings() + + This allows more easily adding optimization-related settings. + +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log.c +M src/lib-storage/list/mailbox-list-index.c + +2017-10-11 12:42:11 +0300 Aki Tuomi (90cc7e61b) + + lib-dict: Remove test_dict_sql + + It got accidentically added in 149299c7 + +M src/lib-dict/Makefile.am + +2017-10-11 13:03:51 +0300 Timo Sirainen (61eec37dd) + + lib-master: Allow a second log initialization after settings have been read. + + This fixes logging with services that bypass the log service (lda or -L + parameter). + +M src/lib-master/master-service.c + +2017-10-06 18:33:24 +0300 Timo Sirainen (43b9125ad) + + fs-compress: Support reading uncompressed input by prefixing compression + format with "maybe-" + + +M src/plugins/fs-compress/fs-compress.c + +2017-10-06 18:31:12 +0300 Timo Sirainen (e9fe799e2) + + lib: Add istream-try + + This can be used to automatically detect the underlying istream format from + a given list of choices. + +M src/lib/Makefile.am +A src/lib/istream-try.c +A src/lib/istream-try.h +A src/lib/test-istream-try.c +M src/lib/test-lib.inc + +2017-10-09 18:31:52 +0300 Timo Sirainen (f0910b5cd) + + lib: io_stream_set_error() - Allow one of the parameters to be the old error + + +M src/lib/iostream.c + +2017-10-04 21:45:18 +0300 Timo Sirainen (149299c7d) + + global: Use check-local in Makefile.am instead of overriding check directly + + This helps with dependency problems, like running "make check" in + lib-storage without "make" first would try to compile the test programs too + early and fail. + +M src/anvil/Makefile.am +M src/auth/Makefile.am +M src/director/Makefile.am +M src/doveadm/Makefile.am +M src/doveadm/dsync/Makefile.am +M src/lib-charset/Makefile.am +M src/lib-compression/Makefile.am +M src/lib-dcrypt/Makefile.am +M src/lib-dict-backend/Makefile.am +M src/lib-dict/Makefile.am +M src/lib-dns/Makefile.am +M src/lib-fs/Makefile.am +M src/lib-fts/Makefile.am +M src/lib-http/Makefile.am +M src/lib-imap-client/Makefile.am +M src/lib-imap/Makefile.am +M src/lib-index/Makefile.am +M src/lib-ldap/Makefile.am +M src/lib-mail/Makefile.am +M src/lib-master/Makefile.am +M src/lib-program-client/Makefile.am +M src/lib-settings/Makefile.am +M src/lib-smtp/Makefile.am +M src/lib-storage/Makefile.am +M src/lib/Makefile.am +M src/plugins/mail-crypt/Makefile.am +M src/plugins/pop3-migration/Makefile.am +M src/plugins/quota/Makefile.am +M src/plugins/var-expand-crypt/Makefile.am + +2017-10-08 21:08:14 +0300 Timo Sirainen (3cd37f77d) + + lib-sql, lib-ldap: Fix link dependencies + + Fixes using the gold linker. + +M src/lib-ldap/Makefile.am +M src/lib-sql/Makefile.am + +2017-10-10 15:38:13 +0300 Timo Sirainen (6139e5f5c) + + lib: ostream-multiplex - ignore flush return value + + There's nothing that can be done about it at close() time. Silences static + analyzer warnings. + +M src/lib/ostream-multiplex.c + +2017-10-10 15:37:39 +0300 Timo Sirainen (95c4374dc) + + lib: ostream-multiplex - remove unnecessary flushes + + +M src/lib/ostream-multiplex.c + +2017-10-10 12:33:08 +0300 Timo Sirainen (f01fe9df4) + + lib: istream-multiplex - Minor optimization + + There's no need to find channel when we already know it. This also helps + static analyzers to understand that req_channel can't be NULL. + +M src/lib/istream-multiplex.c + +2017-10-06 09:02:49 +0300 Aki Tuomi (4e6865715) + + ostream-multiplex: Check flush return value + + +M src/lib/ostream-multiplex.c + +2017-10-06 08:58:16 +0300 Aki Tuomi (c31803dcb) + + global: Use i_close_fd instead of close + + Some were missed, found by coverity + +M src/lib-program-client/test-program-client-net.c +M src/lib/test-iostream-proxy.c +M src/master/sd-daemon.c +M src/plugins/fts-squat/squat-test.c + +2017-10-06 08:55:33 +0300 Aki Tuomi (16bb4836f) + + test-ostream-escaped: Check flush return value + + Found by coverity + +M src/lib/test-ostream-escaped.c + +2017-10-06 08:54:38 +0300 Aki Tuomi (ca877eab4) + + doveadm-server: Remove flush before multiplex + + It's not really necessary, found by coverity + +M src/doveadm/client-connection.c + +2017-10-06 08:52:18 +0300 Aki Tuomi (bc038dfe3) + + iostream-multiplex: Check return values in tests + + +M src/lib/test-istream-multiplex.c +M src/lib/test-multiplex.c +M src/lib/test-ostream-multiplex.c + +2017-10-06 08:46:00 +0300 Aki Tuomi (f85250d81) + + doveadm: Return after destroying connection + + Prevents NULL deferences, found by coverity. + +M src/doveadm/server-connection.c + +2017-10-09 18:21:24 +0300 Aki Tuomi (2707567db) + + ostream-multiplex: Unreference stream parent + + Otherwise it won't get free'd. + +M src/lib/ostream-multiplex.c + +2017-10-09 13:55:06 +0300 Timo Sirainen (59d3aed7a) + + doveadm: Add remote(host) prefix to all proxied logs + + +M src/doveadm/server-connection.c + +2017-10-09 14:28:17 +0300 Timo Sirainen (8a2df8a89) + + doveadm log test: Fix it to work again + + Broken by 719abeb2088987f213a33a7dd1fe78958beaef03 + +M src/doveadm/doveadm-log.c + +2017-10-09 13:19:32 +0300 Timo Sirainen (0bb5678d8) + + lib: ostream-multiplex - set ostream_private.parent + + Unlike with istream-multiplex, there are no issues with I/Os. Only the + parent stream will have the I/O. Using the default parent adds the missing + methods that otherwise would have needed to be implemented: + - cork + - flush_pending + - switch_ioloop + +M src/lib/ostream-multiplex.c + +2017-10-09 13:14:23 +0300 Timo Sirainen (36aa1b351) + + lib: istream-multiplex - Forward i_stream_switch_ioloop() to parent + + Most istreams do this because istream_private.parent is set to the parent + stream, but this can't be done with istream-multiplex. The main problem with + attempting to do the same with istream-multiplex is that the different + channels don't share the same I/O. Just because one channel received data + doesn't mean that other channels received any data. (It would be possible to + solve this by implementing a new method that allows overriding + i_stream_set_io(), but I'm not sure if that's a good idea either.) + +M src/lib/istream-multiplex.c + +2017-10-09 01:22:47 +0300 Timo Sirainen (f2de2be0e) + + acl: Fix compiler warning with -Wstrict-bool + + +M src/plugins/acl/acl-backend-vfile.c + +2017-10-06 12:47:06 +0300 Martti Rannanjärvi (795c4a5e5) + + doveadm-mail-crypt: Print existing folder key hash when aborting generate + + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-10-06 16:55:28 +0300 Timo Sirainen (af1342870) + + acl: Fix checking create (k) permission in global acl-file + + Just because the global ACL file hasn't changed since it was last refreshed + for another ACL object, it doesn't mean that those ACLs don't need to be + applied to this ACL object. + + This didn't usually cause problems, because the initial ACL object refresh + was always done due to local-path refresh returning "needs a refresh". The + only exception was when acl_object_init_from_parent() was called, because it + added an empty non-NULL validity for the local-path, so the + "needs a refresh" wasn't returned. This happened only when trying to CREATE + or RENAME mailbox under a parent where user didn't have create permissions. + + This affected only when using a single global acl-file, not when using + global acl directory containing per-mailbox files. + +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/acl/acl-global-file.c +M src/plugins/acl/acl-global-file.h + +2017-10-06 16:54:20 +0300 Timo Sirainen (f988345bc) + + acl: Cleanup - move code to a new acl_vfile_validity_has_changed() + + +M src/plugins/acl/acl-backend-vfile.c + +2017-10-06 16:44:01 +0300 Timo Sirainen (587cca00f) + + acl: Fix checking whether global acl-file has changed + + We always assumed that it was changed and re-read it. + +M src/plugins/acl/acl-global-file.c + +2017-10-06 15:54:47 +0300 Timo Sirainen (6781f16b2) + + dict-sql: dict doesn't support NULL values, so convert SQL NULLs to "" + + +M src/lib-dict-backend/dict-sql.c + +2017-10-06 15:52:36 +0300 Timo Sirainen (0b307ab3d) + + lib-sql: Add comments about NULL values. + + +M src/lib-sql/sql-api.h + +2017-10-03 17:28:39 +0300 Martti Rannanjärvi (f89eb8f2c) + + global: Use PRIdTIME_T and PRIxTIME_T format specifiers + + +M src/director/doveadm-connection.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/lib-stats/stats-parser.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/mail-search-mime.c +M src/lib/iostream-rawlog.c +M src/plugins/expire/doveadm-expire.c + +2017-10-06 15:10:53 +0300 Martti Rannanjärvi (eb7f74b89) + + master,stats: Use time_t instead of unsigned long to count seconds + + +M src/master/main.c +M src/stats/mail-stats.c + +2017-09-19 19:39:19 +0300 Martti Rannanjärvi (2f14f9b2d) + + m4: Add PRIdTIME_T and PRIxTIME_T format specifiers + + +M configure.ac +A m4/time_t.m4 +D m4/time_t_signed.m4 + +2017-09-19 11:57:18 +0300 Martti Rannanjärvi (47a5a7e82) + + global: Use PRI* macros and %zu instead of casting + + +M src/auth/passdb-cache.c +M src/config/config-request.c +M src/dict/main.c +M src/director/main.c +M src/doveadm/doveadm-dump-index.c +M src/doveadm/doveadm-dump-log.c +M src/doveadm/doveadm-stats.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/imap/cmd-select.c +M src/imap/imap-client.c +M src/imap/imap-fetch.c +M src/imap/imap-search.c +M src/imap/imap-state.c +M src/imap/imap-status.c +M src/imap/imap-sync.c +M src/lib-dict-backend/dict-sql.c +M src/lib-dict/dict-client.c +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-sql/driver-cassandra.c +M src/lib-stats/stats-parser.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/mail-search-args-imap.c +M src/lib-storage/mail-search-mime.c +M src/lib/data-stack.c +M src/master/service-process.c +M src/plugins/imap-quota/imap-quota-plugin.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-util.c +M src/plugins/quota/quota.c +M src/plugins/trash/trash-plugin.c + +2017-10-06 14:39:00 +0300 Timo Sirainen (c13ec2148) + + pop3: Expand settings to fix rawlog_dir + + Even if %variables weren't used in rawlog_dir, the path was always prefixed + with "0". + +M src/pop3/main.c + +2017-10-06 14:52:54 +0300 Timo Sirainen (078e0f0c5) + + lib-settings: Add assert to help static analyzer + + +M src/lib-settings/settings-parser.c + +2017-10-06 14:50:35 +0300 Timo Sirainen (5d7fe1420) + + mail-crypt: test-mail-key - Fix potential crash on a failed test + + Avoids "Uninitialized argument value" warning from static analyzer. + +M src/plugins/mail-crypt/test-mail-key.c + +2017-10-06 14:48:37 +0300 Timo Sirainen (c77400ca3) + + lib: test-mempool-alloconly - help static analyzer understand that pool is + non-NULL + + +M src/lib/test-mempool-alloconly.c + +2017-10-06 14:43:57 +0300 Timo Sirainen (b78f4649c) + + lib: istream-multiplex - remove dead assignment + + +M src/lib/istream-multiplex.c + +2017-10-06 11:07:23 +0300 Martti Rannanjärvi (d2f5bff15) + + doveadm-mail-crypt: Print existing userkey hash when aborting generate + + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-10-04 09:01:43 -0400 Josef 'Jeff' Sipek (e5f373495) + + lib: don't use foo_real()-style symbols in a header file + + While there is precedent for symbols getting _real suffix to hide + implementation details, all the existing symbols were static until the + recent i_fd_close*() changes. This commit makes this true again. + +M src/lib/fd-util.c +M src/lib/fd-util.h + +2017-10-04 08:58:36 -0400 Josef 'Jeff' Sipek (713e3ec4d) + + lib: move i_fd_close*() to fd-util.[ch] + + +M src/lib/fd-util.c +M src/lib/fd-util.h +M src/lib/lib.c +M src/lib/macros.h + +2017-10-04 08:52:13 -0400 Josef 'Jeff' Sipek (83b799ebd) + + lib: move fd_close_maybe_stdio() to fd-util.[ch] + + +M src/lib/fd-util.c +M src/lib/fd-util.h +M src/lib/lib.c +M src/lib/lib.h + +2017-10-04 08:42:56 -0400 Josef 'Jeff' Sipek (184d3a07c) + + lib: move fd_set_nonblock() to fd-util.[ch] + + +M src/lib/Makefile.am +D src/lib/fd-set-nonblock.c +D src/lib/fd-set-nonblock.h +M src/lib/fd-util.c +M src/lib/fd-util.h + +2017-10-04 08:28:38 -0400 Josef 'Jeff' Sipek (fa26ad329) + + lib: move fd-close-on-exec.[ch] code into fd-util.[ch] + + +M src/lib/Makefile.am +D src/lib/fd-close-on-exec.h +R100 src/lib/fd-close-on-exec.c src/lib/fd-util.c +M src/lib/fd-util.h + +2017-10-05 13:06:09 -0400 Josef 'Jeff' Sipek (1ef9fe877) + + global: stop including fd-set-nonblock.h & fd-close-on-exec.h directly + + +M src/doveadm/doveadm-dsync.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/imap-hibernate/imap-client.c +M src/imap/main.c +M src/lda/main.c +M src/lib-imap-client/test-imapc-client.c +M src/lib-master/master-login.c +M src/lib-master/master-service.c +M src/lib/failures.c +M src/lib/fd-close-on-exec.c +M src/lib/fd-set-nonblock.c +M src/lib/ioloop-epoll.c +M src/lib/ioloop-kqueue.c +M src/lib/ioloop-notify-inotify.c +M src/lib/ioloop-notify-kqueue.c +M src/lib/istream.c +M src/lib/lib-signals.c +M src/lib/lib.c +M src/lib/mmap-anon.c +M src/lib/net.c +M src/lib/randgen.c +M src/lib/test-iostream-proxy.c +M src/lib/test-iostream-pump.c +M src/lib/test-istream-multiplex.c +M src/lib/test-istream-unix.c +M src/lib/test-multiplex.c +M src/lib/test-ostream-multiplex.c +M src/lmtp/main.c +M src/login-common/login-proxy-state.c +M src/master/dup2-array.c +M src/master/main.c +M src/master/service-anvil.c +M src/master/service-listen.c +M src/master/service-log.c +M src/master/service-monitor.c +M src/master/service-process.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/replication/replication-plugin.c +M src/util/rawlog.c + +2017-10-05 13:05:20 -0400 Josef 'Jeff' Sipek (df6b9bbcd) + + lib: always include fd-close-on-exec.h & fd-set-nonblock.h via fd-util.h + + +M src/lib/Makefile.am +A src/lib/fd-util.h +M src/lib/lib.h + +2017-10-05 20:25:29 +0300 Timo Sirainen (c704b7fa1) + + lib: iostream-multiplex tests - Fix hangs by setting the pipe fds + non-blocking + + +M src/lib/test-istream-multiplex.c +M src/lib/test-multiplex.c +M src/lib/test-ostream-multiplex.c + +2017-10-05 20:24:11 +0300 Timo Sirainen (c50acc554) + + lib: istream-multiplex - Minor code cleanup + + Avoid propagating the error twice, and avoid any confusion about what "got" + actually contains. + +M src/lib/istream-multiplex.c + +2017-10-04 21:13:13 +0300 Timo Sirainen (02b352f20) + + dict-ldap: Link directly to dict binary, unless --with-ldap=plugin was used + + This is similar to how authdb_ldap plugin is built. + +M m4/want_ldap.m4 +M src/lib-dict-backend/Makefile.am +M src/lib-dict-backend/dict-ldap-settings.c +M src/lib-dict-backend/dict-ldap.c + +2017-10-04 21:01:18 +0300 Timo Sirainen (2ce002148) + + dict-ldap: Move from plugins/dict-ldap to lib-dict-backend + + +M configure.ac +M src/lib-dict-backend/Makefile.am +R100 src/plugins/dict-ldap/dict-ldap-settings.c src/lib-dict-backend/dict-ldap-settings.c +R100 src/plugins/dict-ldap/dict-ldap-settings.h src/lib-dict-backend/dict-ldap-settings.h +R100 src/plugins/dict-ldap/dict-ldap.c src/lib-dict-backend/dict-ldap.c +M src/plugins/Makefile.am +D src/plugins/dict-ldap/Makefile.am + +2017-10-04 20:48:24 +0300 Timo Sirainen (490729624) + + lib-dict-backend: Build test-dict-sql even without "make check" + + There's no longer a dependency problem. + +M src/lib-dict-backend/Makefile.am + +2017-10-04 20:46:10 +0300 Timo Sirainen (e5224c058) + + lib-dict: Move libdict_backend to lib-dict-backend + + +M .gitignore +M configure.ac +M src/Makefile.am +M src/dict/Makefile.am +A src/lib-dict-backend/Makefile.am +R100 src/lib-dict/dict-cdb.c src/lib-dict-backend/dict-cdb.c +R100 src/lib-dict/dict-db.c src/lib-dict-backend/dict-db.c +R100 src/lib-dict/dict-sql-private.h src/lib-dict-backend/dict-sql-private.h +R100 src/lib-dict/dict-sql-settings.c src/lib-dict-backend/dict-sql-settings.c +R100 src/lib-dict/dict-sql-settings.h src/lib-dict-backend/dict-sql-settings.h +R100 src/lib-dict/dict-sql.c src/lib-dict-backend/dict-sql.c +R100 src/lib-dict/dict-sql.h src/lib-dict-backend/dict-sql.h +R100 src/lib-dict/dict.conf src/lib-dict-backend/dict.conf +R100 src/lib-dict/test-dict-sql.c src/lib-dict-backend/test-dict-sql.c +M src/lib-dict/Makefile.am +M src/lib-dict/dict.c + +2017-10-05 15:53:16 +0300 Aki Tuomi (29a2904f6) + + mail-crypt: Improve doveadm output + + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-10-05 15:40:45 +0300 Aki Tuomi (1d2c599b0) + + mail-crypt: Fix key generation handling + + Userkey generation would not set all required fields. + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-10-05 12:34:10 +0300 Timo Sirainen (eb5809d06) + + director: When ring is synced, purge any pending "removed" directors + + This allows adding a director back to the ring without having to wait for 30 + seconds. + +M src/director/director.c + +2017-10-03 16:40:32 +0300 Timo Sirainen (de69258ce) + + director: Rename director_delayed_dir_remove_timeout() to + director_hosts_purge_removed() + + This allows using it for other purposes without having a confusing name. + +M src/director/director.c + +2017-10-05 16:12:38 +0300 Timo Sirainen (aa7e573b3) + + director: Fix potential panic when director is alone + + If director is alone and it can't connect to other directors, it might crash + with: + + Panic: file director.c: line 318 (director_set_ring_synced): assertion + failed: (!dir->ring_synced) + +M src/director/director.c + +2017-10-05 13:42:07 +0300 Timo Sirainen (12c575315) + + global: Remove dead code + + Found with clang static analyzer. + +M src/auth/db-dict.c +M src/auth/db-ldap.c +M src/doveadm/dsync/dsync-mailbox-tree.c +M src/lib-http/http-client-peer.c +M src/lib-http/test-http-server-errors.c +M src/lib-ldap/ldap-connection.c +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/shared/shared-list.c +M src/lib-storage/mail-search-mime.c +M src/lib-storage/mail-search.c +M src/lib/failures.c +M src/lib/test-array.c +M src/master/main.c + +2017-10-05 13:39:49 +0300 Timo Sirainen (c97cf4867) + + dict-memcached: Response status may not be included in enum + memcached_response + + This helps at least static analyzers figure out that other statuses are + possible, although unexpected. + +M src/lib-dict/dict-memcached.c + +2017-10-05 13:26:03 +0300 Timo Sirainen (a2f8919f2) + + lib-test: Use i_unreached() for marking unreachable code in test fatal + handler + + This avoids a warning with static analyzer. + +M src/lib-test/test-common.c + +2017-10-05 13:23:19 +0300 Timo Sirainen (52c3bd140) + + auth: LDAP request queue has no size limit anymore - remove dead code + + +M src/auth/db-ldap.c + +2017-10-05 13:17:59 +0300 Timo Sirainen (85cf1c27b) + + mbox: Remove unnecessary check from assert - move_diff is always negative + here + + +M src/lib-storage/index/mbox/mbox-sync.c + +2017-10-05 13:14:55 +0300 Timo Sirainen (7f8033ffe) + + zlib: zlib_mailbox_open_input() can't fail - remove dead code + + +M src/plugins/zlib/zlib-plugin.c + +2017-10-05 13:02:21 +0300 Timo Sirainen (67445e2ac) + + lib-storage: imapc_mailbox_get_selected_status() can't fail - remove dead + code + + +M src/lib-storage/index/imapc/imapc-storage.c + +2017-10-04 09:42:02 +0300 Aki Tuomi (740657494) + + doveadm-server: Use i_close_fd + + +M src/doveadm/client-connection.c + +2017-08-24 14:59:07 +0300 Aki Tuomi (c9dd53f71) + + doveadm: Deliver remote logs over doveadm socket + + +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h +M src/doveadm/doveadm-util.c +M src/doveadm/doveadm-util.h +M src/doveadm/server-connection.c + +2017-08-24 14:45:22 +0300 Aki Tuomi (ce7004127) + + doveadm: Refactor server/client code to support versioning properly + + This way we can distinguish between old and new server side + +M src/doveadm/client-connection.c +M src/doveadm/doveadm-util.h +M src/doveadm/server-connection.c + +2017-09-12 13:43:30 +0300 Aki Tuomi (f78d021f3) + + doveadm-server: Refactor connection handshake and authentication + + Simplifies next change + +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h +M src/doveadm/doveadm-util.h +M src/doveadm/server-connection.c + +2017-08-22 10:14:22 +0300 Aki Tuomi (1de7b73a1) + + lib: Add multiplex stream support + + This allows having multiple channels of data in single stream. + +M src/lib/Makefile.am +A src/lib/istream-multiplex.c +A src/lib/istream-multiplex.h +A src/lib/ostream-multiplex.c +A src/lib/ostream-multiplex.h +A src/lib/test-istream-multiplex.c +M src/lib/test-lib.inc +A src/lib/test-multiplex.c +A src/lib/test-ostream-multiplex.c + +2017-10-05 11:51:23 +0300 Timo Sirainen (b0421c739) + + director: Allow doveadm director ring remove for the same director + + Fixes: Panic: file doveadm-connection.c: line 859 + (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && + conn->dir->left == NULL) + +M src/director/director.c + +2017-10-05 11:49:31 +0300 Timo Sirainen (5c340190a) + + director: Don't crash on doveadm director ring remove for unknown director + + Ring syncing isn't started, so it shouldn't try to wait for ring sync. + + Fixes: Panic: file doveadm-connection.c: line 859 + (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && + conn->dir->left == NULL) + +M src/director/doveadm-connection.c + +2017-10-05 11:46:55 +0300 Timo Sirainen (312213260) + + director: Don't crash if DIRECTOR-REMOVE is received for itself + + This triggers the director removal from the ring, which causes the + connection to be destroyed. But since we're still in the middle of handling + the connection it needs refcounting. + +M src/director/director-connection.c + +2017-10-04 15:11:18 +0300 Timo Sirainen (f36341446) + + lib: istream-file - set blocking=TRUE automatically for blocking sockets + + This fixes it to be correct with various doveadm commands. + +M src/lib/istream-file.c + +2017-10-04 15:08:07 +0300 Timo Sirainen (03915cfec) + + lib: istream-file/unix - don't ignore EINTR for blocking istream reads + + Just fail the istream read entirely. Although there's a small possibility + that this interrupt was unwanted and should be retried, it's more likely + that a blocking istream is hanging and admin wants to stop the process. If + the EINTR is ignored all the time, it's not possible to abort a blocking + read with ^C or anything else than SIGKILL. + +M src/lib/istream-file.c +M src/lib/istream-unix.c + +2017-10-04 20:14:05 +0300 Timo Sirainen (874f31bbd) + + lib: test-istream-unix - Use i_stream_set_blocking() + + +M src/lib/test-istream-unix.c + +2017-10-04 20:13:49 +0300 Timo Sirainen (0b6924ad1) + + lib: Add i_stream_set_blocking() + + +M src/lib/istream.c +M src/lib/istream.h + +2017-09-16 13:28:32 +0200 Stephan Bosch (47fa7b222) + + lib-smtp: smtp-submit: Made submission_timeout a setting rather than a + function parameter. + + This makes it configurable. + +M src/lda/main.c +M src/lib-lda/mail-deliver.h +M src/lib-lda/mail-send.c +M src/lib-smtp/smtp-submit-settings.c +M src/lib-smtp/smtp-submit-settings.h +M src/lib-smtp/smtp-submit.c +M src/lib-smtp/smtp-submit.h +M src/lib-smtp/test-smtp-submit.c +M src/lmtp/commands.c + +2017-09-15 01:46:38 +0200 Stephan Bosch (ebd21ab2c) + + lib-lda: Dropped now useless settings from lib-lda/lda-settings. + + These are now in lib-smtp/smtp-submit-settings. + +M src/lib-lda/lda-settings.c +M src/lib-lda/lda-settings.h + +2017-09-15 01:44:24 +0200 Stephan Bosch (1519df1d5) + + imap: Drop dependencies on lib-lda settings. + + Start using lib-smtp/smtp-submit-settings instead. Put any other settings + required by IMAPSIEVE in struct imap_settings. + +M src/imap/Makefile.am +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-settings.c +M src/imap/main.c + +2017-09-21 00:14:17 +0200 Stephan Bosch (a9f821804) + + lib-lda: Use hostname and postmaster_address settings from + mail_storage_settings where possible. + + +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-send.c + +2017-09-15 01:15:19 +0200 Stephan Bosch (3d9b33dc0) + + lib-lda: Use SMTP submit settings directly. + + +M src/lib-lda/mail-send.c + +2017-10-04 22:41:14 +0200 Stephan Bosch (f41f6294f) + + lib-storage: Renamed duplicate to mail_duplicate. + + This makes more sense given where this is now located. + +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-deliver.h +M src/lib-storage/Makefile.am +D src/lib-storage/duplicate.h +R060 src/lib-storage/duplicate.c src/lib-storage/mail-duplicate.c +A src/lib-storage/mail-duplicate.h + +2017-09-16 17:06:14 +0200 Stephan Bosch (06426c2f6) + + lib-lda: Moved duplicate handling to lib-storage. + + +M src/lib-lda/Makefile.am +M src/lib-storage/Makefile.am +R100 src/lib-lda/duplicate.c src/lib-storage/duplicate.c +R100 src/lib-lda/duplicate.h src/lib-storage/duplicate.h + +2017-09-15 01:28:11 +0200 Stephan Bosch (3ff9a4497) + + lib-lda: Removed old smtp-client API. + + +M src/lib-lda/Makefile.am +D src/lib-lda/smtp-client.c +D src/lib-lda/smtp-client.h + +2017-09-20 21:49:34 +0200 Stephan Bosch (c2ea6b029) + + lib-storage: Added hostname, postmaster_address and recipient_delimiter + settings to mail_storage_settings. + + Copied from lda_settings. + +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2017-09-15 01:13:18 +0200 Stephan Bosch (0f72f253d) + + lda/lmtp: Parse SMTP submit settings. + + +M configure.ac +M src/config/settings-get.pl +M src/lda/Makefile.am +M src/lda/main.c +M src/lib-lda/lda-settings.c +M src/lib-lda/mail-deliver.h +M src/lmtp/commands.c +M src/lmtp/lmtp-settings.c +M src/lmtp/main.c + +2017-09-19 21:51:14 +0200 Stephan Bosch (1642939e4) + + lda: main: main(): Put result from mail_user_var_expand_table() in a + variable. + + Keeps code more compact, as this function is going to be called several + times. + +M src/lda/main.c + +2017-09-19 21:39:14 +0200 Stephan Bosch (90cdc497f) + + lmtp: commands: client_deliver(): Put client->state.dest_user in a variable. + + Keeps code more compact, as this value is used several times. + +M src/lmtp/commands.c + +2017-09-19 21:33:30 +0200 Stephan Bosch (ed89b9556) + + lmtp: commands: client_deliver(): Put result from + mail_user_var_expand_table() in a variable. + + Keeps code more compact, as this function is called several times. + +M src/lmtp/commands.c + +2017-09-15 00:10:30 +0200 Stephan Bosch (5356717c7) + + lib-smtp: smtp-submit: Made settings parseable. + + +M src/lib-smtp/Makefile.am +A src/lib-smtp/smtp-submit-settings.c +A src/lib-smtp/smtp-submit-settings.h +M src/lib-smtp/smtp-submit.h + +2017-09-14 01:32:17 +0200 Stephan Bosch (fe6a2885e) + + lib-lda: Moved most of mail_deliver_save_open() to lib-storage. + + This prevents the need to link Pigeonhole lib-sieve to lib-lda, which makes + no sense for IMAPSIEVE. This also allows lib-sieve to have more control over + how mailboxes are opened. + +M src/lib-lda/mail-deliver.c + +2017-09-14 01:56:38 +0200 Stephan Bosch (7d716afc5) + + lib-storage: Created mailbox_alloc_delivery(), which initializes a mailbox + for message delivery. + + +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-09-14 01:46:12 +0200 Stephan Bosch (df9718009) + + lib-storage: Implemented new mailbox flag MAILBOX_FLAG_AUTO_SUBSCRIBE. + + When this flag is enabled, the mailbox is implicitly subscribed to when it + is created automatically. + +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-09-14 01:39:30 +0200 Stephan Bosch (2d27ea506) + + lib-storage: Implemented new mailbox flag MAILBOX_FLAG_AUTO_CREATE. + + When this flag is enabled, the mailbox is automatically created when it is + opened (if possible and appropriate). + +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-09-19 21:08:38 +0200 Stephan Bosch (2ceb75f82) + + lib-storage: Implemented mailbox_is_autosubscribed(). + + Indicates whether the mailbox is automatically subscribed to when it is + automatically created. + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-10-04 15:41:03 +0300 Timo Sirainen (6c76bcb36) + + director: Fix HOST-RESET-USERS when all hosts are down + + If there were a lot of users being kicked, the host was flushed after the + initial round of user kills. This caused the rest of the user connections to + be just discarded instead of actually being killed. + +M src/director/doveadm-connection.c + +2017-10-04 15:39:08 +0300 Timo Sirainen (34642ccff) + + director: Fix tracking user move count when user is freed early + + users_moving_count wasn't updated if the user was freed before killing it + finished. This caused "doveadm director flush" to hang while waiting for the + move count to drop to 0, which it never did. Also following flushes were + doing less work in parallel, or possibly even nothing since director thought + there were too many users already being moved. + +M src/director/director.c + +2017-10-04 10:46:47 +0300 Timo Sirainen (2e07e3182) + + quota: quota_get_resource() - return enum to make the result more exact + + This is mainly to differentiate between "resource name unknown" and + "unlimited quota". + + This also fixes quota_clone plugin to update quota even when quota is + unlimited. It was supposed to have been skipped only when the resource names + weren't known. + + The private quota.get_resource() API is unchanged. The backends were already + returning 0 only when the resource name was unknown. + +M src/plugins/imap-quota/imap-quota-plugin.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/doveadm-quota.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h + +2017-10-04 10:44:47 +0300 Timo Sirainen (bffaca7da) + + imap-quota: Return NO reply if GETQUOTA fails only partially + + If the first resource lookup succeeded and the second one failed, the + GETQUOTA command replied with OK instead of NO. + +M src/plugins/imap-quota/imap-quota-plugin.c + +2017-09-29 09:42:48 +0300 Aki Tuomi (1d12457b6) + + doveadm-mail: Handle parse_arg return value + + Invalid parameters did not cause error. Broken in fa6b2cbb3 + +M src/doveadm/doveadm-mail.c + +2017-10-03 14:51:16 +0300 Timo Sirainen (719abeb20) + + lib-master: master_service_init_log() - Switch log handlers only on the + first call + + The secondary calls were only done by mail_storage_service_*() calls. They + want to initialize the logging once, but afterwards they only care about + changing the log prefix. Switch to this behavior now explicitly. + + This fixes behavior if logging functions are changed between + mail_storage_service_*() calls, so they don't get reset. + +M src/lib-master/master-service-private.h +M src/lib-master/master-service.c +M src/lib-master/master-service.h + +2017-09-18 15:52:12 +0300 Aki Tuomi (32340fe8f) + + lib-dcrypt: Use cpu32_to_be instead of htonl + + prefer our own conversion functions over htonl which is intended for + networking related numbers. + +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/ostream-encrypt.c + +2017-09-19 15:54:35 +0300 Josef 'Jeff' Sipek (a943ed0f9) + + global: use i_close_fd{,_path}() instead of open-coding them + + +M src/auth/auth-master-connection.c +M src/auth/auth-postfix-connection.c +M src/auth/db-checkpassword.c +M src/auth/db-passwd-file.c +M src/doveadm/server-connection.c +M src/lib-auth/auth-master.c +M src/lib-dict/dict-cdb.c +M src/lib-dict/dict-file.c +M src/lib-dns/dns-lookup.c +M src/lib-imap-client/imapc-connection.c +M src/lib-index/mailbox-log.c +M src/lib-master/master-login.c +M src/lib-master/master-service.c +M src/lib-stats/stats-connection.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib/ioloop-notify-inotify.c +M src/lmtp/client.c +M src/login-common/login-proxy-state.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-maildir.c +M src/plugins/replication/replication-plugin.c +M src/util/tcpwrap.c + +2017-09-22 10:33:51 +0300 Josef 'Jeff' Sipek (c25d75b24) + + lib: introduce i_close_fd_path() + + It is like i_close_fd() but takes an argument with the name of the file + that's being closed. The name is only used when printing the error message + due to a failed close() syscall. + + +M src/lib/lib.c +M src/lib/macros.h + +2017-09-20 11:27:05 +0300 Josef 'Jeff' Sipek (e4ac5643e) + + lib: remove close_keep_errno() + + +M src/lib/lib.c +M src/lib/lib.h + +2017-09-19 16:23:30 +0300 Josef 'Jeff' Sipek (ad81591e3) + + lib: improve i_close_fd() error message + + In addition to printing the file and line number, we can print the actual + arg passed in as well as the function calling i_close_fd(). + + +M src/lib/lib.c +M src/lib/macros.h + +2017-09-19 16:17:45 +0300 Josef 'Jeff' Sipek (b93dba1fd) + + lib: print correct error string on i_close_fd() failure + + close_keep_errno() preserved the original errno, therefore the %m in + i_close_fd()'s error message printed an unrelated error string. + + +M src/lib/lib.c +M src/lib/macros.h + +2017-09-25 10:08:16 +0300 Aki Tuomi (6c272362f) + + dovecot.service: Update systemd file + + There is no point daemonizing dovecot in systemd, also added comment about + apparmor and NoNewPrivileges option. + +M dovecot.service.in + +2017-09-27 14:07:46 +0300 Aki Tuomi (01b9ed516) + + lib-test: Suppress expected error messages + + Unless pattern is also provided + +M src/lib-test/test-common.c + +2017-09-29 12:37:58 +0300 Martti Rannanjärvi (9a19ae4b3) + + lib-storage: Remove obsolete mailbox_save_set_dest_mail() + + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-09-29 17:22:50 +0200 Stephan Bosch (58f32fe91) + + configure.ac: Wrapped long LIBDOVECOT_LA_LIBS definition line to make + modifications easier. + + +M configure.ac + +2017-10-02 13:25:42 +0300 Sergey Kitov (605c40c77) + + auth: global rounds parameter replaced with argument to password_generate() + + username and rounds parameter moved to a single password_generate_params + structure. + +M src/auth/auth-request.c +M src/auth/passdb.c +M src/auth/password-scheme-crypt.c +M src/auth/password-scheme-pbkdf2.c +M src/auth/password-scheme-scram.c +M src/auth/password-scheme.c +M src/auth/password-scheme.h +M src/doveadm/doveadm-pw.c + +2017-09-28 20:18:19 +0300 Martti Rannanjärvi (396e6d4f5) + + doveadm: Use doveadm command name as reason in doveadm_mail_iter_init() + + +M src/doveadm/doveadm-mail-iter.c + +2017-09-22 13:30:43 +0300 Aki Tuomi (69a718913) + + dsync: Add hashed_headers setting + + This makes it possible to configure them + +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-settings.c +M src/doveadm/doveadm-settings.h +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-brain.h +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-ibc.h +M src/doveadm/dsync/dsync-mail.c +M src/doveadm/dsync/dsync-mail.h +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-export.h +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-import.h + +2017-09-22 14:08:45 +0300 Aki Tuomi (c79c8c1d0) + + dsync: Fix typo, it's ibc not icb + + +M src/doveadm/doveadm-dsync.c + +2017-09-25 10:28:03 +0300 Aki Tuomi (dcdf46b6e) + + dsync: Add missing space to handshake optional keys + + +M src/doveadm/dsync/dsync-ibc-stream.c + +2017-09-26 16:23:32 +0200 Timo Sirainen (328ac493f) + + dsync: Improve reason when logging "modseq .. no longer in transaction log" + + Show the current highest, as well as the last common UID and the current + next UID. These can help to try to figure out problems. + +M src/doveadm/dsync/dsync-brain-mailbox.c + +2017-09-20 11:34:49 +0300 Sergey Kitov (1d9053f57) + + global: remove unnecessary ENOENT checks from unlink_directory() calls + + +M src/lib-fs/test-fs-posix.c +M src/lib-smtp/test-smtp-submit.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/plugins/fts-lucene/lucene-wrapper.cc + +2017-09-20 10:46:16 +0300 Sergey Kitov (39715db8b) + + lib: unlink_directory() return value is changed to 1 in case of no error. + + +M src/lib/unlink-directory.c +M src/lib/unlink-directory.h + +2017-09-20 10:45:26 +0300 Sergey Kitov (69458644d) + + lib: unlink_directory_r() is refactored. + + unlinking doesn't stop at unlink() errors, first error is written to + error_r, consequent errors are logged via i_error errno set to first + happened error. unlink_directory_r() is expecting *error_r to be set to + NULL. errno is set to 0 before each call to readdir(). + +M src/lib/unlink-directory.c + +2017-09-22 13:48:46 +0300 Timo Sirainen (9eec3f335) + + mail-crypt: Fix linking order + + +M src/plugins/mail-crypt/Makefile.am + +2017-09-22 14:10:09 +0300 Timo Sirainen (e2e9ea6da) + + lib: Define i_unreached() to __builtin_unreachable() with STATIC_CHECKER + + This helps clang's alpha.deadcode.UnreachableCode checker. + +M src/lib/macros.h + +2017-09-22 15:07:25 +0300 Martti Rannanjärvi (fb28ad71e) + + replication-plugin: Debug-log mailbox transaction reason + + +M src/plugins/replication/replication-plugin.c + +2017-09-20 17:15:32 +0300 Martti Rannanjärvi (c6ce2e251) + + lib-storage: Add reason to mailbox.transaction_begin() + + +M src/lib-lda/mail-deliver.c +M src/lib-storage/fail-mailbox.c +M src/lib-storage/index/index-storage.h +M src/lib-storage/index/index-transaction.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/plugins/expire/expire-plugin.c +M src/plugins/fts/fts-storage.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/notify/notify-storage.c +M src/plugins/quota/quota-storage.c +M src/plugins/stats/stats-plugin.c +M src/plugins/virtual/virtual-transaction.c +M src/plugins/virtual/virtual-transaction.h + +2017-09-20 14:42:00 +0300 Martti Rannanjärvi (0dab9cb35) + + lib-storage: Add reason to mailbox_transaction_begin() + + Remove mailbox_transaction_set_reason(). + +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-deduplicate.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-iter.c +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail-save.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/imap/cmd-append.c +M src/imap/cmd-copy.c +M src/imap/cmd-store.c +M src/imap/cmd-thread.c +M src/imap/imap-commands-util.c +M src/imap/imap-expunge.c +M src/imap/imap-fetch.c +M src/imap/imap-search.c +M src/imap/imap-state.c +M src/imap/imap-sync.c +M src/indexer/master-connection.c +M src/lda/main.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-imap-storage/imap-msgpart-url.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-lda/mail-deliver.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/index/index-search-result.c +M src/lib-storage/index/index-status.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-thread.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h +M src/lmtp/commands.c +M src/plugins/acl/doveadm-acl.c +M src/plugins/expire/expire-plugin.c +M src/plugins/fts-squat/fts-backend-squat.c +M src/plugins/imap-acl/imap-acl-plugin.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/plugins/mail-crypt/mail-crypt-key.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/quota/quota-storage.c +M src/plugins/snarf/snarf-plugin.c +M src/plugins/trash/trash-plugin.c +M src/plugins/virtual/virtual-sync.c +M src/plugins/virtual/virtual-transaction.c +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c + +2017-09-22 13:34:47 +0300 Timo Sirainen (03b8e1b15) + + configure: Fix link order: libsmtp depends on libprogram-client + + +M configure.ac + +2017-09-21 21:49:09 +0300 Martti Rannanjärvi (6c17d1ade) + + lib-storage: Don't crash when opening inbox fails in + mailbox-list-index-notify + + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-21 15:53:40 +0300 Timo Sirainen (e3a3366ee) + + lib-sql: Fix compiler warning with OSX + + +M src/lib-sql/sql-api.h + +2017-09-21 17:53:04 +0300 Timo Sirainen (59d98f43a) + + master: Don't throttle services that are already being destroyed + + If process couldn't be created, because the service_list is already being + destroyed (e.g. due to reload), also don't enable unnecessary throttling for + the service. + + Hopefully fixes these random errors that are logged alone: master: Error: + service(...): command startup failed, throttling for 2 secs + +M src/master/service-monitor.c + +2017-09-19 13:52:30 +0300 Timo Sirainen (9372e48b7) + + lib: If log writing to log process is blocking, show it in process title + + This change also makes the log pipe non-blocking. + +M src/lib/failures.c + +2017-09-19 13:49:03 +0300 Timo Sirainen (5a35caefc) + + lib: Add process_title_get() + + +M src/lib/process-title.c +M src/lib/process-title.h + +2017-09-20 19:09:58 +0300 Timo Sirainen (3dcf98a55) + + Add <%{pid}> to default mail_log_prefix + + It's especially useful nowadays when the same session ID can be reused by + multiple processes with IMAP hibernation enabled. + +M doc/example-config/conf.d/10-logging.conf +M src/lib-storage/mail-storage-settings.c + +2017-09-20 15:56:10 +0300 Timo Sirainen (b0d00847d) + + doveadm: "Extraneous arguments found": Show the args in the error + + +M src/doveadm/doveadm-cmd.c + +2017-09-21 00:38:33 +0200 Stephan Bosch (4d1cc687f) + + lib-http: client: Send empty payload (Content-Length: 0) for requests that + normally expect a payload. + + This includes the standard POST and PUT methods. Others need to use the new + http_client_request_set_payload_empty() function to force sending an empty + payload. + +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h + +2017-09-20 15:03:55 +0300 Timo Sirainen (7e37e7ac1) + + notify-status plugin: Use priv/status/ for keys + + priv//status can't be used with dict-sql when has '/'. + +M src/plugins/notify-status/notify-status-plugin.c + +2017-09-19 13:33:06 +0300 Josef 'Jeff' Sipek (6307d7609) + + global: start relying on buffer_free(NULL) being a no-op + + Cleanup performed with the following semantic patch: + + @@ + expression E; + @@ + + - if (E != NULL) { + - buffer_free(&E); + - } + + buffer_free(&E); + +M src/lib-compression/istream-lz4.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-fts/fts-tokenizer.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-cache.c +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/mail-index-transaction-view.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-qp-decoder.c +M src/lib-mail/istream-qp-encoder.c +M src/lib-mail/message-header-decode.c +M src/lib-mail/test-istream-attachment.c +M src/lib-ssl-iostream/ostream-openssl.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/index-mail.c +M src/lib-test/test-ostream.c +M src/lib/iostream-rawlog.c +M src/lib/iostream-temp.c +M src/lib/istream-seekable.c +M src/lmtp/client.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-parser.c + +2017-09-19 13:26:57 +0300 Josef 'Jeff' Sipek (1a6ff0bee) + + lib: buffer_free(NULL) should be a no-op + + +M src/lib/buffer.c + +2017-09-19 13:25:23 +0300 Josef 'Jeff' Sipek (c69a17720) + + global: start relying on pool_unref(NULL) being a no-op + + Cleanup performed with the following semantic patch: + + @@ + expression E; + @@ + + - if (E != NULL) { + - pool_unref(&E); + - } + + pool_unref(&E); + +M src/auth/db-passwd-file.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-ibc-pipe.c +M src/lib-dict/dict-sql.c +M src/lib-fts/fts-language.c +M src/lib-http/http-message-parser.c +M src/lib-index/mail-index-map.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-binary-converter.c +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-sqlpool.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-storage/index/index-search-mime.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/pop3c/pop3c-storage.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/mail-storage.c +M src/lib/env-util.c +M src/login-common/client-common.c +M src/login-common/login-proxy.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/pop3/pop3-client.c + +2017-09-19 13:21:07 +0300 Josef 'Jeff' Sipek (77eae37a9) + + lib: pool_unref(NULL) shoud be a no-op + + +M src/lib/mempool.h + +2017-09-19 13:19:36 +0300 Josef 'Jeff' Sipek (204ee6ed4) + + global: start relying on [io]_stream_unref(NULL) being a no-op + + Cleanup performed with the following semantic patch: + + @@ + expression E; + @@ + + - if (E != NULL) { + - i_stream_unref(&E); + - } + + i_stream_unref(&E); + + @@ + expression E; + @@ + + - if (E != NULL) { + - o_stream_unref(&E); + - } + + o_stream_unref(&E); + +M src/auth/auth-master-connection.c +M src/auth/auth-postfix-connection.c +M src/doveadm/doveadm-mail.c +M src/doveadm/dsync/dsync-brain-mails.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/imap/cmd-append.c +M src/imap/cmd-getmetadata.c +M src/imap/cmd-urlfetch.c +M src/imap/imap-fetch.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-sis.c +M src/lib-fs/test-fs-metawrap.c +M src/lib-http/http-client-request.c +M src/lib-http/http-message-parser.c +M src/lib-http/http-server-response.c +M src/lib-http/test-http-payload.c +M src/lib-imap-client/test-imapc-client.c +M src/lib-imap-storage/imap-msgpart-url.c +M src/lib-imap-urlauth/imap-urlauth-fetch.c +M src/lib-index/mail-index-strmap.c +M src/lib-mail/istream-attachment-connector.c +M src/lib-program-client/program-client.c +M src/lib-program-client/test-program-client-net.c +M src/lib-program-client/test-program-client-unix.c +M src/lib-smtp/lmtp-client.c +M src/lib-smtp/test-smtp-submit.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/dbox-common/dbox-mail.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib/ioloop.c +M src/lib/iostream-rawlog.c +M src/lib/istream-chain.c +M src/lib/istream-seekable.c +M src/lib/istream.c +M src/lib/ostream.c +M src/lmtp/client.c +M src/lmtp/lmtp-proxy.c +M src/login-common/client-common.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/fts/fts-expunge-log.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-crypt/mail-crypt-plugin.c +M src/plugins/zlib/zlib-plugin.c + +2017-09-19 13:09:07 +0300 Josef 'Jeff' Sipek (b3fc52933) + + lib: [io]_stream_unref(NULL) should be a no-op + + +M src/lib/istream.c +M src/lib/ostream.c + +2017-06-06 12:53:41 +0300 Josef 'Jeff' Sipek (be5773cb4) + + global: start relying on [io]_stream_destroy(NULL) being a no-op + + Cleanup performed with the following semantic patch: + + @@ + expression E; + @@ + + - if (E != NULL) { + - i_stream_destroy(&E); + - } + + i_stream_destroy(&E); + + @@ + expression E; + @@ + + - if (E != NULL) { + - o_stream_destroy(&E); + - } + + o_stream_destroy(&E); + +M src/anvil/anvil-connection.c +M src/auth/mech-winbind.c +M src/auth/userdb-passwd-file.c +M src/director/login-connection.c +M src/doveadm/client-connection.c +M src/doveadm/server-connection.c +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/lib-dns/dns-lookup.c +M src/lib-fs/fs-test.c +M src/lib-fs/istream-fs-file.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-master/master-login-auth.c +M src/lib-program-client/program-client.c +M src/lib-storage/index/mbox/mbox-file.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/list/subscription-file.c +M src/login-common/login-proxy.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/replication/aggregator/notify-connection.c + +2017-06-06 12:49:00 +0300 Josef 'Jeff' Sipek (d6684856f) + + lib: [io]_stream_destroy(NULL) should be a no-op + + +M src/lib/istream.c +M src/lib/ostream.c + +2017-06-06 12:33:23 +0300 Josef 'Jeff' Sipek (0d1b8b6be) + + global: start relying on timeout_remove(NULL) being a no-op + + Cleanup performed with the following semantic patch: + + @@ + expression E; + @@ + + - if (E != NULL) { + - timeout_remove(&E); + - } + + timeout_remove(&E); + +M src/anvil/penalty.c +M src/auth/auth-request-handler.c +M src/auth/auth-request.c +M src/auth/auth-worker-client.c +M src/auth/auth-worker-server.c +M src/auth/db-ldap.c +M src/dict/dict-connection.c +M src/dict/main.c +M src/director/director-connection.c +M src/director/director-test.c +M src/director/director.c +M src/director/main.c +M src/doveadm/server-connection.c +M src/imap-hibernate/imap-client.c +M src/imap-login/imap-login-client.c +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-login.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/cmd-idle.c +M src/imap/imap-client.c +M src/imap/imap-notify.c +M src/imap/imap-search.c +M src/indexer/indexer.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-dict/dict-client.c +M src/lib-dns/dns-lookup.c +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-queue.c +M src/lib-http/http-client.c +M src/lib-http/http-server-connection.c +M src/lib-http/test-http-client-errors.c +M src/lib-http/test-http-server-errors.c +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-ldap/ldap-connection.c +M src/lib-master/anvil-client.c +M src/lib-master/ipc-server.c +M src/lib-master/master-auth.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-service-haproxy.c +M src/lib-master/master-service.c +M src/lib-oauth2/oauth2.c +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c +M src/lib-smtp/lmtp-client.c +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlpool.c +M src/lib-sql/sql-api.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/mailbox-watch.c +M src/lib-test/test-ostream.c +M src/lib/connection.c +M src/lib/istream-timeout.c +M src/lib/log-throttle.c +M src/lib/test-iostream-pump.c +M src/lmtp/client.c +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/login-common/access-lookup.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/login-proxy-state.c +M src/login-common/login-proxy.c +M src/login-common/main.c +M src/master/main.c +M src/master/service-monitor.c +M src/master/service-process.c +M src/master/service.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/mail-crypt/mail-crypt-plugin.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/stats/stats-plugin.c +M src/plugins/zlib/zlib-plugin.c +M src/pop3/pop3-client.c +M src/replication/aggregator/replicator-connection.c +M src/replication/replicator/dsync-client.c +M src/replication/replicator/replicator-brain.c +M src/stats/client.c +M src/stats/mail-session.c +M src/stats/stats-carbon.c +M src/util/rawlog.c + +2017-06-06 12:30:17 +0300 Josef 'Jeff' Sipek (c4d38ef68) + + lib: timeout_remove(NULL) should be a no-op + + +M src/lib/ioloop.c + +2017-06-06 12:28:07 +0300 Josef 'Jeff' Sipek (5f1d68913) + + global: start relying on io_remove{,_closed}(NULL) being a no-op + + Cleanup performed with the following semantic patch: + + @@ + expression E; + @@ + + - if (E != NULL) { + - io_remove(&E); + - } + + io_remove(&E); + + @@ + expression E; + @@ + + - if (E != NULL) { + - io_remove_closed(&E); + - } + + io_remove_closed(&E); + +M src/anvil/main.c +M src/auth/auth-client-connection.c +M src/auth/auth-master-connection.c +M src/auth/auth-postfix-connection.c +M src/auth/auth-worker-client.c +M src/auth/auth-worker-server.c +M src/auth/db-checkpassword.c +M src/auth/db-ldap.c +M src/dict/dict-connection.c +M src/director/director-connection.c +M src/director/director-test.c +M src/doveadm/client-connection.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/server-connection.c +M src/imap-hibernate/imap-client.c +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/cmd-append.c +M src/imap/cmd-idle.c +M src/imap/imap-client.c +M src/ipc/client.c +M src/lib-auth/auth-server-connection.c +M src/lib-dns/dns-lookup.c +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-request.c +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-response.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-server-errors.c +M src/lib-imap-client/imapc-connection.c +M src/lib-master/master-auth.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-login.c +M src/lib-master/master-service-haproxy.c +M src/lib-master/master-service.c +M src/lib-program-client/program-client.c +M src/lib-program-client/test-program-client-net.c +M src/lib-program-client/test-program-client-unix.c +M src/lib-smtp/lmtp-client.c +M src/lib-sql/driver-cassandra.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/mailbox-watch.c +M src/lib/connection.c +M src/lib/ioloop-notify-inotify.c +M src/lib/ioloop-notify-kqueue.c +M src/lib/iostream-pump.c +M src/lib/ostream-file.c +M src/lmtp/client.c +M src/log/log-connection.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/login-proxy.c +M src/login-common/main.c +M src/login-common/ssl-proxy-openssl.c +M src/master/service-monitor.c +M src/master/service-process-notify.c +M src/plugins/fts/fts-parser-tika.c +M src/pop3/pop3-client.c +M src/stats/client.c +M src/stats/stats-carbon.c +M src/util/rawlog.c + +2017-06-06 12:19:22 +0300 Josef 'Jeff' Sipek (df1c1ff47) + + lib: io_remove(NULL) and io_remove_closed(NULL) should be no-ops + + +M src/lib/ioloop.c + +2017-06-06 10:20:49 +0300 Josef 'Jeff' Sipek (7b032348d) + + global: start relying on i_close_fd(-1) being a no-op + + Cleanup performed with the following semantic patch: + + @@ + expression E; + @@ + + - if (E != -1) + - i_close_fd(&E); + + i_close_fd(&E); + +M src/doveadm/doveadm-dsync.c +M src/imap-hibernate/imap-client.c +M src/imap-hibernate/imap-hibernate-client.c +M src/imap/imap-client-hibernate.c +M src/lib-dict/dict-file.c +M src/lib-http/test-http-client-errors.c +M src/lib-http/test-http-payload.c +M src/lib-imap-client/test-imapc-client.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib/iostream-temp.c +M src/lib/istream-unix.c +M src/lib/net.c +M src/lib/ostream-unix.c +M src/master/service-listen.c +M src/master/service-monitor.c +M src/plugins/fts-lucene/fts-backend-lucene.c +M src/plugins/fts/fts-expunge-log.c +M src/plugins/quota/quota-maildir.c +M src/plugins/stats/mail-stats-fill.c +M src/stats/stats-carbon.c + +2017-06-06 10:13:15 +0300 Josef 'Jeff' Sipek (95ec0fd47) + + lib: i_close_fd(-1) should be a no-op + + +M src/lib/macros.h + +2017-09-20 01:47:38 +0300 Timo Sirainen (ce8d63810) + + director: Fix flush to kick the user also when all backends are down + + The user's host can't change, because there are no other hosts. So add a new + parameter to force the kick anyway. + +M src/director/director.c +M src/director/director.h +M src/director/doveadm-connection.c + +2017-09-19 14:48:54 +0300 Timo Sirainen (186c97450) + + cassandra: Timestamp should be in microseconds, not milliseconds + + +M src/lib-sql/driver-cassandra.c + +2017-09-18 14:15:44 +0300 Josef 'Jeff' Sipek (191153d1a) + + global: use i_rand_limit() and i_rand_minmax() when possible + + +M src/auth/auth-request.c +M src/director/director-test.c +M src/director/test-user-directory.c +M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c +M src/lib-compression/test-compression.c +M src/lib-dict/test-dict-client.c +M src/lib-fs/fs-randomfail.c +M src/lib-fts/test-fts-tokenizer.c +M src/lib-index/test-mail-index-transaction-update.c +M src/lib-index/test-mail-transaction-log-file.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-mail-html2text.c +M src/lib-mail/test-message-header-decode.c +M src/lib-mail/test-message-header-hash.c +M src/lib-master/master-login-auth.c +M src/lib-master/test-master-service-settings-cache.c +M src/lib-test/test-istream.c +M src/lib/net.c +M src/lib/test-base32.c +M src/lib/test-base64.c +M src/lib/test-buffer.c +M src/lib/test-istream-concat.c +M src/lib/test-istream-seekable.c +M src/lib/test-istream-tee.c +M src/lib/test-ostream-buffer.c +M src/lib/test-ostream-file.c +M src/lib/test-priorityq.c +M src/lib/test-strnum.c +M src/lib/test-unichar.c +M src/lib/timing.c +M src/login-common/login-proxy.c +M src/login-common/main.c +M src/master/main.c +M src/master/service-monitor.c + +2017-09-18 13:55:08 +0300 Josef 'Jeff' Sipek (747bf5bf7) + + lib: introduce i_rand_limit() and i_rand_minmax() + + +M src/lib/lib.h +M src/lib/rand.c + +2017-09-18 16:48:41 +0300 Josef 'Jeff' Sipek (fda9c7fe9) + + lib-index: fix off-by-one in index flag update test + + When selecting the second seq, the max value we should generate is + hdr.messages_count - not one less than that. + +M src/lib-index/test-mail-index-transaction-update.c + +2017-09-19 11:18:30 +0300 Timo Sirainen (25b3208d3) + + lib-storage: Fail if two namespaces try to wrongly share the same LISTINDEX + + If they have different mailboxes-path, they can't be sharing the same + mailbox list index. The previous behavior caused Dovecot to silently + overwrite the list index whenever each of the namespaces were accessed, + resulting in bad performance. + +M src/lib-storage/mail-namespace.c + +2017-09-18 23:04:55 +0300 Timo Sirainen (5c449ac9f) + + notify-status: Remove first_unseen_seq field + + The sequence number keeps changing, so it's very unlikely to be useful. It's + also not always as efficiently available as the other fields, so better to + avoid having it. + +M src/plugins/notify-status/notify-status-plugin.c + +2017-09-07 14:26:51 +0300 Josef 'Jeff' Sipek (120e61ccc) + + lib-storage: convert struct pop3_mail casts to container_of + + +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/pop3c/pop3c-storage.h + +2017-09-07 14:11:06 +0300 Josef 'Jeff' Sipek (7dd326f77) + + lib-storage: convert struct imapc_mail casts to container_of + + +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-mail.h +M src/lib-storage/index/imapc/imapc-save.c + +2017-09-07 13:04:01 +0300 Josef 'Jeff' Sipek (874900128) + + lib-storage: convert index to use container_of + + +M src/lib-storage/index/cydir/cydir-mail.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/raw/raw-mail.c +M src/plugins/pop3-migration/pop3-migration-plugin.c + +2017-09-07 14:29:08 +0300 Josef 'Jeff' Sipek (ac254f652) + + lib-storage: convert missed mbox casts to container_of + + +M src/lib-storage/index/mbox/mbox-save.c + +2017-09-07 14:28:27 +0300 Josef 'Jeff' Sipek (13b2d8784) + + lib-storage: convert missed raw storage casts to container_of + + +M src/lib-storage/index/raw/raw-storage.c + +2017-09-07 14:24:46 +0300 Josef 'Jeff' Sipek (b5a123eab) + + lib-storage: convert missed maildir casts to container_of + + +M src/lib-storage/index/maildir/maildir-save.c + +2017-09-07 14:21:03 +0300 Josef 'Jeff' Sipek (6a384c0f8) + + lib-storage: convert missed imapc casts to container_of + + +M src/lib-storage/index/imapc/imapc-mail-fetch.c + +2017-09-07 14:08:44 +0300 Josef 'Jeff' Sipek (9287cdd3d) + + lib-storage: convert missed cydir casts to container_of + + +M src/lib-storage/index/cydir/cydir-save.c + +2017-09-15 15:17:08 +0300 Sergey Kitov (aec3f901e) + + auth: Expand %{ldap_dn} to ldap_get_dn(). + + +M src/auth/db-ldap.c + +2017-09-14 12:50:29 +0300 Timo Sirainen (5a444fdfa) + + director: Avoid "ring sync timeout" errors when all backends are down + + doveadm commands were failing with it. Also pending request failures were + logged as failing due to ring sync timeout, instead of because no hosts. + +M src/director/main.c + +2017-09-14 13:02:40 +0300 Timo Sirainen (68ba222d8) + + director: Delay calling state_change_callback() after user kick is finished + + Otherwise it can get into recursive loop and cause problems. + +M src/director/director.c + +2017-09-14 12:42:13 +0300 Timo Sirainen (c300d63f2) + + doveadm director: Improve logging unexpected disconnections from director + socket + + Previously it just logged "failed", which wasn't very understandable. + +M src/doveadm/doveadm-director.c + +2017-08-22 16:32:32 +0300 Timo Sirainen (f5d82a4b8) + + director: Fix crash when flush is run and all backends are down. + + Instead of moving the users elsewhere, just kill them and flush the backend. + +M src/director/director.c +M src/director/director.h +M src/director/doveadm-connection.c + +2017-09-15 11:49:16 +0300 Timo Sirainen (9bea32587) + + lib: uri_parser_init*() - initialize allow_pct_nul + + Unless the caller explicitly cleared the parser's memory, allow_pct_nul was + somewhat random. All the code in Dovecot core did this, but some plugins + didn't. + +M src/lib/uri-util.c + +2017-09-14 18:13:05 +0300 Timo Sirainen (8913a7f43) + + director: Fix ring sync wait after DIRECTOR-REMOVE + + It was sending OK twice, and the first OK was too early. + +M src/director/doveadm-connection.c + +2017-09-14 17:59:05 +0300 Timo Sirainen (69ea755e4) + + director: Ignore CONNECT requests to hosts that have been removed already + + +M src/director/director-connection.c + +2017-09-14 17:57:29 +0300 Timo Sirainen (d8a93844f) + + director: After CONNECT was received, make sure we disconnect + + The remote side won't be reading anything after the CONNECT, so we have to + disconnect anyway. If we decide that the CONNECT request is wrong, reconnect + after a short delay and hope that the remote agrees with us the next time. + +M src/director/director-connection.c + +2017-09-14 17:48:50 +0300 Timo Sirainen (83b9d8afc) + + director: When director is removed, notify it before disconnecting + + This way the removed director will know that it's been removed, and it can + also more quickly forward the removal to other directors. + +M src/director/director.c + +2017-09-14 17:38:24 +0300 Timo Sirainen (e588e0b3f) + + director: Don't reset directors' last_network_failure while handshaking + + The reset is done mainly to make it faster for a director that has been down + to connect back to the ring, without other directors still thinking that + it's down. But DIRECTOR that is sent during handshake says nothing about + whether the director is up at the moment or not. + +M src/director/director-connection.c + +2017-09-14 17:35:02 +0300 Timo Sirainen (e2fdcdb4e) + + director: Log info line for every incoming/outgoing connection + + This can help with debugging problems. + +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h +M src/director/main.c + +2017-09-14 17:33:19 +0300 Timo Sirainen (e9d302dce) + + director: Cleanup - move code to a new director_log_connect() + + Also adds a missing ')' to the log line. + +M src/director/director.c + +2017-09-14 17:29:48 +0300 Timo Sirainen (027f58ea6) + + director: Log info line whenever a director is added/removed from ring + + This can help with debugging problems. + +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h +M src/director/doveadm-connection.c + +2017-09-14 18:13:33 +0300 Timo Sirainen (465fb89a8) + + director: Improve debugging: Log ring desync when there is no right + connection + + +M src/director/director.c + +2017-09-14 17:26:39 +0300 Timo Sirainen (3a7a0c35c) + + director: When logging "ring SYNC lost", include sync seq number in message + + This can help with debugging. + +M src/director/director.c + +2017-09-14 13:34:22 +0300 Aki Tuomi (8a2262007) + + lib: chdir to / after chroot + + Makes static analyzers more happy + +M src/lib/restrict-access.c + +2017-09-14 11:57:27 +0300 Timo Sirainen (30089b563) + + doveadm director ring remove: Wait ring sync before and after removal + + This helps mainly with automated tests. + +M src/director/director.c +M src/director/doveadm-connection.c + +2017-09-14 13:19:26 +0300 Timo Sirainen (3131b0cc2) + + director: Return temporary auth failures using the new "code" field + + The "temp" is no longer used. + +M src/director/login-connection.c + +2017-09-13 23:35:04 +0300 Timo Sirainen (3226cfcb9) + + lib-mail: message_header_encode() cleanup - simplify pointer arithmetic + + This should make static analyzers happier. + +M src/lib-mail/message-header-encode.c + +2017-09-13 23:26:49 +0300 Timo Sirainen (d4e097fbc) + + global: Add asserts to help static analyzers + + +M src/lib-mail/message-size.c +M src/lib/str-sanitize.c + +2017-09-13 23:24:01 +0300 Timo Sirainen (9c93b5764) + + lib-index: Remove size from struct mail_keywords.idx[] + + This was confusing static analyzers, which thought that using [1] meant that + its size really was 1. + +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h + +2017-09-13 18:06:43 +0300 Timo Sirainen (2462c09be) + + man: Remove extra ^L from "doveadm fetch" example + + It's no longer sent. + +M doc/man/doveadm-fetch.1.in + +2017-09-13 16:13:34 +0300 Timo Sirainen (e0a332902) + + lib-storage: Fix updating mailbox GUID in mailbox list index when it's empty + + Normally the GUID shouldn't be empty at this point. Updating mailbox GUID is + also very rare. So this was unlikely to cause any problems in practise. + +M src/lib-storage/list/mailbox-list-index-status.c + +2017-09-13 16:09:05 +0300 Timo Sirainen (09e6ec59d) + + master: Don't send uninitialized byte to anvil along the log fd. + + The byte was ignored by anvil, so it didn't cause any real problems. + +M src/master/service-anvil.c + +2017-09-13 16:06:48 +0300 Timo Sirainen (0cb80fbd7) + + cassandra: NULL values' sizes weren't initialized + + This was only a problem if sql_result_get_field_value_binary() was attempted + to be used for a NULL value. + +M src/lib-sql/driver-cassandra.c + +2017-09-13 18:32:23 +0300 Timo Sirainen (5ea06115c) + + lib-index: If mail_index_view is leaked, include in Panic the file:line + where it was opened + + +M src/lib-index/mail-index-view-private.h +M src/lib-index/mail-index-view.c +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h + +2017-09-13 15:16:59 +0300 Timo Sirainen (214aff73c) + + cassandra: Fix paged queries to work again + + When continuing the result, consistency was reset to 0 (=ANY), which caused + the queries to fail. There's no need to initialize the statement again when + continuing it. Also set result->consistency to be correct mainly for + debugging purposes. + +M src/lib-sql/driver-cassandra.c + +2017-09-11 12:27:17 +0300 Timo Sirainen (2912eac52) + + lib-storage: Fix mailbox list notification assert-crash when mailbox is + deleted + + Reproduced with if IMAP NOTIFY is used for non-selected mailboxes without + MailboxName being specified. Another session then does changes to a mailbox + and immediately deletes it, which causes the crash. + + Fixes: Panic: file mailbox-list-index-notify.c: line 751: unreached + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-13 00:28:38 +0200 Stephan Bosch (9c8142357) + + lib-smtp: lmtp-client: Fixed handling of unexpected reply while sending RCPT + TO commands. + + It caused a segfault. + +M src/lib-smtp/lmtp-client.c + +2017-09-08 16:00:53 +0300 Timo Sirainen (44a31b740) + + doveadm director kick: Fix -f parameter to work + + It already worked as --passdb-field, but now it matches the usage string. + +M src/doveadm/doveadm-director.c + +2017-09-11 12:59:27 +0300 Timo Sirainen (e704b4ab2) + + lib-index: mail_index_use_existing_permissions() - Ignore with INDEX=MEMORY + + +M src/lib-index/mail-index.c + +2017-09-11 12:58:28 +0300 Timo Sirainen (96595bf98) + + lib-index: mail_index_use_existing_permissions() - Log error if stat() + unexpectedly fails + + +M src/lib-index/mail-index.c + +2017-09-11 13:54:12 +0300 Timo Sirainen (182724707) + + lib-storage: Avoid unnecessary stat()s in mailbox list index notifications + + If mailbox list gets a notification there's no need to stat() the INBOX, and + vice versa. Also if the notification was already seen and a callback timeout + set, there's no need to keep stat()ing. + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-11 13:48:17 +0300 Timo Sirainen (5ddc694e1) + + lib-storage: Make sure mailbox list notification flush sees latest changes. + + This is mainly useful with imaptest test scripts to make sure they're seeing + the changes done by the other session, without assuming that inotify will + always notify about the change before NOOP is run (it doesn't). + + Do this only if mailbox_idle_check_interval>0, so it's not run when periodic + stat()s are wanted to be avoided. + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-12 14:54:57 +0300 Timo Sirainen (3581ece16) + + lib: file_lock_set_unlink_on_free() - Avoid unlink() if another process is + waiting on the lock + + +M src/lib/file-create-locked.h +M src/lib/file-lock.c +M src/lib/file-lock.h + +2017-09-12 13:23:51 +0300 Timo Sirainen (4d8f53856) + + cassandra: Disable prepared statements with protocol v3 and older + + +M src/lib-sql/driver-cassandra.c + +2017-09-11 12:10:49 +0300 Timo Sirainen (807f257b0) + + lib-smtp: Link with libcharset.la to avoid errors + + +M src/lib-smtp/Makefile.am + +2017-09-09 12:58:12 +0200 Stephan Bosch (b17e88825) + + lib-http: client: queue: Improved construction of timeout log message. + + Earlier change used a literal prefix size, rather than inferring the size + from the actual prefix string. + +M src/lib-http/http-client-queue.c + +2017-09-09 12:27:16 +0200 Stephan Bosch (255daf50d) + + lib-smtp: test-smtp-submit: Fixed memory leak in one test. + + +M src/lib-smtp/test-smtp-submit.c + +2017-09-09 12:22:47 +0200 Stephan Bosch (db2fb7b8b) + + lib-smtp: test-smtp-submit: Improved checking of delivered message. + + This addresses a couple of scan-build "dead assignment" warnings. + +M src/lib-smtp/test-smtp-submit.c + +2017-05-05 17:06:32 +0200 Stephan Bosch (faca780e2) + + lib-smtp: smtp-submit: Added support for asynchronous message submission. + + +M src/lib-lda/mail-send.c +M src/lib-lda/smtp-client.c +M src/lib-smtp/smtp-submit.c +M src/lib-smtp/smtp-submit.h +M src/lib-smtp/test-smtp-submit.c + +2017-05-05 13:26:46 +0200 Stephan Bosch (792813592) + + lib-lda: Moved smtp-submit to lib-smtp. + + +M src/Makefile.am +M src/lib-lda/Makefile.am +M src/lib-smtp/Makefile.am +R100 src/lib-lda/smtp-submit.c src/lib-smtp/smtp-submit.c +R100 src/lib-lda/smtp-submit.h src/lib-smtp/smtp-submit.h +R100 src/lib-lda/test-bin/sendmail-exit-1.sh src/lib-smtp/test-bin/sendmail-exit-1.sh +R100 src/lib-lda/test-bin/sendmail-success.sh src/lib-smtp/test-bin/sendmail-success.sh +R099 src/lib-lda/test-smtp-submit.c src/lib-smtp/test-smtp-submit.c + +2017-05-05 13:21:16 +0200 Stephan Bosch (7fbbd3bf5) + + lib-lda: Made smtp-submit standalone. + + Removed dependencies on LDA. + +M src/lib-lda/mail-send.c +M src/lib-lda/smtp-client.c +M src/lib-lda/smtp-submit.c +M src/lib-lda/smtp-submit.h +M src/lib-lda/test-smtp-submit.c + +2017-05-05 13:06:39 +0200 Stephan Bosch (98437599b) + + lib-lda: Renamed smtp-client to smtp-submit (2/2). + + Renamed smtp_client identifiers to smtp_submit. Also, created temporary + backwards-compatibility in smtp-client.h. + +M src/lib-lda/Makefile.am +M src/lib-lda/mail-send.c +A src/lib-lda/smtp-client.c +M src/lib-lda/smtp-client.h +M src/lib-lda/smtp-submit.c +M src/lib-lda/smtp-submit.h +M src/lib-lda/test-smtp-submit.c + +2017-05-05 12:55:49 +0200 Stephan Bosch (3e5a16737) + + lib-lda: Renamed smtp-client to smtp-submit (1/2). + + Renamed the files. + +M src/lib-lda/Makefile.am +M src/lib-lda/mail-send.c +M src/lib-lda/smtp-client.h +R099 src/lib-lda/smtp-client.c src/lib-lda/smtp-submit.c +A src/lib-lda/smtp-submit.h +R099 src/lib-lda/test-smtp-client.c src/lib-lda/test-smtp-submit.c + +2017-02-28 23:56:47 +0100 Stephan Bosch (be02ac47a) + + lib-lda: Created tests for SMTP message submission using the smtp-client + API. + + +M src/lib-lda/Makefile.am +A src/lib-lda/test-bin/sendmail-exit-1.sh +A src/lib-lda/test-bin/sendmail-success.sh +A src/lib-lda/test-smtp-client.c + +2017-09-08 12:20:21 +0300 Timo Sirainen (a594a5954) + + lib-storage: Preserve messages' vsize record when rebuilding index + + Since vsize is often used by quota, losing this can be very expensive. If + the vsize is wrong, it gets fixed automatically when fetching the message + body. + +M src/lib-storage/index/index-rebuild.c + +2017-08-22 14:35:11 +0300 Timo Sirainen (709ee5a90) + + cassandra: Add support for prepared statements + + +M src/lib-sql/driver-cassandra.c + +2017-08-22 13:55:15 +0300 Timo Sirainen (a2c4998f6) + + cassandra: Cleanup - Create statement earlier + + Simplifies the following changes + +M src/lib-sql/driver-cassandra.c + +2017-08-24 11:56:38 +0300 Timo Sirainen (92a7f5f9b) + + cassandra: sql_transaction_commit*() cleanup - handle multiple query + failures earlier + + This makes the handling same for the sync and async method. It also + simplifies code for the following commits. + +M src/lib-sql/driver-cassandra.c + +2017-08-24 11:13:32 +0300 Timo Sirainen (8759c5d29) + + cassandra: sql_transaction_commit_s() - Set query_type correctly + + The queries were all sent with READ type instead of WRITE/DELETE. This meant + they were using potentially wrong consistency values. Although synchronous + commits aren't actually used anywhere, so this practically this doesn't fix + anything right now. + +M src/lib-sql/driver-cassandra.c + +2017-08-24 11:09:05 +0300 Timo Sirainen (92e21c2a1) + + cassandra: sql_transaction_commit_s() - Don't allow multi-query transactions + + They were already denied for asynchronous commits. Also the synchronous + commits aren't actually used anywhere, so this shouldn't break anything. + +M src/lib-sql/driver-cassandra.c + +2017-09-07 15:40:16 +0300 Timo Sirainen (6a3f466e0) + + dict-sql: Use prepared statements + + Create a hash table of query template -> prepared statement and fill it out + as needed. This could have been done some alternative ways that wouldn't + require building the string first, but this should still be fast enough and + much easier to implement. + +M src/lib-dict/dict-sql-private.h +M src/lib-dict/dict-sql.c + +2017-08-26 23:27:21 +0300 Timo Sirainen (fc998bd6e) + + dict-sql: Flush pending atomic_inc on set, and pending set on atomic_inc + + +M src/lib-dict/dict-sql.c + +2017-08-26 23:17:45 +0300 Timo Sirainen (f2e6909dd) + + dict-sql: Cleanup - change query generator functions to return statement + + Instead of query+params. This is in preparation for the following changes. + +M src/lib-dict/dict-sql.c + +2017-08-15 16:50:16 +0300 Timo Sirainen (5451d6b31) + + dict-sql: Cleanup - Remove unnecessary code + + The values are explicitly added to params. sql_dict_update_query() doesn't + add them again. Since the "diff" parameter is already a long long type, this + avoids unnecessary conversion to string and back. + +M src/lib-dict/dict-sql.c + +2017-08-15 16:38:33 +0300 Timo Sirainen (e6bff6f5f) + + dict-sql: Use sql_statement_bind_*() + + +M src/lib-dict/dict-sql.c + +2017-08-15 15:37:01 +0300 Timo Sirainen (0e884c3e0) + + dict-sql: Add signed "int" type + + +M src/lib-dict/dict-sql-settings.c +M src/lib-dict/dict-sql-settings.h +M src/lib-dict/dict-sql.c + +2017-08-15 14:55:48 +0300 Timo Sirainen (4fa50be15) + + dict-sql: Use sql_statement_set_timestamp() instead of adding it to query + + +M src/lib-dict/dict-sql-private.h +M src/lib-dict/dict-sql.c + +2017-08-15 14:46:10 +0300 Timo Sirainen (a789b3fb4) + + dict-sql: Initial change to use sql_statement API + + sql_statement_bind_*() will be followed by later changes. + +M src/lib-dict/dict-sql.c + +2017-08-15 16:44:27 +0300 Timo Sirainen (a903e2bcf) + + dict-sql: Remove dict_sql_build_query.inc + + It's no longer useful with the current code. + +M src/lib-dict/dict-sql.c + +2017-08-15 14:27:40 +0300 Timo Sirainen (1a672c1f2) + + dict-sql: Change "uint" type to mean 64bit instead of 32bit integer. + + This is likely what is usually wanted (especially in e.g. quotas). If + someone actually wants it to be restricted to 32bit, we could add uint32 + later on. + +M src/lib-dict/dict-sql.c + +2017-08-22 11:37:17 +0300 Timo Sirainen (9f0fc74e3) + + lib-sql: Add support for prepared SQL statements. + + This initial implementation doesn't use prepared statements in drivers, but + simply generates the query string internally. + +M src/lib-sql/sql-api-private.h +M src/lib-sql/sql-api.c +M src/lib-sql/sql-api.h + +2017-08-22 11:31:51 +0300 Timo Sirainen (ef597c461) + + lib-sql: Explicitly specify used *_vfuncs methods for drivers. + + This allows adding more methods without modifying all the existing drivers. + +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-mysql.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlite.c +M src/lib-sql/driver-sqlpool.c +M src/lib-sql/driver-test.c + +2017-09-08 11:02:29 +0300 Timo Sirainen (a07e0d83e) + + doveadm proxy: Avoid DNS lookup for "host" if passdb also returns "hostip" + + +M src/doveadm/doveadm-mail-server.c + +2017-09-08 11:02:07 +0300 Timo Sirainen (31434f7b8) + + lmtp proxy: Avoid DNS lookup for "host" if passdb also returns "hostip" + + +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-proxy.h + +2017-09-08 11:01:20 +0300 Timo Sirainen (dbe43c872) + + auth: Avoid DNS lookup for "host" if passdb returns also "hostip" + + +M src/auth/auth-request.c + +2017-09-07 12:18:55 +0300 Aki Tuomi (4b8bea203) + + lib: Only deprecate rand/rand_r on recent enough compilers + + +M src/lib/compat.h + +2017-09-05 20:42:31 +0300 Timo Sirainen (2bb003895) + + master: Write all the early warnings to log file after logging is + initialized + + Any warnings (or errors) logged before settings were read and logging was + initialized caused them to be only written to stderr. This caused them to be + lost too easily. Now they are also buffered in memory and then flushed to + log files once logging is initialized. + +M src/master/main.c + +2017-09-07 12:44:46 +0300 Timo Sirainen (bcd91686e) + + lib: Free io_switch_callbacks_free only after other atexit-callbacks + + Fixes a crash at deinit where io_loop_remove_switch_callback() was called in + lib_atexit() callback. + +M src/lib/ioloop.c + +2017-09-04 15:46:39 +0300 Aki Tuomi (2a628a8c9) + + global: Replace random_fill_weak with random_fill + + They are now the same thing + +M src/doveadm/doveadm-sis.c +M src/lib-compression/test-compression.c +M src/lib-dcrypt/test-stream.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib/randgen.h +M src/lib/safe-mkstemp.c +M src/lib/test-ostream-buffer.c +M src/lib/test-ostream-file.c + +2017-08-23 14:12:20 +0300 Aki Tuomi (9e0f35dcc) + + global: Remove random_init/random_deinit calls + + lib already initializes it. + +M src/auth/main.c +M src/dict/main.c +M src/doveadm/doveadm-pw.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/main.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c +M src/login-common/main.c +M src/plugins/apparmor/apparmor-plugin.c +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-crypt/mail-crypt-plugin.c +M src/plugins/mail-crypt/test-mail-global-key.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/var-expand-crypt/test-var-expand-crypt.c + +2017-08-23 13:42:09 +0300 Aki Tuomi (21f76ca1a) + + lib: Simplify timing_add_usecs + + i_rand is guaranteed to return 32 bit integer + +M src/lib/timing.c + +2017-08-23 12:59:30 +0300 Aki Tuomi (b082469af) + + lib: Warn if rand is used + + +M src/lib/compat.h + +2017-08-23 12:59:42 +0300 Aki Tuomi (62461eb60) + + global: Replace rand with i_rand + + +M src/auth/auth-request.c +M src/director/director-test.c +M src/director/test-user-directory.c +M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c +M src/lib-compression/test-compression.c +M src/lib-dict/test-dict-client.c +M src/lib-fs/fs-randomfail.c +M src/lib-fts/test-fts-tokenizer.c +M src/lib-index/test-mail-index-transaction-update.c +M src/lib-index/test-mail-transaction-log-file.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-mail-html2text.c +M src/lib-mail/test-message-header-decode.c +M src/lib-mail/test-message-header-hash.c +M src/lib-master/master-login-auth.c +M src/lib-master/test-master-service-settings-cache.c +M src/lib-storage/index/mbox/mbox-lock.c +M src/lib-test/test-istream.c +M src/lib/file-dotlock.c +M src/lib/net.c +M src/lib/test-array.c +M src/lib/test-base32.c +M src/lib/test-base64.c +M src/lib/test-buffer.c +M src/lib/test-data-stack.c +M src/lib/test-hash.c +M src/lib/test-istream-concat.c +M src/lib/test-istream-crlf.c +M src/lib/test-istream-seekable.c +M src/lib/test-istream-tee.c +M src/lib/test-ostream-buffer.c +M src/lib/test-ostream-file.c +M src/lib/test-priorityq.c +M src/lib/test-seq-range-array.c +M src/lib/test-strnum.c +M src/lib/test-unichar.c +M src/lib/timing.c +M src/login-common/login-proxy.c +M src/login-common/main.c +M src/master/main.c +M src/master/service-monitor.c + +2017-08-23 12:49:03 +0300 Aki Tuomi (8045f6e30) + + lib: Use best available random number generator + + The best available method is used from short list of getrandom, arc4random + or reading /dev/urandom + +M src/lib/randgen.c +M src/lib/randgen.h + +2017-08-23 12:38:07 +0300 Aki Tuomi (5405ee4d3) + + lib: Replace rand.c with i_rand function + + Replacement for rand + +M src/lib/Makefile.am +M src/lib/lib.c +M src/lib/lib.h +M src/lib/rand.c +D src/lib/rand.h + +2017-09-04 15:22:13 +0300 Aki Tuomi (a147c9a20) + + lib: Replace rand_set_seed with srand + + Makes following commits easier, and also makes sure that rand() will get + seeded when used by other libraries. + +M src/lib/lib.c +M src/lib/rand.c +M src/lib/rand.h +M src/lib/randgen.c + +2017-08-23 13:02:36 +0300 Aki Tuomi (130e6a5f6) + + lib-test: Remove rand state dump + + It's not possible after next commit + +M src/lib-test/test-common.c + +2017-08-23 12:53:50 +0300 Aki Tuomi (da32b4dc8) + + configure: Check for getrandom + + +M configure.ac +A m4/random.m4 + +2017-03-02 23:13:48 +0100 Stephan Bosch (0043fea12) + + lib: lib-signals: Removed explicit notification of ioloop change through + lib_signals_reset_ioloop() in favor of implicit method. + + Before, if the ioloop changed, the application had to explicitly notify + lib-signals using lib_signals_reset_ioloop(). This is error-prone and + requires doing this all over the Dovecot code base. Now, lib-signals + registers an ioloop switch callback that deals with this implicitly. The + application can detach lib-signals from the ioloop explicitly if delayed + signal handling is not required/desired in the new ioloop. Specific delayed + signal handlers can be exempt from this automated behavior using a flag, + meaning that such signal handlers need to be moved between ioloops + explicitly. + +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection.c +M src/lib-auth/auth-master.c +M src/lib-program-client/program-client-local.c +M src/lib-program-client/test-program-client-local.c +M src/lib/Makefile.am +M src/lib/child-wait.c +M src/lib/child-wait.h +M src/lib/lib-signals.c +M src/lib/lib-signals.h +A src/lib/test-lib-signals.c +M src/lib/test-lib.inc + +2017-09-01 15:10:52 +0300 Josef 'Jeff' Sipek (b67974c4b) + + lib-storage: convert dbox-multi to use container_of + + +M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-multi/mdbox-storage.h +M src/lib-storage/index/dbox-multi/mdbox-sync.c + +2017-09-01 15:09:00 +0300 Josef 'Jeff' Sipek (df3963075) + + lib-storage: convert dbox-single to use container_of + + +M src/lib-storage/index/dbox-single/sdbox-copy.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-storage.h +M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-storage/index/dbox-single/sdbox-sync.c + +2017-09-01 15:06:54 +0300 Josef 'Jeff' Sipek (804fa3f03) + + lib-storage: convert dbox-common to use container_of + + +M src/lib-storage/index/dbox-common/dbox-mail.c +M src/lib-storage/index/dbox-common/dbox-mail.h +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-common/dbox-save.h +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/index/dbox-common/dbox-storage.h +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-copy.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-storage.c + +2017-08-28 11:52:52 +0300 Josef 'Jeff' Sipek (a97fdf205) + + lib-storage: convert cydir to use container_of + + +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/cydir/cydir-storage.c +M src/lib-storage/index/cydir/cydir-storage.h +M src/lib-storage/index/cydir/cydir-sync.c + +2017-08-28 11:52:06 +0300 Josef 'Jeff' Sipek (f7fe4f81c) + + lib-storage: convert shared to use container_of + + +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/index/shared/shared-storage.h + +2017-08-28 11:51:34 +0300 Josef 'Jeff' Sipek (8af1a286f) + + lib-storage: convert raw to use container_of + + +M src/lib-storage/index/raw/raw-mail.c +M src/lib-storage/index/raw/raw-storage.c +M src/lib-storage/index/raw/raw-storage.h +M src/lib-storage/index/raw/raw-sync.c + +2017-08-28 11:50:40 +0300 Josef 'Jeff' Sipek (7b0a52bf3) + + lib-storage: convert imapc to use container_of + + +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c + +2017-08-28 11:26:20 +0300 Josef 'Jeff' Sipek (95d62f8d6) + + lib-storage: convert pop3c to use container_of + + +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/pop3c/pop3c-storage.c +M src/lib-storage/index/pop3c/pop3c-storage.h +M src/lib-storage/index/pop3c/pop3c-sync.c + +2017-08-28 11:24:21 +0300 Josef 'Jeff' Sipek (c150beda1) + + lib-storage: convert mbox to use container_of + + +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/mbox/mbox-storage.h +M src/lib-storage/index/mbox/mbox-sync-list-index.c +M src/lib-storage/index/mbox/mbox-sync.c + +2017-08-28 11:15:45 +0300 Josef 'Jeff' Sipek (77f8c49be) + + lib-storage: convert maildir to use container_of + + +M src/lib-storage/index/maildir/maildir-copy.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-storage.c +M src/lib-storage/index/maildir/maildir-storage.h +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-sync.c + +2016-09-13 15:01:56 -0400 Josef 'Jeff' Sipek (1c238d4b7) + + lib: introduce container_of + + This is a simple but type safe implementation. + +M src/lib/macros.h + +2017-09-01 14:57:20 +0300 Josef 'Jeff' Sipek (2b5cccf6b) + + lib-storage: rename IMAPC_CONTEXT to IMAPC_SEARCHCTX + + +M src/lib-storage/index/imapc/imapc-search.c + +2017-09-04 16:52:01 +0200 Manuel Mausz (d2845370f) + + auth: Rename overlooked "original_username" after c3e50b + + In c3e50b854dec3f9a51dbaecf2ee56197125a003f "original_username" field got + renamed to "original-username". + +M src/auth/auth-request.c + +2017-06-18 19:55:23 +0200 Stephan Bosch (57c65763f) + + doveadm-server: http: Fixed crash occurring when disconnecting a client at + server deinit. + + +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection-private.h +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h + +2017-07-19 16:53:17 +0300 Timo Sirainen (ec9429535) + + *-login: Cache director_username_hash between KICK-DIRECTOR-HASH commands + + This should make the kicking much faster, which is important when director + is moving thousands of users. + +M src/login-common/client-common.h +M src/login-common/login-proxy.c + +2017-07-19 16:49:18 +0300 Timo Sirainen (c5ed1bc7a) + + lib-mail: Make sure mail_user_hash() won't return 0 as the hash. + + It doesn't seem to actually happen, but this makes sure of it. + +M src/lib-mail/mail-user-hash.c +M src/lib-mail/mail-user-hash.h + +2017-08-27 13:55:52 +0300 Aki Tuomi (dfdcbff54) + + doveadm-fs: Fix argument handling + + If argument contains - and needs to be passed to doveadm-fs then it needs -- + to make sure getopt won't choke on it, and due to this, we need to use + getopt in doveadm-fs too, to make sure -- gets removed. + +M src/doveadm/doveadm-fs.c + +2017-08-27 12:50:35 +0300 Aki Tuomi (42db38215) + + doveadm-dict: Convert to new parameter handling + + Fixes problems with negative numbers as parameters + +M src/doveadm/doveadm-dict.c + +2017-08-27 12:57:51 +0300 Aki Tuomi (98800cb9f) + + doveadm: Make sure positional arguments end up in right place + + Otherwise -- is placed into wrong place and breaks command line reparsing in + legacy functions. + +M src/doveadm/doveadm-cmd.c + +2017-02-07 13:06:31 +0100 Tom Sommer (dff659439) + + init: Execute /etc/default/dovecot on init, if it exists + + +M doc/dovecot-initd.sh + +2017-01-12 10:02:13 +0100 Tom Sommer (6e43098a4) + + init: Execute /etc/sysconfig/dovecot on init, if it exists + + Helps users set `ulimit`, `DAEMON` etc. without having to touch the init.d + script. + +M doc/dovecot-initd.sh + +2017-09-04 17:43:31 +0200 manuel (ef4ca21b9) + + auth: cache: don't log password mismatch twice + + If auth cache is enabled and the last auth was successful dovecot assumes + the password has been changed and invalidates the cache which results in + double logging of the same password mismatch. This also applies to expired + negative cache entries. + +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/auth/passdb-cache.c + +2017-09-05 10:43:46 +0300 Aki Tuomi (280bc7d8b) + + dsync: Ignore missing remote mailbox when doing unidirectional sync + + If there are some folders on remote system that are being ignored by remote + brain, do not error out. + +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-mails.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-mailbox.h + +2017-09-04 17:48:52 +0300 Timo Sirainen (838a76b0f) + + lib-storage: Fix INBOX notifications to set correct events + + This fixes IMAP NOTIFY so it doesn't send STATUS notifications to INBOX when + it doesn't have to. + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-04 17:37:05 +0300 Timo Sirainen (5b8981899) + + lib-storage: List index notify cleanup - move code to separate functions + + No functional changes. In preparation for the next commit. + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-04 16:59:52 +0300 Timo Sirainen (921a1eac5) + + lib-storage: Remove INBOX notification checks if mailbox events aren't + requested + + Nothing would be done with the results of those checks. + + Note that MAILBOX_LIST_NOTIFY_UIDVALIDITY can be handled using mailbox list + index, even for INBOX with mailbox_list_index_include_inbox=no. + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-04 16:55:30 +0300 Timo Sirainen (91cec7184) + + lib-storage: Optimize INBOX notifications with + mailbox_list_index_include_inbox=yes + + There's no need for special INBOX checks in that case, because INBOX is + tracked in the mailbox list index the same as any other mailbox. + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-09-04 12:40:49 +0300 Timo Sirainen (cefa6f3df) + + pop3-migration: Strip away invalid header lines. + + If there's no ":" in the header, remove it. Fixes matching mails with + Zimbra. + +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c + +2017-09-04 13:25:38 +0300 Timo Sirainen (64dcdfcd0) + + example-config: Update mail_temp_dir comment + + +M doc/example-config/conf.d/10-mail.conf + +2017-09-04 19:37:12 +0300 Timo Sirainen (3bfdab4b3) + + pop3-migration: Fail if all IMAP mails were matched by size, but POP3 had + extra mails + + This makes the handling same as what happens when the same situation happens + and the last mails were matched by headers. That's an error, unless + pop3_migration_ignore_*_uidls=yes. + +M src/plugins/pop3-migration/pop3-migration-plugin.c + +2017-09-04 18:32:15 +0300 Timo Sirainen (65e19f977) + + pop3-migration: Add pop3_migration_ignore_extra_uidls=yes setting + + +M src/plugins/pop3-migration/pop3-migration-plugin.c + +2017-09-04 15:32:24 +0300 Aki Tuomi (2e684ad58) + + notify-status: Provide access to all easy fields + + +M src/plugins/notify-status/notify-status-plugin.c + +2017-08-31 01:59:22 +0300 compmaniak <6314398+compmaniak@users.noreply.github.com> (4e3be303f) + + lib: Preallocate output space for base64 encoding + + +M src/lib/base64.c + +2017-08-31 01:25:22 +0300 compmaniak <6314398+compmaniak@users.noreply.github.com> (f117e2804) + + lib: Reduced conditional logic in base64_encode + + +M src/lib/base64.c + +2017-08-31 01:04:48 +0300 compmaniak <6314398+compmaniak@users.noreply.github.com> (24dfb49cf) + + lib: Fix MAX_BASE64_ENCODED_SIZE macro + + +M src/lib/base64.h + +2017-08-30 13:51:20 +0300 Josef 'Jeff' Sipek (0dac2f5f0) + + lib: optimize nearest_power + + Instead of looping over each bit of a size_t, we can use a closed form + expression. + +M src/lib/bits.c +M src/lib/bits.h + +2017-08-30 20:49:17 -0400 Anton Yuzhaninov (9dadffcd2) + + lib-compression: Fix assert in i_stream_zlib_seek + + Also fix same bug in i_stream_bzlib_seek, i_stream_lz4_seek, + i_stream_lzma_seek. + +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c + +2017-08-30 09:50:48 +0300 Aki Tuomi (820f4f32c) + + db-oauth2: Add some debugging + + +M src/auth/db-oauth2.c + +2017-08-29 00:24:46 +0200 Stephan Bosch (3dc38e405) + + lib-http: client: Improved absolute request timeout error message. + + Now mentions that it is the absolute timeout. Provides the request + statistics also provided for the regular attempt timeout message. + +M src/lib-http/http-client-queue.c + +2017-08-25 18:40:23 +0300 Timo Sirainen (84af63724) + + sdbox: Don't open mail files when expunging + + It was done when mail_attachment_fs was non-empty (and default is + non-empty), even though mail_attachment_dir was empty. + +M src/lib-storage/index/dbox-common/dbox-attachment.c +M src/lib-storage/index/dbox-common/dbox-storage.c + +2017-08-25 18:02:44 +0300 Timo Sirainen (1ee688af5) + + lib-storage: mail_storage_set_critical() - don't free old error_string too + early + + It may be used in one of the parameters. + +M src/lib-storage/mail-storage.c + +2017-08-25 19:38:20 +0300 Timo Sirainen (f32c6ed9d) + + imap: Add debug logging for [un]hibernation + + The logs should now clearly say when a client was hibernated and when/why it + was was unhibernated. + +M src/imap/imap-client-hibernate.c +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h +M src/imap/imap-master-client.c +M src/imap/imap-state.c + +2017-08-25 19:53:36 +0300 Timo Sirainen (1bb7fb04a) + + quota dict: Log when quota is recalculated if mail_debug=yes + + +M src/plugins/quota/quota-dict.c + +2017-08-18 11:51:36 +0300 Timo Sirainen (02e78eb1e) + + director: Run director/host changing doveadm commands only after ring is + synced + + If the ring sync is still pending, the doveadm command may become reverted. + This doesn't fully prevent problems caused by sending doveadm commands + simultaneously to multiple directors, but it should prevent issues when only + a single director is used for doveadm commands. + + It would have been nice to enable this also for HOST/DIRECTOR-LIST commands, + but they don't support returning a ring timeout error without changing the + protocol. It's a bit too much effort to change that for now. + +M src/director/doveadm-connection.c + +2017-08-14 10:29:47 +0300 Timo Sirainen (6ecc5475f) + + director: doveadm HOST-* commands now wait for ring sync before returning OK + + This should make it easier for tests and maybe for scripts in general, so + they won't think the command failed when it just takes a while to finish. + +M src/director/doveadm-connection.c +M src/director/doveadm-connection.h +M src/director/main.c + +2017-08-14 10:06:34 +0300 Timo Sirainen (6f5310d61) + + director: Cleanup - Doveadm commands now return enum + doveadm_director_cmd_ret + + +M src/director/doveadm-connection.c + +2017-08-14 10:01:01 +0300 Timo Sirainen (68f7668b9) + + director: Cleanup - Move all doveadm commands into an array. + + +M src/director/doveadm-connection.c + +2017-08-21 15:44:41 +0300 Timo Sirainen (18122b1fb) + + mdbox: Use mail_storage_set_index_error() instead of poorly duplicating it + + +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c + +2017-08-21 15:34:40 +0300 Timo Sirainen (34902486e) + + lib-storage: Add mail_storage_set_index_error() + + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-08-21 15:29:46 +0300 Timo Sirainen (5f9ee4f6e) + + lib-storage: index_mail_set_cache_corrupted() - Don't reset internal error + string + + It's already set correctly by the earlier functions. + +M src/lib-storage/index/index-mail.c + +2017-08-21 15:27:48 +0300 Timo Sirainen (041f22a11) + + lib-storage: mail_set_mail_cache_corrupted() - set also internal error + string + + +M src/lib-storage/mail-storage.c + +2017-08-21 15:26:13 +0300 Timo Sirainen (0bab015a5) + + lib-storage: mailbox_set_index_error() - Set internal error string to + index's error + + +M src/lib-storage/mail-storage.c + +2017-08-21 15:11:30 +0300 Timo Sirainen (fe7a56906) + + lib-storage: Fix error logging after mail_storage_set_internal_error() + + The function doesn't actually set the last_internal_error and it also + doesn't update last_error_is_internal, so calling + mail_storage_get_last_internal_error() afterwards could be returning an + error for some different older error. + + Since there's no parameter to set the internal error string, just reset + last_error_is_internal=FALSE. + +M src/lib-storage/mail-storage.c +M src/lib-storage/test-mail-storage.c + +2017-08-25 15:12:06 +0300 Timo Sirainen (4078733e5) + + lib-index: Avoid opening .log.2 file if .log was reset + + After a reset there's no point in trying to read the older log files. This + avoids trying to open .log.2 at least for newly created mailboxes when + trying to lookup log file sequence 1 (since due to some bug/feature the log + files start from sequence 2). + +M src/lib-index/mail-transaction-log.c + +2017-08-24 17:01:34 +0300 Timo Sirainen (f37939033) + + log: Log a warning for each service that still has processes at shutdown + + This makes it clearer which services are causing log process to hang, and + also which processes may have their logging discarded afterwards. + +M src/log/log-connection.c + +2017-08-24 17:00:30 +0300 Timo Sirainen (9a795eb60) + + log: Include PID in prefix for internal log messages. + + +M src/log/log-connection.c +M src/log/log-connection.h +M src/log/main.c + +2017-08-24 16:31:40 +0300 Timo Sirainen (cc9338259) + + master: Log "Processes aren't dying after reload" only when signals are sent + + This required moving the warning after the "Sent SIG.. to .. processes" + warnings, which is a little bit annoying. However, now it's at least not + unnecessarily logging the warning when it's not doing anything about the + processes. + +M src/master/service.c + +2017-08-24 16:24:21 +0300 Timo Sirainen (4a62ed78e) + + master: Improve killing processes when they don't die after reload + + The old behavior was: 1. Send SIGTERM to all processes, except log 2. Send + SIGTERM to all processes, including log 3. Send SIGKILL to all processes, + including log + + The new behavior is now: 1. Send SIGTERM to all processes, except log 2. + Send SIGKILL to all processes, except log + + Only after there aren't any processes left except log, send SIGTERM to it. + If that doesn't work, send SIGKILL. + +M src/master/main.c +M src/master/service.c +M src/master/service.h + +2017-08-25 13:38:35 +0300 Timo Sirainen (a1d3ff734) + + pop3-migration: Try to assign UIDLs based on dovecot.index.cache + + Add the UIDLs to (imapc) mailbox cache after they've been assigned. Try to + read them from the cache on the next sync to avoid reading mails' headers. + + This can be disabled with pop3_migration_skip_uidl_cache=yes, just in case + there's some kind of a problem with it. + +M src/plugins/pop3-migration/pop3-migration-plugin.c + +2017-08-25 13:36:11 +0300 Timo Sirainen (bc3661d71) + + pop3-migration: Delete unnecessary POP3 order checking code + + Nothing is actually using the result. + +M src/plugins/pop3-migration/pop3-migration-plugin.c + +2017-08-25 13:16:26 +0300 Timo Sirainen (3e376d7c5) + + lib-storage: Support LISTINDEX= to disable it + + +M src/lib-storage/list/mailbox-list-index.c + +2017-08-24 10:01:02 +0300 Sergey Kitov (56fbb7e70) + + lib-settings: Escape comma in section name. + + Comma is valid symbol in encoded non-ascii section names, so it shouldn't be + used as splitting symbol in section name. + +M src/lib-settings/settings-parser.c + +2017-08-18 15:29:09 +0300 Josef 'Jeff' Sipek (086e8ecc5) + + quota plugin: restructure quota_root_get_rule_limits() + + If the user has unlimited quota, we have no reason to find the real mailbox + name. + +M src/plugins/quota/quota.c + +2017-08-23 13:14:50 +0300 Aki Tuomi (9c5c54ab0) + + apparmor: Call super deinit function + + Otherwise user won't get properly deinitialized, forgotten in + a7a0f3196b2b97577ebd9e804507d58e67508fcf + +M src/plugins/apparmor/apparmor-plugin.c + +2017-08-18 17:38:34 +0300 Timo Sirainen (c3fab8b44) + + lib-storage: Call mail_cache_close_mail() when mail is closed + + Fixes caching problems with INDEX=MEMORY + +M src/lib-storage/index/index-mail.c + +2017-08-18 17:34:14 +0300 Timo Sirainen (93cb78fb1) + + lib-index: Add mail_cache_close_mail() to smartly drop cached data with + INDEX=MEMORY + + Instead of reseting the entire transaction buffer when 256 kB is reached, + just drop mails have have been marked closed with mail_cache_close_mail(). + If that's not enough, continue deleting forcibly until the buffer is below + 256 kB. + + This is especially important when mail_prefetch_count>0 and INDEX=MEMORY. In + that case there can be multiple mails that are being added to cache and used + later on. If they were dropped from cache too early, the work would have to + be done all over again. + +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-cache.h + +2017-08-18 14:58:37 +0300 Aki Tuomi (351233c81) + + doveadm: Actually use resolved IP address(es) in director flush + + It left the IP variable unitialized which caused host parameter to be left + empty causing flush all. Flushing with IP address was not affected. + +M src/doveadm/doveadm-director.c + +2017-08-18 11:22:52 +0300 Aki Tuomi (9f24d61f4) + + doveadm-server: Deinitialize print on connection destroy + + Otherwise print remains initialized and can break when reusing the service. + +M src/doveadm/client-connection.c + +2017-08-18 11:09:41 +0300 Timo Sirainen (1707f8b66) + + director: Fix rapid reconnection on failed outgoing connections + + last_network_failure wasn't set, which caused a failed outgoing connection + to immediately reconnect to it. This resulted in rapid logging of connect() + errors. + +M src/director/director-connection.c + +2017-08-17 13:20:26 +0300 Timo Sirainen (f784d5bb8) + + global: Add/change switch case "fall through" comments + + These fix warnings with gcc 7's -Wimplicit-fallthrough + +M src/auth/password-scheme.c +M src/lib-fts/fts-filter-contractions.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-ldap/ldap-connection.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/message-header-encode.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/mail-search.c +M src/lib/json-parser.c +M src/plugins/fts/fts-search-args.c + +2017-08-17 14:42:07 +0300 Timo Sirainen (2c8259de1) + + lib: Add missing parenthesis to timeout_add()'s msecs parameter checks + + This caused wrong results when the msecs parameter contained e.g. var?1:2 + +M src/lib/ioloop.h + +2017-08-17 13:14:16 +0300 Timo Sirainen (d31018c55) + + lib: Fix compiler warning about mixing boolean with multiplication + + +M src/lib/macros.h + +2017-08-17 14:17:46 +0300 Timo Sirainen (b12757f0d) + + doveadm mcp keypair generate: Fix -f parameter + + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-07-24 14:40:31 +0300 Timo Sirainen (9599d7ecb) + + virtual: Make sure sync_mailbox_idx isn't used uninitialized + + Changing its indexes to start from 1, we can add an assert to check that + it's never the default 0 when we need to use it. + +M src/plugins/virtual/virtual-storage.h +M src/plugins/virtual/virtual-sync.c + +2017-07-13 10:02:26 +0300 Aki Tuomi (a7a0f3196) + + apparmor: Add apparmor plugin + + It lets dovecot temporarily switch to a new apparmor context for a user. + +M configure.ac +A m4/want_apparmor.m4 +M src/plugins/Makefile.am +A src/plugins/apparmor/Makefile.am +A src/plugins/apparmor/apparmor-plugin.c + +2017-08-10 17:50:04 +0300 Timo Sirainen (8017d6c67) + + director: Make sure users gets expired even on an idle director + + Normally expiring gets done while looking up users, but if nothing is doing + that on an idle director the users won't get expired. This can cause + confusion in "doveadm director status" output. + +M src/director/test-user-directory.c +M src/director/user-directory.c + +2017-08-16 13:53:55 +0300 Michael Koch (3df60858b) + + push-notification plugin: properly terminate strings + + Without this fix, if the new message does not contain a from, a subject, and + a snippet the generated JSON will be malformed (the status check at the end + appended a '"' when it shouldn't have). + +M src/plugins/push-notification/push-notification-driver-ox.c + +2017-08-15 11:09:07 +0300 Sergey Kitov (bd18d17a3) + + auth: auth_request_log_unknown_user() to call common + auth_request_log_login_failure() + + Separate implementation of auth_request_log_unknown_user() is replaced with + call to auth_request_log_login_failure() NOTE: behavior of the + auth_request_log_unknown_user() is changed and is in line with + auth_request_log_password_mismatch() + +M src/auth/auth-request.c + +2017-08-15 11:07:46 +0300 Sergey Kitov (3742e38a1) + + auth: auth_request_log_password_mismatch() to call common + auth_request_log_login_failure() + + Separate implementation of auth_request_log_password_mismatch() is replaced + with call to auth_request_log_login_failure() + +M src/auth/auth-request.c + +2017-08-15 11:06:58 +0300 Sergey Kitov (1beabc460) + + auth: ldap auth bind password mismatch logging is changed + + All unknown user and password mismatch logging is performed in the same way + in both auth_bind = yes and auth_bind = no cases. + +M src/auth/passdb-ldap.c + +2017-08-15 09:27:09 +0300 Sergey Kitov (de6c3680d) + + auth: Added auth_request_log_login_failure() + + New function implementing functionality of auth_request_log_unknown_user() + and auth_request_log_password_mismatch() + +M src/auth/auth-request.c +M src/auth/auth-request.h + +2017-08-14 15:44:24 +0300 Timo Sirainen (b07a3abc4) + + cassandra: Fix confusing debug logging for paged query results. + + Even when caller supported paged queries, the debug output contained + "Paged query has more results, but not supported by the caller". Clear out + the error after sql_result_more() is called, so it won't be logged. + +M src/lib-sql/driver-cassandra.c + +2017-07-28 12:35:07 +0300 Aki Tuomi (6894cb956) + + auth: Do not use strcasecmp to compare mechanisms + + This is optimization since strcasecmp is slow + +M src/auth/mech.c + +2017-07-28 10:20:17 +0300 Aki Tuomi (083675993) + + auth: Empty schemes cannot be aliases + + Optimizes cases where empty scheme is compared to PLAIN + +M src/auth/password-scheme.c + +2017-08-14 14:48:05 +0300 Aki Tuomi (512e3c94f) + + auth: Use strchr to split encoding and scheme + + This is an optimization because usually strchr is faster + +M src/auth/password-scheme.c + +2017-07-28 10:09:06 +0300 Aki Tuomi (f937937c9) + + auth: Use hash table for schemes + + +M src/auth/password-scheme.c +M src/auth/password-scheme.h +M src/doveadm/doveadm-pw.c + +2017-07-28 09:47:09 +0300 Aki Tuomi (00bd7d0e2) + + lib: Add strfastcase_hash + + Fast case-insensitive hashing which works by masking signed bytes with 0x20. + +M src/lib/hash.c +M src/lib/hash.h + +2017-08-08 16:56:02 +0300 Timo Sirainen (5e0357691) + + lib-index: Fix wrong mail_index_modseq_header automatically + + It happens only on the next sync, although that isn't actually guaranteed to + happen. Still, it happens almost always so this should be good enough. + +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log.c +M src/lib-index/test-mail-transaction-log-file.c + +2017-08-08 16:54:42 +0300 Timo Sirainen (7e78f1cfc) + + lib-index: Code cleanup - move code to get_modseq_next_offset_at() + + In preparation for making the next commit smaller. + +M src/lib-index/mail-transaction-log-file.c + +2017-08-08 14:55:48 +0300 Timo Sirainen (2c4d4d0af) + + lib-index: Add unit tests to + mail_transaction_log_file_get_modseq_next_offset() and + _get_highest_modseq_at() + + +M src/lib-index/test-mail-transaction-log-file.c + +2017-08-08 14:01:18 +0300 Timo Sirainen (9f02b2016) + + lib-index: Add unit test to mail_transaction_update_modseq() + + +M src/lib-index/Makefile.am +A src/lib-index/test-mail-transaction-log-file.c + +2017-08-05 14:38:50 +0900 Timo Sirainen (2b170a01b) + + lib-index: Remove tracking of mail_index_modseq_sync.highest_modseq + + It's no longer necessary after the previous changes. + +M src/lib-index/mail-index-modseq.c +M src/lib-index/mail-index-modseq.h +M src/lib-index/mail-index-sync-update.c + +2017-08-05 14:33:12 +0900 Timo Sirainen (43ab0dbe6) + + lib-index: Fix setting highest_modseq correctly in mail_index_modseq_header + + The internally counted ctx->highest_modseq wasn't correct if all of the + records weren't synced. This could have happened for various reasons. Since + the view's current log seq/offset is used for the header, we can also use + the current highest_modseq from the view as well and it's guaranteed to be + correct. + + This fixes various potential problems with using QRESYNC and CONDSTORE + extensions. It also fixes potential errors with unhibernating imap clients, + including: + + Error: .../dovecot.index.log: Transaction log changed unexpectedly, can't + get modseq + +M src/lib-index/mail-index-modseq.c + +2017-08-05 14:29:12 +0900 Timo Sirainen (eda341e84) + + lib-index: Update per-flag modseq value a bit more correctly. + + This changes the code to be similar to the per-mail modseq updating in + mail_index_modseq_update(). It probably wasn't exactly wrong previously + either, but this change is required for the following commits. + +M src/lib-index/mail-index-modseq.c + +2017-08-05 14:16:31 +0900 Timo Sirainen (0cb5be3dc) + + lib-index: Fix checking if modseq header is up-to-date + + We were almost always assuming that it is. + +M src/lib-index/mail-index-modseq.c + +2017-08-05 14:11:17 +0900 Timo Sirainen (ace341ac5) + + lib-index: Fix modseq tracking with multiple flag updates + + The earlier code was checking only the first flag record update. If the + first one had only internal flag changes but (some of) the rest didn't, the + modseq wasn't counted correctly. This was probably pretty rare. + +M src/lib-index/mail-transaction-log-file.c + +2017-08-05 14:07:58 +0900 Timo Sirainen (892d85b7c) + + lib-index: Fix modseq tracking for MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ + + This is used to increase modseq for mails when their private flags change. + Use an already existing MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL() that does + this properly. + + (This change preserves another bug, which is fixed in the next commit.) + +M src/lib-index/mail-transaction-log-file.c + +2017-08-09 13:17:15 +0300 Timo Sirainen (b0ead8fff) + + dsync: Add missing transaction flags when performing UID renumbering + + The transaction didn't have MAILBOX_TRANSACTION_FLAG_SYNC or + MAILBOX_TRANSACTION_FLAG_NO_NOTIFY (with DSYNC_BRAIN_FLAG_NO_NOTIFY). + + This caused replication-dsync to unnecessarily trigger another dsync + replication notification. + +M src/doveadm/dsync/dsync-mailbox-import.c + +2017-08-08 20:07:18 +0300 Timo Sirainen (db19aa0ce) + + lib: When logging I/O or timeout leak, log also raw backtrace + + This can be useful when trying to figure out where the io_loop_destroy() was + called from. + +M src/lib/ioloop.c + +2017-08-09 13:41:34 +0300 Timo Sirainen (c0c346d0e) + + lib-storage: Panic if at mailbox_free() there are open attribute iterators. + + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-attribute.c + +2017-08-09 13:23:36 +0300 Timo Sirainen (a846e6d6b) + + push-notification: Switch to main ioloop while calling drivers' + deinit/cleanup callbacks + + Continues a44595f7b1afc7ccbd8653598753b32899d01c76 to other functions. For + example the OX backend would call http_client_wait(), which would move the + I/Os and timeouts to the current ioloop, which might not be main_ioloop + always. When that ioloop gets destroyed, I/O and timeout leaks are logged + and eventually the process crashes when calling http_client_deinit() in + cleanup() (this would happen later for another mail_user). + +M src/plugins/push-notification/push-notification-plugin.c + +2017-08-08 22:11:48 +0300 Timo Sirainen (65b82c99b) + + lib: Add asserts to make sure running ioloop is always current_ioloop + + We could also switch current_ioloop to the running ioloop temporarily while + calling callbacks, but this behavior is probably clearer. All of the + existing code should already work this way. + + Add the asserts after IO or timeout callback is called, so if the assert + triggers, we can find out which callback caused the change. The initial + assert in io_loop_handler_run() is enough to verify that the initial ioloop + is correct. + +M src/lib/ioloop.c + +2017-07-26 12:53:16 +0300 Aki Tuomi (5fe2339f8) + + virtual: Sync backend flags on initial sync when UIDVALIDITY hasn't changed + + Before recent fixes the UIDVALIDITY was thought to change almost every time, + so this bug wasn't visible. + +M src/plugins/virtual/virtual-sync.c + +2017-07-26 13:35:36 +0300 Aki Tuomi (9badddc24) + + virtual: Do not store recent flags to virtual index + + Setting the flag here would case unnecessary index update to clear the flag + later on. + +M src/plugins/virtual/virtual-sync.c + +2017-08-08 22:25:13 +0300 Timo Sirainen (68d25b7a8) + + lib: If CORE_IO_LEAK environment is set, panic on IO/timeout leaks + + +M src/lib/ioloop.c + +2017-08-02 10:54:27 +0300 Timo Sirainen (3c8055b25) + + imapc: Add imapc_features=send-id to send ID x-session-ext-id + + +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c + +2017-08-02 10:49:33 +0300 Timo Sirainen (3b7427fca) + + lib-imap-client: Support sending IMAP ID command including unique + x-session-ext-id + + +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c + +2017-08-08 00:31:57 +0300 Timo Sirainen (c8be39472) + + mdbox: "Inconsistency in map index" wasn't fixing itself automatically + + Broken by b9da8540e665138b3cad0b637c08c0ab7d7a7eeb + +M src/lib-storage/index/dbox-multi/mdbox-map.c + +2017-08-07 16:03:46 +0300 Sergey Kitov (cfc6ae77f) + + doveadm: mailbox_list_index_very_dirty_syncs disabled for force-resync + + prerun of cmd force-resync sets mailbox_list_index_very_dirty_syncs to no + for mail_storage_service_user befor mail_user is allocated. + +M src/doveadm/doveadm-mail.c + +2017-08-07 15:59:35 +0300 Sergey Kitov (24ff04044) + + lib-storage: added settings updating function for the mail_storage_service + user + + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h + +2017-08-04 18:20:50 +0300 Timo Sirainen (0a2511b99) + + lazy-expunge: Log internal errors instead of just "Internal error occurred" + + +M src/plugins/lazy-expunge/lazy-expunge-plugin.c + +2017-08-04 13:31:19 +0900 Timo Sirainen (740564d07) + + lib-storage: If mailbox_list_index_very_dirty_syncs=yes, still rebuild empty + list index + + +M src/lib-storage/list/mailbox-list-index-sync.c + +2017-08-01 13:48:55 +0900 Timo Sirainen (baf7aa6b2) + + lib-imap-client: Log an info-line when connected to remote server + + Include the remote IP:port ad local IP:port. This allows matching the + connection with the remote server's logs (or e.g. haproxy logs). + +M src/lib-imap-client/imapc-connection.c + +2017-07-30 09:39:18 +0300 Timo Sirainen (38cf8e6fc) + + lib-storage: MAIL_STORAGE_SERVICE_FLAG_NO_PLUGINS wasn't working correctly + + Especially with "doveadm user" it still triggered running the plugins, + because doveadm loads all the plugins early. + +M src/lib-storage/mail-storage-service.c + +2017-07-20 13:24:21 +0300 Aki Tuomi (917cac3e0) + + auth: Escape LDAP search filter properly + + This is syntaxical escaping to make ldap servers accept queries with + escapable characters, instead of erroring out. + +M src/auth/db-ldap.c + +2017-07-20 08:49:25 +0300 Aki Tuomi (b55776caa) + + dict-ldap: Escape LDAP search filter properly + + This is syntaxical escaping to make ldap servers accept queries with + escapable characters, instead of erroring out. It is possible that the + filter could have been modified in unexpected ways if the input comes from + untrusted sources. + +M src/plugins/dict-ldap/dict-ldap.c + +2017-07-20 08:48:30 +0300 Aki Tuomi (5ad53564f) + + lib-ldap: Store error if sending request to LDAP fails + + If the request cannot be sent e.g. due to bad search filter store the error + into the result. + + Fixes Panic: file ldap-connection.c: line 709 (ldap_result_has_failed): + assertion failed: ((result->openldap_ret == LDAP_SUCCESS) == + (result->error_string == NULL)) + +M src/lib-ldap/ldap-connection.c + +2017-07-27 16:34:34 +0200 Stephan Bosch (d577bb902) + + lib-http: message parser: Reject messages with invalid Date header when + HTTP_MESSAGE_PARSE_FLAG_STRICT flag is enabled. + + +M src/lib-http/http-message-parser.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-response-parser.c + +2017-07-27 16:30:20 +0200 Stephan Bosch (76b50cc56) + + lib-http: Fixed bug in date parser: sometimes read one byte past end of + input. + + This caused spurious parse errors. + +M src/lib-http/http-date.c + +2017-07-27 16:03:44 +0200 Stephan Bosch (f4b515d24) + + lib-http: test-http-response-parser: Show error message for tests of invalid + responses. + + +M src/lib-http/test-http-response-parser.c + +2017-07-26 19:47:16 +0300 Aki Tuomi (5638e66bf) + + imap: Flush response to client before starting possibly long operation + + Fixes Error: Timeout communicating with /var/run/dovecot/imap-master + (version received) + +M src/imap/imap-master-client.c + +2017-07-26 19:42:48 +0300 Aki Tuomi (bbc043c66) + + imap: Set client created before initializing namespaces + + Fixes Panic: file master-service.c: line 819 + (master_service_client_connection_destroyed): assertion failed: + (service->master_status.available_count < service->total_available_count) + +M src/imap/imap-master-client.c + +2017-07-25 20:53:18 +0300 Timo Sirainen (d823c19df) + + lib-storage: Hide and rmdir \NoSelect leaf mailboxes with NO-NOSELECT + + If the leaf is successfully rmdir()ed, rmdir() also its parents. + + This doesn't work perfectly with if there are multiple levels of \NoSelect + mailboxes. For example with "a/b/c" the listing will already have returned + "a" and "a/b" before it reaches the "a/b/c" code, which will rmdir all of + them, but it's a bit too late at that point. It's too much work to fix + though, and the situation will be fixed on the next list anyway. + +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-delete.h +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib-storage/list/mailbox-list-iter-private.h + +2017-07-25 16:10:51 +0300 Timo Sirainen (eaa2d473e) + + lib-storage: Add setting to disable \NoSelect mailboxes + + Enabled using mail_location = ...:NO-NOSELECT + + Trying to create \NoSelect "dir/" will result just creating "dir", similar + to how Maildir++ layout already did it. + + Deleting a mailbox will delete all of its \NoSelect parents. + +M src/lib-storage/index/index-storage.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-07-25 15:54:37 +0300 Timo Sirainen (5693411c1) + + lib-storage: Mailbox rename shouldn't auto-rmdir parent index dirs with + ITERINDEX + + For example: + - create a/b + - rename a/b c + + This resulted in "a" existing in mail root directory, but not in index + directory. With ITERINDEX this meant that the "a" was lost. + +M src/lib-storage/list/mailbox-list-delete.c + +2017-05-23 14:05:02 +0200 Stephan Bosch (2b1933b13) + + lib-storage: index: Made MIME FILENAME search criterion match + case-insensitively. + + +M src/lib-storage/index/index-search-mime.c +M src/lib-storage/index/index-search-private.h +M src/lib-storage/index/index-search.c + +2017-07-19 21:24:48 +0300 Timo Sirainen (77a41c18e) + + doveadm service status: Add doveadm_stop field + + This indicates whether "doveadm service stop" was used for the service. + +M src/doveadm/doveadm-master.c +M src/master/master-client.c +M src/master/service.h + +2017-07-25 09:35:31 +0300 Timo Sirainen (d85f37fe0) + + lib-storage: If root dir already exists as file, log better error message. + + +M src/lib-storage/mailbox-list.c + +2017-07-25 10:39:43 +0300 Timo Sirainen (a602629cb) + + lib: Fix compiler warning in var-expand-if + + +M src/lib/var-expand-if.c + +2017-07-25 09:43:56 +0300 Timo Sirainen (ac225e892) + + lib: Fix static analyzer warnings in var-expand-if + + +M src/lib/var-expand-if.c + +2017-07-24 21:08:33 +0300 Timo Sirainen (992511e0c) + + lib-storage: Try to get mailbox list index's permissions from its parent + directory + + This avoids stat()ing the mail/index root directory, which is especially + useful when mailbox list index is stored in tmpfs. + +M src/lib-storage/list/mailbox-list-index.c + +2017-07-24 21:07:44 +0300 Timo Sirainen (cded712c1) + + lib-index: Add mail_index_use_existing_permissions() + + This has annoyingly lot of copy&pasting from + mailbox_list_get_permissions_stat(), but there didn't seem to be any nice + place where to share the code. + +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h + +2017-07-24 20:48:25 +0300 Timo Sirainen (b12798bbb) + + lib-storage: If ITERINDEX is set, delay checking whether mail root exists + + In future this could be done even without ITERINDEX. It's not done yet, + since it might break backwards compatibility with some systems. + +M src/lib-storage/mail-storage.c + +2017-07-22 18:39:19 +0300 Timo Sirainen (49c48631c) + + lib-storage: Allow LISTINDEX to point to a different directory + + Most importantly because the mailbox list index is only a cache, it could be + safely pointed to e.g. tmpfs to save disk I/O. + +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-maildir.c +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-07-24 18:30:01 +0300 Aki Tuomi (9ab2df665) + + var-expand-if: Remove unused variable par_start + + +M src/lib/var-expand-if.c + +2017-07-24 14:17:22 +0300 Timo Sirainen (e41228670) + + lib-storage: Add mailbox_list_index_include_inbox setting + + This controls whether to update INBOX's STATUS information in the mailbox + list index. It can be useful especially if LISTINDEX points to a tmpfs, but + perhaps also in other situations. + + I considered adding a more generic setting to exclude other mailboxes, but + the namespace prefixes and hierarchy separators get a bit complicated with + shared mailboxes. It's probably also not very useful to change this for + anything but the INBOX. + +M doc/example-config/conf.d/10-mail.conf +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2017-07-24 14:12:55 +0300 Timo Sirainen (00f85d286) + + example-config: Add mailbox_list_index_very_dirty_syncs + + +M doc/example-config/conf.d/10-mail.conf + +2017-07-23 12:32:38 +0300 Timo Sirainen (b3d5afcc9) + + lib-master: Allow userdb to return postlogin socket path. + + Returning "postlogin=socketpath" as userdb extra field overrides the + postlogin socket path in the service { executable } parameter. + +M src/lib-master/master-login.c + +2017-07-24 16:37:42 +0300 Timo Sirainen (baf97389e) + + lib-storage: If userdb returns chdir extra field, chdir() there instead of + home + + This can avoid unnecessary home directory accesses if indexes are stored + outside the home and there's no other reason to chdir() to home. + +M src/lib-storage/mail-storage-service.c + +2017-07-24 16:36:45 +0300 Timo Sirainen (1fe027b2c) + + lib-storage: If chdir(home) fails due to EACCES, don't log two errors. + + +M src/lib-storage/mail-storage-service.c + +2017-07-24 13:31:49 +0300 Aki Tuomi (57479bd66) + + var-expand: Add tests for var_expand conditionals + + +M src/lib/test-var-expand.c + +2017-07-24 13:31:02 +0300 Aki Tuomi (b3e714256) + + var-expand: Add support for conditionals + + %{if;value-a,op,value-b:true-value:false-value} + +M src/lib/Makefile.am +A src/lib/var-expand-if.c +M src/lib/var-expand-private.h +M src/lib/var-expand.c + +2017-07-21 19:52:23 +0300 Timo Sirainen (bc7d7e41f) + + virtual: Make sure index is rewritten when new mailboxes are added + + Otherwise multiple bbox->sync_mailbox_idx point to 0 and they keep + overwriting each others in the header. This causes the header to be + constantly updated with wrong contents. + +M src/plugins/virtual/virtual-storage.h +M src/plugins/virtual/virtual-sync.c + +2017-07-20 16:18:46 +0300 Timo Sirainen (0c9a10554) + + lib-storage: Add UIDVALIDITY to mailbox list index on mailbox create + + This avoids an unnecessary secondary write later on when opening the + mailbox. + +M src/lib-storage/list/mailbox-list-index-backend.c + +2017-07-20 16:01:46 +0300 Timo Sirainen (ec1cfee08) + + lib-storage: Don't update INBOX's sync status to mailbox list index + + It's not actually used so there's no need to update it either. Broken by + 70092709cdc803c87b8f4ef1b0548eb45515bdae + +M src/lib-storage/list/mailbox-list-index-status.c + +2017-07-20 09:46:00 +0300 Martti Rannanjärvi (6b4d642a2) + + lib-sql: Remove duplicate Cassandra consistency names + + +M src/lib-sql/driver-cassandra.c + +2017-07-20 11:01:37 +0300 Aki Tuomi (7a758aabe) + + virtual: Do not remove mailbox notify if the mailbox is closed + + The backend mailbox close/open status is not related to the notify API + usage. The notify is removed in virtual_mailbox_close_internal instead when + we are actually deinitializing. + +M src/plugins/virtual/virtual-storage.c + +2017-07-19 23:19:12 +0300 Timo Sirainen (81e832796) + + virtual: Optimize mailbox_notify_changes() when there's only a single + backend mailbox + + +M src/plugins/virtual/virtual-storage.c + +2017-07-19 23:11:12 +0300 Timo Sirainen (2044eb765) + + lib-storage: mailbox_watch_extract_notify_fd() - give better reason if + mailbox has no IOs + + This happens currently with virtual mailboxes. + +M src/lib-storage/mailbox-watch.c + +2017-07-19 23:09:13 +0300 Timo Sirainen (a6280be05) + + lib: io_loop_extract_notify_fd() - Don't crash if no notifys have been added + + +M src/lib/ioloop-notify-inotify.c +M src/lib/ioloop-notify-kqueue.c + +2017-07-11 13:12:46 +0300 Martti Rannanjärvi (0c803d52a) + + imap: Add %{appended} to imap_logout_format + + +M doc/example-config/conf.d/20-imap.conf +M src/imap/cmd-append.c +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-07-03 15:20:14 +0300 Martti Rannanjärvi (375c6e158) + + doc: Change del to deleted in imap_logout_format default to match code + + +M doc/example-config/conf.d/20-imap.conf + +2017-07-03 17:12:08 +0300 Martti Rannanjärvi (0aa23d882) + + imap-client: Add %{autoexpunged} to imap_logout_format + + +M doc/example-config/conf.d/20-imap.conf +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-07-04 09:25:21 +0300 Martti Rannanjärvi (d6bb1be2c) + + imap-client: Add const char *disconnect_reason to client + + This is to allow using reason given to client_disconnect() via timeout + context. + +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-07-19 13:43:09 +0300 Timo Sirainen (2c0485aae) + + lib-index: Fix next_uid lookup in open transaction that has appended mails + + The appended mails were used for returning an updated + mail_index_header.next_uid, but only if the mails were assigned UIDs in + mail_index_append(). It should have updated the next_uid also after + mail_index_append_finish_uids() was used to assign the UIDs. + + This fixes setting first_recent_uid correctly for virtual mailboxes when the + sync finds new mails. Avoids multiple sessions from getting \Recent flags + for the same mails. + +M src/lib-index/mail-index-transaction-update.c + +2017-07-19 10:37:25 +0300 Timo Sirainen (8a6afcd8a) + + cassandra: Fix read/write buffer overflows after adding + CASSANDRA_QUERY_TYPE_READ_MORE + + +M src/lib-sql/driver-cassandra.c + +2017-07-19 10:35:43 +0300 Timo Sirainen (065189672) + + lib-sql: Add assert to sql_result_more_s() + + Should avoid a warning from static analyzer. + +M src/lib-sql/sql-api.c + +2017-07-19 12:03:58 +0300 Aki Tuomi (2f691d6dd) + + virtual: Stop watching notification on backend box close + + Fixes Panic: file mail-index.c: line 662 (mail_index_close_nonopened): + assertion failed: (index->views == NULL) + +M src/plugins/virtual/virtual-storage.c + +2017-07-18 21:04:47 +0300 Aki Tuomi (0d318fe07) + + virtual: Stop notifications only if they were started + + Fixes Panic: file mail-storage.c: line 1950: assertion failed: (box->opened) + +M src/plugins/virtual/virtual-storage.c +M src/plugins/virtual/virtual-storage.h + +2017-07-19 10:58:43 +0300 Timo Sirainen (4ca4d6e09) + + pop3-migration: Add unit test for checking that trailing tabs are stripped + + +M src/plugins/pop3-migration/test-pop3-migration-plugin.c + +2017-07-19 10:57:36 +0300 Timo Sirainen (b696d1d6d) + + lib-mail: message_header_hash() - add v4 that strips tabs + + This helps with Zimbra, which strips away trailing tabs in BODY[HEADER]. + +M src/lib-mail/message-header-hash.c +M src/lib-mail/message-header-hash.h +M src/lib-mail/test-message-header-hash.c + +2017-07-18 14:37:53 +0300 Aki Tuomi (eba201921) + + lib-index: Mark index deleted if index log file is missing + + This fixes all kinds of errors caused by mailbox being deleted by another + process. + +M src/lib-index/mail-index.c + +2017-07-18 14:42:23 +0300 Timo Sirainen (bb444f746) + + lib-index: Fix mail_index_get_modification_time() to work when index isn't + open. + + index->filepath may be NULL after a failed index open, and it's a bit unsafe + to trust that index->log->filepath isn't NULL either. So just build the + full path from elements that are definitely non-NULL. + + Also stat() only dovecot.index.log, because it's always supposed to exist. + If it doesn't, something's broken and stat()ing dovecot.index doesn't make + much sense. + + This commit removes mail_transaction_log_get_mtime(), which is no longer + needed. + + Fixes: Panic: file mail-index.c: line 931 + (mail_index_file_set_syscall_error): assertion failed: (filepath != NULL) + +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h +M src/lib-index/mail-transaction-log.c +M src/lib-index/mail-transaction-log.h + +2017-07-18 12:39:44 +0300 Timo Sirainen (e1c762cb4) + + lib-storage: Don't allow removing \Recent flags with mail_update_flags() + + Reverts an ancient commit 7deb24e7453249d09741641bff0f269f68165033. I don't + know why it was added in the first place. Normally \Recent flags are removed + during sync with MAIL_INDEX_SYNC_FLAG_DROP_RECENT. This should be enough, + especially since it's not even possible to remove a single \Recent flag - + only update the first_recent_uid. + + The code was also wrong: It was dropping \Recent flags even when + modify_type/flags combination didn't ask for it. Even if this was fixed, + there would still be race conditions with multiple processes since this + update is done without locking. + + Fixes: Error: Recent flags state corrupted for mailbox + +M src/lib-storage/index/index-mail.c + +2017-07-18 11:57:24 +0300 Timo Sirainen (e12a822e7) + + lib-storage: If mail_index_header.first_recent_uid shrinks, reset \Recent + flags + + This should never happen. + +M src/lib-storage/index/index-storage.h +M src/lib-storage/index/index-sync.c + +2017-07-17 18:10:49 +0300 Timo Sirainen (caf029d36) + + cassandra: Improve logging for multipage queries + + warn_timeout is applied to both individual page requests as well as the sum + of all the page requests. + +M src/lib-sql/driver-cassandra.c + +2017-07-17 17:54:07 +0300 Timo Sirainen (dd3d20d9b) + + cassandra: Add page_size setting to enable paged results for queries + + +M src/lib-sql/driver-cassandra.c + +2017-07-17 17:51:03 +0300 Timo Sirainen (a5f270722) + + cassandra: Add wrapper functions in preparation for following commits + + No functional changes. Shrinks the following commits. + +M src/lib-sql/driver-cassandra.c + +2017-07-17 17:54:36 +0300 Timo Sirainen (55bfcb67a) + + dict-sql: Add support for sql_result_more() + + +M src/lib-dict/dict-sql.c + +2017-07-17 14:22:35 +0300 Timo Sirainen (402f9bcf4) + + lib-sql: Add API support for asynchronously iterating over rows. + + sql_query() can already do an async lookup, but the full result needs to be + available immediately. This can be inefficient for large results. Add a new + SQL_RESULT_NEXT_MORE return value and sql_result_more() for asynchronously + requesting more results. + + This changes the API a bit, but isn't done by default by any drivers yet. + Also callers that can't handle this are hopefully checking for "ret < 0", + which allows them to handle such an async-more request as an error instead. + + sql_result_next_row() will be changed to return enum in a separate commit to + keep backwards compatibility in v2.2.x. + +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-mysql.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlite.c +M src/lib-sql/driver-test.c +M src/lib-sql/sql-api-private.h +M src/lib-sql/sql-api.c +M src/lib-sql/sql-api.h + +2017-07-17 14:05:45 +0300 Timo Sirainen (7b19478fa) + + imapc: Fix caching >= 32 kB mail bodies + + When closing the mail, only in-memory mail bodies were stored to cache. + +M src/lib-storage/index/imapc/imapc-mail.c + +2017-07-17 10:46:14 +0300 Aki Tuomi (e653e88f7) + + lib-index: Add missing colon to log text + + It's added elsewhere + +M src/lib-index/mail-transaction-log-file.c + +2017-07-14 17:00:21 +0300 Timo Sirainen (bdc81a44e) + + master: Change service "connections are being dropped" warning interval to 1 + second + + When this is happening, it's often accompanied with all kinds of other + errors and these warnings drown in them. Make them easier to notice by + reducing the interval from 60 seconds to 1 second. + +M src/master/service-monitor.c + +2017-07-13 16:20:53 +0300 Timo Sirainen (66a4847c6) + + lib-storage: mailbox_create_missing_dir() - Fix handling NULL mailbox + directory + + It would have caused stat(NULL), which would have failed. Broken by + 7071a02a8413fb409ade1625f6a1763c7493b66b + +M src/lib-storage/mail-storage.c + +2017-07-14 02:11:56 +0300 Timo Sirainen (97ffd8e0b) + + lib-storage: When index dir rmdir() fails with ENOTEMPTY, retry it for 1 + second + + This helps to avoid leaving those index directories lying around with NFS. + Hopefully within the 1 second any existing processes that have been keeping + those files open have finished their task. Especially IMAP IDLE will take + 0.5 seconds to start syncing indexes and realize that they're deleted. + +M src/lib-storage/list/mailbox-list-delete.c + +2017-07-14 01:54:31 +0300 Timo Sirainen (fe5799cb9) + + lib-index: If refreshing finds dovecot.index.log gone, assume the mailbox + was deleted + + Don't try to recreate the log file again. It can just cause further + problems. + + A way to reproduce this problem with NFS when INDEX dir is specified: + * create mailbox foo, select foo, IDLE + * delete mailbox foo + --> foo's index is recreated back by IDLEing process + +M src/lib-index/mail-transaction-log.c + +2017-07-13 03:15:36 +0300 Timo Sirainen (10207755f) + + quota: Fix negative storage-based quota_warnings to work with count backend + + Finishes f9362223346d10a5866b376ed227b77b26ea4292, which fixed it for + "messages" but not for "storage". + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-util.c +M src/plugins/quota/quota.c + +2017-07-13 02:56:33 +0300 Timo Sirainen (3e170cc66) + + quota: When setting auto_updating to transaction, skip invisible quota roots + + Skip the quota root also if the mailbox matches "ignore" quota_rule. This is + only an optimization fix so that unnecessary work isn't done for quota roots + that aren't actually used. + +M src/plugins/quota/quota.c + +2017-07-12 16:18:42 +0300 Timo Sirainen (7071a02a8) + + lib-storage: mailbox_create_missing_dir() - Handle mailbox delete race + condition + + Make sure the directory isn't created if the mail root directory no longer + exists. This might happen during mailbox deletion when another process is + opening the mailbox at the same time. + +M src/lib-storage/mail-storage.c + +2017-07-12 16:15:13 +0300 Timo Sirainen (17a951e76) + + lib-storage: Improve MAILBOX_LIST_PROP_AUTOCREATE_DIRS related comments + + +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-list.h + +2017-07-09 11:31:44 +0300 Timo Sirainen (9562831b8) + + lib-lda: Fix crash if syncing save destination mailbox fails + + +M src/lib-lda/mail-deliver.c + +2017-07-12 17:54:44 +0300 Timo Sirainen (df8b4fbe4) + + lib-index: Fix compiler warning with 32bit time_t + + +M src/lib-index/mail-transaction-log.c + +2017-07-11 15:35:16 +0300 Timo Sirainen (4394b73ca) + + lib-index: Track .log.2 rotation time in index header + + This avoids unnecessarily stat()ing the file. Also it's a bit better since + it's tracking the actual rotation time, not the mtime of what the + .log file happened to have at the time of rotation. + + The initial rotation timestamp is written only to the dovecot.index header + without going through dovecot.index.log. This works, because the + dovecot.index is written practically always after a log rotation. For the + rare cases when it doesn't happen, the dovecot.index.log.2 just gets deleted + later after the next log rotation. + +M src/doveadm/doveadm-dump-index.c +M src/lib-index/mail-index-map-hdr.c +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index-write.c +M src/lib-index/mail-index.h +M src/lib-index/mail-transaction-log.c + +2017-07-11 15:33:56 +0300 Timo Sirainen (fd71a4ab1) + + lib-index: Check .log.2 rotation only when syncing + + Instead of also whenever appending transactions to .log file. This shouldn't + change the behavior much, and it's needed for the following change to work + correctly. + +M src/lib-index/mail-transaction-log.c + +2017-07-11 15:32:33 +0300 Timo Sirainen (a13a14862) + + doveadm dump: Include "last temp file scan" in index header dump + + +M src/doveadm/doveadm-dump-index.c + +2017-07-11 14:31:10 +0300 Timo Sirainen (2219501dc) + + lib-index: Use nfs_safe_stat() to avoid having to handle stat() ESTALE error + + Slightly simplifies the code. + +M src/lib-index/mail-transaction-log.c + +2017-07-11 14:34:06 +0200 Stephan Bosch (6e62aa36a) + + lib-http: message parser: Allow duplicate date header if + HTTP_MESSAGE_PARSE_FLAG_STRICT is not set. + + The last instance of the date header is used. + +M src/lib-http/http-message-parser.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-response-parser.c + +2017-07-11 14:18:47 +0200 Stephan Bosch (7ebcb054e) + + lib-http: Restructured the header, message, request, and response parsers to + have an extensible and consistent API using flags. + + Extended the test suites with a few cases that test parsing with and without + the STRICT flag. + +M src/lib-http/http-client-connection.c +M src/lib-http/http-header-parser.c +M src/lib-http/http-header-parser.h +M src/lib-http/http-message-parser.c +M src/lib-http/http-message-parser.h +M src/lib-http/http-request-parser.c +M src/lib-http/http-request-parser.h +M src/lib-http/http-response-parser.c +M src/lib-http/http-response-parser.h +M src/lib-http/http-server-connection.c +M src/lib-http/http-transfer-chunked.c +M src/lib-http/test-http-header-parser.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-response-parser.c + +2017-07-11 14:14:47 +0300 Timo Sirainen (f368169ca) + + sdbox: Create missing mail directory on resync if index directory exists + + This problem should be visible only with ITERINDEX enabled. + +M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-storage.h + +2017-07-02 12:05:36 +0200 Stephan Bosch (19b42eb8a) + + lib: Created basic test suite for ostream-buffer. + + +M src/lib/Makefile.am +M src/lib/test-lib.inc +A src/lib/test-ostream-buffer.c + +2017-07-11 10:45:16 +0300 Aki Tuomi (c262d219f) + + lib-storage: Remove user namespaces on hook error + + If there is a hook error during namespaces added remove the namespaces from + user. This avoids attempts to use the namespaces later on without proper + initialization. + +M src/lib-storage/mail-namespace.c + +2017-07-11 10:26:38 +0300 Aki Tuomi (af084c8b2) + + lib-storage: Ensure list index is present + + Otherwise we end up with signal 11 crash later on. + +M src/lib-storage/list/mailbox-list-index.c + +2017-04-07 09:23:01 +0300 Timo Sirainen (ba4eb91d9) + + lib-ssl-iostream: Fix compiler warning + + ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS makes it unsigned, so it doesn't fit + into signed 32bit long. + +M src/lib-ssl-iostream/iostream-openssl-context.c + +2017-07-10 16:11:48 +0300 Timo Sirainen (d167a7d64) + + lib-storage: Fix mailbox_update() to always update mailbox list index. + + It previously was updating it only if the list index for the mailbox was + already fully up-to-date. But that doesn't really matter, because + mailbox_update() is supposed to be changing the values regardless. + + This fixes mailbox_update() to always work with LAYOUT=index. It also fixes + mailbox_update() for INBOX to update UIDVALIDITY/GUID. + +M src/lib-storage/list/mailbox-list-index-status.c + +2017-07-10 15:54:07 +0300 Timo Sirainen (15086e056) + + lib-storage: Don't use mailbox list index if it has refresh_flag set + + For example if INBOX is deleted, looking up its GUID shouldn't be returned + from the list index since it contains the old GUID. + +M src/lib-storage/list/mailbox-list-index-status.c + +2017-07-10 13:34:17 +0300 Timo Sirainen (70092709c) + + lib-storage: Track INBOX UIDVALIDITY and GUID in mailbox list index + + This allows existence checks and GUID lookups for INBOX to be done from the + index. + +M src/lib-storage/list/mailbox-list-index-status.c + +2017-07-06 19:00:35 +0300 Timo Sirainen (4fc372fac) + + lib-storage: Avoid index refresh with + mailbox_list_index_very_dirty_syncs=yes + + +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index-sync.h +M src/lib-storage/list/mailbox-list-index.c + +2017-07-06 17:48:19 +0300 Timo Sirainen (f9dcefcf7) + + lib-storage: Refresh mailbox list index if mailbox's existence differs from + index + + +M src/lib-storage/list/mailbox-list-index.c + +2017-07-06 17:45:02 +0300 Timo Sirainen (97d509bef) + + lib-storage: Set mailbox list index to be refreshed after changes, not + before + + Mailbox deletion and rename set the refresh-flag before the change was done. + This was unnecessary if the change didn't happen. Also there was a race + condition that another process could have done the refresh before the change + was even done. + +M src/lib-storage/list/mailbox-list-index.c + +2017-07-06 17:36:28 +0300 Timo Sirainen (4654cf737) + + lib-storage: Add mailbox_list_last_error_push/pop() + + These are similar to mail_storage_last_error_push/pop() + +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-07-10 14:37:04 +0300 Timo Sirainen (c29df09ed) + + lib-storage: Try to avoid opening mailbox list index on mailbox access + + Perform the STATUS (and other relevant) updates only if syncing or + transaction commits changed anything. This could be optimized further to + check even more strongly whether the seen changes could cause changes to the + list index, but it's probably not worth the effort. + +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index-storage.h + +2017-07-10 14:20:50 +0300 Timo Sirainen (e098ac1cd) + + lib-storage: Storage backend sync_init()s no longer need to check if mailbox + is open + + The previous change guarantees it. + +M src/lib-storage/index/cydir/cydir-sync.c +M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c +M src/lib-storage/index/dbox-multi/mdbox-sync.c +M src/lib-storage/index/dbox-single/sdbox-sync.c +M src/lib-storage/index/imapc/imapc-sync.c +M src/lib-storage/index/maildir/maildir-sync.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/index/raw/raw-sync.c + +2017-07-10 14:19:47 +0300 Timo Sirainen (4906f6520) + + lib-storage: mailbox_sync_init() - open mailbox immediately if it's not open + yet + + This simplifies the work for plugins that want to hook into + mailbox.sync_init() so they no longer have to handle the "mailbox isn't + opened" case. + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-07-10 13:56:49 +0300 Timo Sirainen (b596cac26) + + imap: Don't do autoexpunging when IMAP client is hibernated + + +M src/imap/imap-client-hibernate.c +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-05-02 14:01:16 +0300 Aki Tuomi (c69b62e5d) + + lib-fs: Add init function that can use fs string directly + + This avoids doing splitting the fs driver and args everywhere and ensures + that separators are consistent. + +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h + +2017-07-05 16:08:41 +0300 Josef 'Jeff' Sipek (cbe4d8212) + + lib: remove support for Boehm GC + + There were several issues with our usage of Boehm GC: + + - it didn't help with memory fragmentation + - it is not very efficient + - it was rarely enabled & used + + Proper use of a GC would involve radical changes to how we write code and + cause portability issues. We can get most of the benefits of a GC with data + stacks and alloc-only memory pools. + +M configure.ac +M doc/securecoding.txt +D m4/gc.m4 +M src/lib/data-stack.c +M src/lib/mempool-alloconly.c +M src/lib/mempool-system.c + +2017-07-06 12:40:33 +0300 Aki Tuomi (781a93379) + + virtual: If virtual_uid is not assigned skip it + + We cannot lookup mails with uid 0, so if we see that mail has virtual uid 0, + do not attempt to look it up from index, but skip it. + + Fixes Panic: file mail-index-map.c: line 549 + (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0) + +M src/plugins/virtual/virtual-sync.c + +2017-07-05 15:20:32 +0300 Aki Tuomi (15a2661c2) + + virtual: Append virtual mailbox name to open reason on box alloc + + +M src/plugins/virtual/virtual-storage.c + +2017-07-05 15:20:18 +0300 Aki Tuomi (a08e96bb7) + + virtual: Append virtual mailbox information to get stream reason + + +M src/plugins/virtual/virtual-mail.c + +2017-07-05 14:24:49 +0300 Aki Tuomi (fc80e0a7e) + + virtual: Expunge virtual mails if backend box is deleted + + When mail is added to a mailbox and then deleted, expunge the sequences from + virtual index in sync. + + Fixes Error: Unexpectedly lost Mailbox ID 4 + +M src/plugins/virtual/virtual-sync.c + +2017-07-03 13:53:49 +0300 Aki Tuomi (59a236b2e) + + virtual: Do not mark broken folder as initialized + + Otherwise it won't get repaired + +M src/plugins/virtual/virtual-sync.c + +2017-07-03 13:53:31 +0300 Aki Tuomi (4299aef7c) + + virtual: Fix highest_mailbox_id if it's wrong + + +M src/plugins/virtual/virtual-sync.c + +2017-07-03 13:25:35 +0300 Aki Tuomi (7fa9d523d) + + virtual: Force header rewrite if header not found or crc32 changed + + Otherwise the header gets only partially written + +M src/plugins/virtual/virtual-sync.c + +2017-06-29 13:22:32 +0300 Aki Tuomi (f4b086930) + + lib-storage: Clarify keywords handling in mail_save_finish + + +M src/lib-storage/mail-storage.c + +2017-06-28 13:45:19 +0300 Aki Tuomi (c9c4494be) + + virtual: Fix keywords handling + + Keywords are per-mail object, and should be treated as one. The old code + left pointer to keywords dandling which lead into double-free. Now the + ctx->data is treated in similar way as other backends. + + Fixes Panic: file mail-index.c: line 417 (mail_index_keywords_unref): + assertion failed: (keywords->refcount > 0) Fixes Panic: file mail-storage.c: + line 2311 (mailbox_save_context_reset): assertion failed: (!ctx->unfinished) + +M src/plugins/virtual/virtual-save.c + +2017-06-27 14:19:16 +0300 Aki Tuomi (cff36c02d) + + virtual: Fix recent flag updates + + View must be updated before looking up seqs + +M src/plugins/virtual/virtual-sync.c + +2017-06-29 13:46:06 +0300 Aki Tuomi (c5f46e7c1) + + virtual: Call mailbox_save_context_deinit before freeing context + + Otherwise dest_mail does not get free'd + +M src/plugins/virtual/virtual-save.c + +2017-06-27 12:51:51 +0300 Aki Tuomi (43dfd44ec) + + virtual: Use mailbox_notify_list API when mailbox_list_index is enabled + + +M src/plugins/virtual/virtual-storage.c +M src/plugins/virtual/virtual-storage.h + +2017-06-27 10:54:08 +0300 Aki Tuomi (825b0e819) + + virtual: Generate GUID for virtual folder + + GUID is generated when index is first created or the rules change. + +M src/plugins/virtual/virtual-storage.c +M src/plugins/virtual/virtual-storage.h +M src/plugins/virtual/virtual-sync.c + +2017-06-27 12:42:27 +0300 Aki Tuomi (ffe330e26) + + lib-storage: Add type checking for mailbox_list_notify_wait + + +M src/imap/imap-notify.c +M src/lib-storage/mailbox-list-notify.c +M src/lib-storage/mailbox-list-notify.h + +2017-07-06 15:51:17 +0300 Sergey Kitov (bad08efc4) + + lmtp: client_input_data_write_local() refactored + + loops in client_input_data_write_local() and in client_deliver_next() are + merged as they are essentially the same loop, client_deliver_next() renamed + to client_deliver_to_rcpts(). + +M src/lmtp/commands.c + +2017-07-06 15:45:24 +0300 Sergey Kitov (2092da86f) + + lmtp: Fix for wrong session id of mail user when saving mail, quota checking + on + + When quota is checked mail user is allocated with custom ":quota" session id + suffix without incrementing service user session id counter + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lmtp/commands.c + +2017-07-06 14:45:26 +0300 Aki Tuomi (8e95a2092) + + lib-storage: Use ST_CHANGED in mailbox-watch + + Allows notifying sub-second changes. + +M src/lib-storage/mailbox-watch.c + +2017-07-06 14:44:40 +0300 Aki Tuomi (3aff91a19) + + lib, lib-storage: Move INOTIFY_ST_CHANGED to ST_CHANGED in lib + + Allows reusing this elsewhere + +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib/macros.h + +2017-07-06 13:24:31 +0300 Timo Sirainen (2eeca70fd) + + lib: file_create_locked() - Treat mkdir() EEXIST error as success + + This can happen in race conditions when multiple processes are mkdir()ing + the same directory. It shouldn't result in failure. + +M src/lib/file-create-locked.c + +2017-07-06 11:24:35 +0300 Timo Sirainen (d5282594e) + + virtual: Avoid assert-crash if backend mailbox's have_guid lookup fails + + The MAIL_ERROR_NOTFOUND can happen if the mailbox was already deleted. Other + errors aren't expected to happen and possibly point to a bug. + + Fixes: Panic: file mail-storage.c: line 1831: unreached + +M src/plugins/virtual/virtual-storage.c + +2017-07-05 14:38:19 +0300 Martti Rannanjärvi (8f75c2954) + + doveadm: Fix a typo in doveadm-print-flow function name + + doveadm_print_flow_print_heder() -> doveadm_print_flow_print_header() + +M src/doveadm/doveadm-print-flow.c + +2017-07-04 14:22:19 +0300 Aki Tuomi (f97dcee67) + + notify-status: Add notify-status plugin + + This enables updating a dictionary with mailbox status information when the + mailbox changes. + + It requires notify_status_dict setting for specifying the dict where the + data is stored. + + One can optionally use notify_status_mailbox patterns for specifying which + box(es) the status update is done. Subsequent patterns are + notify_status_mailbox2 and so forth. + + One can also specify data format using notify_status_value plugin setting. + +M configure.ac +M src/plugins/Makefile.am +A src/plugins/notify-status/Makefile.am +A src/plugins/notify-status/notify-status-plugin.c + +2017-03-28 00:03:04 +0200 Stephan Bosch (38af46387) + + lib-http: server: Implemented API for handling the incoming request payload + in the background. + + It allows forwarding the incoming payload to an output stream (e.g. + iostream-temp) or to a buffer. The maximum size of the payload is + configurable. The client will get a 413 error if the maximum is exceeded. + +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-private.h +M src/lib-http/http-server-request.c +M src/lib-http/http-server.h +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-server-errors.c + +2017-06-17 15:51:09 +0200 Stephan Bosch (dc05b1fb4) + + lib-http: server: Explicitly record the number of references held for a + request by the application from within the callback. + + +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-private.h + +2017-03-29 00:17:50 +0200 Stephan Bosch (49c232ae0) + + lib-http: server: Allow holding only a reference to the request payload + stream, rather than the request itself. + + This mimics the http-client behavior in this case. It makes the + implementation of the background payload handling API in subsequent commits + a little simpler. + +M src/lib-http/http-server-connection.c +M src/lib-http/http-server.h + +2017-03-27 20:44:37 +0200 Stephan Bosch (9ec9b6f85) + + lib-http: server: Changed http_server_request_is_complete() from an inline + to a normal function. + + +M src/lib-http/http-server-private.h +M src/lib-http/http-server-request.c + +2017-03-27 20:34:21 +0200 Stephan Bosch (5560e4cd4) + + lib-http: server: Restructured http-server-private.h. + + +M src/lib-http/http-server-private.h + +2017-03-27 20:18:18 +0200 Stephan Bosch (bc8908662) + + lib-http: server: Improved documentation in http-server.h. + + +M src/lib-http/http-server.h + +2017-03-27 19:50:31 +0200 Stephan Bosch (debbc09b5) + + lib-http: server: Restructured http-server.h. + + +M src/lib-http/http-server.h + +2017-07-03 22:06:21 +0200 Thomas Reifferscheid (7785296a7) + + dsync: fix splitting login from host + + Using strchr() was splitting login and host at the first occurrence of '@' + which leads to troublesome behaviour. When calling strace one would notice + the misbehaviour: + + execve("/usr/sbin/ssh", ["ssh", "-lthomas", "domain.org@10.8.13.2" + + using strrch() however splits login and host at the last occurrence of '@'. + + Signed-off-by: Thomas Reifferscheid + +M src/doveadm/doveadm-dsync.c + +2017-07-03 18:40:47 +0300 Aki Tuomi (7dd64d2fa) + + quota-status: Support recipient_delimiter + + +M src/plugins/quota/Makefile.am +A src/plugins/quota/quota-status-settings.c +A src/plugins/quota/quota-status-settings.h +M src/plugins/quota/quota-status.c + +2017-07-03 18:31:56 +0300 Aki Tuomi (9f0429766) + + quota-status: Use pooled memory for globals + + +M src/plugins/quota/quota-status.c + +2017-07-03 18:27:53 +0300 Aki Tuomi (133a609ac) + + lmtp: Use message_detail_address_parse + + +M src/lmtp/commands.c + +2017-07-03 19:00:14 +0300 Aki Tuomi (f0eef2301) + + lib-mail: Add unit test for message detail address parser + + +M src/lib-mail/test-message-address.c + +2017-07-03 18:18:36 +0300 Aki Tuomi (145e47d97) + + lib-mail: Add message_detail_address_parse + + Parses e.g. username+foo@domain into username@domain with detail foo, when + delimiter is set to + + +M src/lib-mail/message-address.c +M src/lib-mail/message-address.h + +2017-07-03 21:08:02 +0300 Timo Sirainen (e1777cb59) + + imapc: Prefech - Initialize cached stream only if needed + + If the mail is immediately accessed for other purposes (e.g. fetching + message flags), there's no need to go through all the trouble of + initializing the mail stream. + +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-mail.h + +2017-06-30 13:46:22 +0300 Timo Sirainen (3aa1816a6) + + lib-storage: Fix ITERINDEX to leave \NoSelect parents after deleting child + mailbox + + For example if "a/b" was created and deleted, "a" should be left behind. + (Or at least it shouldn't have left "a" to mail root directory and kept it + invisible since it didn't exist in index dir.) + +M src/lib-storage/list/mailbox-list-delete.c + +2017-06-26 19:06:26 +0300 Timo Sirainen (265ca0892) + + dbox: Check mailbox existence from index directory with ITERINDEX + + +M src/lib-storage/index/dbox-common/dbox-storage.c + +2017-06-28 19:46:01 +0300 Timo Sirainen (7b1578879) + + dbox: Use mail_index_header.last_temp_file_scan instead of directory's atime + + This will be required for the following ITERINDEX change. + +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/index/dbox-common/dbox-storage.h +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-storage.c + +2017-06-28 19:41:21 +0300 Timo Sirainen (2ecee6ed2) + + lib-index, lib-storage: Add mail_index_header.last_temp_file_scan + + Also add index_mailbox_update_last_temp_file_scan() for easily updating it. + + This is reusing an old "sync timestamp" field. Because it was a timestamp, + it doesn't matter if the old data still exists in it. This field could have + been added as an extension, but that's more work and this feature is generic + enough that it should be useful for many of the mail storage backends. + +M src/lib-index/mail-index-map-hdr.c +M src/lib-index/mail-index.h +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-storage.h + +2017-06-26 18:59:17 +0300 Timo Sirainen (c5e2aa314) + + dbox: Cleanup - reorganize old temp file cleanup code + + No functional changes. In preparation for the next commits. + +M src/lib-storage/index/dbox-common/dbox-storage.c + +2017-06-26 19:30:11 +0300 Timo Sirainen (a62e12ba4) + + lib-storage: Check for storage existence from index dir with ITERINDEX + + The root path creation doesn't really even seem to be necessary, because any + mailbox access will automatically mkdir the missing directories anyway. + Although writing other files might not work so well, such as + mail_attribute_dict that points inside the mail directory. + + This change simply changes the mailboxes/ directory to be looked up from + index directory instead of the mail root directory. It also mkdirs the + index/mailboxes/ directory afterwards if it didn't exist. So practically + this change shouldn't break anything, since the mailboxes/ directory should + always exist for both root and the indexes. + +M src/lib-storage/mail-storage.c + +2017-06-26 18:50:24 +0300 Timo Sirainen (4fce6ce68) + + lib-storage: mailbox_list_get_permissions() - Use index dir with ITERINDEX + + +M src/lib-storage/mailbox-list.c + +2017-06-26 18:46:30 +0300 Timo Sirainen (6763c5f62) + + lib-storage: mailbox_list_get_permissions() - Use index dir for storage + without mails + + The index dir might still exist. + +M src/lib-storage/mailbox-list.c + +2017-06-26 18:41:27 +0300 Timo Sirainen (4225ae95d) + + lib-storage: Cleanup - move code to mailbox_list_get_permissions_stat() + + Comments changed also a bit, but no functional changes. + +M src/lib-storage/mailbox-list.c + +2017-06-26 18:23:01 +0300 Timo Sirainen (2f552aa8f) + + lib-storage: Cleanup - Use mailbox_permissions_copy() instead of duplicating + it + + +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-list.c + +2017-06-26 18:19:17 +0300 Timo Sirainen (5069b6adc) + + lib-storage: Add mailbox_permissions_copy() + + +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c + +2017-06-26 20:10:17 +0300 Timo Sirainen (1728ff34e) + + lib-storage: Add mail_location=..:ITERINDEX + + This changes mailbox list iteration to work using INDEX directory instead of + the normal mail directory. This can be helpful when the indexes are stored + on a faster storage. + +M src/lib-storage/index/index-storage.c +M src/lib-storage/list/mailbox-list-fs-flags.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/list/mailbox-list-maildir-iter.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-06-30 17:51:34 +0300 Timo Sirainen (8b2d740b8) + + imap: Add more error checking to NOTIFY parameter parsing + + This should make it clearer to realize when invalid syntax is being used + rather than just ignoring the problem. + +M src/imap/cmd-notify.c + +2017-06-30 17:33:15 +0300 Timo Sirainen (bcb321bc6) + + imap: Fix NOTIFY parameter parsing by reverting earlier change + + I misread the RFC and wrote broken tests. Reverts + 64d2efdc4b0bdf92249840e9db89b91c8dc0f3a3 + +M src/imap/cmd-notify.c + +2017-06-30 15:02:40 +0300 Timo Sirainen (7d2d0ae11) + + lib-storage: Add BROKENCHAR to mail_location + + This makes the mailbox_list_settings.broken_char configurable. Mainly useful + with imapc when remote server doesn't contain valid mUTF-7 mailbox names. + +M src/lib-storage/mailbox-list.c + +2017-06-30 13:56:54 +0300 Timo Sirainen (0784c6f49) + + lib-storage: Fix mailbox delete to not delete childrens' INDEX or CONTROL + dirs + + If mail_location had separate INDEX and/or CONTROL set, deleting a mailbox + with children caused the childrens' index and/or control directories to be + deleted (but the mail/ALT directories weren't). + + I'm not sure why the _FLAG_MAILBOX_FILES was treated as a special case + earlier. It shouldn't make a difference. + +M src/lib-storage/list/mailbox-list-delete.c + +2017-06-27 15:39:12 +0300 Timo Sirainen (d851acd16) + + lib-storage: mailbox_list_delete_mailbox_nonrecursive() - Fix error handling + + It should return error on unexpected readdir(), closedir() and unlink() + failures. Also fix handling a race condition with another process deleting + the mailbox at the same time. + +M src/lib-storage/list/mailbox-list-delete.c + +2017-06-27 16:56:08 +0300 Timo Sirainen (e83bc6137) + + lib-storage: mailbox_list_delete_trash() - Don't ignore errors + + +M src/lib-storage/list/mailbox-list-delete.c + +2017-06-27 16:37:16 +0300 Timo Sirainen (3fb442057) + + lib-storage: Use mailbox_list_delete_finish_ret() for fs & maildir++ layout + + Fixes a problem where e.g. index directory existed but mail root didn't, and + the mailbox couldn't be fully deleted. This was especially a problem with + ITERINDEX enabled. + +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/list/mailbox-list-maildir.c + +2017-06-27 16:36:56 +0300 Timo Sirainen (12bd6ddfe) + + lib-storage: Add mailbox_list_delete_finish_ret() + + This simplifies deletion logic for mailbox list backends. + +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-delete.h + +2017-06-27 16:13:34 +0300 Timo Sirainen (a1bef9db6) + + lib-storage: mailbox_list_delete_finish() - Return whether anything was + deleted + + +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-delete.h + +2017-06-27 16:16:21 +0300 Timo Sirainen (3e0b3ae57) + + lib-storage: Add mailbox_list_get_last_mail_error() + + +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-06-27 15:57:10 +0300 Timo Sirainen (0877bd89b) + + lib-storage: Add comments to mailbox-list-delete.h + + +M src/lib-storage/list/mailbox-list-delete.h + +2017-06-28 23:37:22 +0300 Timo Sirainen (739bebfce) + + lib: Fix file_create_locked() unit test to delete temp file afterwards + + Also removed a path string that was never used. + +M src/lib/test-file-create-locked.c + +2017-06-22 01:28:57 +0300 Timo Sirainen (fd8b93ca5) + + lib-storage: Add VOLATILEDIR setting to mail_location + + This is useful for creating temporary locks that could exist in tmpfs. + Currently this is used for .vsize.lock and dovecot.autoexpunge.lock. + +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-user.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-06-22 02:44:12 +0300 Timo Sirainen (55cec51db) + + lib-storage: Move autoexpunge lock creation to a generic + mail_user_lock_file_create() + + +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h + +2017-06-22 02:33:03 +0300 Timo Sirainen (762d6549b) + + lib-storage: mailbox_autoexpunge_lock() - Don't hide ENOENT error + + It means that the user's home directory doesn't exist, which is pretty + unexpected. Home directory is supposed to be created when the storage is + initialized. + +M src/lib-storage/mail-autoexpunge.c + +2017-06-22 02:32:10 +0300 Timo Sirainen (67c05b671) + + lib-storage: mailbox_autoexpunge_lock() - small cleanup + + No functional changes - just reorganizing code and adding comments. + +M src/lib-storage/mail-autoexpunge.c + +2017-06-22 02:24:08 +0300 Timo Sirainen (34f53904b) + + lib-storage: Use file_lock_set_*_on_free() for dovecot.autoexpunge.lock + + +M src/lib-storage/mail-autoexpunge.c + +2017-06-22 02:19:18 +0300 Timo Sirainen (bd94a2a86) + + lib-storage: Move .vsize.lock creation to a generic + mailbox_lock_file_create() + + +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-06-22 02:07:16 +0300 Timo Sirainen (2864ce815) + + lib-storage: Move .vsize.lock creation to its own function + + +M src/lib-storage/index/index-mailbox-size.c + +2017-06-22 02:05:16 +0300 Timo Sirainen (181e90a1e) + + lib-storage: Use file_lock_set_*_on_free() for .vsize.lock + + This avoids storing the lock_path and lock_fd separately. + +M src/lib-storage/index/index-mailbox-size.c + +2017-06-22 01:56:18 +0300 Timo Sirainen (99e9dc500) + + lib-storage: Fix error logging for failing to create .vsize.lock + + +M src/lib-storage/index/index-mailbox-size.c + +2017-06-28 17:48:01 +0300 Timo Sirainen (d6e3deea8) + + lib: file_create_locked() - Add settings to mkdir() missing parent + directories + + +M src/lib/file-create-locked.c +M src/lib/file-create-locked.h +M src/lib/test-file-create-locked.c + +2017-06-28 17:40:20 +0300 Timo Sirainen (9a1897228) + + lib: Add unit test for file_create_locked() + + +M src/lib/Makefile.am +A src/lib/test-file-create-locked.c +M src/lib/test-lib.inc + +2017-06-22 01:52:29 +0300 Timo Sirainen (65f9a90ef) + + lib: Add file_lock_set_close_on_free() + + +M src/lib/file-lock.c +M src/lib/file-lock.h + +2017-06-22 01:47:51 +0300 Timo Sirainen (68332e3a4) + + lib: Add file_lock_set_unlink_on_free() + + +M src/lib/file-lock.c +M src/lib/file-lock.h + +2017-06-22 10:35:16 +0300 Timo Sirainen (2605b390b) + + lib: file_create_locked() - update lock path after link() + + +M src/lib/file-create-locked.c + +2017-06-22 09:05:06 +0300 Timo Sirainen (d8d93ecd8) + + lib: Add file_lock_set_path() + + +M src/lib/file-lock.c +M src/lib/file-lock.h + +2017-06-22 01:42:56 +0300 Timo Sirainen (f1243d775) + + lib: Add file_lock_get_path() + + This allows getting the file path from the lock without having to preserve + it separately. + +M src/lib/file-lock.c +M src/lib/file-lock.h + +2017-06-26 19:19:44 +0300 Timo Sirainen (27d0b2cd1) + + lib-storage: Fail at startup if root mail directory isn't a directory + + +M src/lib-storage/mail-storage.c + +2017-04-07 15:36:58 +0200 Stephan Bosch (22cb9dbe0) + + lib-ssl-iostream: Fixed deinitialization of openssl library. + + Previously, it also dereferenced the library when it was never initialized + in the first place. + +M src/lib-ssl-iostream/iostream-openssl-context.c + +2017-05-22 17:41:54 +0200 Stephan Bosch (1c85a443b) + + lib-program-client: Fixed unix socket test suite's test server to properly + read input from client. + + It did not read all available input in the input handler. + +M src/lib-program-client/test-program-client-unix.c + +2017-06-26 19:44:43 +0300 Timo Sirainen (dc24b972f) + + lib-storage: Don't autocreate mailbox during deletion. + + Trying to delete a nonexistent autocreated mailbox first created it and then + immediately deleted it. + +M src/lib-storage/index/index-storage.c +M src/lib-storage/mail-storage.c + +2017-06-27 14:22:50 +0300 Timo Sirainen (b0f08544a) + + lib-storage: Make mailbox_is_autocreated() public + + This also removes duplicated code from acl plugin. + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/plugins/acl/acl-mailbox.c + +2017-06-27 16:55:34 +0300 Timo Sirainen (50bf6cfe2) + + sdbox: Don't create index directory when trying to open nonexistent + mailboxes + + +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/index/dbox-common/dbox-storage.h +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-storage.c + +2017-06-28 15:50:11 +0300 Timo Sirainen (29fc8f1dc) + + pop3-migration: Drop lines with only spaces or tabs from comparison + + Zimbra drops out those lines from IMAP BODY[HEADER] replies. + +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c + +2017-01-20 01:10:04 +0100 Stephan Bosch (d4f77de19) + + lib-http: client: Drop peer immediately if it has no more linked queues and + it is not connected and not waiting for a backoff timeout. + + It is currently unlikely to happen at this point, but it is better to make + sure it is handled appropriately. The pending shared HTTP client changes + will make this a likely event. This surfaced as a problem for the HTTP + proxy. + +M src/lib-http/http-client-peer.c + +2017-06-25 09:10:52 +0300 Timo Sirainen (d7c917c4b) + + lib-storage: mail_add_temp_wanted_fields() - delay opening stream + + Allows plugins to call it in mail.get_stream() without infinite loop. + +M src/lib-storage/index/index-mail.c + +2017-06-23 16:45:24 +0200 Stephan Bosch (b5ab29780) + + global: Fixed missing or out-of-date copyright notices. + + +M src/auth/test-main.c +M src/auth/test-mock.c +M src/lib-dict/test-dict-sql.c +M src/lib-sql/driver-test.c +M src/lib/fd-set-nonblock.c +M src/lib/net.c +M src/lib/test-path-util.c +M src/plugins/var-expand-crypt/test-var-expand-crypt.c +M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + +2017-06-23 11:15:32 +0300 Timo Sirainen (f3c24c2c9) + + dsync: Use header hashing version 3 + + +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-ibc.h +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-export.h +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-import.h + +2017-06-23 11:02:24 +0300 Timo Sirainen (e17e53f2a) + + pop3-migration: Replace trailing whitespace removal with new header hashing + version + + This is now done by message_header_hash(), which makes it work correctly + also for dsync+imapc. + + Reverts 0cf3b30b86e6c39f43b8e13a718cd078187ca86d, except for the unit tests. + +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c + +2017-06-23 11:00:37 +0300 Timo Sirainen (ea03e1762) + + lib-mail: message_header_hash_more() - add v3 that strips spaces + + This helps with Zimbra, which strips away trailing whitespaces in + BODY[HEADER]. + +M src/lib-mail/message-header-hash.c +M src/lib-mail/message-header-hash.h +M src/lib-mail/test-message-header-hash.c + +2017-06-23 09:24:40 +0300 Timo Sirainen (14458ea84) + + lib-mail: test-message-header-hash - add more tests + + +M src/lib-mail/test-message-header-hash.c + +2017-06-23 09:14:40 +0300 Timo Sirainen (afad849b4) + + lib-mail: message_header_hash_more() - refactor to use switch() + + +M src/lib-mail/message-header-hash.c + +2017-06-22 11:43:05 +0300 Timo Sirainen (fde14422c) + + quota: Fix failing again if quota setting has invalid parameters + + This was broken by the recent quota parameter parsing changes. + +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota.c + +2017-06-22 01:12:56 +0300 Timo Sirainen (65d4c71ad) + + acl: Don't read/write dovecot-acl-list with acl_globals_only=yes + + It's only an optimization for the dovecot-acl files, which don't exist with + acl_globals_only=yes + +M src/plugins/acl/acl-backend-vfile-acllist.c + +2017-06-21 16:54:25 +0300 Timo Sirainen (0913e6eb7) + + lib/bits.c: Finish fix for compiling with gcc 3.0 .. 3.3 + + +M src/lib/bits.c + +2017-06-21 16:14:14 +0300 Timo Sirainen (33c05298a) + + lib/bits.h: Fix compiling with gcc 3.0 .. 3.3 + + According to gcc's online manuals, 3.4 is the first version with + __builtin_clzll + +M src/lib/bits.h + +2017-06-21 13:10:19 +0300 Timo Sirainen (05d12810e) + + fs-randomfail: Set errno=EIO when random failure is triggered + + Previously the errno wasn't set at all. It was especially bad if it happened + to be EAGAIN, because that potentially caused hangs. + +M src/lib-fs/fs-randomfail.c + +2017-06-20 12:11:37 +0300 Sergey Kitov (44c6d46ce) + + lib-imap: imap_append_nstring_nolf() - fix crash with datastack_pool strings + + T_BEGIN .. T_END is not used, when string_t is allocated from datastack + pool, unit test updated to verify the fix. + +M src/lib-imap/imap-quote.c +M src/lib-imap/test-imap-quote.c + +2017-06-19 23:38:35 +0300 Timo Sirainen (95c8d28eb) + + acl: Fix reading acl_globals_only setting + + It was being read in wrong place, so it may not have been read at all. + +M src/plugins/acl/acl-backend.c + +2017-06-19 12:05:30 +0300 Timo Sirainen (8a513c80e) + + director: Fix logging last input/output time when there was no input/output + + +M src/director/director-connection.c + +2017-06-19 12:03:13 +0300 Timo Sirainen (00367aee8) + + director: Fix whitespace position in some log messages + + +M src/director/director-connection.c + +2017-06-19 11:30:27 +0300 Timo Sirainen (5714c480b) + + acl: Add acl_globals_only setting + + The local dovecot-acl files aren't even attempted to be looked up if this is + set. This is mainly useful to avoid unnecessary stat()s to dovecot-acl files + that never exist. + +M src/plugins/acl/acl-api-private.h +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/acl/acl-backend.c + +2017-06-17 14:39:59 +0300 Timo Sirainen (5052aa061) + + imap: NOTIFY - Fix potential crash when reading invalid parameters + + +M src/imap/cmd-notify.c + +2017-06-17 14:38:22 +0300 Timo Sirainen (64d2efdc4) + + imap: Fix NOTIFY to parse more than just the first event-group + + +M src/imap/cmd-notify.c + +2017-06-19 00:01:17 +0300 Timo Sirainen (906a65113) + + imap: NOTIFY - Cleanup notify watch timeout handling + + It's not useful to set the timeout until all the commands are finished. + +M src/imap/imap-notify.c + +2017-06-18 11:14:05 +0300 Timo Sirainen (0081ed0d9) + + imap: NOTIFY - Fix crash due to not hooking into commands correctly + + The pre/post hooks aren't always called immediately when commands are + created. They're called only after the command input is being read. Call + notify hooks explicitly now immediately when commands are allocated. + + Fixes a panic with for example: + + a notify set (selected (Messagenew (uid flags) MessageExpunge FlagChange) + personal (MessageNew MessageExpunge FlagChange)) b select inbox c store 1 + +flags \deleted d expunge e append inbox {10} + + Which crashed with: Panic: file imap-notify.c: line 397 + (imap_notify_callback): assertion failed: (client->command_queue_size == 0) + +M src/imap/imap-client.c +M src/imap/imap-notify.c +M src/imap/imap-notify.h + +2017-06-18 11:19:28 +0300 Timo Sirainen (4693a5811) + + imap: NOTIFY - Fix delayed setting notification callback + + This was done in command-post hook, but then when command was soon freed the + callback was immediately added. + +M src/imap/imap-notify.c + +2017-06-18 13:07:14 +0300 Timo Sirainen (77124c580) + + fts: Log when indexing requires adding more mails to index than requested + + This should mainly happen when FTS indexing is requested for a virtual + mailbox. + +M src/plugins/fts/fts-storage.c + +2017-06-18 12:18:31 +0300 Timo Sirainen (1c197c242) + + indexer-worker: Log first and last UID of which mails were indexed + + +M src/indexer/master-connection.c + +2017-06-18 13:04:43 +0300 Timo Sirainen (14eac90de) + + indexer-worker: Log number of indexing attempts in transaction commit + failure + + This could be interesting if the number is large. + +M src/indexer/master-connection.c + +2017-06-18 13:00:57 +0300 Timo Sirainen (e4065b371) + + indexer-worker: Log "Indexed .. messages" even if mailbox_search fails + + The transaction is still being committed. + +M src/indexer/master-connection.c + +2017-06-15 09:18:03 +0200 Stephan Bosch (176fd2cdb) + + lib: Fix ostream-buffer to return buffer contents size in + o_stream_get_buffer_used_size(). + + This is necessary for querying o_stream_get_buffer_avail_size() with respect + to a limit set earlier using o_stream_set_max_buffer_size(). This is mainly + useful for test suites. + +M src/lib/ostream-buffer.c + +2017-06-16 14:34:24 +0300 Timo Sirainen (b84eff65e) + + *-login: Add client_vfuncs.free() that is called when client refcount=0 + + This can be useful for plugins that want to run something after proxying + ends. + + Use an empty default function so plugins can call super.free() without + having to check if it's NULL. + +M src/imap-login/imap-login-client.c +M src/imap-urlauth/imap-urlauth-login.c +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/pop3-login/client.c + +2017-06-15 12:46:47 +0300 Timo Sirainen (8ed26469c) + + imap-login: Fix storing ID NIL values into client_id + + +M src/imap-login/imap-login-client.c + +2017-06-14 10:44:36 +0300 Sergey Kitov (777019a07) + + lib-imap: imap_bodystructure_write is changed to skip CRs and LFs. + + +M src/lib-imap/imap-bodystructure.c + +2017-06-14 10:44:01 +0300 Sergey Kitov (0b9eda80c) + + lib-imap: imap_write_envelope changed to skip CRs and LFs. + + +M src/lib-imap/imap-envelope.c + +2017-06-14 10:41:04 +0300 Sergey Kitov (be0c9927c) + + lib-imap: added imap_append_nstring_nolf(), which skips CRs and LFs. + + +M src/lib-imap/imap-quote.c +M src/lib-imap/imap-quote.h +M src/lib-imap/test-imap-quote.c + +2017-06-13 10:05:23 +0300 Sergey Kitov (af37e0125) + + lib-imap: escaping and quote/literal tests for imap_append_nstring() + + +M src/lib-imap/test-imap-quote.c + +2017-06-13 00:57:08 +0300 Timo Sirainen (fe080d248) + + imapc: Fix prefetching specific headers + + FETCH BODY[HEADER.FIELDS ...] shouldn't be used if imapc_features doesn't + include fetch-headers. Also neither this nor BODY[HEADER] should be sent if + we already have header/body stream. + +M src/lib-storage/index/imapc/imapc-mail-fetch.c + +2017-06-13 00:55:36 +0300 Timo Sirainen (25fecf139) + + imapc: Avoid sending FETCH BODY[HEADER] when BODY[] is already being fetched + + This probably only shows up in some special situations with plugins. + +M src/lib-storage/index/imapc/imapc-mail-fetch.c + +2017-06-13 17:18:17 +0300 Timo Sirainen (0dc3c49bc) + + lib-master: anvil_client_query() delay calling callback on failures + + This fixes crash in lmtp on anvil connect failure where the callback wasn't + expecting to be called so early. + +M src/lib-master/anvil-client.c + +2017-06-14 11:47:00 +0300 Timo Sirainen (9f6686c87) + + imap-login: Remove duplicate spaces between ID x-forward parameters + + +M src/imap-login/imap-proxy.c + +2017-06-14 10:50:38 +0300 Timo Sirainen (fa7d40263) + + imap-login: Fix crash in ID if trusted client sends NIL value to internal + field + + Fixes: Panic: imap-login: file imap-login-client.c: line 215 + (cmd_id_handle_keyvalue): assertion failed: (client_id_str == + !client_id_reserved_word(key)) + +M src/imap-login/imap-login-client.c + +2017-06-13 21:00:23 +0300 Timo Sirainen (df74814b1) + + dsync: Fix panic if syncing fails during attribute iteration + + Fixes: Panic: file dict.c: line 104 (dict_deinit): assertion failed: + (dict->iter_count == 0) + +M src/doveadm/dsync/dsync-mailbox-export.c + +2017-06-13 22:14:11 +0300 Timo Sirainen (3da982573) + + lib-index: Fix cache lookups from uncommitted transactions with in-memory + indexes + + This especially fixes mail_get_header_stream() with imapc and + imapc_features=fetch-headers, because it works by first fetching the + specific headers and putting them to the cache transaction, then later on + relying on index_mail_get_header_stream() to get them from the transaction. + Before this fix they wouldn't be found, which triggered another unnecessary + FETCH BODY.PEEK[HEADER]. + +M src/lib-index/mail-cache-transaction.c + +2017-06-13 21:54:00 +0300 Timo Sirainen (5695ec03a) + + lib-mail: istream-header-filter - Fix HEADER_FILTER_ADD_MISSING_EOH with + empty input + + The result for "" should be "\n", not "\n\n". The second "\n" would belong + to the mail body. + + This fixes calculating hashes for incremental dsync when mail didn't have + Date or Message-ID headers, resulting in e.g.: + + Warning: Deleting mailbox 'INBOX': UID=1 already exists locally for a + different mail: Headers hashes don't match (e1c06d85ae7b8b032bef47e42e4c08f9 + vs 68b329da9893e34099c7d8ad5cb9c940) + +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c + +2017-06-14 03:21:19 +0300 Timo Sirainen (159de4e2c) + + lib: istream-seekable - Fix reading when parent stream's content is larger + than max_buffer_size + + When writing the parent stream to fd and trying to read it back, it would + try to enforce the max_buffer_size and fail with: + + istream-seekable: Couldn't read back in-memory input ...: buffer full + + But since the data was already in buffer, istream-seekable shouldn't try to + enforce it at this point anymore. + +M src/lib/istream-seekable.c + +2017-06-13 18:26:26 +0300 Timo Sirainen (0f7b5e10f) + + lib-oauth2: Handle non-2xx/4xx results for token validation without crash + + Fixes: Panic: file oauth2-token-validate.c: line 33 + (oauth2_token_validate_continue): assertion failed: + (array_is_created(&req->fields)) + +M src/lib-oauth2/oauth2-token-validate.c + +2017-06-12 22:52:56 +0300 Timo Sirainen (edfdc577f) + + *-login: Add client_vfuncs.input_next_cmd() + + This allows plugins to hook into all the pre-login commands. For example + with imap-login most of the commands could already be hooked into, except + for ID and AUTHENTICATE because their parameters reading is handled + specially. This allows hooking into them as well. + + This is actually internal to all the login binaries, so it wouldn't have to + be in login-common. However, login-common already has all the code to handle + overriding functions nicely and this is a rather useful feature for all the + protocols anyway, so it's easier this way and not too ugly. + +M src/imap-login/imap-login-client.c +M src/imap-urlauth/imap-urlauth-login.c +M src/login-common/client-common.h +M src/pop3-login/client.c + +2017-06-12 22:51:12 +0300 Timo Sirainen (c57b69b83) + + pop3-login: Cleanup - move command handling to pop3_client_input_next_cmd() + + +M src/pop3-login/client.c + +2017-06-12 13:45:33 +0300 Sergey Kitov (9b2e48654) + + imap: command_stats_start call is added for unknown commands. + + This makes timing shown in reply to unknown commands correct + +M src/imap/imap-client.c +M src/imap/imap-commands.c +M src/imap/imap-commands.h + +2017-06-12 23:45:05 +0300 Timo Sirainen (a44595f7b) + + push-notification: Switch to main ioloop while calling drivers' commit + callbacks + + There aren't any guarantees what ioloop happens to be active at the time the + commit is called. The active ioloop can also be destroyed early on, which + can cause an I/O leak and crashes later on. + +M src/plugins/push-notification/push-notification-plugin.c + +2017-06-12 23:20:12 +0300 Timo Sirainen (5caf685b6) + + imap: Fix pipelining commands with SEARCH + + If the SEARCH wasn't a long-running one, it ends with going to sync. The + command state shouldn't then be changed to _WAIT_EXTERNAL. + +M src/imap/imap-search.c + +2017-06-12 17:34:59 +0300 Josef 'Jeff' Sipek (401f3220d) + + lib: add explicit casts to byteorder macros + + Some consumers of lib.h are in C++ and therefore they try to compile + byteorder.h as C++ code. C++ compilers don't like the implicit void * + -> struct anything * conversion, so we squelch those by adding explicit + casts. + +M src/lib/byteorder.h + +2017-06-12 14:35:22 +0300 Timo Sirainen (d82a985d9) + + imapc: If mailbox iteration fails, make sure error message isn't lost. + + +M src/lib-storage/index/imapc/imapc-list.c + +2017-06-12 14:33:46 +0300 Timo Sirainen (916c9c1b8) + + lib-storage: Fail mailbox list iteration early if it fails to get INBOX + flags + + The resulting INBOX reply could be wrong in that case. + + Also with imapc if the remote server is down, this causes two connection + errors instead of just one. + +M src/lib-storage/list/mailbox-list-iter.c + +2017-06-12 14:16:13 +0300 Timo Sirainen (873a5bec8) + + lib-storage: If mailbox list iteration fails, don't add INBOX + + It possibly should have been returned by the list iteration itself and we + could be returning it wrong here. + + Also calling this causes imapc to lost the error message in mailbox_list. + +M src/lib-storage/list/mailbox-list-iter.c + +2017-06-12 12:18:28 +0300 Timo Sirainen (a2dd3a0de) + + imapc: Don't reconnect on DELETE if auth failure was already seen. + + +M src/lib-storage/index/imapc/imapc-list.c + +2017-06-12 12:16:19 +0300 Timo Sirainen (f94abb02d) + + imapc: Don't reconnect on STATUS if auth failure was already seen. + + +M src/lib-storage/index/imapc/imapc-storage.c + +2017-06-12 11:57:52 +0300 Timo Sirainen (77ea60d15) + + imapc: Remove root_sep_lookup_failed cache + + The auth_failed_* should already be enough for this. This removal also fixes + the storage error message to be auth_failed_reason when possible. + +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-list.h + +2017-06-12 12:07:52 +0300 Timo Sirainen (d824b1ac4) + + imapc: Check for auth failures when saving messages + + First, don't even attempt an APPEND if we've already seen an auth failure. + Second, if APPEND does fail because of auth error, set the correct error to + storage. + +M src/lib-storage/index/imapc/imapc-save.c + +2017-06-12 12:03:39 +0300 Timo Sirainen (68e81f068) + + imapc: Fix APPEND error message to include APPEND, not COPY + + +M src/lib-storage/index/imapc/imapc-save.c + +2017-06-12 11:40:03 +0300 Timo Sirainen (ab838f155) + + imapc: Make sure storage error has the proper auth failure error string + + The first failed command always had the correct error string, but the + following failed commands just returned -1 without updating storage error. + The storage error could have been something completely different by then. + +M src/lib-storage/index/imapc/imapc-storage.c + +2017-06-12 11:33:38 +0300 Timo Sirainen (28576b628) + + imapc: Cleanup - Rename auth_error to auth_failed_reason for consistency + + +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h + +2017-06-12 11:32:23 +0300 Timo Sirainen (be21b9e65) + + imapc: Change auth_failed boolean to more specific auth_failed_state + + Since we now rely on auth_failed_state being initialized to zero, explicitly + set IMAPC_COMMAND_STATE_OK to be defined as 0. + +M src/lib-imap-client/imapc-client.h +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h + +2017-06-12 11:05:31 +0300 Timo Sirainen (a76f1c806) + + imapc: Remove auth_failed check from imapc_list_get_storage_name() + + Reverts 9949dc3649ac7a00289f6bf0662c793bee3d4286. It doesn't seem to be + actually needed at least now, and it's breaking: + + * SELECT INBOX -> failure due to remote server being down + * SELECT INBOX -> NO [CANNOT] Invalid mailbox name: Name is empty + +M src/lib-storage/index/imapc/imapc-list.c + +2017-06-08 14:49:56 +0300 Josef 'Jeff' Sipek (b9e830a81) + + global: use new byte ordering API + + +M src/doveadm/doveadm-dump-mailboxlog.c +M src/doveadm/dsync/dsync-mailbox-state.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-zlib.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-index/mail-index-util.c +M src/lib-index/mailbox-log.c +M src/lib-ntlm/ntlm-des.c +M src/lib/test-guid.c + +2017-06-08 13:20:18 +0300 Josef 'Jeff' Sipek (c9d76e2ba) + + lib: import byte swapping & endian converting functions + + +M src/lib/Makefile.am +A src/lib/byteorder.h +M src/lib/lib.h +A src/lib/test-byteorder.c +M src/lib/test-lib.inc + +2017-06-12 14:24:59 +0300 Timo Sirainen (0cf3b30b8) + + pop3-migration: Strip trailing spaces from headers when calculating hash + + Fixes matching mails with Zimbra. + +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c + +2017-06-08 20:34:39 +0300 Timo Sirainen (f4e66312c) + + imap-quota: If quota lookups fail, return NO for GETQUOTA/GETQUOTAROOT + + +M src/plugins/imap-quota/imap-quota-plugin.c + +2017-06-08 20:34:27 +0300 Timo Sirainen (c3785e2a5) + + quota: Update comments in quota.h + + +M src/plugins/quota/quota.h + +2017-06-08 20:25:11 +0300 Timo Sirainen (bd389ead3) + + quota: quota_root_iter_next() - Iterate all visible roots + + Don't try to skip the roots that don't have an active quota. imap_quota + plugin does the skipping now itself, and quota_clone shouldn't really be + even used with more than one quota root. + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c + +2017-06-08 20:24:26 +0300 Timo Sirainen (f162f350e) + + imap-quota: If quota root doesn't have any quotas, don't send empty QUOTA + reply + + For example if GETQUOTA is asked for fs quota, but the user doesn't have fs + quota enabled. + +M src/plugins/imap-quota/imap-quota-plugin.c + +2017-06-08 20:29:05 +0300 Timo Sirainen (a022e47f4) + + quota-clone: Don't clone quota resources that aren't enabled. + + They would always just be zeros anyway, so this makes the update slightly + more efficient. Although practically this only matters with dirsize and fs + quotas, which people generally don't use with quota_clone. + +M src/plugins/quota-clone/quota-clone-plugin.c + +2017-06-09 15:30:02 +0300 Josef 'Jeff' Sipek (eec34b386) + + lib: correct comment in path_normalize + + Don't blame static analyzers for doing their job. + +M src/lib/path-util.c + +2017-06-12 12:44:37 +0300 Timo Sirainen (5209c4303) + + welcome: Fix sending parameters to welcome script. + + Broken by f38b0dafbffa9d79542e36b4b3e598ed4115e5a3 + +M src/plugins/welcome/welcome-plugin.c + +2017-06-08 20:39:47 +0300 Timo Sirainen (a345bc2d9) + + lib-imap-client: Fix hang when imapc_client_get_capabilities() is called + without connection + + +M src/lib-imap-client/imapc-client-private.h +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/test-imapc-client.c + +2017-06-06 15:31:01 +0300 Timo Sirainen (5b809b976) + + lib-index: Don't ignore mail_transaction_log_move_to_memory() failure + + +M src/lib-index/mail-index.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log.c +M src/lib-index/mail-transaction-log.h + +2017-06-10 11:40:43 +0300 Timo Sirainen (7fc4f555a) + + lib-http: Compiling fix to host->ips reallocation. + + +M src/lib-http/http-client-host.c + +2017-06-09 23:42:34 +0300 Timo Sirainen (15c365ef8) + + quota-fs: Make sure quota calculations don't overflow in old systems + + Patch by M. Balridge + +M src/plugins/quota/quota-fs.c + +2017-06-09 23:32:28 +0300 Timo Sirainen (2e68d078b) + + lib: ioloop-kqueue - Improve kevent() panic log message + + +M src/lib/ioloop-kqueue.c + +2017-06-08 01:03:13 +0300 Timo Sirainen (4ecee121e) + + doveconf: Preserve import_environment when execing binary + + This allows import_environment setting to work with doveadm and other + standalone tools. + +M src/config/config-request.c +M src/config/config-request.h +M src/config/doveconf.c + +2017-06-08 00:40:12 +0300 Timo Sirainen (de266e09d) + + lib-master, config: Move the responsibility of cleaning environment to + doveconf + + +M src/config/doveconf.c +M src/lib-master/master-service-settings.c + +2017-06-08 00:35:08 +0300 Timo Sirainen (ed6b37eee) + + lib-master: Use master_service_import_environment() for preserving + environments + + +M src/lib-master/master-service-settings.c + +2017-06-08 00:33:32 +0300 Timo Sirainen (c6dfc77cb) + + lib-master: master_service_import_environment() - use a data stack frame + + This way the caller doesn't have to do it. + +M src/lib-master/master-service.c +M src/master/main.c + +2017-06-08 00:24:19 +0300 Timo Sirainen (8a0a8c982) + + master: Move master_set_import_environment() to lib-master + + +M src/lib-master/master-service.c +M src/lib-master/master-service.h +M src/master/main.c + +2017-06-08 00:20:38 +0300 Timo Sirainen (18be69638) + + master: Append to existing DOVECOT_PRESERVE_ENVS instead of overwriting it + + +M src/master/main.c + +2017-06-08 00:14:30 +0300 Timo Sirainen (8d7c78157) + + master: Move import_environment setting to lib-master's + master_service_settings + + +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-settings.h +M src/master/main.c +M src/master/master-settings.c +M src/master/master-settings.h + +2017-02-04 20:45:30 +0200 Timo Sirainen (ae6a14ce9) + + lib-http: Try to reuse memory for host->ips allocation. + + If the host already had an IP, most of the time ips_count doesn't change + anymore. + +M src/lib-http/http-client-host.c + +2017-06-10 10:35:54 +0300 Timo Sirainen (dead275d5) + + lib: Fix test-path-util unit test with some cwd path lengths + + The component-component directory might not have been created at all, in + which case the following symlink creations would fail since they were + already created to the same directory in a previous test. + +M src/lib/test-path-util.c + +2017-06-09 18:10:14 +0300 Timo Sirainen (83d6ad2c8) + + mail-crypt-acl: Fix assert-crash due to missing namespace initialization + + This was broken by e031d9aaae59a9f79710dc1138b76b69272615a3. + +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c + +2017-06-09 16:18:56 +0300 Timo Sirainen (f165d31e1) + + quota: count backend - Don't ignore mailbox list iteration errors + + +M src/plugins/quota/quota-count.c + +2017-06-09 14:08:22 +0300 Aki Tuomi (7ebda61d3) + + lib: Fix test-path-util.c formatting to conform coding style + + +M src/lib/test-path-util.c + +2017-06-09 13:15:35 +0300 Aki Tuomi (dfe2b5d36) + + lib: Fix infinite loop in path-util.c + + Infinite loop was reached if the path was longer than 128 bytes, and the 128 + boundary was in middle of path name component. + +M src/lib/path-util.c +M src/lib/test-path-util.c + +2017-06-09 12:07:00 +0300 Timo Sirainen (f93622233) + + quota: Fix negative quota_warnings with count backend + + For example this never triggered: + + quota_warning = -messages=100%% quota-warning %u -100 + + The change to quota_alloc() to update the count_used doesn't seem to + actually fix anything right now, but it makes the code more correct. + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c + +2017-06-09 12:42:51 +0300 Timo Sirainen (6ffa4fc00) + + lib-storage: Fix sort index writing to not leave sort_id=0 gaps + + This fixes errors like: Error: INBOX: Broken sort-f indexes, resetting + +M src/lib-storage/index/index-sort-string.c + +2017-06-09 12:25:36 +0300 Timo Sirainen (96c7d2a59) + + lib-storage: Add details to "Broken sort-* indexes" error + + +M src/lib-storage/index/index-sort-string.c + +2017-06-09 15:22:56 +0300 Aki Tuomi (7aa2660e7) + + dsync: Display namespace locations on init in debug mode + + This simplifies debugging as you can more easily tell which brain is using + which mail location. + +M src/doveadm/dsync/dsync-brain-mailbox-tree.c + +2017-06-09 14:31:15 +0300 Timo Sirainen (8a5fe0c06) + + lib-storage: Fix setting the correct cache record corrupted + + It was mixing UIDs and sequences, so a wrong mail could have been set + corrupted or it could have crashed with: + + Panic: file mail-index-transaction-update.c: line 1018 + (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= + mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq)) + +M src/lib-storage/mail-storage.c + +2017-06-04 13:07:48 +0300 Timo Sirainen (7076aac11) + + quota: Remove unused quota_free() + + +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h + +2017-06-04 13:06:06 +0300 Timo Sirainen (27569c07b) + + quota: Fix quota_vsizes=yes to work with all backends + + +M src/plugins/quota/quota.c + +2017-06-07 14:37:47 +0300 Josef 'Jeff' Sipek (df3ba6386) + + lib-storage: simplify mailbox_get_path_to() + + Instead of special casing MAILBOX_LIST_PATH_TYPE_{MAILBOX,INDEX}, we can use + a common helper to remove code duplication. + +M src/lib-storage/mail-storage.c + +2017-05-31 00:07:46 +0300 Timo Sirainen (b01d001df) + + imapc: Don't send UID FETCH 1:* after SELECT if mailbox is empty + + +M src/lib-storage/index/imapc/imapc-sync.c + +2017-06-07 19:54:10 +0300 Timo Sirainen (e5834cb5a) + + lib-storage: test-mail-search-args-simplify - test with initialized args + + +M src/lib-storage/test-mail-search-args-simplify.c + +2017-06-07 19:53:00 +0300 Timo Sirainen (1270cb6b6) + + lib-storage: mail_search_args_simplify() - Fix merging already-initialized + keywords + + It was deinitializing the arg that was kept instead of the one being + removed. + +M src/lib-storage/mail-search-args-simplify.c + +2017-06-07 19:37:46 +0300 Timo Sirainen (b8b005887) + + lib-storage: Fix mail_search_args_simplify() to not deinit too many args + + Removing an arg should deinit it, but not its following siblings. + +M src/lib-storage/mail-search-args-simplify.c + +2017-06-07 19:36:19 +0300 Timo Sirainen (1db237d24) + + lib-storage: Add mail_search_arg_one_deinit() + + +M src/lib-storage/mail-search.c +M src/lib-storage/mail-search.h + +2017-06-07 23:47:56 +0300 Timo Sirainen (352bbeb5a) + + master: Don't include imap-hibernate when counting auth's max client_limit + + imap-hibernate doesn't do any auth connections, so it doesn't need it. It's + a bit ugly to add an explicit service name comparison here, but there didn't + really seem to be many other good choices: + + * Could have removed protocol=imap from imap-hibernate. I was close to + doing this, but maybe it's better that imap-only processes would have their + protocol set to "imap". + + * Could have added a new service type, but seems pretty unnecessary to add + some kind of a "nonauth" just for this. A reverse "needs-auth" might have + been ok though. + + Perhaps in future we'll implement proper dependencies across services and + those dependencies could be used to calculate this limit more precisely. + +M src/master/master-settings.c + +2017-06-07 10:17:55 +0300 Timo Sirainen (8322e7400) + + lib: Add unit tests for p_strdup*() + + +M src/lib/test-strfuncs.c + +2017-05-30 18:25:50 +0300 Timo Sirainen (cb1e7cb67) + + lib-storage: Fix crash in mail_get_header_stream() when its previous stream + wasn't at EOF + + At least this could have happened when indexes were disabled and running: + + FETCH 1 (envelope body.peek[header.fields (foo)] bodystructure) + + Fixes: Panic: file index-mail-headers.c: line 198 + (index_mail_parse_header_init): assertion failed: + (!mail->data.header_parser_initialized) + +M src/lib-storage/index/index-mail-headers.c + +2017-06-07 11:35:18 +0300 Timo Sirainen (e6d4f540b) + + global: Use i_realloc_type() wherever possible + + +M src/lib-index/mail-cache-fields.c +M src/lib-index/mail-cache-transaction.c +M src/lib/ioloop-poll.c + +2017-06-07 11:24:38 +0300 Timo Sirainen (6509aa730) + + lib: Add test-mempool unit test. + + It verifies that the p_new() and p_realloc_type() handle overflows + correctly. test-malloc-overflow already does this for the low-level + MALLOC_*() macros, but here we're cheking that the actually used memory + allocation macros also work. + +M src/lib/Makefile.am +M src/lib/test-lib.inc +M src/lib/test-mempool-alloconly.c +A src/lib/test-mempool.c + +2017-06-07 11:24:03 +0300 Timo Sirainen (71b92ca8e) + + lib: Add i_realloc_type() for i_realloc() that checks for overflows + + +M src/lib/Makefile.am +M src/lib/imem.h +M src/lib/mempool.h +A src/lib/test-imem.c +M src/lib/test-lib.inc + +2017-06-08 11:35:58 +0300 Timo Sirainen (d8ed8d558) + + imapc: Fix potential crash if initial sync fails. + + Happened at least if mailbox had 0 mails and a failing mailbox_sync() was + called twice. + + Fixes: Panic: file imapc-sync.c: line 477 (imapc_sync_index): assertion + failed: (mbox->sync_fetch_first_uid == 1) + +M src/lib-storage/index/imapc/imapc-sync.c + +2017-06-07 18:10:10 +0300 Timo Sirainen (e106213ae) + + lib-mail: message_address_parse() - Fix fill_missing==TRUE handling + + Mainly MISSING_DOMAIN wasn't set in all situations. Also added unit tests. + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 15:33:42 +0300 Timo Sirainen (543041153) + + lib-mail: message_address_parse() - Handle invalid standalone phrases better + + We'll treat "local-part" (without quotes) as a mailbox even without + @domain, but if it continues with anything or if it's a quoted-string, we'll + treat it as a display-name instead. + + This is probably better than just converting everything to display-name, + since there are likely to exist headers like "To: localuser" + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 15:22:22 +0300 Timo Sirainen (f55b07916) + + lib-mail: Improve test-message-address to test invalid addresses in lists + + Test in both a group and list of addresses. + +M src/lib-mail/test-message-address.c + +2017-06-07 15:21:10 +0300 Timo Sirainen (52818a09c) + + lib-mail: message_address_parse() - don't stop at <> when parsing address + lists + + And similarly don't stop at <@domain> + +M src/lib-mail/message-address.c + +2017-06-07 15:08:27 +0300 Timo Sirainen (22cf8b6ac) + + lib-mail: message_address_parse() - don't stop at invalid addresses when + parsing group + + Also the end-group's message_address shouldn't have invalid_syntax=TRUE, + except when we didn't actually find the ending ';' + +M src/lib-mail/message-address.c + +2017-06-07 14:57:12 +0300 Timo Sirainen (4c9294fcb) + + lib-mail: message_address_parse() - Fix reading out-of-bounds read on + invalid input + + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 13:34:39 +0300 Timo Sirainen (3cb2f0951) + + lib-mail: message_address_parse() - Remove unnecessary NULL checks + + message_address_parse() always initialized rfc822_parser_init() with + last_comment string. + +M src/lib-mail/message-address.c + +2017-06-07 13:19:40 +0300 Timo Sirainen (6b8f4863b) + + lib-mail: test-message-address - add more and better organized tests + + +M src/lib-mail/test-message-address.c + +2017-06-07 12:58:21 +0300 Timo Sirainen (58a770f1e) + + lib-mail: message_address_parse() - Add INVALID_ROUTE/SYNTAX_ERROR only if + fill_missing==TRUE + + This allows message_address_write() to write the parsed invalid address in a + way that at least somewhat resembles the original input. + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 12:42:28 +0300 Timo Sirainen (dc8c1e74e) + + lib-mail: message_address_write() - Write empy username as "" + + We can't output <@domain> because that conflicts with the <@route:...> + syntax. Also ""@domain seems to be a valid address. + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 12:37:09 +0300 Timo Sirainen (5a8ee853d) + + lib-mail: message_address_write() - Always write as output + + This is the standard format nowadays, so don't convert into + plain user@domain. + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 12:35:35 +0300 Timo Sirainen (ffc8c62c4) + + lib-mail: message_address_write() - Don't write empty <> + + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 12:34:17 +0300 Timo Sirainen (6a2a171ae) + + lib-mail: message_address_write() - Don't add '@' if domain is missing + + +M src/lib-mail/message-address.c +M src/lib-mail/test-message-address.c + +2017-06-07 12:33:10 +0300 Timo Sirainen (a8ebb72c0) + + lib-mail: test-message-address - Test also writing invalid addresses + + +M src/lib-mail/test-message-address.c + +2017-06-07 12:01:07 +0300 Timo Sirainen (18a2214ee) + + lib-mail: test-message-address cleanup + + Merge input and output into the same struct to make it clearer. + +M src/lib-mail/test-message-address.c + +2017-06-05 14:21:23 +0300 Josef 'Jeff' Sipek (c536bf226) + + lib: test for guid_128_generate() time handling + + Make sure that guids always increase regardless of what is happening to the + time. + +M src/lib/test-guid.c + +2017-06-05 12:55:56 +0300 Josef 'Jeff' Sipek (8b2aaea36) + + lib: guid_128_generate() shouldn't generate invalid timestamps + + The nsec validity check must take into account the soon-to-be-done + increment. + +M src/lib/guid.c + +2017-06-05 12:53:23 +0300 Josef 'Jeff' Sipek (c104ea8f1) + + lib: guid_128_generate() needs to correctly convert usecs to nsecs + + The timestamp in the guid starts off with real time, but "runs ahead" if a + lot of guids are generated. If not many guids are being generated, the + timestamp is fast-forwarded to the current ioloop_timeval. The buggy + comparison prevented fast forwarding when tv_sec matched, but tv_nsec value + was > 0 (which was true most of the time). + +M src/lib/guid.c + +2017-05-31 14:32:30 +0300 Sergey Kitov (e8760ad57) + + quota: assertion for *args != NULL is added in order to avoid warning from + static analyzer and *args[0] changed to (*args)[0] + + +M src/plugins/quota/quota.c + +2017-06-06 13:59:14 +0300 Aki Tuomi (4c4973200) + + dict-cdb: Add simple iteration support + + +M src/lib-dict/dict-cdb.c + +2017-06-06 17:18:27 +0300 Timo Sirainen (52b52b5f9) + + lib-index: Fix reset_id handling in mail_cache_get_missing_reason() cache + + Broken by bd897f82a5d9b00ba256b462d2056c2dc7df257c + +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-cache-private.h + +2017-04-07 09:19:02 +0300 Timo Sirainen (01f121754) + + lib: test-utc-mktime: Remove duplicate test + + Also fixes a compiler warning when time_t is signed 32bit. + +M src/lib/test-utc-mktime.c + +2017-06-06 09:39:34 +0300 Timo Sirainen (f976c38f0) + + lib-storage: Fix assert-crash in SORT caused by earlier changes + + Broken by 0a6a527f0c42b5478d80ac53ab357885676fd516 + + Fixes: Panic: file index-sort-string.c: line 668 (index_sort_add_ids_range): + assertion failed: (str != NULL) + +M src/lib-storage/index/index-sort-string.c + +2017-06-06 12:47:53 +0300 Aki Tuomi (bfc3dd435) + + lib-oauth2: Make sure fields are always initialized + + +M src/lib-oauth2/oauth2-introspect.c +M src/lib-oauth2/oauth2-refresh.c +M src/lib-oauth2/oauth2-token-validate.c + +2017-06-06 12:44:55 +0300 Aki Tuomi (41b272000) + + lib-oauth2: Accept empty responses + + +M src/lib-oauth2/oauth2.c + +2017-06-05 21:53:18 +0300 Timo Sirainen (bd897f82a) + + lib-index: Add cache to mail_cache_get_missing_reason() + + This avoids excessive CPU usage when it's called in a loop for many mails. + +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-cache-private.h + +2017-06-05 21:44:45 +0300 Timo Sirainen (adef31eb0) + + lib-index: mail_cache_get_missing_reason() - Minor code cleanup + + +M src/lib-index/mail-cache-lookup.c + +2017-06-05 21:09:51 +0300 Timo Sirainen (0a6a527f0) + + lib-storage: Optimize error handling for SORT + + If a lot of mails have failed in a large mailbox, this check reduces the CPU + usage significantly. + +M src/lib-storage/index/index-sort-string.c + +2017-06-05 21:07:32 +0300 Timo Sirainen (91ede7759) + + lib-storage: Sort code cleanup - Change index_sort_get_string() to return + bool + + None of the callers cared about the difference between "expunged" vs + "error". + +M src/lib-storage/index/index-sort-string.c + +2017-06-05 21:05:07 +0300 Timo Sirainen (1a229e3e1) + + lib-storage: Sort code cleanup - pass node to index_sort_get_string() + + +M src/lib-storage/index/index-sort-string.c + +2017-06-05 20:14:54 +0300 Timo Sirainen (646800dd3) + + lib-storage: Make sure istream-mail doesn't replace an existing storage + error + + I'm not aware of it actually having broken anything, so this is just for + extra safety. + +M src/lib-storage/index/istream-mail.c + +2017-06-05 20:12:43 +0300 Timo Sirainen (5774da7bb) + + lib-storage: Fix SORT error message when reaching mail_sort_max_read_count + + It should have been: NO [LIMIT] Requested sort would have taken too long + + Instead it was just: NO [SERVERBUG] Mail field not cached + + It was broken for CC, FROM, TO, SUBJECT, DISPLAYFROM and DISPLAYTO. The + numeric sorting was working correctly. + +M src/lib-storage/index/index-sort.c + +2017-06-05 19:05:58 +0300 Timo Sirainen (6f380c1e8) + + push-notification: Fix crash in OX driver's deinit + + The http_client doesn't always exist. + +M src/plugins/push-notification/push-notification-driver-ox.c + +2017-06-05 12:14:57 +0300 Aki Tuomi (b20202007) + + auth: Access always first entry when flushing failures + + The code is deleting the first item after accessing it, and then moving + forward. It will eventually go beyond the array and get NULL ptr and fail. + + Instead we need to always get the first item, since the array deletion is + moving the queued items forward. + + Broken by e18b4e41 + +M src/auth/auth-request-handler.c + +2017-05-30 16:23:28 +0300 Timo Sirainen (6215a7ed0) + + lib-auth: Code cleanup - remove unnecessary code + + Besides being unnecessary, it was also obsolete since not all the strings + were p_strdup()ed. + +M src/lib-auth/auth-client-request.c + +2017-05-23 14:12:49 +0300 Josef 'Jeff' Sipek (07470e90d) + + pop3: send back auth reply sooner + + If possible (i.e., pop3_lock_session=no), we can send back the OK response + earlier. + +M src/pop3/main.c + +2017-05-23 13:01:48 +0300 Josef 'Jeff' Sipek (bd5cf4556) + + pop3: initialize namespaces explicitly + + (instead of relying on mail user initialization to instantiate them for us) + +M src/pop3/main.c +M src/pop3/pop3-client.c + +2017-05-19 10:58:18 +0300 Josef 'Jeff' Sipek (11b8ec158) + + pop3: client_create_from_input shouldn't process input + + This makes the pop3 code resemble the imap code more. Making the subsequent + changes easier. + +M src/pop3/main.c + +2017-05-19 10:51:22 +0300 Josef 'Jeff' Sipek (6616907d9) + + pop3: client_create_from_input should return the client struct + + This makes the code more similar to imap's, making subsequent changes + easier. + +M src/pop3/main.c + +2017-05-19 10:46:05 +0300 Josef 'Jeff' Sipek (813009c43) + + pop3: rename login_client_connected() client arg to login_client + + This makes the next commit cleaner. + +M src/pop3/main.c + +2017-05-19 10:42:03 +0300 Josef 'Jeff' Sipek (0f0bf444b) + + pop3: move pop3 session locking out of client_create + + As a result, we can directly return the client structure (instead of passing + it back via a _r arg). + + This makes the pop3 client_create look more like the imap version. + +M src/pop3/main.c +M src/pop3/pop3-client.c +M src/pop3/pop3-client.h + +2017-05-30 10:37:24 +0300 Timo Sirainen (be97d7e54) + + lib-imap-client: Fix test-imapc-client unit test to work on OSX + + connect() to port 0 fails in it, so for the "connect failure" test first + open a random free listener port and then close it. Hopefully nothing else + reopens it in the mean time. + +M src/lib-imap-client/test-imapc-client.c + +2017-05-30 10:28:43 +0300 Timo Sirainen (796beea86) + + lib: test-path-util unit test - small fixes and cleanups + + Don't use /tmp, especially because on OSX it's a symlink to /private/tmp/, + which causes these tests to fail. + +M src/lib/test-path-util.c + +2017-05-31 14:27:16 +0300 Timo Sirainen (5c8dec7f6) + + director: Use longer timeout for receiving user list in handshake + + The sender also has a send timeout, so this allows the sender to abort early + and give a nicer error message. + +M src/director/director-connection.c + +2017-05-31 13:42:31 +0300 Timo Sirainen (1ef9754a5) + + director: Log more connection state information on handshaking errors + + +M src/director/director-connection.c + +2017-05-31 13:17:37 +0300 Timo Sirainen (7fd22d552) + + director: Use more accurate timestamps for handshake timeout logging + + There could be some time between the create, connect and when ME was + received. + +M src/director/director-connection.c + +2017-05-31 13:15:04 +0300 Timo Sirainen (6ccc7f584) + + director: Fix "sending handshake timed out" error to be actually logged + + io was never NULL here, so it was never logged. + +M src/director/director-connection.c + +2017-05-31 13:11:08 +0300 Timo Sirainen (5a530f778) + + director: Fix handshake timeout lengths + + They weren't too bad, but also they weren't what the #defines described. + Also added a separate connect() timeout. + +M src/director/director-connection.c + +2017-05-30 21:57:06 +0300 Timo Sirainen (f6066a48b) + + quota: Fix imapc backend not to try to find out mail's size. + + This removes unnecessary FETCH RFC822.SIZE command sent to server when + expunging mails. + +M src/plugins/quota/quota-imapc.c + +2017-05-31 00:00:32 +0300 Timo Sirainen (cb9a2c8e2) + + imapc: SEARCH - Don't add parenthesis around OR + + There's no need to write "(OR a b)" when "OR a b" works just the same. + +M src/lib-storage/index/imapc/imapc-search.c + +2017-05-30 23:53:44 +0300 Timo Sirainen (5b2062e40) + + lib-storage: mail_search_args_to_imap() - don't add parenthesis around OR + + There's no need to write "(OR a b)" when "OR a b" works just the same. + +M src/lib-storage/mail-search-args-imap.c +M src/lib-storage/mail-search-mime.c +M src/lib-storage/test-mail-search-args-imap.c +M src/lib-storage/test-mail-search-args-simplify.c + +2017-05-31 14:39:55 +0300 Aki Tuomi (fa33df823) + + lib: Use unix streams with connection when using unix socket + + This makes it easier to send file descriptors over connection + +M src/lib/connection.c +M src/lib/connection.h + +2017-05-30 16:57:45 +0300 Timo Sirainen (0ce76629d) + + auth: Don't lose all forward_ fields if the first passdb lookup fails. + + +M src/auth/auth-request.c + +2017-05-29 13:39:18 +0300 Aki Tuomi (869e8af5b) + + lib-mail: Add qp encoder + + +M src/lib-mail/Makefile.am +A src/lib-mail/istream-qp-encoder.c +M src/lib-mail/istream-qp.h +A src/lib-mail/qp-encoder.c +A src/lib-mail/qp-encoder.h +A src/lib-mail/test-istream-qp-encoder.c +A src/lib-mail/test-qp-encoder.c + +2017-05-25 19:03:32 +0300 Aki Tuomi (51f5fe16f) + + lib-mail: Link test binaries to libmail.la instead of .lo files + + +M src/lib-mail/Makefile.am + +2017-05-30 14:03:23 +0300 Aki Tuomi (95f60b5c1) + + mail-filter: tabescape args, this is required by script client 4 + + +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/ostream-ext-filter.c + +2017-05-30 14:01:39 +0300 Aki Tuomi (f38b0dafb) + + welcome: tabescape args, this is required by script client 4 + + +M src/plugins/welcome/welcome-plugin.c + +2017-05-30 14:01:17 +0300 Aki Tuomi (405fc3aea) + + global: Update script client version number + + Broken by b383ed51d75bce0f69f126bc4ff7192985ca30f2 + +M src/plugins/fts/fts-parser-script.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/plugins/welcome/welcome-plugin.c + +2017-05-30 11:30:10 +0300 Timo Sirainen (8df38b03a) + + auth: Fix crash on passdb lookup when all passdbs were skipped + + Finishes the fix in 614f5b6febaf3c825f9200ab3b62d9d047197b0e + + Fixes: auth: Panic: file auth-request.c: line 2493 (get_log_prefix): + assertion failed: (auth_request->mech != NULL) + +M src/auth/auth-request.c + +2017-05-30 09:36:49 +0300 Timo Sirainen (6263d367e) + + lib-storage: Fix LAYOUT=fs potentially not ignoring ACLs when requested + + fs_get_existence_info_flag() was only being called with LAYOUT=fs and + Maildir combination. This mainly affected that combination when using + mailbox_list_index=yes and trying to list mailboxes with ACL checking + disabled. + +M src/lib-storage/list/mailbox-list-fs-iter.c + +2017-05-30 09:18:14 +0300 Timo Sirainen (3c56ce9f3) + + lib-storage: Fix ACL in parent mailbox potentially hiding its children. + + fs_get_existence_info_flag() was only being called with LAYOUT=fs and + Maildir combination, so only it was broken if the parent mailbox wasn't + visible but its children were. + +M src/lib-storage/list/mailbox-list-fs-iter.c + +2017-05-30 09:15:09 +0300 Timo Sirainen (993424299) + + lib-storage: fs_list_get_mailbox_flags() - Return mailbox files as + selectable + + Avoids a second stat() later on, which would do the same anyway. + +M src/lib-storage/list/mailbox-list-fs-flags.c + +2017-05-30 09:12:05 +0300 Timo Sirainen (9e50448ea) + + lib-storage: fs_list_get_mailbox_flags() - Don't assume directories always + have children. + + This makes the directory handling code equivalent for type==UNKNOWN and + type==DIR. + +M src/lib-storage/list/mailbox-list-fs-flags.c + +2017-05-30 09:10:55 +0300 Timo Sirainen (cea31bf9e) + + lib-storage: fs_list_get_mailbox_flags() - Add comments + + +M src/lib-storage/list/mailbox-list-fs-flags.c + +2017-05-30 09:09:39 +0300 Timo Sirainen (348202a97) + + lib-storage: fs_list_get_mailbox_flags() - Reorganize code + + No functional changes. + +M src/lib-storage/list/mailbox-list-fs-flags.c + +2017-05-29 17:58:35 +0300 Timo Sirainen (ad9a6d27c) + + acl: Global ACL file was parsed as if it was local ACL file + + This caused some of the ACL handling not work exactly as expected. + +M src/plugins/acl/acl-global-file.c + +2017-05-29 17:26:52 +0300 Timo Sirainen (427250183) + + lib-storage: Make mailbox_list_iter_init_autocreate() static again + + It's no longer needed elsewhere. + +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/mailbox-list-private.h + +2017-05-29 17:20:48 +0300 Timo Sirainen (f8a67af9b) + + lib-storage: Fix mailbox_list_index=yes + ACLs + auto=subscribe mailboxes + + If the auto=subscribe mailbox didn't have a lookup ACL, it shouldn't have + been listed. This didn't work properly, because ACL plugin initialized the + autocreate_ctx only for the index iterator, while the autoboxes were listed + using the backend iterator. Fixed by not creating index iterator at all when + doing a passthrough iteration. + +M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/mailbox-list-private.h + +2017-05-29 16:44:44 +0300 Timo Sirainen (d186a2391) + + lib-storage: Cleanup - Don't use ctx in iter_use_index() + + Shrinks the following change. + +M src/lib-storage/list/mailbox-list-index-iter.c + +2017-05-29 15:52:15 +0300 Timo Sirainen (d754fe457) + + lib-storage: Add \NoInferiors flag to autocreated mailboxes with mbox + + Once the mailboxes get autocreated, the \NoInferiors flag is added anyway. + +M src/lib-storage/list/mailbox-list-iter.c + +2017-05-29 15:30:36 +0300 Timo Sirainen (f5836cc8a) + + lib-storage: Don't list duplicate autocreated mailboxes' parents + + +M src/lib-storage/list/mailbox-list-iter-private.h +M src/lib-storage/list/mailbox-list-iter.c + +2017-05-29 13:53:17 +0300 Timo Sirainen (ab7687e9b) + + acl: Skip auto=create|subscribe mailboxes that don't have lookup-right + + Removing them entirely from the boxes and box_sets arrays in the list + context treats them as if they weren't configured at all. This way they + don't need any other special code. + +M src/plugins/acl/Makefile.am +M src/plugins/acl/acl-mailbox-list.c + +2017-05-29 13:52:42 +0300 Timo Sirainen (67cbe5d33) + + lib-storage: Add mailbox-list-iter-private.h with autocreate context structs + + Needed for the following ACL change. + +M src/lib-storage/list/Makefile.am +A src/lib-storage/list/mailbox-list-iter-private.h +M src/lib-storage/list/mailbox-list-iter.c + +2017-05-24 11:50:08 +0300 Timo Sirainen (e67df1f70) + + lib-storage: Log an info message when dovecot.index.pvt UIDVALIDITY changes + + +M src/lib-storage/index/index-sync-pvt.c + +2017-05-24 11:47:54 +0300 Timo Sirainen (c50602b44) + + lib-storage: When initializing dovecot.index.pvt, don't reset it. + + This avoids unnecessary errors about index being reset when it was already + empty. + +M src/lib-storage/index/index-sync-pvt.c + +2017-05-24 11:41:29 +0300 Timo Sirainen (207f4864a) + + lib-storage: Cleanup - Remove pointless if-check + + +M src/lib-storage/index/index-sync-pvt.c + +2017-05-24 20:19:11 +0200 Stephan Bosch (5791d02c3) + + lib-http: client: Only drop queued requests when a DNS lookup fails; not + also the ones that are already in progress. + + +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c + +2017-05-24 21:59:32 +0200 Stephan Bosch (7a1bc4683) + + lib-http: client: When a request is destroyed prematurely during payload + input, consider the payload stream destroyed and act accordingly. + + The application may hold a reference to the payload stream still, and it may + be difficult to prevent that. This causes lib-http to keep waiting for the + payload to be destroyed. When nothing else is going on, the current ioloop + may then become empty, which caused the familiar assert failure. + +M src/lib-http/http-client-connection.c + +2017-05-24 19:08:43 +0200 Stephan Bosch (567d1c82e) + + lib-http: client: Explicitly destroy the response payload timeout stream + when the request is destroyed while receiving payload. + + This way, the timeout is stopped. This caused ioloop panics. + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c + +2017-05-24 18:27:10 +0300 Timo Sirainen (6e43afe03) + + quota: Fix infinite loop when parsing quota parameters + + Broken by previous quota changes. + +M src/plugins/quota/quota.c + +2017-05-24 23:49:43 +0300 Timo Sirainen (451a1bfd1) + + lib-storage: Fix crash in test-mail-storage + + +M src/lib-storage/test-mail-storage.c + +2017-05-24 22:31:59 +0300 Timo Sirainen (596c46234) + + lib-storage: Fix memory leak in test-mail-storage + + +M src/lib-storage/test-mail-storage.c + +2017-05-24 21:56:03 +0300 Timo Sirainen (55ca77c6a) + + lib-storage: Add unit test for set/get/push/pop storage error operations + + +M src/lib-storage/Makefile.am +A src/lib-storage/test-mail-storage.c + +2017-05-24 21:29:49 +0300 Timo Sirainen (7e9e61655) + + lib-storage: Fix mail_storage_set_critical() when input parameter is an old + internal error + + This could have caused garbage in the error string. + +M src/lib-storage/mail-storage.c + +2017-05-24 19:16:03 +0300 Timo Sirainen (30d50c7e8) + + lib-storage: Fix mail_storage_last_error_push/pop() to work with internal + errors + + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-05-24 17:19:36 +0300 Timo Sirainen (04a6e5132) + + lib-master: Replace listeners with /dev/null in SIGQUIT instead of closing + + This should be somewhat safer. + +M src/lib-master/master-service-private.h +M src/lib-master/master-service.c + +2017-05-19 11:00:22 +0300 Sergey Kitov (73cdeeae4) + + Whitespace cleanup + + +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota.c + +2017-05-19 10:58:52 +0300 Sergey Kitov (1f166c4a7) + + Dict backend parameters reading changed to use common parsing function + + +M src/plugins/quota/quota-dict.c + +2017-05-19 10:57:02 +0300 Sergey Kitov (efbb01826) + + fs backend parameter parsing changed to use common function + + +M src/plugins/quota/quota-fs.c + +2017-05-19 10:52:46 +0300 Sergey Kitov (bbd51f171) + + imapc backend parameter parsing changed to use common function + + +M src/plugins/quota/quota-imapc.c + +2017-05-19 10:49:01 +0300 Sergey Kitov (5ee920777) + + maildir backend parameter parsing changed to use common function + + +M src/plugins/quota/quota-maildir.c + +2017-05-19 10:46:27 +0300 Sergey Kitov (aa089dcef) + + quota root default init changed to use common param parse function + + +M src/plugins/quota/quota.c + +2017-05-18 13:30:25 +0300 Sergey Kitov (afbdaecd3) + + common quota parameter parsing function implemented + + +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h + +2017-05-22 17:56:15 +0300 Timo Sirainen (bbcda8a2e) + + imap: Fix unhibernation after earlier change + + +M src/imap/imap-master-client.c + +2017-05-22 10:13:21 +0300 Timo Sirainen (9c4209565) + + lib-index: Fix crash in mail_transaction_log_view_set_all() error handling + + +M src/lib-index/mail-transaction-log-view.c + +2017-05-22 10:11:30 +0300 Timo Sirainen (6d2f4a21b) + + lib-index: Fix start_offset > sync_offset error handling for in-memory + indexes + + +M src/lib-index/mail-transaction-log-file.c + +2017-05-20 18:13:45 +0300 Timo Sirainen (e3d797bc8) + + config: When showing an "Unknown setting" error, show the full section path + + For example with: + + service foo { + inet_listener bar { + key = value + } + } + + Instead of showing just: + + Unknown setting: key + + Show the entire path: + + Unknown setting: service { inet_listener { key + + Any filters won't be shown, because they don't affect the result. + +M src/config/config-parser-private.h +M src/config/config-parser.c + +2017-05-19 17:44:30 +0300 Timo Sirainen (08406452b) + + imap: Move struct client_sync_context to imap-sync-private.h and add imap_ + prefix + + +M src/imap/imap-client.h +M src/imap/imap-sync-private.h +M src/imap/imap-sync.c + +2017-05-19 16:34:29 +0300 Timo Sirainen (67c25cb4a) + + imap: Allow plugins to replace existing FETCH handlers + + They can use imap_fetch_handler_lookup() to get the old init() function. + Then they can imap_fetch_handler_unregister() the existing handler and + register a new handler, which can do its own work and call the old init() if + needed. + +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h + +2017-05-17 16:47:43 +0300 Timo Sirainen (0a1a4e586) + + lib-index: Improve "start_offset > current sync_offset" error message. + + Try to make it clear what is the root cause of it. + +M src/lib-index/mail-transaction-log-file.c + +2017-05-17 16:28:58 +0300 Timo Sirainen (a0c8af555) + + lib-index: mail_transaction_log_file_get_highest_modseq_at() - return error + string + + This can help figuring out why some error happened when more context is + provided in the caller's error messages. + +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log-view.c +M src/lib-index/test-mail-transaction-log-view.c + +2017-05-17 16:21:54 +0300 Timo Sirainen (20a10690f) + + lib-index: Add missing error logging for mail_index_view_sync_begin() + + +M src/lib-index/mail-index-view-sync.c + +2017-05-17 13:33:44 +0300 Timo Sirainen (ce9d23c7c) + + lib-index: mail_transaction_log_file_map() - return reason/error string + + This can help figuring out why some error happened when more context is + provided in the caller's error messages. + +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log-view.c +M src/lib-index/mail-transaction-log.c +M src/lib-index/test-mail-transaction-log-view.c + +2017-05-17 13:31:09 +0300 Timo Sirainen (ac8cb75fb) + + lib-index: mail_transaction_log_view_set_all() - don't entirely ignore + corrupted logs + + Ignore them only if it's followed by an index reset. + +M src/lib-index/mail-transaction-log-view.c + +2017-05-19 11:05:22 +0300 Timo Sirainen (c44fcb83f) + + lib-storage: Don't crash if cache is thought broken for a newly saved mail + + It's a bug that it happens, but the resulting crash is confusing. Although + arguably this new error could be i_panic() instead. + + Fixes: Panic: file mail-index-transaction-update.c: line 1018 + (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= + mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq)) + +M src/lib-storage/index/index-mail.c + +2017-05-17 19:02:06 +0300 Timo Sirainen (369847496) + + imap NOTIFY: Flush any pending notifications on NOOP + + This is mainly to allow testing NOTIFY easily with imaptest scripts. This is + cheap anyway, because mailbox_list_notify_flush() doesn't do any syscalls + when there's no work. + +M src/imap/cmd-noop.c +M src/imap/imap-notify.c +M src/imap/imap-notify.h + +2017-05-17 19:01:57 +0300 Timo Sirainen (58a896279) + + lib-storage: Implement mailbox_list_notify_flush() + + This flushes any pending notifications. For now it only checks if there's a + pending notification waiting for a timeout. It could also stat() the files + to make sure, but that's probably unnecessary. + +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/mailbox-list-notify.c +M src/lib-storage/mailbox-list-notify.h +M src/lib-storage/mailbox-list-private.h + +2017-05-17 18:13:09 +0300 Timo Sirainen (a384b1fcc) + + lib-storage: Explicitly name function pointers in mailbox lists + + This allows adding more fields to struct mailbox_list_vfuncs without + compiler warnings. + +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/shared/shared-list.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-maildir.c +M src/lib-storage/list/mailbox-list-none.c + +2017-05-17 17:49:25 +0300 Timo Sirainen (3b86acdd4) + + lib-storage: Always update highestmodseq in mailbox list index + + This is required for mailbox-list-notify API to work correctly. For example + IMAP NOTIFY session with CONDSTORE enabled could be listening for + FlagChanges, but another session without CONDSTORE enabled could be updating + flags in a mailbox that has never been opened with CONDSTORE enabled. NOTIFY + wouldn't see this change, unless it was always written to + dovecot.list.index. + +M src/lib-storage/list/mailbox-list-index-status.c + +2017-05-17 17:14:05 +0300 Timo Sirainen (3ee009bb1) + + lib-storage: Fix mailbox list index notifications when modseqs aren't + enabled. + + No notifications were sent if highest_modseqs weren't updated in mailbox + list index. + +M src/lib-storage/list/mailbox-list-index-notify.c + +2017-05-17 11:40:53 +0300 Josef 'Jeff' Sipek (e031d9aaa) + + imap: login reply should be sent sooner + + +M src/imap/main.c + +2017-05-18 23:13:38 +0300 Timo Sirainen (a18b40c2c) + + lib-storage: Fix mailbox list index records without guid having invalid + flags + + With LAYOUT=index the mailbox is found with its GUID. If it doesn't exist, + the mailbox has to be either \NonExistent or \NoSelect. It probably doesn't + make much difference which one, so we'll fix them by adding \NoSelect. + + With other layouts the GUID is allowed to be empty, because it can be looked + up from the actual mailbox. + +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h + +2017-05-18 23:06:20 +0300 Timo Sirainen (0b2f4c222) + + lib-storage: Fix mailbox list index records with name_id=0 + + name_id=0 isn't valid, so it needs to be changed and writen to the disk. The + write-to-disk part wasn't working. + +M src/lib-storage/list/mailbox-list-index.c + +2016-03-30 09:33:02 +0300 Phil Carmody (032719188) + + lib: istream-concat - enforce cur_input==input[cur_idx] invariant + + Since the over-seek patch, this is now an invariant, so ensure it's always + true. + + Signed-off-by: Phil Carmody + +M src/lib/istream-concat.c + +2016-03-30 09:29:51 +0300 Phil Carmody (13fc4d6d2) + + lib: istream-concat - make cur_input always match input[cur_idx] + + We're deliberately not stepping into the NULL stream, don't let the cur_idx + indicate that we have moved into it, that's confusing. + + Signed-off-by: Phil Carmody + +M src/lib/istream-concat.c + +2017-05-18 21:10:33 +0300 Timo Sirainen (7efe57b10) + + imapc: Make sure a valid UIDVALIDITY is returned by SELECT + + Fixes errors such as: Error: Synchronization corrupted index header + (in-memory index): uidvalidity=0, but next_uid=9 + +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-05-18 21:08:23 +0300 Timo Sirainen (6e853fdf3) + + imapc: Fix assert-crash if server doesn't send EXISTS reply to SELECT + + Fixes: Panic: file imapc-sync.c: line 477 (imapc_sync_index): assertion + failed: (mbox->sync_fetch_first_uid == 1) + +M src/lib-storage/index/imapc/imapc-storage.c + +2017-05-18 20:18:24 +0300 Timo Sirainen (651630fe2) + + lib-imap-client: Change server IP only on connect() failures + + Also log an warning-level message about it. This is mainly useful to see + that a slow connection could be caused by a connect() timeout. Since more + IPs are still available, it's not yet an error. + +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-connection.h + +2017-05-18 19:42:03 +0300 Timo Sirainen (78aafd062) + + imapc: Fix infinite reconnection when server keeps sending corrupted state + + When corrupted state was found, imapc_client_mailbox_reconnect() is called + to reconnect. This call skipped the normal "is it safe to reconnect?" checks + causing potentially infinite reconnections. + +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-connection.h +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-05-18 19:40:04 +0300 Timo Sirainen (2e47584d7) + + lib-imap: imap_parser_unref() should always set parser=NULL + + Not just when the last reference is cleared. This is how *_unref()s should + work everywhere in Dovecot. This fixes a bug in lib-imap-client where a + parser could have been accessed after it was already freed. + +M src/lib-imap/imap-parser.c + +2017-05-18 18:09:56 +0300 Timo Sirainen (f4871975c) + + imapc: Avoid resending duplicate FETCH when reconnecting during the initial + sync + + +M src/lib-storage/index/imapc/imapc-sync.c + +2017-05-18 18:01:27 +0300 Timo Sirainen (bc3309d26) + + imapc: If initial SELECT fails, don't resend it twice on reconnect. + + +M src/lib-storage/index/imapc/imapc-storage.c + +2017-05-18 17:36:27 +0300 Timo Sirainen (e266d0222) + + lib-imap-client: Avoid infinite reconnection loops when retrying command + fails + + reconnect_command_count wasn't calculated correctly, because the SELECT and + potentially other following sync commands weren't included in it. + +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c + +2017-05-19 09:45:28 +0300 Timo Sirainen (cb4d75e1b) + + lib: Fix memory leak in test-istream-concat + + +M src/lib/test-istream-concat.c + +2017-05-18 12:32:12 +0300 Timo Sirainen (17aeaeec3) + + lib: Add dovecot_build_info variable containing Dovecot build information. + + By default this includes the version, including the git hash. The idea is + that this version information would be available in all the core dumps. + + The DOVECOT_BUILD_INFO can be overridden by compiling with: + + DOVECOT_BUILD_INFO='"build info"' make + +M src/lib/lib.c +M update-version.sh + +2017-05-18 22:18:15 +0300 Timo Sirainen (16b5dc27e) + + lib: Fix crash when seeking istream-concat to EOF and trying to read it + + +M src/lib/istream-concat.c +M src/lib/test-istream-concat.c + +2017-05-12 04:25:08 +0200 Stephan Bosch (0b753d79f) + + lib-http: Changed test-http-server to actually use the http-server API. + + This currently serves as a simple demonstration of how to structure an HTTP + server. + +M src/lib-http/test-http-server.c + +2017-05-12 04:23:10 +0200 Stephan Bosch (355b675a0) + + lib-http: server: Fixed detection of idle connection. + + This fixes the debug message; the behavior was otherwise correct. + +M src/lib-http/http-server-connection.c + +2017-05-18 14:59:51 +0300 Aki Tuomi (e5d60293a) + + virtual: Match any metadata condition + + The old code ignored succesful earlier matches for patterns, and stopped + looking on first non-matching metadata pattern. Now it breaks on error or on + first matching pattern. + +M src/plugins/virtual/virtual-config.c + +2017-05-17 15:20:35 +0300 Aki Tuomi (b93688275) + + lib-storage: Apply mailbox_list_iter_autocreate_filter on + mailbox_list_index_iter_next + + It skips mailbox_list_iter_next, so it needs to be applied here as well. + +M src/lib-storage/list/mailbox-list-index-iter.c + +2017-05-17 15:19:44 +0300 Aki Tuomi (b5c6ce2ab) + + lib-storage: Rename autocreate_iter_existing to + mailbox_list_iter_autocreate_filter + + It makes next commit possible + +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/mailbox-list-private.h + +2017-05-17 12:16:31 +0300 Aki Tuomi (da0b85092) + + lib-storage: Do not drop autocreate boxes when listing them + + Otherwise we skip folders, because array_delete() is removing boxes while + they're being iterated. + +M src/lib-storage/list/mailbox-list-iter.c + +2017-05-18 13:03:45 +0300 Timo Sirainen (78c3c40ee) + + dovecot --build-options: Add missing linefeed + + +M src/master/main.c + +2017-05-18 11:57:38 +0300 Timo Sirainen (cdc7ca129) + + director: Add old host's up/down and vhost count parameters to + director_flush_socket + + The "down" status allows the script to determine whether it should try to + perform any work on the old host. The vhost count may be unnecessary, but + might be useful for some purpose. + +M src/director/director.c +M src/director/director.h + +2017-05-17 12:26:42 +0300 Aki Tuomi (de5d6bb50) + + fts: Do not attempt to deinitialize backend if it's not set + + If FTS backend initialization fails or does not happen, flist->backend might + end up being NULL, and attempt to deinitialize NULL won't end well. + +M src/plugins/fts/fts-storage.c + +2017-05-17 10:35:03 +0300 Josef 'Jeff' Sipek (6dd7a0a5e) + + lib: include inttypes.h to get PRIu64 & friends + + Including it in lib.h allows all of the Dovecot code (as well as any + external plugins) to just use these macros without worrying about what + system headers to include. + +M configure.ac +M src/lib/compat.h +M src/lib/lib.h + +2017-04-30 12:31:48 +0300 Timo Sirainen (a76faea3e) + + dsync: Try to commit transactions every dsync_commit_msgs_interval messages + + This was first attempted to be implemented by + ec0cc8fa647794e44a1afaa448f495a713048dc4, but it was later partially + reverted by 5973d496b16721af6d2c1fa90b016aacddf13554. This current commit + should fix its problems. + +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-settings.c +M src/doveadm/doveadm-settings.h +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-brain.h +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-ibc.h +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-import.h + +2017-05-16 17:53:23 +0300 Timo Sirainen (e73fbb667) + + auth: If passdb/userdb ldap has blocking=yes, auth master shouldn't connect + to ldap + + +M src/auth/passdb-ldap.c +M src/auth/userdb-ldap.c + +2017-05-08 12:49:39 +0200 Stephan Bosch (b383ed51d) + + util: script: Increased the major protocol version due to earlier changes. + + +M src/lib-program-client/program-client-remote.c +M src/util/script.c + +2017-05-09 13:33:23 +0200 Stephan Bosch (7e993ece4) + + util: script: Amended protocol with the ability to convey a set of + environment variables that are passed to the script. + + The acceptable environment variables are selected using the -e parameter; + others are ignored silently. + +M src/lib-program-client/program-client-remote.c +M src/util/script.c + +2017-05-08 12:48:08 +0200 Stephan Bosch (bcba31003) + + util: script: Amended the protocol to pass arguments escaped to prevent + problems with newlines. + + Newlines are used as argument delimiters in the protocol, which will cause + problems. + +M src/lib-program-client/program-client-remote.c +M src/util/script.c + +2017-05-09 13:43:39 +0200 Stephan Bosch (fc2b14895) + + lib-program-client: local: Fixed use of unterminated string array of + environment variables in exec_child(). + + +M src/lib-program-client/program-client-local.c + +2017-05-09 14:22:06 +0200 Stephan Bosch (fba2690b7) + + lib-program-client: Made the test suite ignore the protocol version. + + +M src/lib-program-client/test-program-client-net.c +M src/lib-program-client/test-program-client-unix.c + +2017-05-15 15:35:37 +0300 Aki Tuomi (db576e4cd) + + mail-crypt-plugin: Set copy-hook only if save_version > 0 + + Otherwise we might use it in read-only mode, too. + +M src/plugins/mail-crypt/mail-crypt-plugin.c + +2017-05-10 12:44:25 +0300 Timo Sirainen (399f1dcb7) + + doveadm mailbox status: Add "firstsaved" field. + + +M doc/man/doveadm-mailbox.1.in +M src/doveadm/doveadm-mail-mailbox-status.c + +2017-05-04 19:59:41 +0300 Timo Sirainen (635f1b145) + + imapc: Try to merge STOREs together as much as possible when syncing + + +M src/lib-storage/index/imapc/imapc-sync.c +M src/lib-storage/index/imapc/imapc-sync.h + +2017-05-05 15:20:05 +0300 Timo Sirainen (0b45d816c) + + lib-storage: Avoid unnecessary UIDNEXT lookups after saving a mail + + The vsize checking code was expecting that this would always be a cheap + operation, but with imapc code it could trigger a remote STATUS (UIDNEXT) + call. Do this only when we've checked that this mailbox is updating vsize + header at all. + +M src/lib-storage/index/index-mailbox-size.c + +2017-05-12 15:42:31 +0300 Timo Sirainen (dee1520b5) + + imapc-quota: Avoid sending unnecessarily many GETQUOTA[ROOT] commands + + The last_refresh == ioloop_timeval check didn't work, because the refresh + itself updated ioloop_timeval. This caused a single quota lookup to issue + multiple GETQUOTA[ROOT] commands to imapc. + +M src/plugins/quota/quota-imapc.c + +2017-05-12 12:44:27 +0300 Josef 'Jeff' Sipek (5231ae561) + + lib-storage: add a mail user pre-deinit vfunc + + This allows plugins to perform checks right before the deinit call. + +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h + +2017-05-12 11:13:09 +0300 Timo Sirainen (b99515ba4) + + lib-storage: Add missing ATTR_FORMAT to mail_set_mail_cache_corrupted() + + +M src/lib-storage/mail-storage-private.h + +2017-05-12 02:37:22 +0200 Stephan Bosch (c5e048964) + + Added doc/man/doveadm-save.1 to .gitignore. + + +M .gitignore + +2017-05-11 09:24:57 +0300 Aki Tuomi (8d392e181) + + doc: Add manpage for doveadm-save + + +M doc/man/Makefile.am +A doc/man/doveadm-save.1.in + +2017-05-09 14:01:07 +0300 Aki Tuomi (7522446d6) + + lib-storage: Use new mail_cache_set_seq_corrupted_reason + + +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-05-09 14:00:38 +0300 Aki Tuomi (846624bde) + + lib-index: Add mail_cache_set_seq_corrupted_reason + + Marks a seq in cache corrupted, and removes that instead of the whole cache. + +M src/lib-index/mail-cache.c +M src/lib-index/mail-cache.h + +2017-05-09 14:29:04 +0300 Aki Tuomi (38228c961) + + lib-index: Add mail_cache_expunge_count + + It can be called to correctly handle cache counters when records are + removed. + +M src/lib-index/mail-cache-private.h +M src/lib-index/mail-cache-sync-update.c + +2017-05-10 12:40:27 +0300 Aki Tuomi (722c97742) + + ssl-proxy-openssl: Fix comparison to stricly boolean + + +M src/login-common/ssl-proxy-openssl.c + +2017-05-09 12:51:49 +0300 Josef 'Jeff' Sipek (f08b05d41) + + {lib,lib-fts}: fix builds with BSD make + + Without this change, BSD make doesn't know how to make a couple of the + generated files because the BUILT_SOURCES file names don't match exactly the + left hand sides of the rules. (GNU make somehow manages to match the rule + even though it is not an exact match.) + +M src/lib-fts/Makefile.am +M src/lib/Makefile.am + +2017-05-09 12:43:46 +0300 Josef 'Jeff' Sipek (b2760eb6b) + + lib: use full path to unicode data script + + This is a step toward fixing builds where object dir != source dir. + +M src/lib/Makefile.am + +2017-05-09 12:42:48 +0300 Josef 'Jeff' Sipek (58f9b440f) + + lib-fts: use full path to word-properties script + + This is a step toward fixing builds where object dir != source dir. + +M src/lib-fts/Makefile.am + +2017-05-09 12:36:40 +0300 Josef 'Jeff' Sipek (824107247) + + lib-fts: download data files into srcdir + + This is a step toward fixing builds where object dir != source dir. + +M src/lib-fts/Makefile.am + +2017-05-09 12:34:40 +0300 Josef 'Jeff' Sipek (16d84b900) + + lib: download unicode data into srcdir + + This is a step toward fixing builds where object dir != source dir. + +M src/lib/Makefile.am + +2017-05-10 10:55:49 +0300 Josef 'Jeff' Sipek (df7ac49c9) + + remove mystery file that appears to be unused + + +D .inslog2 + +2017-05-02 18:40:43 +0300 Timo Sirainen (f86e2ce4d) + + master: Send SIGQUIT to processes running at deinit to close socket + listeners. + + This allows Dovecot to be restarted even when some lmtp/doveadm process is + running for a long time. Otherwise it would keep the inet_listener socket + open and prevent the new Dovecot from binding to the port. + +M src/master/service-monitor.c + +2017-05-02 16:13:08 +0300 Timo Sirainen (4cbe2b4ee) + + lib-master: When running under master, close listeners immediately on + SIGQUIT + + +M src/lib-master/master-service.c + +2017-05-02 18:39:06 +0300 Timo Sirainen (d2c41d658) + + lib-master: Remove listener's IO earlier if possible + + This is needed for the next change to work properly. + +M src/lib-master/master-service.c + +2017-05-02 15:56:40 +0300 Timo Sirainen (6e5f8923e) + + master: Wait more precisely 5 secs at deinit for child processes to die. + + Use milliseconds granularity instead of seconds. + +M src/master/service-monitor.c + +2017-05-02 15:41:41 +0300 Timo Sirainen (2266b2b8a) + + lib: Use lib_signals_syscall_error() for write() failure in signal handler + + +M src/lib/lib-signals.c + +2017-05-02 15:41:04 +0300 Timo Sirainen (0d7d09c01) + + lib: Add lib_signals_syscall_error() + + +M src/lib/lib-signals.c +M src/lib/lib-signals.h + +2017-05-02 15:38:00 +0300 Timo Sirainen (ae7c75f57) + + lib: Add dec2str_buf() + + +M src/lib/strfuncs.c +M src/lib/strfuncs.h + +2017-05-09 13:15:42 +0300 Timo Sirainen (9fbe48fc1) + + man: Fix doveadm-flags examples + + Patch by Frank Ebert + +M doc/man/doveadm-flags.1.in + +2017-05-09 12:25:49 +0300 Aki Tuomi (614f5b6fe) + + auth: Do not use AUTH_SUBSYS_MECH in logging when request->mech is NULL + + This can happen when a lookup is done instead of authentication. + + Fixes auth: Panic: file auth-request.c: line 2560 (get_log_prefix): + assertion failed: (auth_request->mech != NULL) + +M src/auth/auth-request.c + +2017-05-09 10:07:55 +0300 Josef 'Jeff' Sipek (5b0cbd40c) + + configure: Remove --with-storages parameter + + Just compile all the storages, since the only benefit in limiting them is to + save a tiny bit of disk space. The recently added imapc quota code fails to + link if imapc storage isn't compiled in. This is the simplest way to fix + that. + +M .gitignore +M configure.ac +M src/lib-storage/Makefile.am +A src/lib-storage/mail-storage-register.c +A src/lib-storage/mailbox-list-register.c +D src/lib-storage/register/Makefile.am +M src/master/main.c + +2017-04-06 16:09:00 +0300 Aki Tuomi (165551d57) + + lib-master,login-common: Add dual cert support + + Adds new settings ssl_alt_cert and ssl_alt_key + +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h +M src/login-common/ssl-proxy-openssl.c + +2017-03-06 19:42:18 +0200 Phil Carmody (78717e55d) + + lib-fs: unit tests for fs-api/fs-posix + + A core component, really ought to be covered by the unit tests. This barely + scrapes the surface, but is better than nothing: filesystem/files/iterators, + read/write/exists, good and bad cases. + + Signed-off-by: Phil Carmody + +M src/lib-fs/Makefile.am +A src/lib-fs/test-fs-posix.c + +2017-05-08 12:24:52 +0300 Aki Tuomi (f469469a8) + + passdb-imap: Make sure ssl verification is possible with current settings + + +M src/auth/passdb-imap.c + +2017-05-08 12:24:21 +0300 Aki Tuomi (6a65a1d09) + + passdb-imap: Add ssl_ca_file setting + + Allow setting SSL trust roots from a file + +M src/auth/passdb-imap.c + +2017-04-28 20:28:23 +0300 Aki Tuomi (b6c725b36) + + passdb-imap: Add option to control certificate verification + + Turn it on by default + +M src/auth/passdb-imap.c + +2017-05-08 13:35:35 +0300 Aki Tuomi (7638b02e8) + + lib-ssl-iostream: Support IP address SANs + + +M src/lib-ssl-iostream/iostream-openssl-common.c + +2016-11-06 01:33:04 +0100 Stephan Bosch (eec5a564a) + + lib-lda: mail-send: Compose var_expand table only once. + + +M src/lib-lda/mail-send.c + +2016-11-06 13:17:26 +0100 Stephan Bosch (f0e0266a3) + + lib-lda: mail-send: Fixed debug message in mail_send_rejection() to use + correct address. + + +M src/lib-lda/mail-send.c + +2016-11-05 17:44:07 +0100 Stephan Bosch (66d13b498) + + lib-lda: Fixed indentation in mail-send.c. + + +M src/lib-lda/mail-send.c + +2017-05-04 09:14:17 +0300 Aki Tuomi (9850d535f) + + mail-crypt: Re-encrypt mails when copying/moving + + Otherwise the mail cannot be opened after moving + +M src/plugins/mail-crypt/mail-crypt-plugin.c + +2017-05-05 12:35:23 +0300 Timo Sirainen (cee926660) + + imap: Set FETCH transactions hidden only when \Seen flags are implicitly set + + This simplifies implementing some plugins and has no downsides to core + functionality. + +M src/imap/imap-fetch.c + +2017-05-04 17:31:47 +0300 Timo Sirainen (fccd110b4) + + lib-storage: Fix memory leak in mail_search_args_simplify() + + The leaks happened when search args were already initialized (which they + usually were at this point) and some of the args were dropped entirely. + + Improved the unit test to initialize search args before calling the + simplify, so valgrind would notice if there are any leaks. + +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/test-mail-search-args-simplify.c + +2017-04-04 00:32:07 +0200 Stephan Bosch (4ef99978b) + + lib-http: client: Fixed race condition between DNS refresh lookup and a soft + connection timeout. + + The refreshing DNS lookup cleared all the IPs, but the soft connection + timeout (and maybe other code) still relied on them. Adding tests everywhere + for host->ips_count == 0 is annoying, so I changed the DNS lookup code such + that the stale IPs remain present while the DNS lookup is being performed. + The pending lookup prevents new connections through + http_client_host_refresh(), so this will not create potentially useless + connections. + +M src/lib-http/http-client-host.c + +2017-05-02 12:18:40 +0300 Timo Sirainen (f950619b1) + + lib-imap: imap_append_string_for_humans() - Change CR/LF to space + + Practically this shouldn't matter, because in email headers a CR/LF is + always followed by a space/tab. But maybe this can be used for some other + purposes in future, and it makes the unit tests clearer. :) + +M src/lib-imap/imap-quote.c +M src/lib-imap/test-imap-quote.c + +2017-05-02 17:57:40 +0300 Timo Sirainen (167dbb662) + + lmtp: Fix assert-crash when proxy overrides mail_max_lock_timeout + + Time unit is required or the call fails. + +M src/lmtp/commands.c + +2017-05-02 15:02:25 +0300 Timo Sirainen (541f258d8) + + lib-master: Add comments to struct master_service_connection + + +M src/lib-master/master-service.h + +2017-05-01 22:23:36 +0200 Stephan Bosch (af0a12ae4) + + lib-index: mail-index-transaction-export: Fixed handling of + transaction_flag_updates_have_non_internal() return value. + + Found using Clang -Wstrict-bool. + +M src/lib-index/mail-index-transaction-export.c + +2017-05-01 22:19:43 +0200 Stephan Bosch (a0adfb2fe) + + lib-imap-client: Fixed NULL check in assertion to be proper boolean. + + Found using Clang -Wstrict-bool. + +M src/lib-imap-client/imapc-client.c + +2017-04-28 14:42:31 +0300 Aki Tuomi (332e3fd09) + + auth: Organize code into two unit tests + + auth-cache needs special setup + +M src/auth/Makefile.am +M src/auth/test-auth-request-var-expand.c +A src/auth/test-auth.h +M src/auth/test-db-dict.c +A src/auth/test-main.c +A src/auth/test-mock.c +M src/auth/test-username-filter.c + +2017-04-28 14:35:36 +0300 Timo Sirainen (cca398c2e) + + lib-storage: When save is aborted, close dest_mail without crashing + + Fixes: Panic: file mail-index-transaction-update.c: line 1023 + (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= + mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq)) + + Because cache was still attempted to be updated, but the mail was already + expunged from index. + +M src/lib-storage/index/index-storage.c + +2017-04-28 14:06:43 +0300 Timo Sirainen (f776b9a12) + + lib-storage: Move backend code to a common index_storage_save_abort_last() + + +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-storage.h +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/mbox/mbox-save.c + +2017-04-27 14:09:08 +0300 Aki Tuomi (53e2b6954) + + auth: Log reason for skipping passdb + + +M src/auth/auth-request.c + +2017-04-28 12:49:37 +0300 Aki Tuomi (3a73b1355) + + auth: Add test suite for username filter + + +M src/auth/Makefile.am +A src/auth/test-username-filter.c + +2017-04-28 12:51:20 +0300 Aki Tuomi (268a76700) + + auth: Add username_filter for passdb block + + username_filter lets you specify one or more pattern(s) for including or + excluding users. exclusion patterns are denoted with ! prefix. + + if any exclude matches the username, passdb will be skipped. if any + inclusions is specified, and the username does not match one of them, passdb + will be skipped. + +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/auth/auth-settings.c +M src/auth/auth-settings.h +M src/auth/passdb.c +M src/auth/passdb.h + +2017-04-27 11:53:13 +0300 Aki Tuomi (2b7fbe3ba) + + auth: Use MECH subsystem when logging error about skipping all password + databases + + Otherwise it will assert-crash because all password databases were skipped. + +M src/auth/auth-request.c + +2017-04-28 10:25:14 +0300 Aki Tuomi (fee117f1b) + + auth: Refactor auth to use libauth.la + + This makes writing new unit tests easier, as you can link to libauth.la. + +M src/auth/Makefile.am + +2017-04-27 12:54:20 +0300 Timo Sirainen (06c956f41) + + lib-storage: mail_search_arg_to_imap() - Fix writing invalid keywords + + Just write the original invalid keyword string as output. It might not be + entirely invalid - just invalid within this mailbox (e.g. a mailbox doesn't + allow new keywords). + +M src/lib-storage/mail-search-args-imap.c + +2017-04-27 12:53:18 +0300 Timo Sirainen (483e8d497) + + lib-storage: Fix searching when search query has invalid keywords. + + For example "SEARCH KEYWORD ]" was returning all mails instead of nothing. + +M src/lib-storage/index/index-search.c +M src/lib-storage/mail-search.h + +2017-04-27 12:50:13 +0300 Timo Sirainen (cb1203abd) + + lib-index: mail_index_update_keywords() - don't assert if adding/removing 0 + keywords + + Although it would be nice for the caller to check it, it's easier to do + here. It's mainly a problem with mailbox_keywords_create_valid() that may + unexpectedly create empty keywords. + +M src/lib-index/mail-index-transaction-update.c + +2017-04-26 23:41:03 +0300 Timo Sirainen (3abc26e06) + + quota: imapc backend now never enforces the quota itself + + It just causes a lot of GETQUOTA/GETQUOTAROOT calls to remove. In theory we + could make this optional, but I doubt anyone would want it. + +M src/plugins/quota/quota-imapc.c + +2017-04-26 23:43:24 +0300 Timo Sirainen (49f65b7c7) + + lib-storage: Fix crash in mail_get_parts() with a special plugin + + If plugin hooks into mail_get_stream() which causes data->parts to be set, + this code crashed with: + + Panic: file index-mail.c: line 1163 (index_mail_parse_body): assertion + failed: (data->parser_ctx != NULL) + +M src/lib-storage/index/index-mail.c + +2017-04-26 23:13:20 +0300 Timo Sirainen (41f1944a2) + + imapc: Don't send NOOP on sync if MAILBOX_SYNC_FLAG_FAST is set + + Fast syncing should do only the minimal amount of work. + +M src/lib-storage/index/imapc/imapc-sync.c + +2017-04-26 15:04:23 +0300 Timo Sirainen (d64280bc4) + + imap: Allow plugins to hook into syncing. + + Ideally all of the existing pieces in the syncing code would start using + this at some point, so their code could be moved to a more logical location. + +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-sync-private.h +M src/imap/imap-sync.c + +2017-04-26 14:57:40 +0300 Timo Sirainen (55d35a8b8) + + imap: Move struct imap_sync_context to imap-sync-private.h + + +M src/imap/Makefile.am +A src/imap/imap-sync-private.h +M src/imap/imap-sync.c + +2017-04-18 15:55:08 +0300 Timo Sirainen (c4398800d) + + lib-storage: mail_search_arg_to_imap() - minor keywords writing optimization + + Avoid an extra str_delete() by checking whether the parenthesis are needed. + +M src/lib-storage/mail-search-args-imap.c + +2017-04-18 15:51:39 +0300 Timo Sirainen (64341148d) + + lib-storage: mail_search_arg_to_imap() - minor FLAGS writing optimization + + Avoid an extra str_delete() by immediately calculating whether the + parenthesis are needed. + +M src/lib-storage/mail-search-args-imap.c + +2017-04-18 15:38:59 +0300 Timo Sirainen (d6e496a8b) + + lib: Add bits_is_power_of_two() + + +M src/lib/bits.h +M src/lib/test-bits.c + +2017-04-17 01:14:02 +0300 Andriy Syrovenko (a319c3201) + + auth: Fixed dovecot/auth hanging when child ntlm_auth crashes while + processing an authentication request + + +M src/auth/mech-winbind.c + +2017-04-26 14:20:49 +0300 Timo Sirainen (e709efb3d) + + imapc: Fix memory leak when closing mailbox with delayed changes + + +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-25 12:39:04 +0300 Timo Sirainen (1e88ab82d) + + imapc: Use UID SEARCH instead of SEARCH + + UIDs work better for some broken IMAP servers, so it's safer to use it. + + Keep using sequences for ESEARCH, since servers supporting it aren't at + least yet known to be broken and the search result with sequences is + smaller. + +M src/lib-storage/index/imapc/imapc-search.c + +2017-04-24 17:59:53 +0300 Timo Sirainen (654c60f17) + + quota: Add imapc backend + + This allows using imapc storage with imapc quota. The quota acts as + read-only, so it's used only when the current quota usage is explicitly + asked. + + The quota can be looked up using either a mailbox name or quota root name. + By default INBOX's quota is looked up. If there are multiple quota roots + returned for the mailbox, only the first quota root returned by the + QUOTAROOT reply is used. + +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/plugins/quota/Makefile.am +A src/plugins/quota/quota-imapc.c +M src/plugins/quota/quota.c + +2017-04-24 17:58:53 +0300 Timo Sirainen (ecd54d6c6) + + quota: Fix namespace deduplication when mailboxes don't have paths. + + Nothing requires a mailbox path for quota backends, especially imapc. Still + do namespace deduplication based on alias_for settings. + +M src/plugins/quota/quota.c + +2017-04-24 17:10:10 +0300 Timo Sirainen (d15de2872) + + imapc: include imapc-client.h in imapc-storage.h + + It was already required to be able to successfully include imapc-storage.h. + +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c + +2017-04-24 18:13:13 +0300 Timo Sirainen (2c719bcb9) + + imap-plugins: Use client_add_capability() for adding dynamic capabilities + + +M src/plugins/imap-acl/imap-acl-plugin.c +M src/plugins/imap-quota/imap-quota-plugin.c +M src/plugins/imap-zlib/imap-zlib-plugin.c + +2017-04-24 18:51:53 +0300 Timo Sirainen (013a4ebb1) + + imap: Use client_add_capability() for adding all dynamic capabilities + + +M src/imap/imap-client.c + +2017-04-24 18:12:55 +0300 Timo Sirainen (f10f05dfa) + + imap: Add client_add_capability() + + +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-04-24 13:29:13 +0300 Timo Sirainen (e1005f8bf) + + imapc: Add imapc_features=fetch-bodystructure + + This allows using the remote IMAP server's BODY and BODYSTRUCTURE replies. + +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-24 13:27:43 +0300 Timo Sirainen (afe1da042) + + lib-storage: Add mail_storage.nonbody_access_fields + + This avoids index_mail_update_access_parts_pre() from opening the mail + stream unnecessarily for fields that can be looked up via other methods by + the storage. + +M src/lib-storage/index/index-mail.c +M src/lib-storage/mail-storage-private.h + +2017-04-24 13:05:48 +0300 Timo Sirainen (b2723d688) + + lib-storage: Add index_mail_get_cached_body[structure]() + + This just moves the code to these functions without changing any of the + logic. + +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h + +2017-04-24 14:04:01 +0300 Timo Sirainen (a8e6df07f) + + lib-imap: Make imap_bodystructure_parse_args() public + + +M src/lib-imap/imap-bodystructure.c +M src/lib-imap/imap-bodystructure.h + +2017-04-24 12:50:10 +0300 Timo Sirainen (2ec87250e) + + lib-imap: Add imap_write_arg() to write only a single arg + + +M src/lib-imap/imap-util.c +M src/lib-imap/imap-util.h + +2017-04-23 19:57:11 +0300 Timo Sirainen (a9e0cd4b1) + + lib-imap-client: Fix imapc_client_get_capabilities() when called without + connections + + +M src/lib-imap-client/imapc-client.c + +2017-04-23 17:19:36 +0300 Timo Sirainen (378653a02) + + imapc: Fix crash in mailbox_exists() when LAYOUT isn't imapc. + + Especially breaks LAYOUT=none. + +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-23 13:35:18 +0300 Timo Sirainen (a9ba935a4) + + imapc: Support imapc_features=search without ESEARCH extension + + +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-search.h + +2017-04-23 19:14:54 +0300 Timo Sirainen (e00612b24) + + imapc: Make sure client is logged in when checking capabilities + + Especially with imapc_features=delay-login the capability could have been + looked at before the client was even connected. + +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-23 18:51:02 +0300 Timo Sirainen (150542702) + + imapc: Add imapc_mailbox.capabilities + + Use it instead of imapc_client_get_capabilities(). Simplifies the following + patch. + +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c + +2017-04-23 18:57:15 +0300 Timo Sirainen (6e40a39f6) + + imapc: Rename imapc_storage_has_modseqs() to imapc_mailbox_has_modseqs() + + Simplifies the following patch. + +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c + +2017-04-21 12:54:17 +0300 Timo Sirainen (b394d41ad) + + cassandra: Use fallback consistency for CASS_ERROR_LIB_NO_HOSTS_AVAILABLE + errors + + I'm not entirely sure if this is always appropriate, but at least this error + happens every time when attempting to use write_consistency=two when there + is only a single Cassandra node. + +M src/lib-sql/driver-cassandra.c + +2017-04-21 20:59:55 +0300 Timo Sirainen (5107d3e3f) + + dsync-server: Fix support for dsync_features=empty-header-workaround + + Fixes: Panic: Unknown key: empty_hdr_workaround + +M src/doveadm/dsync/dsync-ibc-stream.c + +2017-04-21 13:36:27 +0300 Timo Sirainen (21b21a19b) + + *-login: Require client_vfuncs.send_raw_data() to be set + + This removes backwards compatibility for managesieve-login. + +M src/login-common/client-common.c + +2017-04-21 13:35:33 +0300 Timo Sirainen (ae797f336) + + *-login: Add client_vfuncs.send_raw_data() + + This allows login plugins to hook into seeing all the data that is sent to + the imap/pop3 client. + +M src/imap-login/imap-login-client.c +M src/imap-urlauth/imap-urlauth-login.c +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/pop3-login/client.c + +2017-04-21 13:27:18 +0300 Timo Sirainen (f231cd775) + + imap: Add imap_client_vfuncs.send_tagline() + + This allows plugins to catch all the IMAP command replies. + +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-04-18 10:23:37 +0300 Timo Sirainen (474e9ae6b) + + *-login: Unload plugins at deinit. + + +M src/login-common/main.c + +2017-04-19 15:01:19 +0300 Timo Sirainen (21a2a0360) + + lib-storage: Allow mail_add_temp_wanted_fields() to be called before + mail_set_seq*() + + Quota plugin was already doing this, but it didn't actually work. It was + also crashing with imapc: + + Panic: file mail-cache-lookup.c: line 341 (mail_cache_field_exists): + assertion failed: (seq > 0) + +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/index-mail.c + +2017-04-20 19:16:46 +0300 Timo Sirainen (0206ab42a) + + lib-storage: Add mailbox_attribute_unregister_internal[s]() + + This allows plugins to unregister internal attributes when they're unloaded. + +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-attribute.h + +2017-04-13 15:13:19 +0300 Timo Sirainen (cc23ad7b8) + + lib-storage: mail_search_args_simplify() - deduplicate flags + + This needs to be done in a bit more complicated way because multiple + SEARCH_FLAGS parameters are wanted to be merged together using a single + shared value.flags. Move this merging last after all the deduplication is + done. + +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/test-mail-search-args-simplify.c + +2017-04-13 15:09:19 +0300 Timo Sirainen (92f9871ac) + + lib-storage: mail_search_args_simplify() - simplify "x AND NOT x" + + Implemented for SEARCH_KEYWORD, SEARCH_TEXT, SEARCH_BODY and SEARCH_HEADER*. + Dates and sizes would need special code, which gets a bit complicated. + +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/test-mail-search-args-simplify.c + +2017-04-13 14:05:55 +0300 Timo Sirainen (47daf6e81) + + lib-storage: Add more tests to test-mail-search-args-simplify + + +M src/lib-storage/test-mail-search-args-simplify.c + +2017-04-13 13:57:41 +0300 Timo Sirainen (92f5ea24e) + + lib-storage: mail_search_arg_to_imap() - remove () around a single + flag/keyword + + +M src/lib-storage/mail-search-args-cmdline.c +M src/lib-storage/mail-search-args-imap.c +M src/lib-storage/test-mail-search-args-imap.c +M src/lib-storage/test-mail-search-args-simplify.c + +2017-04-13 13:04:25 +0300 Timo Sirainen (1c0020171) + + lib-storage: mail_search_args_simplify() - deduplicate KEYWORDs + + +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/test-mail-search-args-simplify.c + +2017-04-13 12:51:25 +0300 Timo Sirainen (7b6ebd549) + + lib-storage: mail_search_args_to_cmdline() - Fix writing FLAGS & KEYWORDS + + +M src/lib-storage/mail-search-args-cmdline.c + +2017-04-13 12:36:30 +0300 Timo Sirainen (56c05fa82) + + lib-storage: mail_search_args_to_cmdline() - Write MAILBOX glob without X- + prefix + + Since SEARCH_MAILBOX is written out as "MAILBOX", SEARCH_MAILBOX_GLOB should + also be written as "MAILBOX" rather than "X-MAILBOX". + +M src/lib-storage/mail-search-args-cmdline.c + +2017-04-12 12:24:05 +0300 Timo Sirainen (17076d50d) + + Makefile: Another fix for make distcheck when using scan-build + + It seems to run two configures with different parameters, which results in + some of the files not being cleaned up. So this hopefully fixes: + + ERROR: files left in build directory after distclean: + ./src/util/tcpwrap + +M Makefile.am + +2017-04-11 09:34:11 +0200 Stephan Bosch (da269a564) + + lib-imap: imap-bodystructure: Fixed handling of a multipart part without + children in imap_bodystructure_parse(). + + In imap_bodystructure_write(), an empty multipart part is addressed by + generating an empty text/plain part. However, when parsing that back with + imap_bodystructure_parse() against a parsed message_part tree, this case + needs to be considered explicitly. Otherwise, it will not be able to match + the message part hierarchies. + + This adds a test suite item that tests both the write (previous commit) and + parse functions. + +M src/lib-imap/imap-bodystructure.c +M src/lib-imap/test-imap-bodystructure.c + +2017-04-12 10:13:15 +0200 Stephan Bosch (cc419b54f) + + lib-imap: imap-bodystructure: Fixed handling of a multipart part without + children in imap_bodystructure_write(). + + In that case it writes an empty text/plain part to prevent generating an + invalid BODYSTRUCURE. However, it always generated the basic BODY version + without the extra fields for a full BODYSTRUCTURE. + +M src/lib-imap/imap-bodystructure.c + +2017-04-11 20:39:55 +0300 Aki Tuomi (c6ae57a03) + + auth: Check var_expand error in vpopmail + + +M src/auth/userdb-vpopmail.c + +2017-04-11 20:32:19 +0300 Aki Tuomi (e2d97f20a) + + auth: Fix compile problem with vpopmail + + 79fe1b28df44ba22b230326bee895583c1df5a28 forgot to remove const from table. + +M src/auth/userdb-vpopmail.c + +2017-04-11 15:50:14 +0300 Aki Tuomi (061b11b93) + + auth: Filter passdbs on credentials lookup start + + Consistency with how plain verify works. + +M src/auth/auth-request.c + +2017-04-11 15:47:33 +0300 Aki Tuomi (ba942a16b) + + auth: Fix mechanism filter to support `none` + + Otherwise credentials lookup can fail. None indicates that it should match + when no mech is specified. + +M src/auth/auth-request.c + +2017-04-11 15:33:22 +0300 Timo Sirainen (ace06232c) + + auth: Use mem_equals_timing_safe() for all password hash comparisons. + + It's unlikely these could be used to perform timing attacks, since the + attacker would have to have broken MD5/SHA badly enough to be able to + quickly generate string that result in wanted hashes. Still, the extra cost + is almost nothing and it's always better to be super paranoid! + +M src/auth/auth-master-connection.c +M src/auth/mech-apop.c +M src/auth/mech-cram-md5.c +M src/auth/mech-digest-md5.c +M src/auth/mech-gssapi.c +M src/auth/mech-ntlm.c +M src/auth/mech-rpa.c +M src/auth/mech-scram-sha1.c +M src/auth/password-scheme-pbkdf2.c +M src/auth/password-scheme-scram.c +M src/auth/password-scheme.c + +2017-04-09 15:31:11 +0300 Timo Sirainen (e18b4e41d) + + auth: Shuffle failed auth requests before sending the failure replies. + + This might be helpful against some timing attacks. + + Using Fisher–Yates shuffle. + +M src/auth/auth-request-handler.c + +2017-04-09 15:19:25 +0300 Timo Sirainen (2656508b1) + + doveadm: Make doveadm_password safe against timing attacks. + + +M src/doveadm/client-connection.c + +2017-04-09 00:50:15 +0300 Timo Sirainen (f1d759d0b) + + auth: Make plaintext password comparisons safe against timing attacks + + +M src/auth/password-scheme.c + +2017-04-09 00:49:37 +0300 Timo Sirainen (9464dc83d) + + lib: Add mem_equals_timing_safe() + + +M src/lib/strfuncs.c +M src/lib/strfuncs.h +M src/lib/test-strfuncs.c + +2017-04-10 20:53:29 +0300 Aki Tuomi (2bc82f0d7) + + fts: Initialize fts after namespaces have been added + + This way paths are correctly set, and fts indexes are written to correct + place. This affects mbox with lucene. + + Fixes Panic: file mailbox-list.c: line 1158 (mailbox_list_try_mkdir_root): + assertion failed (strncmp(root_dir, path, strlen(root_dir)) == 0) + +M src/plugins/fts/fts-plugin.c +M src/plugins/fts/fts-storage.c +M src/plugins/fts/fts-storage.h + +2017-04-11 15:05:53 +0300 Aki Tuomi (c42ec3faf) + + fts: Remove indentation from fts_mailbox_list_created + + Preparation for next commit + +M src/plugins/fts/fts-storage.c + +2017-04-11 14:55:04 +0300 Timo Sirainen (38bf95934) + + Makefile: Fix make distcheck when using scan-build + + The _build directory shouldn't be deleted afterwards or it'll just fail. + +M Makefile.am + +2017-04-11 11:23:17 +0300 Timo Sirainen (353d9741c) + + Improve valgrind suppressions. + + +M run-test-valgrind.supp + +2017-04-10 18:12:47 +0300 Timo Sirainen (a2328a1c6) + + lib-imap-client: Fixes to unit test + + +M src/lib-imap-client/test-imapc-client.c + +2017-04-10 17:10:21 +0300 Timo Sirainen (bac4b1dc3) + + lib-imap-client: Add unit test + + Initially this tests some connection and reconnection problems. + +M src/lib-imap-client/Makefile.am +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +A src/lib-imap-client/test-imapc-client.c + +2017-04-10 17:09:29 +0300 Timo Sirainen (40b989ef6) + + lib-imap-client: Include "ms" in reconnect warning message + + +M src/lib-imap-client/imapc-connection.c + +2017-04-10 17:07:28 +0300 Timo Sirainen (23b8146dd) + + lib-imap-client: Fix reconnection + + There was already code for reconnection. We just shouldn't have gone very + far in imapc_connection_connect() if we were still waiting for reconnection + delay to pass. + +M src/lib-imap-client/imapc-connection.c + +2017-04-10 17:06:34 +0300 Timo Sirainen (b884dafdd) + + lib-imap-client: Remove hardcoded IMAPC_CONNECT_RETRY_WAIT_MSECS + + We have a setting for it now. + +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-connection.h + +2017-04-10 16:44:52 +0300 Timo Sirainen (09c2c5ad6) + + lib-imap-client: Disconnection during LOGIN should still have + state=disconnected + + It's not an authentication failure, which would imply that the user or + password was wrong. + +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c + +2017-04-10 16:18:46 +0300 Timo Sirainen (cda5d6350) + + lib-imap-client: Make command tag counter externally accessible + + This allows unit tests to reset it. + +M src/lib-imap-client/imapc-client-private.h +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c + +2017-04-10 15:49:24 +0300 Timo Sirainen (f3e5f802f) + + lib-imap-client: Call the public login callback exactly once. + + Previously it was also called only once, as long as there were only a single + imap connection. (The current imapc code wouldn't create more than one + connection.) It was a bit confusing what the expectation was, so now the + callback is never called more than once. + +M src/lib-imap-client/imapc-client-private.h +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-connection.h + +2017-04-10 14:14:40 +0300 Timo Sirainen (7b29303ef) + + lib-imap-client: imapc_client_deinit() didn't set client=NULL + + +M src/lib-imap-client/imapc-client.c + +2017-04-10 13:49:33 +0300 Timo Sirainen (efd4de737) + + imapc: Change imapc_connection_retry_interval setting to be in milliseconds. + + +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-10 13:50:40 +0300 Timo Sirainen (063597b19) + + imapc: Change imapc_connection_retry_interval default to be 1 second. + + 10 secs at least is too high. Usually the connection problem is very + intermittent and even an immediate reconnection would succeed. + +M src/lib-storage/index/imapc/imapc-settings.c + +2017-04-10 13:48:23 +0300 Timo Sirainen (4727aef38) + + lib-imap-client: Change connect_retry_interval_secs to _msecs + + This allows caller to provide better precision. + +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-10 13:46:03 +0300 Timo Sirainen (8f47ed142) + + lib-imap-client: Use struct timeval for tracking last_connect time. + + This provides better accuracy when calculating how much time there's left + until reconnection. + +M src/lib-imap-client/imapc-connection.c + +2017-04-10 13:02:17 +0300 Timo Sirainen (f27497406) + + lib-http: Improve request stats text. + + It's important to know how long the request was in queue before it was sent. + + Also the "n attempts in m secs" makes more sense if it was counting only the + time after the initial request was sent, not including the queuing time. + + If there is more than 1 attempt, log separately how long all the attempts + were waited on vs. how long the last attempt took. + +M src/lib-http/http-client-request.c + +2017-04-10 12:59:08 +0300 Timo Sirainen (bf7740f6b) + + lib-http: Add http_client_request_stats.first_sent_msecs + + Also rename sent_msecs to last_sent_msecs. + +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h + +2017-04-10 12:53:43 +0300 Timo Sirainen (f0452e0b3) + + lib-http: Track request's first and last send attempt times separately. + + +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c + +2017-04-10 11:51:51 +0300 Timo Sirainen (a89fc6c50) + + lib-program-client unit test: Let OS assign the listener port + + +M src/lib-program-client/test-program-client-net.c + +2017-04-05 12:36:32 +0300 Timo Sirainen (a87eeb418) + + *-login: Move code to login_anvil_init() + + Calling this allows plugins that need to talk to anvil make sure they have + an anvil connection even if mail_max_userip_connections=0. + +M src/login-common/login-common.h +M src/login-common/main.c + +2017-04-05 12:52:14 +0300 Timo Sirainen (f6b8ff28f) + + doveadm who: Don't aggregate empty usernames with different IPs + + We'll assume that in that case anvil is used to track IP addresses rather + than usernames. (Dovecot core doesn't currently use this.) + +M src/doveadm/doveadm-who.c + +2017-04-07 09:28:55 +0300 Timo Sirainen (935c09c68) + + lib-http: Remove unnecessary enum declaration. + + Most of these were removed by a8fe899601735459641edae975c0fa08be8482e2 + +M src/lib-http/http-client-private.h + +2017-04-05 14:14:57 +0300 Timo Sirainen (267cdf292) + + example-config: Add blocking setting to dovecot-ldap.conf.ext + + +M doc/example-config/dovecot-ldap.conf.ext + +2017-04-08 09:58:57 +0300 Timo Sirainen (71b8d0ad8) + + auth-var-expand-crypt plugin: Add missing ldflags + + +M src/plugins/var-expand-crypt/Makefile.am + +2017-04-09 15:48:59 +0300 Timo Sirainen (44d597bb3) + + fts-solr: Don't double-escape headers. + + +M src/plugins/fts-solr/fts-backend-solr.c + +2017-04-07 16:27:12 +0300 Timo Sirainen (727ae1595) + + auth: Fix crash in passdb imap on connection failures + + +M src/auth/passdb-imap.c + +2017-04-07 16:13:13 +0300 Timo Sirainen (0fab9e25d) + + lib-ssl-iostream: Don't require SSL CA certs if allow_invalid_cert=TRUE + + This happened only when verify_remote_cert was also TRUE. But this behavior + now allows verifying the cert without actually requiring it to be valid. + +M src/lib-ssl-iostream/iostream-openssl-context.c + +2017-04-07 15:47:27 +0300 Timo Sirainen (49bf57720) + + auth: passdb imap: Use ssl_client_ca_* settings. + + The args = ssl_ca_dir=.. setting still overrides the ssl_client_ca_dir. + +M src/auth/passdb-imap.c + +2017-04-07 09:34:39 +0300 Timo Sirainen (4d26a4093) + + global: Remove extra ';' to fix compiler errors + + Sun C doesn't like them. + +M src/auth/auth-policy.c +M src/plugins/mail-crypt/mail-crypt-key.c + +2017-04-07 09:32:30 +0300 Timo Sirainen (cbf6592b0) + + global: Make sure all files end with newline + + Fixes compiler warnings with Sun C. + +M src/lib-imap/imap-envelope.c +M src/lib-mail/message-part-data.c +M src/lib-mail/message-part-data.h + +2017-04-07 10:55:40 +0300 Timo Sirainen (34354d4b9) + + fs-posix: Fix FS_METADATA_WRITE_FNAME to preserve the path + + It should only change the filename. + +M src/lib-fs/fs-posix.c + +2017-04-07 12:45:49 +0300 Timo Sirainen (bd0811156) + + doveadm force-resync: Skip autocreated mailboxes that don't exist yet. + + Since they don't exist, there's nothing to resync in them either. This + avoids unnecessarily creating them. + +M src/doveadm/doveadm-mail.c + +2017-04-07 12:42:12 +0300 Timo Sirainen (c2eecb35a) + + dict-sql: Fix setting $variables to iteration key when map had multiple + values + + +M src/lib-dict/dict-sql.c + +2017-04-07 09:14:27 +0300 Timo Sirainen (76858e9df) + + lib: Redefine NULL only if HAVE_TYPE_CHECKS is set + + +M src/lib/compat.h + +2017-04-07 09:11:53 +0300 Timo Sirainen (d16199fcc) + + lib: Add a common HAVE_TYPE_CHECKS + + I'm not sure if it should be checking gcc >= 3.0 or 3.3, but they're all old + so doesn't really matter. + + The __cplusplus check was added to both, since it wouldn't have done + anything anyway as COMPILE_ERROR_IF_TRUE() is 0 for __cplusplus. + +M src/lib/compat.h +M src/lib/macros.h + +2017-04-05 15:59:51 +0300 Timo Sirainen (56af9dd10) + + *-login: Minor logging cleanup if client is disconnected before sending + banner. + + Avoid unnecessarily adding "(no auth attempts in 0 secs)" when the reason + string already makes it clear that the user didn't even have a chance to + authenticate. + + This kind of disconnection currently happens only with some plugins. + +M src/imap-login/imap-login-client.c +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/pop3-login/client.c + +2017-04-06 20:43:20 +0300 Timo Sirainen (5f6b917cd) + + example-config: Add connect/read/write_timeout to mysql connect settings + + +M doc/example-config/dovecot-sql.conf.ext + +2017-04-06 20:00:31 +0300 Timo Sirainen (294c52ba4) + + imapc: Remove "_sec" suffix from imapc_connection_retry_interval_secs + + Its type is SET_TIME, so the value doesn't have to be in seconds. + +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-06 19:49:07 +0300 Aki Tuomi (4f6a9b5de) + + imap-login: Retain client ID only when enabled + + +M src/imap-login/imap-login-client.c + +2017-04-05 14:23:47 +0300 Aki Tuomi (a34e0eb3d) + + lib-storage: Set internal error in imapc_list_get_hierarchy_sep + + +M src/lib-storage/index/imapc/imapc-list.c + +2017-04-05 14:23:26 +0300 Aki Tuomi (fc1584e52) + + imapc: Use IMAPC_COMMAND_STATE_AUTH_FAILED to indicate auth failure + + +M src/auth/passdb-imap.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c + +2017-04-05 14:22:38 +0300 Aki Tuomi (f498f60e7) + + lib-imap-client: Do not reset ips when reconnecting + + Avoids infinite loop + +M src/lib-imap-client/imapc-connection.c + +2017-04-05 13:27:57 +0300 Aki Tuomi (9949dc364) + + lib-storage: Return empty value in imapc_list_get_storage_name on auth error + + Avoids clobbering authentication error. + +M src/lib-storage/index/imapc/imapc-list.c + +2017-04-05 12:48:31 +0300 Aki Tuomi (1f31b38b6) + + lib-storage: Do not clobber error with imapc + + +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-05 12:47:24 +0300 Aki Tuomi (276c62e45) + + global: Fix imapc_client_login usage + + +M src/auth/passdb-imap.c +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-storage/index/imapc/imapc-storage.c + +2017-04-05 12:09:57 +0300 Aki Tuomi (dc2bbf107) + + lib-imap-client: Add login_callback setter + + This way it can be set before actually calling login which might happen some + time later. + +M src/lib-imap-client/imapc-client-private.h +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h + +2017-04-04 23:33:51 +0300 Dmitry Yakunin (52ca467ce) + + imapc: Fix memory leak in disconnected state + + +M src/lib-imap-client/imapc-connection.c + +2017-04-05 09:26:54 +0300 Aki Tuomi (a8396081c) + + auth: Update default policy string to include device id and protocol + + +M src/auth/auth-settings.c + +2017-04-04 15:59:04 +0300 Timo Sirainen (670a335d5) + + imap: Set command reason strings using the new human_args + + This way the reason string is already suitable for logging, since it's + guaranteed to be valid UTF-8 without control chars. + +M src/imap/imap-commands-util.c + +2017-04-04 15:58:42 +0300 Timo Sirainen (bf9e29ed2) + + imap: Add client_command_context.human_args + + Generated with imap_write_args_for_human() + +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-04-04 15:58:15 +0300 Timo Sirainen (72932593c) + + lib-imap: Add imap_write_args_for_human() + + +M src/lib-imap/imap-util.c +M src/lib-imap/imap-util.h + +2017-04-04 15:38:00 +0300 Timo Sirainen (1dc34a3c9) + + imap: Add imap_client_command_get_reason() + + All the command -> reason string conversions now go through this function. + +M src/imap/cmd-fetch.c +M src/imap/imap-commands-util.c +M src/imap/imap-commands-util.h + +2017-04-04 13:28:44 +0300 Timo Sirainen (9778cce39) + + lib: Increase net_connect*() EADDRNOTAVAIL retries to 20 + + 4 is too little, since on busy systems it's sometimes failing. These calls + should be pretty cheap, so lets try if 20 is enough. + + It would be nice if this was configurable, but the only practical way right + now would be to use environment variable, which is a bit ugly. We could try + it next if 20 is still not enough. + +M src/lib/net.c + +2017-04-04 07:42:48 +0300 Martti Rannanjärvi (a934b65e8) + + config: Warn that director_consistent_hashing is obsolete + + +M src/config/old-set-parser.c + +2017-04-03 18:44:52 +0300 Timo Sirainen (f67a8e413) + + imapc: Compiler warning fix for 32bit systems + + +M src/lib-imap-client/imapc-connection.c + +2017-04-03 14:30:13 +0300 Martti Rannanjärvi (00cc7eb56) + + director: Make director_consistent_hashing=yes mandatory + + +M src/director/director-connection.c +M src/director/director-settings.c +M src/director/director-settings.h +M src/director/director.c +M src/director/doveadm-connection.c +M src/director/mail-host.c +M src/director/mail-host.h + +2017-03-31 10:57:14 +0300 Aki Tuomi (2744124e4) + + lib-imap-client: Make authentication failures more consistent + + This way they always say the same prefix, which is easier to spot. + +M src/lib-imap-client/imapc-connection.c + +2017-03-31 10:49:50 +0300 Aki Tuomi (a82e26d85) + + lib-imap-client: Call login_callback on all authentication failures + + +M src/lib-imap-client/imapc-connection.c + +2017-03-31 10:12:58 +0300 Aki Tuomi (138ec8765) + + lib-imap-client: Fix reconnection + + This patch fixes reconnections to actually consider all IP addresses first + and then delay for interval and retry at most retry count times. + +M src/lib-imap-client/imapc-connection.c + +2017-03-31 11:01:15 +0300 Aki Tuomi (887518721) + + lib-imap-client: Remove io earlier to avoid hammering + + If connection has failed and reconnection is not yet possible, io has to be + removed here, otherwise it will keep hammering the callback. + +M src/lib-imap-client/imapc-connection.c + +2017-03-31 10:58:47 +0300 Aki Tuomi (42989c273) + + lib-imap-client: Only LOGOUT from connected connections + + +M src/lib-imap-client/imapc-client.c + +2017-03-31 09:44:28 +0300 Aki Tuomi (c515f5c96) + + lib-imap-client: Make retry count and interval configurable + + +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c + +2017-03-31 09:59:02 +0300 Aki Tuomi (eae7a1783) + + lib-imap-client: Add imapc_client_try_stop + + +M src/lib-imap-client/imapc-client-private.h +M src/lib-imap-client/imapc-client.c + +2017-03-30 16:09:06 +0300 Aki Tuomi (feb5f5eb7) + + lib-sasl: Add missing input handler for xoauth2 + + +M src/lib-sasl/mech-oauthbearer.c + +2017-04-03 12:40:51 +0300 Timo Sirainen (4d074a5c4) + + director: Fix mail_hosts_dup() to duplicate tags correctly. + + The host->tag pointed to the old hosts list. Also the new hosts list's tags + array wasn't filled. + + This fixes USER-LOOKUP to return host with default configuration, which + fixes doveadm director status to not show "Initial config" as empty. + +M src/director/mail-host.c + +2017-04-03 11:41:29 +0300 Martti Rannanjärvi (8c468894f) + + doveadm: Call mailbox_set_reason with initialized mailbox + + +M src/doveadm/doveadm-mail-import.c + +2017-04-01 22:12:37 +0300 Timo Sirainen (cddfd1355) + + global: Add mailbox_transaction_set_reason() calls + + Added to the most important places. + +M src/imap/cmd-append.c +M src/imap/cmd-copy.c +M src/imap/cmd-fetch.c +M src/imap/cmd-select.c +M src/imap/cmd-store.c +M src/imap/cmd-thread.c +M src/imap/imap-commands-util.c +M src/imap/imap-commands-util.h +M src/imap/imap-expunge.c +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h +M src/imap/imap-search.c +M src/imap/imap-state.c +M src/imap/imap-sync.c +M src/indexer/master-connection.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/mail-autoexpunge.c +M src/plugins/quota/quota-storage.c + +2017-04-01 21:54:30 +0300 Timo Sirainen (d1fbd2c26) + + lib-storage: Add mailbox_transaction_set_reason() + + +M src/lib-storage/index/index-transaction.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-04-01 21:43:16 +0300 Timo Sirainen (61cf001f1) + + global: Add mailbox_set_reason() calls + + Added to the most important places. + +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-iter.c +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail-mailbox-status.c +M src/doveadm/doveadm-mail-mailbox.c +M src/doveadm/doveadm-mail-save.c +M src/doveadm/doveadm-mail.c +M src/imap/cmd-create.c +M src/imap/cmd-delete.c +M src/imap/cmd-getmetadata.c +M src/imap/cmd-notify.c +M src/imap/cmd-rename.c +M src/imap/cmd-resetkey.c +M src/imap/cmd-select.c +M src/imap/cmd-setmetadata.c +M src/imap/cmd-subscribe.c +M src/imap/imap-commands-util.c +M src/imap/imap-notify.c +M src/imap/imap-state.c +M src/imap/imap-status.c +M src/indexer/master-connection.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-imap-storage/imap-msgpart-url.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-lda/mail-deliver.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-storage.c +M src/lmtp/commands.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-status.c +M src/plugins/trash/trash-plugin.c +M src/plugins/virtual/virtual-config.c +M src/plugins/virtual/virtual-storage.c +M src/pop3/pop3-client.c + +2017-04-01 21:16:37 +0300 Timo Sirainen (4b41218f9) + + lib-storage: Add mailbox_set_reason() + + Use it to log a debug message when mailbox is being opened. + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-03-27 18:05:29 +0300 Timo Sirainen (92dab926b) + + lib-index: Don't increase modseq for backend/dirty flag changes + + These flags are used only for internal changes and they shouldn't be + triggering any modseq changes. + + To avoid modseqs from unexpectedly shrinking, the new modseq counting + behavior is enabled only for newly rotated transaction log files that have a + new minor_version. + +M src/doveadm/doveadm-dump-log.c +M src/lib-index/mail-index-transaction-export.c +M src/lib-index/mail-transaction-log-append.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log-view.c +M src/lib-index/mail-transaction-log.c +M src/lib-index/mail-transaction-log.h +M src/lib-index/test-mail-transaction-log-append.c +M src/lib-index/test-mail-transaction-log-view.c + +2017-03-30 20:38:44 +0300 Timo Sirainen (e0f4fbf12) + + lib-index: Add macros to check if transaction log file version is new + enough. + + The version numbers are 8bit, so we can generate a single 16bit number out + of them. + +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log.h + +2017-03-29 01:25:21 +0200 Stephan Bosch (28be42b4c) + + lib-http: client: Implemented means to obtain request statistics. + + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h + +2017-03-31 23:12:47 +0300 Aki Tuomi (75a6a96fd) + + lib: Fix strcasecmp mistake in var-expand + + +M src/lib/var-expand.c + +2017-03-31 16:42:55 +0300 Timo Sirainen (f33cd5b8b) + + lmtp: Die at startup if config reading fails. + + Although most of the time it's not strictly required for config to be read + here, one exception is SSL server settings. If this config reading fails, + the SSL initialization just crashes. So this gives a better error message + than a crash. Also config reading really isn't supposed to fail anyway. + +M src/lmtp/main.c + +2017-03-30 23:25:40 +0300 Timo Sirainen (5930d3ff7) + + lib-index: Assert in mail_index_append_finish_uids() to prevent UID wrapping + + This should be handled better eventually, but it's better to crash earlier + now than later. This avoids a later assert: + + Panic: file mail-index-transaction-finish.c: line 187 + (mail_index_transaction_get_uid): assertion failed: (rec->uid != 0) + +M src/lib-index/mail-index-transaction-update.c + +2017-03-31 12:28:56 +0300 Timo Sirainen (15fa03837) + + lib-fs: Add FS_METADATA_ORIG_PATH + + This allows fs backends to keep track of the original filename and use it + for logging purposes and such. + +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h + +2017-03-31 12:28:01 +0300 Timo Sirainen (8f900bf5b) + + lib-fs: Allow fs_set_metadata() to update already added metadata. + + Previously we were just appending the metadata multiple times with different + values, which could have caused problems. + +M src/lib-fs/fs-api.c + +2017-03-30 16:43:58 +0300 Timo Sirainen (b1e097e04) + + quota, acl: Use mail_user_plugin_getenv_bool() for boolean settings + + These were forgotten earlier. + +M src/plugins/acl/acl-backend.c +M src/plugins/quota/quota.c + +2017-03-31 01:02:49 +0300 Timo Sirainen (01c7913d4) + + imap: Fix assert-crash when hibernation triggers during IDLE syncing + + Fixes: Panic: file cmd-idle.c: line 182 (idle_hibernate_timeout): assertion + failed: (ctx->sync_ctx == NULL) + +M src/imap/cmd-idle.c + +2017-03-30 23:46:02 +0300 Timo Sirainen (eed02e3be) + + lib-http: http_client_request_delay_from_response() should use per-request + timeout as max + + It was using the global request_timeout_msecs for the maximum timeout, which + could be different from the per-request timeout set by + http_client_request_set_attempt_timeout_msecs(). + +M src/lib-http/http-client-request.c + +2017-03-30 22:29:13 +0200 Stephan Bosch (210256b5d) + + lib-http: client: Fixed request-specific attempt timeout. + + This is the timeout applied to a single request attempt. Using + http_client_request_set_attempt_timeout_msecs() this can be set for a + specific request. However, this was mostly ignored for requests that weren't + in the process of handling response payload. Instead, the global + request_timeout_msecs client setting was used. + + Also amended the (currently manual) test suite with tests that demonstated + the problem and now verify the fix. + +M src/lib-http/http-client-connection.c +M src/lib-http/test-http-client-errors.c + +2017-03-28 19:40:27 +0300 Timo Sirainen (55ef2c46b) + + lib-index: Use time_to_local_day_start() instead of reimplementing + + +M src/lib-index/mail-index-transaction-update.c + +2017-03-28 19:14:00 +0300 Timo Sirainen (27a33f6aa) + + lib: Add time_to_local_day_start() + + +M src/lib/test-time-util.c +M src/lib/time-util.c +M src/lib/time-util.h + +2017-03-27 17:44:45 +0300 Timo Sirainen (c85dd5fbf) + + lib-index: Code cleanup - expand LOG_WANT_ROTATE() macro + + There was no reason it had to be a macro. Also this fixes off-by-one error + when checking for log_rotate_min_size. + +M src/lib-index/mail-transaction-log.c + +2017-03-27 10:33:42 +0300 Aki Tuomi (205f29a01) + + var-expand-crypt-plugin: Add test suite + + +M src/plugins/var-expand-crypt/Makefile.am +A src/plugins/var-expand-crypt/test-var-expand-crypt.c + +2017-03-27 11:02:31 +0300 Aki Tuomi (e8d8cff11) + + var-expand-crypt: Fix data decryption + + +M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + +2017-03-27 09:39:03 +0300 Aki Tuomi (5d2c15eab) + + var-expand-crypt: Add error handling for initialization + + +M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + +2017-03-27 09:34:50 +0300 Aki Tuomi (820c323f8) + + var-expand-crypt: Do not free dcrypt context twice + + Found by coverity + +M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + +2017-03-17 10:28:36 +0200 Aki Tuomi (ea0bf7871) + + test: lib-http: Check write_full return value in test + + Makes static analyzers happier + +M src/lib-http/test-http-client.c + +2017-03-17 10:26:50 +0200 Aki Tuomi (ab9be857a) + + test: fts-squat: Ignore gettimeofday return value in test + + Makes static analyzers happier + +M src/plugins/fts-squat/squat-test.c + +2017-03-17 10:26:06 +0200 Aki Tuomi (108bb19d2) + + test: lib-index: Ensure conficts_seqs is created in test + + Makes static analyzers happier + +M src/lib-index/test-mail-index-transaction-finish.c + +2017-03-17 10:25:01 +0200 Aki Tuomi (50e44da76) + + test: lib: Ensure item is not null + + Makes static analyzers happier + +M src/lib/test-priorityq.c + +2017-03-17 10:23:42 +0200 Aki Tuomi (9f99d5a1b) + + test: lib-program-client: Use i_close_fd instead of close + + +M src/lib-program-client/test-program-client-unix.c + +2017-03-17 10:23:14 +0200 Aki Tuomi (24c5bcb93) + + test: lib-program-client: Ignore some return values in test server + + Makes static analyzers happier + +M src/lib-program-client/test-program-client-net.c + +2017-03-17 10:21:25 +0200 Aki Tuomi (c34bdea0d) + + test: lib: Check o_stream_flush return value in proxy test + + Makes static analyzers happier + +M src/lib/test-iostream-proxy.c + +2017-03-17 10:19:17 +0200 Aki Tuomi (5c9773287) + + test: lib-fts: Ignore uni_utf8_get_valid_data return value + + Makes static analyzers happier + +M src/lib-fts/test-fts-tokenizer.c + +2017-03-17 10:17:59 +0200 Aki Tuomi (b261fc7c4) + + test: mail-crypt: Check dcrypt_id_key_private_old return value + + Makes static analyzers happier + +M src/plugins/mail-crypt/test-mail-key.c + +2017-03-17 10:16:11 +0200 Aki Tuomi (b75580cbe) + + test: lib-http: Check o_stream_send return value + + Makes static analyzers happier + +M src/lib-http/test-http-server.c + +2017-03-17 10:13:59 +0200 Aki Tuomi (293586376) + + test: lib: Check o_stream_send return value + + Make static analyzers happier + +M src/lib/test-ostream-escaped.c + +2017-03-27 19:50:53 +0300 Aki Tuomi (01aca4a52) + + driver-cassandra: Add metric for slow queries + + +M src/lib-sql/driver-cassandra.c + +2017-03-29 20:04:47 +0300 Martti Rannanjärvi (620ddd4ab) + + push-notification-driver-ox: Wait for http requests to finish in deinit + + This is to make sure mail_user is still usable in http response callback. + +M src/plugins/push-notification/push-notification-driver-ox.c + +2017-03-30 15:53:59 +0300 Martti Rannanjärvi (b3abfd0ac) + + director: Log vhost count changes and HOST-UP/DOWN + + +M src/director/director-connection.c +M src/director/doveadm-connection.c +M src/director/mail-host.c +M src/director/mail-host.h + +2017-03-30 01:42:53 +0300 Timo Sirainen (939f758ca) + + master: When logging fork() EAGAIN failure, include current ulimit -u value + + +M src/master/service-process.c + +2017-03-27 16:33:30 +0300 Timo Sirainen (5bbc21995) + + doveadm dump log: Use shared lib-index code for updating modseq + + When MAIL_TRANSACTION_MODSEQ_UPDATE records were seen, the printed modseqs + afterwards weren't correct. + + Now that mail_transaction_update_modseq() is used, we don't need to keep + this code synchronized with it. + +M src/doveadm/doveadm-dump-log.c + +2017-03-27 16:30:16 +0300 Timo Sirainen (fb83662d3) + + doveadm dump log: Cleanup - don't change hdr.size + + Needed by the next commit. + +M src/doveadm/doveadm-dump-log.c + +2017-03-27 16:26:09 +0300 Timo Sirainen (f6aa54d25) + + doveadm dump log: Use istream for reading the file. + + Cleans up the code a bit and removes the 1MB record limit. + +M src/doveadm/doveadm-dump-log.c + +2017-03-29 13:28:36 +0300 Timo Sirainen (acfeae4e2) + + lib-storage: Fix potential dict transaction leak on transaction rollback. + + +M src/lib-storage/index/index-transaction.c + +2017-03-29 13:27:32 +0300 Timo Sirainen (5012586ed) + + lib-dict: Keep a linked list of all transactions in dict. + + This helps debugging if a transaction is leaked. + +M src/lib-dict/dict-private.h +M src/lib-dict/dict.c + +2017-03-29 16:15:36 +0300 Aki Tuomi (d56b6dfe6) + + auth: Do not cache username unless it was changed by lookup + + This could've caused usernames to be unexpectedly changed because they were + cached by a lookup that did not include username in the cache key. + +M src/auth/auth-request.c + +2017-03-29 15:37:36 +0300 Aki Tuomi (257111a99) + + auth: Mark username changed if it's changes in + auth_request_try_update_username + + It was forgotten in by 865a82c1 + +M src/auth/auth-request.c + +2017-03-07 13:32:15 +0200 Aki Tuomi (7c6818093) + + lib: Add uuid support to guid + + +M src/lib/guid.c +M src/lib/guid.h +M src/lib/test-guid.c + +2017-03-23 14:09:01 +0200 Aki Tuomi (7f3fe2655) + + mail-log: Differentiate autoexpunges from expunges + + +M src/plugins/mail-log/mail-log-plugin.c + +2017-03-23 14:08:30 +0200 Aki Tuomi (6c51e3c3d) + + lib-storage: Indicate mail is being autoexpunged + + This way plugins, such as mail_log, can detect this. + +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail.c + +2017-03-27 15:28:01 +0300 Timo Sirainen (c9712cd13) + + config: Don't stop the process due to idling. + + If the config process restarts, it also reloads configuration. We'd rather + want the configuration reloads to always be explicit. + +M src/config/config-settings.c + +2017-03-27 13:44:13 +0300 Timo Sirainen (2a24f3565) + + cassandra: Fallback consistency fix - it wasn't used permanently + + Because the "do I want to retry using primary consistency?" check was done + using the first failure timestamp, after 60 seconds that check always + returned TRUE. We should instead be checking the last timestamp for a query + that was sent with the primary consistency. + +M src/lib-sql/driver-cassandra.c + +2017-03-27 13:33:18 +0300 Timo Sirainen (a8a5f2f8c) + + cassandra: Fallback consistency fix - max retry interval was set wrong + + The maximum msecs is _MAX_RETRY_MSECS, not _FIRST_RETRY_MSECS + +M src/lib-sql/driver-cassandra.c + +2017-03-26 19:08:18 +0200 Stephan Bosch (561a21c8e) + + lib-http: client: Fix aborting a request that has a delayed error. + + Caused by recent changes in delayed error handling. + +M src/lib-http/http-client-request.c +M src/lib-http/test-http-client-errors.c + +2017-03-19 15:35:14 +0200 Timo Sirainen (30871b77e) + + imapc: Add imapc_features=delay-login + + The connection to imapc_host is delayed until it's actually needed to be + performed. + +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c + +2017-03-19 15:34:20 +0200 Timo Sirainen (3c9020237) + + imap: Remove imapc-specific "is connection valid?" code + + This is now done by imapc itself in the previous patch + +M src/imap/main.c + +2017-03-19 15:32:53 +0200 Timo Sirainen (92cd929df) + + imapc: Fail user creation if login to imapc_host fails. + + This causes imapc to actually wait for the login to succeed or fail. Such a + wait was already done by the imap code, which will be removed by the next + patch. + +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h + +2017-03-25 15:46:58 +0200 Aki Tuomi (bd2a176b5) + + quota: Add backend register/unregister + + This way, other mail plugins can register their own quota backends. + +M src/plugins/quota/quota-plugin.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c + +2017-03-24 14:46:05 +0200 Timo Sirainen (79454ba23) + + lib-mail: Fix read overflow / crash in message_header_decode() + + If the input string was "=?charset?Q|B?text?", the code attempted to look up + the character after it. And if it was "=", the callback was called with + size=-1, which ends up in a crash. + +M src/lib-mail/message-header-decode.c +M src/lib-mail/test-message-header-decode.c + +2016-11-29 09:38:21 +0200 Martti Rannanjärvi (7dd7e8ed4) + + ssl: deprecate no_compression in ssl_options + + Compression is now disabled by default. + +M doc/example-config/conf.d/10-ssl.conf +M src/lib-master/master-service-ssl-settings.c + +2016-12-16 22:18:02 +0200 Martti Rannanjärvi (519675ef3) + + doc: mention no_ticket in ssl config example + + +M doc/example-config/conf.d/10-ssl.conf + +2016-12-16 22:25:38 +0200 Martti Rannanjärvi (d25aba3ff) + + doc: remove obsolete ssl_dh_parameters_length from example config + + +M doc/example-config/conf.d/10-ssl.conf + +2016-12-19 11:59:18 +0200 Martti Rannanjärvi (0c83dfe6a) + + ssl: change to more secure default ssl_cipher_list + + +M doc/example-config/conf.d/10-ssl.conf +M src/lib-master/master-service-ssl-settings.c + +2017-03-23 20:16:44 +0200 Timo Sirainen (c4ec7cb59) + + imap-login: Move forward_fields updating code to login-common + + This allows using the new client_add_forward_field() in e.g. plugins. + +M src/imap-login/imap-login-client.c +M src/login-common/client-common.c +M src/login-common/client-common.h + +2017-03-24 04:21:49 +0200 Timo Sirainen (7c3717a05) + + lib-storage: Fix mail_user_autoexpunge() return value to be initialized + properly + + +M src/lib-storage/mail-autoexpunge.c + +2017-03-23 14:27:28 +0200 Timo Sirainen (8c0afac05) + + lib-storage: Change mail_user_autoexpunge() to return number of autoexpunged + mails + + +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-autoexpunge.h + +2017-03-23 14:19:42 +0200 Timo Sirainen (0c9dda2ba) + + lmtp: Trigger autoexpunging only for the last RCPT TO. + + Otherwise if the autoexpunging takes a long time, the LMTP client could + disconnect due to a timeout. The mails would still eventually get delivered + though, so it would result in duplicate mails being delivered. + + An alternative to this would be to keep all the mail_users referenced until + the delivery is finished and then autoexpunge all of them at the end. It + increases memory usage though and complicates the code, so at least for now + it's not implemented. + +M src/lmtp/commands.c + +2017-03-23 14:15:49 +0200 Timo Sirainen (646817f0c) + + lib-storage: Replace MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE with explicit + mail_user_autoexpunge() + + This allows better control of which users are being autoexpunged. This patch + changes behavior at least in two ways now: + + 1) After shared folder access, the owner user isn't autoexpunged at deinit. + Although this is a bit questionable of whether it should be or not. + + 2) LMTP's quota check at RCPT TO stage doesn't trigger autoexpunging. + +M src/imap/imap-client.c +M src/imap/main.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h +M src/lmtp/commands.c +M src/lmtp/main.c +M src/pop3/main.c +M src/pop3/pop3-client.c + +2017-03-23 14:08:53 +0200 Timo Sirainen (f9dad5817) + + pop3: Start autoexpunging only after client is disconnected + + +M src/pop3/pop3-client.c + +2017-03-23 15:17:44 +0200 Aki Tuomi (439dab8f7) + + var-expand-crypt: Remove pointless assigment + + It's never used + +M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + +2017-03-23 15:12:45 +0200 Aki Tuomi (9e38412ec) + + var-expand-crypt: Fix base64 encoding + + the break was missing, also removed confusing block. + +M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + +2017-03-16 11:15:18 +0200 Martti Rannanjärvi (bf7dc750b) + + global: Log internal storage error on failure + + +M src/doveadm/doveadm-mail-altmove.c +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-deduplicate.c +M src/doveadm/doveadm-mail-expunge.c +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-mail-flags.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-iter.c +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail-mailbox-status.c +M src/doveadm/doveadm-mail-mailbox.c +M src/doveadm/doveadm-mail-save.c +M src/doveadm/doveadm-mail-search.c +M src/doveadm/doveadm-mail.c +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-tree-fill.c +M src/imap/imap-state.c +M src/indexer/master-connection.c +M src/lda/main.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-lda/mail-deliver.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-guid-cache.c +M src/lmtp/commands.c +M src/plugins/acl/doveadm-acl.c +M src/plugins/fts-lucene/fts-backend-lucene.c +M src/plugins/fts-lucene/lucene-wrapper.cc +M src/plugins/fts/fts-api.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/plugins/mail-crypt/mail-crypt-key.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/push-notification/push-notification-driver-ox.c +M src/plugins/push-notification/push-notification-event-mailboxcreate.c +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota.c +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c + +2017-03-17 09:23:00 +0200 Martti Rannanjärvi (8d2e45a30) + + lmtp: Log internal error on STATUS_CHECK_OVER_QUOTA failure + + +M src/lmtp/commands.c + +2017-03-16 11:12:29 +0200 Martti Rannanjärvi (98c217499) + + lib-storage: Add mail_storage_get_last_internal_error() + + This returns the error given to mail_storage_set_critical(). + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-03-22 18:02:37 +0200 Martti Rannanjärvi (8fc6dd057) + + quota: Use mail_user_plugin_getenv_bool to get quota_vsizes + + +M src/plugins/quota/quota.c + +2017-03-22 17:17:41 +0200 Martti Rannanjärvi (7f4fa3767) + + quota: Add quota_max_mail_size setting + + +M doc/example-config/conf.d/90-quota.conf +M src/plugins/quota/Makefile.am +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h + +2017-03-23 10:16:30 +0200 Martti Rannanjärvi (64f889c7c) + + quota: Use quota_alloc_result in quota_settings.test_alloc + + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c +M src/plugins/trash/trash-plugin.c + +2017-03-23 13:48:04 +0200 Martti Rannanjärvi (38ce5769d) + + quota: Introduce quota_alloc_result return type + + +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h + +2017-03-23 15:05:12 +0200 Timo Sirainen (f504be57b) + + dbox: Allow ":" separator between mail_attachment_fs driver and args. + + The ":" separator is nowadays commonly used elsewhere for the separator, so + it should work here as well. + +M src/lib-storage/index/dbox-common/dbox-storage.c + +2016-12-25 10:36:59 +0200 Aki Tuomi (b8596c89d) + + lib: Add tests for extensions + + +M src/lib/test-var-expand.c + +2016-11-18 14:47:05 +0200 Aki Tuomi (dbc351d8a) + + var-expand-crypt: Encryption/decryption support for var-expand + + Registers new encrypt and decrypt processors for var-expand. + +M configure.ac +M src/plugins/Makefile.am +A src/plugins/var-expand-crypt/Makefile.am +A src/plugins/var-expand-crypt/var-expand-crypt-plugin.c + +2016-11-18 09:39:46 +0200 Aki Tuomi (5c00a22fc) + + lib: Add extension support for var-expand + + This enables loading new var-expand features using plugins. + +M src/lib/Makefile.am +M src/lib/lib.c +A src/lib/var-expand-private.h +M src/lib/var-expand.c + +2017-03-22 19:33:52 +0200 Aki Tuomi (0306a3100) + + lib: Check var_expand_long return value correctly + + +M src/lib/var-expand.c + +2016-11-22 10:54:43 +0200 Aki Tuomi (2c2bcffb5) + + lib: Fix whitespace in var-expand.c + + +M src/lib/var-expand.c + +2017-02-25 23:34:03 +0200 Aki Tuomi (34b724d1d) + + lib-storage: Add and use default mailbox iterator + + The idea is to allow mail plugins to see also the non-existent autoboxes by + feeding them thru the iterator. + + Fixes problem where autocreated boxes are not seen by ACL plugin. + +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/list/mailbox-list-maildir-iter.c +M src/lib-storage/list/mailbox-list-subscriptions.c +M src/lib-storage/mailbox-list-private.h + +2017-03-21 13:14:41 +0200 Aki Tuomi (fbcc3e140) + + lib-storage: Expose mailbox_list_init_autocreate + + It is needed when backend_ctx is created on the fly + +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/mailbox-list-private.h + +2017-02-25 23:33:20 +0200 Aki Tuomi (7e1600ded) + + acl: Use MODULE_CONTEXT for mailbox list iterator + + +M src/plugins/acl/acl-mailbox-list.c + +2017-02-25 23:59:21 +0200 Aki Tuomi (2e295aaaf) + + acl: Use mailbox_list_context instead of ctx->ctx + + This prepares for the next commit + +M src/plugins/acl/acl-mailbox-list.c + +2017-03-22 12:01:18 +0200 Aki Tuomi (be64b3bbf) + + lib-dict: Ensure all iterations and transactions are done in deinit + + +M src/lib-dict/dict.c + +2017-03-22 12:01:07 +0200 Aki Tuomi (f32da6b73) + + lib-dict: Track transaction counts + + +M src/lib-dict/dict-private.h +M src/lib-dict/dict.c + +2017-03-22 10:33:20 +0200 Aki Tuomi (d42321abd) + + lib-dict: Fix test-dict linkage + + +M src/lib-dict/Makefile.am + +2017-03-22 10:32:58 +0200 Aki Tuomi (7932885c8) + + lib-dict: Use dict-fail iterator and transaction when missing from dict + driver + + +M src/lib-dict/dict.c + +2017-03-22 12:05:32 +0200 Aki Tuomi (10f126b55) + + dict: Update correct counter in dict_iterate_init + + +M src/lib-dict/dict.c + +2017-03-22 10:32:04 +0200 Aki Tuomi (d70bf110f) + + lib-dict: Add dict-fail driver + + It can be used for providing various failures + +M src/lib-dict/Makefile.am +A src/lib-dict/dict-fail.c +M src/lib-dict/dict-private.h + +2017-03-17 12:58:08 +0200 Martti Rannanjärvi (d4847b921) + + global: Log mailbox_list internal errors + + +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-mailbox.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mailbox-list-iter.c +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-mailbox-tree-fill.c +M src/imap/main.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/mail-autoexpunge.c +M src/plugins/quota/quota-count.c +M src/plugins/virtual/virtual-config.c +M src/pop3/pop3-client.c + +2017-03-17 12:38:21 +0200 Martti Rannanjärvi (8ca217bf3) + + lib-storage: Add mailbox_list_get_last_internal_error() + + This returns the error given to mailbox_list_set_critical(). + +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2017-03-22 23:19:51 +0200 Martti Rannanjärvi (4e64ac91c) + + lib: Download unicode.org files from dovecot.org + + +M src/lib-fts/Makefile.am +M src/lib/Makefile.am + +2017-03-17 23:39:33 +0100 Stephan Bosch (e46130f48) + + lib-http: client: Implemented http_client_request_url_str() function that + accepts an URL string rather than a pre-parsed URL object. + + If the provided HTTP URL is invalid, the callback with the error is called + some time later from the ioloop. This change also amends the + test-http-client-errors test suite with a new test for this new feature. + +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h +M src/lib-http/test-http-client-errors.c + +2017-03-17 23:51:19 +0100 Stephan Bosch (7a358ecd8) + + lib-http: client: Make sure a request's log label never gets a duplicate + request target part. + + Make sure the URL part of the label always only consists of a + http://host:port part and nothing more. + +M src/lib-http/http-client-request.c + +2017-03-17 23:35:55 +0100 Stephan Bosch (8d8457334) + + lib-http: client: Restructured the handling of delayed errors. + + The req->delayed_error* fields are cleared before the callback is called and + before the request is dereferenced. This way, freeing the request never + removes it from the delayed request list when the list is being processed. + It also makes it possible to resubmit the request from the callback (mainly + for future use). + +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c + +2017-03-17 23:18:52 +0100 Stephan Bosch (15fe3500f) + + lib-http: client: Clear request pointer immediately in + http_client_request_error(). + + +M src/lib-http/http-client-request.c + +2017-03-17 23:00:42 +0100 Stephan Bosch (905ada5e5) + + lib-http: test-http-client-errors: Added test for using https:// while SSL + is not configured. + + +M src/lib-http/test-http-client-errors.c + +2017-03-19 15:47:41 +0100 Stephan Bosch (ce3fc9190) + + global: Use http_response_get_message() to log HTTP responses. + + +M src/auth/auth-policy.c +M src/lib-http/http-client-connection.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/push-notification/push-notification-driver-ox.c + +2017-03-19 15:09:03 +0100 Stephan Bosch (17908b11e) + + lib-http: Added a function to obtain a message suitable for logging from a + response object. + + This prevents logging internal error codes (>= 9000). + +M src/lib-http/http-response.h + +2017-03-19 15:06:13 +0100 Stephan Bosch (a8741f46c) + + lib-http: Explicitly define the start of the range of internal response + status codes. + + +M src/lib-http/http-client.h +M src/lib-http/http-response.h + +2017-03-17 23:03:03 +0100 Stephan Bosch (4102d9f26) + + lib-http: test-http-client-errors: Always use the proper error status code + definitions rather than an integer literal. + + +M src/lib-http/test-http-client-errors.c + +2017-03-22 09:03:20 +0200 Aki Tuomi (89387c6f0) + + doveadm: Send and receive exit codes correctly + + The old code would assume TEMPFAIL for almost everything. + +M src/doveadm/client-connection.c +M src/doveadm/server-connection.c + +2017-03-22 19:21:55 +0200 Aki Tuomi (c466bbccb) + + doveadm: Add exit code/string conversion functions + + +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm.h + +2017-03-20 20:22:36 +0200 Aki Tuomi (5b29a2a2e) + + dict-cdb: Fix API for v2.3 + + Broken by 39ea5717264668e2c7f9f7986eb821d21785f47f + +M src/lib-dict/dict-cdb.c + +2017-03-20 20:21:56 +0200 Aki Tuomi (8e066cce9) + + lib-dict: Ensure init returns dict + + +M src/lib-dict/dict.c + +2017-03-10 10:05:14 +0200 Aki Tuomi (017d99aa1) + + pop3-login: Add FORWARD for XCLIENT + + This allows passing passdb variables. They are prefixed with forward_ when + imported to extra fields. + +M src/pop3-login/client.c + +2017-03-10 10:04:33 +0200 Aki Tuomi (67ac9e149) + + pop3-login: Pass forward_ passdb args using XCLIENT command + + +M src/pop3-login/pop3-proxy.c + +2017-02-20 20:37:09 +0200 Aki Tuomi (998eadc15) + + imap-login: Allow x-forward- to specify forward fields from trusted networks + + +M src/imap-login/imap-login-client.c +M src/imap-login/imap-proxy.c +M src/login-common/client-common-auth.c + +2017-02-20 20:36:58 +0200 Aki Tuomi (53f97800b) + + auth: Accept forward_fields from auth client + + +M src/auth/auth-request.c +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-client.h +M src/login-common/client-common.h +M src/login-common/sasl-server.c + +2017-03-16 13:36:23 +0200 Aki Tuomi (6e76be05e) + + auth: Add auth_fields_import_prefixed + + +M src/auth/auth-fields.c +M src/auth/auth-fields.h + +2017-03-14 10:01:51 +0200 Aki Tuomi (e88c6613d) + + auth: Support client_id variable + + When imap_id_retain is turned on, contains the client ID request content + with dovecot special vars removed. + +M src/auth/auth-request-var-expand.c +M src/auth/auth-request-var-expand.h + +2017-03-16 10:01:23 +0200 Aki Tuomi (a9523ec8f) + + imap-login: Forward original client ID to next hop + + This will be done if ID is present. + +M src/imap-login/imap-proxy.c + +2017-02-20 19:11:01 +0200 Aki Tuomi (2f7c73483) + + imap-login: Retain ID request without dovecot specials + + +M src/imap-login/imap-login-client.c +M src/login-common/client-common.h + +2017-02-21 14:46:31 +0200 Aki Tuomi (07142eb1d) + + imap-login: Add option to retain client id + + This should be enabled if client_id is wanted for auth policy + +M src/imap-login/imap-login-settings.c +M src/imap-login/imap-login-settings.h + +2017-02-20 18:58:21 +0200 Aki Tuomi (a8dac1be6) + + auth: Accept client_id from auth client + + Client ID contains the ID client request string for IMAP. + +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-client.h +M src/login-common/client-common.h +M src/login-common/sasl-server.c + +2017-03-09 14:08:40 +0200 Aki Tuomi (b045b6698) + + login-common: Add preproxy pool + + preproxy pool can be used to do allocations that are released once proxying + starts. + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/login-proxy.c + +2017-01-29 01:03:00 +0200 Timo Sirainen (d35da39e6) + + imapc: Use LOGOUT to cleanly disconnect from server. + + This makes it clearer in the remote server's logs whether the disconnection + was intentional or not. + + Use a hardcoded 5 second timeout for LOGOUT. It should be enough time for + the server to finish sending the tagged reply. + +M src/lib-imap-client/imapc-client-private.h +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-connection.h +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-03-16 18:46:28 +0200 Timo Sirainen (5eb43c3bb) + + lib-storage: Don't reset \Recent flags when rebuilding index + + The recent flags are tracked with first_recent_uid in the header. If the + first_recent_uid is valid in the old index, preserve it. This way all mails + don't show as having \Recent flag. + + This was used by sdbox and mdbox code. + +M src/lib-storage/index/index-rebuild.c + +2017-03-16 09:38:59 +0200 Aki Tuomi (97f774ab0) + + trash: Move config file to trash user + + Makes static analyser happy + +M src/plugins/trash/trash-plugin.c + +2017-02-26 16:10:58 +0200 Timo Sirainen (95fe5a25a) + + lib-index: Fix test-mail-index-transaction-update + + It was broken with TZ=Australia/ACT. Fixing it seems too troublesome, so + just use TZ=UTC during the test. + +M src/lib-index/test-mail-index-transaction-update.c + +2017-02-26 16:09:13 +0200 Timo Sirainen (b0831ed2d) + + lib-index: Minor fix to day_first_uid updating + + mktime() was getting a bit confused around day changes. Giving it only + year/month/day makes it less confused. + +M src/lib-index/mail-index-transaction-update.c + +2017-03-11 19:20:30 +0200 Aki Tuomi (bb0484f2d) + + doveadm: Do not crash doveadm-server if input file missing + + save commands expects valid input file for it to work, if we are not running + for cli, and input file is not provided, provide EINVAL error to caller via + i_stream_error. + +M src/doveadm/doveadm-mail.c + +2017-03-16 09:36:23 +0200 Aki Tuomi (3dffcebc7) + + lib-dcrypt: Add asserts + + Fixes several static analysis reports + +M src/lib-dcrypt/dcrypt-openssl.c + +2017-02-27 18:13:54 -0500 Josef 'Jeff' Sipek (10ac3345f) + + lib-storage & imap: add MAIL_ERROR_UNAVAILABLE as [UNAVAILABLE] + + [UNAVAILABLE] is defined in RFC 5530 and we were just missing a MAIL_ERROR_* + constant to make use of it. + +M src/doveadm/doveadm-mail.c +M src/imap/imap-commands-util.c +M src/lib-storage/mail-error.h + +2017-03-08 15:39:34 -0500 Timo Sirainen (3c6a7ca2d) + + imap, pop3, indexer-worker: Add (deinit) to process title before + autoexpunging runs. + + lmtp should also do this, but it needs a bit larger changes. + +M src/imap/imap-client.c +M src/imap/main.c +M src/indexer/master-connection.c +M src/pop3/main.c +M src/pop3/pop3-client.c + +2017-03-08 17:09:12 -0500 Timo Sirainen (7c6347e85) + + pop3: Add client.destroyed boolean + + +M src/pop3/pop3-client.c +M src/pop3/pop3-client.h + +2017-03-13 14:23:11 +0200 Timo Sirainen (865a82c1e) + + auth: Auth workers shouldn't return username if it wasn't changed + + This continues the previous fix where username was always added to + passdb/userdb cache, even if the username wasn't changed. That could have + resulted in wrongly changing usernames if the cache key didn't uniquely + identify the user. + +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/auth/auth-worker-client.c +M src/auth/passdb-blocking.c +M src/auth/userdb-blocking.c + +2017-03-13 13:49:04 +0200 Timo Sirainen (e0a84bcd4) + + auth: passdb/userdb lookups via auth-worker cached too much of the replies + + Only the fields returned by the lookup itself were supposed to be cached. + This was especially problematic if the lookup via auth-worker didn't + uniquely identify the user. For example doing a passdb lookup for an + attribute shared by multiple users could have caused the reply to contain + the previous cached user's all extra fields. + +M src/auth/auth-worker-client.c + +2017-03-15 13:29:11 +0200 Aki Tuomi (c12aed4d8) + + auth: Properly hide all fields with passwords + + client reply line wasn't hiding all items which contain 'pass' substring. + This was inconsistent behaviour since elsewhere this was done. + +M src/auth/auth-client-connection.c + +2017-03-15 18:20:31 +0200 Timo Sirainen (c5e62353a) + + *-login: Change API for how login_plugins hook into client allocation. + + The previous API worked badly when there were more than one plugin. The + current behavior works similarly to how mail_plugins work. + +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/main.c + +2017-03-13 22:52:41 +0200 Timo Sirainen (0098ac3b6) + + cassandra: Treat CASS_ERROR_SERVER_UNAVAILABLE as "write success is + uncertain" + + Looks like the write could still have actually gone through. + +M src/lib-sql/driver-cassandra.c + +2017-03-16 01:22:09 +0200 Timo Sirainen (878915649) + + lib-oauth2: Don't free oauth2_request too early. + + Move the freeing explicitly to only after calling the callback. The previous + method of freeing it on when http_request was destroyed could have happened + too early when oauth2_parse_json() called i_stream_unref(), which released + the last reference to the http_request. + +M src/lib-oauth2/oauth2-introspect.c +M src/lib-oauth2/oauth2-refresh.c +M src/lib-oauth2/oauth2-token-validate.c + +2017-03-16 01:12:57 +0200 Timo Sirainen (070caf28f) + + lib-oauth2: Fix memory leak if HTTP URL parsing fails. + + Also delay calling the callback. The callers don't necessarily expect an + immediate callback (auth/db-oauth2.c doesn't). + +M src/lib-oauth2/oauth2-introspect.c +M src/lib-oauth2/oauth2-private.h +M src/lib-oauth2/oauth2-refresh.c +M src/lib-oauth2/oauth2-token-validate.c +M src/lib-oauth2/oauth2.c + +2017-03-16 00:54:44 +0200 Timo Sirainen (d88304d95) + + auth: oauth2 - cleanup db_oauth2_lookup_callback_t + + db parameter isn't needed, because request->db already contains it. Also + moved request parameter to be the first. + +M src/auth/db-oauth2.c +M src/auth/db-oauth2.h +M src/auth/passdb-oauth2.c + +2017-03-16 00:51:15 +0200 Timo Sirainen (34cb91abb) + + auth: oauth2 - make it easier to see where db_oauth2_callback() is called + + Doesn't fix anything, but places the db_oauth2_callback() calls into the end + of _continue() calls so it's clearer that they're always being called + exactly once. + +M src/auth/db-oauth2.c + +2017-03-16 01:35:38 +0200 Timo Sirainen (e252a81ca) + + auth: oauth2 - Clarify token validation success/valid error handling + + result->error is NULL only if result->success && !result->valid. Also + !result->success is the more important error handling case. Write out these + cases explicitly so it's easier to understand. + +M src/auth/db-oauth2.c + +2017-03-16 00:42:28 +0200 Timo Sirainen (b928b757e) + + auth: oauth2 - remove db_oauth2_request.failed + + It is an unnecessary duplication of passdb_result. + +M src/auth/db-oauth2.c +M src/auth/db-oauth2.h +M src/auth/passdb-oauth2.c + +2017-03-16 00:38:39 +0200 Timo Sirainen (5e48e3003) + + auth: oauth2 - remove db_oauth2_request.result + + It's not a persistent state. When it's set, the callback needs to be called. + This way it's more difficult to forget to set it. + +M src/auth/db-oauth2.c +M src/auth/db-oauth2.h +M src/auth/passdb-oauth2.c + +2017-03-16 00:33:24 +0200 Timo Sirainen (01484d200) + + auth: oauth2 - Template expand failure should be an internal error + + Not the default "password mismatch". Also changed the API to be closer to + the other nearby functions. + +M src/auth/db-oauth2.c + +2017-03-16 00:32:01 +0200 Timo Sirainen (3d365d35f) + + auth: oauth2 - make db_oauth2_template_export() static + + It's not used outside db-oauth2.c + +M src/auth/db-oauth2.c +M src/auth/db-oauth2.h + +2017-03-16 00:25:19 +0200 Timo Sirainen (6bcf2e419) + + auth: oauth2 - introspection lookup error should be internal failure + + Not the default, which is "password mismatch". + +M src/auth/db-oauth2.c + +2017-03-16 00:15:10 +0200 Timo Sirainen (8fd1d49dc) + + auth: oauth2 - Make sure db_oauth2_request.req is set to NULL when it gets + freed. + + Doesn't fix anything, but makes it clearer that req->req must not be aborted + anymore after this stage, because it gets freed anyway. + +M src/auth/db-oauth2.c + +2017-03-16 00:13:08 +0200 Timo Sirainen (cbf6b2a59) + + auth: oauth2 - Fix aborting auth requests on deinit. + + The auth_request needs to be finished by calling the callback. + +M src/auth/db-oauth2.c + +2017-03-06 14:59:46 +0200 Aki Tuomi (000030feb) + + auth: Do not double-expand key in passdb dict when authenticating + + Broken by 79042f8c + +M src/auth/db-dict.c + +2017-03-09 11:32:21 -0500 Timo Sirainen (a8d3f2d03) + + *-login: Remove unused client.proxy_state + + +M src/login-common/client-common-auth.c +M src/login-common/client-common.h + +2017-03-09 10:48:33 -0500 Timo Sirainen (339726ad7) + + pop3-login: Remove usage of client.common.proxy_state + + +M src/pop3-login/client.h +M src/pop3-login/pop3-proxy.c + +2017-03-09 10:46:36 -0500 Timo Sirainen (d77f679da) + + pop3-login: Log proxy state as human-readable string. + + +M src/pop3-login/client.c +M src/pop3-login/client.h +M src/pop3-login/pop3-proxy.c +M src/pop3-login/pop3-proxy.h + +2017-03-09 10:41:52 -0500 Timo Sirainen (b4bf60434) + + imap-login: Log proxy state as human-readable string. + + Separate sent/received state and log them as strings. + +M src/imap-login/imap-login-client.c +M src/imap-login/imap-login-client.h +M src/imap-login/imap-proxy.c +M src/imap-login/imap-proxy.h + +2017-03-09 10:31:39 -0500 Timo Sirainen (2b96880f2) + + *-login: Add client.proxy_get_state() for providing human-readable proxy + state + + If not implemented, it defaults to the old method of returning proxy_state + number. + +M src/imap-urlauth/imap-urlauth-login.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/login-proxy.c +M src/pop3-login/client.c + +2017-03-07 14:36:45 -0500 Timo Sirainen (3e961b1de) + + pop3: Set process title before syncing mailbox. + + The syncing could be taking a long time, so it's useful to have the username + in the process title during that. + +M src/pop3/pop3-client.c + +2017-03-08 10:07:37 -0500 Timo Sirainen (7f2cb2e5b) + + imap: If unhibernation fails due to a mailbox error, log the mailbox name. + + +M src/imap/imap-state.c + +2017-03-08 09:28:14 -0500 Timo Sirainen (42886bc89) + + imap: When disconnecting due to FETCH failure, include "FETCH" in the log + message. + + +M src/imap/cmd-fetch.c + +2017-03-07 18:10:57 +0200 Aki Tuomi (b1808dcac) + + lib-sasl: Fix xoauth2 data format + + Authentication data was missing user= + +M src/lib-sasl/mech-oauthbearer.c + +2017-03-07 10:09:20 +0200 Aki Tuomi (3871fbbab) + + db-oauth2: Make sure request is removed only once + + Callback might be called twice. + +M src/auth/db-oauth2.c + +2017-03-07 10:08:08 +0200 Aki Tuomi (477629dd3) + + lib-oauth2: Use http client destroy callback + + Avoids freeing memory early. + + Fixes signal 11 crash in auth + +M src/lib-oauth2/oauth2-introspect.c +M src/lib-oauth2/oauth2-refresh.c +M src/lib-oauth2/oauth2-token-validate.c + +2017-03-06 13:16:12 +0200 Aki Tuomi (9fedd371d) + + auth: Apply skips to first passdb + + This is required to apply filters to first passdb, so that mechanism filters + can be applied. + +M src/auth/auth-request.c + +2017-03-05 19:45:04 +0100 Stephan Bosch (29e074eee) + + lib-http: test-http-server-errors: Fixed logically dead code. + + Problem reported by Coverity. + +M src/lib-http/test-http-server-errors.c + +2017-03-02 23:12:45 +0100 Stephan Bosch (cb12dd3a1) + + lib-lda: smtp-client: Fixed memory leak of the error message string. + + +M src/lib-lda/smtp-client.c + +2017-03-02 23:51:45 +0100 Stephan Bosch (17e89642b) + + lib-lda: smtp-client: Fixed cleanup of LMTP client at end of transaction. + + It was not deinitialized, causing a memory leak. + +M src/lib-lda/smtp-client.c + +2017-03-02 00:42:13 +0100 Stephan Bosch (e422d45a7) + + lib-smtp: lmtp-client: Fixed bug in timeout handling. + + The timeout was erroneously stopped when lmtp_client_send() was invoked + before a connection was established. Once the connection finally got + established, the timeout was removed. This would cause the client to wait + indefinitely. + +M src/lib-smtp/lmtp-client.c + +2017-03-02 00:03:50 +0100 Stephan Bosch (8ac67bc3b) + + lib-lda: smtp-client: Make sure only the first error determines the tempfail + status. + + The client is supposed to stop running the moment the first error occurs. + However, there is a (very unlikely) possiblity that the encapsulated LMTP + client issues both an RCPT and DATA error callback in sequence. In that + case, the second callback should not override the tempfail status of the + first (the second likely is a tempfail). If the server disconnects right + after failing the last of at least two recipients, the lmtp-client would + issue a DATA callback with a disconnection error. The disconnect error would + set the client->tempfail flag, which caused smtp_client_deinit*() to always + return -1 in this scenario. + +M src/lib-lda/smtp-client.c + +2017-03-03 08:31:50 +0200 Aki Tuomi (2461ec3b9) + + lib-oauth2: Add missing content-type header + + +M src/lib-oauth2/oauth2-introspect.c + +2017-03-02 18:32:15 +0200 Timo Sirainen (2dc6c073d) + + example-config: Update deliver_log_format comment + + +M doc/example-config/conf.d/10-logging.conf + +2017-03-02 09:15:13 +0200 Aki Tuomi (8f251da1b) + + lib-ssl-iostream: Ensure verify_remote_cert is true + + Forgotten in 38424b8081a75be3ef93729fed4d30dbafca5885 + +M src/lib-ssl-iostream/iostream-ssl.c + +2017-03-01 13:12:41 +0200 Timo Sirainen (e0f82a1aa) + + imap-hibernate: Avoid using casts + + +M src/imap-hibernate/imap-client.c + +2017-03-01 12:29:17 +0200 Martti Rannanjärvi (3751b61df) + + fts: Don't add NULL content disposition or type to HTTP header + + +M src/plugins/fts/fts-parser-tika.c + +2017-03-01 09:15:29 +0200 Aki Tuomi (326fb016a) + + trash: Read settings after namespaces are loaded + + Fixes Panic: file mail-namespace.c: line 709 (mail_namespace_find): + assertion failed: (ns != NULL) + +M src/plugins/trash/trash-plugin.c + +2017-02-27 16:23:09 +0200 Timo Sirainen (b39dd4843) + + master: Try to listen on master socket even if all services couldn't be + listened to. + + This could happen during a settings reload. + +M src/master/service-listen.c + +2017-02-27 16:22:52 +0200 Timo Sirainen (9b7a4aa38) + + master: Add missing error logging for master socket listening failure. + + +M src/master/service-listen.c + +2017-02-27 16:22:08 +0200 Timo Sirainen (7369eabcd) + + master: Don't crash if master socket couldn't be re-opened after settings + reload. + + +M src/master/service-monitor.c + +2017-02-23 11:47:20 +0200 Aki Tuomi (71cb0c746) + + imap-hibernate: Support userdb in var_expand + + +M src/imap-hibernate/imap-client.c + +2017-02-27 20:40:43 +0200 Aki Tuomi (1f58bee81) + + doveadm: Add missing newline to proxy kick output + + +M src/doveadm/doveadm-proxy.c + +2017-02-27 20:38:43 +0200 Aki Tuomi (235ef8cd3) + + doveadm: Ensure -- is added to command line before positional arguments for + non-mails commands as well + + Was forgotten from 967efe37d1f10a28c0a086cc5919d4ce8917bed8 + +M src/doveadm/doveadm-cmd.c + +2017-02-27 19:12:32 +0200 Aki Tuomi (967efe37d) + + doveadm: Ensure -- is added to command line before positional arguments + + This prevents parser from choking on dash. + +M src/doveadm/doveadm-mail.c + +2017-02-27 19:04:55 +0200 Aki Tuomi (9384ef699) + + doveadm: Fix allow-empty-mailbox-name handling + + It was supposed to be handled for metadata commands only. + + Broken in 26c41874cf6019c3e39f0ed630b2a07a92b2635f + +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h + +2017-02-27 14:21:48 +0200 Timo Sirainen (6ebe7a974) + + doveadm move: Use mailbox_move() instead of copy+expunge + + This allows for some optimizations to be done. + +M src/doveadm/doveadm-mail-copymove.c + +2017-02-27 09:39:06 +0200 Martti Rannanjärvi (e5d0656cb) + + master: add cassandra to printed build options + + +M src/master/main.c + +2017-02-26 15:37:36 +0200 Timo Sirainen (3e6f1c0a9) + + lib: Fix t_strf*time() unit tests + + Timezone isn't part of the standard struct tm, so %z doesn't necessarily + expand as expected outside Linux. + +M src/lib/test-time-util.c + +2017-02-26 15:21:13 +0200 Timo Sirainen (27ccbb0f3) + + dsync: Fix syncing attributes with large values. + + This mainly meant that large Sieve scripts weren't synced properly, because + their last_change field was never deserialized, so it was set to 0. + +M src/doveadm/dsync/dsync-ibc-stream.c + +2017-02-26 14:32:44 +0200 Timo Sirainen (f05d013c6) + + lazy-expunge: Use mailbox_move() instead of mailbox_copy() + + This allows some optimizations to be performed that are only possible when + moving messages. + + It's slightly strange now that mail_expunge() is triggered twice for the + same source mail, but lazy_expunge plugin is called very early so most + plugins won't see it called twice. Currently only acl plugin sees it, and it + doesn't care. + +M src/plugins/lazy-expunge/lazy-expunge-plugin.c + +2017-02-25 21:47:01 +0200 Timo Sirainen (061801f2b) + + lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks + + +M m4/ssl.m4 +M src/lib-dcrypt/dcrypt-openssl.c + +2017-02-25 21:41:03 +0200 Timo Sirainen (e47cfc302) + + lib-dcrypt: Move most of the OpenSSL #if handling to macros + + This avoids #if calls being littered all over the file. + + This change can cause HMAC_CTX_free(NULL) to be called, but that seems to + work fine without crashing. + +M src/lib-dcrypt/dcrypt-openssl.c + +2017-02-24 12:27:02 +0200 Timo Sirainen (f64f2d4b7) + + mail-filter: Add missing error handling in ostream-ext-filter + + +M src/plugins/mail-filter/ostream-ext-filter.c + +2017-02-24 12:17:21 +0200 Timo Sirainen (850778e1f) + + auth: Removed dead code from oauth2 mechanism + + +M src/auth/mech-oauth2.c + +2017-02-24 12:13:36 +0200 Timo Sirainen (930765750) + + acl plugin: Fix Coverity warning + + Just switch the MALLOC_ADD() parameters, so that arithmetic doesn't get + inside a sizeof(). + +M src/plugins/acl/acl-cache.h + +2017-02-23 19:38:31 +0100 Stephan Bosch (97a8fde13) + + lib-http: client: Fixed i_unreached() failure occurring when a host's list + of IPs changes while a connection is still pending. + + In that case, the IP of the pending connection may no longer be associated + with that host. If the IP was not found anymore, the i_unreached() error + occurred. + +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c + +2017-02-23 11:29:17 +0200 Aki Tuomi (d85468c00) + + auth: Export oauth2 pass_attrs to passdb reply + + +M src/auth/db-oauth2.c + +2017-02-23 12:41:26 +0200 Timo Sirainen (7a727b88f) + + pop3c: Fix compiling due to typo in previous commit + + +M src/lib-storage/index/pop3c/pop3c-client.c + +2017-02-20 17:49:34 +0200 Aki Tuomi (b3c095d1f) + + global: Fix ssl_set usage + + Remove verify_remote_cert, as it's always TRUE now. Set allow_invalid_cert + to TRUE if verification is not required. + +M src/auth/db-oauth2.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/server-connection.c +M src/lib-http/http-client-connection.c +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-storage/index/pop3c/pop3c-client.c + +2017-02-20 09:32:15 +0200 Aki Tuomi (38424b808) + + lib-ssl-iostream: Fix ambiguity with SSL settings + + - lib-ssl-iostream as client: Use only allow_invalid_cert. If it's not set, + verify the server cert. + - lib-ssl-iostream as server: If verify_client_cert=FALSE, don't ask for the + client cert. Otherwise, ask for client cert but still allow it if + allow_invalid_cert=TRUE. + +M src/lib-ssl-iostream/iostream-openssl-context.c + +2017-02-23 01:24:43 +0200 Timo Sirainen (d95c7dbfa) + + virtual: Include virtual mailbox name in "Mailbox ID unexpectedly lost" + error + + +M src/plugins/virtual/virtual-sync.c + +2017-02-22 15:29:34 +0200 Timo Sirainen (e2fd3f13f) + + lib-storage: Allow mail_storage_set_error() to use existing error_string + + Fixes some code that may be attempting to copy an error from one storage to + another, but actually ends up trying to copy within the same storage. + +M src/lib-storage/mail-storage.c + +2017-02-22 20:05:16 +0200 Timo Sirainen (fdb838ec8) + + maildir: Fix checking vsize caching decision in "is this pop3 user?" + + If vsize extension is used, it's practically the same as if vsize's caching + decision was YES. + +M src/lib-storage/index/maildir/maildir-mail.c + +2017-02-22 20:04:28 +0200 Timo Sirainen (cee43a7b0) + + pop3c: Remove unnecessarily duplicated code setting vsize to cache + + This is important now that the vsize can be added also to index's vsize + extension. + +M src/lib-storage/index/pop3c/pop3c-mail.c + +2017-02-22 20:03:43 +0200 Timo Sirainen (dc7a24ade) + + pop3c: Prefetched streams didn't call istream_opened() or set virtual_size + + +M src/lib-storage/index/pop3c/pop3c-mail.c + +2016-11-01 18:43:57 +0200 Timo Sirainen (075081e25) + + lib-mail: istream-attachment-connector now allows msg_size=-1 for "unknown". + + +M src/lib-mail/istream-attachment-connector.c +M src/lib-mail/istream-attachment-connector.h +M src/lib-mail/test-istream-attachment.c + +2016-11-01 18:42:31 +0200 Timo Sirainen (24d6fd2b8) + + lib-mail: Make sure istream-attachment-connector detects wrong mail size. + + +M src/lib-mail/istream-attachment-connector.c +M src/lib-mail/test-istream-attachment.c + +2016-11-01 18:35:48 +0200 Timo Sirainen (422df9158) + + lib: Added i_stream_create_min_sized*() + + +M src/lib/istream-sized.c +M src/lib/istream-sized.h +M src/lib/test-istream-sized.c + +2016-11-01 14:47:05 +0200 Timo Sirainen (c3c423426) + + lib: Added i_stream_create_sized_range() + + This is just a small wrapper to i_stream_create_sized() to specify stream's + start offset. + +M src/lib/istream-sized.c +M src/lib/istream-sized.h + +2017-02-22 17:45:34 +0200 Timo Sirainen (dd38c9e81) + + trash plugin: Use correct hook for overriding mail_user vfuncs + + This was always wrong to do, and it crashes after + f32382d2da479a4371e08c443679528db37ea988 + +M src/plugins/trash/trash-plugin.c + +2017-02-22 17:21:56 +0200 Timo Sirainen (17ac264fe) + + expire plugin: Use correct hook for overriding mail_user vfuncs + + This was always wrong to do, and it crashes after + f32382d2da479a4371e08c443679528db37ea988 + +M src/plugins/expire/expire-plugin.c + +2017-02-22 15:32:19 +0200 Timo Sirainen (06c55920c) + + lazy-expunge: Fix error handling for GUID lookups + + If the mail is already expunged, the error should be ignored. In other + situations the original error string should be preserved as part of the + logged error message. + +M src/plugins/lazy-expunge/lazy-expunge-plugin.c + +2017-02-22 16:09:07 +0200 Timo Sirainen (d09be27cc) + + lib-storage: Add missing service_user ref when creating shared mailbox's + user. + + Was forgotten from d1bf4ae66b8bf3b9e28df1823d6d4adda2b923b6 + + Fixes: Panic: file mail-storage-service.c: line 1513 + (mail_storage_service_user_unref): assertion failed: (user->refcount > 0) + +M src/lib-storage/index/shared/shared-storage.c + +2017-02-22 13:30:18 +0200 Timo Sirainen (f6897616e) + + lib-storage: Removed mail_storage_service_user_free() backwards + compatibility + + Used a separate commit so the macro can be left for v2.2 tree. + +M src/lib-storage/mail-storage-service.h + +2017-02-22 13:30:00 +0200 Timo Sirainen (eb318ea05) + + global: Replace mail_storage_service_user_free() with _unref() + + +M src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-auth.c +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/imap-client.c +M src/imap/main.c +M src/indexer/master-connection.c +M src/lda/main.c +M src/lmtp/client.c +M src/lmtp/commands.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/quota/quota-status.c +M src/pop3/pop3-client.c + +2017-02-22 13:28:43 +0200 Timo Sirainen (d1bf4ae66) + + lib-storage: Use refcounting for mail_storage_service_user + + doveadm import was freeing the user too early, which resulted + mail_user._service_user pointing to freed memory. More importantly, after + 34512eaad8b1b2f929e6d6e3a2f7252c29fba97b user->set was pointing to already + freed memory. + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lib-storage/mail-user.c + +2017-02-22 13:02:27 +0200 Timo Sirainen (13f507c0d) + + quota: Don't log "Internal quota calculation error" + + It's not very informative and we can't give a better error message without + changing the APIs. The real error should have been logged already anyway, so + this is just duplication of an error. I think originally this was added + because some backend forgot to log an error. + +M src/plugins/quota/quota-storage.c + +2017-02-22 10:44:00 +0200 Timo Sirainen (6db1c8a3b) + + lib-lda: Fix pigeonhole testsuite to not crash + + +M src/lib-lda/mail-deliver.c + +2017-02-21 22:34:14 +0200 Timo Sirainen (035e7193b) + + lib: Fix again test-utc-mktime with 32bit time_t + + +M src/lib/test-utc-mktime.c + +2017-02-21 12:38:10 +0200 Timo Sirainen (87dae9ffc) + + lib-lda: Fix delivery logging when Sieve performs multiple actions + + Previous code assumed that it would work like: + - save/copy + - transaction commit + - mail_deliver_ctx_get_log_var_expand_table() + - repeat for transaction 2 + + While it really works: + - transaction 1: save/copy + - transaction 2: save/copy + - transaction 1: commit + - mail_deliver_ctx_get_log_var_expand_table() + - transaction 2: commit + - mail_deliver_ctx_get_log_var_expand_table() + + So the cache needs to be stored per transaction. This code still wouldn't + work correctly if Sieve saved mails multiple times within the same + transaction, but that doesn't happen (at least currently). + +M src/lib-lda/mail-deliver.c + +2017-02-21 12:36:52 +0200 Timo Sirainen (d609c2ffc) + + lib-lda: Refactor - mail_deliver_log_update_cache() doesn't need entire + deliver_ctx + + +M src/lib-lda/mail-deliver.c + +2017-02-21 12:34:59 +0200 Timo Sirainen (2e35ede0f) + + lib-lda: Refactor - Add struct mail_deliver_mailbox + + +M src/lib-lda/mail-deliver.c + +2017-02-21 19:55:48 +0200 Timo Sirainen (67905cc93) + + lib: Fix test-utc-mktime with 32bit time_t + + +M src/lib/test-utc-mktime.c + +2017-02-21 16:25:48 +0200 Martti Rannanjärvi (5423c3086) + + lib-mail: Place input/output of message-date tests in one struct + + Define both input and output of a message date test case in a single struct + so it is easier to follow and less error prone. Also add some leap second + tests. + +M src/lib-mail/test-message-date.c + +2017-02-21 17:00:14 +0200 Martti Rannanjärvi (33e83879e) + + lib: Place input/output of utc_mktime tests in one struct + + Define both input and output of a utc_mktime test case in a single struct so + it is easier to follow and less error prone. + +M src/lib/test-utc-mktime.c + +2017-02-21 16:25:25 +0200 Martti Rannanjärvi (ac3de45a2) + + lib: Accept leap second in utc_mktime + + Accept leap second at any time in utc_mktime since utc_mktime is being used + before applying the timezone offset everywhere. + +M src/lib/test-utc-mktime.c +M src/lib/utc-mktime.c +M src/lib/utc-mktime.h + +2017-02-21 14:42:01 +0200 Timo Sirainen (289bd999f) + + imap: Fix error message in failed FETCH's NO reply. + + This was broken only with the new imap_fetch_failure = no-after setting. + +M src/imap/cmd-fetch.c +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h + +2017-02-21 15:44:09 +0200 Timo Sirainen (1b0b44348) + + imapc: Error handling wasn't setting storage error everywhere. + + This would have used the previous error, which might not have been correct. + +M src/lib-storage/index/imapc/imapc-mail-fetch.c + +2017-02-21 14:20:22 +0200 Timo Sirainen (f86436b30) + + lib-storage: Fix mail.access_type for search prefetches + + +M src/lib-storage/index/index-search.c + +2017-02-21 13:48:36 +0200 Timo Sirainen (d03980c62) + + lmtp: Fix lmtp_user_concurrency_limit when userdb changes the username + + Anvil LOOKUP was done with the original username, while CONNECT/DISCONNECT + was done with the changed username. So LOOKUP always thought that there were + zero concurrent sessions for the user. + +M src/lmtp/commands.c + +2017-02-21 11:55:55 +0200 Timo Sirainen (7c04ede0d) + + cassandra: Don't use i_error() from non-main thread + + It will only cause crashes. This was done only if the internal communication + pipe couldn't be written to, which was pretty unlikely to happen. + +M src/lib-sql/driver-cassandra.c + +2017-02-21 13:08:59 +0200 Timo Sirainen (17909931d) + + lib-storage: Fix assert-crash on corrupted dovecot.list.index with + name_id==0 + + Fixes: Panic: file hash.c: line 213 (hash_table_insert_node): assertion + failed: (key != NULL) + +M src/lib-storage/list/mailbox-list-index.c + +2017-02-20 19:35:45 +0200 Timo Sirainen (bc315b159) + + lib-storage: Add asserts to make sure lookup_abort is being used correctly. + + +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort.c + +2017-02-20 19:34:25 +0200 Timo Sirainen (4d690a42c) + + lib-storage, pop3-migration: Reset lookup_abort before continuing to search + + This doesn't really fix anything right now, but it'll allow adding the + asserts in the following commit. + +M src/lib-storage/index/index-mailbox-size.c +M src/plugins/pop3-migration/pop3-migration-plugin.c + +2017-02-21 11:52:59 +0200 Aki Tuomi (54cad0e50) + + auth: Make sure tokeninfo or introspection URL is given + + +M src/auth/db-oauth2.c + +2017-02-21 11:21:19 +0200 Aki Tuomi (6a986052e) + + auth: Make tokeninfo optional + + It is not supported by all OAuth2 solutions + +M src/auth/db-oauth2.c + +2017-02-21 11:18:37 +0200 Aki Tuomi (177056ea9) + + lib-oauth2: Support basic authorization + + +M src/lib-oauth2/oauth2-introspect.c +M src/lib-oauth2/oauth2-refresh.c +M src/lib-oauth2/oauth2-token-validate.c + +2017-02-20 15:47:33 +0200 Aki Tuomi (a102d1898) + + lib-index: Unconstifty pointer array + + clang complained about the extra const. + +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/mail-index-transaction.c + +2017-02-20 15:35:02 +0200 Aki Tuomi (26e5bdf37) + + lib-index: Add missing initialization for chained hooks + + +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/mail-index-transaction.c + +2017-02-20 15:28:36 +0200 Aki Tuomi (6004fdf3c) + + lib,lib-storage: Move hook building code to lib + + This allows it to be reused elsewhere + +M src/lib-storage/mail-storage-hooks.c +M src/lib/Makefile.am +A src/lib/hook-build.c +A src/lib/hook-build.h + +2017-02-20 14:50:39 +0200 Aki Tuomi (23070cb7c) + + lib-lda: Do not involve mail-deliver plugin unnecessarely + + If no mail delivery by LDA/LMTP is being done, do not hook into the process. + + Fixes signal 11 crash with lazy-expunge. + +M src/lib-lda/mail-deliver.c + +2017-02-20 14:34:25 +0200 Aki Tuomi (2b8ff102f) + + lib-index: Allow multiple hooks for transaction creation + + +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/mail-index-transaction.c + +2017-02-20 14:26:41 +0200 Timo Sirainen (b317602a1) + + lib-compression: Fix test-compression to build without zlib + + +M src/lib-compression/test-compression.c + +2017-02-20 09:18:45 +0200 Aki Tuomi (ec3eb5329) + + pop3c: Add no pipelining pop3c feature + + This should help with certain broken pop3c servers that advertise that they + support pipelining but they really don't. + +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/index/pop3c/pop3c-client.h +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/pop3c/pop3c-settings.c +M src/lib-storage/index/pop3c/pop3c-settings.h +M src/lib-storage/index/pop3c/pop3c-storage.c + +2016-05-25 01:57:08 +0200 Stephan Bosch (74bc7e646) + + Partially implemented IMAP SEARCH=X-MIMEPART capability. + + This capability is currently Dovecot-specific. + +M src/lib-storage/Makefile.am +M src/lib-storage/index/Makefile.am +M src/lib-storage/index/imapc/imapc-search.c +A src/lib-storage/index/index-search-mime.c +M src/lib-storage/index/index-search-private.h +M src/lib-storage/index/index-search.c +M src/lib-storage/mail-search-args-cmdline.c +M src/lib-storage/mail-search-args-imap.c +A src/lib-storage/mail-search-mime-build.c +A src/lib-storage/mail-search-mime-build.h +A src/lib-storage/mail-search-mime-register.c +A src/lib-storage/mail-search-mime-register.h +A src/lib-storage/mail-search-mime.c +A src/lib-storage/mail-search-mime.h +M src/lib-storage/mail-search-register-imap.c +M src/lib-storage/mail-search.c +M src/lib-storage/mail-search.h +M src/lib-storage/mail-storage.c +M src/lib-storage/test-mail-search-args-imap.c + +2017-02-20 01:24:09 +0200 Timo Sirainen (d1ab4c39b) + + example-config: Add mail_sort_max_read_count setting. + + +M doc/example-config/conf.d/10-mail.conf + +2017-02-20 01:16:56 +0200 Timo Sirainen (e76721e63) + + example-config: Add mail_vsize_bg_after_count setting. + + +M doc/example-config/conf.d/10-mail.conf + +2017-02-20 01:00:05 +0200 Timo Sirainen (263e4212e) + + example-config: Add imap_fetch_failure setting. + + +M doc/example-config/conf.d/20-imap.conf + +2017-02-19 21:58:54 +0100 Stephan Bosch (89f6c7c1f) + + auth: oauth2 mechanism: Fixed implicit boolean expression involving a + pointer. + + Found with Clang -Wstrict-bool. + +M src/auth/mech-oauth2.c + +2017-02-18 05:01:50 +0200 Timo Sirainen (a0cd302bc) + + lib-storage: Add explicit MAIL_ERROR_LOOKUP_ABORT error + + The MAIL_ERROR_NOTPOSSIBLE was a bit too generic to assume to mean the same + thing. It doesn't look like there are any external plugins that break + because of this change. + +M src/doveadm/doveadm-mail.c +M src/imap/imap-commands-util.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/mail-error.h +M src/lib-storage/mail.c +M src/pop3/pop3-client.c + +2017-02-17 19:29:03 +0200 Timo Sirainen (dfaf420c4) + + lib-storage: Add mail.access_type + + +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/mail-storage.h + +2017-02-17 19:07:53 +0200 Timo Sirainen (a85cf0bdd) + + lib-storage: Add mail_sort_max_read_count setting. + + This controls how many slow mail accesses sorting can perform before it + fails: + + a NO [LIMIT] Requested sort would have taken too long + + The SORT reply is still returned, but it's likely not correct. + +M src/lib-storage/index/index-sort-private.h +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2017-02-17 18:56:23 +0200 Timo Sirainen (2898ad002) + + lib-storage: Add MAIL_ERROR_LIMIT + + +M src/doveadm/doveadm-mail.c +M src/imap/imap-commands-util.c +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/mail-error.h + +2017-02-17 18:32:05 +0200 Timo Sirainen (be6bde0e1) + + imap: If SEARCH/SORT fails but returns some results, send them to client. + + The previous error handling fixes cause SEARCH/SORT to now fail if there are + any problems reading mails. This change makes the commands still return the + best known results, so the IMAP client can still use them, even though they + may not be entirely correct. + +M src/imap/imap-search.c + +2017-02-17 18:30:51 +0200 Timo Sirainen (0796f4c0e) + + lib-storage: Fix error handling when searching mails + + Only expunge errors and failures caused by lookup_abort should be ignored. + The rest of the mail errors mean that the search result might not be + correct. We'll still run the search as fully as possible, but we just return + an error at the end. + +M src/lib-storage/index/index-search.c + +2017-02-17 18:24:31 +0200 Timo Sirainen (7f93dd01f) + + lib-storage: Search optimization - avoid parsing message_parts unnecessarily + + If they're not already cached, the mail is parsed twice: once to get the + message_parts and again to perform the actual search. The searching can + however do the message_parts parsing internally as well. + +M src/lib-storage/index/index-search.c + +2017-02-17 18:19:46 +0200 Timo Sirainen (6cf18519f) + + lib-storage: Fix error handling when sorting mails. + + All errors were treated the same as if message had been expunged. This + caused potentially wrong results to be sent to the client without any + indication that they're wrong. + +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort-private.h +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/index/index-sort.h + +2017-02-17 16:31:52 +0200 Timo Sirainen (ca004511f) + + lib-storage: Change vsize calculation to use the new mail_stream_opened + + This avoids calling mail_get_virtual_size() twice and is a bit cleaner + approach. + +M src/lib-storage/index/index-mailbox-size.c + +2017-02-17 16:20:06 +0200 Timo Sirainen (7204b8112) + + lib-storage: Add mail.mail_stream_opened and .mail_metadata_accessed + + These allow determining after mail_*() calls how efficiently they were + performed. + +M src/lib-storage/index/cydir/cydir-mail.c +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/raw/raw-mail.c +M src/lib-storage/mail-storage.h + +2017-02-17 16:14:39 +0200 Timo Sirainen (34f2590f3) + + lib-storage: Clarify what MAIL_LOOKUP_ABORT_READ_MAIL means. + + It should maybe even be renamed to something clearer. + +M src/lib-storage/mail-storage.h + +2017-02-19 01:44:21 +0200 Timo Sirainen (2da176a0b) + + dsync: Don't assert-crash if duplicate attributes are seen + + Just ignore the duplicates. Normally this shouldn't happen, but due to some + bugs for example a Sieve script could be returned once by doveadm_sieve + plugin and another time from mail_attribute_dict. + +M src/doveadm/dsync/dsync-mailbox-export.c + +2017-02-18 10:39:56 +0100 klemens (211c638d8) + + spelling fixes + + +M NEWS +M doc/example-config/conf.d/auth-system.conf.ext +M doc/example-config/dovecot-sql.conf.ext +M doc/man/doveadm-exec.1.in +M doc/securecoding.txt +M m4/dovecot.m4 +M m4/endian.m4 +M src/auth/password-scheme.h +M src/config/config-filter.c +M src/doveadm/client-connection-http.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/cmd-append.c +M src/imap/cmd-thread.c +M src/imap/main.c +M src/lib-dcrypt/ostream-encrypt.c +M src/lib-fts/fts-tokenizer-generic.c +M src/lib-fts/fts-tokenizer.h +M src/lib-http/http-client-queue.c +M src/lib-imap/imap-base-subject.c +M src/lib-index/mail-cache.c +M src/lib-mail/message-part-data.h +M src/lib-program-client/program-client-remote.c +M src/lib-sasl/dsasl-client.h +M src/lib-ssl-iostream/istream-openssl.c +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/maildir/maildir-storage.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/mailbox-attribute.h +M src/lib/fdatasync-path.c +M src/lib/sha1.h +M src/lib/sha3.c +M src/lib/test-data-stack.c +M src/log/log-connection.c + +2017-02-19 15:47:48 +0200 Timo Sirainen (b98f1ffc0) + + imap: Fix running time in tagged command replies. + + The timing information was updated only after command_exec() returned. Most + of the commands were handled within a single command_exec() though, so at + the time when tagline was sent the running_usecs was still zero. + + The msecs in ioloop timing was correct though, because it relied only on the + command start timing info. + +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-commands.c +M src/imap/imap-commands.h + +2017-02-19 02:03:08 +0200 Timo Sirainen (b4adb461c) + + doveadm: Add explicit mail_storage_init/deinit() calls + + This mainly prevents losing hooks that were registered by doveadm plugins. + + Otherwise what happens is: + - mail_plugins are unloaded and they unregister their hooks + - doveadm plugins (e.g. doveadm_sieve) are NOT unloaded + - mail_storage_deinit() frees all the registered hooks + - next mail_storage_init() initializes all new hooks + - All mail_plugins are loaded and they register again their hooks + - doveadm plugins are NOT re-loaded or re-initialized, so their existing + hooks were lost. + +M src/doveadm/doveadm-mail.c + +2017-02-19 02:02:20 +0200 Timo Sirainen (073353fe5) + + lib-storage: mail_storage_init/deinit() is now reference counted. + + This allows calling them multiple times and only the final deinit frees the + data. + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage.c + +2017-02-19 02:01:24 +0200 Timo Sirainen (798530867) + + lib-storage: Assert-crash if duplicate internal hooks are added. + + +M src/lib-storage/mail-storage-hooks.c + +2017-02-19 15:54:53 +0200 Timo Sirainen (43b95471c) + + fs-posix: Add "no-fsync" parameter. + + This disables calling fdatasync() when fs_write() was done with + FS_OPEN_FLAG_FSYNC. Useful for making tests faster. + +M src/lib-fs/fs-posix.c + +2017-02-19 14:49:20 +0200 Timo Sirainen (46e17407e) + + imap: Code cleanup - Remove duplicate flags from imap_fetch_state + + All the cur_flushed, line_partial and line_finished were about the same + thing. + +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h + +2017-02-19 14:34:45 +0200 Timo Sirainen (905627a76) + + imap: Fix sending UID only when necessary on broken FETCHes. + + b748f91d0677fffaa2208b39ebb6db3aeb2e937b changed UID to be sent for most + FETCH replies. There was also some existing code that attempted to do this, + but didn't fully work. + + So now: + + 1) If there are no non-buffered replies, the entire FETCH response isn't + sent. + + 2) If the buffer was already flushed and nothing else was sent, add UID to + reply. The code paths for handling this are differently for + imap_fetch_failure = disconnect-immediately vs others (depending on + imap_fetch_cur_failed() return value). + +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h + +2017-02-16 20:39:12 +0200 Timo Sirainen (9036b11c0) + + imap: Include info about last command in disconnection log line. + + Only if LOGOUT isn't sent, because that's already visible. + +M src/imap/imap-client.c +M src/imap/imap-client.h + +2017-02-16 20:29:46 +0200 Timo Sirainen (0eba75a2f) + + imap: Code cleanup - Move code to client_command_stats_append() + + +M src/imap/imap-client.c + +2017-02-16 20:17:32 +0200 Timo Sirainen (5334234b1) + + imap: Add imap_client.logged_out at LOGOUT + + This is useful for determining if client did a clean logout + +M src/imap/cmd-logout.c +M src/imap/imap-client.h + +2017-02-16 20:14:55 +0200 Timo Sirainen (567b56c2d) + + imap: Code cleanup - move command stats to struct client_command_stats + + +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-commands.c +M src/imap/imap-sync.c + +2017-02-17 15:46:38 +0200 Aki Tuomi (aee9f241f) + + mech-oauth2: Clarify logging + + +M src/auth/mech-oauth2.c + +2017-02-17 15:45:34 +0200 Aki Tuomi (ec87095cf) + + mech-oauth2: Set user_given=TRUE when username given in OAUTHBEARER + + +M src/auth/mech-oauth2.c + +2017-02-17 15:44:17 +0200 Aki Tuomi (8054b019b) + + mech-oauth2: Fix gs2-header parsing + + +M src/auth/mech-oauth2.c + +2017-02-14 18:48:51 +0200 Timo Sirainen (abd812f27) + + lib-storage: Update vsize header after sync only if sizes are cached. + + The result isn't needed yet in that case, so if it's slow to get the sizes + it might as well be delayd until later. This is especially useful when + indexer-worker triggers FTS indexing. The vsizes can be added to index after + the mail is already read for FTS. Without this change the vsize update would + first open all the mails and then the FTS indexing would open all the mails + a second time. + +M src/lib-storage/index/index-mailbox-size.c + +2017-02-07 16:18:55 +0200 Timo Sirainen (a758be690) + + lib-storage: Add mail_vsize_bg_after_count setting. + + If folder vsize calculation requires opening more than this many mails from + disk (i.e. mail sizes aren't in cache already), return failure and finish + the calculation via indexer process. + + This should be used like: + + protocol !indexer-worker { + mail_vsize_bg_after_count = 10 + } + +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h +M src/plugins/quota/quota-count.c + +2017-02-07 13:53:52 +0200 Timo Sirainen (abc063522) + + lib-storage: Don't stop vsize calculation on expunged mails. + + I don't know why I added such logic there in the first place. If we just + skip the expunged mails, the end result should still be correct and usable + when cached. + +M src/lib-storage/index/index-mailbox-size.c + +2017-02-14 13:33:47 +0200 Aki Tuomi (98d09d445) + + README: Add note that we support OAUTHBEARER and XOAUTH2 + + +M README.md + +2017-02-13 15:33:21 +0200 Aki Tuomi (9b6701754) + + auth: Add oauth2 passdb + + +M src/auth/Makefile.am +A src/auth/db-oauth2.c +A src/auth/db-oauth2.h +A src/auth/passdb-oauth2.c +M src/auth/passdb.c + +2017-02-04 23:56:04 +0200 Aki Tuomi (d1c565179) + + auth: Add xoauth2 and oauthbearer mechanisms + + +M src/auth/Makefile.am +A src/auth/mech-oauth2.c +M src/auth/mech.c + +2017-02-06 12:56:27 +0200 Aki Tuomi (10f6f2224) + + auth: Add mechanism filter for passdbs + + +M src/auth/auth-request.c +M src/auth/auth-settings.c +M src/auth/auth-settings.h +M src/auth/passdb.c +M src/auth/passdb.h + +2017-02-08 13:06:13 +0200 Aki Tuomi (edb35cb1a) + + auth: Add accessor for passdb template arguments + + +M src/auth/passdb-template.c +M src/auth/passdb-template.h + +2017-01-26 10:49:08 +0200 Aki Tuomi (60c302a89) + + lib-oauth2: Add support library for OAUTH2 + + +M configure.ac +M src/Makefile.am +A src/lib-oauth2/Makefile.am +A src/lib-oauth2/oauth2-introspect.c +A src/lib-oauth2/oauth2-private.h +A src/lib-oauth2/oauth2-refresh.c +A src/lib-oauth2/oauth2-token-validate.c +A src/lib-oauth2/oauth2.c +A src/lib-oauth2/oauth2.h + +2017-02-15 22:13:12 +0200 Timo Sirainen (dfa4b048e) + + lib-index: Fix updating mail_index_header.day_first_uid + + If user received a mail every day, the day_first_uid wasn't being updated. + This caused wrong caching decisions to be made in dovecot.index.cache: + + - Accessing >1 week old emails should have changed caching decision from + "tmp" to "yes". This might not have happened, although as long as + day_first_uid[7] pointed to an existing mail and email client accessed all + the mails, this wouldn't have changed anything. + + - Cache compression is supposed to drop >1 week old mails when caching + decision is "tmp". Not enough mails were being dropped because + day_first_uid[7] pointed to a much older than 1 week old mails. + + Also added a unit test to make sure this works. + + Broken by d9ee2f9fb3ef7b9391bfeeff1b374aead51667aa + +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/test-mail-index-transaction-update.c + +2017-02-15 22:12:15 +0200 Timo Sirainen (d97f939b1) + + lib-index: Add day_stamp parameter to mail_index_update_day_headers() + + This will help creating a unit test. + +M src/lib-index/mail-index-transaction-finish.c +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/test-mail-index-transaction-finish.c + +2017-02-15 18:20:05 +0200 Timo Sirainen (bb9065b1c) + + lib-storage: Re-open mailbox after it's undeleted. + + This is needed with mailbox formats that didn't fully open the mailbox while + it was undeleted. + +M src/lib-storage/mail-storage.c + +2017-02-15 18:18:46 +0200 Timo Sirainen (0b8282724) + + lib-storage: Don't sync mailbox after undeleting it. + + This is useful only when deleting it. With undeletion the syncing isn't + useful and might actually be harmful with mailbox formats that didn't fully + open the mailbox while it was undeleted. + +M src/lib-storage/mail-storage.c + +2017-02-15 18:05:14 +0200 Timo Sirainen (3857e2945) + + lib-storage: Make sure mailbox undeletion won't go to infinite loop + + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-02-15 23:32:52 +0200 Timo Sirainen (86448bdb6) + + mail-log: Add mail_log_cached_only setting. + + If enabled, everything except "save" event will log only the fields that can + be looked up from cache. This improves performance if some of the fields + aren't cached and it's not a strict requirement to log them. + +M src/plugins/mail-log/mail-log-plugin.c + +2017-02-15 13:46:06 -0500 Josef 'Jeff' Sipek (65148af51) + + lib-imap-client: pass the reply text to the auth-failed state change + callback + + +M src/lib-imap-client/imapc-connection.c + +2017-02-15 09:13:05 -0500 Josef 'Jeff' Sipek (7d8fe66fb) + + lib-imap-client: invoke state change callback on "authentication success" + + +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c + +2017-02-15 09:12:35 -0500 Josef 'Jeff' Sipek (e883e4406) + + lib-imap-client: add callback to notify consumers about state changes + + Add a callback to notify imapc users about failures. Currently, the only + failure defined is "authentication failed". + +M src/lib-imap-client/imapc-client-private.h +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c + +2017-02-14 08:58:10 -0500 Josef 'Jeff' Sipek (adb27e42f) + + lib-imap-client: centralize authentication failed error logging + + +M src/lib-imap-client/imapc-connection.c +M src/lib-storage/index/imapc/imapc-storage.c + +2017-02-04 15:40:41 +0100 Stephan Bosch (c177bc7c1) + + lib-http: response parser: Drop previous response's pool immediately when + parsing continues. + + Prevously, it would only do that when the first byte of the next response + was received. This prevents wasting memory when no response is being parsed. + +M src/lib-http/http-response-parser.c + +2017-02-04 16:21:51 +0100 Stephan Bosch (88ead42ee) + + lib-http: response parser: Always clear response to prevent referring to + stale data. + + +M src/lib-http/http-response-parser.c + +2017-02-04 16:15:57 +0100 Stephan Bosch (5a7107476) + + lib-http: test-http-response-parse: Properly test multiple sequential + responses. + + +M src/lib-http/test-http-response-parser.c + +2017-02-04 13:59:10 +0100 Stephan Bosch (1ec26e0b7) + + lib-http: message parser: Don't allocate a pool for the next message until + it is needed. + + This prevents wasting memory when no message is being parsed. + +M src/lib-http/http-message-parser.c +M src/lib-http/http-message-parser.h +M src/lib-http/http-request-parser.c +M src/lib-http/http-response-parser.c + +2017-02-04 14:11:36 +0100 Stephan Bosch (b04dfad6b) + + lib-http: message parser: Delay allocation of message header. + + +M src/lib-http/http-message-parser.c + +2017-02-04 14:03:25 +0100 Stephan Bosch (8b223f08b) + + lib-http: message parser: Don't create the connection_options array, unless + it is actually used. + + +M src/lib-http/http-message-parser.c +M src/lib-http/http-request.c + +2017-02-14 17:35:54 +0200 Timo Sirainen (201ce62e1) + + lib-mail: Fix duplicate HEADER_FILTER_ADD_MISSING_EOH callback call + + If headers weren't modified, the second reading of the istream shouldn't + call any callbacks. + +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c + +2017-02-15 00:08:49 +0200 Timo Sirainen (209d29ccf) + + doveadm: Added "mailbox path" command + + This allows easily printing a path for a mailbox, index, control dir, etc. + +M src/doveadm/doveadm-mail-mailbox.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h + +2017-02-14 20:23:16 +0200 Timo Sirainen (2a494f93f) + + lib-lda: Code cleanup - remove unnecessary dest_mail check + + +M src/lib-lda/mail-deliver.c + +2017-02-14 20:20:07 +0200 Timo Sirainen (04ca05320) + + lib-lda: Don't set mail_deliver_context.dest_mail too early. + + It must be NULL for the caller, unless save_dest_mail==TRUE + +M src/lib-lda/mail-deliver.c + +2017-02-13 20:49:12 +0200 Timo Sirainen (b3523787a) + + lib-lda: Implement %{storage_id} correctly + + +M src/lib-lda/mail-deliver.c + +2017-02-13 20:47:51 +0200 Timo Sirainen (eed56fe22) + + lib-lda: Fix deliver_log_format variables with Sieve + + With Sieve it was using src_mail for getting the values, which weren't + correct especially if Sieve had modified the mail. + +M src/lda/main.c +M src/lib-lda/Makefile.am +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-deliver.h +M src/lmtp/main.c + +2017-02-13 20:46:16 +0200 Timo Sirainen (a97911139) + + lib-lda: Code cleanup - mail_deliver_open_mail() now uses uid parameter + + +M src/lib-lda/mail-deliver.c + +2017-02-13 20:44:31 +0200 Timo Sirainen (796d1ca5e) + + lib-lda: Remove %{storage_id} setting for now. + + It doesn't work with Sieve. The following patches add it back properly. + +M src/lib-lda/mail-deliver.c + +2017-02-09 19:00:12 +0200 Timo Sirainen (12e28ffc2) + + lib-lda: Redesign mail_deliver_context.var_expand_table cache + + +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-deliver.h + +2017-02-09 18:49:53 +0200 Timo Sirainen (4f210e191) + + lib-lda: Avoid using mailbox_save_set_dest_mail() + + +M src/lib-lda/mail-deliver.c + +2017-02-09 18:46:14 +0200 Timo Sirainen (df71146c7) + + lib-storage: Add mailbox_save_get_dest_mail() + + This marks mailbox_save_set_dest_mail deprecated. It's not efficient to use + since it frees the already-created dest_mail. + +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2017-02-09 18:01:14 +0200 Timo Sirainen (5f1f92d6f) + + lib-lda: Remove unused mail_deliver_get_log_var_expand_table() + + +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-deliver.h + +2017-02-13 20:23:49 +0200 Timo Sirainen (8eba88323) + + virtual: Fix saving to a virtual mailbox to work again + + Previous changes broke it. + +M src/plugins/virtual/virtual-mail.c +M src/plugins/virtual/virtual-save.c +M src/plugins/virtual/virtual-storage.h + +2017-02-09 17:18:51 +0200 Timo Sirainen (880f7a015) + + plugins: Remove unnecessary mail_save_context.dest_mail==NULL checks + + It can never be NULL after the previous change: "lib-storage: Always create + mail_save_context.dest_mail". + +M src/plugins/notify/notify-storage.c +M src/plugins/quota/quota-storage.c +M src/plugins/virtual/virtual-save.c +M src/plugins/zlib/zlib-plugin.c + +2017-02-09 17:14:57 +0200 Timo Sirainen (a82528107) + + lib-storage: Remove unnecessary mail_save_context.dest_mail==NULL checks + + It can never be NULL after the previous change: "lib-storage: Always create + mail_save_context.dest_mail". + + The code removal in maildir_transaction_save_commit_pre() seemed potentially + dangerous, but I don't think such code path is possible anymore. Also even + if it is, it's probably fine since the mail_free() is called even earlier + than before (although that itself might have been a problem). + + This also removes last traces of code that made it possible to save mails to + mbox without assigning UID to the mail. The previous commit already caused + this, so this is just removing dead code. + +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-common/dbox-save.h +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-copy.c +M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-sync-private.h +M src/lib-storage/index/mbox/mbox-sync.c + +2017-02-09 16:53:47 +0200 Timo Sirainen (897368f75) + + lib-storage: Always create mail_save_context.dest_mail + + This allows removing similar mail_alloc() from storage backends and plugins + that need it. + + As a side effect, this changes mbox code to always assign UIDs to saved + mails. This shouldn't be much of a problem, since it happened practically + always already. + +M src/lib-storage/index/index-transaction.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2017-02-09 16:34:52 +0200 Timo Sirainen (58289301c) + + lib-storage: Fix mailbox list index hook usage + + The previous method appeared to work, but not if the internal hooks were + used more than once. + +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h + +2017-02-13 23:34:25 +0200 Timo Sirainen (9b08d9d9b) + + dict-sql: Fix error handling in commit + + sql_dict_prev_inc_flush() or sql_dict_prev_set_flush() might set ctx->error, + so they need to be done earlier. + +M src/lib-dict/dict-sql.c + +2017-02-14 10:42:26 +0200 Martti Rannanjärvi (7707c4b35) + + lib-index: zero mmap_length after logging error + + Logging that mmap(size=0) failed looks suspicious. + +M src/lib-index/mail-cache.c + +2017-02-13 19:40:22 +0200 Aki Tuomi (532bb6cdc) + + mail-crypt: Do not restrict access in unit test + + This works around problem with docker + +M src/plugins/mail-crypt/test-mail-key.c + +2017-02-14 10:54:29 +0200 Timo Sirainen (833fd67ff) + + lib: Clarify *_strsplit_spaces() and add unit test + + +M src/lib/strfuncs.h +M src/lib/test-strfuncs.c + +2017-02-13 23:46:15 +0200 Timo Sirainen (c2664306f) + + lib: Add pool_alloconly_create_clean() + + This partially reverts 2a2beae3a4c1e75b3aeff996781503138e6f24bc + +M src/lib/mempool-alloconly.c +M src/lib/mempool.h + +2017-02-13 20:02:24 +0200 Timo Sirainen (d9cec8211) + + LAYOUT=index: Fix duplicate mailbox name renaming to actually work + + +M src/lib-storage/list/mailbox-list-index.c + +2017-02-13 20:01:13 +0200 Timo Sirainen (0e9dc599a) + + LAYOUT=index: Rename mailbox_list_index_node.corrupted_parent to + corrupted_ext + + The code will be useful for other purposes also besides updating corrupted + parents. + +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h + +2017-01-31 19:43:30 +0200 Aki Tuomi (07038d3a1) + + driver-cassandra: Add support for speculative execution + + +M m4/want_cassandra.m4 +M src/lib-sql/driver-cassandra.c + +2017-02-08 12:03:30 +0200 Timo Sirainen (945565e0c) + + lib-index: Add MAIL_INDEX_OPEN_FLAG_NO_DIRTY + + This way mailbox format backends that don't need dirty flags can use them + for other purposes. + +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index.h + +2017-02-10 16:26:15 +0200 Timo Sirainen (f9cf9852b) + + cassandra: Track query counts internally and include them in metrics + + +M src/lib-sql/driver-cassandra.c + +2017-02-13 18:06:46 +0200 Timo Sirainen (3715e1d5c) + + lib-compress: Fix missing .gz header error message + + +M src/lib-compression/istream-zlib.c + +2017-02-13 18:05:13 +0200 Timo Sirainen (d827cffa4) + + lib-compress: Fix assert-crash when .gz header size exceeds buffer max + length + + Instead treat the stream as corrupted and return EINVAL. + + Fixes: Panic: file istream.c: line 182 (i_stream_read): assertion failed: + (_stream->skip != _stream->pos) + +M src/lib-compression/istream-zlib.c +M src/lib-compression/test-compression.c + +2017-02-10 15:27:13 +0200 Timo Sirainen (887c92aa9) + + lib-http: http_client_request_add_header() - Add key/value asserts + + These don't check that they're entirely correct as required by HTTP + specifications. They're mainly there as a quick check that if the caller + didn't validate the key/value in any way, we'll crash instead of creating a + potential security hole. (Because with line feeds the attacker could add + extra headers or even entirely new HTTP requests.) + +M src/lib-http/http-client-request.c + +2017-02-13 09:09:28 +0200 Martti Rannanjärvi (8e90ca575) + + lib-index: clear file->mmap_size only after logging it + + Logging the error with size=0 loses information. + +M src/lib-index/mail-transaction-log-file.c + +2017-02-13 09:08:25 +0200 Martti Rannanjärvi (9c7e81a1f) + + lib-index: don't reset ioloop_time on mmap error + + The variables seems to have been in the wrong order. + +M src/lib-index/mail-transaction-log-file.c + +2017-02-08 12:47:06 +0200 Timo Sirainen (bbe7af394) + + quota: Log why quota_over_flag check is skipped if mail_debug=yes + + +M src/plugins/quota/quota.c + +2017-02-07 15:46:47 +0200 Timo Sirainen (40edfbbb8) + + quota: If quota_over_script is unset, skip the quota_over check. + + +M src/plugins/quota/quota.c + +2017-02-07 15:44:20 +0200 Timo Sirainen (b711a7fc7) + + quota: If quota_over_flag_value is unset, skip the quota_over check. + + +M src/plugins/quota/quota.c + +2017-02-07 15:33:07 +0200 Timo Sirainen (4009eb0bb) + + quota: Remove quota_over_flag_* from quota_root. + + They are used only in one specific location and don't need to be stored + permanently. + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c + +2017-02-10 13:17:00 +0200 Timo Sirainen (adea69875) + + global: Add asserts to make static analyzer happier. + + +M src/auth/db-ldap.c +M src/doveadm/doveadm-mail-index.c +M src/lib-auth/auth-master.c +M src/lib-fs/fs-posix.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/mail-autoexpunge.c +M src/lib/file-dotlock.c +M src/lib/iostream-temp.c + +2017-02-10 13:15:58 +0200 Timo Sirainen (fd013f9c6) + + pop3-login: Code cleanup - Make sure destroying client stops processing. + + It would currently do it in any case, but this makes it clearer. + +M src/pop3-login/client.c + +2017-02-10 13:15:26 +0200 Timo Sirainen (963842c00) + + global: Ignore unnecessary return values. + + +M src/imap-urlauth/imap-urlauth-worker.c +M src/plugins/virtual/virtual-storage.c + +2017-02-10 13:13:01 +0200 Timo Sirainen (7f51c1ad9) + + mail-filter: Handle handshake write() failure + + +M src/plugins/mail-filter/istream-ext-filter.c + +2017-02-10 12:50:58 +0200 Timo Sirainen (766ba3eed) + + fts: Fix crash using fts_autoexpunge_exclude = \Special-use crash + + It crashed whenever seeing a mailbox that didn't have any special-use flags. + +M src/plugins/fts/fts-storage.c + +2017-02-10 12:46:50 +0200 Timo Sirainen (4a48987ed) + + doveadm mailbox metadata list: Fix listing all metadata. + + It was listing only private attributes, because key_type=0 happens to be + MAIL_ATTRIBUTE_TYPE_PRIVATE and key was never NULL. + +M src/doveadm/doveadm-mail-mailbox-metadata.c + +2017-02-10 12:41:28 +0200 Timo Sirainen (c1ab825ed) + + mail-crypt-acl: Fix error handling + + Don't crash if mail_user creation failed. + +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c + +2017-02-10 12:40:41 +0200 Timo Sirainen (5202ed6f1) + + doveadm mailbox cryptokey generate: Fix error handling + + Don't crash if mail_user creation failed. + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-02-10 12:33:01 +0200 Timo Sirainen (52e31bbdd) + + doveadm mailbox cryptokey generate: Fix memory leak + + dest_user was set to NULL, but never freed. + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2017-02-10 12:20:37 +0200 Timo Sirainen (66761ea6a) + + lib-program-client: Clarify dot_input/dot_output NULL checks. + + Helps to avoid static analyzer false positives about NULL pointer + dereference. + +M src/lib-program-client/program-client.c + +2017-02-10 12:09:50 +0200 Timo Sirainen (0896246f4) + + doveadm director map: Fix checking if host parameter is required + + +M src/doveadm/doveadm-director.c + +2017-02-10 11:58:17 +0200 Timo Sirainen (ae9c5dd89) + + lib: Avoid unnecessary Coverity warnings in MALLOC_*() + + There doesn't seem to be any other nice way of avoiding these without + separately marking every instance. + +M src/lib/malloc-overflow.h + +2017-02-09 16:33:35 +0200 Timo Sirainen (ee92a5576) + + TODO: Remove some of the implemented features + + +M TODO + +2017-02-08 23:01:32 +0200 Timo Sirainen (84cccc6b5) + + pop3c: Increase timeout for PASS to 5 minutes. + + +M src/lib-storage/index/pop3c/pop3c-client.c + +2017-02-06 18:34:05 +0200 Timo Sirainen (c72fbbe63) + + sdbox: Fix assert-crash on mailbox create race + + If another process created the mailbox at the same time, the mailbox_guid + wasn't set and opening the mailbox assert-crashed: + + Panic: file mail-storage.c: line 1744 (mailbox_get_metadata): assertion + failed: ((items & MAILBOX_METADATA_GUID) == 0 || + !guid_128_is_empty(metadata_r->guid)) + +M src/lib-storage/index/dbox-single/sdbox-storage.c + +2017-02-07 21:07:54 +0200 Timo Sirainen (92c671c16) + + quota: Clarify quota_count() return value. + + +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-private.h + +2017-02-07 20:41:41 +0200 Timo Sirainen (cd337e465) + + quota: Make sure quota_warning doesn't wrap "quota before" value. + + This could happen in some race conditions (and with bugs). + +M src/plugins/quota/quota.c + +2017-02-07 18:26:50 +0200 Timo Sirainen (f97866381) + + quota: When executing quota_warning/over_flag script, log the reason why. + + +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-util.c +M src/plugins/quota/quota.c + +2017-02-06 14:37:05 +0200 Martti Rannanjärvi (2eeea57b4) + + lib-storage: remove mail_storage_get_driver_settings + + It has been marked obsolete. + +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2017-02-07 13:19:17 +0200 Aki Tuomi (3e675de58) + + lib: Check that output max size is non-zero when version specified + + Otherwise we try to send version to non-existent output stream. + +M src/lib/connection.c + +2017-01-22 13:42:25 +0100 Stephan Bosch (2a5682a64) + + fts-tika: Fixed HTTPS support by properly propagating SSL client settings + from mail_user. + + +M src/plugins/fts/Makefile.am +M src/plugins/fts/fts-parser-tika.c + +2017-01-22 13:41:25 +0100 Stephan Bosch (526631052) + + fts-solr: Fixed HTTPS support by properly propagating SSL client settings + from mail_user. + + +M src/plugins/fts-solr/Makefile.am +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-backend-solr.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts-solr/solr-connection.h + +2017-01-22 13:40:00 +0100 Stephan Bosch (26bdbffc3) + + lib-storage: Added mail_user_init_ssl_client_settings(). + + +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h + +2016-12-28 12:02:14 -0600 johnkwoods (dce4003a3) + + lib-ldap: Remove extra return + + The ldap_connection_queue_request() function returns void. Trying to + "return" something from a void function caused compiling issues on Solaris + (Oracle Developer Studio 12.5). + +M src/lib-ldap/ldap-compare.c + +2017-01-22 17:24:02 -0600 J. Nick Koston (f817e98f7) + + fts-solr: Allow username/password for solr connction + + Solr comes open to the world by default. For better security, we protect our + solr installs with a user and password. This change allows dovecot to + connect to these instances. + + Example usage in a fts.conf (permissions 0600) + fts_solr = url=http://nick:pass@127.0.0.1:8983/solr/dovecot/ + +M src/plugins/fts-solr/solr-connection.c + +2017-02-06 14:05:47 +0200 Timo Sirainen (e4109fe52) + + indexer: Don't send more requests directly from worker status callback + + This causes assert-crashes when workers disconnect while having multiple + requests: + + indexer: Error: Indexer worker disconnected, discarding 2 requests for + user@domain indexer: Panic: file indexer.c: line 69 (queue_try_send_more): + assertion failed: (worker_connection_is_connected(conn)) + +M src/indexer/indexer.c + +2017-02-05 16:49:05 +0200 Timo Sirainen (704a96fa6) + + imap: Add imap_fetch_failure setting + + This controls what happens when FETCH fails for some mails. The possible + values are: + + disconnect-immediately: This is the original behavior. Whenever FETCH fails + for a mail, the FETCH is aborted and client is disconnected. + + disconnect-after: The FETCH runs for all the requested mails, skipping any + mails that returned failures, but at the end the client is still + disconnected. + + no-after: The FETCH runs for all the requested mails, skipping any mails + that returned failures. At the end tagged NO reply is returned. If the + client attempts to FETCH the same failed mail more than once, the client is + disconnected. This is to avoid clients from going into infinite loops trying + to FETCH a broken mail. + +M src/imap/cmd-fetch.c +M src/imap/imap-client.h +M src/imap/imap-commands-util.c +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h +M src/imap/imap-settings.c +M src/imap/imap-settings.h + +2017-02-05 16:24:08 +0200 Timo Sirainen (287a58f11) + + imap: Share mailbox closing code in SELECT/UNSELECT/CLOSE/LOGOUT/deinit + + +M src/imap/cmd-close.c +M src/imap/cmd-logout.c +M src/imap/cmd-select.c +M src/imap/cmd-unselect.c +M src/imap/imap-client.c +M src/imap/imap-commands-util.c +M src/imap/imap-commands-util.h + +2017-02-05 16:23:35 +0200 Timo Sirainen (9aa91e371) + + imap: Free search updates on CLOSE + + +M src/imap/cmd-close.c + +2017-02-05 16:10:44 +0200 Timo Sirainen (b748f91d0) + + imap: Don't send empty FETCH () on failure + + It violates IMAP RFC. Send FETCH (UID n) instead. + +M src/imap/imap-fetch.c + +2017-02-06 11:02:46 +0200 Timo Sirainen (2b8c4027a) + + lib-ssl-iostream: Fix memory leak in RSA_generate_key_ex() usage + + +M src/lib-ssl-iostream/iostream-openssl-context.c + +2017-02-06 11:23:50 +0200 Timo Sirainen (2f2b1b725) + + auth: Handle delayed credentials identically in auth-workers + + +M src/auth/auth-request.c + +2017-02-06 10:55:40 +0200 Timo Sirainen (dd6043c05) + + lib: Make sure NULL is defined to be ((void *)0) + + This avoids us having to do explicit (void *)NULL casts in e.g. io_add(..., + NULL) context parameter. + +M src/lib/compat.h + +2017-02-04 13:51:13 +0200 Timo Sirainen (34512eaad) + + lib-storage: Don't duplicate service user's settings into mail_user + + The mail_storage_service_user.user_set isn't used afterwards, so it can be + directly used to avoid wasting memory. + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h + +2017-02-04 13:38:17 +0200 Timo Sirainen (3c2e763ab) + + lib-storage: Don't unnecessarily duplicate user's all setting strings + + user->unexpanded_set and user->set have the same life-time, so they can + point to same strings. + +M src/lib-storage/mail-user.c + +2017-02-05 20:29:10 +0200 Timo Sirainen (c6108c1bf) + + lib-ssl-iostream: Remove libdovecot_openssl_common.la + + Using such a library results in the same code being duplicated (in OSX) in + both libssl_iostream_openssl.so and libdcrypt_openssl.so. This breaks the + idea of openssl_init_refcount, because each one will have their own one. + + libdcrypt_openssl.so now links to libssl_iostream_openssl.so, which + shouldn't really be a problem, because lib-ssl-iostream is part of the core + libdovecot.so already. It would have been possible to also install + libdovecot_openssl_common.so and link it to both libssl_iostream_openssl.so + and libdcrypt_openssl.so, but that seems unnecessarily complicated. + +M src/lib-dcrypt/Makefile.am +M src/lib-ssl-iostream/Makefile.am + +2017-02-05 20:28:04 +0200 Timo Sirainen (84e69f2ae) + + lib-ssl-iostream: Remove empty $(ssl_sources) from Makefile + + +M src/lib-ssl-iostream/Makefile.am + +2017-02-05 20:26:12 +0200 Timo Sirainen (f089a10e4) + + lib-dcrypt: Link unit tests with libssl_iostream.la + + libssl_iostream_openssl.so requires this, and it doesn't get added from + anywhere automatically. + +M src/lib-dcrypt/Makefile.am + +2017-02-05 20:24:41 +0200 Timo Sirainen (fb8e12a31) + + lib-dcrypt: Remove unnecessary -shared link flag + + Not sure if this is harmful, but since no other plugin uses this it's not + needed either. + +M src/lib-dcrypt/Makefile.am + +2017-02-05 20:22:27 +0200 Timo Sirainen (d7d1fec9f) + + lib-dcrypt: Don't link liblib.la to libdcrypt_openssl.so + + At best this does nothing, at worst (like with OSX) it duplicates the entire + liblib and creates split state between the two instances. + +M src/lib-dcrypt/Makefile.am + +2017-02-05 20:20:37 +0200 Timo Sirainen (5fc85eac8) + + lib-dcrypt: If dcrypt can't be initialized, log also the reason. + + This is very helpful when debugging linking issues. + +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c + +2017-02-05 21:38:33 +0200 Timo Sirainen (e93dc99f2) + + lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via + configure + + +M m4/ssl.m4 +M src/lib-ssl-iostream/dovecot-openssl-common.c + +2017-02-05 21:31:08 +0200 Timo Sirainen (04b6c66af) + + lib-ssl-iostream: Call OBJ_cleanup() for all OpenSSL versions + + Just to reduce the #if checks that uglify the code. + +M src/lib-ssl-iostream/dovecot-openssl-common.c + +2017-02-05 21:10:04 +0200 Timo Sirainen (b91659702) + + lib-ssl-iostream: Detect OPENSSL_cleanup() via configure + + It's ugly to have both OpenSSL version number check and a special LibreSSL + check. + +M m4/ssl.m4 +M src/lib-ssl-iostream/dovecot-openssl-common.c + +2017-02-05 21:04:35 +0200 Timo Sirainen (803d5e009) + + lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure + + The version number check doesn't work correctly for LibreSSL. + +M m4/ssl.m4 +M src/lib-ssl-iostream/dovecot-openssl-common.c + +2017-02-05 21:56:20 +0200 Timo Sirainen (13479101d) + + lib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists + + This avoids deprecation warnings about ASN1_STRING_data() in OpenSSL v1.1. + +M m4/ssl.m4 +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl.h + +2017-02-05 21:51:29 +0200 Timo Sirainen (74feb3985) + + lib-ssl-iostream: Use RSA_generate_key_ex() if it exists + + This avoids deprecation warnings about RSA_generate_key() in OpenSSL v1.1. + +M m4/ssl.m4 +M src/lib-ssl-iostream/iostream-openssl-context.c + +2017-02-06 00:11:14 +0200 Timo Sirainen (f6fd135d1) + + dict-sql: Move USING TIMESTAMP to correct location for INSERTs + + +M src/lib-dict/dict-sql.c + +2017-02-06 00:48:18 +0200 Timo Sirainen (ea7f7e1a7) + + auth: Pass through passdb extra fields to auth-worker requests + + +M src/auth/auth-request.c + +2017-02-06 00:46:55 +0200 Timo Sirainen (90e417d32) + + auth: Code cleanup - Move userdb extra fields exporting to its own function + + +M src/auth/auth-request.c + +2017-02-05 19:52:20 +0200 Timo Sirainen (da61fd89f) + + lib: Fix compiler warning with non-Linux + + +M src/lib/nfs-workarounds.c + +2017-01-25 23:26:35 +0200 Timo Sirainen (c7378b542) + + lib-storage: Expunging now uses GUID only if it's in cache. + + Otherwise the GUID lookup may be expensive, which is especially bad when + deleting a large number of mails. + +M src/lib-storage/index/index-mail.c + +2017-02-03 19:40:54 +0200 Timo Sirainen (f5ddf3762) + + lib-storage: Fix autoexpunge locking to actually work correctly. + + It wasn't actually skipping the autoexpunging if the lock already existed. + It autoexpunged anyway. + +M src/lib-storage/mail-autoexpunge.c + +2017-02-04 10:42:21 +0200 Aki Tuomi (f977ec781) + + lib-storage: Put vsize in index only if it's not there -2017-02-21 11:18:37 +0200 Aki Tuomi (3fe1b915d) - - lib-oauth2: Support basic authorization - - -M src/lib-oauth2/oauth2-introspect.c -M src/lib-oauth2/oauth2-refresh.c -M src/lib-oauth2/oauth2-token-validate.c - -2017-02-20 14:50:39 +0200 Aki Tuomi (522951a21) - - lib-lda: Do not involve mail-deliver plugin unnecessarely - - If no mail delivery by LDA/LMTP is being done, do not hook into the process. - - Fixes signal 11 crash with lazy-expunge. - -M src/lib-lda/mail-deliver.c - -2017-02-20 14:26:41 +0200 Timo Sirainen (e0a5e6b35) - - lib-compression: Fix test-compression to build without zlib - - -M src/lib-compression/test-compression.c - -2017-02-20 14:07:23 +0200 Timo Sirainen (fc036db1a) - - imap: Revert change to use [PARSE] in FETCH replies. - - Lets leave this for v2.3. Apparently Roundcube has some workarounds that - assume [UNKNOWNCTE]. - - Partially reverts 8fe64e2af5b6ce7b6ffa6453beaf569dca089e59 - -M src/imap/cmd-fetch.c - -2017-02-20 09:18:45 +0200 Aki Tuomi (d49715191) - - pop3c: Add no pipelining pop3c feature - - This should help with certain broken pop3c servers that advertise that they - support pipelining but they really don't. - -M src/lib-storage/index/pop3c/pop3c-client.c -M src/lib-storage/index/pop3c/pop3c-client.h -M src/lib-storage/index/pop3c/pop3c-mail.c -M src/lib-storage/index/pop3c/pop3c-settings.c -M src/lib-storage/index/pop3c/pop3c-settings.h -M src/lib-storage/index/pop3c/pop3c-storage.c -2016-05-25 01:57:08 +0200 Stephan Bosch (2b6a62144) +M src/lib-storage/index/index-mail.c - Partially implemented IMAP SEARCH=X-MIMEPART capability. +2017-02-03 14:22:02 +0200 Aki Tuomi (79195413c) - This capability is currently Dovecot-specific. + fts: Use mailbox_list_created hook -M src/lib-storage/Makefile.am -M src/lib-storage/index/Makefile.am -M src/lib-storage/index/imapc/imapc-search.c -A src/lib-storage/index/index-search-mime.c -M src/lib-storage/index/index-search-private.h -M src/lib-storage/index/index-search.c -M src/lib-storage/mail-search-args-cmdline.c -M src/lib-storage/mail-search-args-imap.c -A src/lib-storage/mail-search-mime-build.c -A src/lib-storage/mail-search-mime-build.h -A src/lib-storage/mail-search-mime-register.c -A src/lib-storage/mail-search-mime-register.h -A src/lib-storage/mail-search-mime.c -A src/lib-storage/mail-search-mime.h -M src/lib-storage/mail-search-register-imap.c -M src/lib-storage/mail-search.c -M src/lib-storage/mail-search.h -M src/lib-storage/mail-storage.c -M src/lib-storage/test-mail-search-args-imap.c + Otherwise the deinit hook might get lost and fts would not be deinitialized. + + Reverts 11f12ca1c97583b551a4286fa6cd1ab33aa67680 which seems to have been + unnecessary + + Fixes indexer-worker signal 11 crash + +M src/plugins/fts/fts-plugin.c +M src/plugins/fts/fts-storage.c +M src/plugins/fts/fts-storage.h + +2017-02-03 16:16:26 +0200 Timo Sirainen (f32382d2d) + + lib-storage: Once hooks have run, set vlast to NULL to make sure it's not + used + + The functions can't be correctly overridden outside their own specific + hooks. It would work only if hook_build_update() is called afterwards and + currently there's no public API for that. + +M src/lib-storage/mail-storage-hooks.c + +2017-01-30 21:28:20 +0200 Timo Sirainen (093d5c0cd) + + lib-storage: Add assert to make sure header parsing isn't recursed + + +M src/lib-storage/index/index-mail-headers.c + +2017-02-02 01:36:50 +0100 Stephan Bosch (b3df4be57) + + lib-http: client: Fixed peer reconnection failure handling. + + The addressed problem occurs in a very specific situation in which the + original successful connection is dropped, yet a new connection fails. It + manifests as an assertion failure or panic: + + Panic: file ioloop-epoll.c: line 189 (io_loop_handler_run_internal): + assertion failed: (msecs >= 0) Panic: BUG: No IOs or timeouts set. Not + waiting for infinity. + + The timing is very critical. However, this doesn't mean that the occurrence + of this problem is very unlikely; it can happen frequently under high load. + +M src/lib-http/http-client-queue.c +M src/lib-http/test-http-client-errors.c + +2017-02-02 01:34:35 +0100 Stephan Bosch (aa881f8f1) + + lib-http: client: Respect the connection idle timeout, even when all queues + have unlinked from a peer. + + Otherwise, the DNS TTL timeout dictates the connection idle timeout in some + situations. + +M src/lib-http/http-client-peer.c + +2017-02-02 11:47:24 +0200 Timo Sirainen (18c01c257) + + dict: Fix error logging if TIMESTAMP parameters are wrong. + + +M src/dict/dict-commands.c + +2017-02-01 10:48:37 +0200 Martti Rannanjärvi (000e7cdeb) + + lib-master: Ignore t_readlink ENOENT error on updating instances list + + The list may contain paths that don't exist anymore. + +M src/lib-master/master-instance.c + +2017-01-31 21:03:29 +0200 Timo Sirainen (f46f53bad) + + imap: Fix panic on FETCH X-MAILBOX in virtual mailbox when mail is expunged + + +M src/imap/imap-fetch.c + +2017-01-31 20:27:54 +0200 Timo Sirainen (9b5576a26) + + lib: Fix -Wstrict-bool compiler warnings. + + +M src/lib/test-path-util.c + +2017-01-30 19:45:28 +0200 Martti Rannanjärvi (4f2c34337) + + lib: Implicitly ignore memmove and memcpy return values in path-util + + This is because dovecot code doesn't explicitly ignore the return values of + those functions elsewhere either. + +M src/lib/path-util.c + +2017-01-31 13:41:48 +0100 Stephan Bosch (e009b0d73) + + lib-http: server: Fix premature connection destroy in + http_server_connection_output(). + + Added a reference to the connection object while it is sending the remainder + of a response's payload. This is necessary, since + http_server_response_send_more() can destroy the connection, for example + when the request has a "Connection: close" header. This will only occur for + responses with a very large payload, because otherwise the payload is fully + sent in in the initial pass. + +M src/lib-http/http-server-connection.c + +2017-01-09 23:13:03 +0200 Timo Sirainen (4e87679b7) + + lib-storage: When logging corrupted mail size, disable logging Message-ID + for now + + This was causing crashes in some situations. It was originally added to + figure out if there were problems with dovecot.index.cache containing data + for wrong messages. This was never found to happen, although now thinking + about it, the problem may have been + 741287129c22cadc14c05584704685b31169dbce. So perhaps this code could be + removed permanently as well. + + 6b44fc75c0039d1006ce4d543544552449b8e229 also attempted to fix this, but it + wasn't enough. There was still some code path that lead to recursive header + parsing. + +M src/lib-storage/index/istream-mail.c + +2017-01-30 23:20:48 +0100 Stephan Bosch (6c7b2d544) + + lib: path-util: Fixed assertion in path_normalize(). + + The invariant was using the wrong variable for comparison, causing it to + trigger erraticly. + +M src/lib/path-util.c + +2017-01-30 19:17:33 +0200 Timo Sirainen (f3370dba5) + + lib: Fix t_get_working_dir() to properly allocate memory in data stack. + + +M src/lib/path-util.c + +2017-01-30 21:53:01 +0200 Timo Sirainen (89bc31f70) + + lib-mail: Fix message_part_data_is_plain_7bit() + + Content-Type parameters weren't handled exactly right. Broken by recent + changes. + +M src/lib-mail/message-part-data.c + +2017-01-30 18:55:29 +0200 Timo Sirainen (b02cd3fca) + + lib-imap: Fix another compiler warning + + Unnecessary, but older gcc complains. + +M src/lib-imap/imap-bodystructure.c + +2016-12-29 23:32:04 +0200 Martti Rannanjärvi (d764f67e4) + + lib, lib-master: Add error_r to t_binary_abspath + + +M src/lib-master/master-service-settings.c +M src/lib/path-util.c +M src/lib/path-util.h + +2016-12-29 23:04:56 +0200 Martti Rannanjärvi (b1c85a1f8) + + lib: Add error_r to t_abspath and its callers + + +M src/imap-urlauth/imap-urlauth.c +M src/imap/main.c +M src/lda/main.c +M src/lib/path-util.c +M src/lib/path-util.h +M src/lmtp/main.c +M src/master/main.c +M src/pop3/main.c + +2016-11-29 20:50:28 +0200 Martti Rannanjärvi (b28403dc4) + + lib: Add tests for path-util + + +M src/lib/Makefile.am +M src/lib/test-lib.inc +A src/lib/test-path-util.c + +2016-12-04 12:13:00 +0200 Martti Rannanjärvi (f6925c43f) + + lib: Add Pigeonhole realpath functions to path-util + + +M src/lib/path-util.c +M src/lib/path-util.h + +2016-12-04 12:52:51 +0200 Martti Rannanjärvi (f0913bab5) + + lib: Rename t_get_current_dir to t_get_working_dir + + Also add an error_r parameter that cannot be NULL. + +M src/lib/eacces-error.c +M src/lib/nfs-workarounds.c +M src/lib/path-util.c +M src/lib/path-util.h +M src/lib/unlink-directory.c +M src/lmtp/main.c + +2016-12-04 12:47:22 +0200 Martti Rannanjärvi (dd645357a) + + lib: Add error_r to t_readlink and its callers -2017-01-14 13:33:05 +0100 Stephan Bosch (f884f1b00) + +M src/config/doveconf.c +M src/lib-master/master-instance.c +M src/lib-master/master-service.c +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/mailbox-list.c +M src/lib/path-util.c +M src/lib/path-util.h + +2016-11-30 12:03:30 +0200 Martti Rannanjärvi (8da8e8a20) + + lib: Add asserts to t_abspath and t_abspath_to + + +M src/lib/path-util.c + +2016-11-30 08:40:40 +0200 Martti Rannanjärvi (dfa2201c6) + + lib: Rename abspath to path-util + + +M src/config/doveconf.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/main.c +M src/lda/main.c +M src/lib-http/test-http-payload.c +M src/lib-master/master-instance.c +M src/lib-master/master-service-settings.c +M src/lib-master/master-service.c +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/mailbox-list.c +M src/lib/Makefile.am +M src/lib/eacces-error.c +M src/lib/nfs-workarounds.c +R098 src/lib/abspath.c src/lib/path-util.c +R095 src/lib/abspath.h src/lib/path-util.h +M src/lib/unlink-directory.c +M src/lmtp/main.c +M src/master/main.c +M src/pop3/main.c + +2017-01-30 18:29:36 +0200 Timo Sirainen (49d0f8cb2) + + lib-imap: Fix compiler warning + + Unnecessary, but older gcc complains. + +M src/lib-imap/imap-envelope.c + +2017-01-14 13:33:05 +0100 Stephan Bosch (30116399e) lib-imap: Created test-imap-envelope. @@ -9573,7 +33177,7 @@ M src/lib-imap/Makefile.am A src/lib-imap/test-imap-envelope.c -2016-12-29 14:02:05 +0100 Stephan Bosch (097940bf9) +2016-12-29 14:02:05 +0100 Stephan Bosch (3b17e4c33) lib-imap: imap-envelope: Added function for parsing ENVELOPE from string. @@ -9581,7 +33185,7 @@ M src/lib-imap/imap-envelope.c M src/lib-imap/imap-envelope.h -2016-10-26 23:44:47 +0200 Stephan Bosch (e0837a5f0) +2016-10-26 23:44:47 +0200 Stephan Bosch (62306adc1) lib-imap: Added more comments to imap-bodystructure and imap-envelope. @@ -9589,7 +33193,7 @@ M src/lib-imap/imap-bodystructure.c M src/lib-imap/imap-envelope.c -2016-10-24 01:45:18 +0200 Stephan Bosch (d669f7624) +2016-10-24 01:45:18 +0200 Stephan Bosch (26a2909cb) lib-imap: imap-bodystructure: Added support for making imap_bodystructure_parse() work without a pre-existing message_part tree. @@ -9600,7 +33204,7 @@ M src/lib-imap/imap-bodystructure.h M src/lib-imap/test-imap-bodystructure.c -2016-10-24 01:01:19 +0200 Stephan Bosch (40216e40c) +2016-10-24 01:01:19 +0200 Stephan Bosch (6407243c0) lib-mail: message-part-data: Implemented message_part_data_get_filename(). @@ -9609,7 +33213,7 @@ M src/lib-mail/message-part-data.c M src/lib-mail/message-part-data.h -2016-10-24 00:19:05 +0200 Stephan Bosch (353ee3a32) +2016-10-24 00:19:05 +0200 Stephan Bosch (b674bd911) lib-mail: message-part-data: Renamed struct message_part_envelope_data to message_part_envelope. @@ -9623,7 +33227,7 @@ M src/lib-storage/index/index-mail-headers.c M src/lib-storage/index/index-mail.h -2016-10-23 22:29:49 +0200 Stephan Bosch (e1ee210f9) +2016-10-23 22:29:49 +0200 Stephan Bosch (042a58438) lib-imap: imap-envelope: Moved imap_envelope_headers to lib-mail/message-part-data as message_part_envelope_headers. @@ -9636,7 +33240,7 @@ M src/lib-storage/index/imapc/imapc-mail.c M src/lib-storage/index/index-mail-headers.c -2016-10-23 20:05:33 +0200 Stephan Bosch (11b1d8cc8) +2016-10-23 20:05:33 +0200 Stephan Bosch (57e3b63a7) lib-imap: imap-bodystructure: Moved message_part_data header parsing and query functions to their own module in lib-mail. @@ -9654,7 +33258,7 @@ M src/lib-storage/index/index-mail-headers.c M src/lib-storage/index/index-mail.c -2016-10-23 19:47:12 +0200 Stephan Bosch (efe512ef1) +2016-10-23 19:47:12 +0200 Stephan Bosch (afd6338f1) lib-imap: imap-bodystructure: Renamed imap_bodystructure_is_plain_7bit() to message_part_data_is_plain_7bit(). @@ -9664,7 +33268,7 @@ M src/lib-imap/imap-bodystructure.h M src/lib-storage/index/index-mail.c -2016-10-23 19:00:10 +0200 Stephan Bosch (ecc6feeca) +2016-10-23 19:00:10 +0200 Stephan Bosch (946f22af1) lib-imap: imap-envelope: Renamed imap_envelope_parse_header() to message_part_envelope_parse_from_header(). @@ -9675,7 +33279,7 @@ M src/lib-imap/imap-envelope.h M src/lib-storage/index/index-mail-headers.c -2016-10-23 18:10:01 +0200 Stephan Bosch (b3fe91a53) +2016-10-23 18:10:01 +0200 Stephan Bosch (535dbe3c3) lib-imap: imap-evenvelope: Changed imap_envelope_get_field() into a private equivalent. @@ -9684,7 +33288,7 @@ M src/lib-imap/imap-envelope.c M src/lib-imap/imap-envelope.h -2016-10-23 17:51:59 +0200 Stephan Bosch (486179461) +2016-10-23 17:51:59 +0200 Stephan Bosch (df459621b) lib-imap: imap-bodystructure: Renamed imap_bodystructure_parse_header() to message_part_data_parse_from_header(). @@ -9696,7 +33300,7 @@ M src/lib-storage/index/index-mail-headers.c M src/lib-storage/index/index-mail.c -2016-10-23 17:27:07 +0200 Stephan Bosch (edb00165e) +2016-10-23 17:27:07 +0200 Stephan Bosch (341c6814c) lib-imap: imap-bodystructure: Grouped together functions relating to the conversion of BODYSTRUCTURE to BODY. @@ -9705,7 +33309,7 @@ M src/lib-imap/imap-bodystructure.c -2016-10-23 16:50:25 +0200 Stephan Bosch (b1cb88c94) +2016-10-23 16:50:25 +0200 Stephan Bosch (2483736d1) lib-imap: imap-bodystructure: Changed struct message_part_body to contain fully decoded data. @@ -9717,7 +33321,7 @@ M src/lib-imap/imap-envelope.c M src/lib-storage/index/index-mail.c -2016-10-23 16:49:37 +0200 Stephan Bosch (3a39bcd37) +2016-10-23 16:49:37 +0200 Stephan Bosch (300daf3c1) lib-imap: imap-envelope: Added function to parse struct message_part_envelope_data from parsed imap args. @@ -9726,7 +33330,7 @@ M src/lib-imap/imap-envelope.c M src/lib-imap/imap-envelope.h -2016-10-23 14:06:44 +0200 Stephan Bosch (d6790cf6f) +2016-10-23 14:06:44 +0200 Stephan Bosch (9e6c6b34b) lib-imap: imap-bodystructure: Renamed `d' parameter to `data' in parse_content_header() function. @@ -9734,7 +33338,7 @@ M src/lib-imap/imap-bodystructure.c -2016-10-23 13:52:10 +0200 Stephan Bosch (ee7da9a08) +2016-10-23 13:52:10 +0200 Stephan Bosch (03d429382) lib-imap: imap-envelope: Removed useless pool field from struct message_part_envelope_data. @@ -9742,7 +33346,7 @@ M src/lib-imap/imap-envelope.c -2016-10-23 13:50:05 +0200 Stephan Bosch (34d2e3c61) +2016-10-23 13:50:05 +0200 Stephan Bosch (28dffd17c) lib-imap: imap-bodystructure: Removed useless pool field from struct message_part_data. @@ -9751,7 +33355,7 @@ M src/lib-imap/imap-bodystructure.c M src/lib-imap/imap-bodystructure.h -2016-10-23 13:29:43 +0200 Stephan Bosch (50ace8c61) +2016-10-23 13:29:43 +0200 Stephan Bosch (c59d22d58) lib-mail: Gave message_part_data its own field in struct message_part. @@ -9761,7 +33365,7 @@ M src/lib-mail/message-part.h M src/lib-storage/index/index-mail.c -2016-10-23 13:10:11 +0200 Stephan Bosch (d61ce1315) +2016-10-23 13:10:11 +0200 Stephan Bosch (1eeb9f438) lib-imap: imap-bodystructure: Renamed struct message_part_body_data to message_part_data. @@ -9771,7 +33375,7 @@ M src/lib-imap/imap-bodystructure.h M src/lib-storage/index/index-mail.c -2016-10-23 12:10:44 +0200 Stephan Bosch (5dc17f032) +2016-10-23 12:10:44 +0200 Stephan Bosch (dc84547cb) lib-imap: Removed existing envelope parsing function. @@ -9781,14 +33385,14 @@ M src/lib-imap/imap-envelope.c M src/lib-imap/imap-envelope.h -2017-01-08 12:00:15 +0100 Stephan Bosch (f507f8b3f) +2017-01-08 12:00:15 +0100 Stephan Bosch (78f92fe96) lib-imap: test-imap-bodystructure: Added normalization tests. M src/lib-imap/test-imap-bodystructure.c -2017-01-09 02:03:25 +0100 Stephan Bosch (78915da10) +2017-01-09 02:03:25 +0100 Stephan Bosch (b9de83e56) lib-imap: imap-bodystructure: Allow alternative syntax and omitted optional elements in parser input. @@ -9799,14 +33403,14 @@ M src/lib-imap/imap-bodystructure.c -2017-01-09 16:29:26 +0100 Stephan Bosch (c0e62470f) +2017-01-09 16:29:26 +0100 Stephan Bosch (bac296ef1) lib-imap: test-imap-bodystructure: Added more tests. M src/lib-imap/test-imap-bodystructure.c -2017-01-09 16:20:29 +0100 Stephan Bosch (de68ecd12) +2017-01-09 16:20:29 +0100 Stephan Bosch (3693d00ae) lib-imap: test-imap-bodystructure: Improved handing of parse errors. @@ -9814,7 +33418,7 @@ M src/lib-imap/test-imap-bodystructure.c -2017-01-09 16:16:46 +0100 Stephan Bosch (f4b7f88d7) +2017-01-09 16:16:46 +0100 Stephan Bosch (cd1ab1e2b) lib-imap: test-imap-bodystructure: Added support for more than one test case. @@ -9822,7 +33426,7 @@ M src/lib-imap/test-imap-bodystructure.c -2017-01-08 22:50:02 +0100 Stephan Bosch (d02959f76) +2017-01-08 22:50:02 +0100 Stephan Bosch (bf7aee059) lib-imap: imap-bodystructure: Fixed parse error message about invalid Content-M5 field. @@ -9830,9273 +33434,10935 @@ M src/lib-imap/imap-bodystructure.c -2017-02-20 01:24:09 +0200 Timo Sirainen (8f42a8949) - - example-config: Add mail_sort_max_read_count setting. - - -M doc/example-config/conf.d/10-mail.conf - -2017-02-20 01:16:56 +0200 Timo Sirainen (f6d5c0771) - - example-config: Add mail_vsize_bg_after_count setting. - - -M doc/example-config/conf.d/10-mail.conf - -2017-02-20 01:00:05 +0200 Timo Sirainen (9ba287ff8) - - example-config: Add imap_fetch_failure setting. - - -M doc/example-config/conf.d/20-imap.conf - -2017-02-20 00:26:28 +0200 Timo Sirainen (2a63de62c) - - lib-mail: Fix matched-parameter in HEADER_FILTER_ADD_MISSING_EOH callback +2017-01-30 15:12:04 +0200 Timo Sirainen (00b2516ff) - The matched-parameter in the regular EOH callback is the reverse of what - it's in v2.3 tree. So preserve it here. - -M src/lib-mail/istream-header-filter.c - -2017-02-19 23:03:40 +0100 Stephan Bosch (a78382ae8) - - .gitignore: Fixed location of ignored m4 files. - - Probably got cherry-picked wrong from development branch. - -M .gitignore + lib-storage: Set vsize extension when copying mails. -2017-02-04 16:15:57 +0100 Stephan Bosch (f789d8efd) - lib-http: test-http-response-parse: Properly test multiple sequential - responses. +M src/lib-storage/index/index-storage.c +2017-01-30 15:11:45 +0200 Timo Sirainen (424633d1a) -M src/lib-http/test-http-response-parser.c + lib-storage: Add index_mail_get_vsize_extension() -2017-02-19 21:58:54 +0100 Stephan Bosch (2eaabeb41) - auth: oauth2 mechanism: Fixed implicit boolean expression involving a - pointer. +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h - Found with Clang -Wstrict-bool. +2017-01-30 15:06:46 +0200 Timo Sirainen (134987bc3) -M src/auth/mech-oauth2.c + lib-storage: Move index_mail.vsize_ext_id to mailbox.mail_vsize_ext_id -2017-02-18 05:01:50 +0200 Timo Sirainen (37038df03) + It's mailbox-specific, so it doesn't have to be looked up every time. Also + this is needed for the following fix. - lib-storage: Add explicit MAIL_ERROR_LOOKUP_ABORT error +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h +M src/lib-storage/index/index-storage.c +M src/lib-storage/mail-storage-private.h - The MAIL_ERROR_NOTPOSSIBLE was a bit too generic to assume to mean the same - thing. It doesn't look like there are any external plugins that break - because of this change. +2016-12-14 18:13:25 +0200 Timo Sirainen (64a36868b) -M src/doveadm/doveadm-mail.c -M src/imap/imap-commands-util.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/mail-error.h -M src/lib-storage/mail.c -M src/pop3/pop3-client.c + imapc: Allow using LAYOUT=none without crashing. -2017-02-17 19:29:03 +0200 Timo Sirainen (da29d3a04) - lib-storage: Add mail.access_type +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c +2017-01-29 00:24:33 +0200 Timo Sirainen (e5d2061f4) -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/mail-storage.h + imap: Don't unregister internal commands at deinit. -2017-02-17 19:07:53 +0200 Timo Sirainen (89aff52c7) + This allows plugins to unregister commands without errors being logged. - lib-storage: Add mail_sort_max_read_count setting. +M src/imap/imap-commands.c - This controls how many slow mail accesses sorting can perform before it - fails: +2017-01-26 22:42:09 +0200 Timo Sirainen (27129cce9) - a NO [LIMIT] Requested sort would have taken too long + lib-storage: Lock autoexpunging so only a single process does it. - The SORT reply is still returned, but it's likely not correct. + This hopefully helps to avoid duplicates with lazy_expunge plugin. -M src/lib-storage/index/index-sort-private.h -M src/lib-storage/index/index-sort-string.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h +M src/lib-storage/mail-autoexpunge.c -2017-02-17 18:56:23 +0200 Timo Sirainen (8c96c6d28) +2017-01-29 01:08:23 +0200 Timo Sirainen (16b3bcea4) - lib-storage: Add MAIL_ERROR_LIMIT + imap: Use struct mailbox_status.flags for FLAGS reply -M src/doveadm/doveadm-mail.c M src/imap/imap-commands-util.c -M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/mail-error.h - -2017-02-17 18:32:05 +0200 Timo Sirainen (808dfbe34) - imap: If SEARCH/SORT fails but returns some results, send them to client. +2017-01-29 01:06:55 +0200 Timo Sirainen (4945c8a75) - The previous error handling fixes cause SEARCH/SORT to now fail if there are - any problems reading mails. This change makes the commands still return the - best known results, so the IMAP client can still use them, even though they - may not be entirely correct. + lib-storage: Add struct mailbox_status.flags -M src/imap/imap-search.c + This is similar to permanent_flags, except it tells which flags can be + changed at all in the session. Mainly it allows plugins to make changes to + IMAP's untagged FLAGS reply. -2017-02-17 18:30:51 +0200 Timo Sirainen (f56500886) +M src/lib-storage/index/index-status.c +M src/lib-storage/mail-storage.h - lib-storage: Fix error handling when searching mails +2017-01-27 21:36:14 +0200 Timo Sirainen (1f1a96729) - Only expunge errors and failures caused by lookup_abort should be ignored. - The rest of the mail errors mean that the search result might not be - correct. We'll still run the search as fully as possible, but we just return - an error at the end. + lib: io_loop_set_current() - do nothing if ioloop doesn't change -M src/lib-storage/index/index-search.c + There's no need to call the switch callbacks if the ioloop doesn't change. -2017-02-17 18:24:31 +0200 Timo Sirainen (61b952ff0) +M src/lib/ioloop.c - lib-storage: Search optimization - avoid parsing message_parts unnecessarily +2017-01-27 13:56:30 +0200 Martti Rannanjärvi (5433e85ae) - If they're not already cached, the mail is parsed twice: once to get the - message_parts and again to perform the actual search. The searching can - however do the message_parts parsing internally as well. + doveadm: add doveadm_http_rawlog_dir setting -M src/lib-storage/index/index-search.c -2017-02-17 18:19:46 +0200 Timo Sirainen (af01d7cd4) +M src/doveadm/client-connection-http.c +M src/doveadm/doveadm-settings.c +M src/doveadm/doveadm-settings.h - lib-storage: Fix error handling when sorting mails. +2017-01-24 17:18:07 +0200 Timo Sirainen (c25abb52b) - All errors were treated the same as if message had been expunged. This - caused potentially wrong results to be sent to the client without any - indication that they're wrong. + lib-fts: Fix assert-crash in fts_icu_lcase() -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-sort-private.h -M src/lib-storage/index/index-sort-string.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/index/index-sort.h + Fixes: Panic: file fts-icu.c: line 152 (fts_icu_lcase): assertion failed: + (err != U_BUFFER_OVERFLOW_ERROR) -2017-02-17 16:31:52 +0200 Timo Sirainen (75673aa94) +M src/lib-fts/fts-icu.c +M src/lib-fts/test-fts-icu.c - lib-storage: Change vsize calculation to use the new mail_stream_opened +2017-01-27 09:41:36 +0200 Aki Tuomi (2b9630998) - This avoids calling mail_get_virtual_size() twice and is a bit cleaner - approach. + lib-storage: Fix comparison to use virtual size instead of body virtual size -M src/lib-storage/index/index-mailbox-size.c + Was forgotten on 7f1ecb14 -2017-02-17 16:20:06 +0200 Timo Sirainen (0d736be21) +M src/lib-storage/index/index-mail.c - lib-storage: Add mail.mail_stream_opened and .mail_metadata_accessed +2017-01-26 09:55:22 +0200 Timo Sirainen (0b2c958d1) - These allow determining after mail_*() calls how efficiently they were - performed. + lib-index: Don't log error on dovecot.index.cache delete if it doesn't exist -M src/lib-storage/index/cydir/cydir-mail.c -M src/lib-storage/index/dbox-multi/mdbox-mail.c -M src/lib-storage/index/dbox-single/sdbox-mail.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/index/mbox/mbox-mail.c -M src/lib-storage/index/raw/raw-mail.c -M src/lib-storage/mail-storage.h + For example if a cache is marked as corrupted and there is no cache, it's + not really an error that it doesn't exist. -2017-02-17 16:14:39 +0200 Timo Sirainen (db102ed2b) + Fixes: Error: unlink(.../dovecot.index.cache) failed: No such file or + directory (in mail-cache.c:29) - lib-storage: Clarify what MAIL_LOOKUP_ABORT_READ_MAIL means. +M src/lib-index/mail-cache.c - It should maybe even be renamed to something clearer. +2017-01-26 19:51:34 +0200 Timo Sirainen (7f1ecb148) -M src/lib-storage/mail-storage.h + lib-storage: Filling vsize to index on read used wrong size -2017-02-19 01:44:21 +0200 Timo Sirainen (143ef74e1) - dsync: Don't assert-crash if duplicate attributes are seen +M src/lib-storage/index/index-mail.c - Just ignore the duplicates. Normally this shouldn't happen, but due to some - bugs for example a Sieve script could be returned once by doveadm_sieve - plugin and another time from mail_attribute_dict. +2017-01-26 09:42:26 +0200 Aki Tuomi (c52d5c00e) -M src/doveadm/dsync/dsync-mailbox-export.c + lib-storage: Clear virtual size from index if size is corrupted -2017-02-19 15:47:48 +0200 Timo Sirainen (bd612a097) - imap: Fix running time in tagged command replies. +M src/lib-storage/index/index-mail.c - The timing information was updated only after command_exec() returned. Most - of the commands were handled within a single command_exec() though, so at - the time when tagline was sent the running_usecs was still zero. +2017-01-14 18:34:11 +0200 Timo Sirainen (513b045d3) - The msecs in ioloop timing was correct though, because it relied only on the - command start timing info. + fts: Fix search query generation when tokens are filtered out. -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-commands.c -M src/imap/imap-commands.h + For example with English stopwords when searching "foo and bar" it should be + equilevant to "foo bar", since "and" is filtered out. -2017-02-19 02:03:08 +0200 Timo Sirainen (3413b38df) +M src/plugins/fts/fts-search-args.c - doveadm: Add explicit mail_storage_init/deinit() calls +2017-01-09 10:43:01 +0200 Aki Tuomi (ba706bd50) - This mainly prevents losing hooks that were registered by doveadm plugins. + lib: Add t_hash helpers for hashing - Otherwise what happens is: - - mail_plugins are unloaded and they unregister their hooks - - doveadm plugins (e.g. doveadm_sieve) are NOT unloaded - - mail_storage_deinit() frees all the registered hooks - - next mail_storage_init() initializes all new hooks - - All mail_plugins are loaded and they register again their hooks - - doveadm plugins are NOT re-loaded or re-initialized, so their existing - hooks were lost. -M src/doveadm/doveadm-mail.c +M src/lib/hash-method.c +M src/lib/hash-method.h -2017-02-19 02:02:20 +0200 Timo Sirainen (d67065928) +2017-01-25 10:11:05 +0200 Aki Tuomi (bcf421b98) - lib-storage: mail_storage_init/deinit() is now reference counted. + lib-dict: Fix test-dict-sql in out-of-tree build - This allows calling them multiple times and only the final deinit frees the - data. -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage.c +M src/lib-dict/Makefile.am +M src/lib-dict/test-dict-sql.c -2017-02-19 02:01:24 +0200 Timo Sirainen (c72c40333) +2017-01-16 15:31:10 +0200 Aki Tuomi (ef6a5a1f1) - lib-storage: Assert-crash if duplicate internal hooks are added. + lib-dict: Add unit tests -M src/lib-storage/mail-storage-hooks.c +M src/lib-dict/Makefile.am +A src/lib-dict/dict.conf +A src/lib-dict/test-dict-sql.c -2017-02-19 15:54:53 +0200 Timo Sirainen (cd7d2946f) +2017-01-16 15:30:14 +0200 Aki Tuomi (7b1ce3414) - fs-posix: Add "no-fsync" parameter. + lib-sql: Add test driver - This disables calling fdatasync() when fs_write() was done with - FS_OPEN_FLAG_FSYNC. Useful for making tests faster. + Mock SQL driver -M src/lib-fs/fs-posix.c +M src/lib-sql/Makefile.am +A src/lib-sql/driver-test.c +A src/lib-sql/driver-test.h -2017-02-19 14:49:20 +0200 Timo Sirainen (099cd7426) +2017-01-17 09:59:54 +0200 Aki Tuomi (be5718891) - imap: Code cleanup - Remove duplicate flags from imap_fetch_state + dict-sql: Fix iterator to not fail - All the cur_flushed, line_partial and line_finished were about the same - thing. + When iterating a prefix without exact key flag, do not fail when no more + maps are matched if at least one map has already matched. -M src/imap/imap-fetch.c -M src/imap/imap-fetch.h + Fixes Error: dict_iterate_deinit failed: sql dict iterate failed for ...: + Invalid/unmapped path -2017-02-19 14:34:45 +0200 Timo Sirainen (e42cd9406) +M src/lib-dict/dict-sql.c - imap: Fix sending UID only when necessary on broken FETCHes. +2017-01-16 15:29:25 +0200 Aki Tuomi (4adf5d2a7) - b748f91d0677fffaa2208b39ebb6db3aeb2e937b changed UID to be sent for most - FETCH replies. There was also some existing code that attempted to do this, - but didn't fully work. + dict-sql: Move struct sql_dict to header - So now: + This allows dereferencing it on test programs - 1) If there are no non-buffered replies, the entire FETCH response isn't - sent. +M src/lib-dict/Makefile.am +A src/lib-dict/dict-sql-private.h +M src/lib-dict/dict-sql.c - 2) If the buffer was already flushed and nothing else was sent, add UID to - reply. The code paths for handling this are differently for - imap_fetch_failure = disconnect-immediately vs others (depending on - imap_fetch_cur_failed() return value). +2017-01-16 14:01:57 +0200 Aki Tuomi (5a2960941) -M src/imap/imap-fetch.c -M src/imap/imap-fetch.h + dict-sql: Do not increment on set -2017-02-16 20:39:12 +0200 Timo Sirainen (f6f4ad6f5) + When merging sets do not use increment mode in builder. - imap: Include info about last command in disconnection log line. +M src/lib-dict/dict-sql.c - Only if LOGOUT isn't sent, because that's already visible. +2017-01-23 18:02:05 +0200 Timo Sirainen (a35f06493) -M src/imap/imap-client.c -M src/imap/imap-client.h + director: "doveadm director move" to same host now refreshes user's timeout -2017-02-16 20:29:46 +0200 Timo Sirainen (687ea5aa7) + This allows keeping user constantly in the same backend by just periodically + moving the user there. - imap: Code cleanup - Move code to client_command_stats_append() +M src/director/doveadm-connection.c +2017-01-24 09:56:29 +0200 Aki Tuomi (5a6d4adbd) -M src/imap/imap-client.c + global: Update http_server_request_set_destroy_callback usage -2017-02-16 20:17:32 +0200 Timo Sirainen (f386c5037) - imap: Add imap_client.logged_out at LOGOUT +M src/doveadm/client-connection-http.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-server-errors.c - This is useful for determining if client did a clean logout +2017-01-24 09:55:49 +0200 Aki Tuomi (582b93659) -M src/imap/cmd-logout.c -M src/imap/imap-client.h + lib-http: Improve http_server_request_set_destroy_callback API -2017-02-16 20:14:55 +0200 Timo Sirainen (4e7a1d41b) + It now allows using non-void* context - imap: Code cleanup - move command stats to struct client_command_stats +M src/lib-http/http-server-request.c +M src/lib-http/http-server.h +2017-01-22 17:58:55 +0200 Aki Tuomi (8b65acb38) -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-commands.c -M src/imap/imap-sync.c + global: Update http_client_request_set_destroy_callback usage -2017-02-17 15:46:38 +0200 Aki Tuomi (58282a746) - mech-oauth2: Clarify logging +M src/auth/auth-policy.c +M src/lib-http/test-http-payload.c +2017-01-22 17:56:19 +0200 Aki Tuomi (e94584bf6) -M src/auth/mech-oauth2.c + lib-http: Improve http_client_request_set_destroy_callback -2017-02-17 15:45:34 +0200 Aki Tuomi (3fa10ae46) + It now allows using non-void* context - mech-oauth2: Set user_given=TRUE when username given in OAUTHBEARER +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h +2017-01-22 23:55:24 +0100 Stephan Bosch (bf45537f0) -M src/auth/mech-oauth2.c + lib-http: client: Fixed handling of errors occurring for unsubmitted + requests during http_client_request_send_payload(). -2017-02-17 15:44:17 +0200 Aki Tuomi (333c97908) + When http_client_request_send_payload() is executed for the first time, the + request is submitted. Errors occurring during submission don't trigger a + callback immediately. Instead, these are queued in the client and will + trigger a callback when an ioloop is run with the client. However, in + http_client_request_send_payload() the ioloop is never executed when the + request fails that way, meaning that the callback was never called. Since + for example SOLR assumes the callback is always called for an error in + http_client_request_send_payload(), this causes all kinds of problems. - mech-oauth2: Fix gs2-header parsing + Fixed by manually handling the delayed request errors in + http_client_request_send_payload() explicitly. +M src/lib-http/http-client-request.c -M src/auth/mech-oauth2.c +2017-01-18 13:46:12 +0200 Aki Tuomi (228f1e8d5) -2017-02-19 00:36:39 +0200 Timo Sirainen (c16c05a27) + lib-sasl: Add OAUTHBEARER and XOAUTH2 mechanism - lib: Fix assert-crash in unit test. - Messed up merging. +M src/lib-sasl/Makefile.am +M src/lib-sasl/dsasl-client-private.h +M src/lib-sasl/dsasl-client.c +A src/lib-sasl/mech-oauthbearer.c -M src/lib/test-strfuncs.c +2017-01-18 13:45:27 +0200 Aki Tuomi (2d74a1ed4) -2017-02-13 15:33:21 +0200 Aki Tuomi (bf1f57d76) + lib-sasl: Add API for setting and getting extra values - auth: Add oauth2 passdb + This allows setting extra parameters for authentication and recovering + extended result information from mechanism. +M src/lib-sasl/dsasl-client-private.h +M src/lib-sasl/dsasl-client.c +M src/lib-sasl/dsasl-client.h -M src/auth/Makefile.am -A src/auth/db-oauth2.c -A src/auth/db-oauth2.h -A src/auth/passdb-oauth2.c -M src/auth/passdb.c +2017-01-20 18:19:05 +0200 Timo Sirainen (fc452ed72) -2017-02-04 23:56:04 +0200 Aki Tuomi (5bad9223e) + imapc: Fix assert-crash on some connect failures - auth: Add xoauth2 and oauthbearer mechanisms + imapc_storage_has_modseqs() causes imapc_client_get_capabilities() to be + called, which assert-crashes if there isn't a valid connection: + Panic: file imapc-client.c: line 438 (imapc_client_get_capabilities): + assertion failed: (conn != NULL) -M src/auth/Makefile.am -A src/auth/mech-oauth2.c -M src/auth/mech.c +M src/lib-storage/index/imapc/imapc-storage.c -2017-02-06 12:56:27 +0200 Aki Tuomi (cdf00f56f) +2017-01-20 15:57:10 +0200 Timo Sirainen (edaf7b320) - auth: Add mechanism filter for passdbs + director: Add more debug logging for moving & killing users -M src/auth/auth-request.c -M src/auth/auth-settings.c -M src/auth/auth-settings.h -M src/auth/passdb.c -M src/auth/passdb.h +M src/director/director.c -2017-02-08 13:06:13 +0200 Aki Tuomi (cc52a2cb1) +2017-01-20 16:06:48 +0200 Timo Sirainen (47f09f848) - auth: Add accessor for passdb template arguments + director: Fix USER-MOVE getting stuck if a director already uses the correct + host -M src/auth/passdb-template.c -M src/auth/passdb-template.h +M src/director/director.c -2017-01-26 10:49:08 +0200 Aki Tuomi (a5e22885e) +2017-01-20 16:03:12 +0200 Timo Sirainen (82641f7aa) - lib-oauth2: Add support library for OAUTH2 + director: Ignore doveadm user move if host is already the same. -M configure.ac -M src/Makefile.am -A src/lib-oauth2/Makefile.am -A src/lib-oauth2/oauth2-introspect.c -A src/lib-oauth2/oauth2-private.h -A src/lib-oauth2/oauth2-refresh.c -A src/lib-oauth2/oauth2-token-validate.c -A src/lib-oauth2/oauth2.c -A src/lib-oauth2/oauth2.h +M src/director/doveadm-connection.c -2017-02-14 18:48:51 +0200 Timo Sirainen (678cbf47e) +2017-01-20 15:54:27 +0200 Timo Sirainen (3638fd7bb) - lib-storage: Update vsize header after sync only if sizes are cached. + director: Make sure USER-KILLED isn't sent before USER-MOVE - The result isn't needed yet in that case, so if it's slow to get the sizes - it might as well be delayd until later. This is especially useful when - indexer-worker triggers FTS indexing. The vsizes can be added to index after - the mail is already read for FTS. Without this change the vsize update would - first open all the mails and then the FTS indexing would open all the mails - a second time. + If USER-MOVE was for a user that didn't exist, killing sent USER-KILLED + immediately before the forwarding USER-MOVE. This caused the move to get + stuck, giving errors like: -M src/lib-storage/index/index-mailbox-size.c + director: Error: Finishing user 3224731354 move timed out, its state may now + be inconsistent (state=waiting-for-everyone) -2017-02-07 16:18:55 +0200 Timo Sirainen (e4a574f08) +M src/director/director.c - lib-storage: Add mail_vsize_bg_after_count setting. +2017-01-20 15:52:43 +0200 Timo Sirainen (7a380e77a) - If folder vsize calculation requires opening more than this many mails from - disk (i.e. mail sizes aren't in cache already), return failure and finish - the calculation via indexer process. + director: Add assert to make sure USER-MOVE doesn't change tag - This should be used like: - protocol !indexer-worker { - mail_vsize_bg_after_count = 10 - } +M src/director/director.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h -M src/plugins/quota/quota-count.c +2016-12-27 09:45:58 +0200 Aki Tuomi (444e2d726) -2017-02-07 13:53:52 +0200 Timo Sirainen (2dccf7ca2) + lib-storage: Copy cache decisions from inbox on create - lib-storage: Don't stop vsize calculation on expunged mails. + Otherwise the decisions are definitely wrong, since they are nonexistent. + Copying from INBOX would make sense. - I don't know why I added such logic there in the first place. If we just - skip the expunged mails, the end result should still be correct and usable - when cached. +M src/lib-storage/mail-storage.c -M src/lib-storage/index/index-mailbox-size.c +2016-12-27 09:44:52 +0200 Aki Tuomi (215cdc8db) -2017-02-15 22:13:12 +0200 Timo Sirainen (9d2f3c395) + lib-index: Add mail_cache_decisions_copy - lib-index: Fix updating mail_index_header.day_first_uid + This allows priming cache decisions for a folder. - If user received a mail every day, the day_first_uid wasn't being updated. - This caused wrong caching decisions to be made in dovecot.index.cache: +M src/lib-index/mail-cache-decisions.c +M src/lib-index/mail-cache.h - - Accessing >1 week old emails should have changed caching decision from - "tmp" to "yes". This might not have happened, although as long as - day_first_uid[7] pointed to an existing mail and email client accessed all - the mails, this wouldn't have changed anything. +2017-01-03 12:50:58 +0200 Aki Tuomi (1211f411e) - - Cache compression is supposed to drop >1 week old mails when caching - decision is "tmp". Not enough mails were being dropped because - day_first_uid[7] pointed to a much older than 1 week old mails. + lib-index: Unconstify mail_cache_register_get_list - Also added a unit test to make sure this works. + This way the result is usable as input for mail_cache_register_fields. - Broken by d9ee2f9fb3ef7b9391bfeeff1b374aead51667aa +M src/lib-index/mail-cache-fields.c +M src/lib-index/mail-cache.h -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/test-mail-index-transaction-update.c +2017-01-20 14:46:30 +0200 Timo Sirainen (90f9822ad) -2017-02-15 22:12:15 +0200 Timo Sirainen (fbfcbf39d) + lib-storage: Fix mailbox's vsize header check for mailboxes not in + dovecot.list.index - lib-index: Add day_stamp parameter to mail_index_update_day_headers() + If mailbox wasn't yet in the dovecot.list.index, mailbox_list_index_status() + for it returns FALSE and doesn't initialize the status. In some situations + this may have caused a non-empty mailbox's vsize to be returned as 0. - This will help creating a unit test. +M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-index/mail-index-transaction-finish.c -M src/lib-index/mail-index-transaction-private.h -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/test-mail-index-transaction-finish.c +2016-10-11 00:13:49 +0200 Juha Koho (c4d66e8cc) -2017-02-15 18:20:05 +0200 Timo Sirainen (4decb8ca5) + ssl: add ssl_curve_list setting for selecting ECHDE curves - lib-storage: Re-open mailbox after it's undeleted. - This is needed with mailbox formats that didn't fully open the mailbox while - it was undeleted. +M doc/example-config/conf.d/10-ssl.conf +M m4/ssl.m4 +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h +M src/lib-master/master-service-ssl.c +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h +M src/login-common/ssl-proxy-openssl.c -M src/lib-storage/mail-storage.c +2017-01-10 02:12:25 +0100 Stephan Bosch (9465a0507) -2017-02-15 18:18:46 +0200 Timo Sirainen (fdaba55b3) + lib-http: client: Make sure req->conn is only not NULL when that connection + holds a reference to that request. - lib-storage: Don't sync mailbox after undeleting it. + This consolidates the management of req->conn to one place, thereby + preventing mishaps. It makes sure req->conn is always properly assigned, + making it more reliable. This fixes a problem that emerged in the + http-proxy. - This is useful only when deleting it. With undeletion the syncing isn't - useful and might actually be harmful with mailbox formats that didn't fully - open the mailbox while it was undeleted. +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-request.c -M src/lib-storage/mail-storage.c +2017-01-19 02:16:06 +0100 Stephan Bosch (794501229) -2017-02-15 18:05:14 +0200 Timo Sirainen (0f3f7325d) + lib-http: client: Keep connection reference throughout + http_client_connection_return_response(). - lib-storage: Make sure mailbox undeletion won't go to infinite loop + Before, it was held in two intervals. Next commit requires this change, but + it also simplifies this function significantly. +M src/lib-http/http-client-connection.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c +2017-01-17 19:49:39 +0200 Timo Sirainen (c8ce80f4d) -2017-02-15 23:32:52 +0200 Timo Sirainen (7bf7bc9c3) + master: Remove unnecessary service listener start - mail-log: Add mail_log_cached_only setting. + The listening was already started later on in the same function. Also in + some cases it would have been started unnecessarily, like when service was + stopped or more processes were created immediately. - If enabled, everything except "save" event will log only the fields that can - be looked up from cache. This improves performance if some of the fields - aren't cached and it's not a strict requirement to log them. +M src/master/service-monitor.c -M src/plugins/mail-log/mail-log-plugin.c +2016-12-30 10:20:32 +0200 Martti Rannanjärvi (e667d5da1) -2017-02-15 13:46:06 -0500 Josef 'Jeff' Sipek (d177753e5) + doc: add ssl_dh to example-config - lib-imap-client: pass the reply text to the auth-failed state change - callback +M doc/example-config/conf.d/10-ssl.conf -M src/lib-imap-client/imapc-connection.c +2017-01-18 04:46:15 -0500 Josef 'Jeff' Sipek (fafa63931) -2017-02-15 09:13:05 -0500 Josef 'Jeff' Sipek (b9838d531) + index: don't try to unlink in-memory cache file - lib-imap-client: invoke state change callback on "authentication success" + Avoid these errors: + Error: unlink((in-memory index).cache) failed: No such file or directory (in + mail-cache.c:29) -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c +M src/lib-index/mail-cache.c -2017-02-15 09:12:35 -0500 Josef 'Jeff' Sipek (42319578c) +2017-01-17 20:34:51 +0200 Timo Sirainen (91879fbef) - lib-imap-client: add callback to notify consumers about state changes + doveadm direcor add: Fix checking number as hostname. - Add a callback to notify imapc users about failures. Currently, the only - failure defined is "authentication failed". + 521c0460fe705f32ea6899c8b1f101043fe0898c was completely broken. -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c +M src/doveadm/doveadm-director.c -2017-02-14 08:58:10 -0500 Josef 'Jeff' Sipek (934dc5bf4) +2017-01-17 20:03:40 +0200 Timo Sirainen (2568cb8da) - lib-imap-client: centralize authentication failed error logging + doveconf: Don't read freed memory. + Giving -c parameter frees the returned orig_config_path. -M src/lib-imap-client/imapc-connection.c -M src/lib-storage/index/imapc/imapc-storage.c +M src/config/doveconf.c -2017-02-04 15:40:41 +0100 Stephan Bosch (992657a91) +2017-01-17 15:22:44 +0200 Timo Sirainen (521c0460f) - lib-http: response parser: Drop previous response's pool immediately when - parsing continues. + doveadm direcor add: Don't accept number as a valid hostname. - Prevously, it would only do that when the first byte of the next response - was received. This prevents wasting memory when no response is being parsed. + This is usually a mistake. For example "doveadm director add -t host 100" + shouldn't be adding a new IP 100 (0.0.0.100) -M src/lib-http/http-response-parser.c +M src/doveadm/doveadm-director.c -2017-02-04 16:21:51 +0100 Stephan Bosch (968c75452) +2017-01-17 16:28:10 +0200 Timo Sirainen (3d88d8e7b) - lib-http: response parser: Always clear response to prevent referring to - stale data. + stats plugin: Fix /proc/self/io fd leak on plugin deinit + This could have been a problem with doveadm-server processes if they had + service_count>1, because doveadm unloads all plugins between commands. -M src/lib-http/http-response-parser.c +M src/plugins/stats/mail-stats-fill.c +M src/plugins/stats/mail-stats.h +M src/plugins/stats/stats-plugin.c -2017-02-04 13:59:10 +0100 Stephan Bosch (6f56bdfda) +2017-01-17 16:23:50 +0200 Timo Sirainen (07af8ef14) - lib-http: message parser: Don't allocate a pool for the next message until - it is needed. + doveadm: Outgoing dsync TCP connections leaked socket - This prevents wasting memory when no message is being parsed. + If doveadm-server was running with service_count>1, each dsync run leaked a + socket. -M src/lib-http/http-message-parser.c -M src/lib-http/http-message-parser.h -M src/lib-http/http-request-parser.c -M src/lib-http/http-response-parser.c +M src/doveadm/doveadm-dsync.c -2017-02-04 14:11:36 +0100 Stephan Bosch (2a1e57bf9) +2017-01-17 19:21:08 +0200 Timo Sirainen (7c4ff436f) - lib-http: message parser: Delay allocation of message header. + lib-dict: Compiler warning fix -M src/lib-http/http-message-parser.c +M src/lib-dict/dict.h -2017-02-04 14:03:25 +0100 Stephan Bosch (b3bfde704) +2017-01-16 16:58:31 +0200 Timo Sirainen (37fed1bc1) - lib-http: message parser: Don't create the connection_options array, unless - it is actually used. + dict-file: Fix potential crash when doing other dict calls during iteration. + If file was refreshed, the hash table was cleared, which broke the existing + iterators. -M src/lib-http/http-message-parser.c -M src/lib-http/http-request.c +M src/lib-dict/dict-file.c -2017-02-14 17:35:54 +0200 Timo Sirainen (bf70b41e8) +2017-01-16 17:12:41 +0200 Timo Sirainen (b198cd6da) - lib-mail: Fix duplicate HEADER_FILTER_ADD_MISSING_EOH callback call + lib-dict: Add assert to make sure all iterators are deinitialized. - If headers weren't modified, the second reading of the istream shouldn't - call any callbacks. -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict.c -2017-02-15 00:08:49 +0200 Timo Sirainen (708ff4032) +2017-01-16 16:57:21 +0200 Timo Sirainen (0fea5292d) - doveadm: Added "mailbox path" command + lib: Add asserts to make sure hash table isn't freed while it's frozen. - This allows easily printing a path for a mailbox, index, control dir, etc. -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h +M src/lib/hash.c -2017-02-14 20:23:16 +0200 Timo Sirainen (28f1862b3) +2017-01-16 23:55:17 +0200 Timo Sirainen (c32d111cf) - lib-lda: Code cleanup - remove unnecessary dest_mail check + fts-solr: Escape {} chars when sending queries + Fixes: java.lang.IllegalArgumentException: Invalid character found in the + request target. The valid characters are defined in RFC 7230 and RFC 3986 -M src/lib-lda/mail-deliver.c + Based on patch by Michael Welsh Duggan -2017-02-14 20:20:07 +0200 Timo Sirainen (a4806a6dd) +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-backend-solr.c - lib-lda: Don't set mail_deliver_context.dest_mail too early. +2017-01-17 01:37:25 +0100 Stephan Bosch (355a3cf3f) - It must be NULL for the caller, unless save_dest_mail==TRUE + lib-http: server: Do not generate a payload for a failure response for a + HEAD request. -M src/lib-lda/mail-deliver.c -2017-02-13 20:49:12 +0200 Timo Sirainen (cacc4f84d) +M src/lib-http/http-server-request.c - lib-lda: Implement %{storage_id} correctly +2017-01-17 01:36:10 +0100 Stephan Bosch (1e9424acb) + lib-http: server: Prevent sending response payload when it is not allowed by + the specification. -M src/lib-lda/mail-deliver.c + For a HEAD request, the payload is omitted, but the associated headers are + generated. For the other cases, an assert failure is now triggered. -2017-02-13 20:47:51 +0200 Timo Sirainen (0f196b4cf) +M src/lib-http/http-server-response.c - lib-lda: Fix deliver_log_format variables with Sieve +2017-01-16 09:37:05 +0200 Aki Tuomi (fb6734cf2) - With Sieve it was using src_mail for getting the values, which weren't - correct especially if Sieve had modified the mail. + dict-sql: Fix flushing -M src/lda/main.c -M src/lib-lda/Makefile.am -M src/lib-lda/mail-deliver.c -M src/lib-lda/mail-deliver.h -M src/lmtp/main.c + Remove flushing from set, and add it to unset. Fixes signal 11 crash caused + by infinite recursion. -2017-02-13 20:46:16 +0200 Timo Sirainen (d19c44486) +M src/lib-dict/dict-sql.c - lib-lda: Code cleanup - mail_deliver_open_mail() now uses uid parameter +2017-01-03 17:21:33 +0200 Aki Tuomi (ae2bad232) + lib-storage: Add vsize extension to index -M src/lib-lda/mail-deliver.c + Keep virtual size in index, instead of cache when it's less than 2^32-1. + This helps when cache becomes corrupted, and goes away, we still have + virtual sizes for quota calculations. -2017-02-13 20:44:31 +0200 Timo Sirainen (db8465fd0) +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h - lib-lda: Remove %{storage_id} setting for now. +2017-01-15 19:56:32 +0200 Timo Sirainen (2c6a1ceed) - It doesn't work with Sieve. The following patches add it back properly. + lib-storage: Fix assert-crash on mailbox_copy/move() failure -M src/lib-lda/mail-deliver.c + If mailbox_save_cancel() was being called outside mail_storage_copy() it + assert-crashed: -2017-02-17 11:25:49 +0200 Timo Sirainen (603346248) + Panic: file mail-storage.c: line 2168 (mailbox_save_context_reset): + assertion failed: (ctx->copying_via_save) - lib-lda: Redesign mail_deliver_context.var_expand_table cache +M src/lib-storage/mail-storage.c +2017-01-14 16:11:37 +0200 Timo Sirainen (fd4130e3e) -M src/lib-lda/mail-deliver.c -M src/lib-lda/mail-deliver.h + lib-storage: If namespaces weren't successfully created, don't autoexpunge + at deinit. -2016-04-27 13:06:52 +0300 Martti Rannanjärvi (051cf2c83) - lib-lda: remove forced logging of session_id +M src/lib-storage/mail-user.c +2017-01-14 16:12:56 +0200 Timo Sirainen (71bfb0ac6) -M src/lib-lda/mail-deliver.c + lib-storage: Add struct mail_user.namespaces_created -2017-02-09 18:01:14 +0200 Timo Sirainen (3c8711e32) + This makes it easier to determine in mail_namespaces_added hook if the + namespaces being added are the initial ones or later ones. - lib-lda: Remove unused mail_deliver_get_log_var_expand_table() +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-user.h +2017-01-14 16:12:03 +0200 Timo Sirainen (da5c7f6eb) -M src/lib-lda/mail-deliver.c -M src/lib-lda/mail-deliver.h + lib-storage: Stop namespaces_added|created hooks immediately when user has + failed -2017-02-17 11:17:00 +0200 Timo Sirainen (e9744a9bc) - lib-lda: Initialize var_expand_tab[] directly. +M src/lib-storage/mail-storage-hooks.c - This is a partially pick from acfda38b75d0f0e899ef692fef01593bd56ed85e to be - able to cherry-pick the following patches more easily. +2017-01-14 16:10:15 +0200 Timo Sirainen (92b98c7ec) -M src/lib-lda/mail-deliver.c + doveadm dict get: Support printing multiple values. -2017-02-09 18:49:53 +0200 Timo Sirainen (99e60a23c) - lib-lda: Avoid using mailbox_save_set_dest_mail() +M src/doveadm/doveadm-dict.c +2017-01-09 20:32:12 +0200 Timo Sirainen (fb488019d) -M src/lib-lda/mail-deliver.c + dict-sql: Support multiple values for lookups -2017-02-09 18:46:14 +0200 Timo Sirainen (4c3958af8) + The value's fields must be comma-separated without spaces, for example: - lib-storage: Add mailbox_save_get_dest_mail() + map { + value_field = field1,field2 + value_type = string,uint + ... - This marks mailbox_save_set_dest_mail deprecated. It's not efficient to use - since it frees the already-created dest_mail. + Only the first field is used for INSERTs and UPDATEs. -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-storage.h +M src/lib-dict/dict-sql-settings.c +M src/lib-dict/dict-sql-settings.h +M src/lib-dict/dict-sql.c -2017-02-13 20:23:49 +0200 Timo Sirainen (6816dcc04) +2017-01-12 20:35:12 +0200 Timo Sirainen (217683437) - virtual: Fix saving to a virtual mailbox to work again + dict-client: Support multiple values for lookups - Previous changes broke it. -M src/plugins/virtual/virtual-mail.c -M src/plugins/virtual/virtual-save.c -M src/plugins/virtual/virtual-storage.h +M src/dict/dict-commands.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-client.h -2017-02-09 17:18:51 +0200 Timo Sirainen (18bfb2a5a) +2017-01-12 20:22:38 +0200 Timo Sirainen (85b234661) - plugins: Remove unnecessary mail_save_context.dest_mail==NULL checks + lib-dict: Add support for lookup to return multiple values - It can never be NULL after the previous change: "lib-storage: Always create - mail_save_context.dest_mail". + Implements only the initial stubs to the drivers. -M src/plugins/notify/notify-storage.c -M src/plugins/quota/quota-storage.c -M src/plugins/virtual/virtual-save.c -M src/plugins/zlib/zlib-plugin.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h +M src/plugins/dict-ldap/dict-ldap.c -2017-02-09 17:14:57 +0200 Timo Sirainen (7c9cb6389) +2017-01-14 16:54:34 +0200 Timo Sirainen (415f3f280) - lib-storage: Remove unnecessary mail_save_context.dest_mail==NULL checks + dict-sql: Remove unnecessary "affected rows" tracking from dict_set() - It can never be NULL after the previous change: "lib-storage: Always create - mail_save_context.dest_mail". + This was useful for dict_atomic_inc(), but not for dict_set(). - The code removal in maildir_transaction_save_commit_pre() seemed potentially - dangerous, but I don't think such code path is possible anymore. Also even - if it is, it's probably fine since the mail_free() is called even earlier - than before (although that itself might have been a problem). + Fixes assert-crash with Cassandra: Panic: file driver-cassandra.c: line 1350 + (driver_cassandra_update): assertion failed: (affected_rows == NULL) - This also removes last traces of code that made it possible to save mails to - mbox without assigning UID to the mail. The previous commit already caused - this, so this is just removing dead code. +M src/lib-dict/dict-sql.c -M src/lib-storage/index/cydir/cydir-save.c -M src/lib-storage/index/dbox-common/dbox-save.c -M src/lib-storage/index/dbox-common/dbox-save.h -M src/lib-storage/index/dbox-multi/mdbox-save.c -M src/lib-storage/index/dbox-single/sdbox-copy.c -M src/lib-storage/index/dbox-single/sdbox-save.c -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/index/mbox/mbox-sync-private.h -M src/lib-storage/index/mbox/mbox-sync.c +2017-01-14 16:45:06 +0200 Timo Sirainen (858ce98d6) -2017-02-09 16:53:47 +0200 Timo Sirainen (ef88cf873) + dict-sql: Fix previous "merge sets" to flush at commit - lib-storage: Always create mail_save_context.dest_mail + The last dict_set() within transaction was being ignored. - This allows removing similar mail_alloc() from storage backends and plugins - that need it. +M src/lib-dict/dict-sql.c - As a side effect, this changes mbox code to always assign UIDs to saved - mails. This shouldn't be much of a problem, since it happened practically - always already. +2017-01-14 15:10:17 +0200 Timo Sirainen (22ed97ce4) -M src/lib-storage/index/index-transaction.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c + lib-storage: Fix accessing the same "raw" mailbox multiple times in process. -2017-02-09 16:34:52 +0200 Timo Sirainen (9fbca0882) + If the same file was opened as the raw mailbox multiple times, the previous + mail_index was cached by mail-index-alloc-cache. Opening it the second time + already contained a mail in the index, so trying to add another one logged + an error: - lib-storage: Fix mailbox list index hook usage + Error: Log synchronization error at seq=1,offset=256 for (in-memory index): + Append with UID 1, but next_uid = 2 - The previous method appeared to work, but not if the internal hooks were - used more than once. +M src/lib-storage/index/raw/raw-sync.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h +2017-01-13 20:39:42 +0200 Timo Sirainen (3b94c8fb6) -2017-02-14 10:42:26 +0200 Martti Rannanjärvi (70bc7ec0c) + imapc: Fix re-sending retryable commands after reconnect - lib-index: zero mmap_length after logging error - Logging that mmap(size=0) failed looks suspicious. +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-connection.h -M src/lib-index/mail-cache.c +2017-01-12 16:20:40 +0200 Timo Sirainen (549d0260d) -2017-02-13 19:40:22 +0200 Aki Tuomi (2ffab546e) + lib-storage: Allow namespaces_created hook to return failure via user error. - mail-crypt: Do not restrict access in unit test - This works around problem with docker +M src/lib-storage/mail-namespace.c -M src/plugins/mail-crypt/test-mail-key.c +2017-01-12 00:53:54 +0200 Timo Sirainen (a7c9ff357) -2017-02-14 10:54:29 +0200 Timo Sirainen (b627d2a10) + lib-storage: Improve namespace error message - include separator char. - lib: Clarify *_strsplit_spaces() and add unit test + It wasn't always obvious what the character should have been when namespace + didn't have an explicitly configured separator. +M src/lib-storage/mail-namespace.c -M src/lib/strfuncs.h -M src/lib/test-strfuncs.c +2017-01-11 19:43:30 +0200 Aki Tuomi (80d1ef5ba) -2017-02-13 23:46:15 +0200 Timo Sirainen (a108b91f1) + lib-dict-sql: Try merge sets to single update - lib: Add pool_alloconly_create_clean() + This attempts to put mergeable keys into same update instead of using + multiple SQL statements. - This partially reverts 2a2beae3a4c1e75b3aeff996781503138e6f24bc +M src/lib-dict/dict-sql.c -M src/lib/mempool-alloconly.c -M src/lib/mempool.h +2016-12-23 13:17:06 -0500 Timo Sirainen (aefadb693) -2017-02-13 20:02:24 +0200 Timo Sirainen (9eb09dec6) + lib-dcrypt: istream-decrypt - set stream_errno=EPIPE on unexpected EOF - LAYOUT=index: Fix duplicate mailbox name renaming to actually work +M src/lib-dcrypt/istream-decrypt.c -M src/lib-storage/list/mailbox-list-index.c +2017-01-10 19:23:30 +0200 Timo Sirainen (16c59052a) -2017-02-13 20:01:13 +0200 Timo Sirainen (27ec4694c) + configure: Link libsmtp before libdns - LAYOUT=index: Rename mailbox_list_index_node.corrupted_parent to - corrupted_ext + Fixes linking LIBDOVECOT when using .a libraries - The code will be useful for other purposes also besides updating corrupted - parents. +M configure.ac -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h +2017-01-10 14:45:20 +0200 Timo Sirainen (ea5a14af8) -2017-01-31 19:43:30 +0200 Aki Tuomi (cc42a09c5) + lib-storage: Compile & indent fix for previous change. - driver-cassandra: Add support for speculative execution +M src/lib-storage/index/index-mail-headers.c -M configure.ac -M src/lib-sql/driver-cassandra.c +2017-01-05 10:50:55 +0200 Aki Tuomi (6b44fc75c) -2017-02-08 12:03:30 +0200 Timo Sirainen (583320bd8) + lib-storage: Prevent recursion in header parsing - lib-index: Add MAIL_INDEX_OPEN_FLAG_NO_DIRTY + If header parsing error occurs and error handling tries to get fields, such + as Message-ID, it will cause crash. This fixes problem by preventing reading + from non-cached headers while they are being parsed. - This way mailbox format backends that don't need dirty flags can use them - for other purposes. + Fixes lmtp: Panic: file ../../../src/lib/array.h: line 219 (array_idx_i): + assertion failed: (idx * array->element_size < array->buffer->used) -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index.h +M src/lib-storage/index/index-mail-headers.c -2017-02-10 16:26:15 +0200 Timo Sirainen (c92338c67) +2017-01-09 17:48:56 +0200 Timo Sirainen (2599a77a2) - cassandra: Track query counts internally and include them in metrics + cassandra: Support configuring heartbeat_interval and idle_timeout M src/lib-sql/driver-cassandra.c -2017-02-13 18:06:46 +0200 Timo Sirainen (391e99809) +2017-01-10 13:29:34 +0200 Timo Sirainen (6ce2e6f7a) - lib-compress: Fix missing .gz header error message + director: Fix assert-crash when flush script takes too long + Fixes: Panic: file director.c: line 966 (director_user_move_timeout): + assertion failed: (user->kill_ctx->kill_state != USER_KILL_STATE_FLUSHING) -M src/lib-compression/istream-zlib.c +M src/director/director.c -2017-02-13 18:05:13 +0200 Timo Sirainen (e72d13f3b) +2017-01-09 20:31:35 +0200 Timo Sirainen (769cbb608) - lib-compress: Fix assert-crash when .gz header size exceeds buffer max - length + cassandra: Add support for "bigint" value type. - Instead treat the stream as corrupted and return EINVAL. - Fixes: Panic: file istream.c: line 182 (i_stream_read): assertion failed: - (_stream->skip != _stream->pos) +M src/lib-sql/driver-cassandra.c -M src/lib-compression/istream-zlib.c -M src/lib-compression/test-compression.c +2017-01-09 22:39:09 +0200 Timo Sirainen (904cdf7f2) -2017-02-10 15:27:13 +0200 Timo Sirainen (ea6a744d0) + dict-client: When failing to resend commands after reconnect, their success + is uncertain. - lib-http: http_client_request_add_header() - Add key/value asserts + It's possible that the writes before the disconnection did actually finish + successfully. If any of them were commits, we need to return + DICT_COMMIT_RET_WRITE_UNCERTAIN. - These don't check that they're entirely correct as required by HTTP - specifications. They're mainly there as a quick check that if the caller - didn't validate the key/value in any way, we'll crash instead of creating a - potential security hole. (Because with line feeds the attacker could add - extra headers or even entirely new HTTP requests.) +M src/lib-dict/dict-client.c -M src/lib-http/http-client-request.c +2017-01-09 17:05:14 +0200 Timo Sirainen (1fbe1b140) -2017-02-13 09:09:28 +0200 Martti Rannanjärvi (77486efb4) + dict-sql: Support transaction timestamps with Cassandra driver - lib-index: clear file->mmap_size only after logging it - Logging the error with size=0 loses information. +M src/lib-dict/dict-sql.c -M src/lib-index/mail-transaction-log-file.c +2017-01-09 19:16:04 +0200 Timo Sirainen (345fceae2) -2017-02-13 09:08:25 +0200 Martti Rannanjärvi (bae12f8e0) + dict-client: Pass through transaction timestamp to dict-server - lib-index: don't reset ioloop_time on mmap error - The variables seems to have been in the wrong order. +M src/dict/dict-commands.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-client.h -M src/lib-index/mail-transaction-log-file.c +2017-01-09 16:55:45 +0200 Timo Sirainen (e28b4fc2b) -2017-02-08 12:47:06 +0200 Timo Sirainen (f2ecd4262) + lib-dict: Add dict_transaction_set_timestamp() - quota: Log why quota_over_flag check is skipped if mail_debug=yes +M src/lib-dict/dict-private.h +M src/lib-dict/dict.c +M src/lib-dict/dict.h -M src/plugins/quota/quota.c +2017-01-09 19:10:25 +0200 Timo Sirainen (788810ad6) -2017-02-07 15:46:47 +0200 Timo Sirainen (f51b1ce70) + dict-ldap|fs: Explicitly specify used dict_vfuncs methods. - quota: If quota_over_script is unset, skip the quota_over check. + This was done for other dict drivers in + ade5567577dadb0b275c840208d3ad21a9f00a36 +M src/lib-dict-extra/dict-fs.c +M src/plugins/dict-ldap/dict-ldap.c -M src/plugins/quota/quota.c +2016-12-29 13:17:57 -0500 Timo Sirainen (3fae65c79) -2017-02-07 15:44:20 +0200 Timo Sirainen (23a6d2dec) + config: Fix checking if (3bb61142c) -2017-02-07 15:33:07 +0200 Timo Sirainen (da01950be) + lmtp: Don't deliver truncated email when client disconnects before "." line - quota: Remove quota_over_flag_* from quota_root. + This didn't happen always, because the EOF was handled in two different + places in different ways. - They are used only in one specific location and don't need to be stored - permanently. +M src/lmtp/commands.c -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota.c +2017-01-09 09:57:58 +0200 Aki Tuomi (317689976) -2017-02-10 13:17:00 +0200 Timo Sirainen (fe529b28a) + auth-policy: Add missing settings - global: Add asserts to make static analyzer happier. +M src/auth/auth-settings.c +M src/auth/auth-settings.h -M src/auth/db-ldap.c -M src/doveadm/doveadm-mail-index.c -M src/lib-auth/auth-master.c -M src/lib-fs/fs-posix.c -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/mail-autoexpunge.c -M src/lib/file-dotlock.c -M src/lib/iostream-temp.c +2017-01-08 20:09:33 +0200 Aki Tuomi (77ed2f5f6) -2017-02-10 13:15:58 +0200 Timo Sirainen (a3fbc7756) + auth-policy: Enable SSL connections - pop3-login: Code cleanup - Make sure destroying client stops processing. - It would currently do it in any case, but this makes it clearer. +M src/auth/Makefile.am +M src/auth/auth-policy.c -M src/pop3-login/client.c +2017-01-04 14:02:28 -0800 Greg C (83277213d) -2017-02-10 13:15:26 +0200 Timo Sirainen (7abf8f2da) + auth-policy: hashed_password will always be blank, tell buffer it has data + so str_len works when converting to hex - global: Ignore unnecessary return values. +M src/auth/auth-policy.c -M src/imap-urlauth/imap-urlauth-worker.c -M src/plugins/virtual/virtual-storage.c +2017-01-08 18:44:32 +0200 Aki Tuomi (7c9ae3d91) -2017-02-10 13:13:01 +0200 Timo Sirainen (2ed6bdbbd) + lib-program-client: Do not call program_client_fail twice - mail-filter: Handle handshake write() failure + Fixes crash in program-client caused by use of freed memory. +M src/lib-program-client/program-client.c -M src/plugins/mail-filter/istream-ext-filter.c +2016-12-25 10:14:07 +0200 Aki Tuomi (90126be6a) -2017-02-10 12:50:58 +0200 Timo Sirainen (edeae7ffe) + istream-mmap: Mark stream eof on error and copy errno - fts: Fix crash using fts_autoexpunge_exclude = \Special-use crash - It crashed whenever seeing a mailbox that didn't have any special-use flags. +M src/lib/istream-mmap.c -M src/plugins/fts/fts-storage.c +2016-12-16 20:27:09 +0200 Martti Rannanjärvi (89e040049) -2017-02-10 12:46:50 +0200 Timo Sirainen (b2a28aee6) + lib, lib-http: add HTTP_URL_ALLOW_PCT_NUL flag - doveadm mailbox metadata list: Fix listing all metadata. + This allows a URL to contain %00. - It was listing only private attributes, because key_type=0 happens to be - MAIL_ATTRIBUTE_TYPE_PRIVATE and key was never NULL. +M src/lib-http/http-url.c +M src/lib-http/http-url.h +M src/lib/uri-util.c +M src/lib/uri-util.h -M src/doveadm/doveadm-mail-mailbox-metadata.c +2016-12-27 14:01:14 +0200 Aki Tuomi (58fed57a4) -2017-02-10 12:41:28 +0200 Timo Sirainen (a21568964) + autoexpunge: Consider last_rename_stamp on expunge - mail-crypt-acl: Fix error handling + When expunging by saved date, see if last_rename_stamp is more recent than + saved date, and use that instead. - Don't crash if mail_user creation failed. + This prevents mails getting deleted on a folder that was just renamed, the + user probably expects autoexpunge to consider these emails as fresh. -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/lib-storage/mail-autoexpunge.c -2017-02-10 12:40:41 +0200 Timo Sirainen (3a42316ee) +2016-12-28 22:45:22 +0200 Aki Tuomi (3743948b6) - doveadm mailbox cryptokey generate: Fix error handling + index-storage: Update mailbox last_rename_stamp on rename - Don't crash if mail_user creation failed. -M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/mail-storage-private.h -2017-02-10 12:33:01 +0200 Timo Sirainen (247f01bda) +2016-12-30 16:20:12 +0100 Stephan Bosch (a4692ca37) - doveadm mailbox cryptokey generate: Fix memory leak + lib-lda: Moved LMTP client to lib-smtp. - dest_user was set to NULL, but never freed. + This makes the LMTP client available without dependency on lib-storage. For + Dovecot v2.3, the newly created lib-smtp will evolve into a full + client/server SMTP implementation. That will then remove the remaining SMTP + code from lib-lda. -M src/plugins/mail-crypt/doveadm-mail-crypt.c +M configure.ac +M dovecot-config.in.in +M src/Makefile.am +M src/lib-lda/Makefile.am +A src/lib-smtp/Makefile.am +R100 src/lib-lda/lmtp-client.c src/lib-smtp/lmtp-client.c +R100 src/lib-lda/lmtp-client.h src/lib-smtp/lmtp-client.h +M src/lmtp/Makefile.am -2017-02-10 12:09:50 +0200 Timo Sirainen (2b4670642) +2017-01-01 13:31:30 +0100 Stephan Bosch (2454dfa32) - doveadm director map: Fix checking if host parameter is required + Updated copyright notices to include the year 2017. +M doc/man/doveadm-acl.1.in +M doc/man/doveadm-altmove.1.in +M doc/man/doveadm-auth.1.in +M doc/man/doveadm-batch.1.in +M doc/man/doveadm-deduplicate.1.in +M doc/man/doveadm-director.1.in +M doc/man/doveadm-dump.1.in +M doc/man/doveadm-exec.1.in +M doc/man/doveadm-expunge.1.in +M doc/man/doveadm-fetch.1.in +M doc/man/doveadm-flags.1.in +M doc/man/doveadm-force-resync.1.in +M doc/man/doveadm-fs.1.in +M doc/man/doveadm-fts.1.in +M doc/man/doveadm-help.1.in +M doc/man/doveadm-import.1.in +M doc/man/doveadm-index.1.in +M doc/man/doveadm-instance.1.in +M doc/man/doveadm-kick.1.in +M doc/man/doveadm-log.1.in +M doc/man/doveadm-mailbox-cryptokey.1.in +M doc/man/doveadm-mailbox.1.in +M doc/man/doveadm-move.1.in +M doc/man/doveadm-penalty.1.in +M doc/man/doveadm-proxy.1.in +M doc/man/doveadm-purge.1.in +M doc/man/doveadm-pw.1.in +M doc/man/doveadm-quota.1.in +M doc/man/doveadm-replicator.1.in +M doc/man/doveadm-search-query.7 +M doc/man/doveadm-search.1.in +M doc/man/doveadm-stats.1.in +M doc/man/doveadm-sync.1.in +M doc/man/doveadm-user.1.in +M doc/man/doveadm-who.1.in +M doc/man/doveadm.1.in +M doc/man/doveconf.1.in +M doc/man/dovecot-lda.1.in +M doc/man/dovecot.1.in +M src/anvil/anvil-connection.c +M src/anvil/anvil-settings.c +M src/anvil/connect-limit.c +M src/anvil/main.c +M src/anvil/penalty.c +M src/anvil/test-penalty.c +M src/auth/auth-cache.c +M src/auth/auth-client-connection.c +M src/auth/auth-fields.c +M src/auth/auth-master-connection.c +M src/auth/auth-penalty.c +M src/auth/auth-policy.c +M src/auth/auth-postfix-connection.c +M src/auth/auth-request-handler.c +M src/auth/auth-request-stats.c +M src/auth/auth-request-var-expand.c +M src/auth/auth-request.c +M src/auth/auth-settings.c +M src/auth/auth-stats.c +M src/auth/auth-token.c +M src/auth/auth-worker-client.c +M src/auth/auth-worker-server.c +M src/auth/auth.c +M src/auth/db-checkpassword.c +M src/auth/db-dict-cache-key.c +M src/auth/db-dict.c +M src/auth/db-ldap.c +M src/auth/db-passwd-file.c +M src/auth/db-sql.c +M src/auth/main.c +M src/auth/mech-anonymous.c +M src/auth/mech-cram-md5.c +M src/auth/mech-digest-md5.c +M src/auth/mech-dovecot-token.c +M src/auth/mech-external.c +M src/auth/mech-plain-common.c +M src/auth/mech-plain.c +M src/auth/mech.c +M src/auth/mycrypt.c +M src/auth/passdb-blocking.c +M src/auth/passdb-bsdauth.c +M src/auth/passdb-cache.c +M src/auth/passdb-checkpassword.c +M src/auth/passdb-dict.c +M src/auth/passdb-imap.c +M src/auth/passdb-ldap.c +M src/auth/passdb-passwd-file.c +M src/auth/passdb-passwd.c +M src/auth/passdb-shadow.c +M src/auth/passdb-sql.c +M src/auth/passdb-static.c +M src/auth/passdb-template.c +M src/auth/passdb-vpopmail.c +M src/auth/passdb.c +M src/auth/password-scheme-crypt.c +M src/auth/password-scheme-pbkdf2.c +M src/auth/password-scheme-rpa.c +M src/auth/password-scheme.c +M src/auth/test-auth-cache.c +M src/auth/test-auth-request-var-expand.c +M src/auth/test-db-dict.c +M src/auth/userdb-blocking.c +M src/auth/userdb-checkpassword.c +M src/auth/userdb-dict.c +M src/auth/userdb-ldap.c +M src/auth/userdb-nss.c +M src/auth/userdb-passwd-file.c +M src/auth/userdb-passwd.c +M src/auth/userdb-prefetch.c +M src/auth/userdb-sql.c +M src/auth/userdb-static.c +M src/auth/userdb-template.c +M src/auth/userdb-vpopmail.c +M src/auth/userdb.c +M src/config/config-connection.c +M src/config/config-filter.c +M src/config/config-parser.c +M src/config/config-request.c +M src/config/config-settings.c +M src/config/doveconf.c +M src/config/main.c +M src/config/old-set-parser.c +M src/config/sysinfo-get.c +M src/dict/dict-commands.c +M src/dict/dict-connection.c +M src/dict/dict-settings.c +M src/dict/main.c +M src/director/auth-connection.c +M src/director/director-connection.c +M src/director/director-host.c +M src/director/director-request.c +M src/director/director-settings.c +M src/director/director-test.c +M src/director/director.c +M src/director/doveadm-connection.c +M src/director/login-connection.c +M src/director/mail-host.c +M src/director/main.c +M src/director/notify-connection.c +M src/director/test-user-directory.c +M src/director/user-directory.c +M src/dns/dns-client-settings.c +M src/dns/dns-client.c +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection.c +M src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-auth.c +M src/doveadm/doveadm-dict.c M src/doveadm/doveadm-director.c - -2017-02-10 11:58:17 +0200 Timo Sirainen (87c56d073) - - lib: Avoid unnecessary Coverity warnings in MALLOC_*() - - There doesn't seem to be any other nice way of avoiding these without - separately marking every instance. - -M src/lib/malloc-overflow.h - -2017-02-09 16:33:35 +0200 Timo Sirainen (d3d515c93) - - TODO: Remove some of the implemented features - - -M TODO - -2017-02-06 18:34:05 +0200 Timo Sirainen (df745bdb6) - - sdbox: Fix assert-crash on mailbox create race - - If another process created the mailbox at the same time, the mailbox_guid - wasn't set and opening the mailbox assert-crashed: - - Panic: file mail-storage.c: line 1744 (mailbox_get_metadata): assertion - failed: ((items & MAILBOX_METADATA_GUID) == 0 || - !guid_128_is_empty(metadata_r->guid)) - -M src/lib-storage/index/dbox-single/sdbox-storage.c - -2017-02-07 21:07:54 +0200 Timo Sirainen (aabb256a4) - - quota: Clarify quota_count() return value. - - -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-private.h - -2017-02-07 20:41:41 +0200 Timo Sirainen (a3eb84689) - - quota: Make sure quota_warning doesn't wrap "quota before" value. - - This could happen in some race conditions (and with bugs). - -M src/plugins/quota/quota.c - -2017-02-07 18:26:50 +0200 Timo Sirainen (1e2f5bf8c) - - quota: When executing quota_warning/over_flag script, log the reason why. - - -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota-util.c -M src/plugins/quota/quota.c - -2017-02-07 13:19:17 +0200 Aki Tuomi (1cf6991df) - - lib: Check that output max size is non-zero when version specified - - Otherwise we try to send version to non-existent output stream. - -M src/lib/connection.c - -2017-01-22 13:40:00 +0100 Stephan Bosch (77643f9f6) - - lib-storage: Added mail_user_init_ssl_client_settings(). - - -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2016-12-28 12:02:14 -0600 johnkwoods (016722054) - - lib-ldap: Remove extra return - - The ldap_connection_queue_request() function returns void. Trying to - "return" something from a void function caused compiling issues on Solaris - (Oracle Developer Studio 12.5). - -M src/lib-ldap/ldap-compare.c - -2017-01-22 17:24:02 -0600 J. Nick Koston (d1c780493) - - fts-solr: Allow username/password for solr connction - - Solr comes open to the world by default. For better security, we protect our - solr installs with a user and password. This change allows dovecot to - connect to these instances. - - Example usage in a fts.conf (permissions 0600) - fts_solr = url=http://nick:pass@127.0.0.1:8983/solr/dovecot/ - -M src/plugins/fts-solr/solr-connection.c - -2017-02-08 23:01:32 +0200 Timo Sirainen (53a4f7fff) - - pop3c: Increase timeout for PASS to 5 minutes. - - -M src/lib-storage/index/pop3c/pop3c-client.c - -2017-02-06 14:05:47 +0200 Timo Sirainen (3b1a82eed) - - indexer: Don't send more requests directly from worker status callback - - This causes assert-crashes when workers disconnect while having multiple - requests: - - indexer: Error: Indexer worker disconnected, discarding 2 requests for - user@domain indexer: Panic: file indexer.c: line 69 (queue_try_send_more): - assertion failed: (worker_connection_is_connected(conn)) - -M src/indexer/indexer.c - -2017-02-05 16:49:05 +0200 Timo Sirainen (f6170729c) - - imap: Add imap_fetch_failure setting - - This controls what happens when FETCH fails for some mails. The possible - values are: - - disconnect-immediately: This is the original behavior. Whenever FETCH fails - for a mail, the FETCH is aborted and client is disconnected. - - disconnect-after: The FETCH runs for all the requested mails, skipping any - mails that returned failures, but at the end the client is still - disconnected. - - no-after: The FETCH runs for all the requested mails, skipping any mails - that returned failures. At the end tagged NO reply is returned. If the - client attempts to FETCH the same failed mail more than once, the client is - disconnected. This is to avoid clients from going into infinite loops trying - to FETCH a broken mail. - -M src/imap/cmd-fetch.c -M src/imap/imap-client.h -M src/imap/imap-commands-util.c -M src/imap/imap-fetch.c -M src/imap/imap-fetch.h -M src/imap/imap-settings.c -M src/imap/imap-settings.h - -2016-05-02 13:26:05 +0300 Martti Rannanjärvi (8fe64e2af) - - lib-imap, imap: BINARY [UNKNOWNCTE] to [PARSE] - - -M src/imap/cmd-fetch.c -M src/lib-imap/imap-resp-code.h - -2017-02-05 16:24:08 +0200 Timo Sirainen (e1997d40e) - - imap: Share mailbox closing code in SELECT/UNSELECT/CLOSE/LOGOUT/deinit - - +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-dump-dbox.c +M src/doveadm/doveadm-dump-dcrypt-file.c +M src/doveadm/doveadm-dump-dcrypt-key.c +M src/doveadm/doveadm-dump-index.c +M src/doveadm/doveadm-dump-log.c +M src/doveadm/doveadm-dump-mailboxlog.c +M src/doveadm/doveadm-dump-thread.c +M src/doveadm/doveadm-dump.c +M src/doveadm/doveadm-fs.c +M src/doveadm/doveadm-instance.c +M src/doveadm/doveadm-kick.c +M src/doveadm/doveadm-log.c +M src/doveadm/doveadm-mail-altmove.c +M src/doveadm/doveadm-mail-batch.c +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-deduplicate.c +M src/doveadm/doveadm-mail-expunge.c +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-mail-flags.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-iter.c +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail-mailbox-status.c +M src/doveadm/doveadm-mail-mailbox.c +M src/doveadm/doveadm-mail-save.c +M src/doveadm/doveadm-mail-search.c +M src/doveadm/doveadm-mail-server.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mailbox-list-iter.c +M src/doveadm/doveadm-master.c +M src/doveadm/doveadm-mutf7.c +M src/doveadm/doveadm-penalty.c +M src/doveadm/doveadm-print-flow.c +M src/doveadm/doveadm-print-formatted.c +M src/doveadm/doveadm-print-json.c +M src/doveadm/doveadm-print-pager.c +M src/doveadm/doveadm-print-server.c +M src/doveadm/doveadm-print-tab.c +M src/doveadm/doveadm-print-table.c +M src/doveadm/doveadm-print.c +M src/doveadm/doveadm-proxy.c +M src/doveadm/doveadm-pw.c +M src/doveadm/doveadm-replicator.c +M src/doveadm/doveadm-settings.c +M src/doveadm/doveadm-sis.c +M src/doveadm/doveadm-stats.c +M src/doveadm/doveadm-util.c +M src/doveadm/doveadm-who.c +M src/doveadm/doveadm-zlib.c +M src/doveadm/doveadm.c +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-brain-mailbox-tree.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-mails.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-deserializer.c +M src/doveadm/dsync/dsync-ibc-pipe.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-ibc.c +M src/doveadm/dsync/dsync-mail.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-state.c +M src/doveadm/dsync/dsync-mailbox-tree-fill.c +M src/doveadm/dsync/dsync-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-mailbox-tree.c +M src/doveadm/dsync/dsync-mailbox.c +M src/doveadm/dsync/dsync-serializer.c +M src/doveadm/dsync/dsync-transaction-log-scan.c +M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c +M src/doveadm/main.c +M src/doveadm/server-connection.c +M src/doveadm/test-doveadm-util.c +M src/imap-hibernate/imap-client.c +M src/imap-hibernate/imap-hibernate-client.c +M src/imap-hibernate/imap-hibernate-settings.c +M src/imap-hibernate/imap-master-connection.c +M src/imap-hibernate/main.c +M src/imap-login/client-authenticate.c +M src/imap-login/imap-login-client.c +M src/imap-login/imap-login-commands.c +M src/imap-login/imap-login-settings.c +M src/imap-login/imap-proxy.c +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-login-settings.c +M src/imap-urlauth/imap-urlauth-login.c +M src/imap-urlauth/imap-urlauth-settings.c +M src/imap-urlauth/imap-urlauth-worker-settings.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/cmd-append.c +M src/imap/cmd-cancelupdate.c +M src/imap/cmd-capability.c +M src/imap/cmd-check.c M src/imap/cmd-close.c +M src/imap/cmd-copy.c +M src/imap/cmd-create.c +M src/imap/cmd-delete.c +M src/imap/cmd-enable.c +M src/imap/cmd-examine.c +M src/imap/cmd-expunge.c +M src/imap/cmd-fetch.c +M src/imap/cmd-genurlauth.c +M src/imap/cmd-getmetadata.c +M src/imap/cmd-id.c +M src/imap/cmd-idle.c +M src/imap/cmd-list.c M src/imap/cmd-logout.c +M src/imap/cmd-lsub.c +M src/imap/cmd-namespace.c +M src/imap/cmd-noop.c +M src/imap/cmd-notify.c +M src/imap/cmd-rename.c +M src/imap/cmd-resetkey.c +M src/imap/cmd-search.c M src/imap/cmd-select.c +M src/imap/cmd-setmetadata.c +M src/imap/cmd-sort.c +M src/imap/cmd-status.c +M src/imap/cmd-store.c +M src/imap/cmd-subscribe.c +M src/imap/cmd-thread.c M src/imap/cmd-unselect.c +M src/imap/cmd-unsubscribe.c +M src/imap/cmd-urlfetch.c +M src/imap/cmd-x-cancel.c +M src/imap/cmd-x-state.c +M src/imap/imap-client-hibernate.c M src/imap/imap-client.c M src/imap/imap-commands-util.c -M src/imap/imap-commands-util.h - -2017-02-05 16:23:35 +0200 Timo Sirainen (7b87f6152) - - imap: Free search updates on CLOSE - - -M src/imap/cmd-close.c - -2017-02-05 16:10:44 +0200 Timo Sirainen (17b83d9d3) - - imap: Don't send empty FETCH () on failure - - It violates IMAP RFC. Send FETCH (UID n) instead. - +M src/imap/imap-commands.c +M src/imap/imap-expunge.c +M src/imap/imap-fetch-body.c M src/imap/imap-fetch.c - -2017-02-06 11:02:46 +0200 Timo Sirainen (9b1bec856) - - lib-ssl-iostream: Fix memory leak in RSA_generate_key_ex() usage - - -M src/lib-ssl-iostream/iostream-openssl-context.c - -2017-02-06 11:23:50 +0200 Timo Sirainen (48fde2a71) - - auth: Handle delayed credentials identically in auth-workers - - -M src/auth/auth-request.c - -2017-02-06 10:55:40 +0200 Timo Sirainen (2c4a553a7) - - lib: Make sure NULL is defined to be ((void *)0) - - This avoids us having to do explicit (void *)NULL casts in e.g. io_add(..., - NULL) context parameter. - -M src/lib/compat.h - -2017-02-04 13:51:13 +0200 Timo Sirainen (b5e88b7ef) - - lib-storage: Don't duplicate service user's settings into mail_user - - The mail_storage_service_user.user_set isn't used afterwards, so it can be - directly used to avoid wasting memory. - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2017-02-04 13:38:17 +0200 Timo Sirainen (518b81bfe) - - lib-storage: Don't unnecessarily duplicate user's all setting strings - - user->unexpanded_set and user->set have the same life-time, so they can - point to same strings. - -M src/lib-storage/mail-user.c - -2017-02-05 20:29:10 +0200 Timo Sirainen (313edff9f) - - lib-ssl-iostream: Remove libdovecot_openssl_common.la - - Using such a library results in the same code being duplicated (in OSX) in - both libssl_iostream_openssl.so and libdcrypt_openssl.so. This breaks the - idea of openssl_init_refcount, because each one will have their own one. - - libdcrypt_openssl.so now links to libssl_iostream_openssl.so, which - shouldn't really be a problem, because lib-ssl-iostream is part of the core - libdovecot.so already. It would have been possible to also install - libdovecot_openssl_common.so and link it to both libssl_iostream_openssl.so - and libdcrypt_openssl.so, but that seems unnecessarily complicated. - -M src/lib-dcrypt/Makefile.am -M src/lib-ssl-iostream/Makefile.am - -2017-02-05 20:28:04 +0200 Timo Sirainen (f82283cad) - - lib-ssl-iostream: Remove empty $(ssl_sources) from Makefile - - -M src/lib-ssl-iostream/Makefile.am - -2017-02-05 20:26:12 +0200 Timo Sirainen (0f3542d84) - - lib-dcrypt: Link unit tests with libssl_iostream.la - - libssl_iostream_openssl.so requires this, and it doesn't get added from - anywhere automatically. - -M src/lib-dcrypt/Makefile.am - -2017-02-05 20:24:41 +0200 Timo Sirainen (6ceb81079) - - lib-dcrypt: Remove unnecessary -shared link flag - - Not sure if this is harmful, but since no other plugin uses this it's not - needed either. - -M src/lib-dcrypt/Makefile.am - -2017-02-05 20:22:27 +0200 Timo Sirainen (25bc04eae) - - lib-dcrypt: Don't link liblib.la to libdcrypt_openssl.so - - At best this does nothing, at worst (like with OSX) it duplicates the entire - liblib and creates split state between the two instances. - -M src/lib-dcrypt/Makefile.am - -2017-02-05 20:20:37 +0200 Timo Sirainen (9483ccd55) - - lib-dcrypt: If dcrypt can't be initialized, log also the reason. - - This is very helpful when debugging linking issues. - -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c - -2017-02-05 21:38:33 +0200 Timo Sirainen (5f07a069f) - - lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via - configure - - -M configure.ac -M src/lib-ssl-iostream/dovecot-openssl-common.c - -2017-02-05 21:31:08 +0200 Timo Sirainen (5cc5edff3) - - lib-ssl-iostream: Call OBJ_cleanup() for all OpenSSL versions - - Just to reduce the #if checks that uglify the code. - -M src/lib-ssl-iostream/dovecot-openssl-common.c - -2017-02-05 21:10:04 +0200 Timo Sirainen (92ae85d6a) - - lib-ssl-iostream: Detect OPENSSL_cleanup() via configure - - It's ugly to have both OpenSSL version number check and a special LibreSSL - check. - -M configure.ac -M src/lib-ssl-iostream/dovecot-openssl-common.c - -2017-02-05 21:04:35 +0200 Timo Sirainen (6c7487039) - - lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure - - The version number check doesn't work correctly for LibreSSL. - -M configure.ac -M src/lib-ssl-iostream/dovecot-openssl-common.c - -2017-02-05 21:56:20 +0200 Timo Sirainen (905553cf2) - - lib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists - - This avoids deprecation warnings about ASN1_STRING_data() in OpenSSL v1.1. - -M configure.ac -M src/lib-ssl-iostream/iostream-openssl-common.c -M src/lib-ssl-iostream/iostream-openssl.h - -2017-02-05 21:51:29 +0200 Timo Sirainen (8adfdb0f4) - - lib-ssl-iostream: Use RSA_generate_key_ex() if it exists - - This avoids deprecation warnings about RSA_generate_key() in OpenSSL v1.1. - -M configure.ac -M src/lib-ssl-iostream/iostream-openssl-context.c - -2017-02-06 00:11:14 +0200 Timo Sirainen (d03fb4032) - - dict-sql: Move USING TIMESTAMP to correct location for INSERTs - - -M src/lib-dict/dict-sql.c - -2017-02-06 00:48:18 +0200 Timo Sirainen (8e89229c3) - - auth: Pass through passdb extra fields to auth-worker requests - - -M src/auth/auth-request.c - -2017-02-06 00:46:55 +0200 Timo Sirainen (d906a02a9) - - auth: Code cleanup - Move userdb extra fields exporting to its own function - - -M src/auth/auth-request.c - -2017-01-25 23:26:35 +0200 Timo Sirainen (9c65e8699) - - lib-storage: Expunging now uses GUID only if it's in cache. - - Otherwise the GUID lookup may be expensive, which is especially bad when - deleting a large number of mails. - -M src/lib-storage/index/index-mail.c - -2017-02-03 19:40:54 +0200 Timo Sirainen (ab14fa88a) - - lib-storage: Fix autoexpunge locking to actually work correctly. - - It wasn't actually skipping the autoexpunging if the lock already existed. - It autoexpunged anyway. - -M src/lib-storage/mail-autoexpunge.c - -2017-02-03 14:22:02 +0200 Aki Tuomi (921f06165) - - fts: Use mailbox_list_created hook - - Otherwise the deinit hook might get lost and fts would not be deinitialized. - - Reverts 11f12ca1c97583b551a4286fa6cd1ab33aa67680 which seems to have been - unnecessary - - Fixes indexer-worker signal 11 crash - -M src/plugins/fts/fts-plugin.c -M src/plugins/fts/fts-storage.c -M src/plugins/fts/fts-storage.h - -2017-02-03 16:16:26 +0200 Timo Sirainen (24ffb6a44) - - lib-storage: Once hooks have run, set vlast to NULL to make sure it's not - used - - The functions can't be correctly overridden outside their own specific - hooks. It would work only if hook_build_update() is called afterwards and - currently there's no public API for that. - -M src/lib-storage/mail-storage-hooks.c - -2017-02-04 10:42:21 +0200 Aki Tuomi (795401765) - - lib-storage: Put vsize in index only if it's not there - - -M src/lib-storage/index/index-mail.c - -2017-01-30 21:28:20 +0200 Timo Sirainen (3145333a5) - - lib-storage: Add assert to make sure header parsing isn't recursed - - +M src/imap/imap-list.c +M src/imap/imap-master-client.c +M src/imap/imap-notify.c +M src/imap/imap-search-args.c +M src/imap/imap-search.c +M src/imap/imap-settings.c +M src/imap/imap-state.c +M src/imap/imap-status.c +M src/imap/imap-sync.c +M src/imap/mail-storage-callbacks.c +M src/imap/main.c +M src/indexer/indexer-client.c +M src/indexer/indexer-queue.c +M src/indexer/indexer-settings.c +M src/indexer/indexer-worker-settings.c +M src/indexer/indexer-worker.c +M src/indexer/indexer.c +M src/indexer/master-connection.c +M src/indexer/worker-connection.c +M src/indexer/worker-pool.c +M src/ipc/client.c +M src/ipc/ipc-connection.c +M src/ipc/ipc-group.c +M src/ipc/ipc-settings.c +M src/ipc/main.c +M src/lda/main.c +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-client.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-charset/charset-iconv.c +M src/lib-charset/charset-utf8.c +M src/lib-charset/test-charset.c +M src/lib-compression/compression.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-compression/ostream-bzlib.c +M src/lib-compression/ostream-lz4.c +M src/lib-compression/ostream-lzma.c +M src/lib-compression/ostream-zlib.c +M src/lib-compression/test-compression.c +M src/lib-dcrypt/dcrypt-gnutls.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict-extra/dict-register.c +M src/lib-dict/dict-cdb.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-db.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql-settings.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict-transaction-memory.c +M src/lib-dict/dict.c +M src/lib-dict/test-dict-client.c +M src/lib-dict/test-dict.c +M src/lib-dns/dns-lookup.c +M src/lib-dns/dns-util.c +M src/lib-dns/test-dns-util.c +M src/lib-fs/fs-api.c +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-common.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test-async.c +M src/lib-fs/fs-test.c +M src/lib-fs/fs-wrapper.c +M src/lib-fs/istream-fs-file.c +M src/lib-fs/istream-fs-stats.c +M src/lib-fs/istream-metawrap.c +M src/lib-fs/ostream-cmp.c +M src/lib-fs/ostream-metawrap.c +M src/lib-fs/test-fs-metawrap.c +M src/lib-fts/fts-filter-common.c +M src/lib-fts/fts-filter-contractions.c +M src/lib-fts/fts-filter-english-possessive.c +M src/lib-fts/fts-filter-lowercase.c +M src/lib-fts/fts-filter-normalizer-icu.c +M src/lib-fts/fts-filter-stemmer-snowball.c +M src/lib-fts/fts-filter-stopwords.c +M src/lib-fts/fts-filter.c +M src/lib-fts/fts-icu.c +M src/lib-fts/fts-language.c +M src/lib-fts/fts-library.c +M src/lib-fts/fts-tokenizer-address.c +M src/lib-fts/fts-tokenizer-common.c +M src/lib-fts/fts-tokenizer-generic.c +M src/lib-fts/fts-tokenizer.c +M src/lib-fts/test-fts-filter.c +M src/lib-fts/test-fts-icu.c +M src/lib-fts/test-fts-language.c +M src/lib-fts/test-fts-tokenizer.c +M src/lib-http/http-auth.c +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-queue.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.c +M src/lib-http/http-date.c +M src/lib-http/http-header-parser.c +M src/lib-http/http-header.c +M src/lib-http/http-message-parser.c +M src/lib-http/http-parser.c +M src/lib-http/http-request-parser.c +M src/lib-http/http-request.c +M src/lib-http/http-response-parser.c +M src/lib-http/http-response.c +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-request.c +M src/lib-http/http-server-response.c +M src/lib-http/http-server.c +M src/lib-http/http-transfer-chunked.c +M src/lib-http/http-url.c +M src/lib-http/test-http-auth.c +M src/lib-http/test-http-client-errors.c +M src/lib-http/test-http-client.c +M src/lib-http/test-http-date.c +M src/lib-http/test-http-header-parser.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-response-parser.c +M src/lib-http/test-http-server-errors.c +M src/lib-http/test-http-server.c +M src/lib-http/test-http-transfer.c +M src/lib-http/test-http-url.c +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-client/imapc-msgmap.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-imap-storage/imap-msgpart-url.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-imap-urlauth/imap-urlauth-fetch.c +M src/lib-imap-urlauth/imap-urlauth.c +M src/lib-imap/imap-arg.c +M src/lib-imap/imap-base-subject.c +M src/lib-imap/imap-bodystructure.c +M src/lib-imap/imap-date.c +M src/lib-imap/imap-envelope.c +M src/lib-imap/imap-id.c +M src/lib-imap/imap-keepalive.c +M src/lib-imap/imap-match.c +M src/lib-imap/imap-parser.c +M src/lib-imap/imap-quote.c +M src/lib-imap/imap-seqset.c +M src/lib-imap/imap-url.c +M src/lib-imap/imap-utf7.c +M src/lib-imap/imap-util.c +M src/lib-imap/test-imap-bodystructure.c +M src/lib-imap/test-imap-match.c +M src/lib-imap/test-imap-parser.c +M src/lib-imap/test-imap-quote.c +M src/lib-imap/test-imap-url.c +M src/lib-imap/test-imap-utf7.c +M src/lib-imap/test-imap-util.c +M src/lib-index/mail-cache-compress.c +M src/lib-index/mail-cache-decisions.c +M src/lib-index/mail-cache-fields.c +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-cache-sync-update.c +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-cache.c +M src/lib-index/mail-index-alloc-cache.c +M src/lib-index/mail-index-dummy-view.c +M src/lib-index/mail-index-fsck.c +M src/lib-index/mail-index-lock.c +M src/lib-index/mail-index-map-hdr.c +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-index-map.c +M src/lib-index/mail-index-modseq.c +M src/lib-index/mail-index-strmap.c +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-sync-keywords.c +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index-transaction-export.c +M src/lib-index/mail-index-transaction-finish.c +M src/lib-index/mail-index-transaction-sort-appends.c +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/mail-index-transaction-view.c +M src/lib-index/mail-index-transaction.c +M src/lib-index/mail-index-util.c +M src/lib-index/mail-index-view-sync.c +M src/lib-index/mail-index-view.c +M src/lib-index/mail-index-write.c +M src/lib-index/mail-index.c +M src/lib-index/mail-transaction-log-append.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-view.c +M src/lib-index/mail-transaction-log.c +M src/lib-index/mailbox-log.c +M src/lib-index/test-mail-index-map.c +M src/lib-index/test-mail-index-modseq.c +M src/lib-index/test-mail-index-sync-ext.c +M src/lib-index/test-mail-index-transaction-finish.c +M src/lib-index/test-mail-index-transaction-update.c +M src/lib-index/test-mail-transaction-log-append.c +M src/lib-index/test-mail-transaction-log-view.c +M src/lib-lda/duplicate.c +M src/lib-lda/lda-settings.c +M src/lib-lda/lmtp-client.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-send.c +M src/lib-lda/smtp-client.c +M src/lib-ldap/ldap-client.c +M src/lib-ldap/ldap-compare.c +M src/lib-ldap/ldap-connection-pool.c +M src/lib-ldap/ldap-connection.c +M src/lib-ldap/ldap-entry.c +M src/lib-ldap/ldap-iterator.c +M src/lib-ldap/ldap-search.c +M src/lib-mail/istream-attachment-connector.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-binary-converter.c +M src/lib-mail/istream-dot.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/istream-nonuls.c +M src/lib-mail/istream-qp-decoder.c +M src/lib-mail/mail-html2text.c +M src/lib-mail/mail-user-hash.c +M src/lib-mail/mbox-from.c +M src/lib-mail/message-address.c +M src/lib-mail/message-binary-part.c +M src/lib-mail/message-date.c +M src/lib-mail/message-decoder.c +M src/lib-mail/message-header-decode.c +M src/lib-mail/message-header-encode.c +M src/lib-mail/message-header-hash.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-id.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-part-serialize.c +M src/lib-mail/message-part.c +M src/lib-mail/message-search.c +M src/lib-mail/message-size.c +M src/lib-mail/message-snippet.c +M src/lib-mail/ostream-dot.c +M src/lib-mail/qp-decoder.c +M src/lib-mail/quoted-printable.c +M src/lib-mail/rfc2231-parser.c +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-istream-attachment.c +M src/lib-mail/test-istream-binary-converter.c +M src/lib-mail/test-istream-dot.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-istream-qp-decoder.c +M src/lib-mail/test-mail-html2text.c +M src/lib-mail/test-mbox-from.c +M src/lib-mail/test-message-address.c +M src/lib-mail/test-message-date.c +M src/lib-mail/test-message-decoder.c +M src/lib-mail/test-message-header-decode.c +M src/lib-mail/test-message-header-encode.c +M src/lib-mail/test-message-header-hash.c +M src/lib-mail/test-message-header-parser.c +M src/lib-mail/test-message-id.c +M src/lib-mail/test-message-parser.c +M src/lib-mail/test-message-part.c +M src/lib-mail/test-message-search.c +M src/lib-mail/test-message-snippet.c +M src/lib-mail/test-ostream-dot.c +M src/lib-mail/test-qp-decoder.c +M src/lib-mail/test-quoted-printable.c +M src/lib-mail/test-rfc2231-parser.c +M src/lib-mail/test-rfc822-parser.c +M src/lib-master/anvil-client.c +M src/lib-master/ipc-client.c +M src/lib-master/ipc-server.c +M src/lib-master/master-auth.c +M src/lib-master/master-instance.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-login.c +M src/lib-master/master-service-haproxy.c +M src/lib-master/master-service-settings-cache.c +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl.c +M src/lib-master/master-service.c +M src/lib-master/syslog-util.c +M src/lib-master/test-master-service-settings-cache.c +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h +M src/lib-program-client/test-program-client-local.c +M src/lib-program-client/test-program-client-net.c +M src/lib-program-client/test-program-client-unix.c +M src/lib-sasl/dsasl-client.c +M src/lib-sasl/mech-external.c +M src/lib-sasl/mech-login.c +M src/lib-sasl/mech-plain.c +M src/lib-settings/settings-parser.c +M src/lib-settings/settings.c +M src/lib-settings/test-settings-parser.c +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-mysql.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlite.c +M src/lib-sql/driver-sqlpool.c +M src/lib-sql/sql-api.c +M src/lib-sql/sql-db-cache.c +M src/lib-ssl-iostream/dovecot-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/istream-openssl.c +M src/lib-ssl-iostream/ostream-openssl.c +M src/lib-stats/stats-connection.c +M src/lib-stats/stats-parser.c +M src/lib-stats/stats.c +M src/lib-storage/fail-mail-storage.c +M src/lib-storage/fail-mail.c +M src/lib-storage/fail-mailbox.c +M src/lib-storage/index/cydir/cydir-mail.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/cydir/cydir-storage.c +M src/lib-storage/index/cydir/cydir-sync.c +M src/lib-storage/index/dbox-common/dbox-attachment.c +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib-storage/index/dbox-common/dbox-mail.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-common/dbox-storage.c +M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c +M src/lib-storage/index/dbox-multi/mdbox-file.c +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-multi/mdbox-settings.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-multi/mdbox-sync.c +M src/lib-storage/index/dbox-single/sdbox-copy.c +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-storage/index/dbox-single/sdbox-sync.c +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-sync.c +M src/lib-storage/index/index-attachment.c +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-mail-binary.c M src/lib-storage/index/index-mail-headers.c - -2017-02-02 01:36:50 +0100 Stephan Bosch (2444e6039) - - lib-http: client: Fixed peer reconnection failure handling. - - The addressed problem occurs in a very specific situation in which the - original successful connection is dropped, yet a new connection fails. It - manifests as an assertion failure or panic: - - Panic: file ioloop-epoll.c: line 189 (io_loop_handler_run_internal): - assertion failed: (msecs >= 0) Panic: BUG: No IOs or timeouts set. Not - waiting for infinity. - - The timing is very critical. However, this doesn't mean that the occurrence - of this problem is very unlikely; it can happen frequently under high load. - -M src/lib-http/http-client-queue.c -M src/lib-http/test-http-client-errors.c - -2017-02-02 01:34:35 +0100 Stephan Bosch (504701e3a) - - lib-http: client: Respect the connection idle timeout, even when all queues - have unlinked from a peer. - - Otherwise, the DNS TTL timeout dictates the connection idle timeout in some - situations. - -M src/lib-http/http-client-peer.c - -2017-02-02 11:47:24 +0200 Timo Sirainen (89b020730) - - dict: Fix error logging if TIMESTAMP parameters are wrong. - - -M src/dict/dict-commands.c - -2017-02-02 11:32:50 +0200 Timo Sirainen (eb4f49379) - - dict-sql: Add missing USING TIMESTAMP for DELETE queries - - -M src/lib-dict/dict-sql.c - -2017-01-31 21:03:29 +0200 Timo Sirainen (544cbb96c) - - imap: Fix panic on FETCH X-MAILBOX in virtual mailbox when mail is expunged - - -M src/imap/imap-fetch.c - -2017-01-31 13:41:48 +0100 Stephan Bosch (7a8d8f4be) - - lib-http: server: Fix premature connection destroy in - http_server_connection_output(). - - Added a reference to the connection object while it is sending the remainder - of a response's payload. This is necessary, since - http_server_response_send_more() can destroy the connection, for example - when the request has a "Connection: close" header. This will only occur for - responses with a very large payload, because otherwise the payload is fully - sent in in the initial pass. - -M src/lib-http/http-server-connection.c - -2017-01-09 23:13:03 +0200 Timo Sirainen (f0707a5a0) - - lib-storage: When logging corrupted mail size, disable logging Message-ID - for now - - This was causing crashes in some situations. It was originally added to - figure out if there were problems with dovecot.index.cache containing data - for wrong messages. This was never found to happen, although now thinking - about it, the problem may have been - 741287129c22cadc14c05584704685b31169dbce. So perhaps this code could be - removed permanently as well. - - 6b44fc75c0039d1006ce4d543544552449b8e229 also attempted to fix this, but it - wasn't enough. There was still some code path that lead to recursive header - parsing. - -M src/lib-storage/index/istream-mail.c - -2017-01-30 15:12:04 +0200 Timo Sirainen (3fce0ce95) - - lib-storage: Set vsize extension when copying mails. - - -M src/lib-storage/index/index-storage.c - -2017-01-30 15:11:45 +0200 Timo Sirainen (744bfcfc7) - - lib-storage: Add index_mail_get_vsize_extension() - - M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h - -2017-01-30 15:06:46 +0200 Timo Sirainen (107df477c) - - lib-storage: Move index_mail.vsize_ext_id to mailbox.mail_vsize_ext_id - - It's mailbox-specific, so it doesn't have to be looked up every time. Also - this is needed for the following fix. - -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/index/index-pop3-uidl.c +M src/lib-storage/index/index-rebuild.c +M src/lib-storage/index/index-search-result.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/index/index-status.c M src/lib-storage/index/index-storage.c -M src/lib-storage/mail-storage-private.h - -2016-12-14 18:13:25 +0200 Timo Sirainen (f4917b16f) - - imapc: Allow using LAYOUT=none without crashing. - - -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c - -2017-01-29 00:24:33 +0200 Timo Sirainen (987cf37e7) - - imap: Don't unregister internal commands at deinit. - - This allows plugins to unregister commands without errors being logged. - -M src/imap/imap-commands.c - -2017-01-26 22:42:09 +0200 Timo Sirainen (0188882cc) - - lib-storage: Lock autoexpunging so only a single process does it. - - This hopefully helps to avoid duplicates with lazy_expunge plugin. - +M src/lib-storage/index/index-sync-changes.c +M src/lib-storage/index/index-sync-pvt.c +M src/lib-storage/index/index-sync-search.c +M src/lib-storage/index/index-sync.c +M src/lib-storage/index/index-thread-finish.c +M src/lib-storage/index/index-thread-links.c +M src/lib-storage/index/index-thread.c +M src/lib-storage/index/index-transaction.c +M src/lib-storage/index/istream-mail.c +M src/lib-storage/index/maildir/maildir-copy.c +M src/lib-storage/index/maildir/maildir-filename-flags.c +M src/lib-storage/index/maildir/maildir-filename.c +M src/lib-storage/index/maildir/maildir-keywords.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-settings.c +M src/lib-storage/index/maildir/maildir-storage.c +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-sync.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/maildir/maildir-util.c +M src/lib-storage/index/mbox/istream-raw-mbox.c +M src/lib-storage/index/mbox/mbox-file.c +M src/lib-storage/index/mbox/mbox-lock.c +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/mbox/mbox-md5-all.c +M src/lib-storage/index/mbox/mbox-md5-apop3d.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-settings.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/mbox/mbox-sync-list-index.c +M src/lib-storage/index/mbox/mbox-sync-parse.c +M src/lib-storage/index/mbox/mbox-sync-rewrite.c +M src/lib-storage/index/mbox/mbox-sync-update.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/pop3c/pop3c-settings.c +M src/lib-storage/index/pop3c/pop3c-storage.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/index/raw/raw-mail.c +M src/lib-storage/index/raw/raw-storage.c +M src/lib-storage/index/raw/raw-sync.c +M src/lib-storage/index/shared/shared-list.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-fs-flags.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-fs.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/list/mailbox-list-maildir-iter.c +M src/lib-storage/list/mailbox-list-maildir.c +M src/lib-storage/list/mailbox-list-none.c +M src/lib-storage/list/mailbox-list-notify-tree.c +M src/lib-storage/list/mailbox-list-subscriptions.c +M src/lib-storage/list/subscription-file.c M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-copy.c +M src/lib-storage/mail-error.c +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-search-args-cmdline.c +M src/lib-storage/mail-search-args-imap.c +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/mail-search-build.c +M src/lib-storage/mail-search-parser-cmdline.c +M src/lib-storage/mail-search-parser-imap.c +M src/lib-storage/mail-search-parser.c +M src/lib-storage/mail-search-register-human.c +M src/lib-storage/mail-search-register-imap.c +M src/lib-storage/mail-search-register.c +M src/lib-storage/mail-search.c +M src/lib-storage/mail-storage-hooks.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-thread.c +M src/lib-storage/mail-user.c +M src/lib-storage/mail.c +M src/lib-storage/mailbox-attribute-internal.c +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-get.c +M src/lib-storage/mailbox-guid-cache.c +M src/lib-storage/mailbox-header.c +M src/lib-storage/mailbox-keywords.c +M src/lib-storage/mailbox-list-notify.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-recent-flags.c +M src/lib-storage/mailbox-search-result.c +M src/lib-storage/mailbox-tree.c +M src/lib-storage/mailbox-uidvalidity.c +M src/lib-storage/mailbox-watch.c +M src/lib-storage/test-mail-search-args-imap.c +M src/lib-storage/test-mail-search-args-simplify.c +M src/lib-storage/test-mailbox-get.c +M src/lib-test/test-common.c +M src/lib-test/test-istream.c +M src/lib-test/test-ostream.c +M src/lib/abspath.c +M src/lib/aqueue.c +M src/lib/array.c +M src/lib/askpass.c +M src/lib/backtrace-string.c +M src/lib/base32.c +M src/lib/base64.c +M src/lib/bits.c +M src/lib/bsearch-insert-pos.c +M src/lib/buffer.c +M src/lib/child-wait.c +M src/lib/compat.c +M src/lib/connection.c +M src/lib/crc32.c +M src/lib/data-stack.c +M src/lib/eacces-error.c +M src/lib/env-util.c +M src/lib/execv-const.c +M src/lib/failures.c +M src/lib/fd-close-on-exec.c +M src/lib/fdatasync-path.c +M src/lib/fdpass.c +M src/lib/file-cache.c +M src/lib/file-copy.c +M src/lib/file-create-locked.c +M src/lib/file-dotlock.c +M src/lib/file-lock.c +M src/lib/file-set-size.c +M src/lib/guid.c +M src/lib/hash-format.c +M src/lib/hash-method.c +M src/lib/hash.c +M src/lib/hash2.c +M src/lib/hex-binary.c +M src/lib/hex-dec.c +M src/lib/home-expand.c +M src/lib/hostpid.c +M src/lib/imem.c +M src/lib/ioloop-epoll.c +M src/lib/ioloop-notify-fd.c +M src/lib/ioloop-notify-inotify.c +M src/lib/ioloop-notify-none.c +M src/lib/ioloop-poll.c +M src/lib/ioloop-select.c +M src/lib/ioloop.c +M src/lib/iostream-proxy.c +M src/lib/iostream-proxy.h +M src/lib/iostream-pump.c +M src/lib/iostream-pump.h +M src/lib/iostream-rawlog.c +M src/lib/iostream-temp.c +M src/lib/iostream.c +M src/lib/ipwd.c +M src/lib/iso8601-date.c +M src/lib/istream-base64-decoder.c +M src/lib/istream-base64-encoder.c +M src/lib/istream-callback.c +M src/lib/istream-chain.c +M src/lib/istream-concat.c +M src/lib/istream-crlf.c +M src/lib/istream-data.c +M src/lib/istream-failure-at.c +M src/lib/istream-file.c +M src/lib/istream-hash.c +M src/lib/istream-jsonstr.c +M src/lib/istream-limit.c +M src/lib/istream-mmap.c +M src/lib/istream-rawlog.c +M src/lib/istream-seekable.c +M src/lib/istream-sized.c +M src/lib/istream-tee.c +M src/lib/istream-timeout.c +M src/lib/istream-unix.c +M src/lib/istream.c +M src/lib/json-parser.c +M src/lib/json-tree.c +M src/lib/lib-signals.c +M src/lib/lib.c +M src/lib/log-throttle.c +M src/lib/mempool-alloconly.c +M src/lib/mempool-datastack.c +M src/lib/mempool-system.c +M src/lib/mempool-unsafe-datastack.c +M src/lib/mempool.c +M src/lib/mkdir-parents.c +M src/lib/mmap-anon.c +M src/lib/mmap-util.c +M src/lib/module-dir.c +M src/lib/mountpoint.c +M src/lib/nfs-workarounds.c +M src/lib/numpack.c +M src/lib/ostream-buffer.c +M src/lib/ostream-escaped.c +M src/lib/ostream-failure-at.c +M src/lib/ostream-file.c +M src/lib/ostream-hash.c +M src/lib/ostream-null.c +M src/lib/ostream-rawlog.c +M src/lib/ostream-unix.c +M src/lib/ostream.c +M src/lib/pkcs5.c +M src/lib/primes.c +M src/lib/printf-format-fix.c +M src/lib/priorityq.c +M src/lib/process-title.c +M src/lib/rand.c +M src/lib/randgen.c +M src/lib/read-full.c +M src/lib/restrict-access.c +M src/lib/restrict-process-size.c +M src/lib/safe-memset.c +M src/lib/safe-mkdir.c +M src/lib/safe-mkstemp.c +M src/lib/sendfile-util.c +M src/lib/seq-range-array.c +M src/lib/sort.c +M src/lib/str-find.c +M src/lib/str-sanitize.c +M src/lib/str-table.c +M src/lib/str.c +M src/lib/strescape.c +M src/lib/strfuncs.c +M src/lib/strnum.c +M src/lib/test-aqueue.c +M src/lib/test-array.c +M src/lib/test-base32.c +M src/lib/test-base64.c +M src/lib/test-bits.c +M src/lib/test-bsearch-insert-pos.c +M src/lib/test-buffer.c +M src/lib/test-crc32.c +M src/lib/test-data-stack.c +M src/lib/test-failures.c +M src/lib/test-guid.c +M src/lib/test-hash-format.c +M src/lib/test-hash-method.c +M src/lib/test-hash.c +M src/lib/test-hex-binary.c +M src/lib/test-hmac.c +M src/lib/test-ioloop.c +M src/lib/test-iostream-proxy.c +M src/lib/test-iostream-pump.c +M src/lib/test-iostream-temp.c +M src/lib/test-iso8601-date.c +M src/lib/test-istream-base64-decoder.c +M src/lib/test-istream-base64-encoder.c +M src/lib/test-istream-chain.c +M src/lib/test-istream-concat.c +M src/lib/test-istream-crlf.c +M src/lib/test-istream-failure-at.c +M src/lib/test-istream-jsonstr.c +M src/lib/test-istream-seekable.c +M src/lib/test-istream-sized.c +M src/lib/test-istream-tee.c +M src/lib/test-istream-unix.c +M src/lib/test-istream.c +M src/lib/test-json-parser.c +M src/lib/test-json-tree.c +M src/lib/test-lib.c +M src/lib/test-llist.c +M src/lib/test-log-throttle.c +M src/lib/test-malloc-overflow.c +M src/lib/test-mempool-alloconly.c +M src/lib/test-net.c +M src/lib/test-numpack.c +M src/lib/test-ostream-escaped.c +M src/lib/test-ostream-failure-at.c +M src/lib/test-ostream-file.c +M src/lib/test-pkcs5.c +M src/lib/test-primes.c +M src/lib/test-printf-format-fix.c +M src/lib/test-priorityq.c +M src/lib/test-seq-range-array.c +M src/lib/test-str-find.c +M src/lib/test-str-sanitize.c +M src/lib/test-str-table.c +M src/lib/test-str.c +M src/lib/test-strescape.c +M src/lib/test-strfuncs.c +M src/lib/test-strnum.c +M src/lib/test-time-util.c +M src/lib/test-timing.c +M src/lib/test-unichar.c +M src/lib/test-uri.c +M src/lib/test-utc-mktime.c +M src/lib/test-var-expand.c +M src/lib/test-wildcard-match.c +M src/lib/time-util.c +M src/lib/timing.c +M src/lib/unichar.c +M src/lib/unix-socket-create.c +M src/lib/unlink-directory.c +M src/lib/unlink-old-files.c +M src/lib/uri-util.c +M src/lib/utc-mktime.c +M src/lib/utc-offset.c +M src/lib/var-expand.c +M src/lib/write-full.c +M src/lmtp/client.c +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/lmtp-settings.c +M src/lmtp/main.c +M src/log/doveadm-connection.c +M src/log/log-connection.c +M src/log/log-error-buffer.c +M src/log/log-settings.c +M src/log/main.c +M src/login-common/access-lookup.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/login-proxy-state.c +M src/login-common/login-proxy.c +M src/login-common/login-settings.c +M src/login-common/main.c +M src/login-common/sasl-server.c +M src/login-common/ssl-proxy-gnutls.c +M src/login-common/ssl-proxy-openssl.c +M src/login-common/ssl-proxy.c +M src/master/capabilities-posix.c +M src/master/dup2-array.c +M src/master/main.c +M src/master/master-client.c +M src/master/master-settings.c +M src/master/service-anvil.c +M src/master/service-listen.c +M src/master/service-log.c +M src/master/service-monitor.c +M src/master/service-process-notify.c +M src/master/service-process.c +M src/master/service.c +M src/plugins/acl/acl-api.c +M src/plugins/acl/acl-attributes.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-backend-vfile-update.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/acl/acl-backend.c +M src/plugins/acl/acl-cache.c +M src/plugins/acl/acl-global-file.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-mailbox.c +M src/plugins/acl/acl-plugin.c +M src/plugins/acl/acl-shared-storage.c +M src/plugins/acl/acl-storage.c +M src/plugins/acl/doveadm-acl.c +M src/plugins/autocreate/autocreate-plugin.c +M src/plugins/dict-ldap/dict-ldap-settings.c +M src/plugins/dict-ldap/dict-ldap.c +M src/plugins/expire/doveadm-expire.c +M src/plugins/expire/expire-plugin.c +M src/plugins/expire/expire-set.c +M src/plugins/fs-compress/fs-compress.c +M src/plugins/fts-lucene/doveadm-fts-lucene.c +M src/plugins/fts-lucene/fts-backend-lucene.c +M src/plugins/fts-lucene/fts-lucene-plugin.c +M src/plugins/fts-lucene/lucene-wrapper.cc +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-backend-solr.c +M src/plugins/fts-solr/fts-solr-plugin.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts-squat/fts-backend-squat.c +M src/plugins/fts-squat/fts-squat-plugin.c +M src/plugins/fts-squat/squat-test.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/fts/doveadm-dump-fts-expunge-log.c +M src/plugins/fts/doveadm-fts.c +M src/plugins/fts/fts-api.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-expunge-log.c +M src/plugins/fts/fts-indexer.c +M src/plugins/fts/fts-parser-html.c +M src/plugins/fts/fts-parser-script.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/fts/fts-parser.c +M src/plugins/fts/fts-plugin.c +M src/plugins/fts/fts-search-args.c +M src/plugins/fts/fts-search-serialize.c +M src/plugins/fts/fts-search.c +M src/plugins/fts/fts-storage.c +M src/plugins/fts/fts-user.c +M src/plugins/fts/xml2text.c +M src/plugins/imap-acl/imap-acl-plugin.c +M src/plugins/imap-quota/imap-quota-plugin.c +M src/plugins/imap-stats/imap-stats-plugin.c +M src/plugins/imap-zlib/imap-zlib-plugin.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/listescape/listescape-plugin.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/plugins/mail-crypt/fs-crypt-common.c +M src/plugins/mail-crypt/fs-crypt-settings.c +M src/plugins/mail-crypt/fs-crypt.c +M src/plugins/mail-crypt/fs-mail-crypt.c +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/plugins/mail-crypt/mail-crypt-global-key.c +M src/plugins/mail-crypt/mail-crypt-key.c +M src/plugins/mail-crypt/mail-crypt-plugin.c +M src/plugins/mail-crypt/mail-crypt-pluginenv.c +M src/plugins/mail-crypt/mail-crypt-userenv.c +M src/plugins/mail-crypt/test-mail-global-key.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/mail-filter-plugin.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/plugins/mail-log/mail-log-plugin.c +M src/plugins/mailbox-alias/mailbox-alias-plugin.c +M src/plugins/notify/notify-plugin.c +M src/plugins/notify/notify-storage.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c +M src/plugins/push-notification/push-notification-driver-dlog.c +M src/plugins/push-notification/push-notification-driver-ox.c +M src/plugins/push-notification/push-notification-drivers.c +M src/plugins/push-notification/push-notification-drivers.h +M src/plugins/push-notification/push-notification-event-flagsclear.c +M src/plugins/push-notification/push-notification-event-flagsclear.h +M src/plugins/push-notification/push-notification-event-flagsset.c +M src/plugins/push-notification/push-notification-event-flagsset.h +M src/plugins/push-notification/push-notification-event-mailboxcreate.c +M src/plugins/push-notification/push-notification-event-mailboxcreate.h +M src/plugins/push-notification/push-notification-event-mailboxdelete.c +M src/plugins/push-notification/push-notification-event-mailboxdelete.h +M src/plugins/push-notification/push-notification-event-mailboxrename.c +M src/plugins/push-notification/push-notification-event-mailboxrename.h +M src/plugins/push-notification/push-notification-event-mailboxsubscribe.c +M src/plugins/push-notification/push-notification-event-mailboxsubscribe.h +M src/plugins/push-notification/push-notification-event-mailboxunsubscribe.c +M src/plugins/push-notification/push-notification-event-mailboxunsubscribe.h +M src/plugins/push-notification/push-notification-event-message-common.h +M src/plugins/push-notification/push-notification-event-messageappend.c +M src/plugins/push-notification/push-notification-event-messageappend.h +M src/plugins/push-notification/push-notification-event-messageexpunge.c +M src/plugins/push-notification/push-notification-event-messageexpunge.h +M src/plugins/push-notification/push-notification-event-messagenew.c +M src/plugins/push-notification/push-notification-event-messagenew.h +M src/plugins/push-notification/push-notification-event-messageread.c +M src/plugins/push-notification/push-notification-event-messageread.h +M src/plugins/push-notification/push-notification-event-messagetrash.c +M src/plugins/push-notification/push-notification-event-messagetrash.h +M src/plugins/push-notification/push-notification-events-rfc5423.c +M src/plugins/push-notification/push-notification-events-rfc5423.h +M src/plugins/push-notification/push-notification-events.c +M src/plugins/push-notification/push-notification-events.h +M src/plugins/push-notification/push-notification-plugin.c +M src/plugins/push-notification/push-notification-plugin.h +M src/plugins/push-notification/push-notification-triggers.c +M src/plugins/push-notification/push-notification-triggers.h +M src/plugins/push-notification/push-notification-txn-mbox.c +M src/plugins/push-notification/push-notification-txn-mbox.h +M src/plugins/push-notification/push-notification-txn-msg.c +M src/plugins/push-notification/push-notification-txn-msg.h +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/doveadm-quota.c +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-plugin.c +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota-util.c +M src/plugins/quota/quota.c +M src/plugins/quota/test-quota-util.c +M src/plugins/replication/replication-plugin.c +M src/plugins/snarf/snarf-plugin.c +M src/plugins/stats/mail-stats-connection.c +M src/plugins/stats/mail-stats-fill.c +M src/plugins/stats/mail-stats.c +M src/plugins/stats/stats-plugin.c +M src/plugins/trash/trash-plugin.c +M src/plugins/virtual/virtual-config.c +M src/plugins/virtual/virtual-mail.c +M src/plugins/virtual/virtual-plugin.c +M src/plugins/virtual/virtual-save.c +M src/plugins/virtual/virtual-search.c +M src/plugins/virtual/virtual-storage.c +M src/plugins/virtual/virtual-sync.c +M src/plugins/virtual/virtual-transaction.c +M src/plugins/welcome/welcome-plugin.c +M src/plugins/zlib/zlib-plugin.c +M src/pop3-login/client-authenticate.c +M src/pop3-login/client.c +M src/pop3-login/pop3-login-settings.c +M src/pop3-login/pop3-proxy.c +M src/pop3/main.c +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c +M src/pop3/pop3-settings.c +M src/replication/aggregator/aggregator-settings.c +M src/replication/aggregator/aggregator.c +M src/replication/aggregator/notify-connection.c +M src/replication/aggregator/replicator-connection.c +M src/replication/replicator/doveadm-connection.c +M src/replication/replicator/dsync-client.c +M src/replication/replicator/notify-connection.c +M src/replication/replicator/replicator-brain.c +M src/replication/replicator/replicator-queue-auth.c +M src/replication/replicator/replicator-queue.c +M src/replication/replicator/replicator-settings.c +M src/replication/replicator/replicator.c +M src/stats/client-export.c +M src/stats/client-reset.c +M src/stats/client.c +M src/stats/fifo-input-connection.c +M src/stats/global-memory.c +M src/stats/mail-command.c +M src/stats/mail-domain.c +M src/stats/mail-ip.c +M src/stats/mail-session.c +M src/stats/mail-stats.c +M src/stats/mail-user.c +M src/stats/main.c +M src/stats/stats-carbon.c +M src/stats/stats-settings.c +M src/util/gdbhelper.c +M src/util/maildirlock.c +M src/util/rawlog.c +M src/util/script-login.c +M src/util/script.c +M src/util/tcpwrap-settings.c +M src/util/tcpwrap.c -2017-01-29 01:08:23 +0200 Timo Sirainen (aff4adead) - - imap: Use struct mailbox_status.flags for FLAGS reply - - -M src/imap/imap-commands-util.c - -2017-01-29 01:06:55 +0200 Timo Sirainen (8b17a7d7b) - - lib-storage: Add struct mailbox_status.flags - - This is similar to permanent_flags, except it tells which flags can be - changed at all in the session. Mainly it allows plugins to make changes to - IMAP's untagged FLAGS reply. +2016-12-27 15:03:51 -0500 Josef 'Jeff' Sipek (69eb1a17f) -M src/lib-storage/index/index-status.c -M src/lib-storage/mail-storage.h + lib-mail: header filter should call callback for added EOH -2017-01-27 21:36:14 +0200 Timo Sirainen (f78adb9d8) + If we add a EOH because there wasn't one and HEADER_FILTER_ADD_MISSING_EOH + was specified, we should invoke the callback for it. Otherwise, it is + unnecessarily difficult for consumers to add a header since there is no way + to know if EOH will be present ahead of time. - lib: io_loop_set_current() - do nothing if ioloop doesn't change +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c - There's no need to call the switch callbacks if the ioloop doesn't change. +2016-12-28 10:49:49 -0500 Josef 'Jeff' Sipek (75891a354) -M src/lib/ioloop.c + lib-mail: refactor header filter test code -2017-01-27 13:56:30 +0200 Martti Rannanjärvi (0ceec815c) - doveadm: add doveadm_http_rawlog_dir setting +M src/lib-mail/test-istream-header-filter.c +2016-12-27 15:50:31 +0200 Martti Rannanjärvi (27de85bc0) -M src/doveadm/client-connection-http.c -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-settings.h + master: revert i_zero change on sd-daemon.c -2017-01-24 17:18:07 +0200 Timo Sirainen (b694e990f) - lib-fts: Fix assert-crash in fts_icu_lcase() +M src/master/sd-daemon.c - Fixes: Panic: file fts-icu.c: line 152 (fts_icu_lcase): assertion failed: - (err != U_BUFFER_OVERFLOW_ERROR) +2016-12-04 14:58:14 +0200 Martti Rannanjärvi (16bb1ac73) -M src/lib-fts/fts-icu.c -M src/lib-fts/test-fts-icu.c + lib: add separator also if arr[0] is empty in string array joins -2017-01-27 09:41:36 +0200 Aki Tuomi (55aa977c8) + Also add a couple test cases. - lib-storage: Fix comparison to use virtual size instead of body virtual size +M src/lib/strfuncs.c +M src/lib/test-strfuncs.c - Was forgotten on 7f1ecb14 +2016-12-21 07:53:52 +0200 Martti Rannanjärvi (d31a40787) -M src/lib-storage/index/index-mail.c + lib-compression: use LZ4_compress_default if can -2017-01-26 09:55:22 +0200 Timo Sirainen (3f7b36a35) + LZ4_compress is deprecated. - lib-index: Don't log error on dovecot.index.cache delete if it doesn't exist +M m4/want_lz4.m4 +M src/lib-compression/ostream-lz4.c - For example if a cache is marked as corrupted and there is no cache, it's - not really an error that it doesn't exist. +2016-12-18 12:03:10 +0200 Timo Sirainen (771cb02c2) - Fixes: Error: unlink(.../dovecot.index.cache) failed: No such file or - directory (in mail-cache.c:29) + lib-storage: Update mail_get_headers() API comment -M src/lib-index/mail-cache.c + The API was changed by 990d55ce3fc461eeacce3ef830b1c5dde5c3f150 -2017-01-26 19:51:34 +0200 Timo Sirainen (dcd0c99d1) +M src/lib-storage/mail-storage.h - lib-storage: Filling vsize to index on read used wrong size +2016-12-18 13:22:15 +0100 Stephan Bosch (efe78d3ba) + global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new + i_zero() macro. -M src/lib-storage/index/index-mail.c + Used the following script: -2017-01-26 09:42:26 +0200 Aki Tuomi (fab7e8aa9) + C_FILES=`git ls-files *.c` H_FILES=`git ls-files *.h` for F in "$C_FILES + $H_FILES"; do + echo "$F" + perl -p -i -e + 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' + $F + perl -p -i -e + 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F + perl -p -i -e + 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F + perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F + done - lib-storage: Clear virtual size from index if size is corrupted +M src/auth/auth-request-var-expand.c +M src/auth/auth-request.c +M src/auth/auth-settings.c +M src/auth/db-dict.c +M src/auth/db-ldap.c +M src/auth/main.c +M src/auth/passdb-pam.c +M src/config/config-connection.c +M src/config/config-filter.c +M src/config/config-parser.c +M src/config/doveconf.c +M src/config/old-set-parser.c +M src/dict/dict-connection.c +M src/dict/main.c +M src/director/login-connection.c +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection.c +M src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-auth.c +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-dict.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-fs.c +M src/doveadm/doveadm-kick.c +M src/doveadm/doveadm-log.c +M src/doveadm/doveadm-mail-batch.c +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail-mailbox-status.c +M src/doveadm/doveadm-mail-server.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-penalty.c +M src/doveadm/doveadm-print-formatted.c +M src/doveadm/doveadm-print-json.c +M src/doveadm/doveadm-print.c +M src/doveadm/doveadm-pw.c +M src/doveadm/doveadm-stats.c +M src/doveadm/doveadm-util.c +M src/doveadm/doveadm-who.c +M src/doveadm/doveadm-zlib.c +M src/doveadm/doveadm.c +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-mails.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-mail.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-tree-fill.c +M src/doveadm/dsync/dsync-transaction-log-scan.c +M src/doveadm/main.c +M src/doveadm/server-connection.c +M src/imap-hibernate/imap-hibernate-client.c +M src/imap-login/client-authenticate.c +M src/imap-login/imap-proxy.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap-urlauth/imap-urlauth.c +M src/imap/cmd-fetch.c +M src/imap/cmd-notify.c +M src/imap/cmd-select.c +M src/imap/cmd-setmetadata.c +M src/imap/cmd-store.c +M src/imap/imap-client.c +M src/imap/imap-commands-util.c +M src/imap/imap-commands.c +M src/imap/imap-fetch.c +M src/imap/imap-master-client.c +M src/imap/imap-notify.c +M src/imap/imap-state.c +M src/imap/imap-status.c +M src/imap/main.c +M src/indexer/indexer-worker.c +M src/indexer/master-connection.c +M src/lda/main.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-dcrypt/dcrypt-gnutls.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict/dict-cdb.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-db.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-sql-settings.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/test-dict-client.c +M src/lib-dns/dns-lookup.c +M src/lib-fs/fs-api.c +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-test-async.c +M src/lib-fs/fs-test.c +M src/lib-fts/fts-icu.c +M src/lib-http/http-auth.c +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-request.c +M src/lib-http/http-date.c +M src/lib-http/http-message-parser.c +M src/lib-http/http-parser.c +M src/lib-http/http-request-parser.c +M src/lib-http/http-response-parser.c +M src/lib-http/http-response.c +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-response.c +M src/lib-http/http-url.c +M src/lib-http/test-http-auth.c +M src/lib-http/test-http-client-errors.c +M src/lib-http/test-http-client.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-response-parser.c +M src/lib-http/test-http-server-errors.c +M src/lib-http/test-http-server.c +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-imap-storage/imap-msgpart-url.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-imap-urlauth/imap-urlauth-fetch.c +M src/lib-imap/imap-bodystructure.c +M src/lib-imap/imap-date.c +M src/lib-imap/imap-id.c +M src/lib-imap/imap-url.c +M src/lib-index/mail-cache-compress.c +M src/lib-index/mail-cache-fields.c +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-index-alloc-cache.c +M src/lib-index/mail-index-fsck.c +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-index-map.c +M src/lib-index/mail-index-modseq.c +M src/lib-index/mail-index-strmap.c +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-sync-keywords.c +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index-transaction-export.c +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/mail-index-transaction-view.c +M src/lib-index/mail-index-transaction.c +M src/lib-index/mail-index-view-sync.c +M src/lib-index/mail-index-view.c +M src/lib-index/mail-index.c +M src/lib-index/mail-transaction-log-append.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log.c +M src/lib-index/test-mail-index-map.c +M src/lib-index/test-mail-index-sync-ext.c +M src/lib-index/test-mail-index-transaction-finish.c +M src/lib-index/test-mail-transaction-log-view.c +M src/lib-lda/duplicate.c +M src/lib-lda/lmtp-client.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/smtp-client.c +M src/lib-ldap/ldap-compare.c +M src/lib-ldap/ldap-connection.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/mbox-from.c +M src/lib-mail/message-address.c +M src/lib-mail/message-date.c +M src/lib-mail/message-header-decode.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-part-serialize.c +M src/lib-mail/message-search.c +M src/lib-mail/message-snippet.c +M src/lib-mail/rfc2231-parser.c +M src/lib-mail/rfc822-parser.c +M src/lib-mail/test-istream-attachment.c +M src/lib-mail/test-message-decoder.c +M src/lib-mail/test-message-header-hash.c +M src/lib-mail/test-message-search.c +M src/lib-master/master-auth.c +M src/lib-master/master-login.c +M src/lib-master/master-service-settings.c +M src/lib-master/master-service-ssl.c +M src/lib-master/master-service.c +M src/lib-master/test-master-service-settings-cache.c +M src/lib-ntlm/ntlm-message.c +M src/lib-settings/settings-parser.c +M src/lib-settings/settings.c +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-mysql.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlite.c +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/index-attachment.c +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib-storage/index/index-pop3-uidl.c +M src/lib-storage/index/index-rebuild.c +M src/lib-storage/index/index-search-result.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-sync-changes.c +M src/lib-storage/index/index-sync.c +M src/lib-storage/index/index-thread-finish.c +M src/lib-storage/index/index-thread.c +M src/lib-storage/index/index-transaction.c +M src/lib-storage/index/maildir/maildir-copy.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/mbox/mbox-lock.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-sync-list-index.c +M src/lib-storage/index/mbox/mbox-sync-parse.c +M src/lib-storage/index/mbox/mbox-sync-rewrite.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/index/pop3c/pop3c-storage.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/list/mailbox-list-notify-tree.c +M src/lib-storage/list/mailbox-list-subscriptions.c +M src/lib-storage/list/subscription-file.c +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/mail-search-build.c +M src/lib-storage/mail-storage-hooks.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-user.c +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-list.c +M src/lib/buffer.c +M src/lib/connection.c +M src/lib/failures.c +M src/lib/fd-close-on-exec.c +M src/lib/file-dotlock.c +M src/lib/file-lock.c +M src/lib/file-set-size.c +M src/lib/ioloop-epoll.c +M src/lib/ioloop.c +M src/lib/iso8601-date.c +M src/lib/istream-sized.c +M src/lib/istream.c +M src/lib/lib-signals.c +M src/lib/md4.c +M src/lib/md5.c +M src/lib/mempool-alloconly.c +M src/lib/mountpoint.c +M src/lib/net.c +M src/lib/ostream.c +M src/lib/restrict-access.c +M src/lib/sendfile-util.c +M src/lib/seq-range-array.c +M src/lib/sha3.c +M src/lib/test-ioloop.c +M src/lib/test-utc-mktime.c +M src/lib/timing.c +M src/lib/uri-util.c +M src/lib/var-expand.c +M src/lmtp/client.c +M src/lmtp/commands.c +M src/lmtp/lmtp-proxy.c +M src/lmtp/main.c +M src/log/log-connection.c +M src/login-common/client-common-auth.c +M src/login-common/login-proxy-state.c +M src/login-common/login-settings.c +M src/login-common/main.c +M src/login-common/sasl-server.c +M src/login-common/ssl-proxy-openssl.c +M src/master/main.c +M src/master/sd-daemon.c +M src/master/service-listen.c +M src/master/service-log.c +M src/master/service-monitor.c +M src/plugins/acl/acl-api.c +M src/plugins/acl/acl-attributes.c +M src/plugins/acl/acl-backend-vfile-update.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/acl/acl-global-file.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-mailbox.c +M src/plugins/acl/doveadm-acl.c +M src/plugins/dict-ldap/dict-ldap-settings.c +M src/plugins/dict-ldap/dict-ldap.c +M src/plugins/expire/doveadm-expire.c +M src/plugins/expire/expire-plugin.c +M src/plugins/fts-lucene/doveadm-fts-lucene.c +M src/plugins/fts-solr/fts-backend-solr.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/fts/doveadm-fts.c +M src/plugins/fts/fts-api.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/fts/fts-search.c +M src/plugins/fts/xml2text.c +M src/plugins/imap-acl/imap-acl-plugin.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/mail-crypt/doveadm-mail-crypt.c +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c +M src/plugins/mail-crypt/mail-crypt-global-key.c +M src/plugins/mail-crypt/mail-crypt-plugin.c +M src/plugins/mail-crypt/mail-crypt-pluginenv.c +M src/plugins/mail-crypt/test-mail-global-key.c +M src/plugins/mail-crypt/test-mail-key.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/push-notification/push-notification-driver-ox.c +M src/plugins/push-notification/push-notification-event-flagsclear.c +M src/plugins/push-notification/push-notification-event-flagsset.c +M src/plugins/push-notification/push-notification-event-messageappend.c +M src/plugins/push-notification/push-notification-event-messagenew.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/doveadm-quota.c +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-status.c +M src/plugins/quota/quota-util.c +M src/plugins/quota/quota.c +M src/plugins/quota/test-quota-util.c +M src/plugins/stats/mail-stats-fill.c +M src/plugins/virtual/virtual-config.c +M src/plugins/virtual/virtual-mail.c +M src/plugins/virtual/virtual-search.c +M src/plugins/virtual/virtual-sync.c +M src/plugins/zlib/zlib-plugin.c +M src/pop3-login/pop3-proxy.c +M src/pop3/main.c +M src/replication/replicator/replicator-queue-auth.c +M src/replication/replicator/replicator-queue.c +M src/stats/client-export.c +M src/stats/client-reset.c +M src/stats/main.c +M src/util/script-login.c +2016-12-18 13:20:20 +0100 Stephan Bosch (08cb8e0ae) -M src/lib-storage/index/index-mail.c + lib: Created i_zero() wrapper for memset(p, 0, sizeof(*p)). -2017-01-14 18:34:11 +0200 Timo Sirainen (425d868ee) + Also creates an i_zero_safe() version for safe_memset(). - fts: Fix search query generation when tokens are filtered out. +M src/lib/macros.h - For example with English stopwords when searching "foo and bar" it should be - equilevant to "foo bar", since "and" is filtered out. +2016-12-17 13:12:39 +0100 Stephan Bosch (707460082) -M src/plugins/fts/fts-search-args.c + global: Made all struct initialization using memset() use the same style. -2017-01-23 18:02:05 +0200 Timo Sirainen (8839eaa55) - director: "doveadm director move" to same host now refreshes user's timeout +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dict/dict-cdb.c +M src/lib-dict/dict-db.c +M src/lib-http/http-url.c +M src/lib-imap/imap-date.c +M src/lib-imap/imap-url.c +M src/lib/net.c - This allows keeping user constantly in the same backend by just periodically - moving the user there. +2016-12-23 13:58:38 -0800 Nick Wallingford (96de40971) -M src/director/doveadm-connection.c + Fix link failure against libressl. -2017-01-16 14:01:57 +0200 Aki Tuomi (29e8c5a8e) - dict-sql: Do not increment on set +M src/lib-ssl-iostream/dovecot-openssl-common.c - When merging sets do not use increment mode in builder. +2016-12-23 14:15:49 -0500 Timo Sirainen (aab5704d2) -M src/lib-dict/dict-sql.c + lib-mail: Fix memory leak in test-istream-attachment -2017-01-17 09:59:54 +0200 Aki Tuomi (e90fb6046) - dict-sql: Fix iterator to not fail +M src/lib-mail/test-istream-attachment.c - When iterating a prefix without exact key flag, do not fail when no more - maps are matched if at least one map has already matched. +2016-12-23 12:53:49 -0500 Timo Sirainen (c81ec7de3) - Fixes Error: dict_iterate_deinit failed: sql dict iterate failed for ...: - Invalid/unmapped path + lib: Add unit test for istream-sized -M src/lib-dict/dict-sql.c -2016-10-16 22:55:26 +0300 Timo Sirainen (e4f3960d3) +M src/lib/Makefile.am +M src/lib/test-lib.inc - dict-sql: Error handling fix & code cleanup +2016-12-23 12:52:45 -0500 Timo Sirainen (c328d2208) - Only the first sql_dict_iterate_next_query() error was handled correctly. + lib: istream-sized - consistently set stream_errno=EINVAL if stream is too + large -M src/lib-dict/dict-sql.c + Earlier it was sometimes done and sometimes not, depending on whether the + parent istream happened to stop at the expected boundary. -2017-01-24 12:42:25 +0200 Aki Tuomi (2a85b1ab1) +M src/lib/istream-sized.c - lib-sasl: Fix oauthbearer compatibility with 2.2 +2016-12-23 12:51:41 -0500 Timo Sirainen (574d36db8) + lib: istream-sized - set stream_errno=EPIPE if stream is too small -M src/lib-sasl/mech-oauthbearer.c -2017-01-22 23:55:24 +0100 Stephan Bosch (fa940ae81) +M src/lib/istream-sized.c +M src/lib/istream-sized.h +A src/lib/test-istream-sized.c - lib-http: client: Fixed handling of errors occurring for unsubmitted - requests during http_client_request_send_payload(). +2016-12-23 12:26:17 -0500 Timo Sirainen (4f22781ec) - When http_client_request_send_payload() is executed for the first time, the - request is submitted. Errors occurring during submission don't trigger a - callback immediately. Instead, these are queued in the client and will - trigger a callback when an ioloop is run with the client. However, in - http_client_request_send_payload() the ioloop is never executed when the - request fails that way, meaning that the callback was never called. Since - for example SOLR assumes the callback is always called for an error in - http_client_request_send_payload(), this causes all kinds of problems. + lib: istream-sized - remove explicit i_error() logging - Fixed by manually handling the delayed request errors in - http_client_request_send_payload() explicitly. + The stream_errno is set, so it's the caller's responsibility to log the + error. There's no need to log it twice. -M src/lib-http/http-client-request.c +M src/lib/istream-sized.c -2017-01-18 13:46:12 +0200 Aki Tuomi (f9cc83c76) +2016-12-23 13:19:50 -0500 Timo Sirainen (b7cabbb8f) - lib-sasl: Add OAUTHBEARER and XOAUTH2 mechanism + lib-compression: istream-{bzlib|lz4} - set stream_errno=EPIPE on unexpected + EOF -M src/lib-sasl/Makefile.am -M src/lib-sasl/dsasl-client-private.h -M src/lib-sasl/dsasl-client.c -A src/lib-sasl/mech-oauthbearer.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c -2017-01-18 13:45:27 +0200 Aki Tuomi (5328a2e7b) +2016-12-23 13:30:56 -0500 Timo Sirainen (a4883ee9d) - lib-sasl: Add API for setting and getting extra values + lib-mail: istream-qp-decoder: set stream_errno=EPIPE on unexpected EOF - This allows setting extra parameters for authentication and recovering - extended result information from mechanism. -M src/lib-sasl/dsasl-client-private.h -M src/lib-sasl/dsasl-client.c -M src/lib-sasl/dsasl-client.h +M src/lib-mail/istream-qp-decoder.c +M src/lib-mail/test-istream-qp-decoder.c -2017-01-20 18:19:05 +0200 Timo Sirainen (5c2dc4a4d) +2016-12-23 13:23:39 -0500 Timo Sirainen (25463ef4c) - imapc: Fix assert-crash on some connect failures + lib-fs: istream-metawrap - set stream_errno=EPIPE on unexpected EOF - imapc_storage_has_modseqs() causes imapc_client_get_capabilities() to be - called, which assert-crashes if there isn't a valid connection: - Panic: file imapc-client.c: line 438 (imapc_client_get_capabilities): - assertion failed: (conn != NULL) +M src/lib-fs/istream-metawrap.c -M src/lib-storage/index/imapc/imapc-storage.c +2016-12-23 13:14:43 -0500 Timo Sirainen (aba4cdf6d) -2017-01-20 15:57:10 +0200 Timo Sirainen (9f6e40058) + lib-storage: istream-mail - Use EPIPE if istream is too small - director: Add more debug logging for moving & killing users +M src/lib-storage/index/istream-mail.c -M src/director/director.c +2016-12-23 13:08:59 -0500 Timo Sirainen (9d0be57bc) -2017-01-20 16:06:48 +0200 Timo Sirainen (956c62ec6) + lib-mail: Improve istream-attachment-extractor unit test for EIO errors - director: Fix USER-MOVE getting stuck if a director already uses the correct - host +M src/lib-mail/test-istream-attachment.c -M src/director/director.c +2016-12-23 12:59:13 -0500 Timo Sirainen (3979d59aa) -2017-01-20 16:03:12 +0200 Timo Sirainen (e6b3e477e) + lib-mail: istream-attachment-extractor - use EIO for internal errors - director: Ignore doveadm user move if host is already the same. + These happen only if the attachment writing failed for some reason. The + input stream itself can't have any errors, so EINVAL isn't proper. +M src/lib-mail/istream-attachment-extractor.c -M src/director/doveadm-connection.c +2016-12-23 12:56:24 -0500 Timo Sirainen (cd0fe951e) -2017-01-20 15:54:27 +0200 Timo Sirainen (8f4bd3b5e) + lib-mail: istream-attachment-extractor - remove unnecessary code - director: Make sure USER-KILLED isn't sent before USER-MOVE + It's enough to set the stream_errno. - If USER-MOVE was for a user that didn't exist, killing sent USER-KILLED - immediately before the forwarding USER-MOVE. This caused the move to get - stuck, giving errors like: +M src/lib-mail/istream-attachment-extractor.c - director: Error: Finishing user 3224731354 move timed out, its state may now - be inconsistent (state=waiting-for-everyone) +2016-12-23 11:57:59 -0500 Timo Sirainen (1547bafeb) -M src/director/director.c + lib: istream-jsonstr - return EPIPE if end-of-string quote isn't seen -2017-01-20 15:52:43 +0200 Timo Sirainen (30d3f03eb) - director: Add assert to make sure USER-MOVE doesn't change tag +M src/lib/istream-jsonstr.c +M src/lib/test-istream-jsonstr.c +2016-12-23 11:28:48 -0500 Timo Sirainen (ddf9529d3) -M src/director/director.c + lib: Add istream-jsonstr unit test. -2016-12-27 09:45:58 +0200 Aki Tuomi (722cfd377) - lib-storage: Copy cache decisions from inbox on create +M src/lib/Makefile.am +A src/lib/test-istream-jsonstr.c +M src/lib/test-lib.inc - Otherwise the decisions are definitely wrong, since they are nonexistent. - Copying from INBOX would make sense. +2016-12-21 18:35:05 +0200 Timo Sirainen (076c46c65) -M src/lib-storage/mail-storage.c + lib: istream-jsonstr - minor code cleanup -2016-12-27 09:44:52 +0200 Aki Tuomi (21149ee1f) + If ret==0 here, it means dest wasn't changed, which must mean that i==0. + Make it clear to avoid confusion. - lib-index: Add mail_cache_decisions_copy +M src/lib/istream-jsonstr.c - This allows priming cache decisions for a folder. +2016-12-23 12:13:16 -0500 Timo Sirainen (e0bd5e662) -M src/lib-index/mail-cache-decisions.c -M src/lib-index/mail-cache.h + lib: istream-base64-decoder - use stream_errno=EPIPE for unexpected EOF -2017-01-03 12:50:58 +0200 Aki Tuomi (349ad03e4) - lib-index: Unconstify mail_cache_register_get_list +M src/lib/istream-base64-decoder.c +M src/lib/test-istream-base64-decoder.c - This way the result is usable as input for mail_cache_register_fields. +2016-12-23 11:22:53 -0500 Timo Sirainen (baf3e87e1) -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache.h + global: Use const for all test_functions[] arrays -2017-01-20 14:46:30 +0200 Timo Sirainen (affc86a75) - lib-storage: Fix mailbox's vsize header check for mailboxes not in - dovecot.list.index +M src/anvil/test-penalty.c +M src/auth/test-auth-cache.c +M src/auth/test-auth-request-var-expand.c +M src/auth/test-db-dict.c +M src/director/test-user-directory.c +M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c +M src/doveadm/test-doveadm-util.c +M src/lib-charset/test-charset.c +M src/lib-compression/test-compression.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c +M src/lib-dict/test-dict.c +M src/lib-dns/test-dns-util.c +M src/lib-fs/test-fs-metawrap.c +M src/lib-fts/test-fts-filter.c +M src/lib-fts/test-fts-icu.c +M src/lib-fts/test-fts-language.c +M src/lib-fts/test-fts-tokenizer.c +M src/lib-http/test-http-auth.c +M src/lib-http/test-http-client-errors.c +M src/lib-http/test-http-date.c +M src/lib-http/test-http-header-parser.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-response-parser.c +M src/lib-http/test-http-server-errors.c +M src/lib-http/test-http-transfer.c +M src/lib-http/test-http-url.c +M src/lib-imap/test-imap-bodystructure.c +M src/lib-imap/test-imap-match.c +M src/lib-imap/test-imap-parser.c +M src/lib-imap/test-imap-quote.c +M src/lib-imap/test-imap-url.c +M src/lib-imap/test-imap-utf7.c +M src/lib-imap/test-imap-util.c +M src/lib-index/test-mail-index-map.c +M src/lib-index/test-mail-index-modseq.c +M src/lib-index/test-mail-index-sync-ext.c +M src/lib-index/test-mail-index-transaction-finish.c +M src/lib-index/test-mail-index-transaction-update.c +M src/lib-index/test-mail-transaction-log-append.c +M src/lib-index/test-mail-transaction-log-view.c +M src/lib-mail/test-istream-attachment.c +M src/lib-mail/test-istream-binary-converter.c +M src/lib-mail/test-istream-dot.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-istream-qp-decoder.c +M src/lib-mail/test-mail-html2text.c +M src/lib-mail/test-mbox-from.c +M src/lib-mail/test-message-address.c +M src/lib-mail/test-message-date.c +M src/lib-mail/test-message-decoder.c +M src/lib-mail/test-message-header-decode.c +M src/lib-mail/test-message-header-encode.c +M src/lib-mail/test-message-header-hash.c +M src/lib-mail/test-message-header-parser.c +M src/lib-mail/test-message-id.c +M src/lib-mail/test-message-parser.c +M src/lib-mail/test-message-part.c +M src/lib-mail/test-message-search.c +M src/lib-mail/test-message-snippet.c +M src/lib-mail/test-ostream-dot.c +M src/lib-mail/test-qp-decoder.c +M src/lib-mail/test-quoted-printable.c +M src/lib-mail/test-rfc2231-parser.c +M src/lib-mail/test-rfc822-parser.c +M src/lib-master/test-master-service-settings-cache.c +M src/lib-settings/test-settings-parser.c +M src/lib-storage/test-mail-search-args-imap.c +M src/lib-storage/test-mail-search-args-simplify.c +M src/lib-storage/test-mailbox-get.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c +M src/plugins/quota/test-quota-util.c - If mailbox wasn't yet in the dovecot.list.index, mailbox_list_index_status() - for it returns FALSE and doesn't initialize the status. In some situations - this may have caused a non-empty mailbox's vsize to be returned as 0. +2016-12-23 11:22:11 -0500 Timo Sirainen (440f9bf58) -M src/lib-storage/list/mailbox-list-index-status.c + lib-test: test_run*() - use const for test_functions[] array -2017-01-10 02:12:25 +0100 Stephan Bosch (372b2fab6) - lib-http: client: Make sure req->conn is only not NULL when that connection - holds a reference to that request. +M src/lib-test/test-common.c +M src/lib-test/test-common.h - This consolidates the management of req->conn to one place, thereby - preventing mishaps. It makes sure req->conn is always properly assigned, - making it more reliable. This fixes a problem that emerged in the - http-proxy. +2016-12-23 17:57:16 +0200 Timo Sirainen (b7324e421) -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-request.c + global: Use "static const" for all struct tests[] arrays -2017-01-19 02:16:06 +0100 Stephan Bosch (44ecba558) - lib-http: client: Keep connection reference throughout - http_client_connection_return_response(). +M src/auth/test-auth-cache.c +M src/lib-charset/test-charset.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dns/test-dns-util.c +M src/lib-fts/test-fts-filter.c +M src/lib-fts/test-fts-tokenizer.c +M src/lib-imap/test-imap-quote.c +M src/lib-imap/test-imap-utf7.c +M src/lib-index/test-mail-index-modseq.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-mail-html2text.c +M src/lib-mail/test-message-snippet.c +M src/lib-mail/test-rfc822-parser.c +M src/lib-settings/test-settings-parser.c +M src/lib-storage/test-mail-search-args-imap.c +M src/lib-storage/test-mail-search-args-simplify.c +M src/lib/test-hash-format.c +M src/lib/test-ioloop.c +M src/lib/test-istream-base64-decoder.c +M src/lib/test-istream-base64-encoder.c +M src/lib/test-json-parser.c +M src/lib/test-lib.c +M src/lib/test-malloc-overflow.c +M src/lib/test-net.c +M src/lib/test-numpack.c +M src/lib/test-seq-range-array.c +M src/lib/test-str-sanitize.c +M src/lib/test-strescape.c +M src/lib/test-strfuncs.c +M src/lib/test-time-util.c +M src/lib/test-utc-mktime.c +M src/lib/test-var-expand.c +M src/lib/test-wildcard-match.c +M src/plugins/pop3-migration/test-pop3-migration-plugin.c - Before, it was held in two intervals. Next commit requires this change, but - it also simplifies this function significantly. +2016-12-23 17:48:19 +0200 Timo Sirainen (b7a60785a) -M src/lib-http/http-client-connection.c + lib-test: test_run_named*() - use const for tests[] array -2017-01-17 19:49:39 +0200 Timo Sirainen (94c6000f8) - master: Remove unnecessary service listener start +M src/lib-test/test-common.c +M src/lib-test/test-common.h - The listening was already started later on in the same function. Also in - some cases it would have been started unnecessarily, like when service was - stopped or more processes were created immediately. +2016-12-23 15:38:54 +0200 Timo Sirainen (2c5c29394) -M src/master/service-monitor.c + *-login, imapc: Fix new lib-sasl API usage -2017-01-18 04:46:15 -0500 Josef 'Jeff' Sipek (875efb013) + Forgot to include these in a669d351502e15802b121e1a0bd83f27d1d95f01 - index: don't try to unlink in-memory cache file +M src/imap-login/imap-proxy.c +M src/lib-imap-client/imapc-connection.c +M src/pop3-login/pop3-proxy.c - Avoid these errors: +2016-12-19 15:31:50 +0200 Timo Sirainen (ce2312763) - Error: unlink((in-memory index).cache) failed: No such file or directory (in - mail-cache.c:29) + lib-index: Fix assert-crash if .log creation unexpectedly fails at the end -M src/lib-index/mail-cache.c + Pretty much the only reason for this to happen is if the index directory was + deleted while another process still had the index open. Even this doesn't + normally trigger this crash, because there are other checks earlier that + usually catch it. So it crashes only in some race conditions. -2017-01-17 20:34:51 +0200 Timo Sirainen (63bdb77c9) + Fixes: Error: rename(.../dovecot.index.log.newlock, .../dovecot.index.log) + failed: No such file or directory Panic: file mail-transaction-log-file.c: + line 105 (mail_transaction_log_file_free): assertion failed: (!file->locked) - doveadm direcor add: Fix checking number as hostname. +M src/lib-index/mail-transaction-log-file.c - 521c0460fe705f32ea6899c8b1f101043fe0898c was completely broken. +2016-12-20 13:40:17 +0200 Martti Rannanjärvi (405fc7c0f) -M src/doveadm/doveadm-director.c + stats: use o_stream_nsend in client-export -2017-01-17 20:03:40 +0200 Timo Sirainen (380bf2ab0) - doveconf: Don't read freed memory. +M src/stats/client-export.c - Giving -c parameter frees the returned orig_config_path. +2016-12-22 11:58:29 -0500 Timo Sirainen (d7ff3c153) -M src/config/doveconf.c + fs-randomfail: Fix failure handling for fs_read() -2017-01-17 15:22:44 +0200 Timo Sirainen (a9ed8ae48) - doveadm direcor add: Don't accept number as a valid hostname. +M src/lib-fs/fs-randomfail.c - This is usually a mistake. For example "doveadm director add -t host 100" - shouldn't be adding a new IP 100 (0.0.0.100) +2016-12-21 20:56:58 +0200 Timo Sirainen (044b0557e) -M src/doveadm/doveadm-director.c + lib-index: Fix checking if cache file becomes >4GB -2017-01-17 16:28:10 +0200 Timo Sirainen (ca39c2c22) - stats plugin: Fix /proc/self/io fd leak on plugin deinit +M src/lib-index/mail-cache.c - This could have been a problem with doveadm-server processes if they had - service_count>1, because doveadm unloads all plugins between commands. +2016-12-20 13:34:43 +0200 Martti Rannanjärvi (6d0e6c57c) -M src/plugins/stats/mail-stats-fill.c -M src/plugins/stats/mail-stats.h -M src/plugins/stats/stats-plugin.c + imap: use o_stream_nsend when not checking failure -2017-01-17 16:23:50 +0200 Timo Sirainen (9e0175249) - doveadm: Outgoing dsync TCP connections leaked socket +M src/imap/cmd-getmetadata.c +M src/imap/cmd-thread.c +M src/imap/imap-master-client.c - If doveadm-server was running with service_count>1, each dsync run leaked a - socket. +2016-12-20 10:03:40 +0200 Martti Rannanjärvi (ac63c3ce5) -M src/doveadm/doveadm-dsync.c + replication: ignore o_stream_send errors in doveadm-connection -2017-01-17 19:21:08 +0200 Timo Sirainen (f9f08e153) - lib-dict: Compiler warning fix +M src/replication/replicator/doveadm-connection.c +2016-12-22 11:53:06 -0500 Timo Sirainen (266fcf2ad) -M src/lib-dict/dict.h + lib-mail: message_binary_part_deserialize(): Return error if body line count + is too large -2017-01-16 09:37:05 +0200 Aki Tuomi (877ef4893) + The input was unsigned int, so output must also fit into unsigned int. - dict-sql: Fix flushing +M src/lib-mail/message-binary-part.c - Remove flushing from set, and add it to unset. Fixes signal 11 crash caused - by infinite recursion. +2016-12-22 10:48:27 -0500 Timo Sirainen (432947477) -M src/lib-dict/dict-sql.c + dovecot.service.in: Improve [service] examples -2017-01-16 16:58:31 +0200 Timo Sirainen (cba7c7fe9) + Move them inside [service] section so that simply uncommenting them works. + Also give a better example of how Environment might be used. - dict-file: Fix potential crash when doing other dict calls during iteration. +M dovecot.service.in - If file was refreshed, the hash table was cleared, which broke the existing - iterators. +2016-12-21 21:33:35 +0200 Timo Sirainen (1fa1180b9) -M src/lib-dict/dict-file.c + replication plugin: Error handling code cleanup -2017-01-16 17:12:41 +0200 Timo Sirainen (cc64a8273) + The old code happened to work in all cases, but it was more of an accident. - lib-dict: Add assert to make sure all iterators are deinitialized. +M src/plugins/replication/replication-plugin.c +2016-12-21 20:43:38 +0200 Timo Sirainen (a669d3515) -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c + lib-sasl: API change - use size_t type for input/output lengths -2017-01-16 16:57:21 +0200 Timo Sirainen (b43f7a505) + It's highly unlikely that the length is ever >4GB, but this avoids any + potential problems with integer truncation. - lib: Add asserts to make sure hash table isn't freed while it's frozen. +M src/lib-sasl/dsasl-client-private.h +M src/lib-sasl/dsasl-client.c +M src/lib-sasl/dsasl-client.h +M src/lib-sasl/mech-external.c +M src/lib-sasl/mech-login.c +M src/lib-sasl/mech-plain.c +2016-12-21 20:39:37 +0200 Timo Sirainen (dcb783533) -M src/lib/hash.c + lib-fts: Change fts_icu_*() to use ARRAY_TYPE(icu_utf16) for UTF16 input. -2017-01-16 23:55:17 +0200 Timo Sirainen (887bddc93) + This makes it clearer how the API is intended to be used. - fts-solr: Escape {} chars when sending queries +M src/lib-fts/fts-filter-normalizer-icu.c +M src/lib-fts/fts-icu.c +M src/lib-fts/fts-icu.h +M src/lib-fts/test-fts-icu.c - Fixes: java.lang.IllegalArgumentException: Invalid character found in the - request target. The valid characters are defined in RFC 7230 and RFC 3986 +2016-12-21 19:50:10 +0200 Timo Sirainen (00a15fe7c) - Based on patch by Michael Welsh Duggan + Fix compiling when compiler doesn't support typeof() -M src/plugins/fts-solr/fts-backend-solr-old.c -M src/plugins/fts-solr/fts-backend-solr.c -2017-01-17 01:37:25 +0100 Stephan Bosch (998e94a3b) +M src/lib-dns/test-dns-util.c +M src/plugins/dict-ldap/dict-ldap.c - lib-http: server: Do not generate a payload for a failure response for a - HEAD request. +2016-12-19 12:16:20 +0200 Aki Tuomi (261c0ffe7) + lib-index: Make sure buffer is not null before freeing -M src/lib-http/http-server-request.c + Fixes signal 11 crash under stress. -2017-01-17 01:36:10 +0100 Stephan Bosch (1ffb3caae) +M src/lib-index/mail-transaction-log-file.c - lib-http: server: Prevent sending response payload when it is not allowed by - the specification. +2016-12-18 22:54:11 +0200 Timo Sirainen (f59ff04ef) - For a HEAD request, the payload is omitted, but the associated headers are - generated. For the other cases, an assert failure is now triggered. + configure: Define __STDC_LIMIT_MACROS for CXXFLAGS -M src/lib-http/http-server-response.c + Fixes SIZE_MAX being undefined when building fts-lucene. -2017-01-03 17:21:33 +0200 Aki Tuomi (14eb551be) +M configure.ac - lib-storage: Add vsize extension to index +2016-12-18 13:20:39 +0200 Timo Sirainen (55cdf2ed5) - Keep virtual size in index, instead of cache when it's less than 2^32-1. - This helps when cache becomes corrupted, and goes away, we still have - virtual sizes for quota calculations. + master: Update assert to make sure optind != 0 -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h + Hopefully prevents Coverity warning about "doubleops[optind]" access being + uninitialized. -2017-01-15 19:56:32 +0200 Timo Sirainen (afdbd3214) +M src/master/main.c - lib-storage: Fix assert-crash on mailbox_copy/move() failure +2016-12-18 12:54:34 +0200 Timo Sirainen (b48648a49) - If mailbox_save_cancel() was being called outside mail_storage_copy() it - assert-crashed: + lib: Remove dead code from unit test - Panic: file mail-storage.c: line 2168 (mailbox_save_context_reset): - assertion failed: (ctx->copying_via_save) -M src/lib-storage/mail-storage.c +M src/lib/test-malloc-overflow.c -2016-05-20 13:53:01 +0300 Timo Sirainen (c7949e392) +2016-11-29 23:37:43 +0200 Timo Sirainen (ebe00087d) - lib: Minor panic message improvement. + lib: Allow only known %chars in printf_format_fix_noalloc() + Otherwise if some libc adds a new unsupported character, our %n check might + break. -M src/lib/ioloop-epoll.c +M src/lib/printf-format-fix.c -2017-01-14 16:11:37 +0200 Timo Sirainen (b1dc39e53) +2016-11-29 23:29:04 +0200 Timo Sirainen (4baf980b7) - lib-storage: If namespaces weren't successfully created, don't autoexpunge - at deinit. + lib: Fix %n detection in printf_format_fix_noalloc() + It's undefined how flags, precision or length modifiers are handled with %n, + so make sure we catch all of them to detect an unwanted %n. -M src/lib-storage/mail-user.c +M src/lib/printf-format-fix.c +M src/lib/test-printf-format-fix.c -2017-01-14 16:12:56 +0200 Timo Sirainen (23c8b1877) +2016-11-29 23:21:17 +0200 Timo Sirainen (51292e327) - lib-storage: Add struct mail_user.namespaces_created + lib: Optimize printf_format_fix_noalloc() - This makes it easier to determine in mail_namespaces_added hook if the - namespaces being added are the initial ones or later ones. + Using strchr() is faster than looping through the characters manually. Since + this function is being called a lot, it's worth optimizing. -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-user.h +M src/lib/printf-format-fix.c -2017-01-14 16:12:03 +0200 Timo Sirainen (fffd49ca0) +2016-12-17 20:03:46 +0100 Stephan Bosch (458479447) - lib-storage: Stop namespaces_added|created hooks immediately when user has - failed + lib-imap-client: Fixed boolean vs integer mixup in debug message format + argument. + Found with Clang -Wstrict-bool. -M src/lib-storage/mail-storage-hooks.c +M src/lib-imap-client/imapc-connection.c -2017-01-14 16:10:15 +0200 Timo Sirainen (5f6b6dcb6) +2016-12-16 23:38:58 +0100 Stephan Bosch (166fc8ba3) - doveadm dict get: Support printing multiple values. + lib-http: client: Added test for premature connection loss to + test-http-client-errors. -M src/doveadm/doveadm-dict.c +M src/lib-http/test-http-client-errors.c -2017-01-09 20:32:12 +0200 Timo Sirainen (a08f235fd) +2016-12-16 23:58:43 +0100 Stephan Bosch (fd54a8a6c) - dict-sql: Support multiple values for lookups + lib-http: client: Added test for normal connection backoff behavior to + test-http-client-errors. - The value's fields must be comma-separated without spaces, for example: - map { - value_field = field1,field2 - value_type = string,uint - ... +M src/lib-http/test-http-client-errors.c - Only the first field is used for INSERTs and UPDATEs. +2016-12-16 23:36:19 +0100 Stephan Bosch (f17ac27e5) -M src/lib-dict/dict-sql-settings.c -M src/lib-dict/dict-sql-settings.h -M src/lib-dict/dict-sql.c + lib-http: client: Treat connections that get disconnected prematurely as + connection failures. -2017-01-12 20:35:12 +0200 Timo Sirainen (f58c64087) + This means that the backoff time is increased when this happens. A premature + disconnection happens when the connection is disconnected before any data is + received from the server. - dict-client: Support multiple values for lookups +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h +2016-12-16 22:30:42 +0100 Stephan Bosch (bad9931ef) -M src/dict/dict-commands.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h + lib-http: client: Consolidated connection loss handling into a single + function. -2017-01-12 20:22:38 +0200 Timo Sirainen (b1305848b) - lib-dict: Add support for lookup to return multiple values +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h - Implements only the initial stubs to the drivers. +2016-12-16 22:00:47 +0100 Stephan Bosch (50188cf35) -M src/lib-dict/dict-client.c -M src/lib-dict/dict-sql.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/plugins/dict-ldap/dict-ldap.c + lib-http: client: Moved connection backoff timer management to separate + functions. -2017-01-14 16:54:34 +0200 Timo Sirainen (25d27047c) - dict-sql: Remove unnecessary "affected rows" tracking from dict_set() +M src/lib-http/http-client-peer.c - This was useful for dict_atomic_inc(), but not for dict_set(). +2016-12-16 21:41:29 +0100 Stephan Bosch (fc0b239ad) - Fixes assert-crash with Cassandra: Panic: file driver-cassandra.c: line 1350 - (driver_cassandra_update): assertion failed: (affected_rows == NULL) + lib-http: client: Prevent infinite event loop involving the request handler. -M src/lib-dict/dict-sql.c + Could happen when a backoff time is active. -2017-01-14 16:45:06 +0200 Timo Sirainen (bfd7b7ec4) +M src/lib-http/http-client-peer.c - dict-sql: Fix previous "merge sets" to flush at commit +2016-12-17 11:31:42 +0200 Timo Sirainen (637ea12c0) - The last dict_set() within transaction was being ignored. + master: PROCESS-STATUS output was duplicated many times -M src/lib-dict/dict-sql.c -2017-01-14 15:10:17 +0200 Timo Sirainen (327fa45da) +M src/master/master-client.c - lib-storage: Fix accessing the same "raw" mailbox multiple times in process. +2016-12-15 17:43:11 +0200 Timo Sirainen (b80e0097a) - If the same file was opened as the raw mailbox multiple times, the previous - mail_index was cached by mail-index-alloc-cache. Opening it the second time - already contained a mail in the index, so trying to add another one logged - an error: + imapc: Log server disconnection error only once. - Error: Log synchronization error at seq=1,offset=256 for (in-memory index): - Append with UID 1, but next_uid = 2 -M src/lib-storage/index/raw/raw-sync.c +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-storage.c -2017-01-13 20:39:42 +0200 Timo Sirainen (d708ff35e) +2016-12-15 17:45:06 +0200 Timo Sirainen (5c0d3b064) - imapc: Fix re-sending retryable commands after reconnect + imapc: Minor debug logging improvement -M src/lib-imap-client/imapc-client.c M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-connection.h -2017-01-13 10:10:00 +0200 Aki Tuomi (00fc96e99) +2016-12-15 17:36:39 +0200 Timo Sirainen (bc6b363c7) - lib-dict: Fix compability for 2.2 - - Fixes commit 595b94c8 compability with 2.2. + imapc: Don't retry a failed reconnection before 10 secs have passed -M src/lib-dict/dict-sql.c + This mainly avoids a lot of unnecessary connect attempts within a short time + period, for example if the caller attempts to perform some work for all the + mailboxes. -2017-01-12 16:20:40 +0200 Timo Sirainen (d5d8f7b95) +M src/lib-imap-client/imapc-connection.c - lib-storage: Allow namespaces_created hook to return failure via user error. +2016-12-15 17:31:18 +0200 Timo Sirainen (af577c113) + imapc: Fix infinite reconnect loop to remote server that is down -M src/lib-storage/mail-namespace.c + This happened only in some situations. Usually there would have bene some + command in the queue, which would cause the reconnect-check to fail. -2017-01-12 00:53:54 +0200 Timo Sirainen (d52d0f296) +M src/lib-imap-client/imapc-connection.c - lib-storage: Improve namespace error message - include separator char. +2016-12-17 10:55:01 +0200 Timo Sirainen (ad5ece2a0) - It wasn't always obvious what the character should have been when namespace - didn't have an explicitly configured separator. + lib: Compiler warning fix for 32bit systems -M src/lib-storage/mail-namespace.c -2017-01-11 19:43:30 +0200 Aki Tuomi (595b94c8d) +M src/lib/test-malloc-overflow.c - lib-dict-sql: Try merge sets to single update +2016-12-12 07:28:00 +0200 Timo Sirainen (e7d0bea63) - This attempts to put mergeable keys into same update instead of using - multiple SQL statements. + global: Make sure *_malloc() calculations won't cause integer overflows. -M src/lib-dict/dict-sql.c -2017-01-11 02:51:13 +0100 Stephan Bosch (01867a4f3) +M src/auth/auth-request-var-expand.c +M src/doveadm/doveadm-dump-index.c +M src/lib-imap/imap-utf7.c +M src/lib-index/mail-index-transaction-view.c +M src/lib-index/mail-index.c +M src/lib-master/master-login.c +M src/lib-program-client/program-client-local.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/mailbox-list.c +M src/lib/data-stack.c +M src/lib/hex-binary.c +M src/lib/str-find.c +M src/lib/strfuncs.c +M src/log/log-error-buffer.c +M src/plugins/acl/acl-cache.c +M src/plugins/acl/acl-cache.h +M src/pop3/pop3-client.h +M src/pop3/pop3-commands.c +M src/stats/mail-command.c +M src/stats/mail-domain.c +M src/stats/mail-ip.c +M src/stats/mail-session.c +M src/stats/mail-user.c - Updated copyright notices to include the year 2017. +2016-12-12 07:19:55 +0200 Timo Sirainen (2ac5f36aa) + global: Change string position/length from unsigned int to size_t -M doc/man/doveadm-acl.1.in -M doc/man/doveadm-altmove.1.in -M doc/man/doveadm-auth.1.in -M doc/man/doveadm-batch.1.in -M doc/man/doveadm-deduplicate.1.in -M doc/man/doveadm-director.1.in -M doc/man/doveadm-dump.1.in -M doc/man/doveadm-exec.1.in -M doc/man/doveadm-expunge.1.in -M doc/man/doveadm-fetch.1.in -M doc/man/doveadm-flags.1.in -M doc/man/doveadm-force-resync.1.in -M doc/man/doveadm-fs.1.in -M doc/man/doveadm-fts.1.in -M doc/man/doveadm-help.1.in -M doc/man/doveadm-import.1.in -M doc/man/doveadm-index.1.in -M doc/man/doveadm-instance.1.in -M doc/man/doveadm-kick.1.in -M doc/man/doveadm-log.1.in -M doc/man/doveadm-mailbox-cryptokey.1.in -M doc/man/doveadm-mailbox.1.in -M doc/man/doveadm-mount.1.in -M doc/man/doveadm-move.1.in -M doc/man/doveadm-penalty.1.in -M doc/man/doveadm-proxy.1.in -M doc/man/doveadm-purge.1.in -M doc/man/doveadm-pw.1.in -M doc/man/doveadm-quota.1.in -M doc/man/doveadm-replicator.1.in -M doc/man/doveadm-search-query.7 -M doc/man/doveadm-search.1.in -M doc/man/doveadm-stats.1.in -M doc/man/doveadm-sync.1.in -M doc/man/doveadm-user.1.in -M doc/man/doveadm-who.1.in -M doc/man/doveadm.1.in -M doc/man/doveconf.1.in -M doc/man/dovecot-lda.1.in -M doc/man/dovecot.1.in -M src/anvil/anvil-connection.c -M src/anvil/anvil-settings.c -M src/anvil/connect-limit.c -M src/anvil/main.c -M src/anvil/penalty.c -M src/anvil/test-penalty.c -M src/auth/auth-cache.c -M src/auth/auth-client-connection.c -M src/auth/auth-fields.c -M src/auth/auth-master-connection.c -M src/auth/auth-penalty.c -M src/auth/auth-policy.c -M src/auth/auth-postfix-connection.c -M src/auth/auth-request-handler.c -M src/auth/auth-request-stats.c -M src/auth/auth-request-var-expand.c -M src/auth/auth-request.c -M src/auth/auth-settings.c -M src/auth/auth-stats.c -M src/auth/auth-token.c -M src/auth/auth-worker-client.c -M src/auth/auth-worker-server.c -M src/auth/auth.c -M src/auth/db-checkpassword.c -M src/auth/db-dict-cache-key.c -M src/auth/db-dict.c -M src/auth/db-ldap.c -M src/auth/db-passwd-file.c -M src/auth/db-sql.c -M src/auth/main.c -M src/auth/mech-anonymous.c -M src/auth/mech-cram-md5.c -M src/auth/mech-digest-md5.c -M src/auth/mech-dovecot-token.c -M src/auth/mech-external.c -M src/auth/mech-plain-common.c -M src/auth/mech-plain.c -M src/auth/mech.c -M src/auth/mycrypt.c -M src/auth/passdb-blocking.c -M src/auth/passdb-bsdauth.c -M src/auth/passdb-cache.c -M src/auth/passdb-checkpassword.c -M src/auth/passdb-dict.c -M src/auth/passdb-imap.c -M src/auth/passdb-ldap.c -M src/auth/passdb-passwd-file.c -M src/auth/passdb-passwd.c -M src/auth/passdb-shadow.c -M src/auth/passdb-sql.c -M src/auth/passdb-static.c -M src/auth/passdb-template.c -M src/auth/passdb-vpopmail.c -M src/auth/passdb.c -M src/auth/password-scheme-crypt.c -M src/auth/password-scheme-pbkdf2.c -M src/auth/password-scheme-rpa.c + Mainly to avoid truncating >4GB strings, which might potentially cause some + security holes. Normally there are other limits, which prevent such + excessive strings from being created in the first place. + + I'm sure this didn't find everything. Maybe everything could be found with + compiler warnings. -Wconversion kind of does it, but it gives way too many + unnecessary warnings. + + These were mainly found with: + + grep " = strlen" egrep "unsigned int.*(size|len)" + +M src/auth/auth-cache.c +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/auth/db-checkpassword.c +M src/auth/db-ldap.c +M src/auth/mech-gssapi.c +M src/auth/mech-scram-sha1.c M src/auth/password-scheme.c -M src/auth/test-auth-cache.c -M src/auth/test-auth-request-var-expand.c -M src/auth/test-db-dict.c -M src/auth/userdb-blocking.c -M src/auth/userdb-checkpassword.c M src/auth/userdb-dict.c -M src/auth/userdb-ldap.c -M src/auth/userdb-nss.c -M src/auth/userdb-passwd-file.c -M src/auth/userdb-passwd.c -M src/auth/userdb-prefetch.c -M src/auth/userdb-sql.c -M src/auth/userdb-static.c -M src/auth/userdb-template.c -M src/auth/userdb-vpopmail.c -M src/auth/userdb.c -M src/config/config-connection.c -M src/config/config-filter.c +M src/config/config-parser-private.h M src/config/config-parser.c M src/config/config-request.c -M src/config/config-settings.c M src/config/doveconf.c -M src/config/main.c M src/config/old-set-parser.c -M src/config/sysinfo-get.c -M src/dict/dict-commands.c -M src/dict/dict-connection.c -M src/dict/dict-settings.c -M src/dict/main.c -M src/director/auth-connection.c M src/director/director-connection.c -M src/director/director-host.c -M src/director/director-request.c -M src/director/director-settings.c -M src/director/director-test.c -M src/director/director.c -M src/director/doveadm-connection.c -M src/director/login-connection.c -M src/director/mail-host.c -M src/director/main.c -M src/director/notify-connection.c -M src/director/test-user-directory.c -M src/director/user-directory.c -M src/dns/dns-client-settings.c -M src/dns/dns-client.c -M src/doveadm/client-connection-http.c -M src/doveadm/client-connection.c M src/doveadm/doveadm-auth-server.c M src/doveadm/doveadm-auth.c -M src/doveadm/doveadm-dict.c -M src/doveadm/doveadm-director.c -M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-dump-dbox.c -M src/doveadm/doveadm-dump-dcrypt-file.c -M src/doveadm/doveadm-dump-dcrypt-key.c -M src/doveadm/doveadm-dump-index.c -M src/doveadm/doveadm-dump-log.c -M src/doveadm/doveadm-dump-mailboxlog.c -M src/doveadm/doveadm-dump-thread.c -M src/doveadm/doveadm-dump.c +M src/doveadm/doveadm-cmd.c M src/doveadm/doveadm-fs.c -M src/doveadm/doveadm-instance.c -M src/doveadm/doveadm-kick.c M src/doveadm/doveadm-log.c -M src/doveadm/doveadm-mail-altmove.c -M src/doveadm/doveadm-mail-batch.c -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-deduplicate.c -M src/doveadm/doveadm-mail-expunge.c -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-mail-flags.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail-index.c -M src/doveadm/doveadm-mail-iter.c -M src/doveadm/doveadm-mail-mailbox-metadata.c -M src/doveadm/doveadm-mail-mailbox-status.c M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail-save.c -M src/doveadm/doveadm-mail-search.c -M src/doveadm/doveadm-mail-server.c M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mailbox-list-iter.c -M src/doveadm/doveadm-master.c -M src/doveadm/doveadm-mount.c -M src/doveadm/doveadm-mutf7.c -M src/doveadm/doveadm-penalty.c -M src/doveadm/doveadm-print-flow.c -M src/doveadm/doveadm-print-formatted.c -M src/doveadm/doveadm-print-json.c -M src/doveadm/doveadm-print-pager.c -M src/doveadm/doveadm-print-server.c -M src/doveadm/doveadm-print-tab.c M src/doveadm/doveadm-print-table.c -M src/doveadm/doveadm-print.c -M src/doveadm/doveadm-proxy.c -M src/doveadm/doveadm-pw.c -M src/doveadm/doveadm-replicator.c -M src/doveadm/doveadm-settings.c M src/doveadm/doveadm-sis.c -M src/doveadm/doveadm-stats.c M src/doveadm/doveadm-util.c -M src/doveadm/doveadm-who.c -M src/doveadm/doveadm-zlib.c M src/doveadm/doveadm.c -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c M src/doveadm/dsync/dsync-brain-mailbox-tree.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-mails.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-deserializer.c -M src/doveadm/dsync/dsync-ibc-pipe.c -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.c -M src/doveadm/dsync/dsync-mail.c -M src/doveadm/dsync/dsync-mailbox-export.c -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-state.c -M src/doveadm/dsync/dsync-mailbox-tree-fill.c M src/doveadm/dsync/dsync-mailbox-tree-sync.c M src/doveadm/dsync/dsync-mailbox-tree.c -M src/doveadm/dsync/dsync-mailbox.c -M src/doveadm/dsync/dsync-serializer.c -M src/doveadm/dsync/dsync-transaction-log-scan.c -M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c -M src/doveadm/main.c -M src/doveadm/server-connection.c -M src/doveadm/test-doveadm-util.c -M src/imap-hibernate/imap-client.c -M src/imap-hibernate/imap-hibernate-client.c -M src/imap-hibernate/imap-hibernate-settings.c -M src/imap-hibernate/imap-master-connection.c -M src/imap-hibernate/main.c -M src/imap-login/client-authenticate.c -M src/imap-login/imap-login-client.c -M src/imap-login/imap-login-commands.c -M src/imap-login/imap-login-settings.c -M src/imap-login/imap-proxy.c -M src/imap-urlauth/imap-urlauth-client.c -M src/imap-urlauth/imap-urlauth-login-settings.c -M src/imap-urlauth/imap-urlauth-login.c -M src/imap-urlauth/imap-urlauth-settings.c -M src/imap-urlauth/imap-urlauth-worker-settings.c -M src/imap-urlauth/imap-urlauth-worker.c -M src/imap-urlauth/imap-urlauth.c -M src/imap/cmd-append.c -M src/imap/cmd-cancelupdate.c -M src/imap/cmd-capability.c -M src/imap/cmd-check.c -M src/imap/cmd-close.c -M src/imap/cmd-copy.c -M src/imap/cmd-create.c -M src/imap/cmd-delete.c -M src/imap/cmd-enable.c -M src/imap/cmd-examine.c -M src/imap/cmd-expunge.c -M src/imap/cmd-fetch.c -M src/imap/cmd-genurlauth.c -M src/imap/cmd-getmetadata.c -M src/imap/cmd-id.c -M src/imap/cmd-idle.c M src/imap/cmd-list.c -M src/imap/cmd-logout.c -M src/imap/cmd-lsub.c -M src/imap/cmd-namespace.c -M src/imap/cmd-noop.c M src/imap/cmd-notify.c M src/imap/cmd-rename.c -M src/imap/cmd-resetkey.c -M src/imap/cmd-search.c -M src/imap/cmd-select.c -M src/imap/cmd-setmetadata.c -M src/imap/cmd-sort.c -M src/imap/cmd-status.c -M src/imap/cmd-store.c M src/imap/cmd-subscribe.c -M src/imap/cmd-thread.c -M src/imap/cmd-unselect.c -M src/imap/cmd-unsubscribe.c -M src/imap/cmd-urlfetch.c -M src/imap/cmd-x-cancel.c -M src/imap/cmd-x-state.c -M src/imap/imap-client-hibernate.c -M src/imap/imap-client.c -M src/imap/imap-commands-util.c -M src/imap/imap-commands.c -M src/imap/imap-expunge.c -M src/imap/imap-fetch-body.c -M src/imap/imap-fetch.c M src/imap/imap-list.c -M src/imap/imap-master-client.c M src/imap/imap-notify.c -M src/imap/imap-search-args.c -M src/imap/imap-search.c -M src/imap/imap-settings.c -M src/imap/imap-state.c M src/imap/imap-status.c -M src/imap/imap-sync.c -M src/imap/mail-storage-callbacks.c M src/imap/main.c -M src/indexer/indexer-client.c -M src/indexer/indexer-queue.c -M src/indexer/indexer-settings.c -M src/indexer/indexer-worker-settings.c -M src/indexer/indexer-worker.c -M src/indexer/indexer.c -M src/indexer/master-connection.c -M src/indexer/worker-connection.c -M src/indexer/worker-pool.c -M src/ipc/client.c -M src/ipc/ipc-connection.c -M src/ipc/ipc-group.c -M src/ipc/ipc-settings.c M src/ipc/main.c -M src/lda/main.c -M src/lib-auth/auth-client-request.c -M src/lib-auth/auth-client.c -M src/lib-auth/auth-master.c -M src/lib-auth/auth-server-connection.c -M src/lib-charset/charset-iconv.c -M src/lib-charset/charset-utf8.c -M src/lib-charset/test-charset.c M src/lib-compression/compression.c -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c M src/lib-compression/ostream-bzlib.c -M src/lib-compression/ostream-lz4.c M src/lib-compression/ostream-lzma.c M src/lib-compression/ostream-zlib.c -M src/lib-compression/test-compression.c -M src/lib-dcrypt/dcrypt-gnutls.c -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c -M src/lib-dict-extra/dict-fs.c -M src/lib-dict-extra/dict-register.c -M src/lib-dict/dict-cdb.c -M src/lib-dict/dict-client.c M src/lib-dict/dict-db.c M src/lib-dict/dict-file.c -M src/lib-dict/dict-memcached-ascii.c M src/lib-dict/dict-memcached.c -M src/lib-dict/dict-redis.c M src/lib-dict/dict-sql-settings.c M src/lib-dict/dict-sql.c -M src/lib-dict/dict-transaction-memory.c -M src/lib-dict/dict.c -M src/lib-dict/test-dict.c -M src/lib-dns/dns-lookup.c -M src/lib-dns/dns-util.c -M src/lib-dns/test-dns-util.c -M src/lib-fs/fs-api.c -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-posix.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-common.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-test-async.c -M src/lib-fs/fs-test.c -M src/lib-fs/fs-wrapper.c -M src/lib-fs/istream-fs-file.c -M src/lib-fs/istream-fs-stats.c -M src/lib-fs/istream-metawrap.c -M src/lib-fs/ostream-cmp.c -M src/lib-fs/ostream-metawrap.c -M src/lib-fs/test-fs-metawrap.c -M src/lib-fts/fts-filter-common.c -M src/lib-fts/fts-filter-contractions.c +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-test.c M src/lib-fts/fts-filter-english-possessive.c -M src/lib-fts/fts-filter-lowercase.c -M src/lib-fts/fts-filter-normalizer-icu.c -M src/lib-fts/fts-filter-stemmer-snowball.c -M src/lib-fts/fts-filter-stopwords.c -M src/lib-fts/fts-filter.c M src/lib-fts/fts-icu.c -M src/lib-fts/fts-language.c -M src/lib-fts/fts-library.c M src/lib-fts/fts-tokenizer-address.c -M src/lib-fts/fts-tokenizer-common.c -M src/lib-fts/fts-tokenizer-generic.c -M src/lib-fts/fts-tokenizer.c -M src/lib-fts/test-fts-filter.c -M src/lib-fts/test-fts-icu.c -M src/lib-fts/test-fts-language.c M src/lib-fts/test-fts-tokenizer.c -M src/lib-http/http-auth.c -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-host.c -M src/lib-http/http-client-peer.c -M src/lib-http/http-client-queue.c M src/lib-http/http-client-request.c -M src/lib-http/http-client.c -M src/lib-http/http-date.c -M src/lib-http/http-header-parser.c -M src/lib-http/http-header.c -M src/lib-http/http-message-parser.c -M src/lib-http/http-parser.c -M src/lib-http/http-request-parser.c -M src/lib-http/http-request.c -M src/lib-http/http-response-parser.c -M src/lib-http/http-response.c -M src/lib-http/http-server-connection.c -M src/lib-http/http-server-request.c -M src/lib-http/http-server-response.c -M src/lib-http/http-server.c -M src/lib-http/http-transfer-chunked.c -M src/lib-http/http-url.c -M src/lib-http/test-http-auth.c -M src/lib-http/test-http-client-errors.c -M src/lib-http/test-http-client.c -M src/lib-http/test-http-date.c -M src/lib-http/test-http-header-parser.c -M src/lib-http/test-http-payload.c -M src/lib-http/test-http-request-parser.c -M src/lib-http/test-http-response-parser.c -M src/lib-http/test-http-server-errors.c -M src/lib-http/test-http-server.c -M src/lib-http/test-http-transfer.c -M src/lib-http/test-http-url.c -M src/lib-imap-client/imapc-client.c M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-msgmap.c -M src/lib-imap-storage/imap-metadata.c -M src/lib-imap-storage/imap-msgpart-url.c -M src/lib-imap-storage/imap-msgpart.c -M src/lib-imap-urlauth/imap-urlauth-backend.c -M src/lib-imap-urlauth/imap-urlauth-connection.c -M src/lib-imap-urlauth/imap-urlauth-fetch.c -M src/lib-imap-urlauth/imap-urlauth.c -M src/lib-imap/imap-arg.c -M src/lib-imap/imap-base-subject.c -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/imap-date.c -M src/lib-imap/imap-envelope.c -M src/lib-imap/imap-id.c -M src/lib-imap/imap-keepalive.c M src/lib-imap/imap-match.c M src/lib-imap/imap-parser.c M src/lib-imap/imap-quote.c -M src/lib-imap/imap-seqset.c -M src/lib-imap/imap-url.c M src/lib-imap/imap-utf7.c -M src/lib-imap/imap-util.c -M src/lib-imap/test-imap-bodystructure.c -M src/lib-imap/test-imap-match.c -M src/lib-imap/test-imap-parser.c -M src/lib-imap/test-imap-quote.c -M src/lib-imap/test-imap-url.c -M src/lib-imap/test-imap-utf7.c -M src/lib-imap/test-imap-util.c -M src/lib-index/mail-cache-compress.c -M src/lib-index/mail-cache-decisions.c -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache-lookup.c -M src/lib-index/mail-cache-sync-update.c -M src/lib-index/mail-cache-transaction.c +M src/lib-lda/lmtp-client.c +M src/lib-mail/istream-binary-converter.c +M src/lib-mail/message-decoder.c +M src/lib-mail/message-header-decode.c +M src/lib-mail/test-istream-attachment.c +M src/lib-mail/test-istream-dot.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-istream-qp-decoder.c +M src/lib-mail/test-mbox-from.c +M src/lib-mail/test-message-header-parser.c +M src/lib-master/master-login.c +M src/lib-master/master-service.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/cydir/cydir-sync.h +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/index/imapc/imapc-search.c +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort.c +M src/lib-storage/index/maildir/maildir-filename-flags.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/mbox/mbox-storage.c +M src/lib-storage/index/shared/shared-list.c +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/list/mailbox-list-maildir-iter.c +M src/lib-storage/list/mailbox-list-maildir.c +M src/lib-storage/list/mailbox-list-notify-tree.c +M src/lib-storage/list/mailbox-list-subscriptions.c +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-user.c +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-tree.c +M src/lib-storage/mailbox-uidvalidity.c +M src/lib/array.c +M src/lib/env-util.c +M src/lib/failures.c +M src/lib/istream-base64-encoder.c +M src/lib/json-parser.c +M src/lib/module-dir.c +M src/lib/net.c +M src/lib/ostream-file.c +M src/lib/printf-format-fix.c +M src/lib/printf-format-fix.h +M src/lib/str-find.c +M src/lib/str-sanitize.c +M src/lib/str.c +M src/lib/strfuncs.c +M src/lib/test-printf-format-fix.c +M src/lib/unlink-old-files.c +M src/lib/var-expand.c +M src/lmtp/commands.c +M src/log/log-error-buffer.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/login-proxy-state.c +M src/master/master-settings.c +M src/master/service-process.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/dict-ldap/dict-ldap.c +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-backend-solr.c +M src/plugins/fts-squat/squat-test.c +M src/plugins/fts/fts-api.c +M src/plugins/fts/fts-search-args.c +M src/plugins/imap-acl/imap-acl-plugin.c +M src/plugins/imap-stats/imap-stats-plugin.c +M src/plugins/mail-crypt/mail-crypt-pluginenv.c +M src/plugins/mail-crypt/mail-crypt-userenv.c +M src/plugins/quota/quota-dirsize.c +M src/replication/aggregator/replicator-connection.c + +2016-12-12 05:16:28 +0200 Timo Sirainen (19b9eb5ba) + + lib: Optimization - p_strconcat() doesn't need to allocate from data stack + + Various other parts of the code already rely on p_malloc() not overwriting + t_buffer_get()'ed data. p_strconcat() can do that as well. + +M src/lib/strfuncs.c + +2016-12-12 04:55:47 +0200 Timo Sirainen (7e90e9424) + + lib: *_new(): Use the new MALLOC_MULTIPLY() macro to avoid overflows + + Cast the sizeof() result to unsigned int, because it's definitely always + enough and in many cases this allows optimizing away the wrap-check. + +M src/lib/data-stack.h +M src/lib/mempool.h + +2016-12-12 04:53:02 +0200 Timo Sirainen (b716136fc) + + lib: Add MALLOC_MULTIPLY() and MALLOC_ADD() + + These can be used for calculating memory allocation sizes. If there's an + overflow, the macro panics. + +M src/lib/Makefile.am +M src/lib/lib.h +A src/lib/malloc-overflow.h +M src/lib/test-lib.inc +A src/lib/test-malloc-overflow.c + +2016-12-12 03:55:54 +0200 Timo Sirainen (618262376) + + lib: Remove t_buffer_*_type() + + The t_buffer_*() shouldn't normally be used anyway except in some low-level + string/buffer manipulation code, so there's not much point in trying to make + easier to use versions of them. + +M src/lib/data-stack.h +M src/lib/test-data-stack.c + +2016-12-12 03:48:49 +0200 Timo Sirainen (e8df5cfa6) + + master: Removed unused process_exec(extra_args) parameter + + Removes unnecessarily complicated code marked with @UNSAFE. + +M src/master/common.h +M src/master/main.c +M src/master/service-process.c + +2016-12-15 18:15:21 +0200 Timo Sirainen (fa780a18c) + + lib-storage: Make dovecot.list.index's filename configurable. + + This is useful when there are multiple namespaces pointing to the same mail + root directory. For example mdbox with lazy-expunge: + + namespace { + prefix = Expunged/ + location = mdbox:~/mdbox:MAILBOXDIR=expunged:LISTINDEX=expunged.list.index + .. + } + +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c +M src/lib-storage/mailbox-list.h + +2016-12-15 18:13:34 +0200 Timo Sirainen (33525312d) + + lib-storage: Deduplicate code into mailbox_list_settings_init_defaults() + + +M src/lib-storage/index/imapc/imapc-list.c +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c + +2016-12-16 18:52:23 +0200 Timo Sirainen (08b70fe1d) + + director: Fix crash when using director_flush_socket + + Broken accidentally when merging b44033e45e9f48f8a6e1ac5905234fec5de6d6cc + +M src/director/director.c + +2016-12-15 19:03:39 +0200 Timo Sirainen (6460420c3) + + director: Fix USER-KICK and USER-KICK-ALT forwarding + + The internal IPC command was prefixed, which caused the remote director to + reject the commands and disconnect: + + director(...): Command proxy: Unknown command proxy director(...): Remote + sent invalid protocol data recently, waiting 57 secs before allowing further + communication + +M src/director/director.c + +2016-12-15 19:02:56 +0200 Timo Sirainen (365b5a495) + + director: doveadm command handling was missing USER-KICK-ALT + + +M src/director/doveadm-connection.c + +2016-12-15 15:00:54 +0200 Timo Sirainen (41579643e) + + imap: Fix STORE UNCHANGEDSINCE to work with >32bit modseqs. + + +M src/imap/cmd-store.c + +2016-12-15 15:20:02 +0200 Timo Sirainen (abb5d20d3) + + lib-storage: Fix "*" in SEARCH seqset/uidset + + 4294967295 is used for "*", which matches the last existing message. Which + we don't know what it is at the time of search args simplification, so avoid + making any assumptions about it. + + It's a bit ugly that 4294967295 can't be used as a valid UID, but this + restriction has already existed since the beginning of Dovecot. A future + alternative might be to add MAIL_SEARCH_ARG_FLAG_SEQSET_WITH_STAR, but + that's a bit complicated change. + +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/test-mail-search-args-simplify.c + +2016-12-15 15:01:47 +0200 Timo Sirainen (f2c3abe80) + + imapc: Don't allow "*" in SEARCH replies + + Doesn't fix anything, but makes the parsing a bit more correct. + +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-search.c + +2016-12-14 19:36:43 +0200 Timo Sirainen (78b806afb) + + fts-squat: Use file_cache_new_path() for squat indexes + + +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c + +2016-12-14 19:35:29 +0200 Timo Sirainen (17018da24) + + lib-index: Use file_cache_new_path() for dovecot.index.cache + + M src/lib-index/mail-cache.c -M src/lib-index/mail-index-alloc-cache.c -M src/lib-index/mail-index-dummy-view.c -M src/lib-index/mail-index-fsck.c -M src/lib-index/mail-index-lock.c -M src/lib-index/mail-index-map-hdr.c -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-map.c -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-strmap.c -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-keywords.c -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index-transaction-export.c -M src/lib-index/mail-index-transaction-finish.c -M src/lib-index/mail-index-transaction-sort-appends.c -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/mail-index-transaction-view.c -M src/lib-index/mail-index-transaction.c -M src/lib-index/mail-index-util.c -M src/lib-index/mail-index-view-sync.c -M src/lib-index/mail-index-view.c -M src/lib-index/mail-index-write.c -M src/lib-index/mail-index.c -M src/lib-index/mail-transaction-log-append.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/mail-transaction-log.c -M src/lib-index/mailbox-log.c -M src/lib-index/test-mail-index-map.c -M src/lib-index/test-mail-index-modseq.c -M src/lib-index/test-mail-index-sync-ext.c -M src/lib-index/test-mail-index-transaction-finish.c -M src/lib-index/test-mail-index-transaction-update.c -M src/lib-index/test-mail-transaction-log-append.c -M src/lib-index/test-mail-transaction-log-view.c -M src/lib-lda/duplicate.c -M src/lib-lda/lda-settings.c -M src/lib-lda/mail-deliver.c -M src/lib-lda/mail-send.c -M src/lib-lda/smtp-client.c -M src/lib-ldap/ldap-client.c -M src/lib-ldap/ldap-compare.c -M src/lib-ldap/ldap-connection-pool.c -M src/lib-ldap/ldap-connection.c -M src/lib-ldap/ldap-entry.c -M src/lib-ldap/ldap-iterator.c -M src/lib-ldap/ldap-search.c -M src/lib-mail/istream-attachment-connector.c -M src/lib-mail/istream-attachment-extractor.c -M src/lib-mail/istream-binary-converter.c -M src/lib-mail/istream-dot.c -M src/lib-mail/istream-header-filter.c -M src/lib-mail/istream-nonuls.c -M src/lib-mail/istream-qp-decoder.c -M src/lib-mail/mail-html2text.c -M src/lib-mail/mail-user-hash.c -M src/lib-mail/mbox-from.c -M src/lib-mail/message-address.c -M src/lib-mail/message-binary-part.c -M src/lib-mail/message-date.c -M src/lib-mail/message-decoder.c -M src/lib-mail/message-header-decode.c -M src/lib-mail/message-header-encode.c -M src/lib-mail/message-header-hash.c -M src/lib-mail/message-header-parser.c -M src/lib-mail/message-id.c -M src/lib-mail/message-parser.c -M src/lib-mail/message-part-serialize.c -M src/lib-mail/message-part.c -M src/lib-mail/message-search.c -M src/lib-mail/message-size.c -M src/lib-mail/message-snippet.c -M src/lib-mail/ostream-dot.c -M src/lib-mail/qp-decoder.c -M src/lib-mail/quoted-printable.c -M src/lib-mail/rfc2231-parser.c -M src/lib-mail/rfc822-parser.c -M src/lib-mail/test-istream-attachment.c -M src/lib-mail/test-istream-binary-converter.c -M src/lib-mail/test-istream-dot.c -M src/lib-mail/test-istream-header-filter.c -M src/lib-mail/test-istream-qp-decoder.c -M src/lib-mail/test-mail-html2text.c -M src/lib-mail/test-mbox-from.c -M src/lib-mail/test-message-address.c -M src/lib-mail/test-message-date.c -M src/lib-mail/test-message-decoder.c -M src/lib-mail/test-message-header-decode.c -M src/lib-mail/test-message-header-encode.c -M src/lib-mail/test-message-header-hash.c -M src/lib-mail/test-message-header-parser.c -M src/lib-mail/test-message-id.c -M src/lib-mail/test-message-parser.c -M src/lib-mail/test-message-part.c -M src/lib-mail/test-message-search.c -M src/lib-mail/test-message-snippet.c -M src/lib-mail/test-ostream-dot.c -M src/lib-mail/test-qp-decoder.c -M src/lib-mail/test-quoted-printable.c -M src/lib-mail/test-rfc2231-parser.c -M src/lib-mail/test-rfc822-parser.c -M src/lib-master/anvil-client.c -M src/lib-master/ipc-client.c -M src/lib-master/ipc-server.c -M src/lib-master/master-auth.c -M src/lib-master/master-instance.c -M src/lib-master/master-login-auth.c -M src/lib-master/master-login.c -M src/lib-master/master-service-haproxy.c -M src/lib-master/master-service-settings-cache.c -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/master-service-ssl.c -M src/lib-master/master-service.c -M src/lib-master/mountpoint-list.c -M src/lib-master/syslog-util.c -M src/lib-master/test-master-service-settings-cache.c -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client-remote.c -M src/lib-program-client/program-client.c -M src/lib-program-client/program-client.h -M src/lib-program-client/test-program-client-local.c -M src/lib-program-client/test-program-client-remote.c -M src/lib-sasl/dsasl-client.c -M src/lib-sasl/mech-external.c -M src/lib-sasl/mech-login.c -M src/lib-sasl/mech-plain.c -M src/lib-settings/settings-parser.c -M src/lib-settings/settings.c -M src/lib-settings/test-settings-parser.c -M src/lib-smtp/lmtp-client.c -M src/lib-sql/driver-cassandra.c + +2016-12-14 19:35:05 +0200 Timo Sirainen (c18dcef4d) + + lib: Add file_cache_new_path() to include path in error messages. + + +M src/lib/file-cache.c +M src/lib/file-cache.h + +2016-12-14 23:20:12 +0200 Aki Tuomi (dc5168232) + + driver-mysql: Do not hex-encode again + + Use correct syntax to provide data to mysql in hex format, without recoding + it in hex format again. + M src/lib-sql/driver-mysql.c -M src/lib-sql/driver-pgsql.c -M src/lib-sql/driver-sqlite.c -M src/lib-sql/driver-sqlpool.c -M src/lib-sql/sql-api.c -M src/lib-sql/sql-db-cache.c -M src/lib-ssl-iostream/dovecot-openssl-common.c -M src/lib-ssl-iostream/iostream-openssl-common.c -M src/lib-ssl-iostream/iostream-openssl-context.c -M src/lib-ssl-iostream/iostream-openssl-params.c + +2016-12-13 16:04:53 +0200 Timo Sirainen (9a8217a72) + + lib-storage: Fix crash in obox's dsync-merge + + +M src/lib-storage/list/mailbox-list-index-backend.c + +2016-12-14 19:03:02 +0200 Timo Sirainen (9c77606ae) + + auth: Don't log errors when cache_key expansion finds unknown %variables + + +M src/auth/auth-cache.c + +2016-12-09 16:01:20 +0200 Aki Tuomi (05546ccd3) + + mail-crypt: Treat empty values correctly + + If mail_crypt_curve or mail_crypt_save_version is left empty, disable the + plugin. Don't error out. + +M src/plugins/mail-crypt/mail-crypt-plugin.c + +2016-12-14 17:39:04 +0200 Aki Tuomi (beec8b0a6) + + mail-crypt: Skip tests if dcrypt cannot be initialized + + Avoids breaking tests on system without working ECC keys. + +M src/plugins/mail-crypt/test-mail-global-key.c +M src/plugins/mail-crypt/test-mail-key.c + +2016-12-14 11:42:56 +0200 Aki Tuomi (5afa9b93d) + + auth-policy: Allow unsupported attributes in response + + Do not choke if we receive unsupported attributes in response. This allows + better interoperability with different systems that are getting signals from + auth policy server that are not (yet) supported by dovecot. + +M src/auth/auth-policy.c + +2016-12-14 10:32:44 +0200 Aki Tuomi (182093c9a) + + sha3: Fix typo in ifdef + + The code was supposed to be used with big endian machines. + + Reported by than@redhat.com + +M src/lib/sha3.c + +2016-12-12 15:21:13 +0200 Timo Sirainen (957d34edb) + + lib-test: Change test_fatal_func_t to take unsigned int stage as parameter. + + It could never be -1, so this makes it clearer. It also removes annoying + casts when comparing stage to e.g. N_ELEMENTS(). + +M src/lib-test/test-common.c +M src/lib-test/test-common.h +M src/lib/test-array.c +M src/lib/test-data-stack.c +M src/lib/test-mempool-alloconly.c +M src/lib/test-printf-format-fix.c + +2016-12-12 15:17:23 +0200 Timo Sirainen (bc15567c9) + + lib-test: test_run_with_fatals() now takes a const array + + +M src/lib-test/test-common.c +M src/lib-test/test-common.h + +2016-12-12 15:16:34 +0200 Timo Sirainen (76d4cc8e7) + + lib-test: Introduce test_fatal_func_t as typedef and comment how it works. + + +M src/lib-test/test-common.c +M src/lib-test/test-common.h + +2016-12-13 20:03:41 +0200 Martti Rannanjärvi (ec8e55a73) + + auth: silence var_expand_with_funcs in db-ldap + + This needs to be silenced since it's logging errors of variable expansions + that are not meant to be successful. The function is used here just for + filling the attr_names array in ldap_field_find_context and the resulting + string is not used. + +M src/auth/db-ldap.c + +2016-12-12 09:41:02 +0200 Aki Tuomi (b0e6a65a4) + + doveadm-mail: Set exit code to EX_TEMPFAIL on timeout + + When running `doveadm save` command on proxy/director and the remote command + execution times out, exit code must be set to EX_TEMPFAIL. + + Fixes Panic: file doveadm-mail.c: line 405 (doveadm_mail_next_user): + assertion failed: (ctx->exit_code != 0) + +M src/doveadm/doveadm-mail.c + +2016-12-12 09:39:34 +0200 Aki Tuomi (60bea13e1) + + doveadm-save: Set exit code to EX_TEMPFAIL on open error + + Prevents potential crash on doveadm_mail_next_user + +M src/doveadm/doveadm-mail-save.c + +2016-12-14 02:51:54 +0100 Stephan Bosch (f549b400d) + + lib-imap: imap-bodystructure: Prevent writing erroneous whitespace between + items in an envelope address list. + + Both imap_bodystructure_write() and imap_body_parse_from_bodystructure() + produced such invalid output. This caused an RFC 3501 violation in IMAP + FETCH BODY and BODYSTRUCTURE responses. + + Test suite is amended to test this situation. + +M src/lib-imap/imap-bodystructure.c +M src/lib-imap/test-imap-bodystructure.c + +2016-12-13 18:31:41 +0200 Timo Sirainen (d0ed540d8) + + lib-index: Add mail_index_revert_changes() + + This can be used to revert changes done in a transaction to the specified + existing mail. + +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/mail-index.h + +2016-12-14 10:23:17 +0200 Aki Tuomi (e41e5d545) + + mail-crypt: Ensure array is created before accessing it + + Fixes segmentation fault on fs-crypt when keys are not configured. + +M src/plugins/mail-crypt/mail-crypt-global-key.c +M src/plugins/mail-crypt/test-mail-global-key.c + +2016-12-14 12:46:50 +0200 Aki Tuomi (5898bb384) + + doveadm-director: Show tag field from response + + Fix off-by-one in doveadm director dump + +M src/doveadm/doveadm-director.c + +2016-12-13 14:51:20 +0200 Timo Sirainen (02c28668f) + + acl: Don't set acl_defaults_from_inbox=yes as default after all. + + Reverts b56d462fff46511b7efa0ccf254ba93d72322920 and removes the FIXME. Some + people might actually want to give someone else access to their INBOX but + not to all the other mailboxes. We should make it possible to use the + "" mailbox name as the default ACL instead. + +M src/plugins/acl/acl-backend.c + +2016-12-12 15:14:52 +0200 Aki Tuomi (f153764d4) + + imap: Fix assert when waiting for input on SEARCH/SORT + + Set cmd->state to CLIENT_COMMAND_STATE_WAIT_EXTERNAL because we are not + expecting input or output. + + Fixes Panic: file imap-client.c: line 854 (client_check_command_hangs): + assertion failed: (client->io != NULL || (client->output_cmd_lock != NULL && + client->output_cmd_lock != client->input_lock)) + +M src/imap/imap-search.c + +2016-12-12 12:37:34 +0200 Timo Sirainen (69a9934b5) + + dsync: Fix .dovecot-sync.lock timeout checking + + Whenever the lock file was recreated, the lock timeout was reset. Switched + to using file_create_locked(), which already solves this problem and has + compatible locking. + +M src/doveadm/dsync/dsync-brain.c + +2016-12-12 12:53:36 +0200 Timo Sirainen (0eb3485b4) + + dsync: Improve process title during initialization + + If something is hanging, this should make it clear what exactly it is. + +M src/doveadm/doveadm-dsync.c +M src/doveadm/dsync/dsync-brain.c + +2016-12-12 12:42:53 +0200 Timo Sirainen (6af4e592a) + + doveadm-server: Show UNIX socket connections as in process title + + Earlier they were shown as empty string. + +M src/doveadm/client-connection.c + +2016-12-12 12:43:47 +0200 Timo Sirainen (6c40413c6) + + doveadm: Add global doveadm_verbose_proctitle setting. + + This previously existed only for doveadm-server, but adding it to doveadm + CLI makes it easier to do process title updates for it as well. + +M src/doveadm/doveadm.c + +2016-12-12 12:51:42 +0200 Timo Sirainen (530b5909a) + + doveadm: When connecting to doveadm-server via TCP, use 30s timeout + + Should be enough, and better than the kernel's default, which might be a lot + more. + +M src/doveadm/doveadm-util.c + +2016-12-12 10:40:20 +0200 Aki Tuomi (271b8142d) + + lib-storage: Do not try to recover missing list index + + Fixes Panic: file mailbox-list-index.c: line 342 + (mailbox_list_index_parse_records): assertion failed: (node != NULL) + +M src/lib-storage/list/mailbox-list-index.c + +2016-12-05 15:17:30 +0000 Paul Howarth (b40536028) + + configure: Fix some implicit function declarations + + Some configure tests fail unexpectedly if the compiler flag + -Werror=implicit-function-declarations is enabled, which can result in the + wrong implementations being used. + + This compiler flag is now enabled by default in Fedora Rawhide: + https://fedoraproject.org/wiki/Changes/Fedora26CFlags + + is needed for exit() + is needed for strcpy() + +M m4/mmap_write.m4 +M m4/size_t_signed.m4 +M m4/time_t_signed.m4 +M m4/vararg.m4 + +2016-12-07 14:23:12 +0100 manuel (e823661ef) + + openssl: Clear error queue after an incomplete SSL_shutdown + + If the SSL_shutdown-call fails (e.g. because the underlaying socket has + already been closed) OpenSSL puts the corresponding error into the queue. We + don't care about details so we need to clear the queue. + + Otherwise the error will be pulled while error checking the next OpenSSL + call of an unrelated connection. + M src/lib-ssl-iostream/iostream-openssl.c -M src/lib-ssl-iostream/iostream-ssl.c -M src/lib-ssl-iostream/istream-openssl.c -M src/lib-ssl-iostream/ostream-openssl.c -M src/lib-stats/stats-connection.c -M src/lib-stats/stats-parser.c -M src/lib-stats/stats.c -M src/lib-storage/fail-mail-storage.c -M src/lib-storage/fail-mail.c -M src/lib-storage/fail-mailbox.c -M src/lib-storage/index/cydir/cydir-mail.c -M src/lib-storage/index/cydir/cydir-save.c -M src/lib-storage/index/cydir/cydir-storage.c -M src/lib-storage/index/cydir/cydir-sync.c -M src/lib-storage/index/dbox-common/dbox-attachment.c -M src/lib-storage/index/dbox-common/dbox-file-fix.c -M src/lib-storage/index/dbox-common/dbox-file.c -M src/lib-storage/index/dbox-common/dbox-mail.c -M src/lib-storage/index/dbox-common/dbox-save.c -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c -M src/lib-storage/index/dbox-multi/mdbox-file.c -M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/login-common/ssl-proxy-openssl.c + +2016-12-09 15:06:05 +0200 Timo Sirainen (ee22a48c8) + + imapc: Don't send NOOP immediately after SELECT + + NOOP is normally used by mailbox syncing to check if there are any changes + done by other concurrent IMAP sessions. But doing it immediately after + SELECT is unnecessary, because nothing could have changed. + +M src/lib-storage/index/imapc/imapc-sync.c + +2016-12-09 11:11:11 +0000 Timo Sirainen (b6188d7d6) + + config: Avoid excessive data stack usage when matching local_name + + Moved config_filter_match_local_name() to its own function to make adding + the data stack frame easier. + + Based on patch by J. Nick Koston + +M src/config/config-filter.c + +2016-12-09 09:57:57 +0100 Stephan Bosch (5ee3c7784) + + doveadm-server: http: Fixed temp_path_prefix for iostream-temp. + + The temp_path_prefix was "/tmp", which is extended to + "/tmp.." by safe_mkstemp. + + Obviously, mortal users cannot create a file like that, causing this error: + doveadm: Error: safe_mkstemp(/tmp) failed: Permission denied + + The temp_path_prefix should have been "/tmp/doveadm.", as it is elsewhere as + well. + +M src/doveadm/client-connection-http.c + +2016-12-08 13:01:48 +0200 Martti Rannanjärvi (9983cbb4c) + + lib: add t_strfgmtime and t_strftime + + +M src/lib/test-time-util.c +M src/lib/time-util.c +M src/lib/time-util.h + +2016-12-08 19:37:30 +0200 Timo Sirainen (f7bd22354) + + lib: Improve seq_range_array_invert() unit tests + + Try all possible combinations for seq=0..7 and seq=4294967288..4294967295 + and make sure they're inverted correctly. + +M src/lib/test-seq-range-array.c + +2016-12-07 10:19:02 +0200 Aki Tuomi (2aee623fc) + + lib-storage: Add test for inversion of n->max + + In mail-search-simplify-args, ensure that ALL NOT UID 3:* becomes UID 1:2 + +M src/lib-storage/test-mail-search-args-simplify.c + +2016-12-06 11:50:13 +0200 Aki Tuomi (9432496e6) + + lib-storage: Fix typo in function name + + +M src/lib-storage/mail-search-args-simplify.c + +2016-12-08 18:07:12 +0200 Timo Sirainen (8927ce341) + + lib: Comment seq_range_array_invert() that its values must be within + min_seq..max_seq + + +M src/lib/seq-range-array.h + +2016-12-08 17:50:46 +0200 Timo Sirainen (369764cc0) + + lib: Fix seq_range_array_invert() when input contains 2^32-1 + + This caused next_min_seq to be wrapped to 0, which was handled wrong later + on. + + Fixes: Panic: file mail-index-map.c: line 549 + (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0) + +M src/lib/seq-range-array.c +M src/lib/test-seq-range-array.c + +2016-12-08 09:23:52 +0900 Timo Sirainen (97745d12b) + + configure: Moved pandoc check to m4/dovecot.m4 + + +M configure.ac +M m4/dovecot.m4 + +2016-12-07 00:14:08 +0200 Timo Sirainen (b8eb3211a) + + cassandra: Treat "Request timed out" also as + SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN + + CASS_ERROR_SERVER_WRITE_TIMEOUT is "Write timeout" as reported by Cassandra + server, while CASS_ERROR_LIB_REQUEST_TIMED_OUT is timeout as reported by the + Cassandra library. + +M src/lib-sql/driver-cassandra.c + +2016-12-05 09:53:06 +0000 Paul Howarth (b363b9936) + + configure: Fix HAVE_MYSQL_SSL_CIPHER check + + +M m4/want_mysql.m4 + +2016-12-06 18:14:31 +0200 Phil Carmody (0c75bec6f) + + plugins: mail-crypt - fix static analysis pedantry + + Clang cannot see that ret is -1, 0, or 1 upon assigment, and therefore + -1 or 0 upon entry into the if block. Therefore it considers ret==0 not to + be a tautology if ret!=-1, and thus falsifiable. It concludes that bad + things can later happen. + + The easiest way to persuade it otherwise and make it clear to a human that + things are sane is to make the first error check to be for any negative ret + value, which forces the else path to explicitly imply ret==0, which means + that clause can also be removed. Just removing the ret==0 doesn't make it so + clear to the human that there's no third case. + + The final change is simply to mimic the ret==-1 to ret<0 change earlier. + + clang's error message: + + doveadm-mail-crypt.c:290:14: error: variable 'pubid' is used uninitialized + whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] + } else if (ret == 0 && + ^~~~~~~~ doveadm-mail-crypt.c:304:35: note: uninitialized use + occurs here + res->id = p_strdup(_ctx->pool, pubid); + ^~~~~ doveadm-mail-crypt.c:290:14: note: + remove the '&&' if its condition is always true + } else if (ret == 0 && + ^~~~~~~~~~~ + + Signed-off-by: Phil Carmody + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2016-12-05 17:29:08 +0200 Phil Carmody (dc38a5b10) + + lib/macros.h - protect old compilers from use of modern features + + no_sanitize(integer) is not in 3.5 (debian stable's version), but is + documented in 3.9. Exactly when it appeared isn't immediately obvious. + + Signed-off-by: Phil Carmody + +M src/lib/macros.h + +2016-12-04 03:45:54 +0200 Timo Sirainen (18535eaa6) + + configure: Fix building without OpenSSL + + AM_CONDITIONAL() needs to be part of the code path that is always run, or it + fails with: + + configure: error: conditional "SSL_VERSION_GE_102" was never defined. + +M m4/ssl.m4 + +2016-12-03 20:48:30 +0100 Stephan Bosch (db40a9dd9) + + dsync: Fixed boolean expression in dsync_mailbox_import_deinit(). + + Found with Clang -Wstrict-bool. + +M src/doveadm/dsync/dsync-mailbox-import.c + +2016-12-02 22:42:24 +0200 Timo Sirainen (b1533bd0d) + + dsync: Fix log format string broken by earlier change + + +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c + +2016-12-01 02:29:44 +0200 Timo Sirainen (df8046c9a) + + lib-storage: Fix simplifying sequence sets and UID sets. + + They were being handled completely wrong. The unit tests testing them were + also completely wrong. + +M src/lib-storage/mail-search-args-simplify.c +M src/lib-storage/test-mail-search-args-simplify.c + +2016-12-01 02:26:08 +0200 Timo Sirainen (c8bac7666) + + lib: seq_range_array_*(): Fix seq2=2^32-1 handling + + Adding/merging it when it already existed added duplicated seq_range. + +M src/lib/seq-range-array.c +M src/lib/test-seq-range-array.c + +2016-12-01 00:56:11 +0200 Timo Sirainen (44e07ea4d) + + lib-storage: Return vsize=0 from mailbox list index for empty mailboxes. + + If it's known that the mailbox has no mails, there's no reason to open the + mailbox to see that its size is 0. + +M src/lib-storage/list/mailbox-list-index-status.c + +2016-11-30 15:59:01 +0200 Timo Sirainen (d640b628f) + + dict-client: Don't timeout lookups without waiting 1sec in dict ioloop. + + What could have happened was: + + - dict-client sends a request to dict-server + - dict-client process starts doing something else + - dict-server answers + - dict-client process continues doing something else for over 30 seconds, + not reading the dict-server answer + - dict-client process gets back to dict ioloop, which runs the timeout + before checking if there is anything available for reading. + + Now we'll wait for 1 second in the last dict ioloop before assuming that + there's a timeout. + +M src/lib-dict/dict-client.c + +2016-12-02 22:29:31 +0200 Timo Sirainen (cabf98de0) + + dsync: Add mailbox names as well as GUIDs to log messages. + + +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c + +2016-12-01 19:06:10 +0200 Timo Sirainen (4f7951e71) + + dsync: When logging "Mailbox changed caused a desync", log also the reason. + + The reason is usually somewhere in the debug logs, but it's difficult to + find from there. + +M src/doveadm/doveadm-dsync.c +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-mails.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-brain.h +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-import.h + +2016-12-01 01:38:02 -0600 J. Nick Koston (fb13dfaa9) + + config: Match multiple names in local_name + + This can significantly reduce memory usage when using a UCC certificate with + multiple names by only loading the certificate and key once. + +M src/config/config-filter.c + +2016-11-24 04:06:22 +0200 Timo Sirainen (2ec4ab6f5) + + quota: Don't skip quota checks when moving mails between different quota + roots. + + +M src/plugins/quota/quota-storage.c + +2016-11-24 20:40:15 +0200 Timo Sirainen (d0d37a769) + + lib-storage: Add struct mail_save_context.copy_src_mail + + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2016-11-30 02:17:12 +0200 Timo Sirainen (0ad3dea8c) + + man: Update doveadm director flush description + + +M doc/man/doveadm-director.1.in + +2016-11-30 12:34:45 +0200 Timo Sirainen (0bd01b003) + + lib-storage: If mailbox_create() fails, don't leave box in partially opened + state. + + For example with sdbox it may have opened the indexes, but not set mailbox's + GUID. A following MAILBOX_METADATA_GUID would then assert-crash because GUID + is empty. + +M src/lib-storage/mail-storage.c + +2016-11-30 00:28:08 +0200 Aki Tuomi (ceb2c6d91) + + mail-crypt: Remove dead assigment + + +M src/plugins/mail-crypt/mail-crypt-key.c + +2016-11-29 23:19:37 +0200 Aki Tuomi (a62b4fb5f) + + lib: Add test for hmac helper + + +M src/lib/test-hmac.c + +2016-11-29 23:18:56 +0200 Aki Tuomi (ffe51a196) + + lib: Add hmac helpers + + These run hmac for given data with given parameters and returns stack + allocated buffer. They are helpful when doing lots of HMACs, such as the + AWS4 signing protocol. + +M src/lib/hmac.c +M src/lib/hmac.h + +2016-11-29 15:20:26 +0200 Martti Rannanjärvi (134b5022c) + + lib: add tests for HMAC-SHA256 from RFC 4231 + + +M src/lib/Makefile.am +A src/lib/test-hmac.c +M src/lib/test-lib.inc + +2016-11-28 23:05:16 +0200 Aki Tuomi (156e2ce64) + + mail-crypt: Do not attempt to cache keys on failure + + +M src/plugins/mail-crypt/mail-crypt-key.c + +2016-11-29 10:57:49 +0200 Aki Tuomi (be569425d) + + autogen: Use HTTPS for wiki + + +M autogen.sh + +2016-11-28 15:20:01 +0200 Aki Tuomi (2223b7a44) + + lib-dcrypt: Add error handling for dcrypt_key_id_private + + +M src/lib-dcrypt/istream-decrypt.c + +2016-11-28 15:17:55 +0200 Aki Tuomi (bf2d54df4) + + mail-crypt: Add error handling for mailbox_open in tests + + +M src/plugins/mail-crypt/test-mail-key.c + +2016-11-28 15:15:21 +0200 Aki Tuomi (7a8b59bce) + + doveadm-mail-crypt: Skip existing keys properly + + When generating new keypairs, handle existing keys correctly when skipping + them. + +M src/plugins/mail-crypt/doveadm-mail-crypt.c + +2016-11-28 14:52:50 +0200 Aki Tuomi (179e0558e) + + mail-crypt: Do not attempt to cache freed keypair + + +M src/plugins/mail-crypt/mail-crypt-key.c + +2016-11-28 14:51:19 +0200 Aki Tuomi (a027af9ac) + + mail-crypt-acl: Use mailbox_get_last_error instead of error + + +M src/plugins/mail-crypt/mail-crypt-acl-plugin.c + +2016-11-28 14:45:01 +0200 Aki Tuomi (4b6d6a97c) + + mail-crypt: Fail if key is not found and save_version less than 2 + + Fail if save version is set to 0 or 1, instead of trying to use undefined + value for public key. + +M src/plugins/mail-crypt/mail-crypt-plugin.c + +2016-11-28 13:36:56 +0200 Aki Tuomi (e6459e62b) + + mail-crypt: Skip undef values if OpenSSL is <1.0.2 + + OpenSSL 1.0.1 and earlier generate undef warnings due to using stack as + randomness source in a way that valgrind does not like, so we disable undef + value checks for mail-crypt-plugin. + +M src/plugins/mail-crypt/Makefile.am + +2016-11-28 13:32:16 +0200 Aki Tuomi (85670e215) + + m4: Detect OpenSSL version 1.0.2 + + valgrind cannot work in all cases if openssl version is 1.0.2, so we need to + know this to selectively disable valgrind. + +M m4/ssl.m4 + +2016-11-28 14:12:23 +0200 Aki Tuomi (704ae505d) + + dovecot.m4: Add NOUNDEF option to run-test.sh + + Using this environment variable will disable undefined value errors in + valgrind. + +M m4/dovecot.m4 + +2016-11-28 13:52:40 +0200 Timo Sirainen (f9f30736b) + + lib-index: mail_transaction_log_file_sync(): Don't mix I/O errors and + corruption + + +M src/lib-index/mail-transaction-log-file.c + +2016-11-28 14:40:15 +0200 Timo Sirainen (909764313) + + acl: Fix compiler warning + + +M src/plugins/acl/acl-backend.c + +2016-11-28 05:21:06 +0200 Martti Rannanjärvi (b56d462ff) + + acl-plugin: remove acl_defaults_from_inbox option + + INBOX ACLs will be used by default from now on. + +M src/plugins/acl/acl-backend.c + +2016-11-28 13:04:47 +0200 Timo Sirainen (9018d05c3) + + lib-index: Fix assert-crash after "log file shrank" error. + + Fixes: Panic: file buffer.c: line 316 (buffer_set_used_size): assertion + failed: (used_size <= buf->alloc) + +M src/lib-index/mail-transaction-log-file.c + +2016-11-25 01:45:29 +0200 Aki Tuomi (228765c45) + + Add suppression for openssl leak + + +M run-test-valgrind.supp + +2016-11-25 00:45:35 +0200 Aki Tuomi (62534baa3) + + mail-crypt: Add manpage + + +M .gitignore +M doc/man/Makefile.am +A doc/man/doveadm-mailbox-cryptokey.1.in +M doc/man/doveadm-mailbox.1.in + +2016-11-24 14:48:03 +0200 Aki Tuomi (4c78d9e64) + + mail-crypt: Add mail-crypt plugin + + +M configure.ac +M src/plugins/Makefile.am +A src/plugins/mail-crypt/Makefile.am +A src/plugins/mail-crypt/doveadm-mail-crypt.c +A src/plugins/mail-crypt/fs-crypt-common.c +A src/plugins/mail-crypt/fs-crypt-settings.c +A src/plugins/mail-crypt/fs-crypt-settings.h +A src/plugins/mail-crypt/fs-crypt.c +A src/plugins/mail-crypt/fs-mail-crypt.c +A src/plugins/mail-crypt/mail-crypt-acl-plugin.c +A src/plugins/mail-crypt/mail-crypt-common.h +A src/plugins/mail-crypt/mail-crypt-global-key.c +A src/plugins/mail-crypt/mail-crypt-global-key.h +A src/plugins/mail-crypt/mail-crypt-key.c +A src/plugins/mail-crypt/mail-crypt-key.h +A src/plugins/mail-crypt/mail-crypt-plugin.c +A src/plugins/mail-crypt/mail-crypt-plugin.h +A src/plugins/mail-crypt/mail-crypt-pluginenv.c +A src/plugins/mail-crypt/mail-crypt-userenv.c +A src/plugins/mail-crypt/test-mail-global-key.c +A src/plugins/mail-crypt/test-mail-key.c + +2016-11-25 09:49:25 +0200 Aki Tuomi (b3a968f43) + + lib-dcrypt: Use module_dir setting + + +M src/lib-dcrypt/Makefile.am +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c + +2016-11-25 09:48:43 +0200 Aki Tuomi (3f6149c3f) + + lib-dcrypt: Add module_dir setting + + This is needed for unit tests that require dcrypt, so that they can load + backend without installing it first. + +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/dcrypt.h + +2016-11-21 23:19:26 +0100 Stephan Bosch (1bb13a311) + + lib-http: client: Fixed assert failure occurring when a new connection fails + for a peer that has active connections. + + Fixes: Panic: file http-client-queue.c: line 481 + (http_client_queue_connection_failure): assertion failed: (queue->cur_peer + == NULL) + +M src/lib-http/http-client-queue.c +M src/lib-http/test-http-client-errors.c + +2016-11-28 03:26:01 +0100 Stephan Bosch (a81d5c3f5) + + global: Added missing copyright notices. + + +M src/auth/auth-policy.c +M src/auth/mech-plain-common.c +M src/auth/mycrypt.c +M src/auth/password-scheme-rpa.c +M src/doveadm/doveadm-print-formatted.c +M src/doveadm/doveadm-print-json.c +M src/lib-dcrypt/dcrypt-gnutls.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c +M src/lib-dns/test-dns-util.c +M src/lib-fts/fts-library.c +M src/lib-fts/fts-tokenizer-common.c +M src/lib-http/http-request.c +M src/lib-http/http-response.c +M src/lib/pkcs5.c + +2016-11-25 16:14:16 +0200 Timo Sirainen (323c4e6d0) + + lib-storage: Fix raw storage to sync mailboxes correctly. + + Broken by b9da8540e665138b3cad0b637c08c0ab7d7a7eeb + +M src/lib-storage/index/raw/raw-sync.c + +2016-11-25 15:34:46 +0200 Timo Sirainen (7a1c34790) + + lib-storage: Fix error handling in mailbox_list_index_refresh_force() + + Broken by recent changes. + +M src/lib-storage/list/mailbox-list-index.c + +2016-11-22 01:28:33 +0200 Timo Sirainen (e8e00a579) + + mkcert.sh: Use umask to create key file as 0600 + + Fixes a race condition between creation of the file and a later chmod. This + script was mostly meant as an example though, and not really for production + use. Especially because it generates self-signed certs. CVE-2016-4983 + +M doc/mkcert.sh + +2016-11-24 18:12:18 +0200 Timo Sirainen (96088ba9e) + + mdbox: Rebuild index after it's been fsck'd + + M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib-storage/index/dbox-multi/mdbox-purge.c -M src/lib-storage/index/dbox-multi/mdbox-save.c -M src/lib-storage/index/dbox-multi/mdbox-settings.c +M src/lib-storage/index/dbox-multi/mdbox-map.h M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c -M src/lib-storage/index/dbox-multi/mdbox-storage.c M src/lib-storage/index/dbox-multi/mdbox-sync.c -M src/lib-storage/index/dbox-single/sdbox-copy.c -M src/lib-storage/index/dbox-single/sdbox-file.c -M src/lib-storage/index/dbox-single/sdbox-mail.c -M src/lib-storage/index/dbox-single/sdbox-save.c -M src/lib-storage/index/dbox-single/sdbox-storage.c + +2016-11-24 18:12:00 +0200 Timo Sirainen (3d758b4fa) + + sdbox: Rebuild index after it's been fsck'd + + M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c M src/lib-storage/index/dbox-single/sdbox-sync.c -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-sync.c -M src/lib-storage/index/index-attachment.c -M src/lib-storage/index/index-attribute.c -M src/lib-storage/index/index-mail-binary.c -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/index/index-pop3-uidl.c -M src/lib-storage/index/index-rebuild.c -M src/lib-storage/index/index-search-result.c -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-sort-string.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/index/index-status.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-sync-changes.c -M src/lib-storage/index/index-sync-pvt.c -M src/lib-storage/index/index-sync-search.c -M src/lib-storage/index/index-sync.c -M src/lib-storage/index/index-thread-finish.c -M src/lib-storage/index/index-thread-links.c -M src/lib-storage/index/index-thread.c -M src/lib-storage/index/index-transaction.c -M src/lib-storage/index/istream-mail.c -M src/lib-storage/index/maildir/maildir-copy.c -M src/lib-storage/index/maildir/maildir-filename-flags.c -M src/lib-storage/index/maildir/maildir-filename.c -M src/lib-storage/index/maildir/maildir-keywords.c -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/maildir/maildir-settings.c + +2016-11-24 17:52:01 +0200 Timo Sirainen (22436f3cb) + + lib-storge: Call mail_storage.list_index_corrupted() when needed + + The callback is called whenever mailbox list index appears to be corrupted + with LAYOUT=index. The storage is responsible for adding to the index any + mailboxes that are missing. + +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h + +2016-11-24 15:50:01 +0200 Timo Sirainen (857c471c1) + + lib-storage: Add mail_storage.list_index_corrupted() + + The actual implementation is in the next commit. + +M src/lib-storage/fail-mail-storage.c +M src/lib-storage/index/cydir/cydir-storage.c +M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-storage.c +M src/lib-storage/index/imapc/imapc-storage.c M src/lib-storage/index/maildir/maildir-storage.c -M src/lib-storage/index/maildir/maildir-sync-index.c -M src/lib-storage/index/maildir/maildir-sync.c -M src/lib-storage/index/maildir/maildir-uidlist.c -M src/lib-storage/index/maildir/maildir-util.c -M src/lib-storage/index/mbox/istream-raw-mbox.c -M src/lib-storage/index/mbox/mbox-file.c -M src/lib-storage/index/mbox/mbox-lock.c -M src/lib-storage/index/mbox/mbox-mail.c -M src/lib-storage/index/mbox/mbox-md5-all.c -M src/lib-storage/index/mbox/mbox-md5-apop3d.c -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/index/mbox/mbox-settings.c M src/lib-storage/index/mbox/mbox-storage.c -M src/lib-storage/index/mbox/mbox-sync-list-index.c -M src/lib-storage/index/mbox/mbox-sync-parse.c -M src/lib-storage/index/mbox/mbox-sync-rewrite.c -M src/lib-storage/index/mbox/mbox-sync-update.c -M src/lib-storage/index/mbox/mbox-sync.c -M src/lib-storage/index/pop3c/pop3c-client.c -M src/lib-storage/index/pop3c/pop3c-mail.c -M src/lib-storage/index/pop3c/pop3c-settings.c M src/lib-storage/index/pop3c/pop3c-storage.c -M src/lib-storage/index/pop3c/pop3c-sync.c -M src/lib-storage/index/raw/raw-mail.c M src/lib-storage/index/raw/raw-storage.c -M src/lib-storage/index/raw/raw-sync.c -M src/lib-storage/index/shared/shared-list.c M src/lib-storage/index/shared/shared-storage.c -M src/lib-storage/list/mailbox-list-delete.c -M src/lib-storage/list/mailbox-list-fs-flags.c -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-fs.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/mail-storage-private.h +M src/plugins/virtual/virtual-storage.c + +2016-11-24 17:16:30 +0200 Timo Sirainen (c5073d5b5) + + lib-index: Add mail_index_unset_fscked() + + This can be used to easily remove MAIL_INDEX_HDR_FLAG_FSCKD. It takes a + transaction parameter instead of sync_ctx because some index rebuilds are + done with a separate transaction while the sync_ctx is rolled back. + +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/mail-index.h + +2016-11-24 15:49:15 +0200 Timo Sirainen (02d6628c1) + + lib-index: fsck now adds MAIL_INDEX_HDR_FLAG_FSCKD to header. + + It can only be removed by an explicit header update. + +M src/lib-index/mail-index-fsck.c +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index.h + +2016-11-24 15:41:38 +0200 Timo Sirainen (de258127e) + + lib-storage: Rename mailbox_list_index.corrupted to + corrupted_names_or_parents + + Makes it clearer what exactly the flag means. + M src/lib-storage/list/mailbox-list-index-sync.c M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/list/mailbox-list-maildir-iter.c -M src/lib-storage/list/mailbox-list-maildir.c -M src/lib-storage/list/mailbox-list-none.c -M src/lib-storage/list/mailbox-list-notify-tree.c -M src/lib-storage/list/mailbox-list-subscriptions.c -M src/lib-storage/list/subscription-file.c -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-copy.c -M src/lib-storage/mail-error.c -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-search-args-cmdline.c -M src/lib-storage/mail-search-args-imap.c -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/mail-search-build.c -M src/lib-storage/mail-search-parser-cmdline.c -M src/lib-storage/mail-search-parser-imap.c -M src/lib-storage/mail-search-parser.c -M src/lib-storage/mail-search-register-human.c -M src/lib-storage/mail-search-register-imap.c -M src/lib-storage/mail-search-register.c -M src/lib-storage/mail-search.c -M src/lib-storage/mail-storage-hooks.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-thread.c -M src/lib-storage/mail-user.c -M src/lib-storage/mail.c -M src/lib-storage/mailbox-attribute-internal.c -M src/lib-storage/mailbox-attribute.c -M src/lib-storage/mailbox-get.c -M src/lib-storage/mailbox-guid-cache.c -M src/lib-storage/mailbox-header.c -M src/lib-storage/mailbox-keywords.c -M src/lib-storage/mailbox-list-notify.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-recent-flags.c -M src/lib-storage/mailbox-search-result.c -M src/lib-storage/mailbox-tree.c -M src/lib-storage/mailbox-uidvalidity.c -M src/lib-storage/mailbox-watch.c -M src/lib-storage/test-mail-search-args-imap.c -M src/lib-storage/test-mail-search-args-simplify.c -M src/lib-storage/test-mailbox-get.c -M src/lib-test/test-common.c -M src/lib-test/test-istream.c -M src/lib-test/test-ostream.c -M src/lib/abspath.c -M src/lib/aqueue.c -M src/lib/array.c -M src/lib/askpass.c -M src/lib/backtrace-string.c -M src/lib/base32.c -M src/lib/base64.c -M src/lib/bits.c -M src/lib/bsearch-insert-pos.c -M src/lib/buffer.c -M src/lib/child-wait.c -M src/lib/compat.c -M src/lib/connection.c -M src/lib/crc32.c -M src/lib/data-stack.c -M src/lib/eacces-error.c -M src/lib/env-util.c -M src/lib/execv-const.c -M src/lib/failures.c -M src/lib/fd-close-on-exec.c -M src/lib/fdatasync-path.c -M src/lib/fdpass.c -M src/lib/file-cache.c -M src/lib/file-copy.c -M src/lib/file-create-locked.c -M src/lib/file-dotlock.c -M src/lib/file-lock.c -M src/lib/file-set-size.c -M src/lib/guid.c -M src/lib/hash-format.c -M src/lib/hash-method.c -M src/lib/hash.c -M src/lib/hash2.c -M src/lib/hex-binary.c -M src/lib/hex-dec.c -M src/lib/home-expand.c -M src/lib/hostpid.c -M src/lib/imem.c -M src/lib/ioloop-epoll.c -M src/lib/ioloop-notify-fd.c -M src/lib/ioloop-notify-inotify.c -M src/lib/ioloop-notify-none.c -M src/lib/ioloop-poll.c -M src/lib/ioloop-select.c -M src/lib/ioloop.c -M src/lib/iostream-rawlog.c -M src/lib/iostream-temp.c -M src/lib/iostream.c -M src/lib/ipwd.c -M src/lib/iso8601-date.c -M src/lib/istream-base64-decoder.c -M src/lib/istream-base64-encoder.c -M src/lib/istream-callback.c -M src/lib/istream-chain.c -M src/lib/istream-concat.c -M src/lib/istream-crlf.c -M src/lib/istream-data.c -M src/lib/istream-failure-at.c -M src/lib/istream-file.c -M src/lib/istream-hash.c -M src/lib/istream-jsonstr.c -M src/lib/istream-limit.c -M src/lib/istream-mmap.c -M src/lib/istream-rawlog.c -M src/lib/istream-seekable.c -M src/lib/istream-sized.c -M src/lib/istream-tee.c -M src/lib/istream-timeout.c -M src/lib/istream-unix.c -M src/lib/istream.c -M src/lib/json-parser.c -M src/lib/json-tree.c -M src/lib/lib-signals.c -M src/lib/lib.c -M src/lib/log-throttle.c -M src/lib/mempool-alloconly.c -M src/lib/mempool-datastack.c -M src/lib/mempool-system.c -M src/lib/mempool-unsafe-datastack.c -M src/lib/mempool.c -M src/lib/mkdir-parents.c -M src/lib/mmap-anon.c -M src/lib/mmap-util.c -M src/lib/module-dir.c -M src/lib/mountpoint.c -M src/lib/nfs-workarounds.c -M src/lib/numpack.c -M src/lib/ostream-buffer.c -M src/lib/ostream-escaped.c -M src/lib/ostream-failure-at.c -M src/lib/ostream-file.c -M src/lib/ostream-hash.c -M src/lib/ostream-null.c -M src/lib/ostream-rawlog.c -M src/lib/ostream.c -M src/lib/pkcs5.c -M src/lib/primes.c -M src/lib/printf-format-fix.c -M src/lib/priorityq.c -M src/lib/process-title.c -M src/lib/rand.c -M src/lib/randgen.c -M src/lib/read-full.c -M src/lib/restrict-access.c -M src/lib/restrict-process-size.c -M src/lib/safe-memset.c -M src/lib/safe-mkdir.c -M src/lib/safe-mkstemp.c -M src/lib/sendfile-util.c -M src/lib/seq-range-array.c -M src/lib/str-find.c -M src/lib/str-sanitize.c -M src/lib/str-table.c -M src/lib/str.c -M src/lib/strescape.c -M src/lib/strfuncs.c -M src/lib/strnum.c -M src/lib/test-aqueue.c -M src/lib/test-array.c -M src/lib/test-base32.c -M src/lib/test-base64.c -M src/lib/test-bits.c -M src/lib/test-bsearch-insert-pos.c +M src/lib-storage/list/mailbox-list-index.h + +2016-11-24 15:14:06 +0200 Timo Sirainen (ca2f32608) + + lib-index: If index open fails with fsck, retry opening once. + + The fsck should have fixed the log offsets and open should work. + +M src/lib-index/mail-index-map-read.c + +2016-11-24 15:12:21 +0200 Timo Sirainen (826f767b6) + + lib-index: fsck: Fix log_file_head|tail_offset properly + + +M src/lib-index/mail-index-fsck.c + +2016-11-25 10:22:18 +0200 Aki Tuomi (3c503fa10) + + lib-dcrypt: Add assert that vfs is initialized + + +M src/lib-dcrypt/dcrypt.c + +2016-11-24 19:53:17 +0200 Timo Sirainen (25e4617fb) + + lib-storage: Fail if no namespaces have list=yes + + The previous check allowed all namespaces to have list=children. This + crashed later on in mail_namespaces_get_root_sep(), because it couldn't find + any list=yes namespaces. + +M src/lib-storage/mail-namespace.c + +2016-11-25 00:17:45 +0200 Timo Sirainen (7a73401fd) + + lib-index: Compiler warning fix + + +M src/lib-index/mail-transaction-log.c + +2016-11-22 18:34:53 +0200 Timo Sirainen (0bbddb018) + + lib-mail: Add randomness test to test-mail-html2text + + +M src/lib-mail/test-mail-html2text.c + +2016-11-22 18:33:12 +0200 Timo Sirainen (e61d5a4ba) + + lib-mail: Fix assert-crash in mail_html2text_more() with invalid input. + + parse_data() continues forward thinking that it might have valid input, + until it has enough data and realizes that there's nothing valid. This + triggers: + + Panic: file mail-html2text.c: line 312 (mail_html2text_more): assertion + failed: (pos >= buf_orig_size) + +M src/lib-mail/mail-html2text.c +M src/lib-mail/test-mail-html2text.c + +2016-11-19 02:32:21 +0200 Timo Sirainen (a44866b01) + + lib: Clarify that buffer_write() zero-fills buffer when writing past its + size + + +M src/lib/buffer.h M src/lib/test-buffer.c -M src/lib/test-crc32.c -M src/lib/test-data-stack.c -M src/lib/test-failures.c -M src/lib/test-guid.c -M src/lib/test-hash-format.c -M src/lib/test-hash-method.c -M src/lib/test-hash.c -M src/lib/test-hex-binary.c -M src/lib/test-ioloop.c -M src/lib/test-iostream-temp.c -M src/lib/test-iso8601-date.c -M src/lib/test-istream-base64-decoder.c -M src/lib/test-istream-base64-encoder.c -M src/lib/test-istream-chain.c -M src/lib/test-istream-concat.c -M src/lib/test-istream-crlf.c -M src/lib/test-istream-failure-at.c -M src/lib/test-istream-seekable.c -M src/lib/test-istream-tee.c -M src/lib/test-istream-unix.c -M src/lib/test-istream.c -M src/lib/test-json-parser.c -M src/lib/test-json-tree.c -M src/lib/test-lib.c -M src/lib/test-llist.c -M src/lib/test-log-throttle.c -M src/lib/test-malloc-overflow.c -M src/lib/test-mempool-alloconly.c -M src/lib/test-net.c -M src/lib/test-numpack.c -M src/lib/test-ostream-escaped.c -M src/lib/test-ostream-failure-at.c -M src/lib/test-ostream-file.c -M src/lib/test-pkcs5.c -M src/lib/test-primes.c -M src/lib/test-printf-format-fix.c -M src/lib/test-priorityq.c -M src/lib/test-seq-range-array.c -M src/lib/test-str-find.c -M src/lib/test-str-sanitize.c -M src/lib/test-str-table.c -M src/lib/test-str.c -M src/lib/test-strescape.c -M src/lib/test-strfuncs.c -M src/lib/test-strnum.c -M src/lib/test-time-util.c -M src/lib/test-timing.c -M src/lib/test-unichar.c -M src/lib/test-utc-mktime.c -M src/lib/test-var-expand.c -M src/lib/test-wildcard-match.c -M src/lib/time-util.c -M src/lib/timing.c -M src/lib/unichar.c -M src/lib/unix-socket-create.c -M src/lib/unlink-directory.c -M src/lib/unlink-old-files.c -M src/lib/uri-util.c -M src/lib/utc-mktime.c -M src/lib/utc-offset.c -M src/lib/var-expand.c -M src/lib/write-full.c -M src/lmtp/client.c -M src/lmtp/commands.c -M src/lmtp/lmtp-proxy.c -M src/lmtp/lmtp-settings.c -M src/lmtp/main.c -M src/log/doveadm-connection.c -M src/log/log-connection.c -M src/log/log-error-buffer.c -M src/log/log-settings.c -M src/log/main.c -M src/login-common/access-lookup.c -M src/login-common/client-common-auth.c -M src/login-common/client-common.c -M src/login-common/login-proxy-state.c -M src/login-common/login-proxy.c -M src/login-common/login-settings.c -M src/login-common/main.c -M src/login-common/sasl-server.c -M src/login-common/ssl-proxy-gnutls.c -M src/login-common/ssl-proxy-openssl.c -M src/login-common/ssl-proxy.c -M src/master/capabilities-posix.c -M src/master/dup2-array.c -M src/master/main.c -M src/master/master-client.c -M src/master/master-settings.c -M src/master/service-anvil.c -M src/master/service-listen.c -M src/master/service-log.c -M src/master/service-monitor.c -M src/master/service-process-notify.c -M src/master/service-process.c -M src/master/service.c -M src/plugins/acl/acl-api.c -M src/plugins/acl/acl-attributes.c -M src/plugins/acl/acl-backend-vfile-acllist.c -M src/plugins/acl/acl-backend-vfile-update.c -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/acl/acl-backend.c -M src/plugins/acl/acl-cache.c -M src/plugins/acl/acl-global-file.c -M src/plugins/acl/acl-lookup-dict.c -M src/plugins/acl/acl-mailbox-list.c -M src/plugins/acl/acl-mailbox.c -M src/plugins/acl/acl-plugin.c -M src/plugins/acl/acl-shared-storage.c -M src/plugins/acl/acl-storage.c -M src/plugins/acl/doveadm-acl.c -M src/plugins/autocreate/autocreate-plugin.c -M src/plugins/dict-ldap/dict-ldap-settings.c -M src/plugins/dict-ldap/dict-ldap.c -M src/plugins/expire/doveadm-expire.c -M src/plugins/expire/expire-plugin.c -M src/plugins/expire/expire-set.c -M src/plugins/fs-compress/fs-compress.c -M src/plugins/fts-lucene/doveadm-fts-lucene.c -M src/plugins/fts-lucene/fts-backend-lucene.c -M src/plugins/fts-lucene/fts-lucene-plugin.c -M src/plugins/fts-lucene/lucene-wrapper.cc -M src/plugins/fts-solr/fts-backend-solr-old.c -M src/plugins/fts-solr/fts-backend-solr.c -M src/plugins/fts-solr/fts-solr-plugin.c -M src/plugins/fts-solr/solr-connection.c -M src/plugins/fts-squat/fts-backend-squat.c -M src/plugins/fts-squat/fts-squat-plugin.c -M src/plugins/fts-squat/squat-test.c -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-uidlist.c -M src/plugins/fts/doveadm-dump-fts-expunge-log.c -M src/plugins/fts/doveadm-fts.c -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-build-mail.c -M src/plugins/fts/fts-expunge-log.c -M src/plugins/fts/fts-indexer.c -M src/plugins/fts/fts-parser-html.c -M src/plugins/fts/fts-parser-script.c -M src/plugins/fts/fts-parser-tika.c + +2016-11-19 01:54:14 +0200 Timo Sirainen (6d4043487) + + global: Code cleanup - avoid passing NULL to functions with non-null + parameter + + +M src/lib-dcrypt/test-stream.c +M src/lib-index/mail-cache-lookup.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/index-mailbox-size.c +M src/lib/buffer.c +M src/lib/istream.c + +2016-11-19 02:00:25 +0200 Timo Sirainen (fced91d63) + + global: Avoid unnecessary unsigned integer wraps. + + Avoids complains from clang -fsanitize=integer + +M src/indexer/master-connection.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-storage/index/mbox/istream-raw-mbox.c + +2016-11-19 01:59:03 +0200 Timo Sirainen (a05819736) + + global: Avoid loops unnecessarily decreasing below zero. + + Avoids complains from clang -fsanitize=integer + +M src/lib-mail/message-address.c +M src/lib-mail/message-snippet.c +M src/lib/sha3.c + +2016-11-19 01:57:40 +0200 Timo Sirainen (21484e162) + + lib: Mark md4/md5/sha1/sha2 code with ATTR_UNSIGNED_WRAPS + + +M src/lib/md4.c +M src/lib/md5.c +M src/lib/sha1.c +M src/lib/sha2.c + +2016-11-19 01:56:19 +0200 Timo Sirainen (2c488bf1c) + + lib-index: mail_index_map_register_ext(ext_offset=-1) now sets hdr_offset=-1 + + It shouldn't make any difference, but this is a less confusing value. + +M src/lib-index/mail-index-map.c + +2016-11-19 01:39:42 +0200 Timo Sirainen (08b888317) + + lib: Add ATTR_UNSIGNED_WRAPS for disabling clang -fsanitize=integer + + +M src/lib/macros.h + +2016-11-24 23:26:40 +0200 Timo Sirainen (80528a951) + + lib-index: Compiler warning fix. + + +M src/lib-index/mail-transaction-log.c + +2016-11-23 23:19:05 +0200 Timo Sirainen (ec4beaa76) + + lib-storage: Rotate dovecot.list.index.log* more often. + + The history in these files isn't as important as in mailbox indexes. Reduce + disk space usage by rotating them more often and deleting the + .log.2 more quickly. + +M src/lib-storage/list/mailbox-list-index.c + +2016-11-23 23:12:29 +0200 Timo Sirainen (b66a207dd) + + lib-index: Add mail_index_set_log_rotation() + + +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index.c +M src/lib-index/mail-index.h +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log.c + +2016-11-23 22:42:03 +0200 Timo Sirainen (55c880236) + + lib-storage: Try harder to rename a corrupted mailbox name to its old name. + + If the old name exists, use it as a prefix for the new name. This is + especially useful when restoring autocreated mailboxes. A new mailbox could + have already been autocreated, but it's still useful to have the broken one + renamed with the same prefix, so it'll be clear that these mailboxes should + be merged. + +M src/lib-storage/list/mailbox-list-index-backend.c + +2016-11-24 19:32:44 +0200 Aki Tuomi (b78c41586) + + dsync: Do not try replace remote folder GUID when doing oneway sync + + Oneway sync tried to replace remote folder's GUID when running in one way + mode. This causes trouble, e.g. when running with imapc, because you can't + do this. + +M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c + +2016-11-23 18:43:17 +0200 Timo Sirainen (215fecae3) + + lib-storage: Fix rotation of dovecot.list.index.log + + After b9da8540e665138b3cad0b637c08c0ab7d7a7eeb the tail offsets weren't + being updated anymore when mail_index_sync_next() wasn't used to skip over + all the data. Mailbox list index wasn't doing this, and so the log was never + rotated since tail_offset was never equal to head_offset. + +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/list/mailbox-list-index-sync.c + +2016-11-23 17:14:48 +0200 Timo Sirainen (22788c0ac) + + imapc: Fix assert that checks if mail is expunged locally. + + The EXPUNGE may have been sent while imapc_sync_index() was issuing remote + imapc commands. It would end up being in delayed_expunged_uids, so the + assert needs to check that too. + + Fixes: Panic: file imapc-sync.c: line 290 (imapc_initial_sync_check): + assertion failed: (mail_index_is_expunged(view, lseq)) + +M src/lib-storage/index/imapc/imapc-sync.c + +2016-11-23 17:14:14 +0200 Timo Sirainen (724c4a962) + + imapc: Cleanup - change delayed_expunged_uids to seq_range. + + This simplifies the next commit. + +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-storage.h + +2016-11-23 15:57:03 +0200 Timo Sirainen (99abb1302) + + auth: Don't crash expanding %variables when username isn't set. + + This continues the auth-policy fix in + c3d3faa4f72a676e183f34be960cff13a5a725ae + +M src/auth/auth-request-var-expand.c + +2016-11-23 13:25:54 +0200 Timo Sirainen (172b6edea) + + sdbox: Don't log an error if stub is added twice + + There's no locking for them, so it's fine if two processes add the same + mail. The second one could be ignored, but it was a bit easier to just let + it rename over the first one. + +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-storage/index/dbox-single/sdbox-file.h +M src/lib-storage/index/dbox-single/sdbox-save.c + +2016-11-23 13:16:19 +0200 Aki Tuomi (c3d3faa4f) + + auth: Fix auth-policy crash when username is NULL + + If SASL request is invalid, or incomplete, and username is left NULL, handle + it gracefully by adding just NUL byte in auth policy digest for username. + +M src/auth/auth-policy.c + +2016-11-22 10:21:24 -0500 Josef 'Jeff' Sipek (08e9fd42e) + + lib-storage: require MAIL_STORAGE_CLASS_FLAG_STUBS when caching + + If we are going to be using the storage for caching, we should check that + the storage actually supports mail stubs. + +M src/lib-storage/index/dbox-single/sdbox-storage.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c + +2016-11-22 18:00:13 +0200 Timo Sirainen (9d92ea347) + + lib-fts: Add randomness test to test-fts-tokenizer + + +M src/lib-fts/test-fts-tokenizer.c + +2016-11-22 16:35:58 +0200 Timo Sirainen (b1b0b2b54) + + lib-fts: Make sure address tokenizer can't return empty tokens. + + This happened when address was a token that first looked like it could be a + valid address, but then got truncated due to reaching maxlen, followed by + truncating the UTF8-sequence and finally all the rest of the '-' or + '.' chars that were valid at the beginning of the address are stripped away + by fts_tokenizer_delete_trailing_invalid_char(), leaving nothing left. + + Fixes: Panic: file fts-tokenizer.c: line 206 (fts_tokenizer_next): assertion + failed: (ret <= 0 || (*token_r)[0] != '\0') + +M src/lib-fts/fts-tokenizer-address.c +M src/lib-fts/test-fts-tokenizer.c + +2016-11-22 17:31:02 +0200 Timo Sirainen (edc654a35) + + lib-fts: Fix fts_tokenizer_delete_trailing_partial_char() unit test + + +M src/lib-fts/test-fts-tokenizer.c + +2016-11-22 12:03:01 +0200 Timo Sirainen (9644b7914) + + lib-index: Handle invalid headers as "corruption", not "temporary error" + + This is especially required for "Header's corrupted flag is set" error, + which won't get fixed otherwise. + + It's a bit more questionable if we should treat major version or CPU + architecture change as corruption, but it's possible those only exist + because of corruption. It's also very unlikely that either is really + happening. Ideally there would be a hash that verifies whether the header is + corrupted or not. + +M src/lib-index/mail-index-map-hdr.c +M src/lib-index/mail-index-map-read.c + +2016-11-22 10:59:36 +0200 Timo Sirainen (542d7a4af) + + dict-client: dict_lookup*() deleted the first byte of the result. + + +M src/lib-dict/dict-client.c + +2016-11-21 14:05:42 +0200 Timo Sirainen (5de0c65da) + + quota-clone: Flush quota-clone 10s after quota update if it's not already + done + + This way a long-running IMAP session can't keep the quota-clone desynced for + a long time. + +M src/plugins/quota-clone/quota-clone-plugin.c + +2016-11-21 14:02:11 +0200 Timo Sirainen (588a05790) + + quota-clone: Code cleanup - moved recursion check to quota_clone_flush() + + +M src/plugins/quota-clone/quota-clone-plugin.c + +2016-11-21 23:43:08 +0200 Timo Sirainen (cacaa94d2) + + lib-dict: Add extra NULL-check to make static analyzer happier + + str_array_length() already checked NULL internally though. + +M src/lib-dict/dict-client.c + +2016-11-21 13:57:23 +0200 Aki Tuomi (52d2b356e) + + lib-index: Limit mmap errors in txn log file to 1/s + + +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-private.h + +2016-11-21 13:53:50 +0200 Aki Tuomi (e9594e86d) + + lib-index: Limit mmap errors in index cache to 1/s + + +M src/lib-index/mail-cache-private.h +M src/lib-index/mail-cache.c + +2016-11-21 13:34:57 +0200 Aki Tuomi (12f0c4396) + + lib-index: Limit mmap syscall errors in index to 1/s + + +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-index-private.h + +2016-11-21 13:33:42 +0200 Aki Tuomi (9e0b18793) + + lib-index: Do not crash if log is missing + + Fixes sigfault when index and index.log files are corrupted. + +M src/lib-index/mail-index.c +M src/lib-index/mail-transaction-log-view.c + +2016-11-21 19:05:49 +0200 Timo Sirainen (44c54229a) + + dict-client: Server can now send command replies in any order. + + This way one slow lookup doesn't block all the other ones. + + This change keeps backwards compatibility in the dict protocol for both + client and server. + +M src/dict/dict-commands.c +M src/dict/dict-connection.h +M src/lib-dict/dict-client.c +M src/lib-dict/dict-client.h + +2016-11-21 19:04:26 +0200 Timo Sirainen (1fb0136a1) + + dict: Make sure iterate doesn't add to ostream when it's already full. + + +M src/dict/dict-commands.c + +2016-11-21 18:52:25 +0200 Timo Sirainen (af298f9a4) + + dict: Moved iterate's corking to more correct location. + + Commands' input handling already corks ostream in connection.c. ostream's + flush callback corks the ostream automatically. So the only place left for + corking is in dict iterate callback. + +M src/dict/dict-commands.c + +2016-11-21 18:46:48 +0200 Timo Sirainen (d485968ff) + + dict-client: Include reconnection-status in slow dict lookup messages. + + +M src/lib-dict/dict-client.c + +2016-11-21 16:55:45 +0200 Timo Sirainen (2525acc19) + + dict-client: Add warn_slow_msecs setting + + This allows configuring the default 5 seconds "slow dict lookup" warning. + +M src/lib-dict/dict-client.c + +2016-11-21 16:45:55 +0200 Timo Sirainen (8e1491e49) + + dict-client: Add time spent in dict-server to "slow dict lookup" messages. + + This way you can see if the slowness was due to some communication problem + between dict-client/server or internally in dict server. + + This change keeps backwards compatibility in the dict protocol for both + client and server. + +M src/dict/dict-commands.c +M src/dict/dict-connection.c +M src/dict/dict-connection.h +M src/lib-dict/dict-client.c +M src/lib-dict/dict-client.h + +2016-11-21 16:44:38 +0200 Timo Sirainen (fc494f157) + + dict-client: Code cleanup - handle tab-unescaping before callbacks. + + +M src/lib-dict/dict-client.c +M src/lib-dict/dict-client.h + +2016-11-21 13:29:12 +0200 Timo Sirainen (95e4021e3) + + lib-index: Revert log flooding prevention / 3c014db6f + + This was intended only for mmap() errors. + +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index.c + +2016-11-19 04:04:02 +0200 Timo Sirainen (0c4a3ccaa) + + fts: Fixed potential crash when indexing mails. + + Normally it seems like compilers had built code that had added a NULL after + the array, but there was no guarantee for that. + M src/plugins/fts/fts-parser.c -M src/plugins/fts/fts-plugin.c -M src/plugins/fts/fts-search-args.c -M src/plugins/fts/fts-search-serialize.c -M src/plugins/fts/fts-search.c -M src/plugins/fts/fts-storage.c -M src/plugins/fts/fts-user.c -M src/plugins/fts/xml2text.c -M src/plugins/imap-acl/imap-acl-plugin.c -M src/plugins/imap-quota/imap-quota-plugin.c -M src/plugins/imap-stats/imap-stats-plugin.c -M src/plugins/imap-zlib/imap-zlib-plugin.c -M src/plugins/last-login/last-login-plugin.c -M src/plugins/lazy-expunge/lazy-expunge-plugin.c -M src/plugins/listescape/listescape-plugin.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c -M src/plugins/mail-crypt/fs-crypt-common.c -M src/plugins/mail-crypt/fs-crypt-settings.c -M src/plugins/mail-crypt/fs-crypt.c -M src/plugins/mail-crypt/fs-mail-crypt.c -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c -M src/plugins/mail-crypt/mail-crypt-global-key.c -M src/plugins/mail-crypt/mail-crypt-key.c -M src/plugins/mail-crypt/mail-crypt-plugin.c -M src/plugins/mail-crypt/mail-crypt-pluginenv.c -M src/plugins/mail-crypt/mail-crypt-userenv.c -M src/plugins/mail-crypt/test-mail-global-key.c -M src/plugins/mail-crypt/test-mail-key.c -M src/plugins/mail-filter/istream-ext-filter.c -M src/plugins/mail-filter/mail-filter-plugin.c -M src/plugins/mail-filter/ostream-ext-filter.c -M src/plugins/mail-log/mail-log-plugin.c -M src/plugins/mailbox-alias/mailbox-alias-plugin.c -M src/plugins/notify/notify-plugin.c -M src/plugins/notify/notify-storage.c -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/pop3-migration/test-pop3-migration-plugin.c -M src/plugins/push-notification/push-notification-driver-dlog.c -M src/plugins/push-notification/push-notification-driver-ox.c -M src/plugins/push-notification/push-notification-drivers.c -M src/plugins/push-notification/push-notification-drivers.h -M src/plugins/push-notification/push-notification-event-flagsclear.c -M src/plugins/push-notification/push-notification-event-flagsclear.h -M src/plugins/push-notification/push-notification-event-flagsset.c -M src/plugins/push-notification/push-notification-event-flagsset.h -M src/plugins/push-notification/push-notification-event-mailboxcreate.c -M src/plugins/push-notification/push-notification-event-mailboxcreate.h -M src/plugins/push-notification/push-notification-event-mailboxdelete.c -M src/plugins/push-notification/push-notification-event-mailboxdelete.h -M src/plugins/push-notification/push-notification-event-mailboxrename.c -M src/plugins/push-notification/push-notification-event-mailboxrename.h -M src/plugins/push-notification/push-notification-event-mailboxsubscribe.c -M src/plugins/push-notification/push-notification-event-mailboxsubscribe.h -M src/plugins/push-notification/push-notification-event-mailboxunsubscribe.c -M src/plugins/push-notification/push-notification-event-mailboxunsubscribe.h -M src/plugins/push-notification/push-notification-event-message-common.h -M src/plugins/push-notification/push-notification-event-messageappend.c -M src/plugins/push-notification/push-notification-event-messageappend.h -M src/plugins/push-notification/push-notification-event-messageexpunge.c -M src/plugins/push-notification/push-notification-event-messageexpunge.h -M src/plugins/push-notification/push-notification-event-messagenew.c -M src/plugins/push-notification/push-notification-event-messagenew.h -M src/plugins/push-notification/push-notification-event-messageread.c -M src/plugins/push-notification/push-notification-event-messageread.h -M src/plugins/push-notification/push-notification-event-messagetrash.c -M src/plugins/push-notification/push-notification-event-messagetrash.h -M src/plugins/push-notification/push-notification-events-rfc5423.c -M src/plugins/push-notification/push-notification-events-rfc5423.h -M src/plugins/push-notification/push-notification-events.c -M src/plugins/push-notification/push-notification-events.h -M src/plugins/push-notification/push-notification-plugin.c -M src/plugins/push-notification/push-notification-plugin.h -M src/plugins/push-notification/push-notification-triggers.c -M src/plugins/push-notification/push-notification-triggers.h -M src/plugins/push-notification/push-notification-txn-mbox.c -M src/plugins/push-notification/push-notification-txn-mbox.h -M src/plugins/push-notification/push-notification-txn-msg.c -M src/plugins/push-notification/push-notification-txn-msg.h -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/doveadm-quota.c -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota-dirsize.c -M src/plugins/quota/quota-fs.c -M src/plugins/quota/quota-maildir.c -M src/plugins/quota/quota-plugin.c -M src/plugins/quota/quota-status.c -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota-util.c -M src/plugins/quota/quota.c -M src/plugins/quota/test-quota-util.c -M src/plugins/replication/replication-plugin.c -M src/plugins/snarf/snarf-plugin.c -M src/plugins/stats/mail-stats-connection.c -M src/plugins/stats/mail-stats-fill.c -M src/plugins/stats/mail-stats.c -M src/plugins/stats/stats-plugin.c -M src/plugins/trash/trash-plugin.c -M src/plugins/virtual/virtual-config.c -M src/plugins/virtual/virtual-mail.c -M src/plugins/virtual/virtual-plugin.c -M src/plugins/virtual/virtual-save.c -M src/plugins/virtual/virtual-search.c -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-sync.c -M src/plugins/virtual/virtual-transaction.c -M src/plugins/welcome/welcome-plugin.c -M src/plugins/zlib/zlib-plugin.c -M src/pop3-login/client-authenticate.c -M src/pop3-login/client.c -M src/pop3-login/pop3-login-settings.c -M src/pop3-login/pop3-proxy.c -M src/pop3/main.c -M src/pop3/pop3-client.c -M src/pop3/pop3-commands.c -M src/pop3/pop3-settings.c -M src/replication/aggregator/aggregator-settings.c -M src/replication/aggregator/aggregator.c -M src/replication/aggregator/notify-connection.c -M src/replication/aggregator/replicator-connection.c -M src/replication/replicator/doveadm-connection.c -M src/replication/replicator/dsync-client.c -M src/replication/replicator/notify-connection.c -M src/replication/replicator/replicator-brain.c -M src/replication/replicator/replicator-queue-auth.c -M src/replication/replicator/replicator-queue.c -M src/replication/replicator/replicator-settings.c -M src/replication/replicator/replicator.c -M src/ssl-params/main.c -M src/ssl-params/ssl-params-settings.c -M src/ssl-params/ssl-params.c -M src/stats/client-export.c -M src/stats/client-reset.c -M src/stats/client.c -M src/stats/fifo-input-connection.c -M src/stats/global-memory.c -M src/stats/mail-command.c -M src/stats/mail-domain.c -M src/stats/mail-ip.c -M src/stats/mail-session.c -M src/stats/mail-stats.c -M src/stats/mail-user.c -M src/stats/main.c -M src/stats/stats-carbon.c -M src/stats/stats-settings.c -M src/util/gdbhelper.c -M src/util/maildirlock.c -M src/util/rawlog.c -M src/util/script-login.c -M src/util/script.c -M src/util/tcpwrap-settings.c -M src/util/tcpwrap.c -2017-01-11 01:57:46 +0100 Stephan Bosch (74d223d06) +2016-11-18 16:03:00 +0200 Timo Sirainen (551fef69c) + + imap: Fix recent flags importing when un-hibernating + + The initial RECENT counter that was sent didn't include pre-hibernation + \Recent flags. + + \Recent flags were also added for mails that were already expunged, which + could have caused recent counter to be wrong later on, and possibly + assert-crash with: + + Panic: file index-status.c: line 130 (index_storage_get_open_status): + assertion failed: (status_r->recent <= status_r->messages) + +M src/imap/imap-state.c + +2016-11-18 16:58:00 +0200 Timo Sirainen (591f83c40) + + lib-index: Improve errors - return reason in mail_transaction_log_refresh() + + +M src/lib-index/mail-transaction-log.c + +2016-11-18 16:52:31 +0200 Timo Sirainen (c0d1bfc45) + + lib-index: Improve errors - return reason in + mail_transaction_log_file_open() + + +M src/lib-index/mail-transaction-log-file.c +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log.c + +2016-11-18 16:41:18 +0200 Timo Sirainen (6321d9d33) + + lib-index: Add more information to "Missing middle file" error. + + +M src/lib-index/mail-index-modseq.c +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log-view.c +M src/lib-index/mail-transaction-log.c +M src/lib-index/test-mail-transaction-log-view.c + +2016-11-18 16:27:33 +0200 Timo Sirainen (8dfabfbc7) + + lib-index: mail_transaction_log_find_file() - remove wrong optimization. + + When opening the index, it's possible that: + + process A: .log is opened with seq=1 process B: Rotates the .log and writes + a new dovecot.index with + log_file_seq=2 process A: dovecot.index is opened. + mail_transaction_log_view_set() now + wants to file log_file_seq=2 with mail_transaction_log_find_file(), but + because open_count==0, the .log isn't refreshed. + +M src/lib-index/mail-transaction-log.c + +2016-11-18 16:15:59 +0200 Timo Sirainen (0fd7143c3) + + lib-index: Compiler warning fix + + +M src/lib-index/mail-index-map-read.c + +2016-11-18 15:46:39 +0200 Timo Sirainen (6ade0d762) + + lib-index: If mmap() fails, include the attempted size in the error. + + +M src/lib-index/mail-cache.c +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-transaction-log-file.c + +2016-11-18 15:39:45 +0200 Timo Sirainen (ac27e8405) + + lib-storage: Fix checking stub_seq failure in mailbox_save_set_uid() + + +M src/lib-storage/mail-storage.c + +2016-11-18 15:17:08 +0200 Timo Sirainen (e42e27fcc) + + sdbox: Implement support for mail stubs + + +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-single/sdbox-save.c + +2016-11-18 15:16:27 +0200 Timo Sirainen (61cae213d) + + lib-storage: Add support for storing "mail stubs" + + These allow treating a storage backend as a cache where the mail bodies + don't necessarily exist. + +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c +M src/lib-storage/mail-storage.h + +2016-11-18 14:10:02 +0200 Timo Sirainen (2f26f7521) - global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new - i_zero() macro. + imapc: %zu isn't standard, use PRIuSIZE_T instead. - Used the following script: - C_FILES=`git ls-files *.c` H_FILES=`git ls-files *.h` for F in "$C_FILES - $H_FILES"; do - echo "$F" - perl -p -i -e - 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' - $F - perl -p -i -e - 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F - perl -p -i -e - 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F - perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F - done +M src/lib-storage/index/imapc/imapc-storage.c + +2016-11-15 18:39:08 +0200 Timo Sirainen (a5b64f1ab) + + lib: Add connection.allow_empty_args_input + + This simplifies input_args() callbacks since they don't always have to check + for args[0] == NULL. This is enabled by default, because none of the current + users want it and it's somewhat unlikely there even will be those in future. + +M src/lib/connection.c +M src/lib/connection.h + +2016-11-17 15:59:02 -0500 Josef 'Jeff' Sipek (990d55ce3) + + lib-storage: fix index_mail_get_headers return value + + And make it more obvious that we're not setting the actual return value in + index_mail_get_first_header. + +M src/lib-storage/index/index-mail-headers.c + +2016-11-18 01:23:13 +0200 Timo Sirainen (b9da8540e) + + lib-index: Fix detecting whether caller synced everything in mailbox. + + When mailbox_index_sync_begin() was followed by _commit(), without _next()s + in the middle actually syncing the mailbox, the tail_offset was updated to + indicate that the mailbox was fully synced. Existing code didn't rely on + this, so it probably didn't break anything. + + This code hasn't worked for a long time, because log_view is always read + fully to the end in _sync_begin(). + +M src/lib-index/mail-index-sync.c + +2016-11-15 00:42:27 +0100 Timo Sirainen (30b849c26) + + lib-storage: Add mail_storage_service_user_get_pool() + + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h + +2016-11-15 00:41:38 +0100 Timo Sirainen (096e109f9) + + global: Replace some settings_parse_line() calls with + settings_parse_keyvalue() + -M src/auth/auth-request-var-expand.c -M src/auth/auth-request.c -M src/auth/auth-settings.c -M src/auth/db-dict.c -M src/auth/db-ldap.c -M src/auth/main.c -M src/auth/passdb-pam.c -M src/config/config-connection.c -M src/config/config-filter.c M src/config/config-parser.c -M src/config/doveconf.c -M src/config/old-set-parser.c -M src/dict/main.c -M src/director/login-connection.c -M src/doveadm/client-connection-http.c -M src/doveadm/client-connection.c -M src/doveadm/doveadm-auth-server.c -M src/doveadm/doveadm-auth.c -M src/doveadm/doveadm-cmd.c M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-fs.c -M src/doveadm/doveadm-kick.c -M src/doveadm/doveadm-log.c -M src/doveadm/doveadm-mail-batch.c -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail-mailbox-status.c -M src/doveadm/doveadm-mail-server.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mount.c -M src/doveadm/doveadm-penalty.c -M src/doveadm/doveadm-print-formatted.c -M src/doveadm/doveadm-print-json.c -M src/doveadm/doveadm-print.c -M src/doveadm/doveadm-pw.c -M src/doveadm/doveadm-stats.c -M src/doveadm/doveadm-util.c -M src/doveadm/doveadm-who.c -M src/doveadm/doveadm-zlib.c -M src/doveadm/doveadm.c -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-mails.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-mail.c -M src/doveadm/dsync/dsync-mailbox-export.c -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-tree-fill.c -M src/doveadm/dsync/dsync-transaction-log-scan.c -M src/doveadm/main.c -M src/doveadm/server-connection.c -M src/imap-hibernate/imap-hibernate-client.c -M src/imap-login/client-authenticate.c -M src/imap-login/imap-proxy.c -M src/imap-urlauth/imap-urlauth-worker.c -M src/imap-urlauth/imap-urlauth.c -M src/imap/cmd-fetch.c -M src/imap/cmd-notify.c -M src/imap/cmd-select.c -M src/imap/cmd-setmetadata.c -M src/imap/cmd-store.c -M src/imap/imap-client.c -M src/imap/imap-commands-util.c -M src/imap/imap-commands.c -M src/imap/imap-fetch.c -M src/imap/imap-master-client.c -M src/imap/imap-notify.c -M src/imap/imap-state.c -M src/imap/imap-status.c -M src/imap/main.c -M src/indexer/indexer-worker.c -M src/indexer/master-connection.c -M src/lda/main.c -M src/lib-auth/auth-master.c -M src/lib-auth/auth-server-connection.c -M src/lib-dcrypt/dcrypt-gnutls.c -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/test-crypto.c -M src/lib-dict-extra/dict-fs.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-db.c -M src/lib-dict/dict-memcached-ascii.c -M src/lib-dict/dict-memcached.c -M src/lib-dict/dict-sql-settings.c -M src/lib-dict/dict-sql.c -M src/lib-dict/dict.c -M src/lib-dns/dns-lookup.c -M src/lib-fs/fs-api.c -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-posix.c -M src/lib-fs/fs-test-async.c -M src/lib-fs/fs-test.c -M src/lib-fts/fts-icu.c -M src/lib-http/http-auth.c -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-host.c -M src/lib-http/http-client-request.c -M src/lib-http/http-client.c -M src/lib-http/http-date.c -M src/lib-http/http-message-parser.c -M src/lib-http/http-parser.c -M src/lib-http/http-request-parser.c -M src/lib-http/http-response-parser.c -M src/lib-http/http-response.c -M src/lib-http/http-server-connection.c -M src/lib-http/http-server-response.c -M src/lib-http/http-url.c -M src/lib-http/test-http-auth.c -M src/lib-http/test-http-client-errors.c -M src/lib-http/test-http-client.c -M src/lib-http/test-http-payload.c -M src/lib-http/test-http-response-parser.c -M src/lib-http/test-http-server-errors.c -M src/lib-http/test-http-server.c -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-storage/imap-metadata.c -M src/lib-imap-storage/imap-msgpart-url.c -M src/lib-imap-storage/imap-msgpart.c -M src/lib-imap-urlauth/imap-urlauth-backend.c -M src/lib-imap-urlauth/imap-urlauth-connection.c -M src/lib-imap-urlauth/imap-urlauth-fetch.c -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/imap-id.c -M src/lib-index/mail-cache-compress.c -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache-lookup.c -M src/lib-index/mail-cache-transaction.c -M src/lib-index/mail-index-alloc-cache.c -M src/lib-index/mail-index-fsck.c -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-map.c -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-strmap.c -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-keywords.c -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index-transaction-export.c -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/mail-index-transaction-view.c -M src/lib-index/mail-index-transaction.c -M src/lib-index/mail-index-view-sync.c -M src/lib-index/mail-index-view.c -M src/lib-index/mail-index.c -M src/lib-index/mail-transaction-log-append.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log.c -M src/lib-index/test-mail-index-map.c -M src/lib-index/test-mail-index-sync-ext.c -M src/lib-index/test-mail-index-transaction-finish.c -M src/lib-index/test-mail-transaction-log-view.c -M src/lib-lda/duplicate.c -M src/lib-lda/mail-deliver.c -M src/lib-lda/smtp-client.c -M src/lib-ldap/ldap-compare.c -M src/lib-ldap/ldap-connection.c -M src/lib-mail/istream-attachment-extractor.c -M src/lib-mail/mbox-from.c -M src/lib-mail/message-address.c -M src/lib-mail/message-date.c -M src/lib-mail/message-header-decode.c -M src/lib-mail/message-header-parser.c -M src/lib-mail/message-parser.c -M src/lib-mail/message-part-serialize.c -M src/lib-mail/message-search.c -M src/lib-mail/message-snippet.c -M src/lib-mail/rfc2231-parser.c -M src/lib-mail/rfc822-parser.c -M src/lib-mail/test-istream-attachment.c -M src/lib-mail/test-message-decoder.c -M src/lib-mail/test-message-header-hash.c -M src/lib-mail/test-message-search.c -M src/lib-master/master-auth.c -M src/lib-master/master-login.c -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-ssl.c -M src/lib-master/master-service.c -M src/lib-master/mountpoint-list.c -M src/lib-master/test-master-service-settings-cache.c -M src/lib-ntlm/ntlm-message.c +M src/lib-storage/mail-storage-service.c + +2016-11-15 00:36:57 +0100 Timo Sirainen (e5ce686a6) + + lib-settings: Add settings_parse_keyvalue() + + M src/lib-settings/settings-parser.c -M src/lib-settings/settings.c -M src/lib-smtp/lmtp-client.c -M src/lib-sql/driver-cassandra.c -M src/lib-ssl-iostream/iostream-ssl.c -M src/lib-storage/index/dbox-common/dbox-save.c -M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c -M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib-storage/index/dbox-multi/mdbox-save.c -M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c +M src/lib-settings/settings-parser.h + +2016-11-14 23:32:05 +0100 Timo Sirainen (16402358d) + + lib-settings: Avoid duplicating settings' values when not needed + + +M src/lib-settings/settings-parser.c +M src/lib-settings/settings-parser.h + +2016-11-14 22:57:41 +0100 Timo Sirainen (431fb3b0f) + + imapc: Use struct mail_namespace.user_set + + M src/lib-storage/index/imapc/imapc-list.c + +2016-11-14 22:43:07 +0100 Timo Sirainen (46e917c9f) + + lib-storage: Add mail_namespace_get_driver_settings() and use it. + + It obsoletes mail_storage_get_driver_settings(). + +M src/lib-storage/index/dbox-multi/mdbox-storage.c M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/index-attachment.c -M src/lib-storage/index/index-attribute.c -M src/lib-storage/index/index-mail-binary.c -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/index/index-pop3-uidl.c -M src/lib-storage/index/index-rebuild.c -M src/lib-storage/index/index-search-result.c -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-sort-string.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-sync-changes.c -M src/lib-storage/index/index-sync.c -M src/lib-storage/index/index-thread-finish.c -M src/lib-storage/index/index-thread.c -M src/lib-storage/index/index-transaction.c -M src/lib-storage/index/maildir/maildir-copy.c -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/index/maildir/maildir-sync-index.c -M src/lib-storage/index/maildir/maildir-uidlist.c -M src/lib-storage/index/mbox/mbox-lock.c -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/index/mbox/mbox-sync-list-index.c -M src/lib-storage/index/mbox/mbox-sync-parse.c -M src/lib-storage/index/mbox/mbox-sync-rewrite.c -M src/lib-storage/index/mbox/mbox-sync.c -M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/index/maildir/maildir-storage.c +M src/lib-storage/index/mbox/mbox-storage.c M src/lib-storage/index/pop3c/pop3c-storage.c -M src/lib-storage/index/pop3c/pop3c-sync.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/list/mailbox-list-notify-tree.c -M src/lib-storage/list/mailbox-list-subscriptions.c -M src/lib-storage/list/subscription-file.c -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/mail-search-build.c -M src/lib-storage/mail-storage-hooks.c -M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2016-11-14 22:32:42 +0100 Timo Sirainen (5b82f3b2f) + + lib-storage: Add struct mail_namespace.user_set + + +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-namespace.h + +2016-11-14 18:34:02 +0100 Timo Sirainen (2c067d5cd) + + lib-storage: Use mail_namespace_alloc() for mail_namespaces_init_location() + + Based on patch by Jeff Sipek + +M src/lib-storage/mail-namespace.c + +2016-11-14 18:33:37 +0100 Timo Sirainen (aafbaa45a) + + lib-storage: Add mail_namespace_alloc() + + This makes it easier to create new namespaces. Based on patch by Jeff Sipek + +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-namespace.h + +2016-11-10 13:19:05 +0200 Timo Sirainen (045d5940e) + + lib-storage: Add asserts to make sure mailbox_header_lookup_ctx is used + correctly. + + +M src/lib-storage/index/index-mail-headers.c M src/lib-storage/mail-storage.c -M src/lib-storage/mail-user.c -M src/lib-storage/mailbox-attribute.c -M src/lib-storage/mailbox-list.c -M src/lib/buffer.c -M src/lib/connection.c -M src/lib/failures.c -M src/lib/fd-close-on-exec.c -M src/lib/file-dotlock.c -M src/lib/file-lock.c -M src/lib/file-set-size.c -M src/lib/ioloop-epoll.c -M src/lib/ioloop.c -M src/lib/iso8601-date.c -M src/lib/istream-sized.c -M src/lib/istream.c -M src/lib/lib-signals.c -M src/lib/md4.c -M src/lib/md5.c -M src/lib/mempool-alloconly.c -M src/lib/mountpoint.c -M src/lib/net.c -M src/lib/ostream.c -M src/lib/restrict-access.c -M src/lib/sendfile-util.c -M src/lib/seq-range-array.c -M src/lib/sha3.c -M src/lib/test-ioloop.c -M src/lib/test-utc-mktime.c -M src/lib/timing.c -M src/lib/uri-util.c -M src/lib/var-expand.c -M src/lmtp/client.c -M src/lmtp/commands.c -M src/lmtp/lmtp-proxy.c -M src/lmtp/main.c -M src/log/log-connection.c -M src/login-common/client-common-auth.c -M src/login-common/login-proxy-state.c -M src/login-common/login-settings.c -M src/login-common/main.c -M src/login-common/sasl-server.c -M src/login-common/ssl-proxy-openssl.c -M src/master/main.c -M src/master/service-listen.c -M src/master/service-log.c -M src/master/service-monitor.c -M src/plugins/acl/acl-api.c -M src/plugins/acl/acl-attributes.c -M src/plugins/acl/acl-backend-vfile-update.c -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/acl/acl-global-file.c -M src/plugins/acl/acl-mailbox-list.c -M src/plugins/acl/acl-mailbox.c -M src/plugins/acl/doveadm-acl.c -M src/plugins/dict-ldap/dict-ldap-settings.c -M src/plugins/dict-ldap/dict-ldap.c -M src/plugins/expire/doveadm-expire.c -M src/plugins/expire/expire-plugin.c -M src/plugins/fts-lucene/doveadm-fts-lucene.c -M src/plugins/fts-solr/fts-backend-solr.c -M src/plugins/fts-solr/solr-connection.c -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-uidlist.c -M src/plugins/fts/doveadm-fts.c -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-build-mail.c -M src/plugins/fts/fts-parser-tika.c -M src/plugins/fts/fts-search.c -M src/plugins/fts/xml2text.c -M src/plugins/imap-acl/imap-acl-plugin.c -M src/plugins/last-login/last-login-plugin.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c -M src/plugins/mail-crypt/mail-crypt-global-key.c -M src/plugins/mail-crypt/mail-crypt-plugin.c -M src/plugins/mail-crypt/mail-crypt-pluginenv.c -M src/plugins/mail-crypt/test-mail-global-key.c -M src/plugins/mail-crypt/test-mail-key.c -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/push-notification/push-notification-driver-ox.c -M src/plugins/push-notification/push-notification-event-flagsclear.c -M src/plugins/push-notification/push-notification-event-flagsset.c -M src/plugins/push-notification/push-notification-event-messageappend.c -M src/plugins/push-notification/push-notification-event-messagenew.c -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/doveadm-quota.c -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota-status.c -M src/plugins/quota/quota-util.c -M src/plugins/quota/quota.c -M src/plugins/quota/test-quota-util.c -M src/plugins/stats/mail-stats-fill.c -M src/plugins/virtual/virtual-config.c -M src/plugins/virtual/virtual-mail.c -M src/plugins/virtual/virtual-search.c -M src/plugins/virtual/virtual-sync.c -M src/plugins/zlib/zlib-plugin.c -M src/pop3-login/pop3-proxy.c -M src/pop3/main.c -M src/replication/replicator/replicator-queue-auth.c -M src/replication/replicator/replicator-queue.c -M src/stats/client-export.c -M src/stats/client-reset.c -M src/stats/main.c -M src/util/script-login.c +M src/lib-storage/mail.c + +2016-11-14 17:41:23 +0100 Timo Sirainen (9e6d83a3e) + + lib-index: Added mail_index_transaction_get_highest_modseq() + + +M src/lib-index/mail-index-transaction-export.c +M src/lib-index/mail-index-transaction-finish.c +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/mail-index-transaction.c +M src/lib-index/mail-index.h +M src/lib-index/mail-transaction-log-file.c + +2016-11-14 17:37:31 +0100 Timo Sirainen (a42d489d9) + + lib-index: Added internal mail_index_transaction_finish_so_far() + + This can be called multiple times before mail_index_transaction_finish(). + It's going to perform all the work of reordering mails and dropping + unnecessary changes that can be done before changing sequences to UIDs. + + This will be needed for the following patch that implements + mail_index_transaction_get_highest_modseq(). + +M src/lib-index/mail-index-transaction-finish.c +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/test-mail-index-transaction-finish.c + +2016-11-14 17:22:53 +0100 Timo Sirainen (f09d03446) + + lib-index: Assert if mail_index_transaction_sort_appends() sees any uid==0 + + Every mail must have an UID at this stage. + +M src/lib-index/mail-index-transaction-sort-appends.c + +2016-10-31 10:49:38 +0000 Paul Howarth (0793a1dbd) + + configure: Fix build with old OpenSSL without SSL_clear_options + + SSL_clear_options was introduced in OpenSSL 0.9.8m but may be backported to + older versions in "enterprise" OS releases, so a version check is + insufficient here. + + It was originally implemented as a macro but is a function in more recent + OpenSSL versions, so a test that works for both cases is needed. + +M m4/ssl.m4 +M src/lib-ssl-iostream/iostream-openssl.c + +2016-11-17 17:13:09 +0200 Timo Sirainen (57dd2621d) + + lib-index: Make sure an already-corrupted index/log isn't written + + +M src/lib-index/mail-index-write.c +M src/lib-index/mail-transaction-log-file.c + +2016-09-15 11:34:30 +0300 Aki Tuomi (f7060b849) + + lib: Add test for iostream-proxy -2017-01-10 19:23:30 +0200 Timo Sirainen (b2fa20bf1) - configure: Link libsmtp before libdns +M src/lib/Makefile.am +A src/lib/test-iostream-proxy.c +M src/lib/test-lib.inc - Fixes linking LIBDOVECOT when using .a libraries +2016-09-15 11:33:01 +0300 Aki Tuomi (26e7bc65f) -M configure.ac + lib: Add iostream-proxy -2016-05-06 21:43:04 +0300 Timo Sirainen (874706498) + iostream-proxy proxies data between two pairs of istream/ostream. - lib-settings: Added settings_get_time_msecs() +M src/lib/Makefile.am +A src/lib/iostream-proxy.c +A src/lib/iostream-proxy.h +2016-09-15 14:33:10 +0300 Aki Tuomi (4d9181518) -M src/lib-settings/Makefile.am -M src/lib-settings/settings-parser.c -M src/lib-settings/settings-parser.h -A src/lib-settings/test-settings-parser.c + lib: Add tests for iostream-pump -2017-01-10 14:45:20 +0200 Timo Sirainen (b4b4f8de5) - lib-storage: Compile & indent fix for previous change. +M src/lib/Makefile.am +A src/lib/test-iostream-pump.c +M src/lib/test-lib.inc +2016-09-15 13:57:46 +0300 Aki Tuomi (08c0bffa1) -M src/lib-storage/index/index-mail-headers.c + lib: Add iostream-pump -2017-01-05 10:50:55 +0200 Aki Tuomi (01129c57c) - lib-storage: Prevent recursion in header parsing +M src/lib/Makefile.am +A src/lib/iostream-pump.c +A src/lib/iostream-pump.h - If header parsing error occurs and error handling tries to get fields, such - as Message-ID, it will cause crash. This fixes problem by preventing reading - from non-cached headers while they are being parsed. +2016-11-17 02:48:20 +0200 Timo Sirainen (08b9350b1) - Fixes lmtp: Panic: file ../../../src/lib/array.h: line 219 (array_idx_i): - assertion failed: (idx * array->element_size < array->buffer->used) + imapc: Fix assert-crash when deleting mailbox triggers + mailbox_get_open_status(). -M src/lib-storage/index/index-mail-headers.c + For example vsize header updating triggers this. -2017-01-09 17:48:56 +0200 Timo Sirainen (4ca3356e3) + Fixes: Panic: file mail-storage.c: line 1683: unreached - cassandra: Support configuring heartbeat_interval and idle_timeout +M src/lib-storage/index/imapc/imapc-storage.c +2016-11-16 21:40:37 +0200 Timo Sirainen (0f242c946) -M src/lib-sql/driver-cassandra.c + lib-storage: Fix compiler warnings about enum mismatches -2017-01-09 20:31:35 +0200 Timo Sirainen (0787b7626) - cassandra: Add support for "bigint" value type. +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-sync.c +2016-11-16 21:36:17 +0200 Timo Sirainen (aeef47104) -M src/lib-sql/driver-cassandra.c + master: Fix compiling with systemd after /dev/null changes -2017-01-09 22:39:09 +0200 Timo Sirainen (d165b7014) - dict-client: When failing to resend commands after reconnect, their success - is uncertain. +M src/master/service-listen.c - It's possible that the writes before the disconnection did actually finish - successfully. If any of them were commits, we need to return - DICT_COMMIT_RET_WRITE_UNCERTAIN. +2016-11-16 03:11:30 +0200 Timo Sirainen (83d0c8152) -M src/lib-dict/dict-client.c + LAYOUT=index: Try to rename corrupted mailbox name during mailbox open. -2017-01-09 17:05:14 +0200 Timo Sirainen (aed6c42a0) - dict-sql: Support transaction timestamps with Cassandra driver +M src/lib-storage/list/mailbox-list-index-backend.c +2016-11-16 03:10:10 +0200 Timo Sirainen (540555c5b) -M src/lib-dict/dict-sql.c + lib-storage: Added struct mailbox.corrupted_mailbox_name + + This allows backends that are adding lost mailboxes to mailbox list index to + indicate that they don't actually know the name of the mailbox, and the + mailbox list index should try to figure it out and rename the mailbox to its + proper name. -2017-01-09 19:16:04 +0200 Timo Sirainen (f528d54a7) +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/mail-storage-private.h - dict-client: Pass through transaction timestamp to dict-server +2016-11-16 03:06:31 +0200 Timo Sirainen (85cbe5d66) + LAYOUT=index: Don't write corrupted mailbox names to box-name header. -M src/dict/dict-commands.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h + This way when opening a mailbox the box-name header isn't overwritten by a + corrupted name. -2017-01-09 16:55:45 +0200 Timo Sirainen (293e9fc61) + Keep track of the corrupted names with + MAILBOX_LIST_INDEX_FLAG_CORRUPTED_NAME flag in list index records. The flag + isn't removed until the mailbox is renamed. - lib-dict: Add dict_transaction_set_timestamp() +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h +2016-11-16 03:01:22 +0200 Timo Sirainen (635f41c84) -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c -M src/lib-dict/dict.h + lib-storage: Preserve box-name header when rebuilding index. -2017-01-09 19:10:25 +0200 Timo Sirainen (a007cfc11) - dict-ldap|fs: Explicitly specify used dict_vfuncs methods. +M src/lib-storage/index/index-rebuild.c - This was done for other dict drivers in - ade5567577dadb0b275c840208d3ad21a9f00a36 +2016-11-16 01:44:58 +0200 Timo Sirainen (8463c8976) -M src/lib-dict-extra/dict-fs.c -M src/plugins/dict-ldap/dict-ldap.c + doveadm dump: Add support for the new box-name index header. -2016-12-29 13:17:57 -0500 Timo Sirainen (52336da96) - config: Fix checking if (97a5e150c) -M src/config/config-parser.c + LAYOUT=index: Update mailbox name to mailbox index's header when opening. -2017-01-09 15:12:48 +0200 Timo Sirainen (2d0fd3efe) + This way if the mailbox list index gets lost, a recent mailbox name is still + available. - lmtp: Don't deliver truncated email when client disconnects before "." line +M src/lib-storage/index/index-storage.c +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/mail-storage-private.h - This didn't happen always, because the EOF was handled in two different - places in different ways. +2016-11-16 01:09:57 +0200 Timo Sirainen (606e38802) -M src/lmtp/commands.c + lib-storage: Prevent renaming mailbox under itself. -2017-01-10 15:55:17 +0200 Timo Sirainen (ecb3be182) + This resulted earlier in a loop, which broke the mailbox index. Note that + IMAP already prevented this, so it could only be triggered by other tools, + like doveadm. - auth: Fix compiling tests +M src/lib-storage/list/mailbox-list-index-backend.c +2016-11-16 01:04:18 +0200 Timo Sirainen (bcfeddf8c) -M src/auth/Makefile.am + lib-storage: Prevent parent loops in mailbox list index -2017-01-09 09:57:58 +0200 Aki Tuomi (0f3c4b967) - auth-policy: Add missing settings +M src/lib-storage/list/mailbox-list-index.c +2016-11-16 01:03:20 +0200 Timo Sirainen (9130eda2e) -M src/auth/auth-settings.c -M src/auth/auth-settings.h + lib-storage: Fix invalid parents in LAYOUT=index -2017-01-08 20:09:33 +0200 Aki Tuomi (135600fbe) + Previously it just kept complaining without fixing the errors. - auth-policy: Enable SSL connections +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h +2016-11-16 01:01:58 +0200 Timo Sirainen (48baf3ac1) -M src/auth/Makefile.am -M src/auth/auth-policy.c + lib-storage: Improve mailbox list index corruption errors -2016-12-30 16:20:12 +0100 Stephan Bosch (81fdd616e) - lib-lda: Moved LMTP client to lib-smtp. +M src/lib-storage/list/mailbox-list-index.c - This makes the LMTP client available without dependency on lib-storage. For - Dovecot v2.3, the newly created lib-smtp will evolve into a full - client/server SMTP implementation. That will then remove the remaining SMTP - code from lib-lda. +2016-11-16 00:57:06 +0200 Timo Sirainen (b94bcc82e) -M configure.ac -M dovecot-config.in.in -M src/Makefile.am -M src/lib-lda/Makefile.am -A src/lib-smtp/Makefile.am -R100 src/lib-lda/lmtp-client.c src/lib-smtp/lmtp-client.c -R100 src/lib-lda/lmtp-client.h src/lib-smtp/lmtp-client.h -M src/lmtp/Makefile.am + lib-storage: If LAYOUT=index loses mailbox names, write the generated ones + to index. + + Previously it just kept complaining and regenerating new names, without + actually fixing up the situation. + +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/list/mailbox-list-index.c +M src/lib-storage/list/mailbox-list-index.h + +2016-11-16 00:55:38 +0200 Timo Sirainen (7e3ef84df) + + lib-storage: Fix handling LAYOUT=index losing mailbox names + + It lost all the mailbox names. + +M src/lib-storage/list/mailbox-list-index.c + +2016-11-11 13:40:55 +0200 Aki Tuomi (6baee5cd0) + + config: Match local_name using dns-util + + This way it correctly handles wildcards. + +M src/config/Makefile.am +M src/config/config-filter.c + +2016-11-11 13:36:23 +0200 Aki Tuomi (a7f58d28d) + + lib-dns: Add tests for dns-util + + +M src/lib-dns/Makefile.am +A src/lib-dns/test-dns-util.c + +2016-11-11 13:13:29 +0200 Aki Tuomi (7cb5a6d1f) + + lib-dns: Add DNS specific matching algorithms + + RFC4343 and RFCRFC4592 compare and match algorithms + +M src/lib-dns/Makefile.am +A src/lib-dns/dns-util.c +A src/lib-dns/dns-util.h + +2016-11-16 12:47:59 +0200 Aki Tuomi (2ba5c38d7) + + imap: Use correct format specifier for highestmodseq + + +M src/imap/imap-state.c + +2016-11-16 13:29:49 +0200 Timo Sirainen (faee56682) + + lib-index: Fix flushing NFS if minimum wanted transaction log file is lost + + +M src/lib-index/mail-transaction-log-view.c + +2016-11-15 18:55:36 +0200 Aki Tuomi (6028ef7bd) + + imap: Add details why unhibernation failed + + This can help understanding why client failed to unhibernate. + +M src/imap/imap-state.c + +2016-11-16 11:41:42 +0200 Timo Sirainen (33a806228) + + global: Use fd_close_maybe_stdio() + + +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/imap-client.c +M src/lib/connection.c +M src/lmtp/client.c +M src/pop3/pop3-client.c + +2016-11-16 11:40:35 +0200 Timo Sirainen (1e766413c) + + lib: Add fd_close_maybe_stdio() + + The idea is that this should be used whenever closing fds that may be 0 or + 1. If they are closed normally, the following code may end up using 0/1 fd + for other purposes, which could cause problems. + +M src/lib/lib.c +M src/lib/lib.h + +2016-11-16 11:37:34 +0200 Timo Sirainen (41ee23907) + + global: use dev_null_fd instead of opening /dev/null + + +M src/lib-program-client/program-client-local.c +M src/lib/module-dir.c +M src/master/common.h +M src/master/main.c +M src/master/service-process.c + +2016-11-16 11:35:42 +0200 Timo Sirainen (be7c7c4e9) + + master: Don't unlink login sockets at startup if someone is listening to + them. + + The original check there never worked, because null_fd was always set. + + Normally the master.pid file would prevent this happening, but if it didn't + exist, the sockets would be unlinked and usually also created back. + +M src/master/common.h +M src/master/main.c +M src/master/master-settings.c + +2016-11-16 11:17:27 +0200 Timo Sirainen (253000d6d) + + lib-master: Revert redundant stdin/stdout/stderr fd checks + + This is now done by lib_init() in a bit nicer way. + + Reverts 08923d2c956ece3dc604d5842ba152c2bdb11fb9 + +M src/lib-master/master-service.c + +2016-11-16 11:09:01 +0200 Timo Sirainen (05475b831) + + lib: Make sure stdin/stdout/stderr have fd at startup and keep /dev/null + always open + + This guarantees we will always have a fd that can be used as /dev/null. It + works even inside chroots. + +M src/lib/lib.c +M src/lib/lib.h + +2016-11-15 23:56:19 +0200 Timo Sirainen (34742a4b9) + + Fix -Wstrict-bool compiler warnings. + + +M src/lib-index/mail-index-sync-update.c +M src/lib/sha3.c + +2016-11-03 15:30:58 +0200 Aki Tuomi (0bff25fd3) -2016-10-28 21:34:41 +0300 Timo Sirainen (c6c29760a) + doveadm-save: Check stream errno before save - configure: Fix link ordering + This is to ensure the file has been really opened. - libprogram_client.la needs to be before libdns.la +M src/doveadm/doveadm-mail-save.c -M configure.ac +2016-11-15 09:06:10 -0500 Josef 'Jeff' Sipek (ed96188c7) -2017-01-10 13:29:34 +0200 Timo Sirainen (2eb0ef7f1) + lib: fix data stack marker generation - director: Fix assert-crash when flush script takes too long + The line number wasn't getting expanded. - Fixes: Panic: file director.c: line 966 (director_user_move_timeout): - assertion failed: (user->kill_ctx->kill_state != USER_KILL_STATE_FLUSHING) +M src/lib/data-stack.h -M src/director/director.c +2016-11-13 20:04:27 +0200 Apollon Oikonomopoulos (b4884ca2e) -2017-01-09 23:04:22 +0200 Timo Sirainen (6d887ec8e) + Manually cleanup OpenSSL from dovecot_openssl_common_global_unref() - lib-program-client: Fix crash after disconnecting client. + OpenSSL 1.1 features a cleanup function that is automatically run on + shutdown using atexit(3). This function frees all OpenSSL-allocated + resources. + In dovecot, OpenSSL is loaded indirectly using dlopen(3) against the + relevant dovecot crypto module and is finally unloaded using dlclose(3). + Until OpenSSL 1.0.1c this worked fine, however OpenSSL 1.0.1c makes sure[1] + that the library stays loaded after the initial dlclose() so that the + atexit(3) handlers can run on shutdown. This, together with the fact that + dovecot uses custom allocation functions for OpenSSL and has already + partially free()'d some of OpenSSL's resources in module_free(), leads to a + segfault at process shutdown[2]. -M src/lib-program-client/program-client.c + We fix this by explicitly calling OPENSSL_cleanup() during module unload. + This is safe to do, as long as we will never want to subsequently + re-initialize OpenSSL. -2017-01-09 21:57:39 +0200 Timo Sirainen (8486bada8) + [1] + https://github.com/openssl/openssl/commit/4af9f7fe79ff82b90c16969b7e5871435056377b + [2] + https://buildd.debian.org/status/fetch.php?pkg=dovecot&arch=amd64&ver=1:2.2.26.0-2&stamp=1478873022 - dict-client: Log slightly different error when it's uncertain if commit - failed + Signed-off-by: Apollon Oikonomopoulos +M src/lib-ssl-iostream/dovecot-openssl-common.c -M src/lib-dict/dict-client.c +2016-11-15 12:55:44 +0100 Apollon Oikonomopoulos (7a6197f90) -2017-01-04 14:02:28 -0800 Greg C (5a2358dc3) + ssl: fix reference to SSLv2 and disable SSLv3 - auth-policy: hashed_password will always be blank, tell buffer it has data - so str_len works when converting to hex + This is driven by the fact that OpenSSL 1.1 does not know about SSLv2 at all + and dovecot's defaults simply make OpenSSL error out with "Unknown protocol + 'SSLv2'"[1]. So we change the defaults to refer to SSLv2 iff OpenSSL seems + to know something about it. + While at it, it's also a good idea to disable SSLv3 by default as well. -M src/auth/auth-policy.c + [1] https://bugs.debian.org/844347 -2017-01-08 18:44:32 +0200 Aki Tuomi (42d12a375) + Signed-off-by: Apollon Oikonomopoulos - lib-program-client: Do not call program_client_fail twice +M doc/example-config/conf.d/10-ssl.conf +M src/lib-master/master-service-ssl-settings.c - Fixes crash in program-client caused by use of freed memory. +2016-11-15 11:42:47 +0100 Timo Sirainen (92f66f98f) -M src/lib-program-client/program-client.c + lib-http: Use io_wait_timer for tracking wait times. -2016-12-25 10:14:07 +0200 Aki Tuomi (d2cc2b022) + The previous code was completely incorrect, since it wasn't even tracking + the HTTP request's start usecs. - istream-mmap: Mark stream eof on error and copy errno +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c +2016-11-15 11:41:53 +0100 Timo Sirainen (6d5a7004a) -M src/lib/istream-mmap.c + dict-client: Use io_wait_timer for tracking wait times. -2016-12-16 20:27:09 +0200 Martti Rannanjärvi (0a7caaa6f) + This way the "dict wait" time includes all ioloop waits that wait on the + dict-client, not just in dict_wait(). - lib, lib-http: add HTTP_URL_ALLOW_PCT_NUL flag +M src/lib-dict/dict-client.c - This allows a URL to contain %00. +2016-11-15 11:21:56 +0100 Timo Sirainen (64f5f4f0e) -M src/lib-http/http-url.c -M src/lib-http/http-url.h -M src/lib/uri-util.c -M src/lib/uri-util.h + lib: Added io_wait_timer -2016-12-27 14:01:14 +0200 Aki Tuomi (79a26b1b7) + This allows easier tracking of how much time the io_wait_timer has been + spending on (multiple) ioloops. - autoexpunge: Consider last_rename_stamp on expunge +M src/lib/ioloop-private.h +M src/lib/ioloop.c +M src/lib/ioloop.h - When expunging by saved date, see if last_rename_stamp is more recent than - saved date, and use that instead. +2016-11-15 11:20:41 +0100 Timo Sirainen (3809334f9) - This prevents mails getting deleted on a folder that was just renamed, the - user probably expects autoexpunge to consider these emails as fresh. + lib: Code cleanup - move code to ioloop_add_wait_time() -M src/lib-storage/mail-autoexpunge.c -2016-12-28 22:45:22 +0200 Aki Tuomi (b88c159f0) +M src/lib/ioloop.c - index-storage: Update mailbox last_rename_stamp on rename +2016-11-15 11:11:37 +0100 Timo Sirainen (bd3f036fd) + lib: Fix ioloop wait times when io_loop_time_refresh() is used -M src/lib-storage/index/index-storage.c -M src/lib-storage/mail-storage-private.h -2016-12-27 15:03:51 -0500 Josef 'Jeff' Sipek (34f7cc3df) +M src/lib/ioloop-private.h +M src/lib/ioloop.c - lib-mail: header filter should call callback for added EOH +2016-11-15 20:10:43 +0200 Aki Tuomi (2dbb7b30d) - If we add a EOH because there wasn't one and HEADER_FILTER_ADD_MISSING_EOH - was specified, we should invoke the callback for it. Otherwise, it is - unnecessarily difficult for consumers to add a header since there is no way - to know if EOH will be present ahead of time. + doveadm: Put doveadm_mail_iter_init parameters to right order -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c -2016-12-28 10:49:49 -0500 Josef 'Jeff' Sipek (e41845d13) +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-mail-flags.c - lib-mail: refactor header filter test code +2016-11-15 13:40:54 +0200 Aki Tuomi (ede2466e3) + lib-storage: Add vsize hdr on empty mailbox -M src/lib-mail/test-istream-header-filter.c -2016-12-21 07:53:52 +0200 Martti Rannanjärvi (c8a0f015f) +M src/lib-storage/index/index-mailbox-size.c - lib-compression: use LZ4_compress_default if can +2016-11-15 13:17:05 +0200 Aki Tuomi (a25320031) - LZ4_compress is deprecated. + doveadm-director: Include tag in add line -M configure.ac -M src/lib-compression/ostream-lz4.c -2016-12-18 12:03:10 +0200 Timo Sirainen (963da01fa) +M src/doveadm/doveadm-director.c - lib-storage: Update mail_get_headers() API comment +2016-11-15 09:33:15 +0200 Aki Tuomi (22728b92a) - The API was changed by 990d55ce3fc461eeacce3ef830b1c5dde5c3f150 + doveadm-import: Open source boxes read-only -M src/lib-storage/mail-storage.h + This allows importing emails from read-only locations, such as backups. -2016-12-18 13:20:20 +0100 Stephan Bosch (365096bcd) +M src/doveadm/doveadm-mail-import.c - lib: Created i_zero() wrapper for memset(p, 0, sizeof(*p)). +2016-11-15 09:32:31 +0200 Aki Tuomi (00b10a9ca) - Also creates an i_zero_safe() version for safe_memset(). + doveadm: Add open read-only parameter to mailbox iterator -M src/lib/macros.h + This allows iterating mailboxes so that they are opened for read-only. -2016-12-23 13:58:38 -0800 Nick Wallingford (15964b74c) +M src/doveadm/doveadm-mail-altmove.c +M src/doveadm/doveadm-mail-copymove.c +M src/doveadm/doveadm-mail-deduplicate.c +M src/doveadm/doveadm-mail-expunge.c +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-mail-flags.c +M src/doveadm/doveadm-mail-import.c +M src/doveadm/doveadm-mail-iter.c +M src/doveadm/doveadm-mail-iter.h +M src/doveadm/doveadm-mail-search.c - Fix link failure against libressl. +2016-11-06 02:50:52 +0200 Aki Tuomi (4d615d259) + stats: Add support for carbon-server -M src/lib-ssl-iostream/dovecot-openssl-common.c + Allows admin to specify stats_carbon_server=ip:port. Stats are delivered in + "key value" format to specified port. Can be received with e.g. metronome. -2016-04-12 13:08:05 +0300 Baofeng (cf3612963) +M src/stats/Makefile.am +M src/stats/mail-stats.c +M src/stats/mail-stats.h +A src/stats/stats-carbon.c +A src/stats/stats-carbon.h +M src/stats/stats-settings.c +M src/stats/stats-settings.h - storage: do NOT feed p_strconcat() with NULL. +2016-11-09 15:18:49 +0200 Aki Tuomi (1b6f7fc2c) - p_strconcat will never take NULL as an valid argument. So - ns->list->set.alt_dir has to be checked NULL. + lib-program-client: Use net_ipport2str -M src/lib-storage/index/dbox-multi/mdbox-storage.c -2016-12-19 15:31:50 +0200 Timo Sirainen (1997fe1ce) +M src/lib-program-client/program-client-remote.c - lib-index: Fix assert-crash if .log creation unexpectedly fails at the end +2016-11-09 15:17:01 +0200 Aki Tuomi (727d691bb) - Pretty much the only reason for this to happen is if the index directory was - deleted while another process still had the index open. Even this doesn't - normally trigger this crash, because there are other checks earlier that - usually catch it. So it crashes only in some race conditions. + lib: Add net_ipport2str - Fixes: Error: rename(.../dovecot.index.log.newlock, .../dovecot.index.log) - failed: No such file or directory Panic: file mail-transaction-log-file.c: - line 105 (mail_transaction_log_file_free): assertion failed: (!file->locked) + Converts struct ip_addr + port into either 127.0.0.1:6000 or [::1]:6000. -M src/lib-index/mail-transaction-log-file.c +M src/lib/net.c +M src/lib/net.h -2016-12-20 13:40:17 +0200 Martti Rannanjärvi (768669785) +2016-11-14 10:52:22 +0200 Aki Tuomi (ece150f1b) - stats: use o_stream_nsend in client-export + doveadm: Fix error reporting for doveadm-dump-dcrypt -M src/stats/client-export.c +M src/doveadm/doveadm-dump-dcrypt-file.c +M src/doveadm/doveadm-dump-dcrypt-key.c -2016-12-22 11:58:29 -0500 Timo Sirainen (2068fde31) +2016-11-14 14:54:37 +0100 Timo Sirainen (8638c3723) - fs-randomfail: Fix failure handling for fs_read() + lib: Assert-crash in i_close_fd() if fd == 0 + lib-master now guarantees that fd==0 doesn't normally happen. -M src/lib-fs/fs-randomfail.c +M src/lib/macros.h -2016-12-21 20:56:58 +0200 Timo Sirainen (2422b561f) +2016-11-14 14:51:45 +0100 Timo Sirainen (5a0b58bfc) - lib-index: Fix checking if cache file becomes >4GB + master: Remove redundant check to guarantee stdin/stdout/stderr fd + existence. + The previous method also wasn't correct, since it was setting close-on-exec + flag for the fds. Although this didn't normally make any difference, since + stdin & stdout was explicitly dup2()ed to /dev/null and for all except the + log process stderr was also being dup2()ed. -M src/lib-index/mail-cache.c +M src/master/main.c -2016-12-20 13:34:43 +0200 Martti Rannanjärvi (9f6ad59ac) +2016-11-14 14:48:20 +0100 Timo Sirainen (08923d2c9) - imap: use o_stream_nsend when not checking failure + lib-master: Make sure stdin/stdout/stderr fds are open. + We'll just open /dev/null for them if they don't already exist. -M src/imap/cmd-getmetadata.c -M src/imap/cmd-thread.c -M src/imap/imap-master-client.c +M src/lib-master/master-service.c -2016-12-20 10:03:40 +0200 Martti Rannanjärvi (68a71b355) +2016-11-14 16:45:24 +0200 Aki Tuomi (a85c629c5) - replication: ignore o_stream_send errors in doveadm-connection + lib: Mark istream with eof=TRUE on all errors + Previously only i_stream_read() did this, but i_stream_seek(), _stat(), + _get_size() and _create() didn't. This caused assert-crashes on error + conditions in code which assumed that when stream_errno != 0, eof==TRUE. -M src/replication/replicator/doveadm-connection.c +M src/lib/istream.c -2016-12-22 11:53:06 -0500 Timo Sirainen (50593e229) +2016-10-26 11:03:55 +0300 Aki Tuomi (fa3fc0b4c) - lib-mail: message_binary_part_deserialize(): Return error if body line count - is too large + quota: Use program-client for quota-warning scripts - The input was unsigned int, so output must also fit into unsigned int. -M src/lib-mail/message-binary-part.c +M src/plugins/quota/Makefile.am +M src/plugins/quota/quota.c -2016-12-22 10:48:27 -0500 Timo Sirainen (c12b91e34) +2016-11-09 15:40:48 +0200 Aki Tuomi (f207fb0f2) - dovecot.service.in: Improve [service] examples + lib-program-client: Do not call callback when destroying - Move them inside [service] section so that simply uncommenting them works. - Also give a better example of how Environment might be used. -M dovecot.service.in +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client.c -2016-12-21 21:33:35 +0200 Timo Sirainen (14a866d54) +2016-11-14 13:22:06 +0100 Timo Sirainen (87e7fc1f2) - replication plugin: Error handling code cleanup + dict-client: When dict-server times out, log ioloop/lock waits. - The old code happened to work in all cases, but it was more of an accident. -M src/plugins/replication/replication-plugin.c +M src/lib-dict/dict-client.c -2016-12-21 19:50:10 +0200 Timo Sirainen (80d514f8b) +2016-11-14 13:18:13 +0100 Timo Sirainen (c1814529b) - Fix compiling when compiler doesn't support typeof() + dict-client: Code cleanup to timeout handling. + No functional changes. -M src/lib-dns/test-dns-util.c -M src/plugins/dict-ldap/dict-ldap.c +M src/lib-dict/dict-client.c -2016-12-19 12:16:20 +0200 Aki Tuomi (eb0308e25) +2016-11-14 13:14:25 +0100 Timo Sirainen (155e321dd) - lib-index: Make sure buffer is not null before freeing + dict-client: Dict server timeout may have occurred too early. - Fixes signal 11 crash under stress. -M src/lib-index/mail-transaction-log-file.c +M src/lib-dict/dict-client.c -2016-12-18 22:54:11 +0200 Timo Sirainen (88f7ecdbd) +2016-11-11 17:00:39 +0200 Timo Sirainen (6a4bfb2b0) - configure: Define __STDC_LIMIT_MACROS for CXXFLAGS + lib-index: Improve error messages when transaction log is unexpectedly lost - Fixes SIZE_MAX being undefined when building fts-lucene. -M configure.ac +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index-sync-private.h +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index.c +M src/lib-index/mail-transaction-log-view.c -2016-12-18 13:20:39 +0200 Timo Sirainen (a9f1d6614) +2016-11-10 23:00:59 +0200 Timo Sirainen (8c0e4118f) - master: Update assert to make sure optind != 0 + dict-client: Forward dict_iterate_set_limit() to dict server - Hopefully prevents Coverity warning about "doubleops[optind]" access being - uninitialized. -M src/master/main.c +M src/dict/dict-commands.c +M src/lib-dict/dict-client.c -2016-12-18 12:54:34 +0200 Timo Sirainen (2d53d80b9) +2016-11-10 23:23:39 +0200 Timo Sirainen (980b0dbdc) - lib: Remove dead code from unit test + dict-client: Code cleanup - remember all iteration flags -M src/lib/test-malloc-overflow.c +M src/lib-dict/dict-client.c -2016-11-29 23:37:43 +0200 Timo Sirainen (92f2c8bf4) +2016-11-10 22:57:22 +0200 Timo Sirainen (ea90267d4) - lib: Allow only known %chars in printf_format_fix_noalloc() + lib-dict: Fix infinite loop when row limit is reached. - Otherwise if some libc adds a new unsupported character, our %n check might - break. + If dict_iterate_has_more() keeps returning TRUE, the caller keeps calling + dict_iterate(). -M src/lib/printf-format-fix.c +M src/lib-dict/dict.c -2016-11-29 23:29:04 +0200 Timo Sirainen (966ae4592) +2016-11-11 13:06:41 +0200 Timo Sirainen (321750ab6) - lib: Fix %n detection in printf_format_fix_noalloc() + director: Don't access freed memory during deinit - It's undefined how flags, precision or length modifiers are handled with %n, - so make sure we catch all of them to detect an unwanted %n. -M src/lib/printf-format-fix.c -M src/lib/test-printf-format-fix.c +M src/director/mail-host.c -2016-11-29 23:21:17 +0200 Timo Sirainen (c38f69924) +2016-11-10 18:24:46 +0200 Timo Sirainen (ecd54acb3) - lib: Optimize printf_format_fix_noalloc() + sdbox: Fix crash on mailbox_sync*() when mailbox auto-open fails. - Using strchr() is faster than looping through the characters manually. Since - this function is being called a lot, it's worth optimizing. -M src/lib/printf-format-fix.c +M src/lib-storage/index/dbox-single/sdbox-sync.c -2016-12-17 20:03:46 +0100 Stephan Bosch (28f5ddb56) +2016-11-09 15:17:01 +0200 Timo Sirainen (078d7671f) - lib-imap-client: Fixed boolean vs integer mixup in debug message format - argument. + director: Fix crash when receiving USER-MOVE for nonexistent user. - Found with Clang -Wstrict-bool. -M src/lib-imap-client/imapc-connection.c +M src/director/director.c -2016-12-16 23:38:58 +0100 Stephan Bosch (4ba0369a5) +2016-11-09 11:27:20 +0200 Martti Rannanjärvi (3d2fe17f2) - lib-http: client: Added test for premature connection loss to - test-http-client-errors. + director: remove unused variable from doveadm-connection -M src/lib-http/test-http-client-errors.c +M src/director/doveadm-connection.c -2016-12-16 23:58:43 +0100 Stephan Bosch (6650976aa) +2016-11-09 00:48:32 +0100 Stephan Bosch (0cdd27506) - lib-http: client: Added test for normal connection backoff behavior to - test-http-client-errors. + lib-http: test-http-client-errors: Add test for server that returns error + status early while client is still sending blocking payload. M src/lib-http/test-http-client-errors.c -2016-12-16 23:36:19 +0100 Stephan Bosch (4710cc0b1) +2016-11-09 00:46:32 +0100 Stephan Bosch (b28496236) - lib-http: client: Treat connections that get disconnected prematurely as - connection failures. + lib-http: client: Fixed assert failure occurring when server returns error + status early while client is still sending blocking payload. - This means that the backoff time is increased when this happens. A premature - disconnection happens when the connection is disconnected before any data is - received from the server. -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-peer.c -M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c -2016-12-16 22:30:42 +0100 Stephan Bosch (bee4ea836) +2016-11-09 00:24:54 +0100 Stephan Bosch (8e2dd1226) - lib-http: client: Consolidated connection loss handling into a single - function. + lib-http: Added blocking client support to test-http-client-errors. -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h +M src/lib-http/test-http-client-errors.c -2016-12-16 22:00:47 +0100 Stephan Bosch (adbc1f724) +2016-11-08 20:41:15 +0200 Aki Tuomi (7bc3126bb) - lib-http: client: Moved connection backoff timer management to separate - functions. + imap: Free box on error + Otherwise the box wil leak as it is not assigned anywhere and can cause + crash on imap exit due to stats plugin timeout leak. -M src/lib-http/http-client-peer.c +M src/imap/imap-state.c -2016-12-16 21:41:29 +0100 Stephan Bosch (2cf7f1b1d) +2016-10-20 19:06:22 +0300 Aki Tuomi (b44033e45) - lib-http: client: Prevent infinite event loop involving the request handler. + director: Keep per-tag directory - Could happen when a backoff time is active. -M src/lib-http/http-client-peer.c +M src/director/director-connection.c +M src/director/director-request.c +M src/director/director.c +M src/director/director.h +M src/director/doveadm-connection.c +M src/director/mail-host.c +M src/director/mail-host.h +M src/director/main.c +M src/director/notify-connection.c -2016-04-11 21:20:48 +0300 Baofeng (9bc8d9b20) +2016-11-01 14:36:19 +0200 Aki Tuomi (1a7ed931e) - auth: do NOT feed p_strconcat() with NULL + director: Code cleanup - typedef user_free_hook - p_strconcat will never take NULL as an valid argument. Check possible NULL - string before calling it. + This is done because user_free_hook needs to be also used in mail_host. If + it changes, this reduces the places that need touching. -M src/auth/auth.c +M src/director/user-directory.c +M src/director/user-directory.h -2016-12-17 11:31:42 +0200 Timo Sirainen (eed2ab4b4) +2016-11-01 14:40:49 +0200 Aki Tuomi (33d70dcbb) - master: PROCESS-STATUS output was duplicated many times + director: Code cleanup - Reorder includes + This is required to enable typedef of user_free_hook -M src/master/master-client.c +M src/director/director-connection.c +M src/director/director-request.c +M src/director/mail-host.h +M src/director/notify-connection.c +M src/director/test-user-directory.c +M src/director/user-directory.c -2016-12-15 17:43:11 +0200 Timo Sirainen (613ab472b) +2016-10-20 20:31:33 +0300 Timo Sirainen (de92873c3) - imapc: Log server disconnection error only once. + director: Code cleanup - moved username_hash generation to director.h + It's not really user_directory specific. This is especially important in the + following patches that add per-tag user_directories. It's also not always + known which tag the username_hash refers to, so there can't be different + tag-specific username_hash generators. -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/index/imapc/imapc-storage.c +M src/director/director-request.c +M src/director/director.c +M src/director/director.h +M src/director/doveadm-connection.c +M src/director/notify-connection.c +M src/director/test-user-directory.c +M src/director/user-directory.c +M src/director/user-directory.h -2016-12-15 17:45:06 +0200 Timo Sirainen (7bebbde57) +2016-10-20 19:38:28 +0300 Timo Sirainen (1f7f42942) - imapc: Minor debug logging improvement + director: Code cleanup - added user director_iterate_users_*() wrappers. + This will shrink the diff for the following changes. -M src/lib-imap-client/imapc-connection.c +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h +M src/director/doveadm-connection.c -2016-12-15 17:36:39 +0200 Timo Sirainen (eb2df28ed) +2016-10-20 19:17:11 +0300 Timo Sirainen (68d87d8fb) - imapc: Don't retry a failed reconnection before 10 secs have passed + director: Code cleanup - use temporary users variables - This mainly avoids a lot of unnecessary connect attempts within a short time - period, for example if the caller attempts to perform some work for all the - mailboxes. + This will shrink the diff for the following changes. -M src/lib-imap-client/imapc-connection.c +M src/director/director-connection.c +M src/director/director-request.c +M src/director/director.c +M src/director/doveadm-connection.c -2016-12-15 17:31:18 +0200 Timo Sirainen (fd2be97ae) +2016-10-20 16:14:36 +0300 Timo Sirainen (e47dd69b0) - imapc: Fix infinite reconnect loop to remote server that is down + director: Code cleanup - moved code to notify_update_user() - This happened only in some situations. Usually there would have bene some - command in the queue, which would cause the reconnect-check to fail. -M src/lib-imap-client/imapc-connection.c +M src/director/notify-connection.c -2016-12-17 10:55:01 +0200 Timo Sirainen (4dd1b4885) +2016-10-20 15:13:04 +0300 Aki Tuomi (4af552f09) - lib: Compiler warning fix for 32bit systems + director: const mail_host in mail_host_get_tag -M src/lib/test-malloc-overflow.c +M src/director/mail-host.c +M src/director/mail-host.h -2016-12-12 07:28:00 +0200 Timo Sirainen (4fcb886f4) +2016-11-05 19:06:33 +0200 Aki Tuomi (4217dcdec) - global: Make sure *_malloc() calculations won't cause integer overflows. + lib: Add test vectors for message digests -M src/auth/auth-request-var-expand.c -M src/doveadm/doveadm-dump-index.c -M src/lib-imap/imap-utf7.c -M src/lib-index/mail-index-transaction-view.c -M src/lib-index/mail-index.c -M src/lib-master/master-login.c -M src/lib-program-client/program-client-local.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/pop3c/pop3c-sync.c -M src/lib-storage/mailbox-list.c -M src/lib/data-stack.c -M src/lib/hex-binary.c -M src/lib/str-find.c -M src/lib/strfuncs.c -M src/log/log-error-buffer.c -M src/plugins/acl/acl-cache.c -M src/plugins/acl/acl-cache.h -M src/pop3/pop3-client.h -M src/pop3/pop3-commands.c -M src/stats/mail-command.c -M src/stats/mail-domain.c -M src/stats/mail-ip.c -M src/stats/mail-session.c -M src/stats/mail-user.c +M src/lib/test-hash-method.c -2016-12-12 07:19:55 +0200 Timo Sirainen (3391c9ec1) +2016-11-05 11:48:27 +0200 Aki Tuomi (70ee483d3) - global: Change string position/length from unsigned int to size_t + lib: Add SHA3 hashing methods for 256 and 512 bits - Mainly to avoid truncating >4GB strings, which might potentially cause some - security holes. Normally there are other limits, which prevent such - excessive strings from being created in the first place. - I'm sure this didn't find everything. Maybe everything could be found with - compiler warnings. -Wconversion kind of does it, but it gives way too many - unnecessary warnings. +M src/lib/Makefile.am +M src/lib/hash-method.c +A src/lib/sha3.c +A src/lib/sha3.h - These were mainly found with: +2016-11-05 11:47:40 +0200 Aki Tuomi (686840068) + + lib: Move sha context and result size to new header + + This is to prepare for SHA3 inclusion + +M src/lib/Makefile.am +A src/lib/sha-common.h +M src/lib/sha2.h + +2016-11-05 21:50:30 +0100 Stephan Bosch (1007721ca) + + lib-lda: smtp-client: Replaced temp file handling with iostream-temp. + + +M src/lib-lda/smtp-client.c + +2016-11-05 20:57:20 +0100 Stephan Bosch (e7ebceac4) + + lib-lda: smtp-client: Use program-client for invoking sendmail binary. + + +M src/lib-lda/Makefile.am +M src/lib-lda/smtp-client.c + +2016-11-05 22:34:18 +0100 Stephan Bosch (1ebd744c8) + + lib-lda: smtp-client: Made boolean fields single-bit. + + +M src/lib-lda/smtp-client.c + +2016-11-05 22:00:09 +0100 Stephan Bosch (882479071) + + lib-lda: smtp-client: Renamed "smtp_client" parameters to "client" for + consistency. + + +M src/lib-lda/smtp-client.c + +2016-11-07 23:27:01 +0200 Aki Tuomi (9c257ae40) + + m4: Fix compiler warnings + + Makes it work with -Wall -W -Werror + +M m4/fd_passing.m4 +M m4/ipv6.m4 +M m4/unsetenv.m4 + +2016-11-04 12:36:19 +0200 Timo Sirainen (6264b51bc) + + lib-storage: Renamed MAIL_SEARCH_ARG_FLAG_USE_TZ to _FLAG_UTC_TIMES - grep " = strlen" egrep "unsigned int.*(size|len)" -M src/auth/auth-cache.c -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/db-checkpassword.c -M src/auth/db-ldap.c -M src/auth/mech-gssapi.c -M src/auth/mech-scram-sha1.c -M src/auth/password-scheme.c -M src/auth/userdb-dict.c -M src/config/config-parser-private.h -M src/config/config-parser.c -M src/config/config-request.c -M src/config/doveconf.c -M src/config/old-set-parser.c -M src/director/director-connection.c -M src/doveadm/doveadm-auth-server.c -M src/doveadm/doveadm-auth.c -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-fs.c -M src/doveadm/doveadm-log.c -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-print-table.c -M src/doveadm/doveadm-sis.c -M src/doveadm/doveadm-util.c -M src/doveadm/doveadm.c -M src/doveadm/dsync/dsync-brain-mailbox-tree.c -M src/doveadm/dsync/dsync-mailbox-tree-sync.c -M src/doveadm/dsync/dsync-mailbox-tree.c -M src/imap/cmd-list.c -M src/imap/cmd-notify.c -M src/imap/cmd-rename.c -M src/imap/cmd-subscribe.c -M src/imap/imap-list.c -M src/imap/imap-notify.c -M src/imap/imap-status.c -M src/imap/main.c -M src/ipc/main.c -M src/lib-compression/compression.c -M src/lib-compression/ostream-bzlib.c -M src/lib-compression/ostream-lzma.c -M src/lib-compression/ostream-zlib.c -M src/lib-dict/dict-db.c -M src/lib-dict/dict-file.c -M src/lib-dict/dict-memcached.c -M src/lib-dict/dict-sql-settings.c -M src/lib-dict/dict-sql.c -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-posix.c -M src/lib-fs/fs-test.c -M src/lib-fts/fts-filter-english-possessive.c -M src/lib-fts/fts-icu.c -M src/lib-fts/fts-tokenizer-address.c -M src/lib-fts/test-fts-tokenizer.c -M src/lib-http/http-client-request.c -M src/lib-imap-client/imapc-connection.c -M src/lib-imap/imap-match.c -M src/lib-imap/imap-parser.c -M src/lib-imap/imap-quote.c -M src/lib-imap/imap-utf7.c -M src/lib-lda/lmtp-client.c -M src/lib-mail/istream-binary-converter.c -M src/lib-mail/message-decoder.c -M src/lib-mail/message-header-decode.c -M src/lib-mail/test-istream-attachment.c -M src/lib-mail/test-istream-dot.c -M src/lib-mail/test-istream-header-filter.c -M src/lib-mail/test-istream-qp-decoder.c -M src/lib-mail/test-mbox-from.c -M src/lib-mail/test-message-header-parser.c -M src/lib-master/master-login.c -M src/lib-master/master-service.c -M src/lib-storage/index/cydir/cydir-save.c -M src/lib-storage/index/cydir/cydir-sync.h -M src/lib-storage/index/dbox-common/dbox-file-fix.c -M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib-storage/index/dbox-multi/mdbox-purge.c -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/index-attribute.c -M src/lib-storage/index/index-mail-headers.c M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/index/maildir/maildir-filename-flags.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/maildir/maildir-uidlist.c -M src/lib-storage/index/mbox/mbox-storage.c -M src/lib-storage/index/shared/shared-list.c -M src/lib-storage/list/mailbox-list-delete.c -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index.h -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/list/mailbox-list-maildir-iter.c -M src/lib-storage/list/mailbox-list-maildir.c -M src/lib-storage/list/mailbox-list-notify-tree.c -M src/lib-storage/list/mailbox-list-subscriptions.c -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-search-args-imap.c +M src/lib-storage/mail-search-register-human.c +M src/lib-storage/mail-search-register-imap.c +M src/lib-storage/mail-search.h +M src/plugins/expire/doveadm-expire.c + +2016-11-04 12:18:47 +0200 Timo Sirainen (8fc48a7d4) + + lib-storage: Updated MAIL_SEARCH_ARG_FLAG_USE_TZ comment. + + +M src/lib-storage/mail-search.h + +2016-11-04 12:04:11 +0200 Timo Sirainen (2fc91862f) + + lib-storage: Fix doveadm search query parsing to use timezones correctly. + + When using a date string, e.g. "senton 25-Mar-2007" it should work the same + way as IMAP does and show all mails whose sent date is on 25th, ignoring + whatever the timezone is in the Date header (or in case of + received/saved-date it would be using the timestamps in server's local + timezone, again just like IMAP). + + When search with an exact UNIX timestamp or a time interval (e.g. + "3 days"), it should be using UTC times for doing all comparisons. + +M src/doveadm/doveadm-dsync.c +M src/lib-storage/mail-search-register-human.c M src/lib-storage/mail-storage.c -M src/lib-storage/mail-user.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-tree.c -M src/lib-storage/mailbox-uidvalidity.c -M src/lib/array.c -M src/lib/env-util.c -M src/lib/failures.c -M src/lib/istream-base64-encoder.c -M src/lib/json-parser.c -M src/lib/module-dir.c -M src/lib/net.c -M src/lib/ostream-file.c -M src/lib/printf-format-fix.c -M src/lib/printf-format-fix.h -M src/lib/str-find.c -M src/lib/str-sanitize.c -M src/lib/str.c -M src/lib/strfuncs.c -M src/lib/test-printf-format-fix.c -M src/lib/unlink-old-files.c -M src/lib/var-expand.c -M src/lmtp/commands.c -M src/log/log-error-buffer.c -M src/login-common/client-common-auth.c -M src/login-common/client-common.c -M src/login-common/login-proxy-state.c -M src/master/master-settings.c -M src/master/service-process.c -M src/plugins/acl/acl-lookup-dict.c -M src/plugins/acl/acl-mailbox-list.c -M src/plugins/dict-ldap/dict-ldap.c -M src/plugins/fts-solr/fts-backend-solr-old.c -M src/plugins/fts-solr/fts-backend-solr.c -M src/plugins/fts-squat/squat-test.c -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-search-args.c -M src/plugins/imap-acl/imap-acl-plugin.c -M src/plugins/imap-stats/imap-stats-plugin.c -M src/plugins/mail-crypt/mail-crypt-pluginenv.c -M src/plugins/mail-crypt/mail-crypt-userenv.c -M src/plugins/quota/quota-dirsize.c -M src/replication/aggregator/replicator-connection.c +M src/lib-storage/mail-storage.h -2016-12-12 05:16:28 +0200 Timo Sirainen (94a510926) +2016-11-04 12:03:47 +0200 Timo Sirainen (0303b693b) - lib: Optimization - p_strconcat() doesn't need to allocate from data stack + lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling again. - Various other parts of the code already rely on p_malloc() not overwriting - t_buffer_get()'ed data. p_strconcat() can do that as well. + It wasn't really wrong, it was just confusing. And doveadm's tz-handling was + wrong. -M src/lib/strfuncs.c + Reverses 059e4ac419224598349704b74cb9f6b49278df46 -2016-12-12 04:55:47 +0200 Timo Sirainen (95ed21ee3) +M src/lib-storage/index/index-search.c - lib: *_new(): Use the new MALLOC_MULTIPLY() macro to avoid overflows +2016-11-03 21:06:27 +0100 Stephan Bosch (4ff193d24) - Cast the sizeof() result to unsigned int, because it's definitely always - enough and in many cases this allows optimizing away the wrap-check. + lib-http: Fixed potential segfault problem in test-http-client-errors. -M src/lib/data-stack.h -M src/lib/mempool.h + Found by Coverity. -2016-12-12 04:53:02 +0200 Timo Sirainen (bbc11b4a4) +M src/lib-http/test-http-client-errors.c - lib: Add MALLOC_MULTIPLY() and MALLOC_ADD() +2016-11-03 19:16:49 +0200 Timo Sirainen (6525f6371) - These can be used for calculating memory allocation sizes. If there's an - overflow, the macro panics. + lib: Define ARRAY_TYPE for uint8_t, uint16_t and uint64_t. -M src/lib/Makefile.am -M src/lib/lib.h -A src/lib/malloc-overflow.h -M src/lib/test-lib.c -M src/lib/test-lib.h -A src/lib/test-malloc-overflow.c -2016-12-12 03:55:54 +0200 Timo Sirainen (d75ed2777) +M src/lib/array-decl.h + +2016-10-19 12:33:02 -0400 Josef 'Jeff' Sipek (9d69283ef) - lib: Remove t_buffer_*_type() + data-stack: T_BEGIN should use file & line number as the t_push marker - The t_buffer_*() shouldn't normally be used anyway except in some low-level - string/buffer manipulation code, so there's not much point in trying to make - easier to use versions of them. + Using a function name is not unique if there is more than one T_BEGIN in a + function. Therefore, switch the marker passed into t_push to be the + concatenation of __FILE__ and __LINE__. M src/lib/data-stack.h -M src/lib/test-data-stack.c -2016-12-12 03:48:49 +0200 Timo Sirainen (201c1ef33) +2016-10-19 12:24:12 -0400 Josef 'Jeff' Sipek (ccfe24c9f) - master: Removed unused process_exec(extra_args) parameter + data-stack: t_push should always keep track of the marker - Removes unnecessarily complicated code marked with @UNSAFE. + Instead of only keeping track of it on DEBUG builds, t_push should always + keep the marker around. This will help diagnosing issues on non-debug + builds. -M src/master/common.h -M src/master/main.c -M src/master/service-process.c -2016-12-15 18:15:21 +0200 Timo Sirainen (ff6dc2d92) +M src/lib/data-stack.c +M src/lib/data-stack.h - lib-storage: Make dovecot.list.index's filename configurable. +2016-10-17 09:49:36 -0400 Josef 'Jeff' Sipek (4ab881419) - This is useful when there are multiple namespaces pointing to the same mail - root directory. For example mdbox with lazy-expunge: + use __func__ instead of __FUNCTION__ - namespace { - prefix = Expunged/ - location = mdbox:~/mdbox:MAILBOXDIR=expunged:LISTINDEX=expunged.list.index - .. - } + __FUNCTION__ is a non-standard extension while __func__ is C99. -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h +M src/lib/data-stack.h +M src/lib/macros.h -2016-12-15 18:13:34 +0200 Timo Sirainen (a6c326066) +2016-11-01 21:50:29 +0200 Aki Tuomi (e1d4f6f6a) - lib-storage: Deduplicate code into mailbox_list_settings_init_defaults() + auth: Use buffer_truncate_rshift_bits -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c +M src/auth/auth-policy.c -2016-12-16 18:52:23 +0200 Timo Sirainen (ab6166287) +2016-10-27 16:20:20 +0300 Aki Tuomi (14c903cfe) - director: Fix crash when using director_flush_socket + lib: Add tests for hashed var-expand - Broken accidentally when merging b44033e45e9f48f8a6e1ac5905234fec5de6d6cc -M src/director/director.c +M src/lib/test-var-expand.c -2016-12-15 19:03:39 +0200 Timo Sirainen (7cf33aca1) +2016-10-27 15:37:45 +0300 Aki Tuomi (7c4af1fdc) - director: Fix USER-KICK and USER-KICK-ALT forwarding + lib: Add generic hashing support to var-expand - The internal IPC command was prefixed, which caused the remote director to - reject the commands and disconnect: + Enables use of - director(...): Command proxy: Unknown command proxy director(...): Remote - sent invalid protocol data recently, waiting 57 secs before allowing further - communication + %{H;rounds=,truncate=,salt=:field} -M src/director/director.c + syntax in any variable expansion. H is any supported hash algorithm or pkcs5 + for PKCS#5 PBKDF2 using SHA256. -2016-12-15 19:02:56 +0200 Timo Sirainen (21df6cf4f) +M src/lib/var-expand.c - director: doveadm command handling was missing USER-KICK-ALT +2016-10-27 16:19:52 +0300 Aki Tuomi (e0dddec70) + lib: Do not consume {} inside %{} -M src/director/doveadm-connection.c -2016-12-15 15:00:54 +0200 Timo Sirainen (78371091c) +M src/lib/var-expand.c - imap: Fix STORE UNCHANGEDSINCE to work with >32bit modseqs. +2016-11-01 20:14:43 +0200 Aki Tuomi (ef2bf290f) + lib: Add unit test for buffer truncate -M src/imap/cmd-store.c -2016-12-15 15:20:02 +0200 Timo Sirainen (cac30e457) +M src/lib/test-buffer.c - lib-storage: Fix "*" in SEARCH seqset/uidset +2016-11-01 20:06:46 +0200 Aki Tuomi (e07b8f034) - 4294967295 is used for "*", which matches the last existing message. Which - we don't know what it is at the time of search args simplification, so avoid - making any assumptions about it. + lib: Add buffer truncate - It's a bit ugly that 4294967295 can't be used as a valid UID, but this - restriction has already existed since the beginning of Dovecot. A future - alternative might be to add MAIL_SEARCH_ARG_FLAG_SEQSET_WITH_STAR, but - that's a bit complicated change. -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/test-mail-search-args-simplify.c +M src/lib/buffer.c +M src/lib/buffer.h -2016-12-15 15:01:47 +0200 Timo Sirainen (d677fd49f) +2016-11-02 23:00:50 +0200 Timo Sirainen (fb9b9914c) - imapc: Don't allow "*" in SEARCH replies + auth: Make static analyzer happier. - Doesn't fix anything, but makes the parsing a bit more correct. + Don't complain about uninitialized static_password being sent to + passdb_handle_credentials(). It could only happen for failures, and + passdb_handle_credentials() wouldn't have used the password then. -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-search.c +M src/auth/passdb-static.c -2016-12-14 19:36:43 +0200 Timo Sirainen (e847976fd) +2016-11-02 21:59:12 +0200 Timo Sirainen (b8673ed3d) - fts-squat: Use file_cache_new_path() for squat indexes + fts: Fix error message when syncing FTS root mailbox fails. -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/fts/fts-api.c -2016-12-14 19:35:29 +0200 Timo Sirainen (e43055485) +2016-11-02 15:43:37 +0200 Timo Sirainen (dec95fbca) - lib-index: Use file_cache_new_path() for dovecot.index.cache + auth: Fixes to previous var_expand() change. -M src/lib-index/mail-cache.c +M src/auth/auth-request.c +M src/auth/test-auth-request-var-expand.c -2016-12-14 19:35:05 +0200 Timo Sirainen (897f17c5a) +2016-11-02 15:31:14 +0200 Timo Sirainen (5535f5fb5) - lib: Add file_cache_new_path() to include path in error messages. + lib: ioloop-notify-kqueue wasn't storing source filename. -M src/lib/file-cache.c -M src/lib/file-cache.h +M src/lib/ioloop-notify-kqueue.c + +2016-11-02 15:22:25 +0200 Timo Sirainen (c73ede1a6) + + lib-storage: Fix previous var_expand() change. + + +M src/lib-storage/mail-storage-service.c + +2016-10-31 22:05:11 +0200 Timo Sirainen (bcf1cf2af) + + lib: API change - var_expand_func_table.func() can now return error. -2016-12-14 23:20:12 +0200 Aki Tuomi (db6e8f1ab) + None of the existing functions were changed to return errors (yet). + +M src/auth/auth-request-var-expand.c +M src/auth/db-dict.c +M src/auth/db-ldap.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-user.c +M src/lib/test-var-expand.c +M src/lib/var-expand.c +M src/lib/var-expand.h +M src/login-common/client-common.c - driver-mysql: Do not hex-encode again +2016-10-31 21:48:16 +0200 Timo Sirainen (0f5dc4da3) - Use correct syntax to provide data to mysql in hex format, without recoding - it in hex format again. + lib: API change - var_expand*() now returns error string. -M src/lib-sql/driver-mysql.c + This allows callers to fail properly if the format string is invalid. -2016-12-13 16:04:53 +0200 Timo Sirainen (bfb24d849) +M src/auth/auth-cache.c +M src/auth/auth-policy.c +M src/auth/auth-request-var-expand.c +M src/auth/auth-request-var-expand.h +M src/auth/auth-request.c +M src/auth/db-checkpassword.c +M src/auth/db-dict.c +M src/auth/db-ldap.c +M src/auth/db-passwd-file.c +M src/auth/passdb-imap.c +M src/auth/passdb-ldap.c +M src/auth/passdb-pam.c +M src/auth/passdb-passwd-file.c +M src/auth/passdb-sql.c +M src/auth/passdb-static.c +M src/auth/passdb-template.c +M src/auth/passdb-template.h +M src/auth/test-auth-cache.c +M src/auth/test-auth-request-var-expand.c +M src/auth/userdb-dict.c +M src/auth/userdb-ldap.c +M src/auth/userdb-passwd-file.c +M src/auth/userdb-passwd.c +M src/auth/userdb-sql.c +M src/auth/userdb-static.c +M src/auth/userdb-template.c +M src/auth/userdb-template.h +M src/director/director-request.c +M src/director/director.c +M src/director/doveadm-connection.c +M src/director/notify-connection.c +M src/director/test-user-directory.c +M src/director/user-directory.c +M src/director/user-directory.h +M src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-auth.c +M src/doveadm/doveadm-director.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-print-formatted.c +M src/imap-hibernate/imap-client.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/imap-client.c +M src/imap/main.c +M src/lda/main.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-send.c +M src/lib-mail/mail-user-hash.c +M src/lib-mail/mail-user-hash.h +M src/lib-settings/settings-parser.c +M src/lib-settings/settings-parser.h +M src/lib-sql/driver-cassandra.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-user.c +M src/lib/test-var-expand.c +M src/lib/var-expand.c +M src/lib/var-expand.h +M src/lmtp/client.c +M src/lmtp/commands.c +M src/login-common/client-common.c +M src/login-common/login-proxy.c +M src/login-common/login-settings.c +M src/plugins/acl/acl-shared-storage.c +M src/plugins/dict-ldap/dict-ldap.c +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c - lib-storage: Fix crash in obox's dsync-merge +2016-10-31 20:26:02 +0200 Timo Sirainen (d5e68154e) + auth: Code cleanup - Move passwd-file extra fields import to its own + function. -M src/lib-storage/list/mailbox-list-index-backend.c + This will shrink the diff output for the following var_expand() change. -2016-12-09 16:01:20 +0200 Aki Tuomi (ddc3de0b2) +M src/auth/passdb-passwd-file.c +M src/auth/userdb-passwd-file.c - mail-crypt: Treat empty values correctly +2016-10-31 19:20:51 +0200 Timo Sirainen (7c3a801ca) - If mail_crypt_curve or mail_crypt_save_version is left empty, disable the - plugin. Don't error out. + lib: var_expand() code cleanup - Moved short %v expansion to its own + function. -M src/plugins/mail-crypt/mail-crypt-plugin.c -2016-12-14 17:39:04 +0200 Aki Tuomi (299e2ee71) +M src/lib/var-expand.c - mail-crypt: Skip tests if dcrypt cannot be initialized +2016-10-01 20:12:13 +0200 Stephan Bosch (d2fd204b3) - Avoids breaking tests on system without working ECC keys. + imap-login: Adjusted IMAP AUTHENTICATE command to return CONTACTADMIN and + EXPIRED response codes when appropriate. -M src/plugins/mail-crypt/test-mail-global-key.c -M src/plugins/mail-crypt/test-mail-key.c -2016-12-14 11:42:56 +0200 Aki Tuomi (cc94fec39) +M src/imap-login/client-authenticate.c - auth-policy: Allow unsupported attributes in response +2016-11-01 22:45:16 +0100 Stephan Bosch (8ac662367) - Do not choke if we receive unsupported attributes in response. This allows - better interoperability with different systems that are getting signals from - auth policy server that are not (yet) supported by dovecot. + auth,login-common: Added result code for invalid base64-encoded response + data. -M src/auth/auth-policy.c -2016-12-14 10:32:44 +0200 Aki Tuomi (008b46a1d) +M src/auth/auth-request-handler.c +M src/imap-login/client-authenticate.c +M src/lib-auth/auth-client-interface.h +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/pop3-login/client-authenticate.c - sha3: Fix typo in ifdef +2016-11-02 01:31:40 +0100 Stephan Bosch (04eb0abcf) - The code was supposed to be used with big endian machines. + login-common: Added result codes for mechanism-related failures. - Reported by than@redhat.com -M src/lib/sha3.c +M src/imap-login/client-authenticate.c +M src/lib-auth/auth-client-interface.h +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/login-common/sasl-server.c +M src/login-common/sasl-server.h +M src/pop3-login/client-authenticate.c -2016-12-12 15:21:13 +0200 Timo Sirainen (1007f76fa) +2016-11-01 23:12:25 +0100 Stephan Bosch (f32d0295c) - lib-test: Change test_fatal_func_t to take unsigned int stage as parameter. + login-common: Added result code for a nologin code from the auth service. - It could never be -1, so this makes it clearer. It also removes annoying - casts when comparing stage to e.g. N_ELEMENTS(). -M src/lib-test/test-common.c -M src/lib-test/test-common.h -M src/lib/test-array.c -M src/lib/test-data-stack.c -M src/lib/test-lib.c -M src/lib/test-lib.h -M src/lib/test-mempool-alloconly.c -M src/lib/test-printf-format-fix.c +M src/imap-login/client-authenticate.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h +M src/pop3-login/client-authenticate.c -2016-12-12 15:17:23 +0200 Timo Sirainen (200176aaa) +2016-11-02 01:39:49 +0100 Stephan Bosch (529944a35) - lib-test: test_run_with_fatals() now takes a const array + login-common: Added result code for password-expired authentication failure. -M src/lib-test/test-common.c -M src/lib-test/test-common.h +M src/imap-login/client-authenticate.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.h +M src/pop3-login/client-authenticate.c -2016-12-12 15:16:34 +0200 Timo Sirainen (333ccb2c5) +2016-11-01 21:32:42 +0100 Stephan Bosch (36b072d84) - lib-test: Introduce test_fatal_func_t as typedef and comment how it works. + auth: Added a code= field to the auth FAIL response that replaces the + "authz", "temp", "pass_expired", and "user_disabled" fields. -M src/lib-test/test-common.c -M src/lib-test/test-common.h +M src/auth/auth-request-handler.c +M src/lib-auth/auth-client-interface.h +M src/login-common/client-common-auth.c +M src/login-common/client-common.c +M src/login-common/client-common.h -2016-12-12 09:41:02 +0200 Aki Tuomi (b127fb24b) +2016-10-25 09:56:34 +0200 Stephan Bosch (3395f5ad0) - doveadm-mail: Set exit code to EX_TEMPFAIL on timeout + lib-http: Added DNS-related tests to test-http-client-errors. - When running `doveadm save` command on proxy/director and the remote command - execution times out, exit code must be set to EX_TEMPFAIL. - Fixes Panic: file doveadm-mail.c: line 405 (doveadm_mail_next_user): - assertion failed: (ctx->exit_code != 0) +M src/lib-http/test-http-client-errors.c -M src/doveadm/doveadm-mail.c +2016-09-16 20:29:00 +0200 Stephan Bosch (c4b2dba35) -2016-12-12 09:39:34 +0200 Aki Tuomi (e78960f08) + lib-http: client: Destroy host and associated queue objects after no more + requests remain and an idle timeout expires. - doveadm-save: Set exit code to EX_TEMPFAIL on open error - Prevents potential crash on doveadm_mail_next_user +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c -M src/doveadm/doveadm-mail-save.c +2016-09-16 20:22:17 +0200 Stephan Bosch (1e63e3081) -2016-12-14 02:51:54 +0100 Stephan Bosch (29ddc0769) + lib-http: client: Implemented host name lookup TTL. - lib-imap: imap-bodystructure: Prevent writing erroneous whitespace between - items in an envelope address list. + Host name lookups will now be performed again when the results have expired. + Without access to TTL information from DNS lookups, all lookups will use the + same default TTL for now. - Both imap_bodystructure_write() and imap_body_parse_from_bodystructure() - produced such invalid output. This caused an RFC 3501 violation in IMAP - FETCH BODY and BODYSTRUCTURE responses. +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c +M src/lib-http/http-client.c +M src/lib-http/http-client.h - Test suite is amended to test this situation. +2016-09-15 22:49:54 +0200 Stephan Bosch (c62f15cc1) -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c + lib-http: client: Added http_client_queue_requests_active(). -2016-12-13 18:31:41 +0200 Timo Sirainen (619d00ad9) + It counts how many active requests a queue has. - lib-index: Add mail_index_revert_changes() +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c - This can be used to revert changes done in a transaction to the specified - existing mail. +2016-09-16 01:58:27 +0200 Stephan Bosch (6a0e62561) -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/mail-index.h + lib-http: client: Create queue->pending_peers array from the beginning. -2016-12-14 10:23:17 +0200 Aki Tuomi (2277ba5fc) + This simplifies the code, since the pending peers array is always used. - mail-crypt: Ensure array is created before accessing it +M src/lib-http/http-client-queue.c - Fixes segmentation fault on fs-crypt when keys are not configured. +2016-09-16 01:35:09 +0200 Stephan Bosch (57d86b6fd) -M src/plugins/mail-crypt/mail-crypt-global-key.c -M src/plugins/mail-crypt/test-mail-global-key.c + lib-http: client: Link peers to queue earlier: during connection attempts. -2016-12-14 12:46:50 +0200 Aki Tuomi (98fdeba00) + This makes sure that queues keep track of which peers are doing stuff on its + behalf. This is important to be able to manage the active peers when a new + host name lookup was performed; if a peer is no longer listed in the + returned IPs it should be dropped. - doveadm-director: Show tag field from response +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c - Fix off-by-one in doveadm director dump +2016-09-15 02:14:46 +0200 Stephan Bosch (1443a6b1b) -M src/doveadm/doveadm-director.c + lib-http: client: Created http_client_peer_drop() function that closes a + peer object gracefully. -2016-12-12 15:14:52 +0200 Aki Tuomi (891b34459) + It checks whether any connections are still present. It checks whether a + backoff timer is still active. This change and subsequent changes prepare + for being able to destroy a queue when it becomes unused. All peers linked + to such a queue are unlinked and dropped when inactive and unlinked. - imap: Fix assert when waiting for input on SEARCH/SORT +M src/lib-http/http-client-peer.c - Set cmd->state to CLIENT_COMMAND_STATE_WAIT_EXTERNAL because we are not - expecting input or output. +2016-09-15 02:09:47 +0200 Stephan Bosch (c1423bdba) - Fixes Panic: file imap-client.c: line 854 (client_check_command_hangs): - assertion failed: (client->io != NULL || (client->output_cmd_lock != NULL && - client->output_cmd_lock != client->input_lock)) + lib-http: client: Unlink all queues from peer when it is disconnected. -M src/imap/imap-search.c + Before, queues were only destroyed when the whole client was destroyed. This + change and subsequent changes prepare for being able to destroy a queue when + it becomes unused. -2016-12-12 12:37:34 +0200 Timo Sirainen (364aa4716) +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c - dsync: Fix .dovecot-sync.lock timeout checking +2016-09-15 01:59:23 +0200 Stephan Bosch (d675ed17d) - Whenever the lock file was recreated, the lock timeout was reset. Switched - to using file_create_locked(), which already solves this problem and has - compatible locking. + lib-http: client: Improved logging of connection loss handling in peer. -M src/doveadm/dsync/dsync-brain.c -2016-12-12 12:53:36 +0200 Timo Sirainen (ec6eabda0) +M src/lib-http/http-client-peer.c - dsync: Improve process title during initialization +2016-09-14 21:37:38 +0200 Stephan Bosch (ac325a763) - If something is hanging, this should make it clear what exactly it is. + lib-http: client: If a peer object is no longer linked to a queue, don't + close it until all connections are inactive. -M src/doveadm/doveadm-dsync.c -M src/doveadm/dsync/dsync-brain.c + The peer object is canceled, rather than closed. Which means that any newly + started and idle connections are closed immediately. Requests may be pending + though. This is only relevant when hosts/queues are removed at some point. + This is a preparational change for having a maximum lifetime on + hosts/queues, in which case this becomes a possibility. -2016-12-12 12:42:53 +0200 Timo Sirainen (d48b82df7) +M src/lib-http/http-client-peer.c - doveadm-server: Show UNIX socket connections as in process title +2016-09-14 01:37:05 +0200 Stephan Bosch (a8f65a7de) - Earlier they were shown as empty string. + lib-http: client: Added debug messages that indicate when a queue is + linked/unlinked to a peer. -M src/doveadm/client-connection.c -2016-12-12 12:43:47 +0200 Timo Sirainen (731eee958) +M src/lib-http/http-client-peer.c - doveadm: Add global doveadm_verbose_proctitle setting. +2016-09-14 01:30:16 +0200 Stephan Bosch (66ea898de) - This previously existed only for doveadm-server, but adding it to doveadm - CLI makes it easier to do process title updates for it as well. + lib-http: client: Added function that counts how many connections are active + within a peer. -M src/doveadm/doveadm.c -2016-12-12 12:51:42 +0200 Timo Sirainen (46c6c7a6b) +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h - doveadm: When connecting to doveadm-server via TCP, use 30s timeout +2016-09-14 01:26:10 +0200 Stephan Bosch (2b9d522a3) - Should be enough, and better than the kernel's default, which might be a lot - more. + lib-http: client: Added function that checks whether a connection is + currently active. -M src/doveadm/doveadm-util.c -2016-12-12 10:40:20 +0200 Aki Tuomi (de8d17ac9) +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h - lib-storage: Do not try to recover missing list index +2016-09-11 19:34:34 +0200 Stephan Bosch (32ef0bd65) - Fixes Panic: file mailbox-list-index.c: line 342 - (mailbox_list_index_parse_records): assertion failed: (node != NULL) + lib-http: client: Created http_client_connection_failure() handler. -M src/lib-storage/list/mailbox-list-index.c -2016-12-05 15:17:30 +0000 Paul Howarth (a42f612e8) +M src/lib-http/http-client-connection.c - configure: Fix some implicit function declarations +2016-09-11 19:44:32 +0200 Stephan Bosch (e6c7a2711) - Some configure tests fail unexpectedly if the compiler flag - -Werror=implicit-function-declarations is enabled, which can result in the - wrong implementations being used. + lib-http: client: Set conn->connect_request to NULL immediately in + http_client_connection_tunnel_response(). - This compiler flag is now enabled by default in Fedora Rawhide: - https://fedoraproject.org/wiki/Changes/Fedora26CFlags + Prevents referring to this completed request in other parts of the code. - is needed for exit() - is needed for strcpy() +M src/lib-http/http-client-connection.c -M configure.ac +2016-09-11 17:46:10 +0200 Stephan Bosch (c936df07c) -2016-12-07 14:23:12 +0100 manuel (c927f013b) + lib-http: client: Improved handling of hosts with explicit IP address. - openssl: Clear error queue after an incomplete SSL_shutdown - If the SSL_shutdown-call fails (e.g. because the underlaying socket has - already been closed) OpenSSL puts the corresponding error into the queue. We - don't care about details so we need to clear the queue. +M src/lib-http/http-client-host.c +M src/lib-http/http-client-private.h - Otherwise the error will be pulled while error checking the next OpenSSL - call of an unrelated connection. +2016-09-11 14:51:28 +0200 Stephan Bosch (58c278560) -M src/lib-ssl-iostream/iostream-openssl.c -M src/login-common/ssl-proxy-openssl.c + lib-http: Made test-http-client-errors more reliable. -2016-12-09 15:06:05 +0200 Timo Sirainen (3f4d68e19) - imapc: Don't send NOOP immediately after SELECT +M src/lib-http/test-http-client-errors.c - NOOP is normally used by mailbox syncing to check if there are any changes - done by other concurrent IMAP sessions. But doing it immediately after - SELECT is unnecessary, because nothing could have changed. +2016-11-01 12:35:08 +0200 Timo Sirainen (df1b2c3ff) -M src/lib-storage/index/imapc/imapc-sync.c + lib-index: Don't waste 3 bytes of space in struct mail_index_record. -2016-12-09 11:11:11 +0000 Timo Sirainen (634c8fdf9) + It was always supposed to be used mainly for keywords, but it got broken + many years ago and nobody noticed. - config: Avoid excessive data stack usage when matching local_name +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-sync-keywords.c +M src/lib-index/mail-index.h - Moved config_filter_match_local_name() to its own function to make adding - the data stack frame easier. +2016-11-01 12:43:03 +0200 Timo Sirainen (e545fb28b) - Based on patch by J. Nick Koston + lib-storage: Don't enable modseqs on STATUS_HIGHESTMODSEQ. -M src/config/config-filter.c + This is requested always by IMAP's SELECT command even when the IMAP client + hasn't requested it. We don't want to unnecessarily enable modseqs that use + up memory and disk space when they're not really needed. Other callers may + also be interested in asking for HIGHESTMODSEQ (which is nowadays actually + always available) without enabling full modseq tracking. -2016-12-09 09:57:57 +0100 Stephan Bosch (41d538d5d) +M src/lib-storage/mail-storage.c - doveadm-server: http: Fixed temp_path_prefix for iostream-temp. +2016-11-01 15:51:02 +0200 Timo Sirainen (059e4ac41) - The temp_path_prefix was "/tmp", which is extended to - "/tmp.." by safe_mkstemp. + lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling. - Obviously, mortal users cannot create a file like that, causing this error: - doveadm: Error: safe_mkstemp(/tmp) failed: Permission denied + It was being used the wrong way. SEARCH SENTON/BEFORE/AFTER should have + checked the times within the mail's timezone, not UTC. - The temp_path_prefix should have been "/tmp/doveadm.", as it is elsewhere as - well. +M src/lib-storage/index/index-search.c -M src/doveadm/client-connection-http.c +2016-10-31 21:39:44 +0200 Timo Sirainen (ccf5e99d0) -2016-12-08 13:01:48 +0200 Martti Rannanjärvi (1f6c70b7d) + doveadm director: Fix memory leaks if hostname lookup fails. - lib: add t_strfgmtime and t_strftime +M src/doveadm/doveadm-director.c -M src/lib/test-time-util.c -M src/lib/time-util.c -M src/lib/time-util.h +2016-11-01 17:09:27 +0200 Timo Sirainen (e0e555a09) -2016-12-08 19:37:30 +0200 Timo Sirainen (7951e2289) + lib: Fix str_truncate() when string size is already smaller. - lib: Improve seq_range_array_invert() unit tests + Previous behavior either added extra NULs to the string or assert-crashed. - Try all possible combinations for seq=0..7 and seq=4294967288..4294967295 - and make sure they're inverted correctly. +M src/lib/str.h +M src/lib/test-str.c -M src/lib/test-seq-range-array.c +2016-09-16 09:53:06 +0300 Timo Sirainen (6d24551e1) -2016-12-07 10:19:02 +0200 Aki Tuomi (93d5beb77) + imap/pop3 proxy: If passdb returns proxy_not_trusted, don't send ID/XCLIENT - lib-storage: Add test for inversion of n->max + This allows using Dovecot proxying feature towards less trusted servers. - In mail-search-simplify-args, ensure that ALL NOT UID 3:* becomes UID 1:2 +M src/imap-login/imap-proxy.c +M src/login-common/client-common-auth.c +M src/login-common/client-common.h +M src/pop3-login/pop3-proxy.c -M src/lib-storage/test-mail-search-args-simplify.c +2016-10-31 20:42:03 +0200 Timo Sirainen (adea1e1e4) -2016-12-06 11:50:13 +0200 Aki Tuomi (98ac5eead) + auth: Code cleanup - Return void in passdb.set_credentials() - lib-storage: Fix typo in function name + It's an asynchronous function, so the result will be in the callback + parameters. +M src/auth/passdb-sql.c +M src/auth/passdb.h -M src/lib-storage/mail-search-args-simplify.c +2016-10-31 20:19:07 +0200 Timo Sirainen (b4ed649ca) -2016-12-08 18:07:12 +0200 Timo Sirainen (27128a3fa) + auth: If passwd-file can't be read, return tempfail (not user unknown). - lib: Comment seq_range_array_invert() that its values must be within - min_seq..max_seq +M src/auth/db-passwd-file.c +M src/auth/db-passwd-file.h +M src/auth/passdb-passwd-file.c +M src/auth/userdb-passwd-file.c -M src/lib/seq-range-array.h +2016-10-31 20:06:35 +0200 Timo Sirainen (4b50a16fa) -2016-12-08 17:50:46 +0200 Timo Sirainen (b7a0844fb) + auth: If uidgid_file doesn't exist, fail the userdb lookup. - lib: Fix seq_range_array_invert() when input contains 2^32-1 - This caused next_min_seq to be wrapped to 0, which was handled wrong later - on. +M src/auth/auth-request.c - Fixes: Panic: file mail-index-map.c: line 549 - (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0) +2016-10-28 13:26:42 +0300 Timo Sirainen (59a82d4b3) -M src/lib/seq-range-array.c -M src/lib/test-seq-range-array.c + mdbox: Fix assert-crash caused by race condition with multiple doveadm + purges. -2016-12-07 00:14:08 +0200 Timo Sirainen (a2e65fe08) + This fixes a problem where an email that was just written to a new m.* file + gets expunged and purged by another process. - cassandra: Treat "Request timed out" also as - SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN + Fixes: Panic: file mdbox-map.c: line 1359: unreached - CASS_ERROR_SERVER_WRITE_TIMEOUT is "Write timeout" as reported by Cassandra - server, while CASS_ERROR_LIB_REQUEST_TIMED_OUT is timeout as reported by the - Cassandra library. +M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib-sql/driver-cassandra.c +2016-10-31 19:12:14 +0200 Timo Sirainen (ba1b959d6) -2016-12-05 09:53:06 +0000 Paul Howarth (6ea072d97) + fs-randomfail: "write" probability was reversed. - configure: Fix HAVE_MYSQL_SSL_CIPHER check + 0 meant 100% while 100 meant 0% +M src/lib-fs/fs-randomfail.c -M configure.ac +2016-10-31 15:37:00 +0200 Aki Tuomi (955f324bf) -2016-12-06 18:14:31 +0200 Phil Carmody (66cbd09b7) + lib-test: Do not init/deinit library twice - plugins: mail-crypt - fix static analysis pedantry + If lib is initialized, do not initialize or deinitialize library. This is + done to allow using master_service in unit tests which also wants to perform + lib init and deinit itself. - Clang cannot see that ret is -1, 0, or 1 upon assigment, and therefore - -1 or 0 upon entry into the if block. Therefore it considers ret==0 not to - be a tautology if ret!=-1, and thus falsifiable. It concludes that bad - things can later happen. +M src/lib-test/test-common.c - The easiest way to persuade it otherwise and make it clear to a human that - things are sane is to make the first error check to be for any negative ret - value, which forces the else path to explicitly imply ret==0, which means - that clause can also be removed. Just removing the ret==0 doesn't make it so - clear to the human that there's no third case. +2016-10-31 15:36:39 +0200 Aki Tuomi (8a20f9649) - The final change is simply to mimic the ret==-1 to ret<0 change earlier. + lib: Add function to see if lib is initialized - clang's error message: + This is needed by test-lib to prevent double init/deinit. - doveadm-mail-crypt.c:290:14: error: variable 'pubid' is used uninitialized - whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] - } else if (ret == 0 && - ^~~~~~~~ doveadm-mail-crypt.c:304:35: note: uninitialized use - occurs here - res->id = p_strdup(_ctx->pool, pubid); - ^~~~~ doveadm-mail-crypt.c:290:14: note: - remove the '&&' if its condition is always true - } else if (ret == 0 && - ^~~~~~~~~~~ +M src/lib/lib.c +M src/lib/lib.h - Signed-off-by: Phil Carmody +2016-10-28 21:34:41 +0300 Timo Sirainen (b73cfe3ea) -M src/plugins/mail-crypt/doveadm-mail-crypt.c + configure: Fix link ordering -2016-12-05 17:29:08 +0200 Phil Carmody (ec8dc91f8) + libprogram_client.la needs to be before libdns.la - lib/macros.h - protect old compilers from use of modern features +M configure.ac - no_sanitize(integer) is not in 3.5 (debian stable's version), but is - documented in 3.9. Exactly when it appeared isn't immediately obvious. +2016-10-28 19:38:43 +0300 Timo Sirainen (f43ce62fa) - Signed-off-by: Phil Carmody + dsync: Fix potential assert on mailbox deinit. -M src/lib/macros.h + Should have happened only in somewhat rare error conditions that require + resyncing. -2016-12-04 03:44:43 +0200 Timo Sirainen (f7f4b657c) + Fixes: Panic: file dsync-brain-mailbox.c: line 358 + (dsync_brain_sync_mailbox_deinit): assertion failed: (brain->failed || + brain->sync_type == DSYNC_BRAIN_SYNC_TYPE_CHANGED) - configure: Fix building without OpenSSL +M src/doveadm/dsync/dsync-brain-mailbox.c - AM_CONDITIONAL() needs to be part of the code path that is always run, or it - fails with: +2016-10-28 14:36:41 +0100 Paul Howarth (5546faab3) - configure: error: conditional "SSL_VERSION_GE_102" was never defined. + configure: Improve check for OpenSSL without EC support -M configure.ac + The original test was for EC_KEY_new but some systems had that and not + EVP_PKEY_CTX_new_id, so the test was switched to that function. However, + Fedora releases 12 through 17 have EVP_PKEY_CTX_new_id but not EC_KEY_new. + So we need to test for both functions before enabling the dcrypt build. -2016-12-03 20:48:30 +0100 Stephan Bosch (48654229f) +M m4/ssl.m4 - dsync: Fixed boolean expression in dsync_mailbox_import_deinit(). +2016-10-28 16:59:43 +0300 Timo Sirainen (870bf394d) - Found with Clang -Wstrict-bool. + lib-program-client: Fix building with compilers that have no typeof() -M src/doveadm/dsync/dsync-mailbox-import.c -2016-11-29 23:18:56 +0200 Aki Tuomi (0da9c83bc) +M src/lib-program-client/test-program-client-net.c +M src/lib-program-client/test-program-client-unix.c - lib: Add hmac helpers +2016-10-28 13:02:55 +0300 Timo Sirainen (05c1d362c) - These run hmac for given data with given parameters and returns stack - allocated buffer. They are helpful when doing lots of HMACs, such as the - AWS4 signing protocol. + lib: Removed t_strsplit_tab() -M src/lib/hmac.c -M src/lib/hmac.h + It's too easy to use it accidentally instead of using + t_strsplit_tabescaped(). It's also rarely what is actually wanted. -2016-11-24 18:12:00 +0200 Timo Sirainen (4add20e65) +M src/lib/strfuncs.c +M src/lib/strfuncs.h +M src/lib/test-strfuncs.c - sdbox: Rebuild index after it's been fsck'd +2016-10-28 12:12:28 +0300 Timo Sirainen (026d971be) + auth-worker: Fix potential crash when importing passdb/userdb fields without + value. -M src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c -M src/lib-storage/index/dbox-single/sdbox-sync.c + These were being converted to NULL values in auth-worker, while elsewhere + they were converted to "". Changed to "" here as well and added asserts to + make sure they won't happen again. -2016-11-28 03:26:01 +0100 Stephan Bosch (b2b9e928c) + Most of the NULL values would have been fine, but overriding any IP/port + fields would have caused a crash when trying to parse the value. - global: Added missing copyright notices. +M src/auth/auth-request.c +M src/auth/auth-worker-client.c +2016-10-28 11:54:27 +0300 Timo Sirainen (2c96c5156) -M src/auth/auth-policy.c -M src/auth/mech-plain-common.c -M src/auth/mycrypt.c -M src/auth/password-scheme-rpa.c -M src/doveadm/doveadm-print-formatted.c -M src/doveadm/doveadm-print-json.c -M src/lib-dcrypt/dcrypt-gnutls.c -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c -M src/lib-dns/test-dns-util.c -M src/lib-fts/fts-library.c -M src/lib-fts/fts-tokenizer-common.c -M src/lib-http/http-request.c -M src/lib-http/http-response.c -M src/lib/pkcs5.c + auth: Fix crash when exporting passdb fields to auth-worker that have NULL + values -2016-11-21 23:19:26 +0100 Stephan Bosch (8adcf3d0b) - lib-http: client: Fixed assert failure occurring when a new connection fails - for a peer that has active connections. +M src/auth/auth-request.c - Fixes: Panic: file http-client-queue.c: line 481 - (http_client_queue_connection_failure): assertion failed: (queue->cur_peer - == NULL) +2016-10-27 13:20:03 +0300 Timo Sirainen (5507b0c7e) -M src/lib-http/http-client-queue.c -M src/lib-http/test-http-client-errors.c + lib-compression: Fixed fd leak in unit test -2016-12-02 22:42:24 +0200 Timo Sirainen (aeb41edae) - dsync: Fix log format string broken by earlier change +M src/lib-compression/test-compression.c +2016-10-27 11:19:50 +0300 Timo Sirainen (9199e32b8) -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c + lib-auth: Minor debug logging improvement. -2016-12-02 22:29:31 +0200 Timo Sirainen (ffee2008d) + Include "PASS" or "USER" in the prefix to make it clear what the reply is + for. - dsync: Add mailbox names as well as GUIDs to log messages. +M src/lib-auth/auth-master.c +2016-08-13 01:51:32 +0300 Martti Rannanjärvi (21aaa6aff) -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c + lib-storage: rename get_real_mail to get_backend_mail -2016-12-01 02:29:44 +0200 Timo Sirainen (41eb9998b) + Also change the function signature so that it returns an int to indicate + success or failure. - lib-storage: Fix simplifying sequence sets and UID sets. +M src/lib-storage/fail-mail.c +M src/lib-storage/index/cydir/cydir-mail.c +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/raw/raw-mail.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.h +M src/lib-storage/mail.c +M src/plugins/virtual/virtual-mail.c - They were being handled completely wrong. The unit tests testing them were - also completely wrong. +2016-10-27 03:58:21 +0300 Martti Rannanjärvi (832830690) -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/test-mail-search-args-simplify.c + doveadm: fix compile warning in doveadm-dump-index -2016-12-01 02:26:08 +0200 Timo Sirainen (5cafce31f) - lib: seq_range_array_*(): Fix seq2=2^32-1 handling +M src/doveadm/doveadm-dump-index.c - Adding/merging it when it already existed added duplicated seq_range. +2016-10-26 23:20:17 +0300 Timo Sirainen (7bab7c949) -M src/lib/seq-range-array.c -M src/lib/test-seq-range-array.c + doveadm dump: Dump mailbox names in mailbox.list.index's header. -2016-12-01 00:56:11 +0200 Timo Sirainen (05278eda7) - lib-storage: Return vsize=0 from mailbox list index for empty mailboxes. +M src/doveadm/doveadm-dump-index.c - If it's known that the mailbox has no mails, there's no reason to open the - mailbox to see that its size is 0. +2016-10-26 18:06:36 +0300 Timo Sirainen (def2e150b) -M src/lib-storage/list/mailbox-list-index-status.c + *-login: Removed enforcing maximum calculated fd limit. -2016-11-30 15:59:01 +0200 Timo Sirainen (2d259b5d4) + Just use the regular ulimit. Login process has become complicated enough + that counting the exact fd size isn't so easy anymore. - dict-client: Don't timeout lookups without waiting 1sec in dict ioloop. + Also apparently this low fd limit is causing errors with new Linux kernels: + pop3-login: Error: fd_send(pop3, 18) failed: Too many references: cannot + splice - What could have happened was: +M src/login-common/main.c - - dict-client sends a request to dict-server - - dict-client process starts doing something else - - dict-server answers - - dict-client process continues doing something else for over 30 seconds, - not reading the dict-server answer - - dict-client process gets back to dict ioloop, which runs the timeout - before checking if there is anything available for reading. +2016-10-26 12:21:16 +0300 Aki Tuomi (67574bb43) - Now we'll wait for 1 second in the last dict ioloop before assuming that - there's a timeout. + lib-program-client: Remove code duplication -M src/lib-dict/dict-client.c + The content is sent on connected already. Do not send it early in async + connect. -2016-12-01 19:06:10 +0200 Timo Sirainen (19ae8a242) +M src/lib-program-client/program-client.c - dsync: When logging "Mailbox changed caused a desync", log also the reason. +2016-10-26 12:20:06 +0300 Aki Tuomi (a0c576667) - The reason is usually somewhere in the debug logs, but it's difficult to - find from there. + lib-program-client: Retry connection on EAGAIN -M src/doveadm/doveadm-dsync.c -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-mails.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-import.h -2016-12-01 01:38:02 -0600 J. Nick Koston (cda8cd74d) +M src/lib-program-client/program-client-remote.c - config: Match multiple names in local_name +2016-10-26 18:05:32 +0300 Timo Sirainen (00bcc83b1) - This can significantly reduce memory usage when using a UCC certificate with - multiple names by only loading the certificate and key once. + Compiler warning fixes with -Wstrict-bool -M src/config/config-filter.c -2016-11-24 04:06:22 +0200 Timo Sirainen (3002d944b) +M src/lib-compression/test-compression.c +M src/lib-sql/driver-cassandra.c - quota: Don't skip quota checks when moving mails between different quota - roots. +2016-10-26 14:58:56 +0300 Timo Sirainen (243c1821d) + lib: Fixed net_str2port*() comments -M src/plugins/quota/quota-storage.c -2016-11-24 20:40:15 +0200 Timo Sirainen (be6bbcf62) +M src/lib/net.h - lib-storage: Add struct mail_save_context.copy_src_mail +2016-10-25 20:52:16 +0300 Timo Sirainen (f65486adb) + doveadm fs get: Use pager formatter by default to avoid extra LF at the end. -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -2016-11-30 02:17:12 +0200 Timo Sirainen (18c53479c) +M src/doveadm/doveadm-fs.c - man: Update doveadm director flush description +2016-10-25 20:54:17 +0300 Timo Sirainen (a4a7440a1) + doveadm: Code cleanup - add and use DOVEADM_PRINT_TYPE_PAGER macro -M doc/man/doveadm-director.1.in -2016-11-30 12:34:45 +0200 Timo Sirainen (cf7aca71d) +M src/doveadm/doveadm-mail-fetch.c +M src/doveadm/doveadm-master.c +M src/doveadm/doveadm-print-pager.c +M src/doveadm/doveadm-print.h - lib-storage: If mailbox_create() fails, don't leave box in partially opened - state. +2016-10-25 20:51:36 +0300 Timo Sirainen (ec186c47c) - For example with sdbox it may have opened the indexes, but not set mailbox's - GUID. A following MAILBOX_METADATA_GUID would then assert-crash because GUID - is empty. + doveadm: "pager" formatter supports now DOVEADM_PRINT_HEADER_FLAG_HIDE_TITLE -M src/lib-storage/mail-storage.c -2016-11-30 00:28:08 +0200 Aki Tuomi (4f8d1dba5) +M src/doveadm/doveadm-print-pager.c - mail-crypt: Remove dead assigment +2016-10-25 22:39:38 +0300 Timo Sirainen (faa01447c) + director: Avoid assert-crash at deinit if user moves are still being added. -M src/plugins/mail-crypt/mail-crypt-key.c + Fixes: Panic: file user-directory.c: line 312 (user_directory_deinit): + assertion failed: (array_count(&dir->iters) == 0) -2016-11-30 00:04:53 +0200 Aki Tuomi (736d5169a) +M src/director/main.c - mail-crypt: Do not try to read error from unset variable +2016-10-25 22:17:23 +0300 Timo Sirainen (b93ec4e5b) + director: Send user's old and new backend IPs to flush script. -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c + If user was created due to the user-move, don't execute the flush script + since it wouldn't really have any work to do anyway. -2016-11-28 23:05:16 +0200 Aki Tuomi (55f91814d) +M src/director/director.c +M src/director/director.h - mail-crypt: Do not attempt to cache keys on failure +2016-10-25 22:12:01 +0300 Timo Sirainen (aad23ef15) + director: User move - Don't try to kick user's connections if user wasn't + even known. -M src/plugins/mail-crypt/mail-crypt-key.c -2016-11-29 10:57:49 +0200 Aki Tuomi (dcb58b054) +M src/director/director.c - autogen: Use HTTPS for wiki +2016-10-25 22:06:02 +0300 Timo Sirainen (3404b66f3) + director: Code cleanup - moved user kill startup to its own function. -M autogen.sh + No functional changes. -2016-11-28 15:20:01 +0200 Aki Tuomi (beb9cf38b) +M src/director/director.c - lib-dcrypt: Add error handling for dcrypt_key_id_private +2016-10-25 21:47:01 +0300 Timo Sirainen (8cafec427) + director: Code cleanup - global director is no longer needed. -M src/lib-dcrypt/istream-decrypt.c -2016-11-28 15:17:55 +0200 Aki Tuomi (e8ca30691) +M src/director/director.h +M src/director/main.c - mail-crypt: Add error handling for mailbox_open in tests +2016-10-17 01:07:50 +0300 Timo Sirainen (1b7cd5758) + director: Moved all user killing state to struct director_kill_context -M src/plugins/mail-crypt/test-mail-key.c + This should make it a bit easier to understand the life time of user + killing. It also simplifies code by removing struct + director_user_kill_finish_ctx. -2016-11-28 15:15:21 +0200 Aki Tuomi (34ee72725) + Finally, this already reduces memory usage with 32bit systems, and would + make it possible to reduce also on 64bit systems if timestamp is shrank to + 31 bits and weak bit moved after it. I'm not sure if that would be better + for performance though. In any case it would provide free space for 4 extra + bytes if that were needed in future. - doveadm-mail-crypt: Skip existing keys properly +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h +M src/director/test-user-directory.c +M src/director/user-directory.c +M src/director/user-directory.h - When generating new keypairs, handle existing keys correctly when skipping - them. +2016-10-25 21:41:16 +0300 Timo Sirainen (778a9861e) -M src/plugins/mail-crypt/doveadm-mail-crypt.c + director: Code cleanup - rename director_kill_context.self to + kill_is_self_initiated -2016-11-28 14:52:50 +0200 Aki Tuomi (d5f9cd958) - mail-crypt: Do not attempt to cache freed keypair +M src/director/director.c +2016-10-20 16:46:31 +0300 Timo Sirainen (79ee504bd) -M src/plugins/mail-crypt/mail-crypt-key.c + director: Code cleanup - added USER_IS_BEING_KILLED() macro -2016-11-28 14:45:01 +0200 Aki Tuomi (5f53b8474) - mail-crypt: Fail if key is not found and save_version less than 2 +M src/director/director-connection.c +M src/director/director-request.c +M src/director/director.c +M src/director/doveadm-connection.c +M src/director/user-directory.c +M src/director/user-directory.h - Fail if save version is set to 0 or 1, instead of trying to use undefined - value for public key. +2016-10-20 16:41:23 +0300 Timo Sirainen (c13fce163) -M src/plugins/mail-crypt/mail-crypt-plugin.c + director: Code cleanup - move enum user_kill_state to director.h -2016-11-28 13:36:56 +0200 Aki Tuomi (187826a29) + This will be needed by following commits - mail-crypt: Skip undef values if OpenSSL is <1.0.2 +M src/director/director.c +M src/director/director.h +M src/director/user-directory.c +M src/director/user-directory.h - OpenSSL 1.0.1 and earlier generate undef warnings due to using stack as - randomness source in a way that valgrind does not like, so we disable undef - value checks for mail-crypt-plugin. +2016-10-25 23:47:13 +0300 Timo Sirainen (b1d5d687d) -M src/plugins/mail-crypt/Makefile.am + lib-lda: Add back subject sanitization to mail sending. -2016-11-28 13:32:16 +0200 Aki Tuomi (a71d70b98) + Broken by acfda38b75d0f0e899ef692fef01593bd56ed85e - m4: Detect OpenSSL version 1.0.2 +M src/lib-lda/mail-send.c - valgrind cannot work in all cases if openssl version is 1.0.2, so we need to - know this to selectively disable valgrind. +2016-10-25 21:20:54 +0300 Timo Sirainen (9954af4b7) -M configure.ac + director: Fix HOST-RESET-USERS with host parameter. -2016-11-28 14:12:23 +0200 Aki Tuomi (33498b5c4) + The logic was reversed: It should flush the specified host, not some other + host. Broken by 11ee3b40320a31669bd717fecbe1e332dad4fd84 - dovecot.m4: Add NOUNDEF option to run-test.sh +M src/director/doveadm-connection.c - Using this environment variable will disable undefined value errors in - valgrind. +2016-10-25 01:03:05 +0300 Timo Sirainen (3cbc0cb7c) -M dovecot.m4 + doveadm director dump: Fixed output to include LFs -2016-11-28 13:52:40 +0200 Timo Sirainen (2d4bf7547) + Otherwise all the output will be mixed up in the same line. - lib-index: mail_transaction_log_file_sync(): Don't mix I/O errors and - corruption +M src/doveadm/doveadm-director.c +2016-10-25 00:48:08 +0300 Timo Sirainen (6af8cc057) -M src/lib-index/mail-transaction-log-file.c + director: Execute director_flush_socket only from one director. -2016-11-28 13:04:47 +0200 Timo Sirainen (daa3eb974) + Having each director do it would be redundant since they're all supposed to + be performing the same flush task to the same backend. - lib-index: Fix assert-crash after "log file shrank" error. +M src/director/director.c +M src/director/user-directory.h - Fixes: Panic: file buffer.c: line 316 (buffer_set_used_size): assertion - failed: (used_size <= buf->alloc) +2016-10-25 00:32:59 +0300 Timo Sirainen (0874d7a4f) -M src/lib-index/mail-transaction-log-file.c + director: Improve debug logging output. -2016-11-28 12:16:26 +0200 Aki Tuomi (fb7cdf736) - mail-crypt: Commit transaction before lookup in test +M src/director/director-connection.c +M src/director/director.c - Key cannot be found if it's not committed before. +2016-10-25 00:25:38 +0300 Timo Sirainen (fd882f791) -M src/plugins/mail-crypt/test-mail-key.c + director: Fix user move hangs when another move is triggered early. -2016-11-25 01:45:29 +0200 Aki Tuomi (4c38e5e51) + Running "doveadm director flush" before the previous flush hadn't fully + finished could have caused users to hang until their move timeout: - Add suppression for openssl leak + director: Error: Finishing user 3249070169 move timed out, its state may now + be inconsistent (state=waiting-for-everyone) +M src/director/director-connection.c +M src/director/director.c -M run-test-valgrind.supp +2016-10-25 00:22:20 +0300 Timo Sirainen (f9c765593) -2016-11-25 00:45:35 +0200 Aki Tuomi (c242e07d1) + director: Prevent race conditions by adding USER_KILL_STATE_FLUSHING - mail-crypt: Add manpage + In theory it's possible that a user is freed during a flush and added back + before flush is finished, possibly even being moved again. This check makes + sure that we don't finish such move unless we're actually at the correct + flushing state. (If there's another flush also running for the user it'll be + ignored.) + This is also useful for logging purposes. -M .gitignore -M doc/man/Makefile.am -A doc/man/doveadm-mailbox-cryptokey.1.in -M doc/man/doveadm-mailbox.1.in +M src/director/director.c +M src/director/user-directory.c +M src/director/user-directory.h -2016-11-24 14:48:03 +0200 Aki Tuomi (8797af3bf) +2016-10-25 00:13:23 +0300 Timo Sirainen (fb9dfa9ea) - mail-crypt: Add mail-crypt plugin + director: If user host conflict is detected, make sure new host is sent + back. + USER-KICK-HASH was sent, but the sender didn't get back a USER reply with + the new host. This could have increased how long user's host differred in + directors. -M configure.ac -M src/plugins/Makefile.am -A src/plugins/mail-crypt/Makefile.am -A src/plugins/mail-crypt/doveadm-mail-crypt.c -A src/plugins/mail-crypt/fs-crypt-common.c -A src/plugins/mail-crypt/fs-crypt-settings.c -A src/plugins/mail-crypt/fs-crypt-settings.h -A src/plugins/mail-crypt/fs-crypt.c -A src/plugins/mail-crypt/fs-mail-crypt.c -A src/plugins/mail-crypt/mail-crypt-acl-plugin.c -A src/plugins/mail-crypt/mail-crypt-common.h -A src/plugins/mail-crypt/mail-crypt-global-key.c -A src/plugins/mail-crypt/mail-crypt-global-key.h -A src/plugins/mail-crypt/mail-crypt-key.c -A src/plugins/mail-crypt/mail-crypt-key.h -A src/plugins/mail-crypt/mail-crypt-plugin.c -A src/plugins/mail-crypt/mail-crypt-plugin.h -A src/plugins/mail-crypt/mail-crypt-pluginenv.c -A src/plugins/mail-crypt/mail-crypt-userenv.c -A src/plugins/mail-crypt/test-mail-global-key.c -A src/plugins/mail-crypt/test-mail-key.c + Avoids repeating this error: Error: User hash 2957018085 is being redirected + to two hosts: 10.0.0.30 and 10.0.0.201 (old_ts=1477338836) -2016-11-25 09:49:25 +0200 Aki Tuomi (f581a8d19) +M src/director/director-connection.c - lib-dcrypt: Use module_dir setting +2016-10-24 22:42:43 +0300 Timo Sirainen (b79120aa3) + doveadm director flush: Added --max-parallel parameter. -M src/lib-dcrypt/Makefile.am -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c -2016-11-25 09:48:43 +0200 Aki Tuomi (3dfbf3b37) +M src/doveadm/doveadm-director.c - lib-dcrypt: Add module_dir setting +2016-10-24 22:41:25 +0300 Timo Sirainen (11ee3b403) - This is needed for unit tests that require dcrypt, so that they can load - backend without installing it first. + director: HOST-RESET-USERS moves users more slowly now. -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/dcrypt.h + By default only 100 users can be moved in parallel. This can be overridden + with HOST-RESET-USERS parameter. -2016-11-25 16:14:16 +0200 Timo Sirainen (a38f1abbb) + This delaying is especially useful when director_flush_socket is used to + avoid huge floods to the script service. Even without the socket it's still + good for avoiding unnecessary load spikes when all users are kicked at once + and they reconnect back at the same time. - lib-storage: Fix raw storage to sync mailboxes correctly. +M src/director/doveadm-connection.c +M src/director/doveadm-connection.h +M src/director/main.c +M src/director/user-directory.h - Broken by b9da8540e665138b3cad0b637c08c0ab7d7a7eeb +2016-10-25 00:11:50 +0300 Timo Sirainen (3c89b4794) -M src/lib-storage/index/raw/raw-sync.c + director: If user move times out, log the state it was in at the time. -2016-11-25 15:34:46 +0200 Timo Sirainen (162b8a353) - lib-storage: Fix error handling in mailbox_list_index_refresh_force() +M src/director/director.c - Broken by recent changes. +2016-10-24 22:39:56 +0300 Timo Sirainen (ade4a0e1a) -M src/lib-storage/list/mailbox-list-index.c + director: Log user's kill_state with a human-readable string. -2016-11-22 01:28:33 +0200 Timo Sirainen (0805d0f89) - mkcert.sh: Use umask to create key file as 0600 +M src/director/director-connection.c +M src/director/user-directory.c +M src/director/user-directory.h - Fixes a race condition between creation of the file and a later chmod. This - script was mostly meant as an example though, and not really for production - use. Especially because it generates self-signed certs. CVE-2016-4983 +2016-10-24 22:27:30 +0300 Timo Sirainen (3d76809be) -M doc/mkcert.sh + doveadm director: Invalid parameters cause doveadm to fail silently. -2016-11-24 18:12:18 +0200 Timo Sirainen (265b58526) + doveadm_cmd_context.cmd doesn't point directly to doveadm_cmd_director. - mdbox: Rebuild index after it's been fsck'd +M src/doveadm/doveadm-director.c +2016-10-24 22:22:28 +0300 Timo Sirainen (a9ade1046) -M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib-storage/index/dbox-multi/mdbox-map.h -M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c -M src/lib-storage/index/dbox-multi/mdbox-sync.c + director: Fix sending up/down state in handshakes. -2016-11-24 17:52:01 +0200 Timo Sirainen (a81c40fb4) + They were never sent, because HOSTs were sent before director had waited for + the remote to send its version number. So sender thought that the remote's + minor_version was too old and it didn't send the up/down state at all. - lib-storge: Call mail_storage.list_index_corrupted() when needed + This caused errors like: - The callback is called whenever mailbox list index appears to be corrupted - with LAYOUT=index. The storage is responsible for adding to the index any - mailboxes that are missing. + Warning: director(10.0.0.30:9090/left): Host 10.0.0.30 is being updated + before previous update had finished (up -> down) - setting to state=down + vhosts=100 Error: director(10.0.0.30:9090/left): Director 10.0.0.30 SYNC + request hosts don't match us - resending hosts (seq=6, remote + hosts_hash=262126213, my hosts_hash=2458934259) -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h +M src/director/director-connection.c -2016-11-24 15:50:01 +0200 Timo Sirainen (243d0d9f1) +2016-10-24 21:58:03 +0300 Timo Sirainen (67cb14c7f) - lib-storage: Add mail_storage.list_index_corrupted() + director: If SYNCs are received during handshake, send them later. - The actual implementation is in the next commit. + This fixes delays during handshake: Error: Ring SYNC appears to have got + lost, resending -M src/lib-storage/fail-mail-storage.c -M src/lib-storage/index/cydir/cydir-storage.c -M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/maildir/maildir-storage.c -M src/lib-storage/index/mbox/mbox-storage.c -M src/lib-storage/index/pop3c/pop3c-storage.c -M src/lib-storage/index/raw/raw-storage.c -M src/lib-storage/index/shared/shared-storage.c -M src/lib-storage/mail-storage-private.h -M src/plugins/virtual/virtual-storage.c +M src/director/director-connection.c +M src/director/director-host.h -2016-11-24 17:16:30 +0200 Timo Sirainen (219dd30e1) +2016-10-24 20:21:36 +0300 Timo Sirainen (892e25e1c) - lib-index: Add mail_index_unset_fscked() + director: Code cleanup - Give tab-unescaped args to all doveadm command + handlers. - This can be used to easily remove MAIL_INDEX_HDR_FLAG_FSCKD. It takes a - transaction parameter instead of sync_ctx because some index rebuilds are - done with a separate transaction while the sync_ctx is rolled back. -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/mail-index.h +M src/director/doveadm-connection.c -2016-11-24 15:49:15 +0200 Timo Sirainen (ead5dced7) +2016-10-24 20:20:09 +0300 Timo Sirainen (60835f193) - lib-index: fsck now adds MAIL_INDEX_HDR_FLAG_FSCKD to header. + director: USER-MOVE didn't handle non-hash username correctly. - It can only be removed by an explicit header update. + The entire command line was being hashed instead of just the username. -M src/lib-index/mail-index-fsck.c -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index.h +M src/director/doveadm-connection.c -2016-11-24 15:41:38 +0200 Timo Sirainen (745c851f5) +2016-10-24 20:16:57 +0300 Timo Sirainen (49ec31729) - lib-storage: Rename mailbox_list_index.corrupted to - corrupted_names_or_parents + director: Make sure IP address parsing works in DIRECTOR-ADD/REMOVE - Makes it clearer what exactly the flag means. + We were passing the entire string through to net_addr2ip(). It seems that + inet_aton() stops at whitespace though, so this wasn't actually causing + errors at least on Linux. -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h +M src/director/doveadm-connection.c -2016-11-24 15:14:06 +0200 Timo Sirainen (a37771a18) +2016-10-24 20:08:54 +0300 Timo Sirainen (9ba1a38e2) - lib-index: If index open fails with fsck, retry opening once. + director: Code cleanup - moved command handling to its own function. - The fsck should have fixed the log offsets and open should work. -M src/lib-index/mail-index-map-read.c +M src/director/doveadm-connection.c -2016-11-24 15:12:21 +0200 Timo Sirainen (582971057) +2016-10-24 20:07:26 +0300 Timo Sirainen (d3bae1f9d) - lib-index: fsck: Fix log_file_head|tail_offset properly + director: Show in process title how many users are being moved. -M src/lib-index/mail-index-fsck.c +M src/director/director.c +M src/director/director.h +M src/director/main.c -2016-11-25 10:22:18 +0200 Aki Tuomi (25a1ca4ee) +2016-10-24 20:00:40 +0300 Timo Sirainen (375123432) - lib-dcrypt: Add assert that vfs is initialized + director: Code cleanup - Finish user move always in the same function. -M src/lib-dcrypt/dcrypt.c +M src/director/director.c -2016-11-24 19:53:17 +0200 Timo Sirainen (67bb90dd1) +2016-10-24 19:59:54 +0300 Timo Sirainen (ffedd8974) - lib-storage: Fail if no namespaces have list=yes + director: Call state_change_callback on user move timeout. - The previous check allowed all namespaces to have list=children. This - crashed later on in mail_namespaces_get_root_sep(), because it couldn't find - any list=yes namespaces. -M src/lib-storage/mail-namespace.c +M src/director/director.c +M src/director/director.h +M src/director/main.c -2016-11-25 00:17:45 +0200 Timo Sirainen (347227821) +2016-10-21 12:50:56 +0300 Timo Sirainen (3c3001681) - lib-index: Compiler warning fix + director: Code cleanup - allow commands handlers to stop processing input + Now returning 0 exits the input reading without disconnecting client. -M src/lib-index/mail-transaction-log.c +M src/director/doveadm-connection.c -2016-11-22 18:34:53 +0200 Timo Sirainen (6bde01d39) +2016-10-25 13:27:29 +0300 Aki Tuomi (1fce089d5) - lib-mail: Add randomness test to test-mail-html2text + lib-mail: Add tests for dec/hexdec encoded entities M src/lib-mail/test-mail-html2text.c -2016-11-22 18:33:12 +0200 Timo Sirainen (582003e3d) - - lib-mail: Fix assert-crash in mail_html2text_more() with invalid input. +2016-10-25 12:48:23 +0300 Aki Tuomi (eb0cfb4f3) - parse_data() continues forward thinking that it might have valid input, - until it has enough data and realizes that there's nothing valid. This - triggers: + lib-mail: Support decimal/hexadecimal encoded entities - Panic: file mail-html2text.c: line 312 (mail_html2text_more): assertion - failed: (pos >= buf_orig_size) + Add support for &#nnn; and &#xnnn; entities. M src/lib-mail/mail-html2text.c -M src/lib-mail/test-mail-html2text.c - -2016-11-19 02:32:21 +0200 Timo Sirainen (62a17f66b) - lib: Clarify that buffer_write() zero-fills buffer when writing past its - size +2016-10-25 10:29:50 +0300 Aki Tuomi (f42024ba9) + imap-login: Skip NIL value in ID handler -M src/lib/buffer.h -M src/lib/test-buffer.c + NIL value can cause hard crash, depending what the key is. For x-proxy-ttl, + NIL will crash on any system, x-originating-ip will crash on some nss + versions (e.g. centos 6.7). -2016-11-19 01:54:14 +0200 Timo Sirainen (56c5e1c7a) + Migitating factor here is that the NIL value is only accepted from trusted + network. - global: Code cleanup - avoid passing NULL to functions with non-null - parameter +M src/imap-login/imap-login-client.c +2016-10-24 18:52:24 +0300 Timo Sirainen (e7f31dfdc) -M src/lib-dcrypt/test-stream.c -M src/lib-index/mail-cache-lookup.c -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib/buffer.c -M src/lib/istream.c + lib-compression: Added unit tests for reading .gz files -2016-11-19 02:00:25 +0200 Timo Sirainen (8dc068f46) - global: Avoid unnecessary unsigned integer wraps. +M src/lib-compression/test-compression.c - Avoids complains from clang -fsanitize=integer +2016-10-24 18:31:53 +0300 Timo Sirainen (697a4fbe2) -M src/indexer/master-connection.c -M src/lib-mail/test-istream-header-filter.c -M src/lib-storage/index/mbox/istream-raw-mbox.c + lib-compression: Added file uncompression support for test-compression -2016-11-19 01:59:03 +0200 Timo Sirainen (1215cceac) + This can be useful for debugging. - global: Avoid loops unnecessarily decreasing below zero. +M src/lib-compression/test-compression.c - Avoids complains from clang -fsanitize=integer +2016-10-24 18:29:06 +0300 Timo Sirainen (0757cf450) -M src/lib-mail/message-address.c -M src/lib-mail/message-snippet.c -M src/lib/sha3.c + lib-compress: Don't assume too early that gz file continues after a trailer. -2016-11-19 01:57:40 +0200 Timo Sirainen (5791bc28b) + Some istreams don't have EOF immediately set after the gz trailer. This + fixes errors like "missing gz trailer at 1675" - lib: Mark md4/md5/sha1/sha2 code with ATTR_UNSIGNED_WRAPS +M src/lib-compression/istream-zlib.c +2016-10-24 17:15:00 +0300 Timo Sirainen (bc06e3827) -M src/lib/md4.c -M src/lib/md5.c -M src/lib/sha1.c -M src/lib/sha2.c + istream-zlib: "missing gz trailer" error message was wrong. -2016-11-19 01:56:19 +0200 Timo Sirainen (7acacaedd) - lib-index: mail_index_map_register_ext(ext_offset=-1) now sets hdr_offset=-1 +M src/lib-compression/istream-zlib.c - It shouldn't make any difference, but this is a less confusing value. +2016-10-24 15:59:07 +0300 Timo Sirainen (1ea0aa8e1) -M src/lib-index/mail-index-map.c + lib: With FILE_LOCK_SLOW_WARNING_MSECS log a warning also when keeping lock + for long. -2016-11-19 01:39:42 +0200 Timo Sirainen (1868f86ec) + This can help catching which process kept the lock for too long. - lib: Add ATTR_UNSIGNED_WRAPS for disabling clang -fsanitize=integer +M src/lib/file-lock.c +2016-10-24 16:01:43 +0300 Timo Sirainen (43f6d195d) -M src/lib/macros.h + configure: Fixed checking if OpenSSL is too old for lib-dcrypt -2016-11-24 23:26:40 +0200 Timo Sirainen (3e1407670) + EVP_PKEY_CTX_set_ec_paramgen_curve_nid() is a macro, so it can't be checked + with AC_CHECK_LIB(). - lib-index: Compiler warning fix. +M m4/ssl.m4 +2016-10-24 16:05:00 +0300 Timo Sirainen (d54edc1ad) -M src/lib-index/mail-transaction-log.c + lib: Fix compiler warnings in test-ioloop -2016-11-23 23:19:05 +0200 Timo Sirainen (0882459e9) + Fixes: test-ioloop.c:72: error: ignoring return value of ‘write’, declared + with attribute warn_unused_result - lib-storage: Rotate dovecot.list.index.log* more often. +M src/lib/test-ioloop.c - The history in these files isn't as important as in mailbox indexes. Reduce - disk space usage by rotating them more often and deleting the - .log.2 more quickly. +2016-10-24 13:08:47 +0300 Timo Sirainen (86ab71bf1) -M src/lib-storage/list/mailbox-list-index.c + lib-http: Add ioloop and lock wait information to timeout messages. -2016-11-23 23:12:29 +0200 Timo Sirainen (39815e868) + It'll now log for example: 9007 Request timed out (Request sent 7.087 secs + ago, 0.076 in other ioloops, 7.012 in locks, connected 7.087 secs ago) - lib-index: Add mail_index_set_log_rotation() + Which points out that the problem wasn't really with the HTTP, but with + locking. This likely should be fixed in some way also in lib-http so that it + gives a bit of extra time for reading the request, but that's a separate + fix. +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index.c -M src/lib-index/mail-index.h -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.c +2016-10-24 12:17:44 +0300 Timo Sirainen (e55b5cf82) -2016-11-23 22:42:03 +0200 Timo Sirainen (e6a3d022b) + dict-client: Fix logging how much time was spent in other ioloops in slow + lookup warnings. - lib-storage: Try harder to rename a corrupted mailbox name to its old name. + The warning's idea is to show why the lookup could have been slow. We + differentiate between time spent in dict_wait() waiting only for the dict + result and time spent in other ioloops waiting for potentially other things + as well (and time spent waiting for locks during this time). - If the old name exists, use it as a prefix for the new name. This is - especially useful when restoring autocreated mailboxes. A new mailbox could - have already been autocreated, but it's still useful to have the broken one - renamed with the same prefix, so it'll be clear that these mailboxes should - be merged. + The previous code didn't work right when multiple ioloops were used, which + happened sometimes. -M src/lib-storage/list/mailbox-list-index-backend.c + Also changed %u to %d just in case some calculation is wrong. It's nicer to + get a slightly negative value rather than a huge positive one. -2016-11-24 19:32:44 +0200 Aki Tuomi (565ae33cb) +M src/lib-dict/dict-client.c - dsync: Do not try replace remote folder GUID when doing oneway sync +2016-10-24 12:16:48 +0300 Timo Sirainen (d327ea02d) - Oneway sync tried to replace remote folder's GUID when running in one way - mode. This causes trouble, e.g. when running with imapc, because you can't - do this. + lib: Added ioloop_global_wait_usecs -M src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c + This is helpful when multiple ioloops aren't used and + io_loop_get_wait_usecs() can't be easily used for all of them. -2016-11-23 18:43:17 +0200 Timo Sirainen (903a3efb9) +M src/lib/ioloop.c +M src/lib/ioloop.h - lib-storage: Fix rotation of dovecot.list.index.log +2016-10-24 14:05:58 +0300 Timo Sirainen (f83fd83f9) - After b9da8540e665138b3cad0b637c08c0ab7d7a7eeb the tail offsets weren't - being updated anymore when mail_index_sync_next() wasn't used to skip over - all the data. Mailbox list index wasn't doing this, and so the log was never - rotated since tail_offset was never equal to head_offset. + lib: Add FILE_LOCK_SLOW_WARNING_MSECS environment. -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index-sync.c + Log a warning if any locking takes longer than the specified number of + milliseconds. This can be enabled globally with: -2016-11-23 17:14:48 +0200 Timo Sirainen (5e21c15a7) + import_environment = $import_environment FILE_LOCK_SLOW_WARNING_MSECS=1000 - imapc: Fix assert that checks if mail is expunged locally. +M src/lib/file-dotlock.c +M src/lib/file-lock.c +M src/lib/file-lock.h - The EXPUNGE may have been sent while imapc_sync_index() was issuing remote - imapc commands. It would end up being in delayed_expunged_uids, so the - assert needs to check that too. +2016-10-24 13:28:44 +0300 Timo Sirainen (1c783b6d9) - Fixes: Panic: file imapc-sync.c: line 290 (imapc_initial_sync_check): - assertion failed: (mail_index_is_expunged(view, lseq)) + lib-index: Fix potential error when reading from uncommitted cache + transaction -M src/lib-storage/index/imapc/imapc-sync.c + If dovecot.index.cache is compressed during the transaction, the new cache + fields mapping doesn't necessarily match what is in the transaction. -2016-11-23 17:14:14 +0200 Timo Sirainen (baca12240) + Fixes: Error: Corrupted index cache file .../dovecot.index.cache: field + index too large (27 >= 17) - imapc: Cleanup - change delayed_expunged_uids to seq_range. + Although there may be other cache corruption errors it also fixes. - This simplifies the next commit. +M src/lib-index/mail-cache-transaction.c -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.h +2016-10-24 12:25:48 +0300 Timo Sirainen (96a4e105f) -2016-11-23 15:57:03 +0200 Timo Sirainen (2c3f37672) + lib-index: Fix potential assert-crash when reading cache - auth: Don't crash expanding %variables when username isn't set. + Fixes: Panic: file mail-cache-lookup.c: line 258 + (mail_cache_lookup_iter_next): assertion failed: (ctx->offset != 0) - This continues the auth-policy fix in - c3d3faa4f72a676e183f34be960cff13a5a725ae + Broken by d33fc6c584718efd46159e1d8f46488b9dfc66f5 -M src/auth/auth-request-var-expand.c +M src/lib-index/mail-cache-lookup.c -2016-11-23 13:25:54 +0200 Timo Sirainen (174242a16) +2016-10-24 12:23:49 +0300 Timo Sirainen (e1c08b1d9) - sdbox: Don't log an error if stub is added twice + master: If chrooted service's core wasn't dumped, suggest to unset the + chroot. - There's no locking for them, so it's fine if two processes add the same - mail. The second one could be ignored, but it was a bit easier to just let - it rename over the first one. -M src/lib-storage/index/dbox-single/sdbox-file.c -M src/lib-storage/index/dbox-single/sdbox-file.h -M src/lib-storage/index/dbox-single/sdbox-save.c +M src/master/service-process.c -2016-11-23 13:16:19 +0200 Aki Tuomi (1f2c35da2) +2016-10-24 11:34:05 +0300 Aki Tuomi (cca98b5ac) - auth: Fix auth-policy crash when username is NULL + lib: Add test for ioloop fd polling - If SASL request is invalid, or incomplete, and username is left NULL, handle - it gracefully by adding just NUL byte in auth policy digest for username. -M src/auth/auth-policy.c +M src/lib/test-ioloop.c -2016-11-22 10:21:24 -0500 Josef 'Jeff' Sipek (1df777483) +2016-10-24 10:13:42 +0300 Aki Tuomi (d0d5df1cf) - lib-storage: require MAIL_STORAGE_CLASS_FLAG_STUBS when caching + lib: Fix kqueue io_loop_get_wait_time usage - If we are going to be using the storage for caching, we should check that - the storage actually supports mail stubs. + The code needs to take into consideration, when there is no IO to be waited, + but possibly there is io_set_pending used, or just timeouts. -M src/lib-storage/index/dbox-single/sdbox-storage.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c +M src/lib/ioloop-kqueue.c -2016-11-22 18:00:13 +0200 Timo Sirainen (988ff60eb) +2016-10-24 10:08:42 +0300 Aki Tuomi (3e41b3d0c) - lib-fts: Add randomness test to test-fts-tokenizer + lib: Ensure tv_r gets set in io_loop_get_wait_time + If this does not get reset here to 0 it can cause errors or unpredictable + behaviour in select/kqueue polling, such as very long delays. -M src/lib-fts/test-fts-tokenizer.c +M src/lib/ioloop.c -2016-11-22 16:35:58 +0200 Timo Sirainen (8c4b4b9c6) +2016-10-22 22:45:48 +0300 Timo Sirainen (9faac59f6) - lib-fts: Make sure address tokenizer can't return empty tokens. + director: Fix crash handling director_flush_socket when user is freed. - This happened when address was a token that first looked like it could be a - valid address, but then got truncated due to reaching maxlen, followed by - truncating the UTF8-sequence and finally all the rest of the '-' or - '.' chars that were valid at the beginning of the address are stripped away - by fts_tokenizer_delete_trailing_invalid_char(), leaving nothing left. - Fixes: Panic: file fts-tokenizer.c: line 206 (fts_tokenizer_next): assertion - failed: (ret <= 0 || (*token_r)[0] != '\0') +M src/director/director.c -M src/lib-fts/fts-tokenizer-address.c -M src/lib-fts/test-fts-tokenizer.c +2016-10-13 16:11:48 +0300 Aki Tuomi (cf7857bce) -2016-11-22 17:31:02 +0200 Timo Sirainen (3b27e2706) + director: Support flush socket - lib-fts: Fix fts_tokenizer_delete_trailing_partial_char() unit test + This allows specifying an URI to execute on user kill. It can be of form + exec:/path/to/bin, unix:/path/to/socket or tcp:ip:port + The location is sent FLUSH username-hash per killed user. You can execute + some action there, and you are expected to return '+\nOK\n' as reply once + you are done. -M src/lib-fts/test-fts-tokenizer.c +M src/director/Makefile.am +M src/director/director-settings.c +M src/director/director-settings.h +M src/director/director.c -2016-11-22 12:03:01 +0200 Timo Sirainen (323d035fb) +2016-10-22 13:00:08 +0300 Timo Sirainen (120d33c71) - lib-index: Handle invalid headers as "corruption", not "temporary error" + configure: Improved checking if OpenSSL is too old for lib-dcrypt - This is especially required for "Header's corrupted flag is set" error, - which won't get fixed otherwise. + Some OpenSSL versions had EC_KEY_new, but not other needed functions. - It's a bit more questionable if we should treat major version or CPU - architecture change as corruption, but it's possible those only exist - because of corruption. It's also very unlikely that either is really - happening. Ideally there would be a hash that verifies whether the header is - corrupted or not. +M m4/ssl.m4 -M src/lib-index/mail-index-map-hdr.c -M src/lib-index/mail-index-map-read.c +2016-10-21 14:58:57 +0300 Timo Sirainen (92c8109f7) -2016-11-22 10:59:36 +0200 Timo Sirainen (c647daf54) + program-client-unix: Don't retry connecting to UNIX socket. - dict-client: dict_lookup*() deleted the first byte of the result. + Especially with async connections this will just block the whole process + when there are errors. +M src/lib-program-client/program-client-remote.c -M src/lib-dict/dict-client.c +2016-10-21 14:34:47 +0300 Timo Sirainen (958e5ae51) -2016-11-21 14:05:42 +0200 Timo Sirainen (b8eed6456) + director: Fix shutdown_clients=no to not break - quota-clone: Flush quota-clone 10s after quota update if it's not already - done + The director process must shut down even with with shutdown_clients=no. + Otherwise the two director processes will try to keep competing with each + others and log errors like: - This way a long-running IMAP session can't keep the quota-clone desynced for - a long time. + director: Warning: Director 10.0.0.123:9090/right disconnected us with + reason: Replacing with new incoming connection director: Warning: Director + 10.0.0.123:9090/right disconnected us with reason: Replacing with + 10.0.0.124:9090 -M src/plugins/quota-clone/quota-clone-plugin.c +M src/director/main.c -2016-11-21 14:02:11 +0200 Timo Sirainen (ad10b85c8) +2016-10-21 13:55:42 +0300 Aki Tuomi (d83aa9427) - quota-clone: Code cleanup - moved recursion check to quota_clone_flush() + doveadm: Rewind input early enough + Command input needs to be rewinded earlier in doveadm_mail_next_user. -M src/plugins/quota-clone/quota-clone-plugin.c +M src/doveadm/doveadm-mail.c -2016-11-21 23:43:08 +0200 Timo Sirainen (954b2106c) +2016-10-21 11:05:23 +0300 Timo Sirainen (4a1972123) - lib-dict: Add extra NULL-check to make static analyzer happier + lib-program-client: Change program_client_create() API to return error + string. - str_array_length() already checked NULL internally though. -M src/lib-dict/dict-client.c +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h -2016-11-21 13:57:23 +0200 Aki Tuomi (df2a53f64) +2016-10-21 00:25:20 +0300 Timo Sirainen (28f799561) - lib-index: Limit mmap errors in txn log file to 1/s + imap-hibernate: Fix "DONE" handling. + 1. If only "DONE\r\n" was sent, it randomly failed with BAD because of + out-of-bounds buffer read. -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h + 2. If "DONE\r\n" was followed by a command tag but no space afterwards, we + kept waiting for the input to continue. But since the DONE was already sent, + we should break the IDLE already at that point without any further waiting. -2016-11-21 13:53:50 +0200 Aki Tuomi (0c9233877) +M src/imap-hibernate/imap-client.c - lib-index: Limit mmap errors in index cache to 1/s +2016-10-20 18:09:09 +0300 Timo Sirainen (e8a936d1e) + lib: Added unit tests for string tabescaping. -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache.c -2016-11-21 13:34:57 +0200 Aki Tuomi (ae4d74667) +M src/lib/test-strescape.c - lib-index: Limit mmap syscall errors in index to 1/s +2016-10-20 17:45:44 +0300 Timo Sirainen (7a60e1dc9) + global: Replaced t_strsplit_tab() calls with t_strsplit_tabescaped() -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-private.h + This is useful especially in auth code to support LFs in extra fields. -2016-11-21 13:33:42 +0200 Aki Tuomi (a48c485c2) + Other pieces of code were also tab-escaping strings, but never unescaping + them. Usually it didn't matter, because nobody would use the escaped + characters. Still, the code wasn't exactly behaving correctly. - lib-index: Do not crash if log is missing + One downside to this change is that it's now possible to pass through TABs, + CRs and LFs through the various protocols. In theory this shouldn't cause + any problems, but combined with other bugs this could trigger some security + problems. - Fixes sigfault when index and index.log files are corrupted. +M src/anvil/anvil-connection.c +M src/auth/auth-fields.c +M src/auth/auth-master-connection.c +M src/auth/auth-request-handler.c +M src/auth/passdb-blocking.c +M src/auth/passdb-cache.c +M src/config/config-connection.c +M src/director/director-connection.c +M src/director/director-test.c +M src/director/doveadm-connection.c +M src/director/login-connection.c +M src/doveadm/doveadm-director.c +M src/doveadm/doveadm-penalty.c +M src/doveadm/doveadm-proxy.c +M src/doveadm/doveadm-replicator.c +M src/doveadm/doveadm-who.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/indexer/indexer-client.c +M src/ipc/ipc-connection.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-service-settings.c +M src/login-common/login-proxy.c +M src/plugins/push-notification/push-notification-driver-ox.c -M src/lib-index/mail-index.c -M src/lib-index/mail-transaction-log-view.c +2016-10-20 17:21:59 +0300 Timo Sirainen (ef0c36aa8) -2016-11-21 19:05:49 +0200 Timo Sirainen (4330fa04a) + global: Code cleanup - Use t_strsplit_tabescaped() to avoid + str_tabunescape() - dict-client: Server can now send command replies in any order. - This way one slow lookup doesn't block all the other ones. +M src/doveadm/client-connection.c +M src/doveadm/doveadm-stats.c +M src/indexer/indexer-client.c +M src/lib-auth/auth-master.c +M src/lib-master/master-login.c +M src/stats/client.c +M src/util/script-login.c - This change keeps backwards compatibility in the dict protocol for both - client and server. +2016-10-20 12:39:27 +0300 Timo Sirainen (acfda38b7) -M src/dict/dict-commands.c -M src/dict/dict-connection.h -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h + global: Try to initialize var_expand_tab[] directly. -2016-11-21 19:04:26 +0200 Timo Sirainen (691f4f5c3) + This avoids accidents with the array numbering being wrong. - dict: Make sure iterate doesn't add to ostream when it's already full. +M src/imap-hibernate/imap-client.c +M src/imap/imap-client.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-send.c +M src/lib-mail/mail-user-hash.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-user.c +M src/login-common/client-common.c +M src/login-common/login-settings.c +M src/plugins/acl/acl-shared-storage.c +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c +2016-10-20 12:08:15 +0300 Timo Sirainen (4b1781e4c) -M src/dict/dict-commands.c + global: Use i_strchr_to_next() wherever useful. -2016-11-21 18:52:25 +0200 Timo Sirainen (a9d14bb8e) - dict: Moved iterate's corking to more correct location. +M src/auth/auth-request-var-expand.c +M src/auth/auth-worker-client.c +M src/auth/db-ldap.c +M src/auth/userdb-passwd-file.c +M src/imap-hibernate/imap-client.c +M src/lib-dict/dict-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-mail/mail-user-hash.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-user.c +M src/lib-storage/mailbox-list.c +M src/login-common/client-common.c +M src/stats/mail-user.c - Commands' input handling already corks ostream in connection.c. +2016-10-20 12:08:09 +0300 Timo Sirainen (f915d2f0b) -M src/dict/dict-commands.c -M src/dict/dict-connection.c + lib: Added i_strchr_to_next() -2016-11-21 18:46:48 +0200 Timo Sirainen (d3b8b1e15) - dict-client: Include reconnection-status in slow dict lookup messages. +M src/lib/strfuncs.h +2016-10-20 12:24:44 +0300 Timo Sirainen (e40aeca4a) -M src/lib-dict/dict-client.c + pop3: Fix pop3_logout_format=%{deleted_size} expansion when there are no + deletions -2016-11-21 16:55:45 +0200 Timo Sirainen (c2db9c89d) + Should be "0", not empty string. - dict-client: Add warn_slow_msecs setting +M src/pop3/pop3-client.c - This allows configuring the default 5 seconds "slow dict lookup" warning. +2016-10-20 12:06:25 +0300 Timo Sirainen (761585b5c) -M src/lib-dict/dict-client.c + %{auth_domain} shouldn't include the leading '@' -2016-11-21 16:45:55 +0200 Timo Sirainen (0bfc9b758) - dict-client: Add time spent in dict-server to "slow dict lookup" messages. +M src/imap-hibernate/imap-client.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-user.c - This way you can see if the slowness was due to some communication problem - between dict-client/server or internally in dict server. +2016-10-20 18:31:27 +0300 Timo Sirainen (5e8e8fb01) - This change keeps backwards compatibility in the dict protocol for both - client and server. + lib-ldap: Fixed compiling with OpenBSD -M src/dict/dict-commands.c -M src/dict/dict-connection.c -M src/dict/dict-connection.h -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h -2016-11-21 16:44:38 +0200 Timo Sirainen (e2d1cffbd) +M src/lib-ldap/ldap-search.c - dict-client: Code cleanup - handle tab-unescaping before callbacks. +2016-10-20 16:30:49 +0300 Aki Tuomi (0b808b62a) + auth: Escape local_name -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h -2016-11-21 13:29:12 +0200 Timo Sirainen (9627b1a28) +M src/auth/auth-request.c +M src/lib-auth/auth-client-request.c - lib-index: Revert log flooding prevention / 3c014db6f +2016-10-20 16:06:27 +0300 Aki Tuomi (290b91ad6) - This was intended only for mmap() errors. + login-common: Include local_name in login_var_expand_table -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index.c + This way it can be used in login_log_format -2016-11-19 04:04:02 +0200 Timo Sirainen (00776386f) +M src/login-common/client-common.c - fts: Fixed potential crash when indexing mails. +2016-10-20 15:54:40 +0200 Stephan Bosch (1210c14c3) - Normally it seems like compilers had built code that had added a NULL after - the array, but there was no guarantee for that. + lib-storage: Fixed a boolean expression. -M src/plugins/fts/fts-parser.c + Problem found with clang -Wstrict-bool. -2016-11-18 16:03:00 +0200 Timo Sirainen (13fd9a537) +M src/lib-storage/mail-storage.c - imap: Fix recent flags importing when un-hibernating +2016-10-20 15:46:01 +0200 Stephan Bosch (59cd09822) - The initial RECENT counter that was sent didn't include pre-hibernation - \Recent flags. + lib-program-client: Fixed boolean expressions. - \Recent flags were also added for mails that were already expunged, which - could have caused recent counter to be wrong later on, and possibly - assert-crash with: + Problems found with clang -Wstrict-bool. - Panic: file index-status.c: line 130 (index_storage_get_open_status): - assertion failed: (status_r->recent <= status_r->messages) +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-remote.c -M src/imap/imap-state.c +2016-10-20 15:41:54 +0200 Stephan Bosch (6aecc29b8) -2016-11-18 16:58:00 +0200 Timo Sirainen (b5138141c) + lib-program-client: Gave variables pointing to a program-client more logical + names. - lib-index: Improve errors - return reason in mail_transaction_log_refresh() + Was still based on when it was called the script-client. +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-remote.c -M src/lib-index/mail-transaction-log.c +2016-10-20 16:30:58 +0300 Timo Sirainen (395168997) -2016-11-18 16:52:31 +0200 Timo Sirainen (1b0b3b6ae) + auth: Fixed assert-crash on invalid auth-client input - lib-index: Improve errors - return reason in - mail_transaction_log_file_open() + For example if client sends invalid input like: auth: Error: BUG: + Authentication client sent unknown command: XYZ + Fixes crash: auth: Panic: key not found from hash -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.c +M src/auth/auth-request-handler.c -2016-11-18 16:41:18 +0200 Timo Sirainen (704657e1c) +2016-10-20 14:23:20 +0300 Timo Sirainen (80838a8bb) - lib-index: Add more information to "Missing middle file" error. + dovecot-config: Added dovecot_statedir -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/mail-transaction-log.c -M src/lib-index/test-mail-transaction-log-view.c +M Makefile.am +M dovecot-config.in.in +M m4/dovecot.m4 -2016-11-18 16:27:33 +0200 Timo Sirainen (7e290d277) +2016-10-20 13:30:36 +0300 Timo Sirainen (d78f1ac9d) - lib-index: mail_transaction_log_find_file() - remove wrong optimization. + Added "doveadm process status" - When opening the index, it's possible that: + This allows asking for processes' current status in master process. - process A: .log is opened with seq=1 process B: Rotates the .log and writes - a new dovecot.index with - log_file_seq=2 process A: dovecot.index is opened. - mail_transaction_log_view_set() now - wants to file log_file_seq=2 with mail_transaction_log_find_file(), but - because open_count==0, the .log isn't refreshed. +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm-master.c +M src/master/master-client.c -M src/lib-index/mail-transaction-log.c +2016-10-20 13:12:34 +0300 Timo Sirainen (eba7f36fe) -2016-11-18 16:15:59 +0200 Timo Sirainen (00ecebf86) + Added "doveadm service status" - lib-index: Compiler warning fix + This allows asking for services' current status in master process. +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm-master.c +M src/master/master-client.c -M src/lib-index/mail-index-map-read.c +2016-10-20 13:22:47 +0300 Timo Sirainen (27bb26725) -2016-11-18 15:46:39 +0200 Timo Sirainen (6db548abb) + doveadm-master: Code cleanup - simplify sending command args to master. - lib-index: If mmap() fails, include the attempted size in the error. + This also escapes the parameters to make sure nothing bad can be sent. +M src/doveadm/doveadm-master.c -M src/lib-index/mail-cache.c -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-transaction-log-file.c +2016-10-20 13:11:19 +0300 Timo Sirainen (de41dbb48) -2016-11-18 15:39:45 +0200 Timo Sirainen (23c7e63cd) + doveadm service stop: Convert to doveadm v2 API - lib-storage: Fix checking stub_seq failure in mailbox_save_set_uid() +M src/doveadm/doveadm-master.c -M src/lib-storage/mail-storage.c +2016-10-20 13:10:56 +0300 Timo Sirainen (7237f2f0a) -2016-11-18 15:17:08 +0200 Timo Sirainen (7fdf10860) + doveadm service stop: Code cleanup - Prepare for other service commands. - sdbox: Implement support for mail stubs +M src/doveadm/doveadm-master.c -M src/lib-storage/index/dbox-common/dbox-save.c -M src/lib-storage/index/dbox-single/sdbox-save.c +2016-10-20 13:09:09 +0300 Timo Sirainen (c7713320c) -2016-11-18 15:16:27 +0200 Timo Sirainen (66c5edee9) + doveadm service stop: Moved command handling to doveadm-master.c - lib-storage: Add support for storing "mail stubs" + It's talking to master process, and there will be other non-service commands + that talk to the master process in the same way. - These allow treating a storage backend as a cache where the mail bodies - don't necessarily exist. +M src/doveadm/Makefile.am +M src/doveadm/doveadm-master.c +D src/doveadm/doveadm-service.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-storage.h +2016-10-11 12:43:20 +0300 Timo Sirainen (f7bc2f708) -2016-10-20 15:54:40 +0200 Stephan Bosch (d80bf6c52) + doveadm user: If lookup fails, don't write it to the same line as header. - lib-storage: Fixed a boolean expression. - Problem found with clang -Wstrict-bool. +M src/doveadm/doveadm-auth.c -M src/lib-storage/mail-storage.c +2016-10-19 21:49:30 +0300 Timo Sirainen (5e327e031) -2016-10-17 09:13:21 -0400 Josef 'Jeff' Sipek (588a47cd8) + doveadm-server: Show incoming connection's IP and running command is process + title. - lib-storage: treat empty root_dir as an empty string +M src/doveadm/client-connection-http.c +M src/doveadm/client-connection-private.h +M src/doveadm/client-connection.c +M src/doveadm/client-connection.h +M src/doveadm/doveadm.h +M src/doveadm/main.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c +2016-10-18 00:37:32 +0300 Aki Tuomi (fe791e96f) -2016-11-18 14:10:02 +0200 Timo Sirainen (b44a93c1a) + auth: Pass local_name to auth-request - imapc: %zu isn't standard, use PRIuSIZE_T instead. + This allows using local_name in various places, such as passdb/userdb + queries. +M src/auth/auth-request-var-expand.c +M src/auth/auth-request-var-expand.h +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/lib-auth/auth-client-request.c +M src/lib-auth/auth-client.h +M src/login-common/client-common.h +M src/login-common/login-settings.c +M src/login-common/sasl-server.c +M src/login-common/ssl-proxy-openssl.c -M src/lib-storage/index/imapc/imapc-storage.c +2016-10-20 10:11:53 +0300 Timo Sirainen (c67082dca) -2016-10-12 14:32:51 -0400 Josef 'Jeff' Sipek (244b25c0e) + login proxy: Hanging outgoing SSL connections caused using already-freed + memory - imapc: don't mix positional and designated initialization + This mainly happened when login proxy closed the connection due to connect + timeout. The ssl-proxy still had a reference and existed for a longer time. + If SSL handshake still succeeded afterwards, it now called + login_proxy_ssl_handshaked(), which accessed the already-freed proxy and + likely crashed. + Fixed the ssl-client proxy code specifically. Alternatively ssl_proxy_free() + could be calling ssl_proxy_destroy() always, but since ssl-server side of + the code seems to have been working fine, I don't want to accidentally break + it. -M src/lib-storage/index/imapc/imapc-list.c +M src/login-common/login-proxy.c -2016-11-15 18:39:08 +0200 Timo Sirainen (a14d00061) +2016-10-20 10:59:23 +0300 Timo Sirainen (b60f51bfc) - lib: Add connection.allow_empty_args_input + lib-program-client: Linking fix. - This simplifies input_args() callbacks since they don't always have to check - for args[0] == NULL. This is enabled by default, because none of the current - users want it and it's somewhat unlikely there even will be those in future. -M src/lib/connection.c -M src/lib/connection.h +M src/lib-program-client/Makefile.am -2016-11-17 15:59:02 -0500 Josef 'Jeff' Sipek (1d0ef5c88) +2016-10-19 23:07:58 +0200 Stephan Bosch (3781fc206) - lib-storage: fix index_mail_get_headers return value + Fixed copyright notice. - And make it more obvious that we're not setting the actual return value in - index_mail_get_first_header. -M src/lib-storage/index/index-mail-headers.c +M src/lib/test-uri.c -2016-11-18 01:23:13 +0200 Timo Sirainen (2aa182ac9) +2016-10-19 21:03:39 +0300 Aki Tuomi (e6ba63471) - lib-index: Fix detecting whether caller synced everything in mailbox. + lib-program-client: Deduplicate flush statement - When mailbox_index_sync_begin() was followed by _commit(), without _next()s - in the middle actually syncing the mailbox, the tail_offset was updated to - indicate that the mailbox was fully synced. Existing code didn't rely on - this, so it probably didn't break anything. + It can be done below by splitting the else if into separate if statement. - This code hasn't worked for a long time, because log_view is always read - fully to the end in _sync_begin(). +M src/lib-program-client/program-client.c -M src/lib-index/mail-index-sync.c +2016-10-19 21:03:24 +0300 Aki Tuomi (76516caaa) -2016-11-15 00:42:27 +0100 Timo Sirainen (853f5e318) + lib-program-client: Correctly handle error code - lib-storage: Add mail_storage_service_user_get_pool() +M src/lib-program-client/program-client-remote.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h +2016-10-19 20:40:22 +0300 Aki Tuomi (42efa99e8) -2016-11-15 00:41:38 +0100 Timo Sirainen (f148562cb) + lib: Copy target_uid from restrict_access_settings - global: Replace some settings_parse_line() calls with - settings_parse_keyvalue() + One cannot assign to set->uid, causing compile error. +M src/lib/restrict-access.c -M src/config/config-parser.c -M src/doveadm/doveadm-dsync.c -M src/lib-storage/mail-storage-service.c +2016-10-19 19:02:22 +0300 Aki Tuomi (2558976f0) -2016-11-15 00:36:57 +0100 Timo Sirainen (47505a273) + lib-program-client: Try drop setuid root by default - lib-settings: Add settings_parse_keyvalue() + But not if root privileges are asked for. +M src/lib-program-client/program-client-local.c -M src/lib-settings/settings-parser.c -M src/lib-settings/settings-parser.h +2016-10-19 18:44:35 +0300 Aki Tuomi (ea42ee9eb) -2016-11-14 23:32:05 +0100 Timo Sirainen (758c71965) + lib: Add drop_setuid_root for restrict_access - lib-settings: Avoid duplicating settings' values when not needed + drop_setuid_root, when set to true, will detect and try to drop getuid()==0. + This is done by recovering current effective UID to set->uid if set->uid == + -1, and then doing seteuid(0). It will also drop out any other extra + privileges, such as extra groups not requested for. +M src/lib/restrict-access.c +M src/lib/restrict-access.h -M src/lib-settings/settings-parser.c -M src/lib-settings/settings-parser.h +2016-10-12 14:57:51 -0400 Josef 'Jeff' Sipek (ac2defed5) -2016-11-14 22:57:41 +0100 Timo Sirainen (fa42553e8) + lib-storage: clean up mailbox_list_create to improve readability - imapc: Use struct mail_namespace.user_set + There is no reason to use mailbox_list_driver_find() here instead of + mailbox_list_find_class() as (1) we do not need the index into the list + driver array, and (2) dealing with double-pointers is harder than regular + pointers. +M src/lib-storage/mailbox-list.c -M src/lib-storage/index/imapc/imapc-list.c +2016-10-19 19:41:51 +0300 Timo Sirainen (f948338e8) -2016-11-14 22:43:07 +0100 Timo Sirainen (f0343cb7a) + push-notification: Error handling fix and cleanups. - lib-storage: Add mail_namespace_get_driver_settings() and use it. - It obsoletes mail_storage_get_driver_settings(). +M src/plugins/push-notification/push-notification-driver-ox.c -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/maildir/maildir-storage.c -M src/lib-storage/index/mbox/mbox-storage.c -M src/lib-storage/index/pop3c/pop3c-storage.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h +2016-10-19 18:25:15 +0300 Timo Sirainen (bad0f9dae) -2016-10-17 09:18:27 -0400 Josef 'Jeff' Sipek (c0d3aa560) + dovecot-ldap.conf.ext: Updated sasl_bind comment. - imapc: use serialized settings as unique_root_dir - Without this, it is not possible to instantiate multiple imapc storages. Any - attempts to will result in multiple namespaces sharing the same storage, - regardless of if that was the intention. +M doc/example-config/dovecot-ldap.conf.ext -M src/lib-storage/index/imapc/imapc-settings.h -M src/lib-storage/index/imapc/imapc-storage.c +2016-10-19 16:31:01 +0300 Aki Tuomi (9b7b07d70) -2016-11-14 22:32:42 +0100 Timo Sirainen (f24266002) + lib-program-client: Fix memory access problem - lib-storage: Add struct mail_namespace.user_set +M src/lib-program-client/program-client.c -M src/lib-storage/index/shared/shared-storage.c -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-namespace.h +2016-10-19 16:06:22 +0300 Aki Tuomi (bdaa7eb95) -2016-11-14 18:34:02 +0100 Timo Sirainen (d97ad2e7b) + lib-program-client: Fix local tests - lib-storage: Use mail_namespace_alloc() for mail_namespaces_init_location() - Based on patch by Jeff Sipek +M src/lib-program-client/Makefile.am +M src/lib-program-client/test-program-client-local.c -M src/lib-storage/mail-namespace.c +2016-10-17 09:50:30 +0300 Aki Tuomi (1be27c35e) -2016-11-14 18:33:37 +0100 Timo Sirainen (d5fa1f29e) + lib-program-client: Whitespace fixes - lib-storage: Add mail_namespace_alloc() - This makes it easier to create new namespaces. Based on patch by Jeff Sipek +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-namespace.h +2016-10-17 14:19:40 +0300 Aki Tuomi (867b2e27d) -2016-11-10 13:19:05 +0200 Timo Sirainen (2479d44bb) + lib-program-client: Disable valgrind - lib-storage: Add asserts to make sure mailbox_header_lookup_ctx is used - correctly. + For local test, we can't use valgrind, it's too unreliable (breaks execution + sometimes). +M src/lib-program-client/Makefile.am -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mail.c +2016-10-17 14:13:28 +0300 Aki Tuomi (a371ea8bd) -2016-11-14 17:41:23 +0100 Timo Sirainen (c04a8e726) + lib-program-client: Add support for iostream-dot - lib-index: Added mail_index_transaction_get_highest_modseq() + This is also made mandatory for TCP client. +M src/lib-program-client/Makefile.am +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h +M src/lib-program-client/test-program-client-net.c -M src/lib-index/mail-index-transaction-export.c -M src/lib-index/mail-index-transaction-finish.c -M src/lib-index/mail-index-transaction-private.h -M src/lib-index/mail-index-transaction.c -M src/lib-index/mail-index.h -M src/lib-index/mail-transaction-log-file.c +2016-10-17 11:48:16 +0300 Aki Tuomi (541446ac8) -2016-11-14 17:37:31 +0100 Timo Sirainen (3ccf77afa) + lib-program-client: Make sure we delay output in test - lib-index: Added internal mail_index_transaction_finish_so_far() + This is to ensure that the client does not prematurely disconnect before + output is sent. - This can be called multiple times before mail_index_transaction_finish(). - It's going to perform all the work of reordering mails and dropping - unnecessary changes that can be done before changing sequences to UIDs. +M src/lib-program-client/test-program-client-unix.c - This will be needed for the following patch that implements - mail_index_transaction_get_highest_modseq(). +2016-10-17 09:46:22 +0300 Aki Tuomi (1c0dd964c) -M src/lib-index/mail-index-transaction-finish.c -M src/lib-index/mail-index-transaction-private.h -M src/lib-index/test-mail-index-transaction-finish.c + lib-program-client: Move version string to define -2016-11-14 17:22:53 +0100 Timo Sirainen (3d4a16d38) - lib-index: Assert if mail_index_transaction_sort_appends() sees any uid==0 +M src/lib-program-client/program-client-remote.c - Every mail must have an UID at this stage. +2016-10-13 15:32:49 +0300 Aki Tuomi (80521bcdd) -M src/lib-index/mail-index-transaction-sort-appends.c + lib-program-client: Add URI based constructor -2016-10-31 10:49:38 +0000 Paul Howarth (ed526ea61) - configure: Fix build with old OpenSSL without SSL_clear_options +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h - SSL_clear_options was introduced in OpenSSL 0.9.8m but may be backported to - older versions in "enterprise" OS releases, so a version check is - insufficient here. +2016-10-17 09:44:33 +0300 Aki Tuomi (3f67fea2e) - It was originally implemented as a macro but is a function in more recent - OpenSSL versions, so a test that works for both cases is needed. + lib-program-client: Add tests for TCP client -M configure.ac -M src/lib-ssl-iostream/iostream-openssl.c -2016-11-17 17:13:09 +0200 Timo Sirainen (f8d52f69c) +M src/lib-program-client/Makefile.am +A src/lib-program-client/test-program-client-net.c - lib-index: Make sure an already-corrupted index/log isn't written +2016-10-17 09:44:14 +0300 Aki Tuomi (366f66949) + lib-program-client: Add TCP client support -M src/lib-index/mail-index-write.c -M src/lib-index/mail-transaction-log-file.c -2016-11-17 02:48:20 +0200 Timo Sirainen (70f4b4fc6) +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.h - imapc: Fix assert-crash when deleting mailbox triggers - mailbox_get_open_status(). +2016-10-17 09:35:14 +0300 Aki Tuomi (204afc1f4) - For example vsize header updating triggers this. + lib-program-client: Add switch_ioloop vfunc - Fixes: Panic: file mail-storage.c: line 1683: unreached + This lets program-client backends do their own special io loop switching. -M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c -2016-11-16 21:40:37 +0200 Timo Sirainen (d0f04acfa) +2016-10-15 13:59:45 +0300 Aki Tuomi (17541ea25) - lib-storage: Fix compiler warnings about enum mismatches + lib-program-client: Use milliseconds in idle timeout -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h +M src/lib-program-client/test-program-client-local.c +M src/lib-program-client/test-program-client-unix.c -2016-11-16 03:11:30 +0200 Timo Sirainen (7962988b0) +2016-10-17 09:09:23 +0300 Aki Tuomi (4fbe0d109) - LAYOUT=index: Try to rename corrupted mailbox name during mailbox open. + lib-program-client: Use child-wait + This makes the client waiting asynchronous. -M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client.c -2016-11-16 03:10:10 +0200 Timo Sirainen (1e32b21d3) +2016-10-17 09:11:38 +0300 Aki Tuomi (097dbdf54) - lib-storage: Added struct mailbox.corrupted_mailbox_name + lib-program-client: Disconnect asynchronously - This allows backends that are adding lost mailboxes to mailbox list index to - indicate that they don't actually know the name of the mailbox, and the - mailbox list index should try to figure it out and rename the mailbox to its - proper name. -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/mail-storage-private.h +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c -2016-11-16 03:06:31 +0200 Timo Sirainen (0e6ec60d0) +2016-10-12 13:14:03 +0300 Aki Tuomi (1acc8d653) - LAYOUT=index: Don't write corrupted mailbox names to box-name header. + lib-program-client: Use restrict-access - This way when opening a mailbox the box-name header isn't overwritten by a - corrupted name. + This makes the program-client execution behave more consistent to the rest + of the core code. - Keep track of the corrupted names with - MAILBOX_LIST_INDEX_FLAG_CORRUPTED_NAME flag in list index records. The flag - isn't removed until the mailbox is renamed. +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client.h +M src/lib-program-client/test-program-client-local.c +M src/lib-program-client/test-program-client-unix.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h +2016-10-13 10:11:52 +0300 Aki Tuomi (7725d60ae) -2016-11-16 03:01:22 +0200 Timo Sirainen (c4057d78f) + lib: Add reference counting to child_wait_pid - lib-storage: Preserve box-name header when rebuilding index. +M src/lib/child-wait.c -M src/lib-storage/index/index-rebuild.c +2016-10-17 12:34:36 +0300 Timo Sirainen (08d8de8e2) -2016-11-16 01:44:58 +0200 Timo Sirainen (ad98f19c0) + lib-storage: Make sure mailbox_uidvalidity_next() doesn't return 0. - doveadm dump: Add support for the new box-name index header. + 0 isn't a valid IMAP UIDVALIDITY, and Dovecot treats 0 as "not assigned". +M src/lib-storage/mailbox-uidvalidity.c -M src/doveadm/doveadm-dump-index.c +2016-10-17 21:03:51 +0300 Martti Rannanjärvi (b594d84b9) -2016-11-16 01:43:34 +0200 Timo Sirainen (03917da0d) + lib-dcrypt: add a test for password change - LAYOUT=index: Update mailbox name to mailbox index's header when opening. + Test that you can encrypt a key with password, encrypt a key with the + password protected key, change the password, and still load a key that you + encrypted with the key encrypted using the first password. - This way if the mailbox list index gets lost, a recent mailbox name is still - available. +M src/lib-dcrypt/test-crypto.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/mail-storage-private.h +2016-10-18 14:57:31 +0300 Martti Rannanjärvi (e0aab219a) -2016-11-16 01:09:57 +0200 Timo Sirainen (d76ce1b2f) + doveadm: trim doveadm dump dcrypt-key input - lib-storage: Prevent renaming mailbox under itself. + dcrypt does not like extra newlines at the end of a key. - This resulted earlier in a loop, which broke the mailbox index. Note that - IMAP already prevented this, so it could only be triggered by other tools, - like doveadm. +M src/doveadm/doveadm-dump-dcrypt-key.c -M src/lib-storage/list/mailbox-list-index-backend.c +2016-10-18 10:45:05 +0300 Timo Sirainen (8add90010) -2016-11-16 01:04:18 +0200 Timo Sirainen (4e42afdaf) + lib-fs: Fixed fs_metadata_find() to actually work - lib-storage: Prevent parent loops in mailbox list index +M src/lib-fs/fs-api.c -M src/lib-storage/list/mailbox-list-index.c +2016-10-12 14:32:51 -0400 Josef 'Jeff' Sipek (1c62887aa) -2016-11-16 01:03:20 +0200 Timo Sirainen (dbe6c905e) + imapc: don't mix positional and designated initialization - lib-storage: Fix invalid parents in LAYOUT=index - Previously it just kept complaining without fixing the errors. +M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h +2016-10-17 09:18:27 -0400 Josef 'Jeff' Sipek (1f4d45911) -2016-11-16 01:01:58 +0200 Timo Sirainen (95be2fc4d) + imapc: use serialized settings as unique_root_dir - lib-storage: Improve mailbox list index corruption errors + Without this, it is not possible to instantiate multiple imapc storages. Any + attempts to will result in multiple namespaces sharing the same storage, + regardless of if that was the intention. +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/list/mailbox-list-index.c +2016-10-17 09:13:21 -0400 Josef 'Jeff' Sipek (7900eb30b) -2016-11-16 00:57:06 +0200 Timo Sirainen (5cbd16c3d) + lib-storage: treat empty root_dir as an empty string - lib-storage: If LAYOUT=index loses mailbox names, write the generated ones - to index. - Previously it just kept complaining and regenerating new names, without - actually fixing up the situation. +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h +2016-10-17 09:34:04 +0200 Steffen Templin (3722c793b) -2016-11-16 00:55:38 +0200 Timo Sirainen (d980af3f2) + push-notification: Resolve indentation problem - lib-storage: Fix handling LAYOUT=index losing mailbox names - It lost all the mailbox names. +M src/plugins/push-notification/push-notification-driver-ox.c -M src/lib-storage/list/mailbox-list-index.c +2016-10-06 07:35:17 +0000 Steffen Templin (282323a52) -2016-11-11 13:40:55 +0200 Aki Tuomi (2e896b5e3) + push-notification: Re-open mailbox and sync it to get unseen count. - config: Match local_name using dns-util - This way it correctly handles wildcards. +M src/plugins/push-notification/push-notification-driver-ox.c -M src/config/Makefile.am -M src/config/config-filter.c +2016-10-05 13:28:49 +0300 Steffen Templin (5e5591459) -2016-11-11 13:36:23 +0200 Aki Tuomi (41bee8122) + push-notification: Add unseen count to OX driver. - lib-dns: Add tests for dns-util +M src/plugins/push-notification/push-notification-driver-ox.c -M src/lib-dns/Makefile.am -A src/lib-dns/test-dns-util.c +2016-10-10 20:38:31 +0300 Timo Sirainen (13961419c) -2016-11-11 13:13:29 +0200 Aki Tuomi (04408131c) + global: Handle broken Content-Type headers consistently. - lib-dns: Add DNS specific matching algorithms + 1) Only the first Content-Type header is used. (Simpler than using the + last.) - RFC4343 and RFCRFC4592 compare and match algorithms + 2) Invalid Content-Types are parsed as far as we can. This is mainly to make + sure they aren't treated as missing Content-Types, which could cause them to + become text/plain. -M src/lib-dns/Makefile.am -A src/lib-dns/dns-util.c -A src/lib-dns/dns-util.h +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/message-decoder.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-search.c +M src/plugins/fts/fts-build-mail.c -2016-11-16 21:36:17 +0200 Timo Sirainen (bb2fcd3c8) +2016-10-10 20:24:41 +0300 Timo Sirainen (7f7f77125) - master: Fix compiling with systemd after /dev/null changes + lib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for + now. + Maybe we can enable it some day far into the future, but for now this just + causes unnecessary cache file rebuilds. -M src/master/service-listen.c +M src/lib-imap/imap-bodystructure.c -2016-11-16 17:36:03 +0200 Timo Sirainen (82a170461) +2016-10-10 20:23:47 +0300 Timo Sirainen (85c1b6c22) - configure: Removed AC_CONFIG_MACRO_DIR([m4]) for now + lib-imap: Don't write a broken Content-Type as text/plain to BODYSTRUCTURE - Fixes: libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with - ACLOCAL_AMFLAGS=-I .. + Mainly because it doesn't match with MESSAGE_PART_FLAG_TEXT in message_part. -M configure.ac +M src/lib-imap/imap-bodystructure.c -2016-11-16 12:47:59 +0200 Aki Tuomi (9c7ff1ce4) +2016-10-15 23:04:35 +0300 Aki Tuomi (c19c44f87) - imap: Use correct format specifier for highestmodseq + config: Compare local_name case insensitive + DNS and certificate names should be compared case insensitive. -M src/imap/imap-state.c +M src/config/config-filter.c -2016-11-16 13:45:28 +0200 Timo Sirainen (1e781083f) +2016-10-17 23:25:27 +0300 Aki Tuomi (46b0db4a0) - Makefile: Add -I . to ACLOCAL_AMFLAGS + lib: Add null_strcasecmp - Without this when aclocal is automatically run it doesn't generate a working - configure. -M Makefile.am +M src/lib/strfuncs.c +M src/lib/strfuncs.h -2016-11-16 13:29:49 +0200 Timo Sirainen (c4c48f888) +2016-10-17 19:38:07 +0300 Aki Tuomi (1db4d7625) - lib-index: Fix flushing NFS if minimum wanted transaction log file is lost + auth-policy: Use request's pool instead of new pool + This fixes existing memory leak in auth_report, which is caused by using + separate memory pool instead of request's pool. -M src/lib-index/mail-transaction-log-view.c + Thank you for Andrea Carpani for extensive debugging. -2016-11-15 18:55:36 +0200 Aki Tuomi (3336e99e0) +M src/auth/auth-policy.c - imap: Add details why unhibernation failed +2016-10-16 22:58:07 +0300 Timo Sirainen (4de624802) - This can help understanding why client failed to unhibernate. + dict-sql: Use LIMIT in SQL queries with dict_iterate_set_limit() -M src/imap/imap-state.c -2016-11-16 11:41:42 +0200 Timo Sirainen (d01fa63f2) +M src/lib-dict/dict-sql.c - global: Use fd_close_maybe_stdio() +2016-10-16 22:55:26 +0300 Timo Sirainen (c27757ca7) + dict-sql: Error handling fix & code cleanup -M src/imap-urlauth/imap-urlauth-client.c -M src/imap-urlauth/imap-urlauth-worker.c -M src/imap/imap-client.c -M src/lib/connection.c -M src/lmtp/client.c -M src/pop3/pop3-client.c + Only the first sql_dict_iterate_next_query() error was handled correctly. -2016-11-16 11:40:35 +0200 Timo Sirainen (58bd9504a) +M src/lib-dict/dict-sql.c - lib: Add fd_close_maybe_stdio() +2016-10-16 22:40:18 +0300 Timo Sirainen (6acd1a48e) - The idea is that this should be used whenever closing fds that may be 0 or - 1. If they are closed normally, the following code may end up using 0/1 fd - for other purposes, which could cause problems. + lib-dict: Added dict_iterate_set_limit() -M src/lib/lib.c -M src/lib/lib.h -2016-11-16 11:37:34 +0200 Timo Sirainen (2481c3013) +M src/lib-dict/dict-private.h +M src/lib-dict/dict.c +M src/lib-dict/dict.h - global: use dev_null_fd instead of opening /dev/null +2016-10-17 19:21:34 +0300 Aki Tuomi (4f051c308) + lib-dict: Duplicate result value in mempool -M src/lib-program-client/program-client-local.c -M src/lib/module-dir.c -M src/master/common.h -M src/master/main.c -M src/master/service-process.c + Duplicate the result value already in callback to avoid it getting lost + during async calls. -2016-11-16 11:35:42 +0200 Timo Sirainen (f3fc24f54) + Reported & tested by Pierre Jaury. - master: Don't unlink login sockets at startup if someone is listening to - them. +M src/lib-dict/dict-client.c - The original check there never worked, because null_fd was always set. +2016-10-17 23:06:48 +0300 Timo Sirainen (9b5fa7fdd) - Normally the master.pid file would prevent this happening, but if it didn't - exist, the sockets would be unlinked and usually also created back. + lib-mail: Fixed infinite loop in istream-attachment-extractor -M src/master/common.h -M src/master/main.c -M src/master/master-settings.c + Broken by 7f74811b7. Pretty much any larger attachment going through this + istream had a good potential of going into an infinite loop. -2016-11-16 11:17:27 +0200 Timo Sirainen (2b3d98d3f) +M src/lib-mail/istream-attachment-extractor.c - lib-master: Revert redundant stdin/stdout/stderr fd checks +2016-10-17 10:59:34 +0300 Timo Sirainen (ece461287) - This is now done by lib_init() in a bit nicer way. + lib-fs: Added FS_METADATA_WRITE_FNAME to allow renaming a file being + written. - Reverts 08923d2c956ece3dc604d5842ba152c2bdb11fb9 -M src/lib-master/master-service.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-posix.c -2016-11-16 11:09:01 +0200 Timo Sirainen (c5f651e40) +2016-10-11 01:04:39 +0300 Timo Sirainen (5b302b077) - lib: Make sure stdin/stdout/stderr have fd at startup and keep /dev/null - always open + lib-fs: Added internal fs_metadata_find() helper function - This guarantees we will always have a fd that can be used as /dev/null. It - works even inside chroots. -M src/lib/lib.c -M src/lib/lib.h +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c -2016-11-15 23:56:19 +0200 Timo Sirainen (17c99261a) +2016-10-11 00:46:59 +0300 Timo Sirainen (4c649f033) - Fix -Wstrict-bool compiler warnings. + lib-fs: Optimize changing FS_METADATA_INTERNAL_PREFIX metadata. + file->metadata_changed doesn't need to change in that situation. It's used + by fs-metawrap to find out if it needs to rewrite metadata during a write, + but internal metadata isn't written to its header. -M src/lib-index/mail-index-sync-update.c -M src/lib/sha3.c +M src/lib-fs/fs-api.c -2016-11-03 15:30:58 +0200 Aki Tuomi (f373f2e7b) +2016-10-17 12:41:33 +0300 Timo Sirainen (5b45af6a8) - doveadm-save: Check stream errno before save + sdbox: Removed duplicated code. - This is to ensure the file has been really opened. -M src/doveadm/doveadm-mail-save.c +M src/lib-storage/index/dbox-single/sdbox-storage.c -2016-11-13 20:04:27 +0200 Apollon Oikonomopoulos (c164f8afe) +2016-10-17 10:36:17 +0300 Martti Rannanjärvi (e13d38a11) - Manually cleanup OpenSSL from dovecot_openssl_common_global_unref() + lib-dcrypt: change unit test ec curve to secp521r1 - OpenSSL 1.1 features a cleanup function that is automatically run on - shutdown using atexit(3). This function frees all OpenSSL-allocated - resources. + This curve is more common, so unit tests will pass on more machines. - In dovecot, OpenSSL is loaded indirectly using dlopen(3) against the - relevant dovecot crypto module and is finally unloaded using dlclose(3). - Until OpenSSL 1.0.1c this worked fine, however OpenSSL 1.0.1c makes sure[1] - that the library stays loaded after the initial dlclose() so that the - atexit(3) handlers can run on shutdown. This, together with the fact that - dovecot uses custom allocation functions for OpenSSL and has already - partially free()'d some of OpenSSL's resources in module_free(), leads to a - segfault at process shutdown[2]. +M src/lib-dcrypt/test-crypto.c - We fix this by explicitly calling OPENSSL_cleanup() during module unload. - This is safe to do, as long as we will never want to subsequently - re-initialize OpenSSL. +2016-10-17 09:13:39 +0300 Timo Sirainen (46e5bbded) - [1] - https://github.com/openssl/openssl/commit/4af9f7fe79ff82b90c16969b7e5871435056377b - [2] - https://buildd.debian.org/status/fetch.php?pkg=dovecot&arch=amd64&ver=1:2.2.26.0-2&stamp=1478873022 + lib-fs: Lazily initialize timings to save memory. - Signed-off-by: Apollon Oikonomopoulos -M src/lib-ssl-iostream/dovecot-openssl-common.c +M src/lib-fs/fs-api.c -2016-11-15 12:55:44 +0100 Apollon Oikonomopoulos (b775f8b43) +2016-10-14 17:13:23 +0300 Aki Tuomi (db5fdf605) - ssl: fix reference to SSLv2 and disable SSLv3 + lib-storage: Use MAILDIR_INFO_SEP_S - This is driven by the fact that OpenSSL 1.1 does not know about SSLv2 at all - and dovecot's defaults simply make OpenSSL error out with "Unknown protocol - 'SSLv2'"[1]. So we change the defaults to refer to SSLv2 iff OpenSSL seems - to know something about it. + Replace hardcoded : with MAILDIR_INFO_SEP_S - While at it, it's also a good idea to disable SSLv3 by default as well. +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-uidlist.c - [1] https://bugs.debian.org/844347 +2016-10-14 15:28:32 +0300 Aki Tuomi (58ba06268) - Signed-off-by: Apollon Oikonomopoulos + lib-dcrypt: Fix uninitialized memory -M doc/example-config/conf.d/10-ssl.conf -M src/lib-master/master-service-ssl-settings.c -2016-11-15 11:42:47 +0100 Timo Sirainen (ba72c69be) +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/test-crypto.c - lib-http: Use io_wait_timer for tracking wait times. +2016-10-14 13:48:41 +0300 Martti Rannanjärvi (9a025a746) - The previous code was completely incorrect, since it wasn't even tracking - the HTTP request's start usecs. + lib-dcrypt: str_new to t_str_new in some test-crypto tests -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-request.c + str_new from default_pool was not properly freed. -2016-11-15 11:41:53 +0100 Timo Sirainen (9b69686b4) +M src/lib-dcrypt/test-crypto.c - dict-client: Use io_wait_timer for tracking wait times. +2016-10-13 23:38:36 +0300 Martti Rannanjärvi (c42c9ff35) - This way the "dict wait" time includes all ioloop waits that wait on the - dict-client, not just in dict_wait(). + lib-dcrypt: enc_key and pw must be NULL on storing unencrypted private key -M src/lib-dict/dict-client.c + Add tests for password and key encryption, and get_info on them. Also give + examples of valid cipher values for password and key encryption in dcrypt.h + comment. -2016-11-15 11:21:56 +0100 Timo Sirainen (4c8b67114) +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt.h +M src/lib-dcrypt/test-crypto.c - lib: Added io_wait_timer +2016-10-12 21:29:51 +0300 Martti Rannanjärvi (5d744144f) - This allows easier tracking of how much time the io_wait_timer has been - spending on (multiple) ioloops. + lib-dcrypt: fix comment of dovecot format v2 to use colon -M src/lib/ioloop-private.h -M src/lib/ioloop.c -M src/lib/ioloop.h + Version 2 field separator was changed to colon. -2016-11-15 11:20:41 +0100 Timo Sirainen (47c7576a0) +M src/lib-dcrypt/dcrypt.h - lib: Code cleanup - move code to ioloop_add_wait_time() +2016-10-12 09:54:04 +0300 Aki Tuomi (335ac4abc) + INSTALL: Use markdown style -M src/lib/ioloop.c -2016-11-15 11:11:37 +0100 Timo Sirainen (52c43248f) +D INSTALL +A INSTALL.md +M Makefile.am - lib: Fix ioloop wait times when io_loop_time_refresh() is used +2016-10-12 09:08:51 +0300 Aki Tuomi (73650a887) + README: Use markdown style -M src/lib/ioloop-private.h -M src/lib/ioloop.c -2016-11-15 20:10:43 +0200 Aki Tuomi (ac2373f23) +D README +A README.md - doveadm: Put doveadm_mail_iter_init parameters to right order +2016-10-12 09:38:05 +0300 Aki Tuomi (16d9e9dd8) + git: Ignore README and INSTALL -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-mail-flags.c -2016-11-15 13:40:54 +0200 Aki Tuomi (43735d5b4) +M .gitignore - lib-storage: Add vsize hdr on empty mailbox +2016-10-12 09:36:46 +0300 Aki Tuomi (48e4a5c73) + configure: Detect pandoc for building documentation -M src/lib-storage/index/index-mailbox-size.c -2016-11-15 13:17:05 +0200 Aki Tuomi (11eaa0583) +M Makefile.am +M configure.ac - doveadm-director: Include tag in add line +2016-10-12 10:30:16 +0300 Aki Tuomi (8177c1444) + lib-program-client: Do not use /tmp in testing -M src/doveadm/doveadm-director.c -2016-11-15 09:33:15 +0200 Aki Tuomi (41e2afac1) +M src/lib-program-client/test-program-client-unix.c - doveadm-import: Open source boxes read-only +2016-10-12 12:04:10 +0300 Aki Tuomi (3bfdab778) - This allows importing emails from read-only locations, such as backups. + auth: Pass userdb fields to worker -M src/doveadm/doveadm-mail-import.c + If this is not done, then those userdb handlers that need access to userdb + variables for e.g. interpolation, cannot access them. -2016-11-15 09:32:31 +0200 Aki Tuomi (81c22db21) +M src/auth/auth-request.c +M src/auth/auth-worker-client.c - doveadm: Add open read-only parameter to mailbox iterator +2016-10-11 13:18:53 +0300 Timo Sirainen (63b557b1c) - This allows iterating mailboxes so that they are opened for read-only. + auth: Don't re-insert userdb results from auth cache data back to cache. -M src/doveadm/doveadm-mail-altmove.c -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-deduplicate.c -M src/doveadm/doveadm-mail-expunge.c -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-mail-flags.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail-iter.c -M src/doveadm/doveadm-mail-iter.h -M src/doveadm/doveadm-mail-search.c + This was also breaking TTLs for the cached userdb results, because each + re-insert reset the TTL. -2016-11-06 02:50:52 +0200 Aki Tuomi (03cb9435d) +M src/auth/auth-request.c +M src/auth/auth-request.h - stats: Add support for carbon-server +2016-10-10 21:22:15 +0300 Timo Sirainen (56774de9c) - Allows admin to specify stats_carbon_server=ip:port. Stats are delivered in - "key value" format to specified port. Can be received with e.g. metronome. + lib-program-client: Fixed potential panic in test-program-client-local -M src/stats/Makefile.am -M src/stats/mail-stats.c -M src/stats/mail-stats.h -A src/stats/stats-carbon.c -A src/stats/stats-carbon.h -M src/stats/stats-settings.c -M src/stats/stats-settings.h + If the run finished before io_loop_run(), it would panic with: Panic: BUG: + No IOs or timeouts set. Not waiting for infinity. -2016-11-09 15:17:01 +0200 Aki Tuomi (fd7219afa) +M src/lib-program-client/test-program-client-local.c - lib: Add net_ipport2str +2016-10-10 21:19:34 +0300 Timo Sirainen (004be038d) - Converts struct ip_addr + port into either 127.0.0.1:6000 or [::1]:6000. + lib-program-client: Fixed program_client_run() that succeeds rapidly. -M src/lib/net.c -M src/lib/net.h + program_client_run_async() could have called the callback with result=0 + before io_loop_run(). This happened with local client. -2016-11-14 10:52:22 +0200 Aki Tuomi (a2ad0219f) + Fixes in test-program-client-local: Panic: BUG: No IOs or timeouts set. Not + waiting for infinity. - doveadm: Fix error reporting for doveadm-dump-dcrypt +M src/lib-program-client/program-client.c +2016-10-10 23:53:55 +0300 Timo Sirainen (96e1ed172) -M src/doveadm/doveadm-dump-dcrypt-file.c -M src/doveadm/doveadm-dump-dcrypt-key.c + fs-metawrap: Don't assert-crash when trying to write an empty file. -2016-11-14 14:54:37 +0100 Timo Sirainen (2135342de) + Fixes: Panic: file fs-metawrap.c: line 401 + (fs_metawrap_write_stream_finish): assertion failed: + (file->super_output->offset > 0 || file->super_output->stream_errno != 0) - lib: Assert-crash in i_close_fd() if fd == 0 +M src/lib-fs/fs-metawrap.c +M src/lib-fs/test-fs-metawrap.c - lib-master now guarantees that fd==0 doesn't normally happen. +2016-10-11 00:31:17 +0300 Timo Sirainen (d1a82a255) -M src/lib/macros.h + lib-fs: Renamed internal i_stream_mail_read() to i_stream_fs_stats_read() -2016-11-14 14:51:45 +0100 Timo Sirainen (fd717f41d) + Just to make backtraces look clearer. Originally forgot to change this after + copy&pasting code from istream-mail.c - master: Remove redundant check to guarantee stdin/stdout/stderr fd - existence. +M src/lib-fs/istream-fs-stats.c - The previous method also wasn't correct, since it was setting close-on-exec - flag for the fds. Although this didn't normally make any difference, since - stdin & stdout was explicitly dup2()ed to /dev/null and for all except the - log process stderr was also being dup2()ed. +2016-10-10 20:58:53 +0300 Timo Sirainen (a694d17a2) -M src/master/main.c + lib-program-client: Fixed running test-program-client-local as root. -2016-11-14 14:48:20 +0100 Timo Sirainen (7071e5738) + uid/gid == -1 isn't treated as "don't change" in here. - lib-master: Make sure stdin/stdout/stderr fds are open. +M src/lib-program-client/test-program-client-local.c - We'll just open /dev/null for them if they don't already exist. +2016-10-10 20:35:17 +0300 Timo Sirainen (144e0b545) -M src/lib-master/master-service.c + auth: Compiler warning fix -2016-11-14 16:45:24 +0200 Aki Tuomi (15150ac3d) - lib: Mark istream with eof=TRUE on all errors +M src/auth/db-ldap.c - Previously only i_stream_read() did this, but i_stream_seek(), _stat(), - _get_size() and _create() didn't. This caused assert-crashes on error - conditions in code which assumed that when stream_errno != 0, eof==TRUE. +2016-09-21 10:55:47 +0300 Matwey V. Kornilov (adb497977) -M src/lib/istream.c + auth: Fix default SASL bind for LDAP -2016-11-09 15:40:48 +0200 Aki Tuomi (fa542e313) + User may configure Dovecot to use SASL bind as default bind method. This + can be the case when ldapi:/// (or ldaps:///) with SASL EXTERNAL is used. + Currently, Dovecot returns LDAP connection to wrong bind state after first + successful auth bind, LDAP simple bind always used to rebind. This may + broke setup when ACL in LDAP configured not to allow search/bind for such + simple bind. - lib-program-client: Do not call callback when destroying +M src/auth/db-ldap.c +2016-09-21 10:50:02 +0300 Matwey V. Kornilov (372b7c40b) -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client.c + auth: Introduce db_ldap_bind_sasl() function -2016-11-14 13:22:06 +0100 Timo Sirainen (9eba01ece) + Do refactoring in db_ldap_connect() before fixing the SASL bind issue in the + next commit. - dict-client: When dict-server times out, log ioloop/lock waits. +M src/auth/db-ldap.c +2016-10-06 15:22:13 +0300 Timo Sirainen (bfef68915) -M src/lib-dict/dict-client.c + doveadm director kick: Added -f parameter. -2016-11-14 13:18:13 +0100 Timo Sirainen (80a903b6e) + This works for all the user_* passdb fields. - dict-client: Code cleanup to timeout handling. +M src/director/director-connection.c +M src/director/director.c +M src/director/director.h +M src/doveadm/doveadm-director.c - No functional changes. +2016-10-06 15:19:51 +0300 Timo Sirainen (26f4264ec) -M src/lib-dict/dict-client.c + doveadm director kick: Escape username properly. -2016-11-14 13:14:25 +0100 Timo Sirainen (26bab6960) + This only mattered if the username contained \001, TAB or LF characters, + which isn't normal. - dict-client: Dict server timeout may have occurred too early. +M src/doveadm/doveadm-director.c +2016-10-06 15:13:30 +0300 Timo Sirainen (4a4fdb147) -M src/lib-dict/dict-client.c + director: Escape username when handling USER-KICK. -2016-11-11 17:00:39 +0200 Timo Sirainen (22a30b5df) + This could have caused problems if username parameter contained TABs or LFs, + which of course shouldn't normally happen. - lib-index: Improve error messages when transaction log is unexpectedly lost +M src/director/director.c +2016-10-06 14:54:51 +0300 Timo Sirainen (9fc996569) -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync-private.h -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index.c -M src/lib-index/mail-transaction-log-view.c + doveadm proxy kick: Support multiple user parameters. -2016-11-10 23:00:59 +0200 Timo Sirainen (2b41fba0f) - dict-client: Forward dict_iterate_set_limit() to dict server +M src/doveadm/doveadm-proxy.c +2016-10-06 14:53:11 +0300 Timo Sirainen (75af6e5ca) -M src/dict/dict-commands.c -M src/lib-dict/dict-client.c + doveadm proxy kick: Added -f parameter. -2016-11-10 23:23:39 +0200 Timo Sirainen (db29579ea) + This works for all the user_* passdb fields. - dict-client: Code cleanup - remember all iteration flags +M src/doveadm/doveadm-proxy.c +M src/login-common/login-proxy.c +2016-10-06 14:38:04 +0300 Timo Sirainen (adad68df4) -M src/lib-dict/dict-client.c + doveadm proxy list: Show all user_* fields in output. -2016-11-10 22:57:22 +0200 Timo Sirainen (0640d222b) - lib-dict: Fix infinite loop when row limit is reached. +M src/doveadm/doveadm-proxy.c +M src/login-common/login-proxy.c - If dict_iterate_has_more() keeps returning TRUE, the caller keeps calling - dict_iterate(). +2016-10-05 23:22:56 +0300 Timo Sirainen (ce1a6c9b8) -M src/lib-dict/dict.c + *-login: Store user_* passdb fields to client->alt_usernames. -2016-11-10 18:24:46 +0200 Timo Sirainen (739c4c06c) - sdbox: Fix crash on mailbox_sync*() when mailbox auto-open fails. +M src/login-common/client-common-auth.c +M src/login-common/client-common.h +M src/login-common/login-common.h +M src/login-common/main.c +2016-10-10 17:37:27 +0300 Timo Sirainen (0c5ed44cf) -M src/lib-storage/index/dbox-single/sdbox-sync.c + last-login: Don't execute last_login on IMAP unhibernation. -2016-11-11 13:06:41 +0200 Timo Sirainen (da8e733d7) - director: Don't access freed memory during deinit +M src/plugins/last-login/last-login-plugin.c +2016-10-10 17:19:32 +0300 Timo Sirainen (556390522) -M src/director/mail-host.c + quota: Don't execute quota_over_script if userdb lookup was over 10 secs ago -2016-11-09 15:17:01 +0200 Timo Sirainen (b1818b930) - director: Fix crash when receiving USER-MOVE for nonexistent user. +M src/plugins/quota/quota.c +2016-10-10 17:19:16 +0300 Timo Sirainen (1e2b3bd82) -M src/director/director.c + imap-hibernate: Preserve mail_user.session_create_time through hibernation -2016-11-08 20:41:15 +0200 Aki Tuomi (7dc4e79d8) - imap: Free box on error +M src/imap-hibernate/imap-client.c +M src/imap-hibernate/imap-client.h +M src/imap-hibernate/imap-hibernate-client.c +M src/imap/imap-client-hibernate.c +M src/imap/imap-master-client.c - Otherwise the box wil leak as it is not assigned anywhere and can cause - crash on imap exit due to stats plugin timeout leak. +2016-10-10 17:19:06 +0300 Timo Sirainen (a020eb653) -M src/imap/imap-state.c + lib-storage: Added mail_user.session_create_time and .session_restored -2016-10-20 19:06:22 +0300 Aki Tuomi (ea6c665dd) - director: Keep per-tag directory +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h +2016-10-06 14:54:24 +0300 Aki Tuomi (f24edebe3) -M src/director/director-connection.c -M src/director/director-request.c -M src/director/director.c -M src/director/director.h -M src/director/doveadm-connection.c -M src/director/mail-host.c -M src/director/mail-host.h -M src/director/main.c -M src/director/notify-connection.c + imap-hibernate: Properly fix hibernation -2016-11-01 14:36:19 +0200 Aki Tuomi (789e6eb9c) + The previous fix did not properly fix hibernation as the clients still + dropped out of hibernate. Also the tag used was no longer following. This + change will track tag changes and keeps the hibernation process going on + until the user enters something else than DONE\r\ntag IDLE\r\n in same + packet. - director: Code cleanup - typedef user_free_hook +M src/imap-hibernate/imap-client.c +M src/imap-hibernate/imap-client.h +M src/imap-hibernate/imap-hibernate-client.c +M src/imap/imap-client-hibernate.c +M src/imap/imap-master-client.c +M src/imap/imap-state.c +M src/imap/imap-state.h - This is done because user_free_hook needs to be also used in mail_host. If - it changes, this reduces the places that need touching. +2016-10-10 14:42:24 +0300 Timo Sirainen (4755f8d37) -M src/director/user-directory.c -M src/director/user-directory.h + lib-program-client: Compiler warning fixes -2016-11-01 14:40:49 +0200 Aki Tuomi (099649348) - director: Code cleanup - Reorder includes +M src/lib-program-client/test-program-client-unix.c - This is required to enable typedef of user_free_hook +2016-10-10 13:40:41 +0300 Timo Sirainen (e564ff058) -M src/director/director-connection.c -M src/director/director-request.c -M src/director/mail-host.h -M src/director/notify-connection.c -M src/director/test-user-directory.c -M src/director/user-directory.c + cassandra: Added latency_aware_routing connect-parameter. -2016-10-20 20:31:33 +0300 Timo Sirainen (e9a9d396a) + There's currently no way to change the default settings for it. - director: Code cleanup - moved username_hash generation to director.h +M src/lib-sql/driver-cassandra.c - It's not really user_directory specific. This is especially important in the - following patches that add per-tag user_directories. It's also not always - known which tag the username_hash refers to, so there can't be different - tag-specific username_hash generators. +2016-10-10 13:59:57 +0300 Timo Sirainen (bc37bab86) -M src/director/director-request.c -M src/director/director.c -M src/director/director.h -M src/director/doveadm-connection.c -M src/director/notify-connection.c -M src/director/test-user-directory.c -M src/director/user-directory.c -M src/director/user-directory.h + lmtp: Handle lmtp_user_concurrency_limit before lmtp_rcpt_check_quota -2016-10-20 19:38:28 +0300 Timo Sirainen (dccfab90f) + The quota lookup is more expensive, so it shouldn't be done unnecessarily. - director: Code cleanup - added user director_iterate_users_*() wrappers. +M src/lmtp/commands.c - This will shrink the diff for the following changes. +2016-10-07 19:49:24 +0300 Aki Tuomi (0a017e924) -M src/director/director-connection.c -M src/director/director.c -M src/director/director.h -M src/director/doveadm-connection.c + lib-program-client: Add test suite for program client -2016-10-20 19:17:11 +0300 Timo Sirainen (a433b8b1f) - director: Code cleanup - use temporary users variables +M src/lib-program-client/Makefile.am +A src/lib-program-client/test-program-client-local.c +A src/lib-program-client/test-program-client-unix.c - This will shrink the diff for the following changes. +2016-10-09 20:19:22 +0300 Aki Tuomi (9f29dfcbf) -M src/director/director-connection.c -M src/director/director-request.c -M src/director/director.c -M src/director/doveadm-connection.c + lib-program-client: Rename remote to unix -2016-10-20 16:14:36 +0300 Timo Sirainen (7bf427ca4) + This is to make more clear that the call requires unix path and does not + support TCP. There will be TCP based API too later. - director: Code cleanup - moved code to notify_update_user() +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.h +2016-10-07 19:48:59 +0300 Aki Tuomi (98bc2ecdb) -M src/director/notify-connection.c + lib-program-client: Expose asynchronous API -2016-10-20 15:13:04 +0300 Aki Tuomi (6588dc312) - director: const mail_host in mail_host_get_tag +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client-remote.c +M src/lib-program-client/program-client.c +M src/lib-program-client/program-client.h +2016-10-06 11:57:27 +0300 Aki Tuomi (03c6532fe) -M src/director/mail-host.c -M src/director/mail-host.h + lib-program-client: Whitespace fix -2016-11-05 19:06:33 +0200 Aki Tuomi (6a7943d59) - lib: Add test vectors for message digests +M src/lib-program-client/program-client-local.c +M src/lib-program-client/program-client-private.h +M src/lib-program-client/program-client.c +2016-10-10 10:37:24 +0300 Aki Tuomi (151fc06a4) -M src/lib/test-hash-method.c + doveadm-sync: Document end-date flag -2016-11-05 11:48:27 +0200 Aki Tuomi (fb21560db) - lib: Add SHA3 hashing methods for 256 and 512 bits +M doc/man/doveadm-sync.1.in +2016-10-10 10:36:52 +0300 Aki Tuomi (ee8294dbc) -M src/lib/Makefile.am -M src/lib/hash-method.c -A src/lib/sha3.c -A src/lib/sha3.h + doveadm-sync: Add end-date support -2016-11-05 11:47:40 +0200 Aki Tuomi (d29f070a5) - lib: Move sha context and result size to new header +M src/doveadm/doveadm-dsync.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-brain.h +M src/doveadm/dsync/dsync-ibc-pipe.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-ibc.h +M src/doveadm/dsync/dsync-mail.h +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-import.h - This is to prepare for SHA3 inclusion +2016-10-10 10:13:12 +0300 Aki Tuomi (a11612ec2) -M src/lib/Makefile.am -A src/lib/sha-common.h -M src/lib/sha2.h + doveadm-sync: Document start date -2016-11-04 12:18:47 +0200 Timo Sirainen (b388982a5) - lib-storage: Updated MAIL_SEARCH_ARG_FLAG_USE_TZ comment. +M doc/man/doveadm-sync.1.in +M src/doveadm/doveadm-dsync.c +2016-10-09 23:34:18 +0300 Timo Sirainen (e6ddcc51a) -M src/lib-storage/mail-search.h + lib-compression: Fixed compler warnings and wrongly triggering asserts. -2016-11-04 12:04:11 +0200 Timo Sirainen (f33ead8f6) + Broken by 7f74811b7. - lib-storage: Fix doveadm search query parsing to use timezones correctly. +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c - When using a date string, e.g. "senton 25-Mar-2007" it should work the same - way as IMAP does and show all mails whose sent date is on 25th, ignoring - whatever the timezone is in the Date header (or in case of - received/saved-date it would be using the timestamps in server's local - timezone, again just like IMAP). +2016-10-06 13:50:59 +0300 Timo Sirainen (7f74811b7) - When search with an exact UNIX timestamp or a time interval (e.g. - "3 days"), it should be using UTC times for doing all comparisons. + global: Make sure i_stream_read() calls handle 0 and -2 return values + correctly. -M src/doveadm/doveadm-dsync.c -M src/lib-storage/mail-search-register-human.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-storage.h -2016-11-04 12:03:47 +0200 Timo Sirainen (25609df51) +M src/doveadm/client-connection-http.c +M src/doveadm/doveadm-mail-save.c +M src/doveadm/doveadm-mail.c +M src/doveadm/dsync/dsync-mail.c +M src/imap/cmd-append.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-dict-extra/dict-fs.c +M src/lib-http/http-client-connection.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-storage/index/index-attachment.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/mail-copy.c +M src/lib/istream-seekable.c - lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling again. +2016-10-06 13:39:21 +0300 Timo Sirainen (0f27d0c93) - It wasn't really wrong, it was just confusing. And doveadm's tz-handling was - wrong. + log: Minor error logging and comment improvement. - Reverses 059e4ac419224598349704b74cb9f6b49278df46 -M src/lib-storage/index/index-search.c +M src/log/log-connection.c -2016-11-03 19:16:49 +0200 Timo Sirainen (48a6ada2f) +2016-10-06 13:09:46 +0300 Timo Sirainen (c23ebb9b0) - lib: Define ARRAY_TYPE for uint8_t, uint16_t and uint64_t. + imapc: Added imapc_max_line_length to limit maximum memory usage. + The default is still unlimited, but this should be set to something smaller + for untrusted servers. -M src/lib/array-decl.h +M src/lib-imap-client/imapc-client.c +M src/lib-imap-client/imapc-client.h +M src/lib-imap-client/imapc-connection.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c -2016-11-01 21:50:29 +0200 Aki Tuomi (e086fc365) +2016-10-06 12:10:28 +0300 Timo Sirainen (7f51e8608) - auth: Use buffer_truncate_rshift_bits + lib-index: Added test-mail-index-modseq unit test -M src/auth/auth-policy.c +M src/lib-index/Makefile.am +A src/lib-index/test-mail-index-modseq.c -2016-10-27 16:20:20 +0300 Aki Tuomi (cd5d16a11) +2016-10-05 23:59:56 +0300 Timo Sirainen (b10623691) - lib: Add tests for hashed var-expand + lib-test: Fixed assert-crash in test_exit() with --enable-static-checker + Fixes: Panic: Missing t_pop() call -M src/lib/test-var-expand.c +M src/lib-test/test-common.c +M src/lib/data-stack.c +M src/lib/data-stack.h -2016-10-27 15:37:45 +0300 Aki Tuomi (f7f66f6e5) +2016-10-05 14:22:03 +0300 Timo Sirainen (ceace0558) - lib: Add generic hashing support to var-expand + lib: Simplify static checker's job for i_free() macro. - Enables use of - %{H;rounds=,truncate=,salt=:field} +M src/lib/imem.h +M src/lib/mempool-system.c +M src/lib/mempool.h - syntax in any variable expansion. H is any supported hash algorithm or pkcs5 - for PKCS#5 PBKDF2 using SHA256. +2016-10-05 14:18:07 +0300 Timo Sirainen (cf4bdceaf) -M src/lib/var-expand.c + lib: [ip]_free(mem) is now also guaranteed to set mem=NULL -2016-10-31 19:20:51 +0200 Timo Sirainen (d845c5c6d) + It was already doing it, but updated the macros and comments to make it + clear that this won't change in future. Changing this would only make it + more likely that bugs occur and the performance improvements would be close + to nonexistent. - lib: var_expand() code cleanup - Moved short %v expansion to its own - function. +M src/lib/imem.h +M src/lib/mempool.h +2016-10-05 16:34:16 +0300 Timo Sirainen (b25ad25ca) -M src/lib/var-expand.c + lib-storage: Fixed assert-crash in mailbox_save_cancel() -2016-11-01 20:14:43 +0200 Aki Tuomi (45aeec430) + Broken by 05150df8f. Fixes: Panic: file mail-storage.c: line 2137 + (mailbox_save_context_reset): assertion failed: (ctx->saving) - lib: Add unit test for buffer truncate +M src/lib-storage/mail-storage.c +2016-09-12 13:02:23 +0300 Aki Tuomi (4036c1ca9) -M src/lib/test-buffer.c + lib-program-client: Add program-client from pigeonhole -2016-05-16 13:19:50 +0300 Timo Sirainen (51fb86474) - lib: Updated buffer_set_used_size() comment and added unit test. +M configure.ac +M dovecot-config.in.in +M src/Makefile.am +A src/lib-program-client/Makefile.am +A src/lib-program-client/program-client-local.c +A src/lib-program-client/program-client-private.h +A src/lib-program-client/program-client-remote.c +A src/lib-program-client/program-client.c +A src/lib-program-client/program-client.h +2016-09-27 16:15:42 +0300 Timo Sirainen (830382ed5) -M src/lib/buffer.h -M src/lib/test-buffer.c + lib: If connect() fails with EADDRNOTAVAIL, retry it 4 more times. -2016-10-27 16:19:52 +0300 Aki Tuomi (01557bc00) + This is needed on busy systems. Nicely explained in: + https://idea.popcount.org/2014-04-03-bind-before-connect/ - lib: Do not consume {} inside %{} +M src/lib/net.c +2016-10-05 15:03:05 +0300 Phil Carmody (27fdbf79a) -M src/lib/var-expand.c + plugins/fts - make storage errors more informative -2016-11-01 20:06:46 +0200 Aki Tuomi (56e33660d) + There are 3 different ways to fail ending a transaction (one of which is + itself just a record that something now unknown previously failed). Identify + which one in the logs. - lib: Add buffer truncate + Signed-off-by: Phil Carmody +M src/plugins/fts/fts-storage.c -M src/lib/buffer.c -M src/lib/buffer.h +2016-10-04 17:31:26 +0300 Timo Sirainen (fbfdd1a75) -2016-11-02 23:00:50 +0200 Timo Sirainen (36447e7ea) + lib-storage: autoexpunge mailboxes with wildcards didn't work with namespace + prefix. - auth: Make static analyzer happier. - Don't complain about uninitialized static_password being sent to - passdb_handle_credentials(). It could only happen for failures, and - passdb_handle_credentials() wouldn't have used the password then. +M src/lib-storage/mail-autoexpunge.c -M src/auth/passdb-static.c +2016-09-27 19:48:14 +0300 Timo Sirainen (96d1b0c81) -2016-11-02 21:59:12 +0200 Timo Sirainen (a5fd19666) + lib-index: If view syncing sees index is reset, always mark the view as + inconsistent. - fts: Fix error message when syncing FTS root mailbox fails. + Not only when the mailbox has messages, because that could still mess up + assumptions about UIDs. A somewhat better check could have been to do this + only when next_uid>1 (= there have been messages at some point in this + mailbox), but it's safer to just always mark the view as inconsistent. +M src/lib-index/mail-index-view-sync.c -M src/plugins/fts/fts-api.c +2016-09-27 19:45:57 +0300 Timo Sirainen (83cd96ee8) -2016-11-02 15:31:14 +0200 Timo Sirainen (765dd991c) + lib-index: When finding a view is reset, don't attempt any further syncing. - lib: ioloop-notify-kqueue wasn't storing source filename. + This could cause various errors to be logged, such as: Error: Append with + UID 7103, but next_uid = 7242 +M src/lib-index/mail-index-view-sync.c -M src/lib/ioloop-notify-kqueue.c +2016-09-27 19:41:25 +0300 Timo Sirainen (407d64647) -2016-11-09 00:48:32 +0100 Stephan Bosch (b0614487f) + lib-index: Fixed potential assert-crash when view syncing sees a reset + marker. - lib-http: test-http-client-errors: Add test for server that returns error - status early while client is still sending blocking payload. + It should never try to use main index map at that point, because + view_sync_have_expunges() looks changes only before the reset marker. Fixes: + Error: Index .../dovecot.index lost messages without expunging (36 -> 27) -M src/lib-http/test-http-client-errors.c +M src/lib-index/mail-index-view-sync.c -2016-11-09 00:46:32 +0100 Stephan Bosch (78d15580e) +2016-09-27 19:39:59 +0300 Timo Sirainen (2d33fd7fc) - lib-http: client: Fixed assert failure occurring when server returns error - status early while client is still sending blocking payload. + lib-storage: Make sure mailbox_sync*() fails if view is inconsistent + afterwards. -M src/lib-http/http-client-request.c +M src/lib-storage/index/index-sync.c -2016-11-09 00:24:54 +0100 Stephan Bosch (7421c8ede) +2016-09-27 19:38:26 +0300 Timo Sirainen (505561860) - lib-http: Added blocking client support to test-http-client-errors. + imap: If mailbox is inconsistent after syncing, don't try to sync message + counts. + This fixes (e.g. after doveadm force-resync): Panic: Message count decreased -M src/lib-http/test-http-client-errors.c +M src/imap/imap-sync.c -2016-11-03 21:06:27 +0100 Stephan Bosch (4d150ce54) +2016-09-26 21:04:44 +0200 Stephan Bosch (458d877d8) - lib-http: Fixed potential segfault problem in test-http-client-errors. + lib: uri-util: Implemented API to check generic URI syntax. - Found by Coverity. + This allows checking whether something is a valid URI of any type. This + change adds a test suite for the generic URI syntax, which is currently the + main purpose of the API addition. Apart from a few simple vality checks, the + test suite also tests various URI examples from RFCs. -M src/lib-http/test-http-client-errors.c +M src/lib/Makefile.am +M src/lib/test-lib.inc +A src/lib/test-uri.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-10-25 09:56:34 +0200 Stephan Bosch (c58821d5a) +2016-10-02 14:18:35 +0200 Stephan Bosch (957f71b0b) - lib-http: Added DNS-related tests to test-http-client-errors. + lib-http: uri: Removed unnecessary checking of percent encoding of query and + fragment parts. + This is now always performed in lib/uri-util. -M src/lib-http/test-http-client-errors.c +M src/lib-http/http-url.c -2016-09-16 20:29:00 +0200 Stephan Bosch (e9b4a8854) +2016-10-02 14:14:48 +0200 Stephan Bosch (61f962e8f) - lib-http: client: Destroy host and associated queue objects after no more - requests remain and an idle timeout expires. + lib: uri-util: Always fully check the syntax of percent encoding while + parsing URI components. -M src/lib-http/http-client-host.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c +M src/lib/uri-util.c -2016-09-16 20:22:17 +0200 Stephan Bosch (2ac61a703) +2016-10-03 10:08:45 +0300 Aki Tuomi (27ba8acc6) - lib-http: client: Implemented host name lookup TTL. + lib-test: Fix memory leak in test-ostream - Host name lookups will now be performed again when the results have expired. - Without access to TTL information from DNS lookups, all lookups will use the - same default TTL for now. -M src/lib-http/http-client-host.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c -M src/lib-http/http-client.c -M src/lib-http/http-client.h +M src/lib-test/test-ostream.c -2016-09-15 22:49:54 +0200 Stephan Bosch (d9fee0b80) +2016-10-03 10:08:31 +0300 Aki Tuomi (d60ff60a7) - lib-http: client: Added http_client_queue_requests_active(). + lib-test: Fix illegal memory access in test-ostream - It counts how many active requests a queue has. -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c +M src/lib-test/test-ostream.c -2016-09-16 01:58:27 +0200 Stephan Bosch (6d39f7baf) +2016-10-03 09:11:23 +0300 Aki Tuomi (dfa23b2dd) - lib-http: client: Create queue->pending_peers array from the beginning. + io: Add source filename - This simplifies the code, since the pending peers array is always used. + This will make debugging alot easier when you can see what the filename is + as well. -M src/lib-http/http-client-queue.c +M src/lib/ioloop-notify-inotify.c +M src/lib/ioloop-notify-kqueue.c +M src/lib/ioloop-notify-none.c +M src/lib/ioloop-private.h +M src/lib/ioloop.c +M src/lib/ioloop.h -2016-09-16 01:35:09 +0200 Stephan Bosch (6d7bf6d36) +2016-09-30 13:42:45 +0300 Timo Sirainen (11d88fd44) - lib-http: client: Link peers to queue earlier: during connection attempts. + lib-test: Added test_ostream for testing nonblocking ostreams. - This makes sure that queues keep track of which peers are doing stuff on its - behalf. This is important to be able to manage the active peers when a new - host name lookup was performed; if a peer is no longer listed in the - returned IPs it should be dropped. -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c +M src/lib-test/Makefile.am +M src/lib-test/test-common.h +A src/lib-test/test-ostream.c -2016-09-15 02:14:46 +0200 Stephan Bosch (3db76db23) +2016-09-30 13:10:13 +0300 Timo Sirainen (b3987cf96) - lib-http: client: Created http_client_peer_drop() function that closes a - peer object gracefully. + lib-test: Moved test_istream code to its own test-istream.c file. - It checks whether any connections are still present. It checks whether a - backoff timer is still active. This change and subsequent changes prepare - for being able to destroy a queue when it becomes unused. All peers linked - to such a queue are unlinked and dropped when inactive and unlinked. -M src/lib-http/http-client-peer.c +M src/lib-test/Makefile.am +M src/lib-test/test-common.c +A src/lib-test/test-istream.c -2016-06-16 22:02:08 +0200 Stephan Bosch (3a939e6c0) +2016-09-30 13:04:48 +0300 Timo Sirainen (f8a9af771) - lib-http: client/server: Enable the TCP_NODELAY option for all connections. + lib-test: Allow test_istream_set_*() for test-istream's children. - This disables the TCP Nagle algorithm. With the Nagle algorithm enabled, TCP - waits a little to accumulate more data in a small segment before it is sent. - For transfer of large continuous payloads, this is not useful and even - harmful. If the final remaining bit of the payload is small, the TCP layer - will wait for a significant amount of time at the end of the payload. For - many sequential transfers, this amounts to much waiting time. This is - particularly evident in the test-http-payload test suite tool. Setting - TCP_NODELAY decreases its run time from up to 20 minutes to about half a - minute my system. + It will internally find the test_istream from parents. This simplifies the + testing code so that it doesn't have to keep track of both the test_istream + and the final istream. -M src/lib-http/http-client-connection.c -M src/lib-http/http-server-connection.c +M src/lib-test/test-common.c -2016-06-16 22:01:06 +0200 Stephan Bosch (a2f8d56fa) +2016-09-27 20:21:55 +0300 Timo Sirainen (85601125c) - lib: Created net_set_tcp_nodelay(), which enables the TCP_NODELAY socket - option. + director: Ignore duplicates in director_servers setting. - This disables the TCP Nagle algorithm. -M src/lib/net.c -M src/lib/net.h +M src/director/director-host.c -2016-05-23 02:36:10 +0200 Stephan Bosch (3019190af) +2016-09-30 12:36:33 +0300 Timo Sirainen (9f7441a47) - lib-http: client: Improved labeling of debug messages. + lib-storage: mail_user_dup() should duplicate also userdb_fields. - Request label is corrected. Labels are now pre-composed and stored. -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-peer.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-request.c +M src/lib-storage/mail-user.c -2016-04-16 03:54:00 +0200 Stephan Bosch (70b91e695) +2016-09-29 14:15:32 +0300 Timo Sirainen (05150df8f) - lib-http: server: Implemented means to gracefully shut down the server. + lib-storage: Don't reset mail_save_context.saving too early. - While shutting down, it will not accept new requests and connections are - closed once they become idle. + If mailbox_save_using_mail() ended up in mail_storage_copy(), saving was set + to FALSE before the copy() method was finished running. This caused e.g. + notify plugin to think that this was a copy event instead of a save event. -M src/lib-http/http-server-connection.c -M src/lib-http/http-server-private.h -M src/lib-http/http-server.c -M src/lib-http/http-server.h + Added comments and asserts to clarify how the logic should work between all + the different copying/moving/saving flags. -2016-04-27 12:00:25 +0200 Stephan Bosch (09d628cf9) +M src/lib-storage/mail-copy.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.c - lib-http: client: Added ability to configure a specific proxy for individual - requests. +2016-09-29 14:00:49 +0300 Timo Sirainen (fe9459ab4) - This way, a request can be routed to a specific proxy (or origin server). - The destination can also be a unix socket. + lib-storage: If mailbox_move() fails, reset mail_save_context.moving==FALSE -M src/lib-http/http-client-request.c -M src/lib-http/http-client.h -2016-04-16 02:05:28 +0200 Stephan Bosch (5a1f8f057) +M src/lib-storage/mail-storage.c - lib-http: client: Added pure attribute to some of the request property - functions. +2016-09-29 09:51:40 +0300 Aki Tuomi (042c55b2f) + doveadm-import: Update manpage -M src/lib-http/http-client-request.c -M src/lib-http/http-client.h -2016-04-16 02:03:10 +0200 Stephan Bosch (390a66a1d) +M doc/man/doveadm-import.1.in - lib-http: client: Cleaned up headers and added some more documentation - there. +2016-09-29 10:17:05 +0300 Aki Tuomi (b35ac65c8) + doveadm-import: Add -U parameter to specify source user -M src/lib-http/http-client-private.h -M src/lib-http/http-client.h + When doing import, you can specify which user to use as source user. -2016-09-15 02:09:47 +0200 Stephan Bosch (0c43fc213) +M src/doveadm/doveadm-mail-import.c - lib-http: client: Unlink all queues from peer when it is disconnected. +2016-09-29 10:15:24 +0300 Aki Tuomi (bc4f0aef7) - Before, queues were only destroyed when the whole client was destroyed. This - change and subsequent changes prepare for being able to destroy a queue when - it becomes unused. + doveadm-import: Use target user as source user -M src/lib-http/http-client-peer.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c + This is done to avoid spurious error messages caused by being ran as root. -2016-09-15 01:59:23 +0200 Stephan Bosch (9f5429bc6) +M src/doveadm/doveadm-mail-import.c - lib-http: client: Improved logging of connection loss handling in peer. +2016-09-28 13:34:46 +0300 Aki Tuomi (a7512265b) + imap-hibernate: Accept RFC DONE\IDLE -M src/lib-http/http-client-peer.c + Change imap-hibernate to accept DONE\r\n IDLE\r\n as well, which is + specified by RFC -2016-09-14 21:37:38 +0200 Stephan Bosch (7b4439d8a) +M src/imap-hibernate/imap-client.c - lib-http: client: If a peer object is no longer linked to a queue, don't - close it until all connections are inactive. +2016-09-27 15:50:11 +0300 Timo Sirainen (f6f50f528) - The peer object is canceled, rather than closed. Which means that any newly - started and idle connections are closed immediately. Requests may be pending - though. This is only relevant when hosts/queues are removed at some point. - This is a preparational change for having a maximum lifetime on - hosts/queues, in which case this becomes a possibility. + master: Removed hardcoded listen() backlog limit. -M src/lib-http/http-client-peer.c + If it's already too large, the kernel will truncate it automatically. So + there shouldn't be any reason for us to explicitly limit it. -2016-09-14 01:37:05 +0200 Stephan Bosch (e008bd370) +M src/master/service-listen.c - lib-http: client: Added debug messages that indicate when a queue is - linked/unlinked to a peer. +2016-09-27 13:28:15 +0300 Timo Sirainen (bf57767df) + lib-storage: Update mailbox.recent_flags_count correctly. -M src/lib-http/http-client-peer.c + The counter was increased even if the UID was already in recent_flags. This + is the only place where I found that recent_flags and recent_flags_count + could become desynced (which they definitely were in a core dump), so + hopefully this fixes assert-crashes like: -2016-09-14 01:30:16 +0200 Stephan Bosch (786336c9d) + Panic: file index-status.c: line 130 (index_storage_get_open_status): + assertion failed: (status_r->recent <= status_r->messages) - lib-http: client: Added function that counts how many connections are active - within a peer. +M src/lib-storage/mailbox-recent-flags.c +2016-09-27 13:50:51 +0300 Timo Sirainen (93a4387a1) -M src/lib-http/http-client-peer.c -M src/lib-http/http-client-private.h + dsync: Virtual sizes weren't exported properly with -I parameter. -2016-09-14 01:26:10 +0200 Stephan Bosch (2bde4edef) + Although they were incorrectly being exported with -T parameter. This makes + -I work without assert-crashing. - lib-http: client: Added function that checks whether a connection is - currently active. +M src/doveadm/dsync/dsync-mailbox-export.c +2016-09-27 13:50:10 +0300 Timo Sirainen (f538498d8) -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h + dsync: Renamed "max sync size" parameter from -S to -I. -2016-09-11 19:34:34 +0200 Stephan Bosch (6324e0de0) + -S can't be used because it was already used for the generic socket path, so + it didn't actually work. - lib-http: client: Created http_client_connection_failure() handler. +M src/doveadm/doveadm-dsync.c +2016-09-26 15:38:27 +0300 Timo Sirainen (e33462704) -M src/lib-http/http-client-connection.c + dict-client: Fixed lock and ioloop wait timings in log messages. -2016-09-11 19:44:32 +0200 Stephan Bosch (d9c3269c8) + Previously it was logging the total amount of time spent on lock waits or on + ioloop during the existence of the entire process, rather than how much time + the command itself was spending on those. This wasn't very useful. Now it + also tries to separate the time spent on the main ioloop and in dict_wait(). - lib-http: client: Set conn->connect_request to NULL immediately in - http_client_connection_tunnel_response(). +M src/lib-dict/dict-client.c - Prevents referring to this completed request in other parts of the code. +2016-09-26 16:44:21 +0300 Timo Sirainen (8d72f2090) -M src/lib-http/http-client-connection.c + dict-client: Don't return "Dict server timeout" too early. -2016-09-11 17:46:10 +0200 Stephan Bosch (17ec7e616) + This could have happened when many dict commands were being run without the + timeout being reset in the middle. - lib-http: client: Improved handling of hosts with explicit IP address. +M src/lib-dict/dict-client.c +2016-09-26 16:34:23 +0300 Timo Sirainen (9fa33a0c5) -M src/lib-http/http-client-host.c -M src/lib-http/http-client-private.h + dict-client: Remove timeout when there are only background commands. -2016-09-11 14:51:28 +0200 Stephan Bosch (b707ace51) + Normally the timeout wasn't added in the first place, but it was if a + non-background command was added first and it was followed by a background + command. - lib-http: Made test-http-client-errors more reliable. +M src/lib-dict/dict-client.c +2016-09-23 14:59:33 +0300 Timo Sirainen (666d85f70) -M src/lib-http/test-http-client-errors.c + login proxy: Don't leak connections if reconnect fails with "Host is down" -2016-11-01 12:35:08 +0200 Timo Sirainen (fea1942d3) + Double-disconnection was also attempting to close the same fd twice, but I + think that couldn't have happened before this leak was fixed. - lib-index: Don't waste 3 bytes of space in struct mail_index_record. +M src/login-common/login-proxy.c - It was always supposed to be used mainly for keywords, but it got broken - many years ago and nobody noticed. +2016-09-22 14:14:23 +0300 Aki Tuomi (e5a55bb6b) -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-keywords.c -M src/lib-index/mail-index.h + lib: Add test for pending io without timeouts -2016-11-01 12:43:03 +0200 Timo Sirainen (aef7a714d) - lib-storage: Don't enable modseqs on STATUS_HIGHESTMODSEQ. +M src/lib/test-ioloop.c - This is requested always by IMAP's SELECT command even when the IMAP client - hasn't requested it. We don't want to unnecessarily enable modseqs that use - up memory and disk space when they're not really needed. Other callers may - also be interested in asking for HIGHESTMODSEQ (which is nowadays actually - always available) without enabling full modseq tracking. +2016-09-22 14:13:43 +0300 Aki Tuomi (789645e67) -M src/lib-storage/mail-storage.c + lib: Update ioloop attributes -2016-11-01 15:51:02 +0200 Timo Sirainen (b5169b98b) + With pending IO, the ioloop attributes still need updating, instead of just + returning. - lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling. +M src/lib/ioloop.c - It was being used the wrong way. SEARCH SENTON/BEFORE/AFTER should have - checked the times within the mail's timezone, not UTC. +2016-09-22 14:23:00 +0300 Timo Sirainen (b75eba4f6) -M src/lib-storage/index/index-search.c + lib-mail: message_header_hash_more() now allows input in any slices. -2016-10-31 21:39:44 +0200 Timo Sirainen (2b7c01f16) + There wasn't necessarily any guarantees that the input would be sliced in + such a way that the repeating '?' would be dropped the same way every time. - doveadm director: Fix memory leaks if hostname lookup fails. +M src/doveadm/dsync/dsync-mail.c +M src/lib-mail/message-header-hash.c +M src/lib-mail/message-header-hash.h +M src/lib-mail/test-message-header-hash.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +2016-09-22 14:16:12 +0300 Timo Sirainen (f4b1d510a) -M src/doveadm/doveadm-director.c + lib-mail: Removed obsolete comment about message_header_hash_more() -2016-11-01 17:09:27 +0200 Timo Sirainen (86810bd45) + pop3-migration plugin uses this function now, so it doesn't need to be kept + in sync. - lib: Fix str_truncate() when string size is already smaller. +M src/lib-mail/message-header-hash.c - Previous behavior either added extra NULs to the string or assert-crashed. +2016-09-22 13:47:42 +0300 Timo Sirainen (a415de524) -M src/lib/str.h -M src/lib/test-str.c + pop3-migration: "first POP3 msg" warning didn't actually show the first one. -2016-05-03 20:17:12 +0300 Timo Sirainen (7b086b7bc) + It was showing the first index in an array, which had nothing to do with + being the first POP3 message number. - lib: Added more unit tests to str_*() +M src/plugins/pop3-migration/pop3-migration-plugin.c +2016-09-22 13:38:33 +0300 Timo Sirainen (5bcac2212) -M src/lib/test-str.c + dbox: mailbox_update() shouldn't reset pop3-uidl header. -2016-04-30 14:03:32 +0300 Timo Sirainen (00b033190) + This broke reading migrated POP3 UIDLs. - lib: Make str_*() inline which are simple buffer_* wrappers. +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-storage.c +2016-09-21 20:50:24 +0300 Timo Sirainen (2e5e2047a) -M src/lib/str.c -M src/lib/str.h + login-proxy: Fixed "Host is down" never reseting itself. -2016-09-16 09:53:06 +0300 Timo Sirainen (02cb95751) + Broken by c8eb8314a, which moved adding num_waiting_connections earlier. + After that it was never 0 at the check time. - imap/pop3 proxy: If passdb returns proxy_not_trusted, don't send ID/XCLIENT +M src/login-common/login-proxy.c - This allows using Dovecot proxying feature towards less trusted servers. +2016-09-21 16:17:26 +0300 Timo Sirainen (1d4f019ff) -M src/imap-login/imap-proxy.c -M src/login-common/client-common-auth.c -M src/login-common/client-common.h -M src/pop3-login/pop3-proxy.c + lib: test-istream-chain fixes -2016-10-31 20:19:07 +0200 Timo Sirainen (99b7459d1) - auth: If passwd-file can't be read, return tempfail (not user unknown). +M src/lib/test-istream-chain.c +2016-09-20 18:08:10 +0300 Timo Sirainen (f2edbc51b) -M src/auth/db-passwd-file.c -M src/auth/db-passwd-file.h -M src/auth/passdb-passwd-file.c -M src/auth/userdb-passwd-file.c + lib-dcrypt: Don't finalize encryption on o_stream_flush() -2016-10-31 20:06:35 +0200 Timo Sirainen (0a28037cd) + For example the default o_stream_uncork() implementation enforces flushing + and it's probably better not to change that. In general there's really no + reason to perform the finalization at flush when the stream can't be written + to anymore (whereas lib-compression ostreams allow writes after flushes). - auth: If uidgid_file doesn't exist, fail the userdb lookup. +M src/lib-dcrypt/ostream-encrypt.c +2016-09-21 13:26:30 +0300 Timo Sirainen (bac642771) -M src/auth/auth-request.c + lib: Fixed istream-chain when it has multiple "previous streams". -2016-10-28 13:26:42 +0300 Timo Sirainen (284a79dc3) + Fixes assert: Panic: file istream-chain.c: line 223 (i_stream_chain_read): + assertion failed: (cur_data_pos == data_size) - mdbox: Fix assert-crash caused by race condition with multiple doveadm - purges. + Unit test for it by Stephan Bosch. - This fixes a problem where an email that was just written to a new m.* file - gets expunged and purged by another process. +M src/lib/istream-chain.c +M src/lib/test-istream-chain.c - Fixes: Panic: file mdbox-map.c: line 1359: unreached +2016-09-21 13:47:05 +0300 Timo Sirainen (a81be83a3) -M src/lib-storage/index/dbox-multi/mdbox-map.c + lib: Fixed ostream-failure-at with blocking parent stream. -2016-10-31 19:12:14 +0200 Timo Sirainen (1b2adc0b8) + Blocking ostream returns either a full success or a full failure. It can't + return that only n/m bytes were written. - fs-randomfail: "write" probability was reversed. + Fixes assert: Panic: file ostream.c: line 255 (o_stream_sendv_int): + assertion failed: (!stream->blocking) - 0 meant 100% while 100 meant 0% +M src/lib/ostream-failure-at.c -M src/lib-fs/fs-randomfail.c +2016-09-21 12:19:18 +0300 Timo Sirainen (4c9caab45) -2016-10-31 15:37:00 +0200 Aki Tuomi (ef43e82fe) + doveadm fs get: Fixed logging error messages. - lib-test: Do not init/deinit library twice + The error is in istream, not in fs. - If lib is initialized, do not initialize or deinitialize library. This is - done to allow using master_service in unit tests which also wants to perform - lib init and deinit itself. +M src/doveadm/doveadm-fs.c -M src/lib-test/test-common.c +2016-09-20 21:06:22 +0300 Aki Tuomi (9a6fe6181) -2016-10-31 15:36:39 +0200 Aki Tuomi (955fd5726) + imap-login: Add missing brace - lib: Add function to see if lib is initialized - This is needed by test-lib to prevent double init/deinit. +M src/imap-login/imap-proxy.c -M src/lib/lib.c -M src/lib/lib.h +2016-09-20 18:51:18 +0300 Aki Tuomi (c24150b68) -2016-10-28 19:38:43 +0300 Timo Sirainen (42f520001) + imap-proxy: Fix typo in comment - dsync: Fix potential assert on mailbox deinit. - Should have happened only in somewhat rare error conditions that require - resyncing. +M src/imap-login/imap-proxy.c - Fixes: Panic: file dsync-brain-mailbox.c: line 358 - (dsync_brain_sync_mailbox_deinit): assertion failed: (brain->failed || - brain->sync_type == DSYNC_BRAIN_SYNC_TYPE_CHANGED) +2016-09-20 15:02:42 +0300 Aki Tuomi (abd4203d9) -M src/doveadm/dsync/dsync-brain-mailbox.c + imap-login: Honor nopipelining during preauth -2016-10-28 17:10:16 +0300 Paul Howarth (c2b23ae95) - configure: Improve check for OpenSSL without EC support +M src/imap-login/imap-proxy.c - The original test was for EC_KEY_new but some systems had that and not - EVP_PKEY_CTX_new_id, so the test was switched to that function. However, - Fedora releases 12 through 17 have EVP_PKEY_CTX_new_id but not EC_KEY_new. - So we need to test for both functions before enabling the dcrypt build. +2016-09-20 08:51:29 -0400 Josef 'Jeff' Sipek (bd6a80567) -M configure.ac + lib-storage: remove unused internal_attribute argument from + attribute_{get,set} -2016-10-28 11:54:27 +0300 Timo Sirainen (9b59f54e7) + This removes an argument added in 9f37ef2a9192e7d47e3d7ac959080fd01120f2e9 + but obsoleted (but not removed) in d1147c225f64596fc5eeb1cb2aab31b3c57d5215. - auth: Fix crash when exporting passdb fields to auth-worker that have NULL - values + Not only does this change simplify the codebase, it actually brings the API + closer to what it was back in 2.2. +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-storage.h +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mailbox-attribute-internal.c +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-attribute.h +M src/plugins/acl/acl-attributes.c +M src/plugins/acl/acl-storage.h -M src/auth/auth-request.c +2016-09-20 12:47:32 +0300 Aki Tuomi (f49f1c5fa) -2016-10-27 13:20:03 +0300 Timo Sirainen (2d1049524) + lib-dcrypt: Set NOPLUGIN_LDFLAGS to empty - lib-compression: Fixed fd leak in unit test + Avoids -Wl,--as-needed here +M src/lib-dcrypt/Makefile.am -M src/lib-compression/test-compression.c +2016-09-20 10:52:08 +0300 Aki Tuomi (452d0005a) -2016-10-27 11:19:50 +0300 Timo Sirainen (4a349dc84) + lib-dcrypt: Makefile.am fix - lib-auth: Minor debug logging improvement. + Remove dcrypt.c from openssl library and add missing slash - Include "PASS" or "USER" in the prefix to make it clear what the reply is - for. +M src/lib-dcrypt/Makefile.am -M src/lib-auth/auth-master.c +2016-09-16 15:50:22 +0300 Aki Tuomi (80cfaba9e) -2016-10-28 17:00:13 +0300 Timo Sirainen (42f190c1d) + lib: Ensure handler_context is not NULL - lib-program-client: Fix building with compilers that have no typeof() + handler context must not be NULL here. +M src/lib/ioloop-epoll.c -M src/lib-program-client/test-program-client-remote.c +2016-09-16 15:49:36 +0300 Aki Tuomi (15cdc6b0e) -2016-07-15 11:31:25 +0300 Aki Tuomi (4f59e604b) + lib: Prevent crash in ioloop - auth: Remove i_assert for credentials scheme + If only non-fd sources and no timeouts are in ioloop, prevent crash and + unnecessary waiting when there are pending IOs. +M src/lib/ioloop.c -M src/auth/auth-request.c +2016-09-19 16:20:14 +0300 Timo Sirainen (17466c748) -2016-10-27 03:58:21 +0300 Martti Rannanjärvi (f0c3eb66d) + lib: Assert if i_stream_create_seekable_path(temp_path_prefix==NULL) - doveadm: fix compile warning in doveadm-dump-index + If the stream becomes large enough it would crash then in a callback + function, which makes debugging more difficult. +M src/lib/istream-seekable.c -M src/doveadm/doveadm-dump-index.c +2016-09-19 12:27:16 +0300 Aki Tuomi (2fcde0841) -2016-10-21 14:34:47 +0300 Timo Sirainen (0db2a5676) + fts-plugin: Remove NULL assert - director: Fix shutdown_clients=no to not break + fts_backend_update_deinit will set box to NULL and call update_set_mailbox + then. NULL check needs to be done in backends. - The director process must shut down even with with shutdown_clients=no. - Otherwise the two director processes will try to keep competing with each - others and log errors like: +M src/plugins/fts/fts-api.c - director: Warning: Director 10.0.0.123:9090/right disconnected us with - reason: Replacing with new incoming connection director: Warning: Director - 10.0.0.123:9090/right disconnected us with reason: Replacing with - 10.0.0.124:9090 +2016-09-19 12:26:46 +0300 Aki Tuomi (768ac0aa3) -M src/director/main.c + fts-backend-solr: Check that box is not NULL -2016-10-21 00:25:20 +0300 Timo Sirainen (2732f2236) + fts_backend_update_deinit will set box to NULL and call update_set_mailbox + then. - imap-hibernate: Fix "DONE" handling. +M src/plugins/fts-solr/fts-backend-solr.c - 1. If only "DONE\r\n" was sent, it randomly failed with BAD because of - out-of-bounds buffer read. +2016-09-19 12:26:08 +0300 Aki Tuomi (f2496be45) - 2. If "DONE\r\n" was followed by a command tag but no space afterwards, we - kept waiting for the input to continue. But since the DONE was already sent, - we should break the IDLE already at that point without any further waiting. + fts-backend-lucene: Check that box is not NULL -M src/imap-hibernate/imap-client.c + fts_backend_update_deinit will set box to NULL and call update_set_mailbox + then. -2016-10-26 23:20:17 +0300 Timo Sirainen (1f6e27131) +M src/plugins/fts-lucene/fts-backend-lucene.c - doveadm dump: Dump mailbox names in mailbox.list.index's header. +2016-09-19 11:08:08 +0300 Timo Sirainen (db8a5116f) + lib-ssl-iostream: The final fix to make the SSL plugin loading not fail.. -M src/doveadm/doveadm-dump-index.c -2016-10-26 18:06:36 +0300 Timo Sirainen (7d33533ce) +M src/lib-ssl-iostream/iostream-ssl.c - *-login: Removed enforcing maximum calculated fd limit. +2016-09-18 16:33:07 +0300 Timo Sirainen (ecc2fb346) - Just use the regular ulimit. Login process has become complicated enough - that counting the exact fd size isn't so easy anymore. + lib-ssl-iostream: Fixed OpenSSL module to be actually initialized. - Also apparently this low fd limit is causing errors with new Linux kernels: - pop3-login: Error: fd_send(pop3, 18) failed: Too many references: cannot - splice -M src/login-common/main.c +M src/lib-http/test-http-client.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl.c -2016-10-26 18:05:32 +0300 Timo Sirainen (2a77c83b6) +2016-09-17 12:57:00 +0300 Aki Tuomi (609bea053) - Compiler warning fixes with -Wstrict-bool + auth-policy: Ref/unref auth request + If auth_request is not referenced it can go away before HTTP response is + handled. -M src/lib-compression/test-compression.c -M src/lib-sql/driver-cassandra.c +M src/auth/auth-policy.c -2016-10-26 14:58:56 +0300 Timo Sirainen (2db8fb669) +2016-09-16 17:13:24 +0300 Timo Sirainen (50072aa42) - lib: Fixed net_str2port*() comments + fs-randomfail: Operation is unfinished on EAGAIN, not ENOENT. + This caused crashes and other problems when using randomfail with + asynchronous fs drivers. -M src/lib/net.h +M src/lib-fs/fs-randomfail.c -2016-10-25 20:52:16 +0300 Timo Sirainen (2cc140b66) +2016-09-16 08:39:24 +0300 Timo Sirainen (c45da70c9) - doveadm fs get: Use pager formatter by default to avoid extra LF at the end. + lib-http: Link test-http-client libssl_iostream_openssl.so directly. + This way it can be run without having to do make install first. -M src/doveadm/doveadm-fs.c +M src/lib-http/Makefile.am +M src/lib-http/test-http-client.c -2016-10-25 20:54:17 +0300 Timo Sirainen (9dc970171) +2016-09-16 08:35:55 +0300 Timo Sirainen (fe4058e6f) - doveadm: Code cleanup - add and use DOVEADM_PRINT_TYPE_PAGER macro + lib-ssl-iostream: Use more standard _init() & _deinit() to initialize SSL + plugin + This is mainly to make it easier for test programs to link to the plugin + directly. -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-master.c -M src/doveadm/doveadm-print-pager.c -M src/doveadm/doveadm-print.h +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c -2016-10-25 20:51:36 +0300 Timo Sirainen (98193d1a9) +2016-09-15 11:30:15 +0300 Timo Sirainen (033e315cc) - doveadm: "pager" formatter supports now DOVEADM_PRINT_HEADER_FLAG_HIDE_TITLE + lib: safe_mkstemp*() didn't always truncate prefix back to original on + failure. + This caused repeated safe_mkstemp*() calls with the same prefix to keep + increasing its size. It probably didn't really break anything (unless it was + called enough many times to reach 255 filename length), but the filenames + were still confusingly ugly. -M src/doveadm/doveadm-print-pager.c +M src/lib/safe-mkstemp.c -2016-04-21 14:22:10 +0300 Martti Rannanjärvi (9c12525ea) +2016-09-15 10:23:41 +0300 Timo Sirainen (6d2e2c791) - doveadm: \f\n only between pages in pager + pop3-migration: Fixed crash when not specifying pop3_migration_mailbox + setting. - No more \f\n in the end. -M src/doveadm/doveadm-print-pager.c +M src/plugins/pop3-migration/pop3-migration-plugin.c -2016-10-25 22:39:38 +0300 Timo Sirainen (00e99bcbf) +2016-09-14 14:19:39 +0300 Timo Sirainen (d97f081a3) - director: Avoid assert-crash at deinit if user moves are still being added. + iostream-temp: If write() to temp file fails at any time, move it back to + memory. - Fixes: Panic: file user-directory.c: line 312 (user_directory_deinit): - assertion failed: (array_count(&dir->iters) == 0) + Similarly to if the write() to temp fails during the initial move attempt. + This way even if write() fails due to out of disk space, it's not visible to + caller. An error message is logged in any case. -M src/director/main.c +M src/lib/iostream-temp.c +M src/lib/iostream-temp.h +M src/lib/test-iostream-temp.c -2016-10-25 22:17:23 +0300 Timo Sirainen (d0268f2a8) +2016-09-14 19:06:29 +0300 Timo Sirainen (061046c9a) - director: Send user's old and new backend IPs to flush script. + pop3-migration: Avoid unnecessarily using stream's hdr_size. - If user was created due to the user-move, don't execute the flush script - since it wouldn't really have any work to do anyway. + Shouldn't change any behavior, except reduce CPU usage a little bit. -M src/director/director.c -M src/director/director.h +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.h +M src/plugins/pop3-migration/test-pop3-migration-plugin.c -2016-10-25 22:12:01 +0300 Timo Sirainen (06da11f17) +2016-09-14 18:57:43 +0300 Timo Sirainen (9e904c22e) - director: User move - Don't try to kick user's connections if user wasn't - even known. + imapc: mail_get_stream() shouldn't return cached hdr_size -M src/director/director.c +M src/lib-storage/index/imapc/imapc-mail.c -2016-10-25 22:06:02 +0300 Timo Sirainen (9309b3baa) +2016-09-14 07:13:50 -0400 Josef 'Jeff' Sipek (70e0c96e1) - director: Code cleanup - moved user kill startup to its own function. + doveadm: refactor mailbox attribute get/set/unset/list to share more code - No functional changes. -M src/director/director.c +M src/doveadm/doveadm-mail-mailbox-metadata.c -2016-10-25 21:47:01 +0300 Timo Sirainen (5c3b438e9) +2016-09-13 07:50:04 -0400 Josef 'Jeff' Sipek (26c41874c) - director: Code cleanup - global director is no longer needed. + doveadm: allow access to server attributes via empty mailbox name -M src/director/director.h -M src/director/main.c +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h -2016-10-17 01:07:50 +0300 Timo Sirainen (6f93a3dcb) +2016-09-13 07:49:41 -0400 Josef 'Jeff' Sipek (d1147c225) - director: Moved all user killing state to struct director_kill_context + lib-storage: remove attribute accessibility checks - This should make it a bit easier to understand the life time of user - killing. It also simplifies code by removing struct - director_user_kill_finish_ctx. + index_storage_attribute_{set,get} should assume that the caller performed + due diligence and checked whether or not the user is allowed to store under + the key. - Finally, this already reduces memory usage with 32bit systems, and would - make it possible to reduce also on 64bit systems if timestamp is shrank to - 31 bits and weak bit moved after it. I'm not sure if that would be better - for performance though. In any case it would provide free space for 4 extra - bytes if that were needed in future. +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-storage.h -M src/director/director-connection.c -M src/director/director.c -M src/director/director.h -M src/director/test-user-directory.c -M src/director/user-directory.c -M src/director/user-directory.h +2016-09-13 03:33:06 -0400 Josef 'Jeff' Sipek (ee06e0aa5) -2016-10-25 21:41:16 +0300 Timo Sirainen (7d3ede1af) + doveadm: lowercase attribute names before trying to parse them - director: Code cleanup - rename director_kill_context.self to - kill_is_self_initiated + This now matches what the imap server does. +M src/doveadm/doveadm-mail-mailbox-metadata.c -M src/director/director.c +2016-09-13 03:32:06 -0400 Josef 'Jeff' Sipek (6dd167432) -2016-10-20 16:46:31 +0300 Timo Sirainen (21f978627) + lib-storage: document mailbox and server attribute handling - director: Code cleanup - added USER_IS_BEING_KILLED() macro +M src/lib-storage/mailbox-attribute.h -M src/director/director-connection.c -M src/director/director-request.c -M src/director/director.c -M src/director/doveadm-connection.c -M src/director/user-directory.c -M src/director/user-directory.h +2016-09-13 22:54:02 +0200 Stephan Bosch (1c9f4c14e) -2016-10-20 16:41:23 +0300 Timo Sirainen (bd9848256) + lib-http: client: Fixed hang occurring when nested ioloops are used in + response callbacks. - director: Code cleanup - move enum user_kill_state to director.h + To prevent missing disconnect events, i_stream_read() is called once a + change in ioloop is detected. However, if something was actually read into + the stream, the input handler was never called. So, a response could linger + in the stream buffer, without being handled, thereby causing the connection + to hang indefinitely. An additional input event could end the hang, but + sometimes this doesn't happen before the request times out. - This will be needed by following commits + This problem was seen in test-http-payload once in about 10 invocations. + Obox uses nested ioloops, to this applies there. -M src/director/director.c -M src/director/director.h -M src/director/user-directory.c -M src/director/user-directory.h +M src/lib-http/http-client-connection.c -2016-10-25 21:20:54 +0300 Timo Sirainen (ccb431749) +2016-09-11 22:10:44 +0200 Stephan Bosch (0873f750d) - director: Fix HOST-RESET-USERS with host parameter. + lib-http: test-http-payload: Fixed problem in nested ioloop test. - The logic was reversed: It should flush the specified host, not some other - host. Broken by 11ee3b40320a31669bd717fecbe1e332dad4fd84 + The running ioloop was not always stopped properly at the end of the test. + This caused an assert failure in the running ioloop. -M src/director/doveadm-connection.c +M src/lib-http/test-http-payload.c -2016-10-25 01:03:05 +0300 Timo Sirainen (7929dac29) +2016-09-11 22:06:54 +0200 Stephan Bosch (19f8621e1) - doveadm director dump: Fixed output to include LFs + lib-http: test-http-payload: Improved logging of nested ioloop tests. - Otherwise all the output will be mixed up in the same line. -M src/doveadm/doveadm-director.c +M src/lib-http/test-http-payload.c -2016-10-25 00:48:08 +0300 Timo Sirainen (58722083c) +2016-09-10 11:32:28 +0300 Timo Sirainen (5bfda550b) - director: Execute director_flush_socket only from one director. + doveadm-auth: Handle unexpected auth "continue" request without crashing. - Having each director do it would be redundant since they're all supposed to - be performing the same flush task to the same backend. -M src/director/director.c -M src/director/user-directory.h +M src/doveadm/doveadm-auth.c -2016-10-25 00:32:59 +0300 Timo Sirainen (b59011b74) +2016-09-10 11:28:38 +0300 Timo Sirainen (6b32b849a) - director: Improve debug logging output. + lib-lda: Cleanup error handling in LMTP client code. + If there are no successful recipients, we'll need to deinit the client. But + at that point we've already called all the callbacks, so the line parameter + to lmtp_client_fail_full() isn't actually used anywhere. This was confusing + static analyzer because global_fail_string was used as parameter, which + could have been NULL and wouldn't have been valid for the callbacks. -M src/director/director-connection.c -M src/director/director.c +M src/lib-lda/lmtp-client.c -2016-10-25 00:25:38 +0300 Timo Sirainen (9eba5d4ca) +2016-09-10 11:16:05 +0300 Timo Sirainen (d4361f37b) - director: Fix user move hangs when another move is triggered early. + lib-master: Fixed memory leak when IPC server is handling commands. - Running "doveadm director flush" before the previous flush hadn't fully - finished could have caused users to hang until their move timeout: + This mainly meant that when login processes responded to doveadm proxy + list/kick commands memory was leaked. - director: Error: Finishing user 3249070169 move timed out, its state may now - be inconsistent (state=waiting-for-everyone) +M src/lib-master/ipc-server.c -M src/director/director-connection.c -M src/director/director.c +2016-09-10 11:15:00 +0300 Timo Sirainen (552576554) -2016-10-25 00:22:20 +0300 Timo Sirainen (50d882ded) + doveadm: Don't allow doveadm_print_header(title==NULL) anymore. - director: Prevent race conditions by adding USER_KILL_STATE_FLUSHING + It's not used anywhere, and if it was used it would have crashed with at + least "tab" backend. - In theory it's possible that a user is freed during a flush and added back - before flush is finished, possibly even being moved again. This check makes - sure that we don't finish such move unless we're actually at the correct - flushing state. (If there's another flush also running for the user it'll be - ignored.) +M src/doveadm/doveadm-print.c - This is also useful for logging purposes. +2016-09-10 11:13:58 +0300 Timo Sirainen (4598234b3) -M src/director/director.c -M src/director/user-directory.c -M src/director/user-directory.h + dict-client: Don't crash if dict-server returns broken reply. -2016-10-25 00:13:23 +0300 Timo Sirainen (50d96a765) + Just treat missing value as empty value. - director: If user host conflict is detected, make sure new host is sent - back. +M src/lib-dict/dict-client.c - USER-KICK-HASH was sent, but the sender didn't get back a USER reply with - the new host. This could have increased how long user's host differred in - directors. +2016-09-09 18:18:32 +0300 Timo Sirainen (3c30113d2) - Avoids repeating this error: Error: User hash 2957018085 is being redirected - to two hosts: 10.0.0.30 and 10.0.0.201 (old_ts=1477338836) + auth: Make sure auth_request_log_info() doesn't crash when there are no + passdbs -M src/director/director-connection.c + auth_request_is_disabled_master_user() could have caused such crash. -2016-10-24 22:42:43 +0300 Timo Sirainen (2e52280f8) +M src/auth/auth-request.c - doveadm director flush: Added --max-parallel parameter. +2016-09-09 18:12:41 +0300 Timo Sirainen (c8a54e1bb) + auth: Explicitly ignore return value to make static analyzer happier. -M src/doveadm/doveadm-director.c -2016-10-24 22:41:25 +0300 Timo Sirainen (4a9870f2b) +M src/auth/auth-policy.c - director: HOST-RESET-USERS moves users more slowly now. +2016-09-09 18:10:29 +0300 Timo Sirainen (abb404575) - By default only 100 users can be moved in parallel. This can be overridden - with HOST-RESET-USERS parameter. + Added asserts to make static analyzer happier. - This delaying is especially useful when director_flush_socket is used to - avoid huge floods to the script service. Even without the socket it's still - good for avoiding unnecessary load spikes when all users are kicked at once - and they reconnect back at the same time. -M src/director/doveadm-connection.c -M src/director/doveadm-connection.h -M src/director/main.c -M src/director/user-directory.h +M src/lib-fs/fs-posix.c +M src/lib-index/mailbox-log.c +M src/lib-stats/stats-connection.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib/istream-file.c +M src/login-common/login-proxy-state.c +M src/plugins/fts/fts-api.c +M src/plugins/virtual/virtual-mail.c -2016-10-25 00:11:50 +0300 Timo Sirainen (535c94c68) +2016-09-09 18:07:15 +0300 Timo Sirainen (3177b4106) - director: If user move times out, log the state it was in at the time. + Removed dead code to make static analyzer happier. -M src/director/director.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/mail-storage.c +M src/plugins/fts-squat/squat-trie.c -2016-10-24 22:39:56 +0300 Timo Sirainen (e275b1516) +2016-09-09 17:55:20 +0300 Timo Sirainen (79fff4504) - director: Log user's kill_state with a human-readable string. + lib-storage: Fix potential crash when userdb-returns "key+=value" for a + nonexistent setting. + type would have also happened to be initialized to SET_STR for the crash to + happen. -M src/director/director-connection.c -M src/director/user-directory.c -M src/director/user-directory.h +M src/lib-storage/mail-storage-service.c -2016-10-24 22:27:30 +0300 Timo Sirainen (e23507081) +2016-09-09 17:50:43 +0300 Timo Sirainen (9474b66ac) - doveadm director: Invalid parameters cause doveadm to fail silently. + lib-test: Fixed NULL pointer dereference when using --enable-static-checker - doveadm_cmd_context.cmd doesn't point directly to doveadm_cmd_director. -M src/doveadm/doveadm-director.c +M src/lib-test/test-common.c -2016-10-24 22:22:28 +0300 Timo Sirainen (5a8bc5b29) +2016-09-09 17:46:51 +0300 Timo Sirainen (e87393d3a) - director: Fix sending up/down state in handshakes. + pgsql: Fixed clearing sql_commit_result.error_type - They were never sent, because HOSTs were sent before director had waited for - the remote to send its version number. So sender thought that the remote's - minor_version was too old and it didn't send the up/down state at all. + error was correctly set to NULL with the earlier memset(), but error_type + may have been garbage. This shouldn't have caused any actual problems. - This caused errors like: +M src/lib-sql/driver-pgsql.c - Warning: director(10.0.0.30:9090/left): Host 10.0.0.30 is being updated - before previous update had finished (up -> down) - setting to state=down - vhosts=100 Error: director(10.0.0.30:9090/left): Director 10.0.0.30 SYNC - request hosts don't match us - resending hosts (seq=6, remote - hosts_hash=262126213, my hosts_hash=2458934259) +2016-09-09 17:40:58 +0300 Timo Sirainen (67a0f9eec) -M src/director/director-connection.c + fts-squat: Fixed memory leak on corrupted uidlist handling -2016-10-24 21:58:03 +0300 Timo Sirainen (7322a8911) - director: If SYNCs are received during handshake, send them later. +M src/plugins/fts-squat/squat-uidlist.c - This fixes delays during handshake: Error: Ring SYNC appears to have got - lost, resending +2016-09-09 17:39:43 +0300 Timo Sirainen (262eeae35) -M src/director/director-connection.c -M src/director/director-host.h + dict-file: Don't leak a lock on temp file creation failure. -2016-10-24 20:21:36 +0300 Timo Sirainen (d4845ae45) - director: Code cleanup - Give tab-unescaped args to all doveadm command - handlers. +M src/lib-dict/dict-file.c +2016-09-09 17:36:39 +0300 Timo Sirainen (b804e2b17) -M src/director/doveadm-connection.c + lib-imap-urlauth: Don't access freed memory on errors. -2016-10-24 20:20:09 +0300 Timo Sirainen (9bf84e414) - director: USER-MOVE didn't handle non-hash username correctly. +M src/lib-imap-urlauth/imap-urlauth-connection.c - The entire command line was being hashed instead of just the username. +2016-09-13 07:22:03 +0300 Timo Sirainen (c46d97e6a) -M src/director/doveadm-connection.c + imap, pop3: Added rawlog_dir setting to store IMAP/POP3 traffic logs. -2016-10-24 20:16:57 +0300 Timo Sirainen (b7d3b04ef) + This at least partially replaces the "rawlog" post-login binary. For now the + "rawlog" binary supports some parameters, which aren't configurable for + rawlog_dir. - director: Make sure IP address parsing works in DIRECTOR-ADD/REMOVE +M src/imap/imap-client.c +M src/imap/imap-settings.c +M src/imap/imap-settings.h +M src/pop3/pop3-client.c +M src/pop3/pop3-settings.c +M src/pop3/pop3-settings.h - We were passing the entire string through to net_addr2ip(). It seems that - inet_aton() stops at whitespace though, so this wasn't actually causing - errors at least on Linux. +2016-09-12 16:22:24 -0400 Josef 'Jeff' Sipek (fdf3e1e28) -M src/director/doveadm-connection.c + configure: hardening logic is backwards -2016-10-24 20:08:54 +0300 Timo Sirainen (30a1cb875) + Before this change, the argument parsing was busted. The --help string only + compounded the incorrect behavior by suggesting that --disable-hardening + could take a yes/no argument. + + | before | after + ------------------------------+----------+-------- + | enable | enable + --enable-hardening | disable | enable + --enable-hardening=yes | disable | enable + --enable-hardening=no | enable | disable + --disable-hardening | enable | disable + --disable-hardening=yes | error | error + --disable-hardening=no | error | error - director: Code cleanup - moved command handling to its own function. +M configure.ac +M m4/cc_fortify.m4 +M m4/cc_pie.m4 +M m4/cc_stack_protector.m4 +M m4/ld_relro.m4 +2016-09-09 15:51:43 +0300 Aki Tuomi (2bc67190c) -M src/director/doveadm-connection.c + pop3-migration-plugin: Add to index after successful retry -2016-10-24 20:07:26 +0300 Timo Sirainen (4bc6ff052) + Also change return value to indicate that the hash has been assigned to + header. - director: Show in process title how many users are being moved. +M src/plugins/pop3-migration/pop3-migration-plugin.c +2016-09-12 09:47:26 +0300 Aki Tuomi (12f86e86d) -M src/director/director.c -M src/director/director.h -M src/director/main.c + doveconf: Hide any _api_key -2016-10-24 20:00:40 +0300 Timo Sirainen (4d0d0b9eb) - director: Code cleanup - Finish user move always in the same function. +M src/config/doveconf.c +2016-09-05 16:26:56 +0300 Phil Carmody (ea125b1c3) -M src/director/director.c + plugins: fts - replace i_assert under _expunge_log_subtract with warning + (API change) -2016-10-24 19:59:54 +0300 Timo Sirainen (b99248eb9) + The helper whose interface is changing currently has no other known clients + (there's little need for it to be exposed at all). - director: Call state_change_callback on user move timeout. + This should never happen, but if it does, just tally the number of times it + happened, and squirt out a warning message after the whole subtract. If it + happens at all, there's no reason not to expect a lot, so only warn once per + file. + In particular - do not assert crash when this is seen - it has been seen on + live test systems where file corruption seems to have occured. As this can + only be associated with corrupt fts indexes, seeing this error implies that + the whole FTS index should be rebuilt for that user. -M src/director/director.c -M src/director/director.h -M src/director/main.c + Signed-off-by: Phil Carmody -2016-10-21 12:50:56 +0300 Timo Sirainen (c98b47e54) +M src/plugins/fts/fts-expunge-log.c +M src/plugins/fts/fts-expunge-log.h - director: Code cleanup - allow commands handlers to stop processing input +2016-08-10 13:07:01 +0300 Aki Tuomi (bedb7f369) - Now returning 0 exits the input reading without disconnecting client. + lib-storage: Limit folder full name only -M src/director/doveadm-connection.c + Before we had limit of 16 levels and 255 bytes per name which is same as + 4096 bytes. Now we limit only the total length of the name to + MAILBOX_LIST_NAME_MAX_LENGTH. For compability reasons, we are restricting + individual component names to 255 characters. -2016-10-25 13:27:29 +0300 Aki Tuomi (a9b39bd30) +M src/lib-storage/mail-storage.c +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-list.c - lib-mail: Add tests for dec/hexdec encoded entities +2016-09-09 14:34:12 +0300 Timo Sirainen (7b9e289e4) + fs-metawrap: Fixed assert that checks we don't create empty files. -M src/lib-mail/test-mail-html2text.c + If the entire write failed, offset could be 0. -2016-10-25 12:48:23 +0300 Aki Tuomi (74fc4d6fa) +M src/lib-fs/fs-metawrap.c - lib-mail: Support decimal/hexadecimal encoded entities +2016-09-09 14:07:11 +0300 Timo Sirainen (8c81109dc) - Add support for &#nnn; and &#xnnn; entities. + lib-storage: Fixed accessing user as root when user has no uid. -M src/lib-mail/mail-html2text.c + This shouldn't normally be done, but might as well fix it. Fixes: -2016-10-25 10:29:50 +0300 Aki Tuomi (769240367) + Fatal: mail-storage-service: seteuid(4294967295) failed: Invalid argument - imap-login: Skip NIL value in ID handler +M src/lib-storage/mail-storage-service.c - NIL value can cause hard crash, depending what the key is. For x-proxy-ttl, - NIL will crash on any system, x-originating-ip will crash on some nss - versions (e.g. centos 6.7). +2016-09-09 10:38:10 +0300 Timo Sirainen (d3cc15f20) - Migitating factor here is that the NIL value is only accepted from trusted - network. + lib-test: Added missing va_end() call. -M src/imap-login/imap-login-client.c -2016-10-24 18:52:24 +0300 Timo Sirainen (3c692ac90) +M src/lib-test/test-common.c - lib-compression: Added unit tests for reading .gz files +2016-09-09 00:59:53 +0300 Timo Sirainen (2485e31c7) + lib-index: Fixed mail_index_modseq_get_next_log_offset() when accessing + .log.2 -M src/lib-compression/test-compression.c + file->sync_offset was set only after header, so sync_highest_modseq was also + same as initial_modseq. The previous code then just returned offset pointing + to sync_offset, which was too early. -2016-10-24 18:31:53 +0300 Timo Sirainen (4b55ea6c3) +M src/lib-index/mail-transaction-log-file.c - lib-compression: Added file uncompression support for test-compression +2016-09-08 23:54:22 +0300 Timo Sirainen (1ff03d224) - This can be useful for debugging. + lib-index: Make sure new dovecot.index.log files start tracking modseqs. -M src/lib-compression/test-compression.c + This will make mail_index_modseq_get_next_log_offset() work correctly even + if modseqs haven't been explicitly enabled. -2016-10-24 18:29:06 +0300 Timo Sirainen (446d84d4d) +M src/lib-index/mail-transaction-log-file.c - lib-compress: Don't assume too early that gz file continues after a trailer. +2016-08-23 22:36:08 +0300 Timo Sirainen (da8556f59) - Some istreams don't have EOF immediately set after the gz trailer. This - fixes errors like "missing gz trailer at 1675" + lib-storage: Code cleanup for mailbox_get_expunge*() -M src/lib-compression/istream-zlib.c + The previous code did actually work as well, but it wasn't very obvious that + it did. -2016-10-21 13:55:42 +0300 Aki Tuomi (60cc5afca) +M src/lib-storage/mailbox-get.c - doveadm: Rewind input early enough +2016-09-09 01:31:46 +0300 Timo Sirainen (f818f91a2) - Command input needs to be rewinded earlier in doveadm_mail_next_user. + imap: When hibernating, wait for old imap process to cleanup before creating + new ones. -M src/doveadm/doveadm-mail.c + This fixes stats errors: -2016-10-24 17:15:00 +0300 Timo Sirainen (bee600bb3) + stats: Error: FIFO input error: CONNECT: Duplicate session ID + Y7Q6E4U7xO1/AAAB for user testuser service imap stats: Warning: Couldn't + find session ID: Y7Q6E4U7xO1/AAAB - istream-zlib: "missing gz trailer" error message was wrong. +M src/imap-hibernate/imap-hibernate-client.c +M src/imap/imap-client-hibernate.c +2016-09-09 02:50:27 +0300 Timo Sirainen (bd7ae8952) -M src/lib-compression/istream-zlib.c + lib-fs: Moved fs_write_stream_abort_parent() to fs-api-private.h -2016-10-24 15:59:07 +0300 Timo Sirainen (5611e2339) + Only fs wrapper drivers are supposed to call it. - lib: With FILE_LOCK_SLOW_WARNING_MSECS log a warning also when keeping lock - for long. +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.h - This can help catching which process kept the lock for too long. +2016-09-09 02:48:45 +0300 Timo Sirainen (19126597f) -M src/lib/file-lock.c + fs-randomfail: Fixed assert-crash in fs_write_stream_abort_error() -2016-10-24 16:57:49 +0300 Timo Sirainen (71ceef4ac) - configure: Fixed checking if OpenSSL is too old for lib-dcrypt +M src/lib-fs/fs-randomfail.c - EVP_PKEY_CTX_set_ec_paramgen_curve_nid() is a macro, so it can't be checked - with AC_CHECK_LIB(). +2016-09-08 19:01:54 +0300 Martti Rannanjärvi (3c014db6f) -M configure.ac + lib-index: limit mail_index error prints to one per ioloop_time -2016-10-24 16:05:00 +0300 Timo Sirainen (cab3ca184) + This is to prevent log flooding. - lib: Fix compiler warnings in test-ioloop +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index.c - Fixes: test-ioloop.c:72: error: ignoring return value of ‘write’, declared - with attribute warn_unused_result +2016-09-09 03:05:39 +0300 Timo Sirainen (a20a8a9fc) -M src/lib/test-ioloop.c + lib-test: test_expect_errors() now works for the entire log string, not just + format parameter -2016-10-24 13:08:47 +0300 Timo Sirainen (940795053) - lib-http: Add ioloop and lock wait information to timeout messages. +M src/lib-test/test-common.c - It'll now log for example: 9007 Request timed out (Request sent 7.087 secs - ago, 0.076 in other ioloops, 7.012 in locks, connected 7.087 secs ago) +2016-09-09 01:42:50 +0300 Timo Sirainen (4b9355028) - Which points out that the problem wasn't really with the HTTP, but with - locking. This likely should be fixed in some way also in lib-http so that it - gives a bit of extra time for reading the request, but that's a separate - fix. + imap-hibernate: Increased imap-master communication timeout from 5s to 30s -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-request.c + Looks like 5s isn't enough in loaded environments. It's also not really a + problem if the timeout is large, it's just going to take a while longer to + restore the connection. When timeout is reached the client would just get + disconnected anyway. -2016-10-24 12:17:44 +0300 Timo Sirainen (240efa297) +M src/imap-hibernate/imap-master-connection.c - dict-client: Fix logging how much time was spent in other ioloops in slow - lookup warnings. +2016-09-09 01:08:59 +0300 Timo Sirainen (4fca0e305) - The warning's idea is to show why the lookup could have been slow. We - differentiate between time spent in dict_wait() waiting only for the dict - result and time spent in other ioloops waiting for potentially other things - as well (and time spent waiting for locks during this time). + stats: Include PIDs in "Duplicate session ID" errors. - The previous code didn't work right when multiple ioloops were used, which - happened sometimes. - Also changed %u to %d just in case some calculation is wrong. It's nicer to - get a slightly negative value rather than a huge positive one. +M src/stats/mail-session.c -M src/lib-dict/dict-client.c +2016-09-08 22:08:11 +0300 Timo Sirainen (85cce7cab) -2016-10-24 12:16:48 +0300 Timo Sirainen (ba356aeff) + lib-index: mail_index_modseq_get_next_log_offset() shouldn't return offset + beyond view's head - lib: Added ioloop_global_wait_usecs + This also allows removing the same workaround from dsync code. - This is helpful when multiple ioloops aren't used and - io_loop_get_wait_usecs() can't be easily used for all of them. +M src/doveadm/dsync/dsync-transaction-log-scan.c +M src/lib-index/mail-index-modseq.c -M src/lib/ioloop.c -M src/lib/ioloop.h +2016-09-08 23:00:56 +0300 Aki Tuomi (75771bd32) -2016-10-24 14:05:58 +0300 Timo Sirainen (62ce1acee) + imap-acl: acl plugin deinit returns 1 on non-empty - lib: Add FILE_LOCK_SLOW_WARNING_MSECS environment. - Log a warning if any locking takes longer than the specified number of - milliseconds. This can be enabled globally with: +M src/plugins/imap-acl/imap-acl-plugin.c - import_environment = $import_environment FILE_LOCK_SLOW_WARNING_MSECS=1000 +2016-09-08 22:59:58 +0300 Aki Tuomi (bbc7e2c2e) -M src/lib/file-dotlock.c -M src/lib/file-lock.c -M src/lib/file-lock.h + acl: Deinit will return 1 on non-empty -2016-10-24 13:28:44 +0300 Timo Sirainen (3f4795112) - lib-index: Fix potential error when reading from uncommitted cache - transaction +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-mailbox.c - If dovecot.index.cache is compressed during the transaction, the new cache - fields mapping doesn't necessarily match what is in the transaction. +2016-09-08 21:31:37 +0300 Timo Sirainen (e90d9eaa3) - Fixes: Error: Corrupted index cache file .../dovecot.index.cache: field - index too large (27 >= 17) + lib: Allow static analyzers to check for t_pop() leaks. - Although there may be other cache corruption errors it also fixes. + They should be able to detect the missing free() call from code paths + missing a t_pop(). -M src/lib-index/mail-cache-transaction.c +M src/lib/data-stack.c +M src/lib/data-stack.h +M src/lib/mempool-datastack.c -2016-10-24 12:25:48 +0300 Timo Sirainen (a07d6171a) +2016-09-08 21:31:25 +0300 Timo Sirainen (f2ed47f80) - lib-index: Fix potential assert-crash when reading cache + configure: Added --enable-static-checker parameter - Fixes: Panic: file mail-cache-lookup.c: line 258 - (mail_cache_lookup_iter_next): assertion failed: (ctx->offset != 0) - Broken by d33fc6c584718efd46159e1d8f46488b9dfc66f5 +M configure.ac -M src/lib-index/mail-cache-lookup.c +2016-09-07 11:52:00 +0300 Timo Sirainen (cd9cf45dc) -2016-10-24 12:23:49 +0300 Timo Sirainen (60ae7391c) + imap: Avoid wrongly assert-crashing in client_check_command_hangs() - master: If chrooted service's core wasn't dumped, suggest to unset the - chroot. + Fixes assert: + Panic: file imap-client.c: line 837 (client_check_command_hangs): assertion + failed: (client->io != NULL) -M src/master/service-process.c +M src/imap/imap-client.c -2016-10-24 11:34:05 +0300 Aki Tuomi (676e11491) +2016-09-08 20:23:35 +0300 Timo Sirainen (80943492e) - lib: Add test for ioloop fd polling + stats plugin: Don't send any stats before CONNECT was successfully sent. + After stats write failures this fixes warnings like: Warning: stats: + Couldn't find session ID: smqAXQE8pIp/AAAB -M src/lib/test-ioloop.c +M src/plugins/stats/mail-stats-connection.c +M src/plugins/stats/mail-stats-connection.h +M src/plugins/stats/stats-plugin.c +M src/plugins/stats/stats-plugin.h -2016-10-24 10:13:42 +0300 Aki Tuomi (0fe6b129c) +2016-09-08 20:18:46 +0300 Timo Sirainen (a94f1909a) - lib: Fix kqueue io_loop_get_wait_time usage + lib-stats: stats_connection_send() now returns whether it succeeded or not - The code needs to take into consideration, when there is no IO to be waited, - but possibly there is io_set_pending used, or just timeouts. -M src/lib/ioloop-kqueue.c +M src/lib-stats/stats-connection.c +M src/lib-stats/stats-connection.h -2016-10-24 10:08:42 +0300 Aki Tuomi (4397b2421) +2016-09-08 16:50:02 +0300 Timo Sirainen (af2cc755b) - lib: Ensure tv_r gets set in io_loop_get_wait_time + doveadm flags: Sync mailbox after committing transaction. - If this does not get reset here to 0 it can cause errors or unpredictable - behaviour in select/kqueue polling, such as very long delays. -M src/lib/ioloop.c +M src/doveadm/doveadm-mail-flags.c -2016-10-22 22:45:48 +0300 Timo Sirainen (0b94b5ac4) +2016-09-07 16:45:09 +0300 Aki Tuomi (c7f6992db) - director: Fix crash handling director_flush_socket when user is freed. + acl-plugin: Adjust to API changes -M src/director/director.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/acl/acl-mailbox.c +M src/plugins/imap-acl/imap-acl-plugin.c -2016-10-13 16:11:48 +0300 Aki Tuomi (a64e49f98) +2016-09-07 22:06:55 +0300 Aki Tuomi (a4804621e) - director: Support flush socket + lmtp: Always read settings before dropping privs - This allows specifying an URI to execute on user kill. It can be of form - exec:/path/to/bin, unix:/path/to/socket or tcp:ip:port + If lmtp is ran explicitly as root, settings were not read. - The location is sent FLUSH username-hash per killed user. You can execute - some action there, and you are expected to return '+\nOK\n' as reply once - you are done. +M src/lmtp/main.c -M src/director/Makefile.am -M src/director/director-settings.c -M src/director/director-settings.h -M src/director/director.c +2016-09-07 22:00:14 +0300 Timo Sirainen (82b3d02b7) -2016-10-22 12:58:40 +0300 Timo Sirainen (d6c1b8c4c) + imap: Fixed assert-crash if un-hibernation failed to initialize user. - configure: Improved checking if OpenSSL is too old for lib-dcrypt + master_service_client_connection_destroyed() was also being called in + imap_master_client_destroy() so it was done twice. - Some OpenSSL versions had EC_KEY_new, but not other needed functions. + Fixes: Panic: file master-service.c: line 775 + (master_service_client_connection_destroyed): assertion failed: + (service->total_available_count > 0) -M configure.ac +M src/imap/imap-master-client.c -2016-10-21 14:34:51 +0300 Aki Tuomi (85e2e5645) +2016-09-05 12:42:08 +0300 Aki Tuomi (fdef08644) - lib-program-client: Add URI based constructor + fs-api: Retrieve errno before dest->copy_output is NULL'ed + CID 10144: When aborting output, errno retrieval is attempted after + dest->copy_output has already been unreffed. Found by coverity. -M src/lib-program-client/program-client.c -M src/lib-program-client/program-client.h +M src/lib-fs/fs-api.c -2016-10-20 22:59:10 +0300 Timo Sirainen (9896dde16) +2016-09-03 15:26:39 +0300 Aki Tuomi (b607b432d) - dovecot.m4: Added DOVECOT_BINARY_LDFLAGS for future compatibility + acl-plugin: Whitespace fixes - Mainly to keep the serial number the same in v2.2 and v2.3 tree. -M dovecot.m4 +M src/plugins/acl/acl-api.c +M src/plugins/acl/acl-api.h +M src/plugins/acl/acl-attributes.c -2016-10-20 14:23:20 +0300 Timo Sirainen (d10043f6f) +2016-09-03 15:23:11 +0300 Aki Tuomi (5f63ee5a9) - dovecot-config: Added dovecot_statedir + acl-plugin: Deinit acl_iter on deinit too -M Makefile.am -M dovecot-config.in.in -M dovecot.m4 +M src/plugins/acl/acl-attributes.c -2016-08-08 13:12:15 +0300 Timo Sirainen (7adf84cd0) +2016-09-03 13:14:29 +0300 Aki Tuomi (37c72fa0c) - Moved cc-wrapper.sh handling to dovecot.m4 + acl-plugin: Make iterators more conforming - When configuring Dovecot --without-shared-libs and pointing external plugins - to uninstalled sources --with-dovecot, any binaries complied for plugins - weren't using cc-wrapper.sh, which could have caused runtime failures when - they attempted to load plugins dynamically. Now it's possible to add - DC_CC_WRAPPER to plugins' configure.ac to build with the cc-wrapper.sh. + The *_next functions return true/false, deinit will report errors and end + result. -M Makefile.am -D cc-wrapper.sh.in -M configure.ac -M dovecot.m4 +M src/plugins/acl/acl-api-private.h +M src/plugins/acl/acl-api.c +M src/plugins/acl/acl-api.h +M src/plugins/acl/acl-attributes.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-backend-vfile.h +M src/plugins/acl/doveadm-acl.c -2016-07-14 20:53:46 +0200 Stephan Bosch (e4a48fe67) +2016-09-06 09:24:06 +0300 Aki Tuomi (ae5330824) - Added LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE to dovecot.m4. + lib-storage: Check that UID is set before caching -M dovecot.m4 +M src/lib-storage/index/index-mail-binary.c -2016-10-20 12:24:44 +0300 Timo Sirainen (406dfb5c6) +2016-09-06 09:23:54 +0300 Aki Tuomi (4269461e3) - pop3: Fix pop3_logout_format=%{deleted_size} expansion when there are no - deletions + lib-imap-storage: Check that UID is assigned before caching - Should be "0", not empty string. -M src/pop3/pop3-client.c +M src/lib-imap-storage/imap-msgpart.c -2016-10-20 12:06:25 +0300 Timo Sirainen (ada6d5fe1) +2016-09-05 15:56:05 +0300 Aki Tuomi (741287129) - %{auth_domain} shouldn't include the leading '@' + zlib-plugin: Check that UID is assigned + When caching, code has to check whether UID is assigned to avoid reusing + cache for different email since they all have UID = 0 before they are + actually committed. -M src/imap-hibernate/imap-client.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-user.c +M src/plugins/zlib/zlib-plugin.c -2016-10-20 18:31:27 +0300 Timo Sirainen (d3489519a) +2016-09-06 16:17:13 +0300 Aki Tuomi (9d3f82fe6) - lib-ldap: Fixed compiling with OpenBSD + quota: Flush quota after recalc + Correctly fix issue where the dict commit is left unfinished. -M src/lib-ldap/ldap-search.c +M src/plugins/quota/doveadm-quota.c -2016-10-20 16:30:49 +0300 Aki Tuomi (d24a5ebd6) +2016-09-06 02:56:39 +0300 Timo Sirainen (8a2f21f2b) - auth: Escape local_name + lib-dcrypt: Avoid infinite loop if istream header is too large. + We'll return an error now instead. We can't just return -2 here, because + nothing was actually being returned to the caller. Attempting to do that + would just trigger an assert: -M src/auth/auth-request.c -M src/lib-auth/auth-client-request.c + Panic: file istream.c: line 182 (i_stream_read): assertion failed: + (_stream->skip != _stream->pos) -2016-10-20 16:06:27 +0300 Aki Tuomi (d80ade0ca) +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/test-stream.c - login-common: Include local_name in login_var_expand_table +2016-09-05 11:21:30 +0300 Ville Savolainen (9913ea5ea) - This way it can be used in login_log_format + dovecot.service.in: removed ExecStartPre and ExecStopPost default + definitions -M src/login-common/client-common.c + Additional definitions currently added to dovecot.service.d/ by packaging -2016-10-20 15:46:01 +0200 Stephan Bosch (18a85e214) +M dovecot.service.in - lib-program-client: Fixed boolean expressions. +2016-08-25 12:27:51 +0300 Aki Tuomi (7d0d1c561) - Problems found with clang -Wstrict-bool. + dcrypt: Test for stream prefetch -M src/lib-program-client/program-client-local.c -2016-10-20 16:30:58 +0300 Timo Sirainen (3459db0f8) +M src/lib-dcrypt/test-stream.c - auth: Fixed assert-crash on invalid auth-client input +2016-08-25 12:26:55 +0300 Aki Tuomi (4b4e8dcad) - For example if client sends invalid input like: auth: Error: BUG: - Authentication client sent unknown command: XYZ + dcrypt: Allow stream prefetch - Fixes crash: auth: Panic: key not found from hash + We might get stream that has already been buffered, so we must try read it + in case buffer is full. -M src/auth/auth-request-handler.c +M src/lib-dcrypt/istream-decrypt.c -2016-10-20 13:30:36 +0300 Timo Sirainen (6516a7482) +2016-09-01 08:41:28 +0300 Timo Sirainen (32c3ba3ba) - Added "doveadm process status" + lib: If DEBUG is enabled, use a pointer type for data_stack_frame_t - This allows asking for processes' current status in master process. + This allows telling static analyzers to treat t_push() and t_pop() similarly + to malloc()/free() and check for leaks. -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-master.c -M src/master/master-client.c +M src/lib/data-stack.c +M src/lib/data-stack.h -2016-10-20 13:12:34 +0300 Timo Sirainen (7c4cbc92c) +2016-09-01 08:24:19 +0300 Timo Sirainen (3c5ee5132) - Added "doveadm service status" + lib: Changed t_pop() API to make it a bit more like free() - This allows asking for services' current status in master process. -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-master.c -M src/master/master-client.c +M src/lib-master/master-service.c +M src/lib-test/test-common.c +M src/lib/data-stack.c +M src/lib/data-stack.h +M src/lib/ioloop.c +M src/lib/test-data-stack.c -2016-10-20 13:22:47 +0300 Timo Sirainen (02db66794) +2016-09-01 08:34:22 +0300 Timo Sirainen (28bf8f762) - doveadm-master: Code cleanup - simplify sending command args to master. + lib-master: master_service_init_finish() now verifies that t_pop() wasn't + leaked - This also escapes the parameters to make sure nothing bad can be sent. -M src/doveadm/doveadm-master.c +M src/lib-master/master-service-private.h +M src/lib-master/master-service.c -2016-10-20 13:11:19 +0300 Timo Sirainen (bcab4a375) +2016-09-01 08:31:14 +0300 Timo Sirainen (e2588872c) - doveadm service stop: Convert to doveadm v2 API + lib: Created data_stack_frame_t type for data_stack_frame -M src/doveadm/doveadm-master.c +M src/lib/data-stack.c +M src/lib/data-stack.h +M src/lib/ioloop.c +M src/lib/mempool-datastack.c +M src/lib/test-data-stack.c -2016-10-20 13:10:56 +0300 Timo Sirainen (ae1884edc) +2016-08-31 19:13:36 -1000 Timo Sirainen (7bc9e4a3b) - doveadm service stop: Code cleanup - Prepare for other service commands. + lib: Small code cleanup to data-stack - use explicit data_stack_initialized + This will make it easier to change data_stack_frame's type. -M src/doveadm/doveadm-master.c +M src/lib/data-stack.c -2016-10-20 13:09:09 +0300 Timo Sirainen (7fa3afc28) +2016-08-31 19:11:46 -1000 Timo Sirainen (8cf55b1c0) - doveadm service stop: Moved command handling to doveadm-master.c + lib: Minor t_push() optimization - use unlikely() - It's talking to master process, and there will be other non-service commands - that talk to the master process in the same way. -M src/doveadm/Makefile.am -M src/doveadm/doveadm-master.c -D src/doveadm/doveadm-service.c +M src/lib/data-stack.c -2016-10-11 12:43:20 +0300 Timo Sirainen (bc185e318) +2016-08-29 00:03:54 +0200 Stephan Bosch (79fe1b28d) - doveadm user: If lookup fails, don't write it to the same line as header. + lib: var-expand: Removed var_expand_table_build(). + Replaced it with explicit table construction at the one place it was used. + Clang -Wvargargs complained about passing a char argument to va_start(). -M src/doveadm/doveadm-auth.c +M src/auth/userdb-vpopmail.c +M src/lib/var-expand.c +M src/lib/var-expand.h -2016-10-19 21:49:30 +0300 Timo Sirainen (cbff70d55) +2016-08-31 20:14:41 +0300 Phil Carmody (14cac26dc) - doveadm-server: Show incoming connection's IP and running command is process - title. + Fix control flow and T_BEGIN/T_END hygiene + You mustn't goto, break, continue, or return from out of a T_BEGIN {...} + T_END block, as that will lose a t_pop(). This has been seen in the wild: + Panic: Leaked t_pop() call -M src/doveadm/client-connection-http.c -M src/doveadm/client-connection-private.h -M src/doveadm/client-connection.c -M src/doveadm/client-connection.h -M src/doveadm/doveadm.h -M src/doveadm/main.c + Signed-off-by: Phil Carmody -2016-10-18 00:37:32 +0300 Aki Tuomi (588e91edf) +M src/director/login-connection.c +M src/lib/file-lock.c - auth: Pass local_name to auth-request +2016-08-31 09:20:49 +0300 Aki Tuomi (b8f4e3aa5) - This allows using local_name in various places, such as passdb/userdb - queries. + lib-fs: Do not abort parent of parent -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/lib-auth/auth-client-request.c -M src/lib-auth/auth-client.h -M src/login-common/client-common.h -M src/login-common/login-settings.c -M src/login-common/sasl-server.c -M src/login-common/ssl-proxy-openssl.c -2016-10-20 10:11:53 +0300 Timo Sirainen (3a3c7835b) +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-wrapper.c +M src/plugins/fs-compress/fs-compress.c - login proxy: Hanging outgoing SSL connections caused using already-freed - memory +2016-08-29 10:40:24 +0200 Stephan Bosch (abf999f62) - This mainly happened when login proxy closed the connection due to connect - timeout. The ssl-proxy still had a reference and existed for a longer time. - If SSL handshake still succeeded afterwards, it now called - login_proxy_ssl_handshaked(), which accessed the already-freed proxy and - likely crashed. + configure.ac: Forgot to invoke DOVECOT_WANT_VPOPMAIL. - Fixed the ssl-client proxy code specifically. Alternatively ssl_proxy_free() - could be calling ssl_proxy_destroy() always, but since ssl-server side of - the code seems to have been working fine, I don't want to accidentally break - it. + It was thereby impossible to enable Vpopmail support. -M src/login-common/login-proxy.c +M configure.ac -2016-10-19 21:03:24 +0300 Aki Tuomi (fdcd289cc) +2016-08-28 18:40:01 +0300 Aki Tuomi (05069f025) - lib-program-client: Correctly handle error code + doveadm-server: Reset error code between calls -M src/lib-program-client/program-client-remote.c +M src/doveadm/client-connection.c -2016-10-19 20:40:22 +0300 Aki Tuomi (33e297cf3) +2016-08-28 19:55:29 +0300 Aki Tuomi (7bde80dd0) - lib: Copy target_uid from restrict_access_settings + stats: Reset nearly all global mail stats - One cannot assign to set->uid, causing compile error. + We leave num_connected_sessions alone. -M src/lib/restrict-access.c +M src/stats/client-reset.c -2016-10-19 19:02:22 +0300 Aki Tuomi (13cb1cfd7) +2016-08-28 19:14:08 +0300 Aki Tuomi (f4203c92a) - lib-program-client: Try drop setuid root by default + stats: Fix user login counters - But not if root privileges are asked for. + Before we would count all users twice, because the same counters would get + increment in both CONNECT and ADD-USER. Now we do not increment them at all + on ADD-USER. -M src/lib-program-client/program-client-local.c +M src/stats/mail-domain.c +M src/stats/mail-session.c +M src/stats/mail-user.c -2016-10-19 18:44:35 +0300 Aki Tuomi (eda95c8ee) +2016-08-28 17:00:30 +0200 Stephan Bosch (9a4542801) - lib: Add drop_setuid_root for restrict_access + auth: GSSAPI mechanism: Fix CLang -Wstrict-bool warnings. - drop_setuid_root, when set to true, will detect and try to drop getuid()==0. - This is done by recovering current effective UID to set->uid if set->uid == - -1, and then doing seteuid(0). It will also drop out any other extra - privileges, such as extra groups not requested for. + The GSS_ERROR() macro yields an integer rather than an actual bool value. + The krb5_kuserok() function returns a krb_boolean type, which is unsigned + int rather than a bool. -M src/lib/restrict-access.c -M src/lib/restrict-access.h +M src/auth/mech-gssapi.c -2016-10-12 14:57:51 -0400 Josef 'Jeff' Sipek (de4ac43c3) +2016-08-24 03:56:44 -0400 Josef 'Jeff' Sipek (85b4143f0) - lib-storage: clean up mailbox_list_create to improve readability + lib-master: don't leak config path - There is no reason to use mailbox_list_driver_find() here instead of - mailbox_list_find_class() as (1) we do not need the index into the list - driver array, and (2) dealing with double-pointers is harder than regular - pointers. + The config path can already be non-NULL thanks to the default config path + code or the CONFIG_PATH environmental variable. -M src/lib-storage/mailbox-list.c +M src/lib-master/master-service.c -2016-04-22 22:44:01 +0300 Timo Sirainen (28f8fb717) +2016-08-23 23:31:40 +0300 Aki Tuomi (1d8622b44) - .gitignore: Updated to include auto-added m4/* + lib-fs: abort parent in fs_file_write_stream_abort_parent -M .gitignore +M src/lib-fs/fs-api.c -2016-10-19 19:41:51 +0300 Timo Sirainen (67e75543f) +2016-08-23 13:06:09 +0300 Timo Sirainen (9ac30c648) - push-notification: Error handling fix and cleanups. + imap: Track how much time was spent on waiting for locks. -M src/plugins/push-notification/push-notification-driver-ox.c +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-commands.c -2016-10-19 18:25:15 +0300 Timo Sirainen (ace297d8b) +2016-08-23 12:55:24 +0300 Timo Sirainen (9578698c4) - dovecot-ldap.conf.ext: Updated sasl_bind comment. + dict-client: In slow query warnings, log time spent in ioloop and lock + waits. + Possibly we want to remove the warnings entirely if most of the time has + been spent on lock waits (or alternatively: not spent in ioloop). -M doc/example-config/dovecot-ldap.conf.ext +M src/lib-dict/dict-client.c -2016-10-19 16:31:01 +0300 Aki Tuomi (ddc396020) +2016-08-23 12:48:21 +0300 Timo Sirainen (4a7e04d32) - lib-program-client: Fix memory access problem + lib: Track how much time has been spent on waiting for locks. -M src/lib-program-client/program-client.c +M src/lib/file-dotlock.c +M src/lib/file-lock.c +M src/lib/file-lock.h -2016-10-19 16:24:56 +0300 Aki Tuomi (4cf10a8b0) +2016-08-23 20:12:47 +0300 Aki Tuomi (16161da67) - lib-program-client: Backport test-program-client-unix + lib-fts: Add missing include -M src/lib-program-client/test-program-client-remote.c +M src/lib-fts/fts-filter-common.c -2016-10-19 16:06:22 +0300 Aki Tuomi (d7b1c76ea) +2016-08-23 14:08:11 +0300 Timo Sirainen (18efe7985) - lib-program-client: Fix local tests + imap: Fixed expunge handling when un-hiberanting + Fixes these errors: -M src/lib-program-client/Makefile.am -M src/lib-program-client/test-program-client-local.c + Failed to import client state: Message count mismatch after handling + expunges Message UIDs CRC32 mismatch -2016-10-17 14:19:40 +0300 Aki Tuomi (7842be89d) +M src/imap/imap-state.c - lib-program-client: Disable valgrind +2016-08-16 14:07:14 +0300 Timo Sirainen (97e511960) - For local test, we can't use valgrind, it's too unreliable (breaks execution - sometimes). + lib: Changed unlink_directory() API to return error string. -M src/lib-program-client/Makefile.am + There are many different reasons why it could fail, which a simple errno + can't very clearly indicate. -2016-10-17 09:46:22 +0300 Aki Tuomi (e39f1f404) +M src/lib-storage/list/mailbox-list-delete.c +M src/lib-storage/list/mailbox-list-delete.h +M src/lib-storage/list/mailbox-list-index-backend.c +M src/lib-storage/list/mailbox-list-maildir-iter.c +M src/lib/unlink-directory.c +M src/lib/unlink-directory.h +M src/plugins/fts-lucene/lucene-wrapper.cc - lib-program-client: Move version string to define +2016-08-19 13:15:09 +0300 Timo Sirainen (5965eaa2d) + global: Added uchar_empty_ptr and use it instead of &uchar_nul. -M src/lib-program-client/program-client-remote.c + This makes Coverity happier about not treating a char as an array. For now + this is a pointer to a 0, but could as well become a pointer that crashes if + dereferenced. Shouldn't be NULL anyway because clang's + -fsanitize=nonnull-attribute will complain about them. -2016-10-17 09:35:14 +0300 Aki Tuomi (11d5906da) +M src/auth/auth-master-connection.c +M src/auth/auth-request-handler.c +M src/auth/auth-request.c +M src/auth/mech.c +M src/auth/userdb-static.c +M src/lib-imap/imap-parser.c +M src/lib-sasl/mech-login.c +M src/lib/istream.c +M src/lib/strfuncs.c +M src/lib/strfuncs.h - lib-program-client: Add switch_ioloop vfunc +2016-08-23 13:41:38 +0300 Timo Sirainen (72e25ec1e) - This lets program-client backends do their own special io loop switching. + lib-fs: Fixes to previous fs_write_stream_abort*() changes. -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client-remote.c -M src/lib-program-client/program-client.c -2016-10-15 13:59:45 +0300 Aki Tuomi (c1b5185df) +M src/lib-fs/fs-api.c +M src/lib-fs/fs-randomfail.c - lib-program-client: Use milliseconds in idle timeout +2016-08-23 13:40:50 +0300 Timo Sirainen (2d349bb70) + lib-storage: Fixed istream-attachment-extractor error handling. -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client.c -M src/lib-program-client/program-client.h -M src/lib-program-client/test-program-client-local.c -M src/lib-program-client/test-program-client-remote.c -2016-10-17 09:09:23 +0300 Aki Tuomi (6d1ea5284) +M src/lib-storage/index/index-attachment.c - lib-program-client: Use child-wait +2016-08-23 13:40:35 +0300 Timo Sirainen (d3aecee1e) - This makes the client waiting asynchronous. + lib-mail: Clarify istream-attachment-extractor's error handling API usage. -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client.c -2016-10-17 09:11:38 +0300 Aki Tuomi (444f4d846) +M src/lib-mail/istream-attachment-extractor.h - lib-program-client: Disconnect asynchronously +2016-08-22 09:42:26 +0300 Aki Tuomi (0c1f91164) + lib-fs: Add fs_write_stream_abort_parent and use it -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client-remote.c -M src/lib-program-client/program-client.c + Will do all the things abort_error does, but leaves error untouched. You are + expected to set one yourself. -2016-10-12 13:14:03 +0300 Aki Tuomi (d568bab9d) +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-wrapper.c +M src/plugins/fs-compress/fs-compress.c - lib-program-client: Use restrict-access +2016-08-19 18:57:23 +0300 Aki Tuomi (6d035effc) - This makes the program-client execution behave more consistent to the rest - of the core code. + lib-fs: Remove fs_write_stream_abort -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client.h -M src/lib-program-client/test-program-client-local.c -M src/lib-program-client/test-program-client-remote.c + Do not use fs_write_stream_abort anymore, instead use + fs_write_stream_abort_error to provide upstream some reason when it's used. -2016-10-13 10:11:52 +0300 Aki Tuomi (338bc725b) +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test-async.c - lib: Add reference counting to child_wait_pid +2016-08-19 16:00:30 +0300 Aki Tuomi (be6fab2b1) + fs-api: Add and use fs_write_stream_abort_error -M src/lib/child-wait.c + This lets caller to specify error instead of setting it with fs_error. Doing + it like this lets us percolate the error upwards. -2016-10-17 12:34:36 +0300 Timo Sirainen (d8c5d6f4e) +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-wrapper.c +M src/lib-storage/index/index-attachment.c +M src/plugins/fs-compress/fs-compress.c - lib-storage: Make sure mailbox_uidvalidity_next() doesn't return 0. +2016-08-23 10:53:28 +0300 Timo Sirainen (1cc5027b9) - 0 isn't a valid IMAP UIDVALIDITY, and Dovecot treats 0 as "not assigned". + lib-storage: Added mailbox_recent_flags_expunge_uid() -M src/lib-storage/mailbox-uidvalidity.c + For storage backends where it's useful. -2016-10-17 21:03:51 +0300 Martti Rannanjärvi (814650377) +M src/lib-storage/mailbox-recent-flags.c +M src/lib-storage/mailbox-recent-flags.h - lib-dcrypt: add a test for password change +2016-08-22 23:41:05 +0300 Teemu Huovila (35eb3a239) - Test that you can encrypt a key with password, encrypt a key with the - password protected key, change the password, and still load a key that you - encrypted with the key encrypted using the first password. + lib-fts: Change normalizer filter to use new truncate. -M src/lib-dcrypt/test-crypto.c -2016-10-18 14:57:31 +0300 Martti Rannanjärvi (19fe8753f) +M src/lib-fts/fts-filter-normalizer-icu.c +M src/lib-fts/test-fts-filter.c - doveadm: trim doveadm dump dcrypt-key input +2016-08-21 22:12:33 +0300 Teemu Huovila (5fcd30add) - dcrypt does not like extra newlines at the end of a key. + lib-fts: Cut overlong strings in lowercase filter. -M src/doveadm/doveadm-dump-dcrypt-key.c + Added new common truncate function for filters. It also removes any partial + characters, that would remain from plain truncation. -2016-10-17 09:34:04 +0200 Steffen Templin (78cd02d1c) +M src/lib-fts/Makefile.am +A src/lib-fts/fts-filter-common.c +A src/lib-fts/fts-filter-common.h +M src/lib-fts/fts-filter-lowercase.c +M src/lib-fts/test-fts-filter.c - push-notification: Resolve indentation problem +2016-08-17 16:47:19 +0300 Teemu Huovila (a754c3be2) + lib-fts: Add max_length to common filter struct. Reorder fields. -M src/plugins/push-notification/push-notification-driver-ox.c + The latter is for for imaginary alignment enhancements. -2016-10-06 07:35:17 +0000 Steffen Templin (35aba69ff) +M src/lib-fts/fts-filter-private.h - push-notification: Re-open mailbox and sync it to get unseen count. +2016-08-22 16:13:32 +0300 Timo Sirainen (69b8187b2) + fs-metawrap: Added assert to make sure we don't create empty files. -M src/plugins/push-notification/push-notification-driver-ox.c + It seems like this could be happening in some situation. -2016-10-05 13:28:49 +0300 Steffen Templin (3a23ef7ad) +M src/lib-fs/fs-metawrap.c - push-notification: Add unseen count to OX driver. +2016-08-19 14:47:33 +0300 Aki Tuomi (3764f786a) + quota-dict: Make sure all transactions complete -M src/plugins/push-notification/push-notification-driver-ox.c -2016-10-10 20:38:31 +0300 Timo Sirainen (6a44e1eee) +M src/plugins/quota/quota-dict.c - global: Handle broken Content-Type headers consistently. +2016-08-18 13:37:28 +0300 Aki Tuomi (563c1e3b4) - 1) Only the first Content-Type header is used. (Simpler than using the - last.) + systemd.service: Add required attributes - 2) Invalid Content-Types are parsed as far as we can. This is mainly to make - sure they aren't treated as missing Content-Types, which could cause them to - become text/plain. -M src/lib-mail/istream-attachment-extractor.c -M src/lib-mail/message-decoder.c -M src/lib-mail/message-parser.c -M src/lib-mail/message-search.c -M src/plugins/fts/fts-build-mail.c +M dovecot.service.in -2016-10-10 20:24:41 +0300 Timo Sirainen (c0c6115e0) +2016-08-18 14:48:50 +0300 Aki Tuomi (7424d35ff) - lib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for - now. + pop3: Fix deleted_count expansion - Maybe we can enable it some day far into the future, but for now this just - causes unnecessary cache file rebuilds. -M src/lib-imap/imap-bodystructure.c +M src/pop3/pop3-client.c -2016-10-10 20:23:47 +0300 Timo Sirainen (ad485aeb1) +2016-08-08 18:14:07 +0300 Phil Carmody (f946ee981) - lib-imap: Don't write a broken Content-Type as text/plain to BODYSTRUCTURE + lib: test-json-tree - decouple from internals - Mainly because it doesn't match with MESSAGE_PART_FLAG_TEXT in message_part. + Use the new helper functions, so that implementation can change without + needing to change the tests. -M src/lib-imap/imap-bodystructure.c + Patch best viewed with git diff/show --color-words. -2016-10-15 23:04:35 +0300 Aki Tuomi (72d1b1675) + Signed-off-by: Phil Carmody - config: Compare local_name case insensitive +M src/lib/test-json-tree.c - DNS and certificate names should be compared case insensitive. +2016-06-22 11:17:09 +0300 Phil Carmody (fcd3d6214) -M src/config/config-filter.c + lib: json-tree - API change to permit more featureful implementation -2016-10-17 23:25:27 +0300 Aki Tuomi (8e104e2bc) + Provide accessors for the innards of the tree's nodes, so that the node + internals can be changed freely (needed for DAPI). Constify params where + sensible. - lib: Add null_strcasecmp + NOTE: this enforced const-correctness may *break* (cause a failure to build) + some clients that didn't use const where they could have. Only obox2 is + known to break. + Add sibling functions with more parameters to expand the range of + functionality, and inline rewire the old simple functions to call the more + generic ones. -M src/lib/strfuncs.c -M src/lib/strfuncs.h + Signed-off-by: Phil Carmody -2016-10-17 19:38:07 +0300 Aki Tuomi (d88f6e11c) +M src/lib/json-tree.c +M src/lib/json-tree.h +M src/lib/test-json-tree.c - auth-policy: Use request's pool instead of new pool +2016-08-18 11:22:09 +0300 Timo Sirainen (6b2b18f8b) - This fixes existing memory leak in auth_report, which is caused by using - separate memory pool instead of request's pool. + lmtp: Support %{userdb:*} variables in mail_log_prefix - Thank you for Andrea Carpani for extensive debugging. -M src/auth/auth-policy.c +M src/lmtp/commands.c -2016-10-16 22:58:07 +0300 Timo Sirainen (df6bf0202) +2016-08-15 23:43:33 +0300 Timo Sirainen (8f7e81b32) - dict-sql: Use LIMIT in SQL queries with dict_iterate_set_limit() + quota, last-login: Disable "slow dict commit" warnings + Anything (especially long lock waits) can happen between the commit and when + we read their replies. -M src/lib-dict/dict-sql.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/quota/quota-dict.c -2016-10-16 22:40:18 +0300 Timo Sirainen (1b69afd91) +2016-08-15 23:40:59 +0300 Timo Sirainen (aef407f14) - lib-dict: Added dict_iterate_set_limit() + lib-dict: Added dict_transaction_no_slowness_warning() +M src/lib-dict/dict-client.c M src/lib-dict/dict-private.h M src/lib-dict/dict.c M src/lib-dict/dict.h -2016-10-17 19:21:34 +0300 Aki Tuomi (d97dad4bb) +2016-08-15 23:36:13 +0300 Timo Sirainen (56558eb46) - lib-dict: Duplicate result value in mempool - - Duplicate the result value already in callback to avoid it getting lost - during async calls. + dict-client: Keep transaction's pointer in command until it's finished. - Reported & tested by Pierre Jaury. M src/lib-dict/dict-client.c -2016-10-18 10:45:05 +0300 Timo Sirainen (335e2460e) - - lib-fs: Fixed fs_metadata_find() to actually work - - -M src/lib-fs/fs-api.c - -2016-10-17 23:06:48 +0300 Timo Sirainen (da00d765f) +2016-08-15 23:16:03 +0300 Timo Sirainen (5d234d36b) - lib-mail: Fixed infinite loop in istream-attachment-extractor - - Broken by 7f74811b7. Pretty much any larger attachment going through this - istream had a good potential of going into an infinite loop. + dict-client: Improve "slow dict operation" warnings in error conditions. -M src/lib-mail/istream-attachment-extractor.c + There's no need to log both an error and a warning. -2016-10-17 10:59:34 +0300 Timo Sirainen (a8dca04db) +M src/lib-dict/dict-client.c - lib-fs: Added FS_METADATA_WRITE_FNAME to allow renaming a file being - written. +2016-08-17 17:57:16 +0300 Martti Rannanjärvi (31bed8d0d) + imap-hibernate: fix input_pending check in client_unhibernate_cmp -M src/lib-fs/fs-api.h -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-posix.c + Check c2->input_pending instead of c1->input_pending when calculating + comparison value for c2. -2016-10-11 01:04:39 +0300 Timo Sirainen (e11fd3241) +M src/imap-hibernate/imap-client.c - lib-fs: Added internal fs_metadata_find() helper function +2016-08-17 17:20:21 +0300 Timo Sirainen (a84b413ef) + lib-dcrypt: Fixed accessing out-of-bounds data in istream. -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c + Also some small cleanups to make it clearer what's actually happening. -2016-10-11 00:46:59 +0300 Timo Sirainen (c4fc98427) +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/ostream-encrypt.c - lib-fs: Optimize changing FS_METADATA_INTERNAL_PREFIX metadata. +2016-08-17 16:25:12 +0300 Timo Sirainen (b99357fa1) - file->metadata_changed doesn't need to change in that situation. It's used - by fs-metawrap to find out if it needs to rewrite metadata during a write, - but internal metadata isn't written to its header. + lib-dcrypt: Fixed partial reads in header and limit header's max size. -M src/lib-fs/fs-api.c + Also fixes test-stream to actually test nonblocking reads correctly. -2016-10-17 12:41:33 +0300 Timo Sirainen (f6c5b41f9) +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/test-stream.c - sdbox: Removed duplicated code. +2016-08-16 14:49:35 +0300 Aki Tuomi (ca74790a7) + fts-squat: Ensure child is not NULL -M src/lib-storage/index/dbox-single/sdbox-storage.c + Makes static analysers happy -2016-10-17 10:36:17 +0300 Martti Rannanjärvi (84a75fabd) +M src/plugins/fts-squat/squat-trie.c - lib-dcrypt: change unit test ec curve to secp521r1 +2016-08-16 14:47:35 +0300 Aki Tuomi (25b183ad2) - This curve is more common, so unit tests will pass on more machines. + lib-master: Check for NULL in input/output -M src/lib-dcrypt/test-crypto.c + Makes static analysers happy -2016-10-17 09:13:39 +0300 Timo Sirainen (8b28c54be) +M src/lib-master/master-login-auth.c - lib-fs: Lazily initialize timings to save memory. +2016-08-16 14:46:08 +0300 Aki Tuomi (4ad29d683) + auth: Ensure username can't be left unset in APOP -M src/lib-fs/fs-api.c + Makes static analysers happy -2016-10-14 17:13:23 +0300 Aki Tuomi (3f86b9461) +M src/auth/mech-apop.c - lib-storage: Use MAILDIR_INFO_SEP_S +2016-08-16 14:42:41 +0300 Aki Tuomi (cfdcfc824) - Replace hardcoded : with MAILDIR_INFO_SEP_S + imapc: Make sure imail.stream is not NULL -M src/lib-storage/index/maildir/maildir-sync-index.c -M src/lib-storage/index/maildir/maildir-uidlist.c + Makes static analysers happy -2016-10-14 15:28:32 +0300 Aki Tuomi (54b9c8398) +M src/lib-storage/index/imapc/imapc-mail.c - lib-dcrypt: Fix uninitialized memory +2016-08-16 14:39:37 +0300 Aki Tuomi (2fa3e62e4) + lib-storage: Make sure data->stream isn't NULL -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/test-crypto.c + Makes static analysers happy -2016-10-14 13:48:41 +0300 Martti Rannanjärvi (0e828752a) +M src/lib-storage/index/index-mail-headers.c - lib-dcrypt: str_new to t_str_new in some test-crypto tests +2016-08-16 14:36:07 +0300 Aki Tuomi (3b986520b) - str_new from default_pool was not properly freed. + auth: Check for NULL auth token -M src/lib-dcrypt/test-crypto.c + Makes static analysers happy -2016-10-13 23:38:36 +0300 Martti Rannanjärvi (ae0f3892a) +M src/auth/mech-dovecot-token.c - lib-dcrypt: enc_key and pw must be NULL on storing unencrypted private key +2016-08-16 13:49:01 +0300 Aki Tuomi (8d3358d14) - Add tests for password and key encryption, and get_info on them. Also give - examples of valid cipher values for password and key encryption in dcrypt.h - comment. + lib: Fix SENTRY_CHAR to different kind of number -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt.h -M src/lib-dcrypt/test-crypto.c + Makes static analysers happier -2016-10-12 21:29:51 +0300 Martti Rannanjärvi (ee4b08625) +M src/lib/test-mempool-alloconly.c - lib-dcrypt: fix comment of dovecot format v2 to use colon +2016-08-16 13:46:09 +0300 Aki Tuomi (6eeed94a5) - Version 2 field separator was changed to colon. + lib-http: Ensure fstream is not NULL in test -M src/lib-dcrypt/dcrypt.h + Makes static analysers happier -2016-10-10 20:35:17 +0300 Timo Sirainen (933d16f4b) +M src/lib-http/test-http-payload.c - auth: Compiler warning fix +2016-08-16 13:44:27 +0300 Aki Tuomi (d9ee2f9fb) + lib-index: Do not do pointless memmove -M src/auth/db-ldap.c + Makes static analysers happier, since moving the data when days is 0 or days + is 8 is effectively non-op. -2016-10-02 14:14:48 +0200 Stephan Bosch (c73322faf) +M src/lib-index/mail-index-transaction-update.c - lib: uri-util: Always fully check the syntax of percent encoding while - parsing URI components. +2016-08-16 13:31:48 +0300 Aki Tuomi (05448f7b2) + test-priorityq: Ensure item is not NULL -M src/lib/uri-util.c + Makes static analysers happy -2016-05-08 22:56:59 +0200 Stephan Bosch (f1df3b34a) +M src/lib/test-priorityq.c - uri-util: Added public function for parsing single percent encoding - instances. +2016-08-16 13:30:36 +0300 Aki Tuomi (e07ae9667) + md5: Initialize block -M src/lib/uri-util.c -M src/lib/uri-util.h + Makes static analysers happy -2016-02-20 19:47:58 +0200 Stephan Bosch (76c9f1451) +M src/lib/md5.c - uri-util: Fixed assertion failure for invalid character in path segment. +2016-08-16 17:15:16 +0300 Timo Sirainen (564171184) + config: Fixed pkgsysconfdir path in ssl_dh warnings. -M src/lib/uri-util.c -2016-10-14 09:49:16 +0300 Aki Tuomi (ac80b9d26) +M src/config/Makefile.am - lib-index: unlink_directory has no error +2016-08-16 12:41:00 +0300 Aki Tuomi (551f3b2eb) + doveconf: Fix ssl_dh parameter handling some more -M src/lib-index/test-mail-index-modseq.c + Move empty check to master-service ssl settings, also handle ENOENT in read + as well. Do not touch the setting if it could not be composed due to no such + file. -2016-10-14 09:48:43 +0300 Aki Tuomi (6fd1b5dcc) +M src/config/config-request.c +M src/config/old-set-parser.c +M src/lib-master/master-service-ssl-settings.c - imap-hibernate: Adjust API usage for ostream +2016-08-16 12:28:27 +0300 Aki Tuomi (ef55b1574) + doveconf: hide ssl_key and ssl_dh without -P -M src/imap-hibernate/imap-client.c -2016-10-14 09:45:11 +0300 Aki Tuomi (204ad3f01) +M src/config/doveconf.c - Revert "uri-util: Fixed assertion failure for invalid character in path - segment." +2016-08-16 14:53:24 +0300 Timo Sirainen (2e441a8e3) - This reverts commit dbbdcc1224f81a40e746a09e6d44af7c4f24ff71. + lib-storage: If chdir to home doesn't work, chdir to root instead. -M src/lib/uri-util.c + Most importantly this fixes unlink_directory() when current directory after + dropping privileges can't be open()ed. -2016-10-14 09:45:09 +0300 Aki Tuomi (0dda73fd1) +M src/lib-storage/mail-storage-service.c - Revert "lib: uri-util: Always fully check the syntax of percent encoding - while parsing URI components." +2016-08-16 14:04:13 +0300 Timo Sirainen (617862032) - This reverts commit 5b6dc4c53617362baf8713815621bebbeb38c8cc. + lib-storage: Minor error message fix -M src/lib/uri-util.c -2016-05-18 17:45:09 +0300 Timo Sirainen (dd0eaa552) +M src/lib-storage/list/mailbox-list-delete.c - lib: Don't set ostream buffer as blocking +2016-08-16 11:05:25 +0300 Timo Sirainen (099737fac) + lib-mail: Compiling fix for message-snippet change - U'x' isn't standard. -M src/lib/ostream-buffer.c -2016-05-16 19:33:40 +0300 Timo Sirainen (28926495a) +M src/lib-mail/message-snippet.c - lib: Added ostream.blocking boolean +2016-03-29 22:30:17 +0200 nikwrt (d5db0fd38) - Similar to istream.blocking. + fts-squat: fix Corrupted squat uidlist bug -M src/lib/ostream-buffer.c -M src/lib/ostream-file.c -M src/lib/ostream-null.c -M src/lib/ostream.c -M src/lib/ostream.h -2016-04-30 14:10:59 +0200 Stephan Bosch (85df9a413) +M src/plugins/fts-squat/fts-backend-squat.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-trie.h +M src/plugins/fts-squat/squat-uidlist.c - lib: ostream-file: Allow creating derived file output streams. +2016-08-16 10:11:04 +0300 Aki Tuomi (de4869f23) + config: Only require ssl_dh is ssl is turned on -M src/lib/Makefile.am -A src/lib/ostream-file-private.h -M src/lib/ostream-file.c -2016-04-30 13:55:52 +0200 Stephan Bosch (6853a869b) +M src/config/config-request.c - lib: ostream-file: Split o_stream_file_writev() from - o_stream_file_writev_full(). +2016-08-15 19:22:31 +0300 Aki Tuomi (73083841b) + lib-mail: Fix snippet generation -M src/lib/ostream-file.c + Now we won't add leading whitespace for no reason, and also strip BOM when + found. -2016-04-30 13:51:59 +0200 Stephan Bosch (660db4508) +M src/lib-mail/message-snippet.c - lib: ostream-file: Renamed o_stream_writev() to o_stream_file_writev_full(). +2016-08-15 13:30:44 +0300 Aki Tuomi (902677f2e) + dcrypt: Fix encrypted test keys -M src/lib/ostream-file.c -2016-04-30 13:29:47 +0200 Stephan Bosch (be83239bb) +M src/lib-dcrypt/test-crypto.c - lib: ostream-file: Renamed iov_size to iov_count everywhere and made it - unsigned int for consistency. +2016-08-15 11:32:31 +0300 Aki Tuomi (8d9ee7e1c) + dcrypt: Update v2 sample -M src/lib/ostream-file.c -2016-10-12 12:04:10 +0300 Aki Tuomi (6a012765c) +M src/lib-dcrypt/sample-v2.asc - auth: Pass userdb fields to worker +2016-08-15 11:27:04 +0300 Aki Tuomi (36c6e4995) - If this is not done, then those userdb handlers that need access to userdb - variables for e.g. interpolation, cannot access them. + dcrypt: Retrieve key length correctly -M src/auth/auth-request.c -M src/auth/auth-worker-client.c -2016-10-11 13:18:53 +0300 Timo Sirainen (f7eed93e3) +M src/lib-dcrypt/dcrypt-openssl.c - auth: Don't re-insert userdb results from auth cache data back to cache. +2016-08-13 02:26:16 +0300 Martti Rannanjärvi (0206dc57f) - This was also breaking TTLs for the cached userdb results, because each - re-insert reset the TTL. + lib-storage: remove set_cache_corrupted_reason from mail_vfuncs -M src/auth/auth-request.c -M src/auth/auth-request.h + Change set_cache_corrupted signature to what set_cache_corrupted_reason used + to be. -2016-10-10 21:22:15 +0300 Timo Sirainen (d29c70425) +M src/imap/imap-fetch-body.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-storage/fail-mail.c +M src/lib-storage/index/cydir/cydir-mail.c +M src/lib-storage/index/dbox-multi/mdbox-mail.c +M src/lib-storage/index/dbox-single/sdbox-mail.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h +M src/lib-storage/index/istream-mail.c +M src/lib-storage/index/maildir/maildir-mail.c +M src/lib-storage/index/mbox/mbox-mail.c +M src/lib-storage/index/pop3c/pop3c-mail.c +M src/lib-storage/index/raw/raw-mail.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.h +M src/lib-storage/mail.c +M src/plugins/virtual/virtual-mail.c - lib-program-client: Fixed potential panic in test-program-client-local +2016-08-13 14:31:08 +0300 Timo Sirainen (196a07da7) - If the run finished before io_loop_run(), it would panic with: Panic: BUG: - No IOs or timeouts set. Not waiting for infinity. + lib: Avoid compiler warning if off_t has the same size as ssize_t. -M src/lib-program-client/test-program-client-local.c -2016-10-10 21:19:34 +0300 Timo Sirainen (282de4e52) +M src/lib/mmap-util.c - lib-program-client: Fixed program_client_run() that succeeds rapidly. +2016-08-13 01:18:03 +0300 Martti Rannanjärvi (436adac81) - program_client_run_async() could have called the callback with result=0 - before io_loop_run(). This happened with local client. + lib-storage: remove mailbox-recent-flags.h from index-storage.h - Fixes in test-program-client-local: Panic: BUG: No IOs or timeouts set. Not - waiting for infinity. -M src/lib-program-client/program-client.c +M src/lib-storage/index/cydir/cydir-sync.c +M src/lib-storage/index/dbox-multi/mdbox-sync.c +M src/lib-storage/index/dbox-single/sdbox-sync.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-rebuild.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-status.c +M src/lib-storage/index/index-storage.h +M src/lib-storage/index/index-sync.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-util.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/index/raw/raw-sync.c +M src/plugins/virtual/virtual-sync.c -2016-10-10 23:53:55 +0300 Timo Sirainen (2c2d64ed3) +2016-08-13 14:16:55 +0300 Timo Sirainen (e6c139397) - fs-metawrap: Don't assert-crash when trying to write an empty file. + dsync: Further fixes to received_timestamp and virtual_size parsing (-t and + -S parameters) - Fixes: Panic: file fs-metawrap.c: line 401 - (fs_metawrap_write_stream_finish): assertion failed: - (file->super_output->offset > 0 || file->super_output->stream_errno != 0) -M src/lib-fs/fs-metawrap.c -M src/lib-fs/test-fs-metawrap.c +M src/doveadm/dsync/dsync-ibc-stream.c -2016-10-11 00:31:17 +0300 Timo Sirainen (8cf999a2b) +2016-08-12 23:57:59 +0300 Martti Rannanjärvi (6e2856a5b) - lib-fs: Renamed internal i_stream_mail_read() to i_stream_fs_stats_read() + lib: move sort and search from strfuncs.h to sort.h - Just to make backtraces look clearer. Originally forgot to change this after - copy&pasting code from istream-mail.c -M src/lib-fs/istream-fs-stats.c +M src/doveadm/doveadm.c +M src/doveadm/dsync/dsync-mailbox-tree.c +M src/lib-imap-client/imapc-msgmap.c +M src/lib-mail/istream-header-filter.c +M src/lib-storage/index/pop3c/pop3c-sync.c +M src/lib-storage/list/mailbox-list-index-sync.c +M src/lib-storage/mailbox-header.c +M src/lib/Makefile.am +M src/lib/module-dir.c +A src/lib/sort.c +M src/lib/sort.h +M src/lib/strfuncs.c +M src/lib/strfuncs.h +M src/plugins/acl/acl-backend.c +M src/plugins/fts-squat/squat-uidlist.c -2016-10-10 20:58:53 +0300 Timo Sirainen (4d51949a6) +2016-08-13 00:20:43 +0300 Martti Rannanjärvi (1ae87afde) - lib-program-client: Fixed running test-program-client-local as root. + auth: remove #define default_cache_key cache_key - uid/gid == -1 isn't treated as "don't change" in here. -M src/lib-program-client/test-program-client-local.c +M src/auth/passdb.h +M src/auth/userdb.h -2016-09-21 10:55:47 +0300 Matwey V. Kornilov (79d9a65e8) +2016-08-13 00:35:23 +0300 Martti Rannanjärvi (28f18734b) - auth: Fix default SASL bind for LDAP + lib-http: rename http_header_field.key to name - User may configure Dovecot to use SASL bind as default bind method. This - can be the case when ldapi:/// (or ldaps:///) with SASL EXTERNAL is used. - Currently, Dovecot returns LDAP connection to wrong bind state after first - successful auth bind, LDAP simple bind always used to rebind. This may - broke setup when ACL in LDAP configured not to allow search/bind for such - simple bind. -M src/auth/db-ldap.c +M src/lib-http/http-header.c +M src/lib-http/http-header.h -2016-09-21 10:50:02 +0300 Matwey V. Kornilov (aae459582) +2016-08-13 00:50:57 +0300 Martti Rannanjärvi (62ab347bb) - auth: Introduce db_ldap_bind_sasl() function + lib-http: remove http_header_field from http_response - Do refactoring in db_ldap_connect() before fixing the SASL bind issue in the - next commit. -M src/auth/db-ldap.c +M src/lib-http/http-response-parser.c +M src/lib-http/http-response.h -2016-10-06 15:22:13 +0300 Timo Sirainen (5bdbda01b) +2016-08-13 01:02:42 +0300 Martti Rannanjärvi (26449edd3) - doveadm director kick: Added -f parameter. + lib-lda: remove obsolete smtp-client code - This works for all the user_* passdb fields. -M src/director/director-connection.c -M src/director/director.c -M src/director/director.h -M src/doveadm/doveadm-director.c +M src/lib-lda/smtp-client.c +M src/lib-lda/smtp-client.h -2016-10-06 15:19:51 +0300 Timo Sirainen (242005b27) +2016-08-13 01:30:51 +0300 Martti Rannanjärvi (153e08d8f) - doveadm director kick: Escape username properly. + lib-storage: remove obsolete constants - This only mattered if the username contained \001, TAB or LF characters, - which isn't normal. -M src/doveadm/doveadm-director.c +M src/lib-storage/mail-error.h -2016-10-06 15:13:30 +0300 Timo Sirainen (51701893c) +2016-08-13 02:10:52 +0300 Martti Rannanjärvi (bef286ce1) - director: Escape username when handling USER-KICK. + lib-storage: remove obsolete MAIL_FETCH_UIDL_FILE_NAME - This could have caused problems if username parameter contained TABs or LFs, - which of course shouldn't normally happen. -M src/director/director.c +M src/lib-storage/mail-storage.h -2016-10-06 14:54:51 +0300 Timo Sirainen (e07044df5) +2016-08-13 01:00:13 +0300 Timo Sirainen (18e4afdd3) - doveadm proxy kick: Support multiple user parameters. + dsync: Added missing fields to ibc-stream. -M src/doveadm/doveadm-proxy.c +M src/doveadm/dsync/dsync-ibc-stream.c -2016-10-06 14:53:11 +0300 Timo Sirainen (124bfaead) +2016-08-12 01:24:16 +0200 Stephan Bosch (a9a928e40) - doveadm proxy kick: Added -f parameter. + lib: Implemented i_stream_create_copy_from_data(). - This works for all the user_* passdb fields. + Unlike i_stream_create_from_data(), this function makes a copy of the + provided data block. This way, the application does not need to worry about + keeping it allocated for the lifetime of the stream. The copied data is + allocated durably on the system pool and freed once the stream is destroyed. -M src/doveadm/doveadm-proxy.c -M src/login-common/login-proxy.c +M src/lib/istream-data.c +M src/lib/istream.h -2016-10-06 14:38:04 +0300 Timo Sirainen (c82b58c8a) +2016-07-25 10:24:44 +0300 Martti Rannanjärvi (76b002343) - doveadm proxy list: Show all user_* fields in output. + lib,lib-test: stop calling memcmp and memcpy with NULL in tests -M src/doveadm/doveadm-proxy.c -M src/login-common/login-proxy.c +M src/lib-test/test-common.c +M src/lib/test-istream-base64-decoder.c +M src/lib/test-istream-crlf.c -2016-10-05 23:22:56 +0300 Timo Sirainen (27c3fd81f) +2016-07-25 10:21:43 +0300 Martti Rannanjärvi (d4488f314) - *-login: Store user_* passdb fields to client->alt_usernames. + lib-mail: stop calling str_append_n and memcmp with NULL in tests -M src/login-common/client-common-auth.c -M src/login-common/client-common.h -M src/login-common/login-common.h -M src/login-common/main.c +M src/lib-mail/test-istream-dot.c +M src/lib-mail/test-istream-header-filter.c +M src/lib-mail/test-message-header-parser.c +M src/lib-mail/test-message-parser.c -2016-10-10 17:37:27 +0300 Timo Sirainen (2a736c0c3) +2016-07-22 11:23:11 +0300 Martti Rannanjärvi (651e19486) - last-login: Don't execute last_login on IMAP unhibernation. + lib: iterate all fds in fd_debug_verify_leaks, fail with i_fatal + There is no benefit in failing with i_panic here since the error is most + likely not in the stack trace here. -M src/plugins/last-login/last-login-plugin.c +M src/lib/fd-close-on-exec.c -2016-10-10 17:19:32 +0300 Timo Sirainen (ec769b57d) +2016-07-19 18:34:08 +0300 Martti Rannanjärvi (39d97b496) - quota: Don't execute quota_over_script if userdb lookup was over 10 secs ago + lib: stop using first_fd as loop counter in fd_debug_verify_leaks + Use a separate int fd to iterate [first_fd, last_fd] instead. -M src/plugins/quota/quota.c +M src/lib/fd-close-on-exec.c -2016-10-10 17:19:16 +0300 Timo Sirainen (dcddd3ed8) +2016-08-08 13:12:15 +0300 Timo Sirainen (0ee8b8cf1) - imap-hibernate: Preserve mail_user.session_create_time through hibernation + Moved cc-wrapper.sh handling to dovecot.m4 + When configuring Dovecot --without-shared-libs and pointing external plugins + to uninstalled sources --with-dovecot, any binaries complied for plugins + weren't using cc-wrapper.sh, which could have caused runtime failures when + they attempted to load plugins dynamically. Now it's possible to add + DC_CC_WRAPPER to plugins' configure.ac to build with the cc-wrapper.sh. -M src/imap-hibernate/imap-client.c -M src/imap-hibernate/imap-client.h -M src/imap-hibernate/imap-hibernate-client.c -M src/imap/imap-client-hibernate.c -M src/imap/imap-master-client.c +M Makefile.am +D cc-wrapper.sh.in +M configure.ac +M m4/dovecot.m4 -2016-10-10 17:19:06 +0300 Timo Sirainen (0e72564d0) +2016-08-11 14:34:05 +0300 Aki Tuomi (cd24dc219) - lib-storage: Added mail_user.session_create_time and .session_restored + configure: Fix dcrypt build conditionals -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h +M m4/ssl.m4 +M src/lib-dcrypt/Makefile.am -2016-10-06 14:54:24 +0300 Aki Tuomi (3b5562aeb) +2016-08-10 15:40:23 +0300 Martti Rannanjärvi (fd0146e60) - imap-hibernate: Properly fix hibernation + lib-storage: don't crash when pop3c-client timeouts - The previous fix did not properly fix hibernation as the clients still - dropped out of hibernate. Also the tag used was no longer following. This - change will track tag changes and keeps the hibernation process going on - until the user enters something else than DONE\r\ntag IDLE\r\n in same - packet. -M src/imap-hibernate/imap-client.c -M src/imap-hibernate/imap-client.h -M src/imap-hibernate/imap-hibernate-client.c -M src/imap/imap-client-hibernate.c -M src/imap/imap-master-client.c -M src/imap/imap-state.c -M src/imap/imap-state.h +M src/lib-storage/index/pop3c/pop3c-client.c -2016-10-10 13:40:41 +0300 Timo Sirainen (be7f2032d) +2016-08-11 12:46:42 +0300 Aki Tuomi (2511d4ccc) - cassandra: Added latency_aware_routing connect-parameter. + doveadm-dump: Add missing include - There's currently no way to change the default settings for it. -M src/lib-sql/driver-cassandra.c +M src/doveadm/doveadm-dump-dcrypt-key.c -2016-10-10 13:59:57 +0300 Timo Sirainen (4236767f6) +2016-08-11 17:27:24 +0300 Timo Sirainen (b544772a9) - lmtp: Handle lmtp_user_concurrency_limit before lmtp_rcpt_check_quota + -Wstrict-bool warning fixes - The quota lookup is more expensive, so it shouldn't be done unnecessarily. -M src/lmtp/commands.c +M src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-dump-dcrypt-file.c +M src/lib-ssl-iostream/iostream-openssl-context.c -2016-10-10 10:37:24 +0300 Aki Tuomi (ba9270a39) +2016-08-11 17:23:48 +0300 Timo Sirainen (11566139f) - doveadm-sync: Document end-date flag + doveadm sync: Fixed -S parameter parsing to actually work. -M doc/man/doveadm-sync.1.in +M src/doveadm/doveadm-dsync.c -2016-10-10 10:36:52 +0300 Aki Tuomi (69031c6ab) +2016-07-01 14:30:24 +0300 Timo Sirainen (ae949831f) - doveadm-sync: Add end-date support + doveadm sync/backup: Added -S parameter to skip too large mails. M src/doveadm/doveadm-dsync.c @@ -19107,4346 +44373,5006 @@ M src/doveadm/dsync/dsync-ibc-pipe.c M src/doveadm/dsync/dsync-ibc-stream.c M src/doveadm/dsync/dsync-ibc.h +M src/doveadm/dsync/dsync-mail.c M src/doveadm/dsync/dsync-mail.h +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-export.h M src/doveadm/dsync/dsync-mailbox-import.c M src/doveadm/dsync/dsync-mailbox-import.h -2016-10-10 10:13:12 +0300 Aki Tuomi (4e02ed795) - - doveadm-sync: Document start date +2016-07-13 09:51:08 +0300 Aki Tuomi (a3783f8a3) + auth-db-dict: Allow key name expansion -M doc/man/doveadm-sync.1.in -M src/doveadm/doveadm-dsync.c + This allows expansion of dictionary keys based on userdb variables on dict + lookup mapping. Example: key userdb { + key = %{userdb:nspace:default}/userdb + format = json + } -2016-10-09 23:34:18 +0300 Timo Sirainen (f71958552) +M src/auth/db-dict.c - lib-compression: Fixed compler warnings and wrongly triggering asserts. +2016-08-09 18:29:19 +0300 Phil Carmody (bd1e1a972) - Broken by 7f74811b7. + lib-test: test-exit helper to stop valgrind complaining about fork()s -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c + fork()s that want to _exit() will cause valgrind's full memory leak checker + to complain a lot - this performs a quick cleanup first. -2016-10-06 13:50:59 +0300 Timo Sirainen (6a1110d87) + Before: + phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes + --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix + ==19576== total heap usage: 4 allocs, 0 frees, 17,858 bytes allocated + istream unix ......................................................... : ok + 0 / 1 tests failed + ==19575== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated - global: Make sure i_stream_read() calls handle 0 and -2 return values - correctly. + After: + phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes + --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix + istream unix ......................................................... : ok + ==4993== total heap usage: 4 allocs, 4 frees, 17,858 bytes allocated + 0 / 1 tests failed + ==4992== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated + Signed-off-by: Phil Carmody -M src/doveadm/client-connection-http.c -M src/doveadm/doveadm-mail-save.c -M src/doveadm/doveadm-mail.c -M src/doveadm/dsync/dsync-mail.c -M src/imap/cmd-append.c -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c -M src/lib-dict-extra/dict-fs.c -M src/lib-http/http-client-connection.c -M src/lib-mail/istream-attachment-extractor.c -M src/lib-storage/index/index-attachment.c -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/mail-copy.c -M src/lib/istream-seekable.c +M src/lib-test/test-common.c +M src/lib-test/test-common.h +M src/lib/test-istream-unix.c -2016-10-06 13:39:21 +0300 Timo Sirainen (5cb85a03d) +2016-08-09 11:48:10 +0300 Aki Tuomi (c281d6630) - log: Minor error logging and comment improvement. + openssl: Fix v1.1 compability -M src/log/log-connection.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-ssl-iostream/dovecot-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/login-common/ssl-proxy-openssl.c -2016-10-06 13:09:46 +0300 Timo Sirainen (463fc8014) +2016-08-08 15:31:50 +0300 Aki Tuomi (345f36ebc) - imapc: Added imapc_max_line_length to limit maximum memory usage. + OpenSSL: link against OpenSSL libs explicitly - The default is still unlimited, but this should be set to something smaller - for untrusted servers. -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-settings.h -M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-dcrypt/Makefile.am +M src/lib-ssl-iostream/Makefile.am -2016-10-06 12:10:28 +0300 Timo Sirainen (851a128fe) +2016-07-23 23:40:15 +0300 Martti Rannanjärvi (35de0999d) - lib-index: Added test-mail-index-modseq unit test + doveadm: add doveadm-dump-dcrypt-key -M src/lib-index/Makefile.am -A src/lib-index/test-mail-index-modseq.c +M doc/man/doveadm-dump.1.in +M src/doveadm/Makefile.am +A src/doveadm/doveadm-dump-dcrypt-key.c +M src/doveadm/doveadm-dump.c +M src/doveadm/doveadm-dump.h -2016-10-05 16:34:16 +0300 Timo Sirainen (367aa5edb) +2016-06-07 14:54:43 +0300 Aki Tuomi (42cb77985) - lib-storage: Fixed assert-crash in mailbox_save_cancel() + config: Use ssl-parameters.dat if ssl_dh is missing - Broken by 05150df8f. Fixes: Panic: file mail-storage.c: line 2137 - (mailbox_save_context_reset): assertion failed: (ctx->saving) -M src/lib-storage/mail-storage.c +M src/config/Makefile.am +M src/config/config-request.c +M src/config/old-set-parser.c +M src/config/old-set-parser.h +M src/lib-master/master-service-ssl-settings.c -2016-09-27 16:15:42 +0300 Timo Sirainen (b816c98d4) +2016-03-03 12:41:24 +0200 Aki Tuomi (bb5eac87b) - lib: If connect() fails with EADDRNOTAVAIL, retry it 4 more times. + ssl-proxy: Use ssl_dh setting from config - This is needed on busy systems. Nicely explained in: - https://idea.popcount.org/2014-04-03-bind-before-connect/ -M src/lib/net.c +M src/login-common/ssl-proxy-openssl.c -2016-10-05 15:03:05 +0300 Phil Carmody (66bd5a6c8) +2016-03-03 12:41:12 +0200 Aki Tuomi (878734e3d) - plugins/fts - make storage errors more informative + lib-master: Load DH string from config file - There are 3 different ways to fail ending a transaction (one of which is - itself just a record that something now unknown previously failed). Identify - which one in the logs. - Signed-off-by: Phil Carmody +M src/lib-master/master-service-ssl-settings.c +M src/lib-master/master-service-ssl-settings.h +M src/lib-master/master-service-ssl.c -M src/plugins/fts/fts-storage.c +2016-03-03 12:40:38 +0200 Aki Tuomi (61969c307) -2016-10-04 17:31:26 +0300 Timo Sirainen (f2dc727b4) + lib-ssl-iostream: Read dh parameters from PEM string - lib-storage: autoexpunge mailboxes with wildcards didn't work with namespace - prefix. +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-ssl.h -M src/lib-storage/mail-autoexpunge.c +2016-03-03 11:55:59 +0200 Aki Tuomi (00b722cca) -2016-09-27 19:48:14 +0300 Timo Sirainen (d8907e9b7) + dovecot: Remove ssl-params - lib-index: If view syncing sees index is reset, always mark the view as - inconsistent. - Not only when the mailbox has messages, because that could still mess up - assumptions about UIDs. A somewhat better check could have been to do this - only when next_uid>1 (= there have been messages at some point in this - mailbox), but it's safer to just always mark the view as inconsistent. +M configure.ac +M src/Makefile.am +M src/lib-ssl-iostream/Makefile.am +M src/lib-ssl-iostream/iostream-openssl-context.c +D src/lib-ssl-iostream/iostream-openssl-params.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl-private.h +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h +D src/ssl-params/Makefile.am +D src/ssl-params/main.c +D src/ssl-params/ssl-params-settings.c +D src/ssl-params/ssl-params-settings.h +D src/ssl-params/ssl-params.c +D src/ssl-params/ssl-params.h -M src/lib-index/mail-index-view-sync.c +2016-08-10 19:15:56 +0300 Timo Sirainen (5b5da56e4) -2016-09-27 19:45:57 +0300 Timo Sirainen (9bce4ed38) + quota: If quota lookup updates vsize header, lock it earlier to avoid a + deadlock. - lib-index: When finding a view is reset, don't attempt any further syncing. - This could cause various errors to be logged, such as: Error: Append with - UID 7103, but next_uid = 7242 +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c -M src/lib-index/mail-index-view-sync.c +2016-08-10 19:13:09 +0300 Timo Sirainen (d6b606142) -2016-09-27 19:41:25 +0300 Timo Sirainen (c7b935161) + quota: Fixed handling when mail size lookup fails due to mail already being + expunged. - lib-index: Fixed potential assert-crash when view syncing sees a reset - marker. + We don't want to fail it as a quota allocation failure, but just pass + through the "mail is expunged" error to the original caller. - It should never try to use main index map at that point, because - view_sync_have_expunges() looks changes only before the reset marker. Fixes: +M src/plugins/quota/quota.c - Error: Index .../dovecot.index lost messages without expunging (36 -> 27) +2016-08-10 17:56:14 +0300 Timo Sirainen (cf1b9b686) -M src/lib-index/mail-index-view-sync.c + dict-client: Improved timeout error message. -2016-09-27 19:39:59 +0300 Timo Sirainen (c4a8f06a8) - lib-storage: Make sure mailbox_sync*() fails if view is inconsistent - afterwards. +M src/lib-dict/dict-client.c +2016-08-10 17:54:29 +0300 Timo Sirainen (d951320d4) -M src/lib-storage/index/index-sync.c + lib: Added connection_input_timeout_reason() -2016-09-27 19:38:26 +0300 Timo Sirainen (e32754a21) - imap: If mailbox is inconsistent after syncing, don't try to sync message - counts. +M src/lib/connection.c +M src/lib/connection.h - This fixes (e.g. after doveadm force-resync): Panic: Message count decreased +2016-08-10 17:44:26 +0300 Timo Sirainen (2c5c70e12) -M src/imap/imap-sync.c + lib: Added connection.connect_started/finished timestamps. -2016-10-02 14:18:35 +0200 Stephan Bosch (4cdd92173) - lib-http: uri: Removed unnecessary checking of percent encoding of query and - fragment parts. +M src/lib/connection.c +M src/lib/connection.h - This is now always performed in lib/uri-util. +2016-08-11 03:40:58 +0200 Stephan Bosch (22140eb9d) -M src/lib-http/http-url.c + Fixed copyright notices. -2016-10-02 14:14:48 +0200 Stephan Bosch (5b6dc4c53) - lib: uri-util: Always fully check the syntax of percent encoding while - parsing URI components. +M src/auth/password-scheme-pbkdf2.c +2016-08-10 23:53:48 +0300 Timo Sirainen (287b5ba23) -M src/lib/uri-util.c + lib-storage: Added mail_user_set_plugin_getenv_bool() -2016-10-03 10:08:45 +0300 Aki Tuomi (42beb171f) - lib-test: Fix memory leak in test-ostream +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h +2016-08-10 12:01:50 +0300 Aki Tuomi (66c87722e) -M src/lib-test/test-ostream.c + global: Update mailbox_attribute_get API usage -2016-10-03 10:08:31 +0300 Aki Tuomi (35fa25c79) - lib-test: Fix illegal memory access in test-ostream +M src/doveadm/doveadm-mail-mailbox-metadata.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-imap-urlauth/imap-urlauth-backend.c +M src/plugins/acl/acl-attributes.c +M src/plugins/acl/acl-storage.h +M src/plugins/push-notification/push-notification-driver-ox.c +2016-08-04 09:51:40 +0300 Aki Tuomi (9f37ef2a9) -M src/lib-test/test-ostream.c + lib-storage: Change mailbox_attribute_get* API -2016-10-03 09:11:23 +0300 Aki Tuomi (bf24499eb) + lib-storage/mailbox-attribute.h: mailbox_attribute_get() and + mailbox_attribute_get_stream() now has struct mailbox_transaction_context as + their first parameter. This isn't good for performance, because opening a + transaction requires opening mailbox indexes first. But reading attributes + wouldn't actually require opening the indexes, so this is just wasteful. - io: Add source filename +M src/lib-storage/index/index-attribute.c +M src/lib-storage/index/index-storage.h +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mailbox-attribute-internal.c +M src/lib-storage/mailbox-attribute.c +M src/lib-storage/mailbox-attribute.h - This will make debugging alot easier when you can see what the filename is - as well. +2016-08-09 18:06:25 +0300 Timo Sirainen (ad759d5e8) -M src/lib/ioloop-notify-inotify.c -M src/lib/ioloop-notify-kqueue.c -M src/lib/ioloop-notify-none.c -M src/lib/ioloop-private.h -M src/lib/ioloop.c -M src/lib/ioloop.h + quota: Don't get message sizes when updating mailbox that ignores quotas. -2016-09-30 13:42:45 +0300 Timo Sirainen (70193d88f) + Nothing is done with the size anyway. - lib-test: Added test_ostream for testing nonblocking ostreams. +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota.c +2016-08-10 19:07:18 +0300 Timo Sirainen (8e4f0949e) -M src/lib-test/Makefile.am -M src/lib-test/test-common.h -A src/lib-test/test-ostream.c + lib-storage: Fixed potential .vsize.lock deadlock. -2016-09-30 13:10:13 +0300 Timo Sirainen (364ce1d69) - lib-test: Moved test_istream code to its own test-istream.c file. +M src/lib-storage/index/index-storage.c +2016-08-10 17:15:21 +0300 Timo Sirainen (749b9176d) -M src/lib-test/Makefile.am -M src/lib-test/test-common.c -A src/lib-test/test-istream.c + auth: Removed redundant noauthenticate checks. -2016-09-30 13:04:48 +0300 Timo Sirainen (3def8e553) + Now that noauthenticate also adds nopassword field. - lib-test: Allow test_istream_set_*() for test-istream's children. +M src/auth/auth-request.c +M src/auth/passdb-sql.c - It will internally find the test_istream from parents. This simplifies the - testing code so that it doesn't have to keep track of both the test_istream - and the final istream. +2016-08-10 17:14:28 +0300 Timo Sirainen (91272432c) -M src/lib-test/test-common.c + auth: When setting noauthenticate=yes, also set nopassword=yes -2016-09-27 20:21:55 +0300 Timo Sirainen (97ad7d594) + There are various places which check only "nopassword", but not + "noauthenticate". - director: Ignore duplicates in director_servers setting. +M src/auth/auth-request.c +2016-08-10 17:41:51 +0300 Timo Sirainen (a238c6fed) -M src/director/director-host.c + lib: Added connection.last_input_tv for more accuracy -2016-09-30 12:36:33 +0300 Timo Sirainen (de7259607) - lib-storage: mail_user_dup() should duplicate also userdb_fields. +M src/lib/connection.c +M src/lib/connection.h +2016-08-10 17:37:53 +0300 Timo Sirainen (a2d962e72) -M src/lib-storage/mail-user.c + lib: connection_disconnect() now resets last_input -2016-09-29 14:15:32 +0300 Timo Sirainen (c94368100) + If we reconnect, its value would otherwise be wrong. - lib-storage: Don't reset mail_save_context.saving too early. +M src/lib/connection.c - If mailbox_save_using_mail() ended up in mail_storage_copy(), saving was set - to FALSE before the copy() method was finished running. This caused e.g. - notify plugin to think that this was a copy event instead of a save event. +2016-08-10 17:11:13 +0300 Timo Sirainen (cbcddb51c) - Added comments and asserts to clarify how the logic should work between all - the different copying/moving/saving flags. + auth: Blocking userdb lookup shouldn't reset extra fields. -M src/lib-storage/mail-copy.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -2016-09-29 14:00:49 +0300 Timo Sirainen (88b127ba8) +M src/auth/userdb-blocking.c - lib-storage: If mailbox_move() fails, reset mail_save_context.moving==FALSE +2016-08-10 14:05:25 +0300 Timo Sirainen (c8eb8314a) + login-proxy: Fixed assert-crash/hang on connect errors. -M src/lib-storage/mail-storage.c + The internal BUG would have left the host hanging. "Host is down" or any + immediate connect() error would have assert-crashed with: -2016-09-27 15:50:11 +0300 Timo Sirainen (0f1db26f3) + Panic: file login-proxy.c: line 470 (login_proxy_disconnect): assertion + failed: (proxy->state_rec->num_waiting_connections > 0) - master: Removed hardcoded listen() backlog limit. +M src/login-common/login-proxy.c - If it's already too large, the kernel will truncate it automatically. So - there shouldn't be any reason for us to explicitly limit it. +2016-08-10 01:38:26 +0300 Timo Sirainen (accba2f17) -M src/master/service-listen.c + lmtp: Fixed using default port 24 -2016-09-26 15:38:27 +0300 Timo Sirainen (b0f62923a) + Broken by dfe53c824. - dict-client: Fixed lock and ioloop wait timings in log messages. +M src/lmtp/commands.c - Previously it was logging the total amount of time spent on lock waits or on - ioloop during the existence of the entire process, rather than how much time - the command itself was spending on those. This wasn't very useful. Now it - also tries to separate the time spent on the main ioloop and in dict_wait(). +2016-08-08 19:25:05 +0300 Timo Sirainen (2593d6105) -M src/lib-dict/dict-client.c + doveadm: Fixed -A and -u wildcard handling with server connections. -2016-09-26 16:44:21 +0300 Timo Sirainen (d8dfef4c4) - dict-client: Don't return "Dict server timeout" too early. +M src/doveadm/client-connection.c +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h - This could have happened when many dict commands were being run without the - timeout being reset in the middle. +2016-08-08 19:24:08 +0300 Timo Sirainen (4e7bbab85) -M src/lib-dict/dict-client.c + doveadm: Fixed hanging when printing output from different server + connections. -2016-09-26 16:34:23 +0300 Timo Sirainen (0b7991ead) - dict-client: Remove timeout when there are only background commands. +M src/doveadm/server-connection.c - Normally the timeout wasn't added in the first place, but it was if a - non-background command was added first and it was followed by a background - command. +2016-08-08 19:22:15 +0300 Timo Sirainen (bab7538be) -M src/lib-dict/dict-client.c + doveadm: Avoid recursively calling server input callback -2016-09-21 13:47:05 +0300 Timo Sirainen (bf4a2429e) + Probably doesn't fix anything, but it could cause confusing backtraces at + least. - lib: Fixed ostream-failure-at with blocking parent stream. +M src/doveadm/server-connection.c - Blocking ostream returns either a full success or a full failure. It can't - return that only n/m bytes were written. +2016-08-08 19:16:57 +0300 Timo Sirainen (be25bbb90) - Fixes assert: Panic: file ostream.c: line 255 (o_stream_sendv_int): - assertion failed: (!stream->blocking) + doveadm-server: Fixed potential hang when reading replies to multiple + commands -M src/lib/ostream-failure-at.c -2016-09-19 11:08:08 +0300 Timo Sirainen (2d3f05500) +M src/doveadm/server-connection.c - lib-ssl-iostream: The final fix to make the SSL plugin loading not fail.. +2016-08-08 19:11:16 +0300 Timo Sirainen (483f53880) + doveadm: Revert earlier NUL-printing change 793b024bf. -M src/lib-ssl-iostream/iostream-ssl.c + It changes the output in ways that are a bit difficult to fix. Also the the + important part where NULs printing is useful is in a message body, which + should work even without this change. So for now just revert it. -2016-09-18 16:33:07 +0300 Timo Sirainen (7cf115f85) +M src/doveadm/server-connection.c - lib-ssl-iostream: Fixed OpenSSL module to be actually initialized. +2016-08-08 17:56:48 +0300 Timo Sirainen (c7aa61396) + lib-auth: Avoid crash after user iteration if connection failed. -M src/lib-http/test-http-client.c -M src/lib-ssl-iostream/iostream-openssl.c -M src/lib-ssl-iostream/iostream-openssl.h -M src/lib-ssl-iostream/iostream-ssl.c -2016-09-16 08:39:24 +0300 Timo Sirainen (2d3cb95d2) +M src/lib-auth/auth-master.c - lib-http: Link test-http-client libssl_iostream_openssl.so directly. +2016-08-08 17:13:15 +0300 Timo Sirainen (60eebc543) - This way it can be run without having to do make install first. + doveadm: Removed unused code. -M src/lib-http/Makefile.am -M src/lib-http/test-http-client.c -2016-09-16 08:35:55 +0300 Timo Sirainen (a8fce6af6) +M src/doveadm/doveadm-mail-save.c - lib-ssl-iostream: Use more standard _init() & _deinit() to initialize SSL - plugin +2016-08-08 16:15:26 +0300 Timo Sirainen (94a1fedb5) - This is mainly to make it easier for test programs to link to the plugin - directly. + dsync: Fixed empty-header-workaround -M src/lib-ssl-iostream/iostream-openssl.c -M src/lib-ssl-iostream/iostream-openssl.h -M src/lib-ssl-iostream/iostream-ssl-private.h -M src/lib-ssl-iostream/iostream-ssl.c -2016-09-10 11:15:00 +0300 Timo Sirainen (41f4efecd) +M src/doveadm/dsync/dsync-mailbox-import.c - doveadm: Don't allow doveadm_print_header(title==NULL) anymore. +2016-08-08 16:06:50 +0300 Timo Sirainen (905780639) - It's not used anywhere, and if it was used it would have crashed with at - least "tab" backend. + dsync_features: For consistency use '-' and not '_' -M src/doveadm/doveadm-print.c + Other _features and _workarounds settings use also '-'. -2016-09-09 17:40:58 +0300 Timo Sirainen (429441cac) +M src/doveadm/doveadm-settings.c - fts-squat: Fixed memory leak on corrupted uidlist handling +2016-08-08 15:49:13 +0300 Timo Sirainen (431c0aba5) + lib: Small improvements to iostream-temp unit test. -M src/plugins/fts-squat/squat-uidlist.c -2016-09-09 17:39:43 +0300 Timo Sirainen (67d2a4590) +M src/lib/test-iostream-temp.c - dict-file: Don't leak a lock on temp file creation failure. +2016-08-08 14:39:39 +0300 Timo Sirainen (793b024bf) + doveadm: When printing input from doveadm-server, don't truncate at NUL. -M src/lib-dict/dict-file.c -2016-10-11 11:03:06 +0300 Timo Sirainen (a98be204a) +M src/doveadm/server-connection.c - lib: iostream-temp: Fixed o_stream_send_istream() with >2GB files +2016-08-08 13:21:34 +0300 Aki Tuomi (65a8a3c66) - 8051312f9 wasn't quite enough. + doveadm: Pass connection to mail context -M src/lib/iostream-temp.c -2016-10-10 14:42:24 +0300 Timo Sirainen (280368615) +M src/doveadm/client-connection.c +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm-mail.c - lib-program-client: Compiler warning fixes +2016-08-08 11:38:54 +0300 Aki Tuomi (cde4b8118) + doveadm: Use str_append_tabescaped_n -M src/lib-program-client/test-program-client-remote.c -2016-10-10 14:20:16 +0300 Timo Sirainen (a3217af3c) +M src/doveadm/doveadm-print-server.c - lib-program-client: Avoid busy-looping while waiting for ostream to have - space. +2016-08-08 11:23:02 +0300 Aki Tuomi (51aceed49) + lib: Add binary-safe tabescape -M src/lib-program-client/program-client.c -2016-10-07 19:49:24 +0300 Aki Tuomi (e5e08bff9) +M src/lib/strescape.c +M src/lib/strescape.h - lib-program-client: Add test suite for program client +2016-08-08 09:29:26 +0300 Aki Tuomi (9ca065aa3) + doveadm: Streamline tabunescape -M src/lib-program-client/Makefile.am -A src/lib-program-client/test-program-client-local.c -A src/lib-program-client/test-program-client-remote.c -2016-10-07 19:48:59 +0300 Aki Tuomi (23933844c) +M src/doveadm/server-connection.c - lib-program-client: Expose asynchronous API +2016-08-08 12:36:48 +0300 Timo Sirainen (b3db9827b) + doveadm: Extra safety - initialize cmd_input_fd to -1 -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client-remote.c -M src/lib-program-client/program-client.c -M src/lib-program-client/program-client.h + Just to be sure it's never attempted to be accessed as 0 (stdin) before + being initialized. (It didn't happen with current code as far as I know.) -2016-10-06 11:57:27 +0300 Aki Tuomi (de0de870a) +M src/doveadm/doveadm-mail.c - lib-program-client: Whitespace fix +2016-07-12 13:31:32 +0300 Phil Carmody (6335b1be3) + lib: tests - give the tests names, using the new macros -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client.c + The lists of test function declarations and of test functions to call was + basically the same list. Use the new test macros to squash them into one + list, and then chose to name all the tests, so that you can select which + ones to run. This can simplify the debug cycle when some of the tests are + lengthy. + + e.g.: + phil@phil:~/repos/dovecot-core$ src/lib/test-lib --match crc + crc32 ................................................................ : ok + 0 / 1 tests failed -2016-09-12 13:02:23 +0300 Aki Tuomi (d8e11da24) + src/lib is clearly the most complicated case, conversions of others where + filtering would be useful should be trivial following this example. - lib-program-client: Add program-client from pigeonhole + Signed-off-by: Phil Carmody +M .gitignore +M src/lib/Makefile.am +M src/lib/test-lib.c +M src/lib/test-lib.h +A src/lib/test-lib.inc -M configure.ac -M dovecot-config.in.in -M src/Makefile.am -A src/lib-program-client/Makefile.am -A src/lib-program-client/program-client-local.c -A src/lib-program-client/program-client-private.h -A src/lib-program-client/program-client-remote.c -A src/lib-program-client/program-client.c -A src/lib-program-client/program-client.h +2016-07-12 13:28:54 +0300 Phil Carmody (d48ce437e) -2016-09-29 09:51:40 +0300 Aki Tuomi (c549d5104) + lib-test: enable naming of tests, such that only a subset is run - doveadm-import: Update manpage + How to use these will become clear in a subsequent patch. Even if you don't + want to name tests, the macros can reduce redundancy in the code, as the + list of test function prototypes and the list of test functions to call + become the same lists, expanded through 2 different macros. + Signed-off-by: Phil Carmody -M doc/man/doveadm-import.1.in +M src/lib-test/test-common.c +M src/lib-test/test-common.h -2016-09-29 10:17:05 +0300 Aki Tuomi (9811490b9) +2016-06-01 13:57:34 +0300 Phil Carmody (0e0a294cf) - doveadm-import: Add -U parameter to specify source user + lib-test: improve expected error handling - When doing import, you can specify which user to use as source user. + If we expect a specific error string, then when we see it, suppress it. -M src/doveadm/doveadm-mail-import.c + We do not suppress errors expected by count, because if we get unexpected + errors, then we do not want them suppressed, and we have no way of + distinguishing between the expected and unexpected errors. -2016-09-29 10:15:24 +0300 Aki Tuomi (e62a4b5b4) + This of course favours the use of the expected string version of the helper, + but alas that's not always usable, as you can only expect one at a time. - doveadm-import: Use target user as source user + Additionally, if we failed to see an expected message, then when we no + longer expect to see it, reset the expected message state to not cascade + further test assertion failures. - This is done to avoid spurious error messages caused by being ran as root. + Signed-off-by: Phil Carmody -M src/doveadm/doveadm-mail-import.c + Conflicts: + src/lib-test/test-common.c -2016-09-28 13:34:46 +0300 Aki Tuomi (351aa01c6) +M src/lib-test/test-common.c +M src/lib-test/test-common.h +M src/lib/test-failures.c - imap-hibernate: Accept RFC DONE\IDLE +2016-08-03 12:46:21 +0300 Martti Rannanjärvi (ceee39b0d) - Change imap-hibernate to accept DONE\r\n IDLE\r\n as well, which is - specified by RFC + doveadm: add doveadm dump dcrypt-file -M src/imap-hibernate/imap-client.c -2016-09-27 13:28:15 +0300 Timo Sirainen (8428e40d8) +M doc/man/doveadm-dump.1.in +M src/doveadm/Makefile.am +A src/doveadm/doveadm-dump-dcrypt-file.c +M src/doveadm/doveadm-dump.c +M src/doveadm/doveadm-dump.h - lib-storage: Update mailbox.recent_flags_count correctly. +2016-08-06 22:12:13 +0300 Martti Rannanjärvi (ebd1c50bc) - The counter was increased even if the UID was already in recent_flags. This - is the only place where I found that recent_flags and recent_flags_count - could become desynced (which they definitely were in a core dump), so - hopefully this fixes assert-crashes like: + lib-dcrypt: make decrypt_istream format and flags visible - Panic: file index-status.c: line 130 (index_storage_get_open_status): - assertion failed: (status_r->recent <= status_r->messages) -M src/lib-storage/mailbox-recent-flags.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/istream-decrypt.h -2016-09-27 13:50:51 +0300 Timo Sirainen (6d8be3298) +2016-08-06 22:07:00 +0300 Martti Rannanjärvi (17fbd200b) - dsync: Virtual sizes weren't exported properly with -I parameter. + lib-dcrypt: add dcrypt-iostream.h - Although they were incorrectly being exported with -T parameter. This makes - -I work without assert-crashing. + Move everything from dcrypt-iostream-private.h and enum + io_stream_encrypt_flags to the new dcrypt-iostream.h file. -M src/doveadm/dsync/dsync-mailbox-export.c +M src/lib-dcrypt/Makefile.am +D src/lib-dcrypt/dcrypt-iostream-private.h +A src/lib-dcrypt/dcrypt-iostream.h +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/ostream-encrypt.c +M src/lib-dcrypt/ostream-encrypt.h +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c -2016-09-27 13:50:10 +0300 Timo Sirainen (35ed782d4) +2016-08-05 15:21:29 +0300 Aki Tuomi (afd6d387e) - dsync: Renamed "max sync size" parameter from -S to -I. + dsync: Add support for features - -S can't be used because it was already used for the generic socket path, so - it didn't actually work. + Add empty_header_workaround as first feature M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-settings.c +M src/doveadm/doveadm-settings.h +M src/doveadm/doveadm.c +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-brain.h +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-mail.h +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-import.h -2016-09-14 07:13:50 -0400 Josef 'Jeff' Sipek (70d190cb9) +2016-04-09 18:21:23 -0500 J. Nick Koston (0d1d48593) - doveadm: refactor mailbox attribute get/set/unset/list to share more code + quota_clone plugin: quota_clone_mail_user_created warned without debug + "The quota_clone_dict setting is missing from configuration" warning would + be thrown when debug mode was not enabled. This warning happens under + normal circumstances when prefix="" namespace is not defined (usually when + set to INBOX.) -M src/doveadm/doveadm-mail-mailbox-metadata.c + See http://dovecot.org/list/dovecot-cvs/2012-October/021981.html for more + details on the automagic prefix="" namespace. -2016-09-13 07:50:04 -0400 Josef 'Jeff' Sipek (c262cd36d) + This change suppresses the spurious warning. - doveadm: allow access to server attributes via empty mailbox name +M src/plugins/quota-clone/quota-clone-plugin.c +2016-04-09 13:43:16 +0200 Wido den Hollander (dfe53c824) -M src/doveadm/doveadm-mail-mailbox-metadata.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h + lmtp: Use port 24 if no port has been provided -2016-09-13 07:49:41 -0400 Josef 'Jeff' Sipek (0878b1e49) + This allows using the LMTP, IMAP and POP3 proxy on the same Dovecot + installation without the userdb providing the port to connect to. - lib-storage: remove attribute accessibility checks + TCP port 24 is registered at IANA as: "any private mail system" - index_storage_attribute_{set,get} should assume that the caller performed - due diligence and checked whether or not the user is allowed to store under - the key. + LMTP being the Local Mail Transfer Protocol classifies as a private mail + system and thus justifies the usage of port 24. -M src/lib-storage/index/index-attribute.c + Prior to this patch the LTMP client would connect to TCP port 0 by default + if the userdb did not provide a port to connect to. -2016-09-13 03:33:06 -0400 Josef 'Jeff' Sipek (f9c0271a2) +M src/lmtp/commands.c - doveadm: lowercase attribute names before trying to parse them +2016-08-06 17:59:10 +0200 Stephan Bosch (0b9667003) - This now matches what the imap server does. + istream-base64-encoder: Implemented proper stat function that returns the + encoded size of the stream. -M src/doveadm/doveadm-mail-mailbox-metadata.c + For Base64 encoding, the size of the encoded data can be determined from the + input data size exactly. -2016-09-13 03:32:06 -0400 Josef 'Jeff' Sipek (d05c38abd) +M src/lib/istream-base64-encoder.c +M src/lib/test-istream-base64-encoder.c - lib-storage: document mailbox and server attribute handling +2016-08-05 22:57:02 +0300 Timo Sirainen (48aee87c1) + dict-client: Fixed error message for failed synchronous dict_lookup() -M src/lib-storage/mailbox-attribute.h + The error message was allocated from data stack, but freed too early. -2016-09-23 14:59:33 +0300 Timo Sirainen (211d75a91) +M src/lib-dict/dict-client.c - login proxy: Don't leak connections if reconnect fails with "Host is down" +2016-08-04 22:15:25 +0300 Timo Sirainen (58764929b) - Double-disconnection was also attempting to close the same fd twice, but I - think that couldn't have happened before this leak was fixed. + lib-dcrypt: Fixed test-stream unit test not to leak memory -M src/login-common/login-proxy.c + Broken by previous change. -2016-09-22 14:14:23 +0300 Aki Tuomi (b0f7c3f61) +M src/lib-dcrypt/test-stream.c - lib: Add test for pending io without timeouts +2016-08-04 21:51:18 +0300 Timo Sirainen (a9e71f5a0) + lib-auth: Unescape passdb/userdb extra fields. -M src/lib/test-ioloop.c + This only affected \001, \t, \r and \n characters which were left + tab-escaped (e.g. \t as "\001t"). -2016-09-22 14:13:43 +0300 Aki Tuomi (34e1b3a81) +M src/lib-auth/auth-master.c - lib: Update ioloop attributes +2016-08-04 21:44:08 +0300 Timo Sirainen (b671974c5) - With pending IO, the ioloop attributes still need updating, instead of just - returning. + lib-dcrypt: Added unit tests to nonblocking istream-decrypt -M src/lib/ioloop.c -2016-09-22 14:23:00 +0300 Timo Sirainen (3cefb7d29) +M src/lib-dcrypt/test-stream.c - lib-mail: message_header_hash_more() now allows input in any slices. +2016-08-04 21:38:30 +0300 Timo Sirainen (12fed8013) - There wasn't necessarily any guarantees that the input would be sliced in - such a way that the repeating '?' would be dropped the same way every time. + lib-dcrypt: test-stream writes now to buffer, not to temp-iostream -M src/doveadm/dsync/dsync-mail.c -M src/lib-mail/message-header-hash.c -M src/lib-mail/message-header-hash.h -M src/lib-mail/test-message-header-hash.c -M src/plugins/pop3-migration/pop3-migration-plugin.c + This simplifies the following change. -2016-09-22 14:16:12 +0300 Timo Sirainen (a3caf917d) +M src/lib-dcrypt/test-stream.c - lib-mail: Removed obsolete comment about message_header_hash_more() +2016-08-04 21:29:14 +0300 Timo Sirainen (4930d4fef) - pop3-migration plugin uses this function now, so it doesn't need to be kept - in sync. + lib-dcrypt: Support nonblocking istreams. -M src/lib-mail/message-header-hash.c -2016-09-22 13:47:42 +0300 Timo Sirainen (a3963433f) +M src/lib-dcrypt/istream-decrypt.c - pop3-migration: "first POP3 msg" warning didn't actually show the first one. +2016-08-04 19:45:35 +0300 Martti Rannanjärvi (68f961aca) - It was showing the first index in an array, which had nothing to do with - being the first POP3 message number. + lib-dcrypt: add 0 to 400 byte stream test -M src/plugins/pop3-migration/pop3-migration-plugin.c + Remove 8 byte speacial case also. -2016-09-22 13:38:33 +0300 Timo Sirainen (051db9c68) +M src/lib-dcrypt/test-stream.c - dbox: mailbox_update() shouldn't reset pop3-uidl header. +2016-08-04 18:35:53 +0300 Martti Rannanjärvi (23386f0e8) - This broke reading migrated POP3 UIDLs. + lib-dcrypt: error message on missing decrypt key or password -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c + Return a sensible error message when loading an encrypted private key is + attempted but the decrypt key or password is missing. -2016-09-21 20:50:24 +0300 Timo Sirainen (566c9a223) +M src/lib-dcrypt/dcrypt-openssl.c - login-proxy: Fixed "Host is down" never reseting itself. +2016-08-04 17:11:20 +0300 Timo Sirainen (5b6bfa394) - Broken by c8eb8314a, which moved adding num_waiting_connections earlier. - After that it was never 0 at the check time. + lib-http: Support per-request timeout and max_attempts -M src/login-common/login-proxy.c -2016-09-21 16:17:26 +0300 Timo Sirainen (e7d12f188) +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h - lib: test-istream-chain fixes +2016-08-02 23:25:57 +0300 Timo Sirainen (c3a2a487e) + director: Throttle user move/kill failure errors after 100/sec. -M src/lib/test-istream-chain.c + If it happened to a lot of users, they can take a lot of space in logs. -2016-09-20 18:08:10 +0300 Timo Sirainen (bfed4b149) +M src/director/director.c +M src/director/director.h +M src/director/main.c - lib-dcrypt: Don't finalize encryption on o_stream_flush() +2016-08-02 23:14:23 +0300 Timo Sirainen (ed1e90943) - For example the default o_stream_uncork() implementation enforces flushing - and it's probably better not to change that. In general there's really no - reason to perform the finalization at flush when the stream can't be written - to anymore (whereas lib-compression ostreams allow writes after flushes). + lib: Added log throttling API. -M src/lib-dcrypt/ostream-encrypt.c -2016-09-21 13:26:30 +0300 Timo Sirainen (946de454a) +M src/lib/Makefile.am +A src/lib/log-throttle.c +A src/lib/log-throttle.h +M src/lib/test-lib.c +M src/lib/test-lib.h +A src/lib/test-log-throttle.c - lib: Fixed istream-chain when it has multiple "previous streams". +2016-08-04 17:39:02 +0300 Martti Rannanjärvi (7e3adf79e) - Fixes assert: Panic: file istream-chain.c: line 223 (i_stream_chain_read): - assertion failed: (cur_data_pos == data_size) + lib-dcrypt: don't give strstr NULL in test-crypto - Unit test for it by Stephan Bosch. -M src/lib/istream-chain.c -M src/lib/test-istream-chain.c +M src/lib-dcrypt/test-crypto.c -2016-09-21 12:19:18 +0300 Timo Sirainen (ca0eec0d4) +2016-07-15 09:53:12 +0200 x16a0 (42c773260) - doveadm fs get: Fixed logging error messages. + Fixed searching multiple mailboxes - The error is in istream, not in fs. + When searching multiple mailboxes, a condition to search these mailboxes is + added to the query string. However, this condition has to be separated from + the preceding condition by a space (a '+' in this case, as it's encoded); + otherwise, Solr considers it to be part of the previous condition, in which + case it will fail to parse it properly. Therefore, this patch adds that one + missing character so it works again. -M src/doveadm/doveadm-fs.c +M src/plugins/fts-solr/fts-backend-solr.c -2016-09-20 21:06:22 +0300 Aki Tuomi (e26249c8c) +2016-08-02 22:31:50 +0300 Timo Sirainen (9224645cf) - imap-login: Add missing brace + director: Added more debug information to "Ping timed out" error -M src/imap-login/imap-proxy.c +M src/director/director-connection.c -2016-09-20 18:51:18 +0300 Aki Tuomi (24068f99b) +2016-08-04 20:21:27 +0300 Aki Tuomi (43ca8bce8) - imap-proxy: Fix typo in comment + istream-decrypt: Fix error handling in stream header -M src/imap-login/imap-proxy.c +M src/lib-dcrypt/istream-decrypt.c -2016-09-20 15:02:42 +0300 Aki Tuomi (4b7ae2a9f) +2016-08-04 19:39:56 +0300 Aki Tuomi (b91d91633) - imap-login: Honor nopipelining during preauth + lib-dcrypt: Skip checks if no backend found -M src/imap-login/imap-proxy.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c -2016-09-20 12:47:32 +0300 Aki Tuomi (5983575af) +2016-08-04 12:57:58 +0300 Martti Rannanjärvi (fadd4c929) - lib-dcrypt: Set NOPLUGIN_LDFLAGS to empty + lib-dcrypt: drop format from key_load_public - Avoids -Wl,--as-needed here -M src/lib-dcrypt/Makefile.am +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt-private.h +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/dcrypt.h +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c -2016-09-20 10:52:08 +0300 Aki Tuomi (dca450b30) +2016-08-04 12:52:20 +0300 Martti Rannanjärvi (401160c5c) - lib-dcrypt: Makefile.am fix + lib-dcrypt: drop format from key_load_private - Remove dcrypt.c from openssl library and add missing slash -M src/lib-dcrypt/Makefile.am +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt-private.h +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/dcrypt.h +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c -2016-09-16 15:50:22 +0300 Aki Tuomi (7cf692d72) +2016-08-04 12:19:05 +0300 Martti Rannanjärvi (e18373bc5) - lib: Ensure handler_context is not NULL + lib-dcrypt: get_info in openssl_load_private_key - handler context must not be NULL here. + Use dcrypt_openssl_key_string_get_info to determine the key format instead + of taking it as a parameter. -M src/lib/ioloop-epoll.c +M src/lib-dcrypt/dcrypt-openssl.c -2016-09-16 15:49:36 +0300 Aki Tuomi (b03157a2c) +2016-08-04 10:54:20 +0300 Martti Rannanjärvi (2931ea8e1) - lib: Prevent crash in ioloop + lib-dcrypt: get_info in openssl_load_public_key - If only non-fd sources and no timeouts are in ioloop, prevent crash and - unnecessary waiting when there are pending IOs. + Use dcrypt_openssl_key_string_get_info to determine the key format instead + of taking it as a parameter. -M src/lib/ioloop.c +M src/lib-dcrypt/dcrypt-openssl.c -2016-09-19 16:20:14 +0300 Timo Sirainen (ec50efeec) +2016-08-03 17:55:15 +0300 Martti Rannanjärvi (0be999755) - lib: Assert if i_stream_create_seekable_path(temp_path_prefix==NULL) + lib-dcrypt: change v2 key field separator to ':' - If the stream becomes large enough it would crash then in a callback - function, which makes debugging more difficult. -M src/lib/istream-seekable.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/test-crypto.c -2016-09-19 12:27:16 +0300 Aki Tuomi (ea091ce92) +2016-08-04 15:57:22 +0300 Aki Tuomi (b617e6cf3) - fts-plugin: Remove NULL assert + lib-dcrypt: Do not unref key twice - fts_backend_update_deinit will set box to NULL and call update_set_mailbox - then. NULL check needs to be done in backends. -M src/plugins/fts/fts-api.c +M src/lib-dcrypt/dcrypt-openssl.c -2016-09-19 12:26:46 +0300 Aki Tuomi (04a1b3850) +2016-08-03 10:14:35 +0300 Aki Tuomi (dd49f9933) - fts-backend-solr: Check that box is not NULL + lib-dcrypt: Handle short reads in header correctly - fts_backend_update_deinit will set box to NULL and call update_set_mailbox - then. -M src/plugins/fts-solr/fts-backend-solr.c +M src/lib-dcrypt/istream-decrypt.c -2016-09-19 12:26:08 +0300 Aki Tuomi (ff3bf633a) +2016-07-25 14:04:47 +0300 Martti Rannanjärvi (e78065a71) - fts-backend-lucene: Check that box is not NULL + lib-dcrypt: add crashing 8 byte garbage read test - fts_backend_update_deinit will set box to NULL and call update_set_mailbox - then. -M src/plugins/fts-lucene/fts-backend-lucene.c +M src/lib-dcrypt/test-stream.c -2016-09-17 12:57:00 +0300 Aki Tuomi (461e4c7e6) +2016-07-15 16:31:01 +0300 Aki Tuomi (cce36a2c5) - auth-policy: Ref/unref auth request + dcrypt: Update API for testing - If auth_request is not referenced it can go away before HTTP response is - handled. -M src/auth/auth-policy.c +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c -2016-09-16 17:13:24 +0300 Timo Sirainen (69de25155) +2016-07-15 16:30:51 +0300 Aki Tuomi (55a7fe1e4) - fs-randomfail: Operation is unfinished on EAGAIN, not ENOENT. + dcrypt-iostream: Ref/unref keys - This caused crashes and other problems when using randomfail with - asynchronous fs drivers. -M src/lib-fs/fs-randomfail.c +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/ostream-encrypt.c -2016-09-15 11:30:15 +0300 Timo Sirainen (68571169a) +2016-07-15 16:27:03 +0300 Aki Tuomi (a53b81d08) - lib: safe_mkstemp*() didn't always truncate prefix back to original on - failure. + dcrypt: Use refcounting on keys - This caused repeated safe_mkstemp*() calls with the same prefix to keep - increasing its size. It probably didn't really break anything (unless it was - called enough many times to reach 255 filename length), but the filenames - were still confusingly ugly. -M src/lib/safe-mkstemp.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt-private.h +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/dcrypt.h -2016-09-15 10:23:41 +0300 Timo Sirainen (f2ade3006) +2016-08-04 08:55:12 +0300 Aki Tuomi (f9258697f) - pop3-migration: Fixed crash when not specifying pop3_migration_mailbox - setting. + last-login: Add error handling for commit -M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/last-login/last-login-plugin.c -2016-09-14 14:19:39 +0300 Timo Sirainen (7736f24e8) +2016-08-03 13:18:17 +0300 Timo Sirainen (feda87200) - iostream-temp: If write() to temp file fails at any time, move it back to - memory. + lib-index: Fixed debug logging. - Similarly to if the write() to temp fails during the initial move attempt. - This way even if write() fails due to out of disk space, it's not visible to - caller. An error message is logged in any case. -M src/lib/iostream-temp.c -M src/lib/iostream-temp.h +M src/lib-index/mail-cache-lookup.c -2016-09-14 19:06:29 +0300 Timo Sirainen (c06590cb3) +2016-07-29 01:02:29 +0300 Timo Sirainen (f883b315c) - pop3-migration: Avoid unnecessarily using stream's hdr_size. + lib-index: If mail_debug=yes, log cache compressions. - Shouldn't change any behavior, except reduce CPU usage a little bit. -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/pop3-migration/pop3-migration-plugin.h -M src/plugins/pop3-migration/test-pop3-migration-plugin.c +M src/lib-index/mail-cache-compress.c +M src/lib-index/mail-index.h +M src/lib-storage/index/index-storage.c -2016-09-14 18:57:43 +0300 Timo Sirainen (f75889f56) +2016-07-25 14:20:05 -0400 Timo Sirainen (02b78558d) - imapc: mail_get_stream() shouldn't return cached hdr_size + Use mail_get_*stream_because() wherever possible. -M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-mail.h +M src/lib-storage/index/index-search.c +M src/lib-storage/mail-copy.c +M src/plugins/fts/fts-build-mail.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/pop3/pop3-commands.c -2016-09-13 22:54:02 +0200 Stephan Bosch (9d0e2470e) +2016-07-29 00:37:07 +0300 Timo Sirainen (99d5f0bf1) - lib-http: client: Fixed hang occurring when nested ioloops are used in - response callbacks. + lib-index: Added mail_cache_get_missing_reason() - To prevent missing disconnect events, i_stream_read() is called once a - change in ioloop is detected. However, if something was actually read into - the stream, the input handler was never called. So, a response could linger - in the stream buffer, without being handled, thereby causing the connection - to hang indefinitely. An additional input event could end the hang, but - sometimes this doesn't happen before the request times out. - This problem was seen in test-http-payload once in about 10 invocations. - Obox uses nested ioloops, to this applies there. +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-cache.h -M src/lib-http/http-client-connection.c +2016-07-25 14:16:39 -0400 Timo Sirainen (2c8ca7e88) -2016-09-10 11:32:28 +0300 Timo Sirainen (ecdabaf86) + lib-storage: Added mail_get_stream_because() and + mail_get_hdr_stream_because() - doveadm-auth: Handle unexpected auth "continue" request without crashing. + With mail_debug=yes each mail access is now logged with a reason. This can + be helpful when figuring out why something isn't in dovecot.index.cache. +M src/lib-storage/index/index-mail.c +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage.h +M src/lib-storage/mail.c -M src/doveadm/doveadm-auth.c +2016-08-02 21:16:15 +0300 Timo Sirainen (350d6194f) -2016-09-10 11:28:38 +0300 Timo Sirainen (6f9474581) + doveadm proxy kick: Fixed output message. - lib-lda: Cleanup error handling in LMTP client code. - If there are no successful recipients, we'll need to deinit the client. But - at that point we've already called all the callbacks, so the line parameter - to lmtp_client_fail_full() isn't actually used anywhere. This was confusing - static analyzer because global_fail_string was used as parameter, which - could have been NULL and wouldn't have been valid for the callbacks. +M src/doveadm/doveadm-proxy.c -M src/lib-lda/lmtp-client.c +2016-08-02 21:10:42 +0300 Timo Sirainen (85b6e401b) -2016-09-10 11:16:05 +0300 Timo Sirainen (41d91454b) + lib-lda: Support %{storage_id} in deliver_log_format - lib-master: Fixed memory leak when IPC server is handling commands. - This mainly meant that when login processes responded to doveadm proxy - list/kick commands memory was leaked. +M src/lib-lda/mail-deliver.c -M src/lib-master/ipc-server.c +2016-08-02 21:09:34 +0300 Timo Sirainen (6f3244c59) -2016-09-10 11:13:58 +0300 Timo Sirainen (b49ca324e) + lib-lda: Code cleanup - move code to mail_deliver_open_mail() - dict-client: Don't crash if dict-server returns broken reply. + No functional changes. On its own this is a rather useless cleanup, but + simplifies the next patch. - Just treat missing value as empty value. +M src/lib-lda/mail-deliver.c -M src/lib-dict/dict-client.c +2016-08-02 20:09:49 +0300 Timo Sirainen (50da38c08) -2016-09-09 18:18:32 +0300 Timo Sirainen (88eab5220) + imap: When un-hibernating, send notification to imap-hibernate process + earlier. - auth: Make sure auth_request_log_info() doesn't crash when there are no - passdbs + The initialization shouldn't take a long time, but there's really no need to + keep imap-hibernate itself waiting (and maybe timing out) if it does. - auth_request_is_disabled_master_user() could have caused such crash. +M src/imap/imap-master-client.c -M src/auth/auth-request.c +2016-08-02 20:03:01 +0300 Timo Sirainen (c7a9a1fdd) -2016-09-09 18:12:41 +0300 Timo Sirainen (abea9d7b6) + imap-hibernate: If un-hibernation failed due to timeout, log whether we saw + version line. - auth: Explicitly ignore return value to make static analyzer happier. + Could help with debugging. +M src/imap-hibernate/imap-master-connection.c -M src/auth/auth-policy.c +2016-07-19 10:16:17 -0600 Timo Sirainen (170624050) -2016-09-09 18:10:29 +0300 Timo Sirainen (83ad90e5d) + imap-hibernate: If imap-master socket is busy, retry un-hibernation later. - Added asserts to make static analyzer happier. +M src/imap-hibernate/imap-client.c +M src/imap-hibernate/imap-client.h +M src/imap-hibernate/imap-master-connection.c +M src/imap-hibernate/imap-master-connection.h +M src/imap-hibernate/main.c -M src/lib-fs/fs-posix.c -M src/lib-index/mailbox-log.c -M src/lib-stats/stats-connection.c -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib/istream-file.c -M src/login-common/login-proxy-state.c -M src/plugins/fts/fts-api.c -M src/plugins/virtual/virtual-mail.c +2016-08-02 13:41:07 +0300 Timo Sirainen (e539ff946) -2016-09-09 18:07:15 +0300 Timo Sirainen (0ee86a8eb) + lib: var_has_key() properly ignores key=='\0' now. - Removed dead code to make static analyzer happier. +M src/lib/test-var-expand.c +M src/lib/var-expand.c +M src/lib/var-expand.h -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-storage/index/dbox-common/dbox-save.c -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/mail-storage.c -M src/plugins/fts-squat/squat-trie.c +2016-08-02 13:38:25 +0300 Timo Sirainen (7a556ac46) -2016-09-09 17:55:20 +0300 Timo Sirainen (d46401000) + lib: var_get_key() didn't handle %{long_variables} correctly - lib-storage: Fix potential crash when userdb-returns "key+=value" for a - nonexistent setting. + This also fixes var_has_key()'s long_key handling. - type would have also happened to be initialized to SET_STR for the crash to - happen. +M src/lib/test-var-expand.c +M src/lib/var-expand.c +M src/lib/var-expand.h -M src/lib-storage/mail-storage-service.c +2016-08-02 01:04:57 +0300 Timo Sirainen (6d38e3f15) -2016-09-09 17:36:39 +0300 Timo Sirainen (7ee368a94) + --without-shared-libs was linking libdovecot.so to mail binaries. - lib-imap-urlauth: Don't access freed memory on errors. + Broken by e42dd7149. +M src/lib-storage/Makefile.am -M src/lib-imap-urlauth/imap-urlauth-connection.c +2016-07-23 12:02:29 -0400 Timo Sirainen (a63cd8412) -2016-09-13 07:22:03 +0300 Timo Sirainen (e90a0ed00) + lib-fs: Added fs_get_nlinks() - imap, pop3: Added rawlog_dir setting to store IMAP/POP3 traffic logs. + Although fs_stat() could return this, its caller can't indicate whether it + actually wants the link count. Usually fs_stat() is used only to get the + file's size. In some backends it's not cheap to get the link count, so + adding this function allows the caller to explicitly ask for it. - This at least partially replaces the "rawlog" post-login binary. For now the - "rawlog" binary supports some parameters, which aren't configurable for - rawlog_dir. +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test.c +M src/lib-fs/fs-wrapper.c +M src/lib-fs/fs-wrapper.h +M src/plugins/fs-compress/fs-compress.c -M src/imap/imap-client.c -M src/imap/imap-settings.c -M src/imap/imap-settings.h -M src/pop3/pop3-client.c -M src/pop3/pop3-settings.c -M src/pop3/pop3-settings.h +2016-07-22 10:47:20 +0300 Martti Rannanjärvi (6657aee0b) -2016-09-09 15:51:43 +0300 Aki Tuomi (9c96b04f2) + lib: return non-NULL pointer in i_stream_get_data when size is 0 - pop3-migration-plugin: Add to index after successful retry - Also change return value to indicate that the hash has been assigned to - header. +M src/lib/istream.c +M src/lib/istream.h -M src/plugins/pop3-migration/pop3-migration-plugin.c +2016-07-25 17:41:36 -0400 Timo Sirainen (878c4d5ee) -2016-09-12 09:47:26 +0300 Aki Tuomi (63648d35c) + dict-client: Don't keep a request timeout when there are only background + commands. - doveconf: Hide any _api_key +M src/lib-dict/dict-client.c -M src/config/doveconf.c +2016-07-25 17:32:11 -0400 Timo Sirainen (8604a0675) -2016-08-16 12:28:27 +0300 Aki Tuomi (5affc316c) + dict-client: When we get disconnected, reconnect and re-send commands. - doveconf: hide ssl_key without -P +M src/lib-dict/dict-client.c -M src/config/doveconf.c +2016-07-25 17:08:18 -0400 Timo Sirainen (d0fa29db7) -2016-09-05 16:26:56 +0300 Phil Carmody (8d41c2d42) + dict-client: Improved timeout error message - plugins: fts - replace i_assert under _expunge_log_subtract with warning - (API change) - The helper whose interface is changing currently has no other known clients - (there's little need for it to be exposed at all). +M src/lib-dict/dict-client.c - This should never happen, but if it does, just tally the number of times it - happened, and squirt out a warning message after the whole subtract. If it - happens at all, there's no reason not to expect a lot, so only warn once per - file. +2016-08-02 01:02:59 +0300 Timo Sirainen (ee8c7d8ee) - In particular - do not assert crash when this is seen - it has been seen on - live test systems where file corruption seems to have occured. As this can - only be associated with corrupt fts indexes, seeing this error implies that - the whole FTS index should be rebuilt for that user. + dict-client: Fixed hang in async iteration if it failed. - Signed-off-by: Phil Carmody -M src/plugins/fts/fts-expunge-log.c -M src/plugins/fts/fts-expunge-log.h +M src/lib-dict/dict-client.c -2016-08-10 13:07:01 +0300 Aki Tuomi (ad082a8bf) +2016-08-01 22:18:08 +0300 Timo Sirainen (13a2b020c) - lib-storage: Limit folder full name only + quota: Log an error if mail's size can't be read. - Before we had limit of 16 levels and 255 bytes per name which is same as - 4096 bytes. Now we limit only the total length of the name to - MAILBOX_LIST_NAME_MAX_LENGTH. For compability reasons, we are restricting - individual component names to 255 characters. + We were still logging "Internal quota calculation error" but not necessarily + any other reason. -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c +M src/plugins/quota/quota.c -2016-08-22 16:13:32 +0300 Timo Sirainen (38a254286) +2016-07-23 23:58:46 +0300 Martti Rannanjärvi (9745f03bb) - fs-metawrap: Added assert to make sure we don't create empty files. + lib,lib-test: i_warning to i_debug on alloc growing messages - It seems like this could be happening in some situation. -M src/lib-fs/fs-metawrap.c +M src/lib-test/test-common.c +M src/lib/data-stack.c +M src/lib/mempool-alloconly.c -2016-09-09 02:48:45 +0300 Timo Sirainen (bd64561d6) +2016-07-29 00:59:43 +0300 Timo Sirainen (62736944d) - fs-randomfail: Fixed assert-crash in fs_write_stream_abort_error() + lib-storage: mbox_min_index_size setting didn't work correctly. -M src/lib-fs/fs-randomfail.c +M src/lib-storage/index/index-storage.c -2016-09-09 01:42:50 +0300 Timo Sirainen (063b8d801) +2016-07-28 21:15:16 +0300 Timo Sirainen (9200ff3f7) - imap-hibernate: Increased imap-master communication timeout from 5s to 30s + lib-storage: Don't crash fetching body.snippet when multipart/alternative + part has no Content-Type - Looks like 5s isn't enough in loaded environments. It's also not really a - problem if the timeout is large, it's just going to take a while longer to - restore the connection. When timeout is reached the client would just get - disconnected anyway. -M src/imap-hibernate/imap-master-connection.c +M src/lib-storage/index/index-mail.c -2016-09-09 14:07:11 +0300 Timo Sirainen (5186e3510) +2016-07-26 13:54:37 -0400 Timo Sirainen (e03bbb0f2) - lib-storage: Fixed accessing user as root when user has no uid. + imap: Fixed assert-crash when detecting if client IO is hanging. - This shouldn't normally be done, but might as well fix it. Fixes: + This was broken by 89d88a5bc. - Fatal: mail-storage-service: seteuid(4294967295) failed: Invalid argument +M src/imap/imap-client.c -M src/lib-storage/mail-storage-service.c +2016-07-26 13:53:56 -0400 Timo Sirainen (3b782d7e8) -2016-09-09 00:59:53 +0300 Timo Sirainen (8e757fc1b) + auth: Fixed caching to support %{passdb} and %{userdb} - lib-index: Fixed mail_index_modseq_get_next_log_offset() when accessing - .log.2 - file->sync_offset was set only after header, so sync_highest_modseq was also - same as initial_modseq. The previous code then just returned offset pointing - to sync_offset, which was too early. +M src/auth/auth-cache.c +M src/auth/test-auth-cache.c -M src/lib-index/mail-transaction-log-file.c +2016-07-26 13:52:44 -0400 Timo Sirainen (6dd436dbf) -2016-09-08 23:54:22 +0300 Timo Sirainen (32c834030) + auth: Set userdb_lookup flag correctly for blocking userdb lookups. - lib-index: Make sure new dovecot.index.log files start tracking modseqs. + This caused at least userdb-related logging to log the passdb instead. - This will make mail_index_modseq_get_next_log_offset() work correctly even - if modseqs haven't been explicitly enabled. +M src/auth/auth-worker-client.c -M src/lib-index/mail-transaction-log-file.c +2016-07-26 13:52:20 -0400 Timo Sirainen (415441507) -2016-08-23 22:36:08 +0300 Timo Sirainen (adf7780dd) + auth: Code cleanup - use const for struct auth_request. - lib-storage: Code cleanup for mailbox_get_expunge*() - The previous code did actually work as well, but it wasn't very obvious that - it did. +M src/auth/auth-request-var-expand.c +M src/auth/auth-request-var-expand.h -M src/lib-storage/mailbox-get.c +2016-07-25 14:09:38 -0400 Timo Sirainen (782a1e245) -2016-09-09 01:31:46 +0300 Timo Sirainen (d0b5b7e1e) + lazy-expunge: If lazy-expunge transaction failed already, stop further + expunges. - imap: When hibernating, wait for old imap process to cleanup before creating - new ones. + Most importantly if the lazy-expunge mailbox opening fails, we don't now + retry opening the mailbox for each expunged mail. - This fixes stats errors: +M src/plugins/lazy-expunge/lazy-expunge-plugin.c - stats: Error: FIFO input error: CONNECT: Duplicate session ID - Y7Q6E4U7xO1/AAAB for user testuser service imap stats: Warning: Couldn't - find session ID: Y7Q6E4U7xO1/AAAB +2016-07-24 18:26:50 -0400 Timo Sirainen (5140f38cb) -M src/imap-hibernate/imap-hibernate-client.c -M src/imap/imap-client-hibernate.c + lib: Potential compiling fix. -2016-09-09 02:50:27 +0300 Timo Sirainen (67c972905) + STATIC_ARRAY apparently requires that the parameter is named in some gcc + versions? In any case doesn't hurt. - lib-fs: Moved fs_write_stream_abort_parent() to fs-api-private.h +M src/lib/sha1.h - Only fs wrapper drivers are supposed to call it. +2016-07-13 09:46:08 +0200 Stephan Bosch (e6bc5e739) -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.h + Calling i_stream_next_line() on a chain stream would sometimes erroneously + use the stream->w_buffer. -2016-09-08 19:01:54 +0300 Martti Rannanjärvi (796336749) + It used the wrong check to assess whether the w_buffer is usable. The chain + stream only uses the w_buffer when partial stream data needs to be merged. + Otherwise, a parent stream's buffer is used directly. However, this does not + mean that w_buffer will be NULL in that case, which is what + i_stream_next_line() assumed. - lib-index: limit mail_index error prints to one per ioloop_time +M src/lib/istream.c - This is to prevent log flooding. +2016-07-11 20:27:48 +0300 Timo Sirainen (f52366af6) -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index.c + lib-dcrypt: Allow flushing ostream multiple times. -2016-09-09 10:38:10 +0300 Timo Sirainen (414857405) + The first time flushes the encryption and the following times just flush the + parent stream. - lib-test: Added missing va_end() call. +M src/lib-dcrypt/ostream-encrypt.c +2016-07-11 20:27:14 +0300 Timo Sirainen (0835df7f2) -M src/lib-test/test-common.c + lib-dcrypt: Improved error message when istream isn't encrypted. -2016-09-09 03:05:39 +0300 Timo Sirainen (bd30f04db) - lib-test: test_expect_errors() now works for the entire log string, not just - format parameter +M src/lib-dcrypt/istream-decrypt.c +2016-07-19 18:28:06 +0300 Timo Sirainen (cf6118fe7) -M src/lib-test/test-common.c + master: Don't leak master socket to child processes. -2016-08-09 18:29:19 +0300 Phil Carmody (f663500cb) - lib-test: test-exit helper to stop valgrind complaining about fork()s +M src/master/service-listen.c - fork()s that want to _exit() will cause valgrind's full memory leak checker - to complain a lot - this performs a quick cleanup first. +2016-07-17 13:51:05 -0600 Timo Sirainen (2e6356f8d) - Before: - phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes - --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix - ==19576== total heap usage: 4 allocs, 0 frees, 17,858 bytes allocated - istream unix ......................................................... : ok - 0 / 1 tests failed - ==19575== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated + fts: Fixed fts_autoindex when no fts_autoindex_exclude settings existed. - After: - phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes - --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix - istream unix ......................................................... : ok - ==4993== total heap usage: 4 allocs, 4 frees, 17,858 bytes allocated - 0 / 1 tests failed - ==4992== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated - Signed-off-by: Phil Carmody +M src/plugins/fts/fts-storage.c -M src/lib-test/test-common.c -M src/lib-test/test-common.h -M src/lib/test-istream-unix.c +2016-07-16 11:30:39 -0500 Timo Sirainen (c5d27aee7) -2016-07-12 13:28:54 +0300 Phil Carmody (7d436489b) + lib-dict: Added DICT_COMMIT_RET_WRITE_UNCERTAIN - lib-test: enable naming of tests, such that only a subset is run - How to use these will become clear in a subsequent patch. Even if you don't - want to name tests, the macros can reduce redundancy in the code, as the - list of test function prototypes and the list of test functions to call - become the same lists, expanded through 2 different macros. +M src/dict/dict-commands.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-client.h +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.h - Signed-off-by: Phil Carmody +2016-07-16 11:23:52 -0500 Timo Sirainen (9a3828947) -M src/lib-test/test-common.c -M src/lib-test/test-common.h + lib-dict: Added enum dict_commit_ret. -2016-06-01 13:57:34 +0300 Phil Carmody (8154226c0) - lib-test: improve expected error handling +M src/dict/dict-commands.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.h - If we expect a specific error string, then when we see it, suppress it. +2016-07-16 09:31:04 -0500 Timo Sirainen (bb2b3656e) - We do not suppress errors expected by count, because if we get unexpected - errors, then we do not want them suppressed, and we have no way of - distinguishing between the expected and unexpected errors. + lib-sql: Added error_type to commit callback. - This of course favours the use of the expected string version of the helper, - but alas that's not always usable, as you can only expect one at a time. - Additionally, if we failed to see an expected message, then when we no - longer expect to see it, reset the expected message state to not cascade - further test assertion failures. +M src/auth/passdb-sql.c +M src/lib-dict/dict-sql.c +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-mysql.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlite.c +M src/lib-sql/driver-sqlpool.c +M src/lib-sql/sql-api.h - Signed-off-by: Phil Carmody +2016-07-15 16:40:31 -0500 Timo Sirainen (5d9ecbcec) - Conflicts: - src/lib-test/test-common.c + cassandra: Support returning SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN -M src/lib-test/test-common.c -M src/lib-test/test-common.h -M src/lib/test-failures.c -2016-09-09 01:08:59 +0300 Timo Sirainen (3e2ec5a53) +M src/lib-sql/driver-cassandra.c - stats: Include PIDs in "Duplicate session ID" errors. +2016-07-15 16:40:05 -0500 Timo Sirainen (1601169d6) + lib-sql: Added sql_result_get_error_type(). -M src/stats/mail-session.c + For now the only special error type is + SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN. -2016-09-08 22:08:11 +0300 Timo Sirainen (54ee447f7) +M src/lib-sql/sql-api-private.h +M src/lib-sql/sql-api.c +M src/lib-sql/sql-api.h - lib-index: mail_index_modseq_get_next_log_offset() shouldn't return offset - beyond view's head +2016-07-15 11:31:25 +0300 Aki Tuomi (6c969ac21) - This also allows removing the same workaround from dsync code. + auth: Remove i_assert for credentials scheme -M src/doveadm/dsync/dsync-transaction-log-scan.c -M src/lib-index/mail-index-modseq.c -2016-09-07 11:52:00 +0300 Timo Sirainen (980f2d5f4) +M src/auth/auth-request.c - imap: Avoid wrongly assert-crashing in client_check_command_hangs() +2016-07-14 20:53:46 +0200 Stephan Bosch (49f2e4b6d) - Fixes assert: + Added LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE to dovecot.m4. - Panic: file imap-client.c: line 837 (client_check_command_hangs): assertion - failed: (client->io != NULL) -M src/imap/imap-client.c +M m4/dovecot.m4 -2016-09-08 20:23:35 +0300 Timo Sirainen (853992ac2) +2016-07-14 16:16:52 -0500 Timo Sirainen (ab2f731c4) - stats plugin: Don't send any stats before CONNECT was successfully sent. + dict: Fixed crash on iteration handling. - After stats write failures this fixes warnings like: Warning: stats: - Couldn't find session ID: smqAXQE8pIp/AAAB -M src/plugins/stats/mail-stats-connection.c -M src/plugins/stats/mail-stats-connection.h -M src/plugins/stats/stats-plugin.c -M src/plugins/stats/stats-plugin.h +M src/dict/dict-commands.c -2016-09-08 20:18:46 +0300 Timo Sirainen (e19ba44eb) +2016-07-14 07:22:04 -0500 Timo Sirainen (1cfe369d1) - lib-stats: stats_connection_send() now returns whether it succeeded or not + dict-client: Improved logging for slow queries. + Especially commits now say what the first query within the commit was. -M src/lib-stats/stats-connection.c -M src/lib-stats/stats-connection.h +M src/lib-dict/dict-client.c -2016-09-08 16:50:02 +0300 Timo Sirainen (ceb5ed309) +2016-07-14 06:53:54 -0500 Timo Sirainen (0d16e4b4b) - doveadm flags: Sync mailbox after committing transaction. + doveadm fetch: Fixed body.snippet. -M src/doveadm/doveadm-mail-flags.c +M src/doveadm/doveadm-mail-fetch.c -2016-09-07 22:06:55 +0300 Aki Tuomi (91f029608) +2016-07-13 15:10:57 -0500 Timo Sirainen (a956137aa) - lmtp: Always read settings before dropping privs + dbox: Initialize pop3-uidl header on INBOX creation. - If lmtp is ran explicitly as root, settings were not read. + This way we don't add any UIDLs to dovecot.index.cache on the first POP3 + UIDL access. We'll assume that pop3-uidl header is updated whenever any + backend UIDLs are added, which should happen nowadays. -M src/lmtp/main.c +M src/lib-storage/index/dbox-multi/mdbox-storage.c +M src/lib-storage/index/dbox-single/sdbox-storage.c -2016-09-07 22:00:14 +0300 Timo Sirainen (51b18a2c6) +2016-07-13 14:07:02 -0500 Timo Sirainen (9342a5f69) - imap: Fixed assert-crash if un-hibernation failed to initialize user. + lib-storage: Initialize pop3-uidl header also when no backend UIDLs exist. - master_service_client_connection_destroyed() was also being called in - imap_master_client_destroy() so it was done twice. + The first time POP3 UIDL command is used, set the header even when there are + no backend UIDLs to prevent any further UIDL caching. - Fixes: Panic: file master-service.c: line 775 - (master_service_client_connection_destroyed): assertion failed: - (service->total_available_count > 0) +M src/lib-storage/index/index-pop3-uidl.c -M src/imap/imap-master-client.c +2016-07-11 14:56:41 +0300 Aki Tuomi (e84ffebc2) -2016-09-05 12:42:08 +0300 Aki Tuomi (b3a373128) + auth: Fail request if last passdb is noauthenticate - fs-api: Retrieve errno before dest->copy_output is NULL'ed - CID 10144: When aborting output, errno retrieval is attempted after - dest->copy_output has already been unreffed. Found by coverity. +M src/auth/auth-request.c -M src/lib-fs/fs-api.c +2016-07-11 14:56:25 +0300 Aki Tuomi (ec18e7378) -2016-09-06 09:24:06 +0300 Aki Tuomi (55992ff06) + gssapi: Add missing PASSDB_RESULT_NEXT clause - lib-storage: Check that UID is set before caching +M src/auth/mech-gssapi.c -M src/lib-storage/index/index-mail-binary.c +2016-07-11 16:13:28 +0300 Timo Sirainen (185f63aef) -2016-09-06 09:23:54 +0300 Aki Tuomi (86fe00056) + lib-fs: Added fs_metadata_init_or_clear() helper - lib-imap-storage: Check that UID is assigned before caching +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c -M src/lib-imap-storage/imap-msgpart.c +2016-07-11 14:18:36 +0300 Aki Tuomi (448e068f2) -2016-09-05 15:56:05 +0300 Aki Tuomi (ff405d544) + passdb: Skip credentials handling for noauthenticate - zlib-plugin: Check that UID is assigned - When caching, code has to check whether UID is assigned to avoid reusing - cache for different email since they all have UID = 0 before they are - actually committed. +M src/auth/passdb.c -M src/plugins/zlib/zlib-plugin.c +2016-07-07 08:59:18 +0300 Aki Tuomi (85bc1cc40) -2016-09-06 16:17:13 +0300 Aki Tuomi (1bac2e496) + lib-dovecot: Turn on RELRO - quota: Flush quota after recalc - Correctly fix issue where the dict commit is left unfinished. +M src/lib-dovecot/Makefile.am -M src/plugins/quota/doveadm-quota.c +2016-07-11 11:28:10 +0300 Timo Sirainen (a1943bdb8) -2016-09-06 16:02:26 +0300 Aki Tuomi (e525e4215) + lib-storage: Fixed crash on subscription listing if subscription refresh + fails. - lib-dict: Discard result when callback is NULL on async call +M src/lib-storage/list/mailbox-list-iter.c -M src/lib-dict/dict-client.c +2016-07-09 20:11:45 +0300 Aki Tuomi (6e5a4cdf7) -2016-09-06 02:56:39 +0300 Timo Sirainen (6a008d83f) + auth: Skip authentication with noauthenticate - lib-dcrypt: Avoid infinite loop if istream header is too large. - We'll return an error now instead. We can't just return -2 here, because - nothing was actually being returned to the caller. Attempting to do that - would just trigger an assert: +M src/auth/auth-master-connection.c +M src/auth/auth-request-handler.c +M src/auth/auth-request.c +M src/auth/auth-worker-client.c +M src/auth/passdb-blocking.c +M src/auth/passdb-sql.c +M src/auth/passdb.h - Panic: file istream.c: line 182 (i_stream_read): assertion failed: - (_stream->skip != _stream->pos) +2016-07-11 11:55:34 +0300 Timo Sirainen (3aae88447) -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/test-stream.c + mdbox: Fixed crash when saving POP3 UIDLs to a non-empty mailbox. -2016-08-25 12:27:51 +0300 Aki Tuomi (b5d604ba1) + Fixes assert: - dcrypt: Test for stream prefetch + Panic: file mdbox-save.c: line 337: unreached +M src/lib-storage/index/dbox-multi/mdbox-save.c -M src/lib-dcrypt/test-stream.c +2016-07-11 11:40:41 +0300 Timo Sirainen (d546cddd1) -2016-08-25 12:26:55 +0300 Aki Tuomi (527d6c592) + pop3c: Fixed crash in syncing when local indexes existed but UIDL wasn't + cached. - dcrypt: Allow stream prefetch - We might get stream that has already been buffered, so we must try read it - in case buffer is full. +M src/lib-storage/index/pop3c/pop3c-sync.c -M src/lib-dcrypt/istream-decrypt.c +2016-07-11 10:22:06 +0300 Timo Sirainen (1c6d55fc2) -2016-08-31 20:14:41 +0300 Phil Carmody (2e7a0190d) + lmtp: Don't send double-DISCONNECT to anvil. - Fix control flow and T_BEGIN/T_END hygiene + Happened with lmtp_user_concurrency_limit > 0. Fixes errors like: - You mustn't goto, break, continue, or return from out of a T_BEGIN {...} - T_END block, as that will lose a t_pop(). This has been seen in the wild: - Panic: Leaked t_pop() call + Error: connect limit: disconnection for unknown pid 123 + ident + lmtp/username - Signed-off-by: Phil Carmody +M src/lmtp/commands.c -M src/director/login-connection.c -M src/lib/file-lock.c +2016-07-06 23:41:18 +0300 Timo Sirainen (cbe62867a) -2016-08-31 09:20:49 +0300 Aki Tuomi (cfb4971cc) + Compiler warning fix - lib-fs: Do not abort parent of parent +M src/doveadm/doveadm-zlib.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-wrapper.c -M src/plugins/fs-compress/fs-compress.c +2016-07-06 15:11:54 +0300 Aki Tuomi (99c74b7e9) -2016-08-28 18:40:01 +0300 Aki Tuomi (8dfdcd157) + m4: Include BINARY_* - doveadm-server: Reset error code between calls +M m4/dovecot.m4 -M src/doveadm/client-connection.c +2016-04-19 16:02:38 +0300 Aki Tuomi (b200bc387) -2016-08-28 19:55:29 +0300 Aki Tuomi (0204e1fcc) + Add PIE and RELRO to binaries - stats: Reset nearly all global mail stats - We leave num_connected_sessions alone. +M src/anvil/Makefile.am +M src/auth/Makefile.am +M src/config/Makefile.am +M src/dict/Makefile.am +M src/director/Makefile.am +M src/dns/Makefile.am +M src/doveadm/Makefile.am +M src/imap-hibernate/Makefile.am +M src/imap-login/Makefile.am +M src/imap-urlauth/Makefile.am +M src/imap/Makefile.am +M src/indexer/Makefile.am +M src/ipc/Makefile.am +M src/lda/Makefile.am +M src/lib-dict/Makefile.am +M src/lib-ntlm/Makefile.am +M src/lib-otp/Makefile.am +M src/lmtp/Makefile.am +M src/log/Makefile.am +M src/master/Makefile.am +M src/plugins/fts/Makefile.am +M src/plugins/quota/Makefile.am +M src/pop3-login/Makefile.am +M src/pop3/Makefile.am +M src/replication/aggregator/Makefile.am +M src/replication/replicator/Makefile.am +M src/ssl-params/Makefile.am +M src/stats/Makefile.am +M src/util/Makefile.am -M src/stats/client-reset.c +2016-04-19 14:52:56 +0300 Aki Tuomi (14a7cd466) -2016-08-28 19:14:08 +0300 Aki Tuomi (ea0bb9e18) + configure: Check for hardening flags - stats: Fix user login counters - Before we would count all users twice, because the same counters would get - increment in both CONNECT and ADD-USER. Now we do not increment them at all - on ADD-USER. +M configure.ac +M dovecot-config.in.in +A m4/cc_fortify.m4 +A m4/cc_pie.m4 +A m4/cc_stack_protector.m4 +A m4/ld_relro.m4 -M src/stats/mail-domain.c -M src/stats/mail-session.c -M src/stats/mail-user.c +2016-07-01 03:08:31 +0300 Timo Sirainen (c5924dd8f) -2016-08-24 03:56:44 -0400 Josef 'Jeff' Sipek (7ba262b34) + global: Removed redundant corking in ostream flush callbacks. - lib-master: don't leak config path - The config path can already be non-NULL thanks to the default config path - code or the CONFIG_PATH environmental variable. +M src/director/director-connection.c +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/server-connection.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/imap-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-lda/lmtp-client.c +M src/login-common/login-proxy.c +M src/pop3/pop3-client.c +M src/stats/client.c -M src/lib-master/master-service.c +2016-07-01 03:03:02 +0300 Timo Sirainen (89d88a5bc) -2016-08-23 23:31:40 +0300 Aki Tuomi (37ff60809) + lib: ostream-file now automatically corks during flush callback. - lib-fs: abort parent in fs_file_write_stream_abort_parent +M src/lib/ostream-file.c -M src/lib-fs/fs-api.c +2016-07-05 18:15:55 +0300 Timo Sirainen (8b3f557cd) -2016-08-23 13:06:09 +0300 Timo Sirainen (30a61cbc3) + fs-sis*: Use fs_wrapper_*() wherever possible - imap: Track how much time was spent on waiting for locks. +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-commands.c +2016-07-05 18:12:33 +0300 Timo Sirainen (e4d6ec308) -2016-08-23 12:55:24 +0300 Timo Sirainen (5b0597238) + fs-sis*: Minor error handling function cleanups. - dict-client: In slow query warnings, log time spent in ioloop and lock - waits. + We don't really need to go to the parent fs, so just use what is easiest. - Possibly we want to remove the warnings entirely if most of the time has - been spent on lock waits (or alternatively: not spent in ioloop). +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c -M src/lib-dict/dict-client.c +2016-07-05 18:03:36 +0300 Timo Sirainen (bc5c7fcad) -2016-08-23 12:48:21 +0300 Timo Sirainen (09d0a0a6f) + fs-sis*: Removed unnecessary error copying. - lib: Track how much time has been spent on waiting for locks. + It was probably needed in the beginning, but nowadays the parent-most fs + keeps the error. There's no need to copy it around. +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c -M src/lib/file-dotlock.c -M src/lib/file-lock.c -M src/lib/file-lock.h +2016-07-05 17:59:08 +0300 Timo Sirainen (35f48128b) -2016-08-23 14:08:11 +0300 Timo Sirainen (1fd44e063) + fs-metawrap: Use fs_wrapper_*() wherever possible - imap: Fixed expunge handling when un-hiberanting - Fixes these errors: +M src/lib-fs/fs-metawrap.c - Failed to import client state: Message count mismatch after handling - expunges Message UIDs CRC32 mismatch +2016-07-05 17:55:12 +0300 Timo Sirainen (b8584946d) -M src/imap/imap-state.c + fs-compress: Use fs_wrapper_*() wherever possible -2016-08-23 20:12:47 +0300 Aki Tuomi (8ff16d0a8) - lib-fts: Add missing include +M src/plugins/fs-compress/fs-compress.c +2016-07-05 17:52:00 +0300 Timo Sirainen (edfd00910) -M src/lib-fts/fts-filter-common.c + lib-fs: Implement all lib-fs functions as wrappers to parent stream. -2016-08-23 13:41:38 +0300 Timo Sirainen (f0bf900f3) - lib-fs: Fixes to previous fs_write_stream_abort*() changes. +M src/lib-fs/Makefile.am +M src/lib-fs/fs-api-private.h +A src/lib-fs/fs-wrapper.c +A src/lib-fs/fs-wrapper.h +2016-07-06 13:15:22 +0300 Timo Sirainen (1ec1404c0) -M src/lib-fs/fs-api.c -M src/lib-fs/fs-randomfail.c + lib-dcrypt: istream-decrypt now differentiates between temporary errors and + corruption. -2016-08-23 13:40:50 +0300 Timo Sirainen (33b34cb42) - lib-storage: Fixed istream-attachment-extractor error handling. +M src/lib-dcrypt/istream-decrypt.c +2016-07-06 13:11:50 +0300 Timo Sirainen (b4fd67490) -M src/lib-storage/index/index-attachment.c + lib-dcrypt: Set stream_errno on istream-decrypt read failures. -2016-08-23 13:40:35 +0300 Timo Sirainen (8c225e430) + Fixes assert-crashes that would happen otherwise. - lib-mail: Clarify istream-attachment-extractor's error handling API usage. +M src/lib-dcrypt/istream-decrypt.c +2016-07-06 13:31:12 +0300 Timo Sirainen (87a6b7df3) -M src/lib-mail/istream-attachment-extractor.h + lib: Updated istream's stream_errno comments. -2016-08-22 09:42:26 +0300 Aki Tuomi (bb35c3123) - lib-fs: Add fs_write_stream_abort_parent and use it +M src/lib/istream.h - Will do all the things abort_error does, but leaves error untouched. You are - expected to set one yourself. +2016-07-06 13:24:03 +0300 Timo Sirainen (ad31916e2) -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-wrapper.c -M src/plugins/fs-compress/fs-compress.c + lib-compression: istream-zlib/lzma now differentiates between temporary + errors and corruption. -2016-08-23 10:53:28 +0300 Timo Sirainen (d76499eda) - lib-storage: Added mailbox_recent_flags_expunge_uid() +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c - For storage backends where it's useful. +2016-07-05 20:58:29 +0300 Timo Sirainen (bb1da4a63) -M src/lib-storage/mailbox-recent-flags.c -M src/lib-storage/mailbox-recent-flags.h + lib-storage: Clarify that mail_namespace_find_inbox() never returns NULL. -2016-08-22 23:41:05 +0300 Teemu Huovila (d5e93292e) + If namespaces==NULL, this function isn't even supposed to be called. - lib-fts: Change normalizer filter to use new truncate. +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-namespace.h +2016-07-05 14:41:41 +0300 Aki Tuomi (0a58543e2) -M src/lib-fts/fts-filter-normalizer-icu.c -M src/lib-fts/test-fts-filter.c + passdb-static: Support password scheme -2016-08-21 22:12:33 +0300 Teemu Huovila (7a78786a3) + This allows password argument to provide scheme instead of defaulting to + plain. If no scheme is provided, plain is defaulted. - lib-fts: Cut overlong strings in lowercase filter. +M src/auth/passdb-static.c - Added new common truncate function for filters. It also removes any partial - characters, that would remain from plain truncation. +2016-07-04 18:25:23 +0300 Aki Tuomi (626098f33) -M src/lib-fts/Makefile.am -A src/lib-fts/fts-filter-common.c -A src/lib-fts/fts-filter-common.h -M src/lib-fts/fts-filter-lowercase.c -M src/lib-fts/test-fts-filter.c + doveadm-pw: Use debug value when loading modules -2016-08-17 16:47:19 +0300 Teemu Huovila (6b34eefc3) - lib-fts: Add max_length to common filter struct. Reorder fields. +M src/doveadm/doveadm-pw.c - The latter is for for imaginary alignment enhancements. +2016-07-04 18:06:56 +0300 Aki Tuomi (d6ff5e9d2) -M src/lib-fts/fts-filter-private.h + configure: Fix static array check -2016-08-19 16:00:30 +0300 Aki Tuomi (cc8e8c474) - fs-api: Add and use fs_write_stream_abort_error +M m4/static_array.m4 - This lets caller to specify error instead of setting it with fs_error. Doing - it like this lets us percolate the error upwards. +2016-07-04 11:57:43 +0300 Martti Rannanjärvi (58562739e) -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-wrapper.c -M src/lib-storage/index/index-attachment.c -M src/plugins/fs-compress/fs-compress.c + lib-dcrypt: tell in error_r that RSA key has to be converted to pkey -2016-08-19 14:47:33 +0300 Aki Tuomi (d4d390fee) - quota-dict: Make sure all transactions complete +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/test-crypto.c +2016-07-04 15:05:00 +0300 Timo Sirainen (ffd8dc932) -M src/plugins/quota/quota-dict.c + master: Add master socket's io listener later. -2016-08-18 14:48:50 +0300 Aki Tuomi (af4e68f8c) + Most importantly this fixes startup failure with kqueue: - pop3: Fix deleted_count expansion + Panic: kevent(EV_ADD, READ, 56) failed: Bad file descriptor + kqueue doesn't survive a fork(), so this change delays its creation until + after fork(). -M src/pop3/pop3-client.c +M src/master/service-listen.c +M src/master/service-monitor.c -2016-08-18 11:22:09 +0300 Timo Sirainen (65cf80a6c) +2016-07-04 14:44:40 +0300 Timo Sirainen (c4138be2a) - lmtp: Support %{userdb:*} variables in mail_log_prefix + master: Make sure stdout isn't closed on startup failures. + closing master_fd might have tried to close(0) since it wasn't initialized + to -1. -M src/lmtp/commands.c +M src/master/service.c -2016-08-15 23:43:33 +0300 Timo Sirainen (673e05e55) +2016-07-01 17:42:29 +0300 Timo Sirainen (b11e9673b) - quota, last-login: Disable "slow dict commit" warnings + dict-client: Attempt to connect to dict socket for 1 second before failing. - Anything (especially long lock waits) can happen between the commit and when - we read their replies. -M src/plugins/last-login/last-login-plugin.c -M src/plugins/quota/quota-dict.c +M src/lib-dict/dict-client.c -2016-08-15 23:40:59 +0300 Timo Sirainen (e53c3da9b) +2016-07-01 16:37:09 +0300 Timo Sirainen (f733f54c8) - lib-dict: Added dict_transaction_no_slowness_warning() + lib-http: Clarify response message when retries have happened. + "1 attempts" sounds like 1 attempt in total, while this was actually the + second attempt. -M src/lib-dict/dict-client.c -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c -M src/lib-dict/dict.h +M src/lib-http/http-client-request.c -2016-08-15 23:36:13 +0300 Timo Sirainen (3bb1aecfe) +2016-07-01 16:36:31 +0300 Timo Sirainen (38fa43690) - dict-client: Keep transaction's pointer in command until it's finished. + dict-client: Make sure query's start_time is up-to-date. M src/lib-dict/dict-client.c -2016-08-15 23:16:03 +0300 Timo Sirainen (01e58ef2b) +2016-07-01 16:34:26 +0300 Timo Sirainen (701eb9046) - dict-client: Improve "slow dict operation" warnings in error conditions. + dict-client: Don't log slow background async commit/iteration replies. - There's no need to log both an error and a warning. + If a caller has already finished iteration, or does async commit without a + callback, it means that it started the query without caring when it + finishes. The caller may already have been doing blocking work while waiting + for the dict reply. We don't want to log a warning, because it could be + completely wrong. M src/lib-dict/dict-client.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict.c -2016-08-17 17:57:16 +0300 Martti Rannanjärvi (28d1de513) +2016-07-01 16:31:52 +0300 Timo Sirainen (14189e0d0) - imap-hibernate: fix input_pending check in client_unhibernate_cmp + cassandra: Added debug_queries connect setting. - Check c2->input_pending instead of c1->input_pending when calculating - comparison value for c2. + This logs all the queries and how long they took, without having to log all + the other Cassandra library debug messages. -M src/imap-hibernate/imap-client.c +M src/lib-sql/driver-cassandra.c -2016-08-17 17:20:21 +0300 Timo Sirainen (43cce3eba) +2016-07-01 16:31:19 +0300 Timo Sirainen (e401fa68e) - lib-dcrypt: Fixed accessing out-of-bounds data in istream. + cassandra: If query fails, include how long the reply took in the error + message. - Also some small cleanups to make it clearer what's actually happening. -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/ostream-encrypt.c +M src/lib-sql/driver-cassandra.c -2016-08-17 16:25:12 +0300 Timo Sirainen (3d3536765) +2016-07-01 16:30:06 +0300 Timo Sirainen (8952d797e) - lib-dcrypt: Fixed partial reads in header and limit header's max size. + cassandra: Warn if queries take too long (default 5 secs) - Also fixes test-stream to actually test nonblocking reads correctly. + Can be changed with e.g. "connect = ... warn_timeout=30s" -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/test-stream.c +M src/lib-sql/driver-cassandra.c -2016-08-16 14:49:35 +0300 Aki Tuomi (e8671affc) +2016-07-01 16:27:30 +0300 Timo Sirainen (395aa4fe4) - fts-squat: Ensure child is not NULL + LAYOUT=index: Make sure error is preserved if created mailbox can't be added + to list index. - Makes static analysers happy + mailbox_delete() could overwrite the error. -M src/plugins/fts-squat/squat-trie.c +M src/lib-storage/list/mailbox-list-index-backend.c -2016-08-16 14:47:35 +0300 Aki Tuomi (bd86b25e0) +2016-07-01 15:13:55 +0300 Aki Tuomi (78d329771) - lib-master: Check for NULL in input/output + man: Provide usage for doveadm mailbox update - Makes static analysers happy -M src/lib-master/master-login-auth.c +M doc/man/doveadm-mailbox.1.in + +2016-07-01 12:23:59 +0300 Timo Sirainen (29026989f) + + lib-storage: Fixed mailbox_delete_empty() error message when mails exist -2016-08-16 14:46:08 +0300 Aki Tuomi (45e3aa0de) - auth: Ensure username can't be left unset in APOP +M src/lib-storage/index/index-storage.c - Makes static analysers happy +2016-07-01 11:56:46 +0300 Timo Sirainen (98b7ea174) -M src/auth/mech-apop.c + dict-client: When skipping connect() due to earlier failure, preserve the + original error. -2016-08-16 14:42:41 +0300 Aki Tuomi (d18e554af) - imapc: Make sure imail.stream is not NULL +M src/lib-dict/dict-client.c - Makes static analysers happy +2016-07-01 11:41:51 +0300 Timo Sirainen (e13bef0a4) -M src/lib-storage/index/imapc/imapc-mail.c + dict-client: If commit fails to send BEGIN, don't try sending anything else. -2016-08-16 14:39:37 +0300 Aki Tuomi (33efd47b6) + Fixes memory leak and also fixes overwriting the original error message. - lib-storage: Make sure data->stream isn't NULL +M src/lib-dict/dict-client.c - Makes static analysers happy +2016-07-01 11:12:03 +0300 Timo Sirainen (94b21eb8d) -M src/lib-storage/index/index-mail-headers.c + lib-storage: Autoexpunging should ignore nonexistent mailboxes. -2016-08-16 14:36:07 +0300 Aki Tuomi (be4e6321f) + The check was done too late after recent changes. - auth: Check for NULL auth token +M src/lib-storage/mail-autoexpunge.c - Makes static analysers happy +2016-07-01 11:07:47 +0300 Timo Sirainen (59849b39a) -M src/auth/mech-dovecot-token.c + doveadm mailbox update: Avoid assert-crash on errors. -2016-08-16 13:49:01 +0300 Aki Tuomi (23554f929) - lib: Fix SENTRY_CHAR to different kind of number +M src/doveadm/doveadm-mail-mailbox.c - Makes static analysers happier +2016-07-01 02:49:32 +0300 Timo Sirainen (7dd5d993b) -M src/lib/test-mempool-alloconly.c + login-proxy: cork+uncork in flush callbacks -2016-08-16 13:46:09 +0300 Aki Tuomi (a6067d40d) + Potentially reduces latency at the end of a larger data transfer. - lib-http: Ensure fstream is not NULL in test +M src/login-common/login-proxy.c - Makes static analysers happier +2016-07-01 01:14:34 +0300 Timo Sirainen (d82c8af71) -M src/lib-http/test-http-payload.c + lib-dcrypt: Removed dead code. -2016-08-16 13:44:27 +0300 Aki Tuomi (5978fb877) - lib-index: Do not do pointless memmove +M src/lib-dcrypt/ostream-encrypt.c - Makes static analysers happier, since moving the data when days is 0 or days - is 8 is effectively non-op. +2016-07-01 01:11:15 +0300 Timo Sirainen (f54d51159) -M src/lib-index/mail-index-transaction-update.c + lib: Fix to compiling STATIC_ARRAY in C++ code -2016-08-16 13:31:48 +0300 Aki Tuomi (0d1ff8735) - test-priorityq: Ensure item is not NULL +M src/lib/macros.h - Makes static analysers happy +2016-06-30 20:24:34 +0300 Timo Sirainen (bc3586bca) -M src/lib/test-priorityq.c + configure: Check if C99 "static" keyword is supported for array sizes. -2016-08-16 13:30:36 +0300 Aki Tuomi (1dfbc5e4d) - md5: Initialize block +M configure.ac +A m4/static_array.m4 +M src/lib/macros.h - Makes static analysers happy +2016-06-30 22:35:59 +0200 Stephan Bosch (744c06ab0) -M src/lib/md5.c + lib-http: client: Fixed potential segfault problem in + http_client_connection_server_close(). -2016-08-16 14:53:24 +0300 Timo Sirainen (1eedaab68) + Used wrong variable: it is set to NULL by http_client_request_unref() before + it is used. Problem found by Coverity. - lib-storage: If chdir to home doesn't work, chdir to root instead. +M src/lib-http/http-client-connection.c - Most importantly this fixes unlink_directory() when current directory after - dropping privileges can't be open()ed. +2016-06-30 18:13:52 +0300 Timo Sirainen (3ba8511f9) -M src/lib-storage/mail-storage-service.c + lib-dcrypt: Compiling fix -2016-08-16 14:04:13 +0300 Timo Sirainen (80d026825) - lib-storage: Minor error message fix +M src/lib-dcrypt/dcrypt.c +2016-06-30 16:21:40 +0300 Timo Sirainen (3dc508b52) -M src/lib-storage/list/mailbox-list-delete.c + imap: Fixed reading LDA settings from config. -2016-08-16 11:05:25 +0300 Timo Sirainen (2d1aea881) - lib-mail: Compiling fix for message-snippet change - U'x' isn't standard. +M src/imap/imap-settings.c +2016-06-30 14:08:24 +0300 Timo Sirainen (0fb6d1695) -M src/lib-mail/message-snippet.c + master: Stopping didn't close dead-pipes early enough. -2016-03-29 22:30:17 +0200 nikwrt (3060a08fb) + This caused stopping to be too slow. Broken by 0153cf542. - fts-squat: fix Corrupted squat uidlist bug +M src/master/service-monitor.c +2016-06-30 12:10:29 +0300 Timo Sirainen (a29670d7a) -M src/plugins/fts-squat/fts-backend-squat.c -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-trie.h -M src/plugins/fts-squat/squat-uidlist.c + lmtp: Removed assert, which triggers if anvil connect fails. -2016-08-15 19:22:31 +0300 Aki Tuomi (3a2cd4080) - lib-mail: Fix snippet generation +M src/lmtp/commands.c - Now we won't add leading whitespace for no reason, and also strip BOM when - found. +2016-06-30 12:08:19 +0300 Timo Sirainen (ddf6020f6) -M src/lib-mail/message-snippet.c + lmtp: Fixed pipelining of commands after RCPT TO -2016-08-15 13:30:44 +0300 Aki Tuomi (c09f8e4a3) + We should stop while waiting for anvil reply. Broken by ced943b0a. - dcrypt: Fix encrypted test keys +M src/lmtp/commands.c +2016-06-30 11:57:19 +0300 Aki Tuomi (77bb5db43) -M src/lib-dcrypt/test-crypto.c + auth-request: Whitespace fix -2016-08-15 11:32:31 +0300 Aki Tuomi (486c1ba55) - dcrypt: Update v2 sample +M src/auth/auth-request.c +2016-06-30 10:03:18 +0300 Aki Tuomi (7d7a97e88) -M src/lib-dcrypt/sample-v2.asc + auth-request: Correctly allocate mech_password and credentials_scheme -2016-08-15 11:27:04 +0300 Aki Tuomi (649443ee4) - dcrypt: Retrieve key length correctly +M src/auth/auth-request.c +2016-06-30 09:29:26 +0300 Aki Tuomi (3a2f06081) -M src/lib-dcrypt/dcrypt-openssl.c + dcrypt: Free keys in test-stream -2016-08-13 14:31:08 +0300 Timo Sirainen (9d9be9314) - lib: Avoid compiler warning if off_t has the same size as ssize_t. +M src/lib-dcrypt/test-stream.c +2016-06-30 09:06:51 +0300 Aki Tuomi (7de7bc1f7) -M src/lib/mmap-util.c + dcrypt: Add tests for 0 and 1 byte data -2016-08-13 14:16:55 +0300 Timo Sirainen (caefe5218) - dsync: Further fixes to received_timestamp and virtual_size parsing (-t and - -S parameters) +M src/lib-dcrypt/test-stream.c +2016-06-30 09:06:33 +0300 Aki Tuomi (7a71f2326) -M src/doveadm/dsync/dsync-ibc-stream.c + dcrypt: Fix bugs in 0 and 1 byte payload files -2016-08-13 01:00:13 +0300 Timo Sirainen (78def5d8e) - dsync: Added missing fields to ibc-stream. +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/ostream-encrypt.c +2016-06-30 01:27:37 +0300 Timo Sirainen (20b857d31) -M src/doveadm/dsync/dsync-ibc-stream.c + lib-ssl-iostream: Compiler fix to previous commit -2016-08-12 01:24:16 +0200 Stephan Bosch (de517631d) - lib: Implemented i_stream_create_copy_from_data(). +M src/lib-ssl-iostream/dovecot-openssl-common.c - Unlike i_stream_create_from_data(), this function makes a copy of the - provided data block. This way, the application does not need to worry about - keeping it allocated for the lifetime of the stream. The copied data is - allocated durably on the system pool and freed once the stream is destroyed. +2016-06-30 01:15:38 +0300 Timo Sirainen (a0f2b68fe) -M src/lib/istream-data.c -M src/lib/istream.h + lib-ssl-iostream: Disable "CRYPTO_set_mem_functions() was called too late" + for now -2016-07-25 10:24:44 +0300 Martti Rannanjärvi (1e06a0ebd) + It always happens at least with Ubuntu 16.04. - lib,lib-test: stop calling memcmp and memcpy with NULL in tests +M src/lib-ssl-iostream/dovecot-openssl-common.c +2016-06-29 23:56:18 +0300 Timo Sirainen (4df7af0da) -M src/lib-test/test-common.c -M src/lib/test-istream-base64-decoder.c -M src/lib/test-istream-crlf.c + auth: delay_until can optionally now have + suffix. -2016-07-25 10:21:43 +0300 Martti Rannanjärvi (fe98f6559) - lib-mail: stop calling str_append_n and memcmp with NULL in tests +M src/auth/auth-request.c +2016-06-29 23:54:46 +0300 Timo Sirainen (2fa0de8e5) -M src/lib-mail/test-istream-dot.c -M src/lib-mail/test-istream-header-filter.c -M src/lib-mail/test-message-header-parser.c -M src/lib-mail/test-message-parser.c + auth: Fixed checking if delay_until is too large -2016-08-10 15:40:23 +0300 Martti Rannanjärvi (caf1bd5c1) - lib-storage: don't crash when pop3c-client timeouts +M src/auth/auth-request.c +2016-06-29 22:29:20 +0300 Timo Sirainen (e229fe845) -M src/lib-storage/index/pop3c/pop3c-client.c + dsync: When full resync is wanted in a stateful sync, output empty state. -2016-08-11 12:46:42 +0300 Aki Tuomi (603bf6504) + This continues 3d49dc64d, which didn't actually work because + brain->require_full_resync was either cleared earlier or it was never even + set in this brain. - doveadm-dump: Add missing include +M src/doveadm/dsync/dsync-brain-mailbox.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/dsync-ibc-pipe.c +M src/doveadm/dsync/dsync-ibc-private.h +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-ibc.c +M src/doveadm/dsync/dsync-ibc.h +2016-06-29 21:09:48 +0300 Timo Sirainen (c1fc5a97a) -M src/doveadm/doveadm-dump-dcrypt-key.c + doveadm: Read settings with service=doveadm -2016-08-11 17:27:24 +0300 Timo Sirainen (bb6928d6d) + This was done for mail commands while initializing the mail user, but other + commands weren't using it. This meant that doveadm was using only global + settings instead of protocol doveadm { .. } settings for everything except + mail commands. - -Wstrict-bool warning fixes +M src/doveadm/doveadm.c +M src/doveadm/main.c +2016-06-29 20:44:37 +0300 Timo Sirainen (eb8a1a587) -M src/doveadm/doveadm-auth-server.c -M src/doveadm/doveadm-dump-dcrypt-file.c + doveadm user: Avoid potential crashes when running via doveadm-server -2016-08-11 17:23:48 +0300 Timo Sirainen (89d64f263) - doveadm sync: Fixed -S parameter parsing to actually work. +M src/doveadm/doveadm-auth-server.c +2016-06-29 19:22:51 +0300 Timo Sirainen (7b97d8b3f) -M src/doveadm/doveadm-dsync.c + dict-sql: Treat NULL value the same as "key not found" -2016-07-01 14:30:24 +0300 Timo Sirainen (dd053332e) - doveadm sync/backup: Added -S parameter to skip too large mails. +M src/lib-dict/dict-sql.c +2016-06-28 23:12:03 +0300 Timo Sirainen (53309922d) -M src/doveadm/doveadm-dsync.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-ibc-pipe.c -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.h -M src/doveadm/dsync/dsync-mail.c -M src/doveadm/dsync/dsync-mail.h -M src/doveadm/dsync/dsync-mailbox-export.c -M src/doveadm/dsync/dsync-mailbox-export.h -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-import.h + doveadm: Added "service stop" command to stop specific services. -2016-07-13 09:51:08 +0300 Aki Tuomi (d28ac272a) - auth-db-dict: Allow key name expansion +M src/doveadm/Makefile.am +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-cmd.h +A src/doveadm/doveadm-service.c - This allows expansion of dictionary keys based on userdb variables on dict - lookup mapping. Example: key userdb { - key = %{userdb:nspace:default}/userdb - format = json - } +2016-06-26 23:04:00 +0300 Timo Sirainen (164f8e81a) -M src/auth/db-dict.c + master: Allow stopping specific services via master socket. -2016-08-09 11:48:10 +0300 Aki Tuomi (58bdd0861) - openssl: Fix v1.1 compability +M src/master/Makefile.am +M src/master/main.c +A src/master/master-client.c +A src/master/master-client.h +M src/master/service-listen.c +M src/master/service-monitor.c +M src/master/service.h +2016-06-28 23:38:48 +0300 Timo Sirainen (079673625) -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-ssl-iostream/dovecot-openssl-common.c -M src/lib-ssl-iostream/iostream-openssl-common.c -M src/lib-ssl-iostream/iostream-openssl.c -M src/login-common/ssl-proxy-openssl.c + master: Added service_monitor_stop_close() to stops service and close its + listeners. -2016-08-08 15:31:50 +0300 Aki Tuomi (b3bc7290c) - OpenSSL: link against OpenSSL libs explicitly +M src/master/service-monitor.c +M src/master/service-monitor.h +2016-06-28 23:38:11 +0300 Timo Sirainen (0153cf542) -M src/lib-dcrypt/Makefile.am -M src/lib-ssl-iostream/Makefile.am + master: Added support for stopping specific services. -2016-07-23 23:40:15 +0300 Martti Rannanjärvi (deb33c7bc) + We need to have a per-service fd for detecting a dead master. - doveadm: add doveadm-dump-dcrypt-key +M src/master/service-monitor.c +M src/master/service-process.c +M src/master/service.c +M src/master/service.h +2016-06-29 19:12:58 +0300 Timo Sirainen (9881c3ec4) -M doc/man/doveadm-dump.1.in -M src/doveadm/Makefile.am -A src/doveadm/doveadm-dump-dcrypt-key.c -M src/doveadm/doveadm-dump.c -M src/doveadm/doveadm-dump.h + lib-storage: Fixed search arg initialization tracking for INTHREAD -2016-08-10 19:15:56 +0300 Timo Sirainen (19e19b1b2) - quota: If quota lookup updates vsize header, lock it earlier to avoid a - deadlock. +M src/lib-storage/mail-search.c +2016-06-29 18:49:57 +0300 Timo Sirainen (391970ed2) -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota.c + virtual: Fixed error handling when matching mailboxes by metadata. -2016-08-10 19:13:09 +0300 Timo Sirainen (b44e4cc41) - quota: Fixed handling when mail size lookup fails due to mail already being - expunged. +M src/plugins/virtual/virtual-config.c - We don't want to fail it as a quota allocation failure, but just pass - through the "mail is expunged" error to the original caller. +2016-06-29 18:34:07 +0300 Timo Sirainen (b0ab23e6f) -M src/plugins/quota/quota.c + maildir: Improved "Filename keeps changing" error handling/logging -2016-08-10 17:56:14 +0300 Timo Sirainen (ebbcd402b) - dict-client: Improved timeout error message. +M src/lib-storage/index/maildir/maildir-util.c +2016-06-29 18:33:48 +0300 Timo Sirainen (815fc205d) -M src/lib-dict/dict-client.c + maildir: Code comment update -2016-08-10 17:54:29 +0300 Timo Sirainen (06a2305b6) - lib: Added connection_input_timeout_reason() +M src/lib-storage/index/maildir/maildir-sync.c +2016-06-29 18:33:27 +0300 Timo Sirainen (034375aa3) -M src/lib/connection.c -M src/lib/connection.h + dsync: Add session ID to log line prefix. -2016-08-10 17:44:26 +0300 Timo Sirainen (4ed04ae13) - lib: Added connection.connect_started/finished timestamps. +M src/doveadm/doveadm-dsync.c +2016-06-29 18:31:21 +0300 Timo Sirainen (38920bff3) -M src/lib/connection.c -M src/lib/connection.h + maildir: Fixed updating filenames in existing uidlist -2016-08-11 14:28:24 +0300 Aki Tuomi (22076652a) + Broken by 042668c0c. - configure: Fix dcrypt build + This could have caused errors like: + - maildir_file_do(...): Filename keeps changing + - Expunged message reappeared, giving a new UID -M configure.ac -M src/Makefile.am -M src/lib-dcrypt/Makefile.am +M src/lib-storage/index/maildir/maildir-uidlist.c -2016-08-09 18:06:25 +0300 Timo Sirainen (0b6848902) +2016-06-03 17:30:58 +0300 Aki Tuomi (3a429da1e) - quota: Don't get message sizes when updating mailbox that ignores quotas. + doveadm-server: Do not crash if empty data in authorization - Nothing is done with the size anyway. -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota.c +M src/doveadm/client-connection-http.c -2016-08-10 19:07:18 +0300 Timo Sirainen (aec3f3fcb) +2016-05-31 22:22:37 +0300 Aki Tuomi (a13b1245b) - lib-storage: Fixed potential .vsize.lock deadlock. + doveadm: Implement user and auth cache flush to server -M src/lib-storage/index/index-storage.c +M src/doveadm/Makefile.am +A src/doveadm/doveadm-auth-server.c +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-cmd.h +M src/doveadm/doveadm.c +M src/doveadm/main.c -2016-08-10 17:15:21 +0300 Timo Sirainen (492cbf3dd) +2016-06-04 08:14:45 +0300 Aki Tuomi (bd13998cd) - auth: Removed redundant noauthenticate checks. + doveadm-server: Skip doveadm_print_init - Now that noauthenticate also adds nopassword field. + Some commands need to do output that is not doable with doveadm_print, so we + need to have a flag to indicate this. -M src/auth/auth-request.c -M src/auth/passdb-sql.c +M src/doveadm/client-connection-http.c +M src/doveadm/doveadm-cmd.h -2016-08-10 17:14:28 +0300 Timo Sirainen (05780dd3d) +2016-06-29 16:34:11 +0300 Timo Sirainen (3edfbca79) - auth: When setting noauthenticate=yes, also set nopassword=yes + lmtp: If anvil lookup fails, ignore lmtp_user_concurrency_limit - There are various places which check only "nopassword", but not - "noauthenticate". + Previously it was randomly allowing or disallowing the client. -M src/auth/auth-request.c +M src/lmtp/commands.c -2016-08-10 17:41:51 +0300 Timo Sirainen (4fd09dba6) +2016-06-29 15:25:28 +0300 Timo Sirainen (808261fdd) - lib: Added connection.last_input_tv for more accuracy + auth: Added delay_until passdb extra field. -M src/lib/connection.c -M src/lib/connection.h +M src/auth/auth-request.c +M src/auth/auth-request.h -2016-08-10 17:37:53 +0300 Timo Sirainen (041b03782) +2016-06-29 16:01:13 +0300 Timo Sirainen (f000a3cda) - lib: connection_disconnect() now resets last_input + auth: Fixed plaintext authentication when auth policy was already processed. - If we reconnect, its value would otherwise be wrong. + Broken by e82511362. -M src/lib/connection.c +M src/auth/auth-request.c -2016-08-10 17:11:13 +0300 Timo Sirainen (f874d7ac4) +2016-06-29 15:49:38 +0300 Timo Sirainen (ea591a868) - auth: Blocking userdb lookup shouldn't reset extra fields. + lib-fts: Added maxlen parameter to icu-normalizer. + This is needed because the normalization can increase the token's length. -M src/auth/userdb-blocking.c +M src/lib-fts/fts-filter-normalizer-icu.c +M src/lib-fts/fts-filter.h +M src/lib-fts/test-fts-filter.c -2016-08-10 14:05:25 +0300 Timo Sirainen (faf735b2c) +2016-06-28 22:20:20 +0300 Timo Sirainen (f43d65df4) - login-proxy: Fixed assert-crash/hang on connect errors. + auth: Added ":remove" suffix for passdb/userdb extra fields to remove + fields. - The internal BUG would have left the host hanging. "Host is down" or any - immediate connect() error would have assert-crashed with: - Panic: file login-proxy.c: line 470 (login_proxy_disconnect): assertion - failed: (proxy->state_rec->num_waiting_connections > 0) +M src/auth/auth-request.c -M src/login-common/login-proxy.c +2016-06-29 00:56:56 +0300 Timo Sirainen (ca5b3ec53) -2016-08-10 01:39:39 +0300 Timo Sirainen (bf5a1d534) + auth: userdb passwd iteration now skips users not in first/last_valid_gid + range - lmtp: Reverted default port 24 change 1cbf46898. + Patch by Michal Hlavinka / Red Hat - This might break some existing installation since otherwise the local port - is the default. So lets just keep it a v2.3.x change. +M src/auth/auth-settings.c +M src/auth/auth-settings.h +M src/auth/userdb-passwd.c -M src/lmtp/commands.c +2016-06-29 00:50:13 +0300 Timo Sirainen (d080f54d2) -2016-08-08 19:25:05 +0300 Timo Sirainen (14da98f02) + *-login: Don't disable auth penalty for login_trusted_networks. - doveadm: Fixed -A and -u wildcard handling with server connections. + It might or might not be a webmail (or something) that has its own penalty. + If the old behavior is still wanted, it's possible to do nowadays with e.g.: + passdb { + driver = passwd-file + args = username_format=%{rip} /etc/dovecot/passdb + } -M src/doveadm/client-connection.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h + /etc/dovecot/passdb: 192.168.10.123:::::::nodelay=yes + 192.168.10.124:::::::nodelay=yes -2016-08-08 19:24:08 +0300 Timo Sirainen (10e1efd5f) +M src/login-common/sasl-server.c - doveadm: Fixed hanging when printing output from different server - connections. +2016-06-29 14:09:01 +0300 Timo Sirainen (553a131ed) + lmtp: Increase user's concurrency limit already after RCPT TO. -M src/doveadm/server-connection.c + This way it's not possible for a lot of mails to arrive to user concurrently + and bypass the lmtp_user_concurrency_limit. -2016-08-08 19:22:15 +0300 Timo Sirainen (fb163f4a4) +M src/lmtp/client.c +M src/lmtp/client.h +M src/lmtp/commands.c - doveadm: Avoid recursively calling server input callback +2016-06-29 14:07:34 +0300 Timo Sirainen (ced943b0a) - Probably doesn't fix anything, but it could cause confusing backtraces at - least. + lmtp: If user has rached lmtp_user_concurrency_limit, fail at RCPT TO stage. -M src/doveadm/server-connection.c + Otherwise LMTP client would have to send the entire email body before + getting the failure. -2016-08-08 19:16:57 +0300 Timo Sirainen (efb991a2e) +M src/lmtp/client.h +M src/lmtp/commands.c - doveadm-server: Fixed potential hang when reading replies to multiple - commands +2016-06-20 14:43:04 +0300 Timo Sirainen (cf91b6b3a) + lib-storage: Fixed MAILBOX_METADATA_FIRST_SAVE_DATE with + mailbox_list_index=no -M src/doveadm/server-connection.c + This also meant that autoexpunging wasn't working then. -2016-08-08 19:11:16 +0300 Timo Sirainen (a0e641d16) +M src/lib-storage/index/index-status.c - doveadm: Revert earlier NUL-printing change 793b024bf. +2016-06-29 14:55:12 +0300 Aki Tuomi (e82511362) - It changes the output in ways that are a bit difficult to fix. Also the the - important part where NULs printing is useful is in a message body, which - should work even without this change. So for now just revert it. + auth-policy: Do not do policy checks every time -M src/doveadm/server-connection.c -2016-08-08 17:56:48 +0300 Timo Sirainen (9411a15cc) +M src/auth/auth-request.c - lib-auth: Avoid crash after user iteration if connection failed. +2016-06-29 14:43:31 +0300 Timo Sirainen (ecbc1c76e) + auth: Finish policy.[ch] renaming.. -M src/lib-auth/auth-master.c -2016-08-08 17:13:15 +0300 Timo Sirainen (eed4d7d84) +M src/auth/Makefile.am +M src/auth/auth-policy.c +M src/auth/auth-request-handler.c +M src/auth/auth-request.c +M src/auth/main.c - doveadm: Removed unused code. +2016-06-29 14:31:28 +0300 Timo Sirainen (5165bc0ff) + auth: Avoid nonstandard #pragma once -M src/doveadm/doveadm-mail-save.c -2016-08-08 12:36:48 +0300 Timo Sirainen (25c214719) +M src/auth/auth-policy.h - doveadm: Extra safety - initialize cmd_input_fd to -1 +2016-06-29 14:30:56 +0300 Timo Sirainen (2346f1643) - Just to be sure it's never attempted to be accessed as 0 (stdin) before - being initialized. (It didn't happen with current code as far as I know.) + auth: Rename policy.[ch] to auth-policy.[ch] -M src/doveadm/doveadm-mail.c -2016-08-08 16:15:26 +0300 Timo Sirainen (4a4f7ff38) +R100 src/auth/policy.c src/auth/auth-policy.c +R100 src/auth/policy.h src/auth/auth-policy.h - dsync: Fixed empty-header-workaround +2016-06-28 13:24:09 +0300 Martti Rannanjärvi (fba8aa986) + lib-dcrypt: correctly set version 2 on key info -M src/doveadm/dsync/dsync-mailbox-import.c + Dovecot format version 2 keys were incorrectly reported as version 1 before. -2016-08-08 16:06:50 +0300 Timo Sirainen (c2bb9743c) +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/test-crypto.c - dsync_features: For consistency use '-' and not '_' +2016-06-29 14:16:58 +0300 Timo Sirainen (41a6be285) - Other _features and _workarounds settings use also '-'. + lib-index: Fixed view syncing when changes couldn't be read from transaction + logs -M src/doveadm/doveadm-settings.c + Fixes errors like: -2016-08-08 14:39:39 +0300 Timo Sirainen (1c5c13e06) + Log synchronization error at seq=0,offset=0 for .../dovecot.index: Append + with UID 5, but next_uid = 6 + .../dovecot.index view syncing failed to apply changes - doveadm: When printing input from doveadm-server, don't truncate at NUL. +M src/lib-index/mail-index-view-sync.c +2016-06-29 14:12:29 +0300 Aki Tuomi (d35bb9e2d) -M src/doveadm/server-connection.c + auth-policy: Do not allow/report when master query -2016-08-08 13:21:34 +0300 Aki Tuomi (573f68ee0) + This way auth policy isn't consulted when e.g. doveadm is used. - doveadm: Pass connection to mail context +M src/auth/policy.c +2016-06-29 13:52:09 +0300 Aki Tuomi (95087a44d) -M src/doveadm/client-connection.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-mail.c + auth-policy: Report success earlier -2016-08-08 11:38:54 +0300 Aki Tuomi (8029a3fe5) - doveadm: Use str_append_tabescaped_n +M src/auth/auth-request-handler.c +2016-06-29 00:37:09 +0300 Timo Sirainen (f3904862b) -M src/doveadm/doveadm-print-server.c + configure: Detect SSL_COMP_free_compression_methods() by linking -2016-08-08 11:23:02 +0300 Aki Tuomi (2fe2b54af) + Fixes using libressl. - lib: Add binary-safe tabescape +M m4/ssl.m4 +M src/lib-ssl-iostream/dovecot-openssl-common.c +2016-06-28 21:59:26 +0300 Timo Sirainen (61d57efe9) -M src/lib/strescape.c -M src/lib/strescape.h + lib: Added assert to iostream-temp -2016-08-08 09:29:26 +0300 Aki Tuomi (dd35442b0) + Input stream isn't expected to shrink here. Potentially this could be + changed to an error instead. - doveadm: Streamline tabunescape +M src/lib/iostream-temp.c +2016-06-28 19:45:12 +0300 Timo Sirainen (6181ecf4d) -M src/doveadm/server-connection.c + lazy-expunge: Fixed crash when copying from internal namespace -2016-08-03 12:46:21 +0300 Martti Rannanjärvi (3d98ba2db) + Most importantly fixes crash in LDA. - doveadm: add doveadm dump dcrypt-file +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +2016-06-28 19:41:40 +0300 Timo Sirainen (ce8a9d73b) -M doc/man/doveadm-dump.1.in -M src/doveadm/Makefile.am -A src/doveadm/doveadm-dump-dcrypt-file.c -M src/doveadm/doveadm-dump.c -M src/doveadm/doveadm-dump.h + lda: Fixed data stack usage in initialization. -2016-08-06 22:12:13 +0300 Martti Rannanjärvi (d94f8b1d2) + For example -p parameter was broken. Broken by 0679f8a70. - lib-dcrypt: make decrypt_istream format and flags visible +M src/lda/main.c +2016-06-28 10:25:21 +0300 Timo Sirainen (3b340beaa) -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/istream-decrypt.h + dict-ldap: Fixed linking with OSX -2016-08-06 22:07:00 +0300 Martti Rannanjärvi (519bd8529) - lib-dcrypt: add dcrypt-iostream.h +M src/plugins/dict-ldap/Makefile.am - Move everything from dcrypt-iostream-private.h and enum - io_stream_encrypt_flags to the new dcrypt-iostream.h file. +2016-06-28 10:15:02 +0300 Timo Sirainen (afddc9e5e) -M src/lib-dcrypt/Makefile.am -D src/lib-dcrypt/dcrypt-iostream-private.h -A src/lib-dcrypt/dcrypt-iostream.h -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/ostream-encrypt.c -M src/lib-dcrypt/ostream-encrypt.h -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c + auth: Compiler warning fixes -2016-08-05 15:21:29 +0300 Aki Tuomi (3328f9f9f) - dsync: Add support for features +M src/auth/policy.c - Add empty_header_workaround as first feature +2016-06-03 21:35:48 +0300 Aki Tuomi (ef1ff1af5) -M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-settings.h -M src/doveadm/doveadm.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-mail.h -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-import.h + auth-policy: Hook auth policy to auth code -2016-04-09 18:21:23 -0500 J. Nick Koston (8572be93d) - quota_clone plugin: quota_clone_mail_user_created warned without debug +M src/auth/auth-request-handler.c +M src/auth/auth-request-var-expand.c +M src/auth/auth-request-var-expand.h +M src/auth/auth-request.c +M src/auth/auth-request.h +M src/auth/main.c - "The quota_clone_dict setting is missing from configuration" warning would - be thrown when debug mode was not enabled. This warning happens under - normal circumstances when prefix="" namespace is not defined (usually when - set to INBOX.) +2016-06-03 20:21:42 +0300 Aki Tuomi (203bb2728) - See http://dovecot.org/list/dovecot-cvs/2012-October/021981.html for more - details on the automagic prefix="" namespace. + auth-policy: Add policy implementation - This change suppresses the spurious warning. -M src/plugins/quota-clone/quota-clone-plugin.c +M src/auth/Makefile.am +M src/auth/auth-request-var-expand.c +M src/auth/auth-request-var-expand.h +M src/auth/auth-request.h +M src/auth/auth-settings.c +M src/auth/auth-settings.h +A src/auth/policy.c +A src/auth/policy.h +M src/config/settings-get.pl -2016-04-09 13:43:16 +0200 Wido den Hollander (1cbf46898) +2016-06-10 14:31:00 +0300 Baofeng Wang (fd16501d9) - lmtp: Use port 24 if no port has been provided + fts plugin: Added fts_autoindex_exclude settings. - This allows using the LMTP, IMAP and POP3 proxy on the same Dovecot - installation without the userdb providing the port to connect to. + fts_autoindex_exclude setting specifies special-use flag or mailbox name to + be excluded. - TCP port 24 is registered at IANA as: "any private mail system" + - If a name starts with '\', it's treated as a case-insensitive special-use + flag. - LMTP being the Local Mail Transfer Protocol classifies as a private mail - system and thus justifies the usage of port 24. + - Multiple names can be specified with serial numbers, for example: - Prior to this patch the LTMP client would connect to TCP port 0 by default - if the userdb did not provide a port to connect to. + plugin { + fts_autoindex_exclude = \Junk + fts_autoindex_exclude2 = \Trash + fts_autoindex_exclude3 = DUMPSTER + fts_autoindex_exclude4 = New folder + } -M src/lmtp/commands.c +M src/plugins/fts/fts-storage.c -2016-08-06 17:59:10 +0200 Stephan Bosch (c48b3d965) +2016-06-27 16:37:18 +0300 Timo Sirainen (bd5684768) - istream-base64-encoder: Implemented proper stat function that returns the - encoded size of the stream. + lib-dcrypt: Make static analyzer happier - For Base64 encoding, the size of the encoded data can be determined from the - input data size exactly. -M src/lib/istream-base64-encoder.c -M src/lib/test-istream-base64-encoder.c +M src/lib-dcrypt/test-crypto.c -2016-08-08 15:51:17 +0300 Timo Sirainen (f960799d4) +2016-06-27 14:43:58 +0300 Aki Tuomi (5efce9101) - lib: ostream-temp didn't update offset when dup()ing fd. + dcrypt: Add tests for v1 and v2 public keys and RSA -M src/lib/iostream-temp.c +M src/lib-dcrypt/test-crypto.c -2016-08-05 22:57:02 +0300 Timo Sirainen (847a3da99) +2016-06-27 14:43:27 +0300 Aki Tuomi (f92d3b2e6) - dict-client: Fixed error message for failed synchronous dict_lookup() + dcrypt-openssl: Various fixes - The error message was allocated from data stack, but freed too early. + Fix v1 and v2 key handling and some allocation issues. -M src/lib-dict/dict-client.c +M src/lib-dcrypt/dcrypt-openssl.c -2016-08-04 21:44:08 +0300 Timo Sirainen (71bf4663f) +2016-06-27 14:13:15 +0300 Timo Sirainen (7c9a9ac8c) - lib-dcrypt: Added unit tests to nonblocking istream-decrypt + lib-dcrypt: Added sample-v1_short.asc to EXTRA_DIST -M src/lib-dcrypt/test-stream.c +M src/lib-dcrypt/Makefile.am -2016-08-04 21:38:30 +0300 Timo Sirainen (b0f2d21e5) +2016-06-27 13:21:05 +0300 Aki Tuomi (80449618d) - lib-dcrypt: test-stream writes now to buffer, not to temp-iostream + istream-decrypt: Ensure we can open short v1 files - This simplifies the following change. +A src/lib-dcrypt/sample-v1_short.asc M src/lib-dcrypt/test-stream.c -2016-08-04 21:29:14 +0300 Timo Sirainen (156b1513c) +2016-06-27 13:19:35 +0300 Aki Tuomi (97846eaed) - lib-dcrypt: Support nonblocking istreams. + istream-decrypt: Correctly check the header length for v1 M src/lib-dcrypt/istream-decrypt.c -2016-08-04 19:45:35 +0300 Martti Rannanjärvi (b460aaed8) +2016-06-24 12:14:32 +0300 Timo Sirainen (ce3a152df) - lib-dcrypt: add 0 to 400 byte stream test + last-login: Ignore the plugin if last_login_dict setting is empty - Remove 8 byte speacial case also. -M src/lib-dcrypt/test-stream.c +M src/plugins/last-login/last-login-plugin.c -2016-08-04 18:35:53 +0300 Martti Rannanjärvi (6d0399807) +2016-06-23 18:04:40 +0300 Timo Sirainen (123d1cb83) - lib-dcrypt: error message on missing decrypt key or password + lib-ssl-iostream: Use ENGINE_set_default() - Return a sensible error message when loading an encrypted private key is - attempted but the decrypt key or password is missing. -M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-ssl-iostream/dovecot-openssl-common.c -2016-08-04 17:11:20 +0300 Timo Sirainen (41a9b7ac6) +2016-06-23 17:21:09 +0300 Timo Sirainen (b7e29199c) - lib-http: Support per-request timeout and max_attempts + lazy_expunge: Optimize checking for last instance when moving a mail. + It's never the last instance, so we don't need to even check it. -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h -M src/lib-http/http-client-request.c -M src/lib-http/http-client.h +M src/plugins/lazy-expunge/lazy-expunge-plugin.c -2016-08-02 23:25:57 +0300 Timo Sirainen (588a9f849) +2016-06-22 01:24:42 +0300 Timo Sirainen (0f801c1bd) - director: Throttle user move/kill failure errors after 100/sec. + fts-lucene: Fixed crash on error or auto-rebuild conditions. - If it happened to a lot of users, they can take a lot of space in logs. -M src/director/director.c -M src/director/director.h -M src/director/main.c +M src/plugins/fts-lucene/lucene-wrapper.cc -2016-08-02 23:14:23 +0300 Timo Sirainen (652f72b02) +2016-06-21 22:08:25 +0300 Timo Sirainen (000ac7357) - lib: Added log throttling API. + welcome plugin: -Wstrict-bool warning fix -M src/lib/Makefile.am -A src/lib/log-throttle.c -A src/lib/log-throttle.h -M src/lib/test-lib.c -M src/lib/test-lib.h -A src/lib/test-log-throttle.c +M src/plugins/welcome/welcome-plugin.c -2016-08-04 17:39:02 +0300 Martti Rannanjärvi (624e356ce) +2016-06-21 22:06:29 +0300 Timo Sirainen (22d6302b5) - lib-dcrypt: don't give strstr NULL in test-crypto + virtual: Compiler warning fix for list_index_has_changed() API change -M src/lib-dcrypt/test-crypto.c +M src/plugins/virtual/virtual-storage.c -2016-07-15 09:53:12 +0200 x16a0 (02d7058e9) +2016-06-21 21:26:29 +0300 Timo Sirainen (5f1b68c3a) - Fixed searching multiple mailboxes + LAYOUT=index: Existence or GUID lookups don't need to refresh mailboxes. - When searching multiple mailboxes, a condition to search these mailboxes is - added to the query string. However, this condition has to be separated from - the preceding condition by a space (a '+' in this case, as it's encoded); - otherwise, Solr considers it to be part of the previous condition, in which - case it will fail to parse it properly. Therefore, this patch adds that one - missing character so it works again. -M src/plugins/fts-solr/fts-backend-solr.c +M src/lib-storage/list/mailbox-list-index-status.c -2016-08-04 22:15:25 +0300 Timo Sirainen (3ddf19c6c) +2016-06-21 21:21:03 +0300 Timo Sirainen (aa47c9bd1) - lib-dcrypt: Fixed test-stream unit test not to leak memory + lib-storage: Added quick parameter to list_index_has_changed() - Broken by previous change. -M src/lib-dcrypt/test-stream.c +M src/lib-storage/index/index-storage.h +M src/lib-storage/index/index-sync.c +M src/lib-storage/index/maildir/maildir-sync-index.c +M src/lib-storage/index/maildir/maildir-sync.h +M src/lib-storage/index/mbox/mbox-sync-list-index.c +M src/lib-storage/index/mbox/mbox-sync-private.h +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-storage/mail-storage-private.h -2016-08-04 21:51:18 +0300 Timo Sirainen (15e175c2a) +2016-06-21 21:06:22 +0300 Timo Sirainen (85c9cf2c3) - lib-auth: Unescape passdb/userdb extra fields. + LAYOUT=index: Avoid unnecessary work for setting \Marked flags in LIST + reply. - This only affected \001, \t, \r and \n characters which were left - tab-escaped (e.g. \t as "\001t"). + If MAILBOX_LIST_ITER_RETURN_NO_FLAGS is set, the caller doesn't care about + the flags. -M src/lib-auth/auth-master.c +M src/lib-storage/list/mailbox-list-index-iter.c -2016-08-04 20:21:27 +0300 Aki Tuomi (089b8ee22) +2016-06-20 11:33:47 +0300 Timo Sirainen (fbf29f41d) - istream-decrypt: Fix error handling in stream header + lib-dcrypt: dcrypt_keypair_generate() no longer assumes pair_r to be + initialized. + It wasn't clear that it should have been zeroed. It also likely isn't very + useful to be able to place the generated key to existing keys. -M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/dcrypt.c -2016-08-04 19:39:56 +0300 Aki Tuomi (baf8f0ae5) +2016-06-19 22:27:00 +0300 Timo Sirainen (6b136bb20) - lib-dcrypt: Skip checks if no backend found + lib-dcrypt: Check for all the return values in unit tests M src/lib-dcrypt/test-crypto.c M src/lib-dcrypt/test-stream.c -2016-08-02 22:31:50 +0300 Timo Sirainen (e26dc8849) +2016-06-19 22:21:59 +0300 Timo Sirainen (b9240a911) - director: Added more debug information to "Ping timed out" error + lib-dcrypt: Added missing error handling. + Most of these are probably unnecessary now that malloc() no longer fails. + Also some of the NULL checks may not be needed since OpenSSL functions + (usually?) return failure on NULL parameters, but sometimes they perform a + different operation. So overall, probably safer to include these checks. -M src/director/director-connection.c +M src/lib-dcrypt/dcrypt-openssl.c -2016-08-04 12:57:58 +0300 Martti Rannanjärvi (3f07c9419) +2016-06-19 22:18:04 +0300 Timo Sirainen (0eaf77d8c) - lib-dcrypt: drop format from key_load_public + lib-dcrypt: Don't ignore BIO errors. + + Might happen due to out of memory? + +M src/lib-dcrypt/dcrypt-openssl.c + +2016-06-19 21:21:56 +0300 Timo Sirainen (394391e78) + lib-dcrypt: dcrypt_key_type_public/private() can no longer fail. + + Removed unnecessary failure handling. M src/lib-dcrypt/dcrypt-openssl.c M src/lib-dcrypt/dcrypt-private.h M src/lib-dcrypt/dcrypt.c M src/lib-dcrypt/dcrypt.h -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c +M src/lib-dcrypt/ostream-encrypt.c -2016-08-04 12:52:20 +0300 Martti Rannanjärvi (45cc36e2b) +2016-06-19 21:20:27 +0300 Timo Sirainen (955c276b9) - lib-dcrypt: drop format from key_load_private + lib-dcrypt: dcrypt_key_convert_private_to_public() can no longer fail. + Removed unnecessary failure handling. M src/lib-dcrypt/dcrypt-openssl.c M src/lib-dcrypt/dcrypt-private.h M src/lib-dcrypt/dcrypt.c M src/lib-dcrypt/dcrypt.h M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c -2016-08-04 12:19:05 +0300 Martti Rannanjärvi (b55e1276e) +2016-06-19 20:55:19 +0300 Timo Sirainen (f85f12e3f) - lib-dcrypt: get_info in openssl_load_private_key + lib-dcrypt: Assert-crash if key parameter is NULL. - Use dcrypt_openssl_key_string_get_info to determine the key format instead - of taking it as a parameter. + If it happens, it's a bug. M src/lib-dcrypt/dcrypt-openssl.c -2016-08-04 10:54:20 +0300 Martti Rannanjärvi (791f2751a) +2016-06-19 20:48:27 +0300 Timo Sirainen (4b1448703) - lib-dcrypt: get_info in openssl_load_public_key + lib-dcrypt: Assert-crash if impossible private/public keys are seen. - Use dcrypt_openssl_key_string_get_info to determine the key format instead - of taking it as a parameter. M src/lib-dcrypt/dcrypt-openssl.c -2016-08-03 17:55:15 +0300 Martti Rannanjärvi (5bc9fcc84) +2016-06-21 18:47:42 +0300 Timo Sirainen (035d6e469) - lib-dcrypt: change v2 key field separator to ':' + doveadm fs delete: Allow multiple paths also with -R parameter. -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/test-crypto.c +M src/doveadm/doveadm-fs.c -2016-08-04 15:57:22 +0300 Aki Tuomi (de9c2408f) +2016-06-21 18:30:20 +0300 Timo Sirainen (a18ba96c4) - lib-dcrypt: Do not unref key twice + doveadm: Fixed --long-parameters handling -M src/lib-dcrypt/dcrypt-openssl.c +M src/doveadm/doveadm-cmd.c -2016-08-03 10:14:35 +0300 Aki Tuomi (60ead27f8) +2016-06-20 20:06:38 +0300 Timo Sirainen (2b9dbb270) - lib-dcrypt: Handle short reads in header correctly + dbox: Optimize POP3 MAIL_FETCH_UIDL_BACKEND. + We keep track of the highest UID known to have POP3 UIDL in index's header. + If saving adds a newer message, it'll also update the header. When fetching + UIDL_BACKEND, we can need to check only mails with lower UIDs. There are + some race conditions here, but normally UIDLs are set only once during + migration so it shouldn't matter. -M src/lib-dcrypt/istream-decrypt.c +M src/lib-storage/index/Makefile.am +M src/lib-storage/index/dbox-common/dbox-mail.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/dbox-common/dbox-save.h +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-save.c +A src/lib-storage/index/index-pop3-uidl.c +A src/lib-storage/index/index-pop3-uidl.h +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-transaction.c +M src/lib-storage/mail-storage-private.h -2016-07-25 14:04:47 +0300 Martti Rannanjärvi (99bc07e8d) +2016-06-20 11:39:55 +0300 Timo Sirainen (ba16a89e4) - lib-dcrypt: add crashing 8 byte garbage read test + Added welcome plugin. -M src/lib-dcrypt/test-stream.c +M configure.ac +M src/plugins/Makefile.am +A src/plugins/welcome/Makefile.am +A src/plugins/welcome/welcome-plugin.c -2016-07-15 16:31:01 +0300 Aki Tuomi (89a8f5dfd) +2016-06-21 15:11:04 +0300 Martti Rannanjärvi (cf4609752) - dcrypt: Update API for testing + doc: fix wrong tense in doveadm-expunge man page -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c +M doc/man/doveadm-expunge.1.in -2016-07-15 16:30:51 +0300 Aki Tuomi (612d32473) +2016-06-21 17:25:15 +0300 Timo Sirainen (06c1f686f) - dcrypt-iostream: Ref/unref keys + fs-posix: Use ":" instead of space as the parameter separator. + This makes it consistent with all the other fs drivers. -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/ostream-encrypt.c +M src/lib-fs/fs-posix.c -2016-07-15 16:27:03 +0300 Aki Tuomi (863ce6119) +2016-06-21 17:24:11 +0300 Timo Sirainen (9826e1405) - dcrypt: Use refcounting on keys + fs-posix: Added "dirs" parameter to enable explicit directory removal. -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt-private.h -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/dcrypt.h +M src/lib-fs/fs-posix.c -2016-08-04 08:55:12 +0300 Aki Tuomi (284a77b14) +2016-06-21 16:49:19 +0300 Timo Sirainen (aed5d5c05) - last-login: Add error handling for commit + fs-posix: Autodelete directories also when "prefix" parameter is used. -M src/plugins/last-login/last-login-plugin.c +M src/lib-fs/fs-posix.c -2016-08-03 13:18:17 +0300 Timo Sirainen (5d5553da8) +2016-06-20 15:10:55 +0300 Baofeng Wang (8f0503ea1) - lib-index: Fixed debug logging. + lib-storage: Add autoexpunge_max_mails configuration to autoexpunge + + Mails are expunged until mail count is at autoexpunge_max_mails or below. + + In below example, autoexpunge will expunge 1 mail when message count > 100 + and *then* try to expunge mails that are still older than 2 minutes: + + namespace { + .. + mailbox Trash { + autoexpunge = 2 mins + autoexpunge_max_mails = 100 + } + } + +M src/lib-storage/mail-autoexpunge.c +M src/lib-storage/mail-storage-settings.c +M src/lib-storage/mail-storage-settings.h + +2016-06-21 12:04:24 +0300 Timo Sirainen (ade556757) + + lib-dict: Explicitly specify used dict_vfuncs methods for drivers. + + This allows adding more methods without modifying all the existing drivers. + +M src/lib-dict/dict-cdb.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-db.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c + +2016-05-10 10:00:57 +0300 Baofeng Wang (027f9b615) + + auth: passdb-ldap Logging message is modified. + + +M src/auth/passdb-ldap.c + +2016-06-08 16:41:04 +0300 Baofeng Wang (0d6f8e7e2) + + lib-fts: add unit test to fts_tokenizer_delete_trailing_partial_char() + + +M src/lib-fts/test-fts-tokenizer.c + +2016-06-07 16:37:27 +0300 Baofeng Wang (eb568e46e) + + lib-fts: allow hyphen character in domain part + + Allow hyphen character and remove possible trailing hyhpen character when + email tokenization is done. + +M src/lib-fts/fts-tokenizer-address.c +M src/lib-fts/fts-tokenizer-common.c +M src/lib-fts/test-fts-tokenizer.c + +2016-06-07 15:58:38 +0300 Baofeng Wang (507ea0bc5) + + lib-fts: remove trailing period character from email-address + + any trailing period character '.' should be removed when email tokenization + is done. + +M src/lib-fts/fts-tokenizer-address.c +M src/lib-fts/fts-tokenizer-common.c +M src/lib-fts/fts-tokenizer-common.h +M src/lib-fts/test-fts-tokenizer.c +2016-06-07 16:01:03 +0300 Baofeng Wang (3c16f16e0) -M src/lib-index/mail-cache-lookup.c + lib-test: add test_assert_failed_strcmp to expose strings. -2016-07-29 01:02:29 +0300 Timo Sirainen (48d503d43) + the macro is used to facilitate any test to show string comparision contents + when they doesn't match. - lib-index: If mail_debug=yes, log cache compressions. +M src/lib-test/test-common.c +M src/lib-test/test-common.h +2016-06-20 21:38:56 +0300 Timo Sirainen (0d8dc754e) -M src/lib-index/mail-cache-compress.c -M src/lib-index/mail-index.h -M src/lib-storage/index/index-storage.c + Makefile: Added run-test-valgrind.supp to EXTRA_DIST -2016-07-25 14:20:05 -0400 Timo Sirainen (3224daea5) - Use mail_get_*stream_because() wherever possible. +M Makefile.am +2016-06-20 20:47:57 +0300 Timo Sirainen (f78e977b4) -M src/lib-imap-storage/imap-msgpart.c -M src/lib-storage/index/index-mail-binary.c -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h -M src/lib-storage/index/index-search.c -M src/lib-storage/mail-copy.c -M src/plugins/fts/fts-build-mail.c -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/pop3/pop3-commands.c + lib-http: s/unsigned int:1/bool:1/ -2016-07-29 00:37:07 +0300 Timo Sirainen (d4aec6712) - lib-index: Added mail_cache_get_missing_reason() +M src/lib-http/test-http-server-errors.c +2016-06-20 20:30:47 +0300 Timo Sirainen (eda0261e7) -M src/lib-index/mail-cache-lookup.c -M src/lib-index/mail-cache.h + lib-settings: Minor error message fix. -2016-07-25 14:16:39 -0400 Timo Sirainen (8deeb07e9) - lib-storage: Added mail_get_stream_because() and - mail_get_hdr_stream_because() +M src/lib-settings/settings-parser.c - With mail_debug=yes each mail access is now logged with a reason. This can - be helpful when figuring out why something isn't in dovecot.index.cache. +2016-06-20 18:46:04 +0300 Timo Sirainen (7a6a11d7f) -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.h -M src/lib-storage/mail.c + Updated run-test-valgrind.supp -2016-08-02 21:16:15 +0300 Timo Sirainen (b5c1836fb) - doveadm proxy kick: Fixed output message. +M run-test-valgrind.supp +2016-06-20 17:52:28 +0300 Timo Sirainen (ee0a6db8f) -M src/doveadm/doveadm-proxy.c + lib: file_create_locked() - Unexpectedly deleted temp file is error. -2016-08-02 21:10:42 +0300 Timo Sirainen (92d780b32) + This shouldn't happen and we shouldn't be silently retrying if it does. - lib-lda: Support %{storage_id} in deliver_log_format +M src/lib/file-create-locked.c +2016-06-20 14:29:57 +0300 Timo Sirainen (bb54eb984) -M src/lib-lda/mail-deliver.c + Added valgrind suppression for OpenSSL (73ebd9d13) + This one works at least for CentOS 6. Because the OpenSSL library is loaded + as a plugin and unloaded before exit, valgrind sees only "???" as the + addresses. That's why we're using "obj:*". But the number of obj:* lines is + also important, so this may not work everywhere. - lib-lda: Code cleanup - move code to mail_deliver_open_mail() +M run-test-valgrind.supp - No functional changes. On its own this is a rather useless cleanup, but - simplifies the next patch. +2016-06-20 13:37:13 +0300 Timo Sirainen (864e580b6) -M src/lib-lda/mail-deliver.c + openssl: Use our own malloc()/realloc() that will die on out-of-memory. -2016-08-02 20:09:49 +0300 Timo Sirainen (79f0c3039) + This is likely safer rather than caller thinking for example that some input + is invalid when it's only a temporary memory allocation problem. - imap: When un-hibernating, send notification to imap-hibernate process - earlier. +M src/lib-ssl-iostream/dovecot-openssl-common.c - The initialization shouldn't take a long time, but there's really no need to - keep imap-hibernate itself waiting (and maybe timing out) if it does. +2016-06-20 13:33:34 +0300 Timo Sirainen (a62dad9ec) -M src/imap/imap-master-client.c + lib-dcrypt: Allow specifying crypto_device (OpenSSL engine). -2016-08-02 20:03:01 +0300 Timo Sirainen (6df3a7270) - imap-hibernate: If un-hibernation failed due to timeout, log whether we saw - version line. +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt-private.h +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/dcrypt.h +M src/lib-dcrypt/test-crypto.c +M src/lib-dcrypt/test-stream.c - Could help with debugging. +2016-06-20 13:33:05 +0300 Timo Sirainen (ff95c6488) -M src/imap-hibernate/imap-master-connection.c + lib-dcrypt: Added library dependencies to unit tests -2016-07-19 10:16:17 -0600 Timo Sirainen (0e6c2c0d5) - imap-hibernate: If imap-master socket is busy, retry un-hibernation later. +M src/lib-dcrypt/Makefile.am +2016-06-20 12:58:08 +0300 Timo Sirainen (285bfe946) -M src/imap-hibernate/imap-client.c -M src/imap-hibernate/imap-client.h -M src/imap-hibernate/imap-master-connection.c -M src/imap-hibernate/imap-master-connection.h -M src/imap-hibernate/main.c + lib-dcrypt, lib-ssl-iostream: Share OpenSSL init/deinit code. -2016-08-02 13:41:07 +0300 Timo Sirainen (e16245a46) - lib: var_has_key() properly ignores key=='\0' now. +M src/Makefile.am +M src/lib-dcrypt/Makefile.am +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-ssl-iostream/Makefile.am +A src/lib-ssl-iostream/dovecot-openssl-common.c +A src/lib-ssl-iostream/dovecot-openssl-common.h +M src/lib-ssl-iostream/iostream-openssl-context.c +2016-06-20 13:05:37 +0300 Timo Sirainen (a7ad754fc) -M src/lib/test-var-expand.c -M src/lib/var-expand.c -M src/lib/var-expand.h + lib-dcrypt: Fix to backend module loading. -2016-08-02 13:38:25 +0300 Timo Sirainen (55b26ae41) + Especially don't die if we fail to load the module. - lib: var_get_key() didn't handle %{long_variables} correctly +M src/lib-dcrypt/dcrypt.c - This also fixes var_has_key()'s long_key handling. +2016-06-19 21:31:10 +0200 Stephan Bosch (f98d562bc) -M src/lib/test-var-expand.c -M src/lib/var-expand.c -M src/lib/var-expand.h + lib-http: server: Created test program that tests error conditions. -2016-08-02 01:04:57 +0300 Timo Sirainen (413e0d9bc) + Currently it is very limited, but it is due to be extended soon towards + testing most common error conditions. - --without-shared-libs was linking libdovecot.so to mail binaries. +M src/lib-http/Makefile.am +A src/lib-http/test-http-server-errors.c - Broken by e42dd7149. +2016-06-20 02:41:37 +0200 Stephan Bosch (b154be7ad) -M src/lib-storage/Makefile.am + lib-http: Restructured Makefile.am to have less duplicated lines for the + test suite. -2016-07-23 12:02:29 -0400 Timo Sirainen (06c221748) - lib-fs: Added fs_get_nlinks() +M src/lib-http/Makefile.am - Although fs_stat() could return this, its caller can't indicate whether it - actually wants the link count. Usually fs_stat() is used only to get the - file's size. In some backends it's not cheap to get the link count, so - adding this function allows the caller to explicitly ask for it. +2016-06-20 01:25:02 +0200 Stephan Bosch (47fee1a94) -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-posix.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-test.c -M src/lib-fs/fs-wrapper.c -M src/lib-fs/fs-wrapper.h -M src/plugins/fs-compress/fs-compress.c + lib-http: server: Added settings to configure the connection's socket kernel + buffer sizes. -2016-07-25 17:41:36 -0400 Timo Sirainen (66417aa67) + This is mainly useful for use in the lib-http test suite. - dict-client: Don't keep a request timeout when there are only background - commands. +M src/lib-http/http-server-connection.c +M src/lib-http/http-server.c +M src/lib-http/http-server.h +2016-06-20 01:20:33 +0200 Stephan Bosch (17f37f252) -M src/lib-dict/dict-client.c + lib-http: server: Make sure provided connection FDs are non-blocking. -2016-07-25 17:32:11 -0400 Timo Sirainen (b1b1b925e) - dict-client: When we get disconnected, reconnect and re-send commands. +M src/lib-http/http-server-connection.c +2016-06-20 01:15:18 +0200 Stephan Bosch (f60fe422c) -M src/lib-dict/dict-client.c + lib-http: server: Wrap request payload in a timeout input stream. -2016-07-25 17:08:18 -0400 Timo Sirainen (c1a4bc46e) + The server cannot reset the timeout properly while the payload is being read + by the application. The HTTP client solved this same problem by identical + means. - dict-client: Improved timeout error message +M src/lib-http/http-server-connection.c +2016-06-19 22:31:18 +0200 Stephan Bosch (cd1c11375) -M src/lib-dict/dict-client.c + lib-http: server: Fixed handling of idle timeout when request just starts + processing on the server. -2016-08-02 01:02:59 +0300 Timo Sirainen (9f488469e) - dict-client: Fixed hang in async iteration if it failed. +M src/lib-http/http-server-connection.c +2016-06-19 22:35:43 +0200 Stephan Bosch (861aff347) -M src/lib-dict/dict-client.c + lib-http: server: Added more detailed debugging about when idle timeouts are + started/stopped. -2016-08-01 22:18:08 +0300 Timo Sirainen (77304569b) - quota: Log an error if mail's size can't be read. +M src/lib-http/http-server-connection.c - We were still logging "Internal quota calculation error" but not necessarily - any other reason. +2016-06-17 16:59:37 +0200 Stephan Bosch (8bc621708) -M src/plugins/quota/quota.c + lib-http: client: Added tests for manual handling of connection loss retries + to test-http-client-errors. -2016-07-29 00:59:43 +0300 Timo Sirainen (b3a52b078) - lib-storage: mbox_min_index_size setting didn't work correctly. +M src/lib-http/test-http-client-errors.c +2016-06-17 16:59:15 +0200 Stephan Bosch (486c7c8d9) -M src/lib-storage/index/index-storage.c + lib-http: client: Implemented no_auto_retry setting that disables all + automatic request retries. -2016-07-28 21:15:16 +0300 Timo Sirainen (2103e2116) + This currently only applies to requests sent over a connection that is + subsequently lost before a response is received. Before, such requests were + always implicitly resumbitted for a new connection, without the application + knowing about it. By enabling the no_auto_retry client setting, the + application is always notified of connection loss through the request's + response callback. As a consequence, requests need to be retried explicitly + using the http_client_request_try_retry(). - lib-storage: Don't crash fetching body.snippet when multipart/alternative - part has no Content-Type +M src/lib-http/http-client-connection.c +M src/lib-http/http-client.c +M src/lib-http/http-client.h +2016-06-17 15:39:36 +0200 Stephan Bosch (d6a88217c) -M src/lib-storage/index/index-mail.c + lib-http: client: Allow retrying requests that failed internally. -2016-07-26 13:53:56 -0400 Timo Sirainen (b4156beb9) - auth: Fixed caching to support %{passdb} and %{userdb} +M src/lib-http/http-client-request.c +2016-06-20 03:08:30 +0300 Timo Sirainen (d470d4add) -M src/auth/auth-cache.c -M src/auth/test-auth-cache.c + lib-dict-extra: Compiler warning fix -2016-07-26 13:52:44 -0400 Timo Sirainen (0a21a4e5a) - auth: Set userdb_lookup flag correctly for blocking userdb lookups. +M src/lib-dict-extra/dict-fs.c - This caused at least userdb-related logging to log the passdb instead. +2016-06-13 17:10:22 +0300 Timo Sirainen (a5ec97555) -M src/auth/auth-worker-client.c + lib-dict: Added dict_switch_ioloop() -2016-07-26 13:52:20 -0400 Timo Sirainen (759da60e7) - auth: Code cleanup - use const for struct auth_request. +M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h +M src/plugins/dict-ldap/dict-ldap.c +2016-06-13 16:55:33 +0300 Timo Sirainen (a9e079feb) -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h + lib-dict: Added test-dict-client to stress test async dict operations -2016-07-25 14:09:38 -0400 Timo Sirainen (780a61ae1) - lazy-expunge: If lazy-expunge transaction failed already, stop further - expunges. +M src/lib-dict/Makefile.am +A src/lib-dict/test-dict-client.c - Most importantly if the lazy-expunge mailbox opening fails, we don't now - retry opening the mailbox for each expunged mail. +2016-06-02 00:57:17 +0300 Timo Sirainen (a7e46c053) -M src/plugins/lazy-expunge/lazy-expunge-plugin.c + lib-dict: dict-client rewrite to support async operations -2016-07-24 18:26:50 -0400 Timo Sirainen (6d941a2fe) - lib: Potential compiling fix. +M src/lib-dict/dict-client.c - STATIC_ARRAY apparently requires that the parameter is named in some gcc - versions? In any case doesn't hurt. +2016-06-20 02:25:47 +0300 Timo Sirainen (1a0b3d438) -M src/lib/sha1.h + lib-dcrypt: Use a more supported EC curve in unit test -2016-07-13 09:46:08 +0200 Stephan Bosch (b4796b310) + Fixes running the test on CentOS 6. - Calling i_stream_next_line() on a chain stream would sometimes erroneously - use the stream->w_buffer. +M src/lib-dcrypt/test-crypto.c - It used the wrong check to assess whether the w_buffer is usable. The chain - stream only uses the w_buffer when partial stream data needs to be merged. - Otherwise, a parent stream's buffer is used directly. However, this does not - mean that w_buffer will be NULL in that case, which is what - i_stream_next_line() assumed. +2016-06-20 01:47:59 +0300 Timo Sirainen (d697aa99b) -M src/lib/istream.c + lib-index: Don't break indexes on syscall failures during index refreshing. -2016-07-11 20:27:48 +0300 Timo Sirainen (fdb1b5961) + Especially mmap() failures due to out of memory could have triggered this. + We treated the open as successful, which meant that an empty index was + opened. - lib-dcrypt: Allow flushing ostream multiple times. +M src/lib-index/mail-index-sync-update.c - The first time flushes the encryption and the following times just flush the - parent stream. +2016-06-19 23:18:43 +0300 Timo Sirainen (b0c472c7a) -M src/lib-dcrypt/ostream-encrypt.c + lib-dcrypt: Fixed running unit tests in build directory. -2016-07-11 20:27:14 +0300 Timo Sirainen (e3bdc112c) - lib-dcrypt: Improved error message when istream isn't encrypted. +M src/lib-dcrypt/Makefile.am +M src/lib-dcrypt/test-stream.c +2016-06-19 20:23:27 +0300 Timo Sirainen (49b6ea585) -M src/lib-dcrypt/istream-decrypt.c + mailbox-alias: Fixed renaming mailboxes when the plugin is loaded. -2016-07-19 18:28:06 +0300 Timo Sirainen (d81a83bf1) - master: Don't leak master socket to child processes. +M src/plugins/mailbox-alias/mailbox-alias-plugin.c +2016-06-19 18:44:55 +0300 Timo Sirainen (2f04dd9ab) -M src/master/service-listen.c + lib-dcrypt: Fixed memory leak in test-crypto unit test -2016-07-17 13:51:05 -0600 Timo Sirainen (349c58a42) - fts: Fixed fts_autoindex when no fts_autoindex_exclude settings existed. +M src/lib-dcrypt/test-crypto.c +2016-06-19 18:38:39 +0300 Timo Sirainen (763e74b20) -M src/plugins/fts/fts-storage.c + doveadm dump: Updated obox's oid output. -2016-07-16 11:30:39 -0500 Timo Sirainen (9517760ef) - lib-dict: Added DICT_COMMIT_RET_WRITE_UNCERTAIN +M src/doveadm/doveadm-dump-index.c +2016-06-16 22:02:08 +0200 Stephan Bosch (44005db1c) -M src/dict/dict-commands.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h -M src/lib-dict/dict-sql.c -M src/lib-dict/dict.h + lib-http: client/server: Enable the TCP_NODELAY option for all connections. -2016-07-17 12:37:06 -0600 Timo Sirainen (88e90423c) + This disables the TCP Nagle algorithm. With the Nagle algorithm enabled, TCP + waits a little to accumulate more data in a small segment before it is sent. + For transfer of large continuous payloads, this is not useful and even + harmful. If the final remaining bit of the payload is small, the TCP layer + will wait for a significant amount of time at the end of the payload. For + many sequential transfers, this amounts to much waiting time. This is + particularly evident in the test-http-payload test suite tool. Setting + TCP_NODELAY decreases its run time from up to 20 minutes to about half a + minute my system. - cassandra: Support commit2 API +M src/lib-http/http-client-connection.c +M src/lib-http/http-server-connection.c +2016-06-16 22:01:06 +0200 Stephan Bosch (2dca65ba6) -M src/lib-sql/driver-cassandra.c + lib: Created net_set_tcp_nodelay(), which enables the TCP_NODELAY socket + option. -2016-07-17 12:33:41 -0600 Timo Sirainen (766680f7a) + This disables the TCP Nagle algorithm. - lib-sql: Added sql_transaction_commit2() +M src/lib/net.c +M src/lib/net.h - In v2.3 the sql_transaction_commit() API was just modified, but for now - we'll add this _commit2() to preserve API compatibility. +2016-06-16 11:23:16 +0300 Timo Sirainen (095481fee) -M src/lib-sql/driver-cassandra.c -M src/lib-sql/driver-mysql.c -M src/lib-sql/driver-pgsql.c -M src/lib-sql/driver-sqlite.c -M src/lib-sql/driver-sqlpool.c -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c -M src/lib-sql/sql-api.h + lib-ssl-iostream: Changed require_valid_cert -> allow_invalid_cert -2016-07-15 16:40:31 -0500 Timo Sirainen (6e7d98bbd) + We should default to being safe. - cassandra: Support returning SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN +M src/doveadm/server-connection.c +M src/lib-http/http-client-connection.c +M src/lib-http/test-http-client.c +M src/lib-imap-client/imapc-connection.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-ssl-iostream/iostream-ssl.h +M src/lib-storage/index/pop3c/pop3c-client.c +2016-06-14 22:47:31 +0200 Stephan Bosch (97d67b7b0) -M src/lib-sql/driver-cassandra.c + lib-http: client: Added test for http_client_request_delay_msecs() in + test_http_client_errors. -2016-07-15 16:40:05 -0500 Timo Sirainen (a91fc8e78) - lib-sql: Added sql_result_get_error_type(). +M src/lib-http/test-http-client-errors.c - For now the only special error type is - SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN. +2016-06-15 01:54:25 +0200 Stephan Bosch (a0923d7d0) -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c -M src/lib-sql/sql-api.h + lib-http: client: Added more debug logging about the submission of delayed + requests. -2016-07-14 16:16:52 -0500 Timo Sirainen (9dc6403b3) - dict: Fixed crash on iteration handling. +M src/lib-http/http-client-queue.c +2016-06-15 01:53:44 +0200 Stephan Bosch (8bca5ef71) -M src/dict/dict-commands.c + time-util: Fixed usec comparison in timeval_cmp_margin(). -2016-07-14 07:22:04 -0500 Timo Sirainen (3f18da05c) - dict-client: Improved logging for slow queries. +M src/lib/time-util.c - Especially commits now say what the first query within the commit was. +2016-06-14 22:42:09 +0300 Teemu Huovila (d86910a95) -M src/lib-dict/dict-client.c + lib-dcrypt: Fix error_r pointer verification. -2016-07-14 06:53:54 -0500 Timo Sirainen (58fd3cd8a) - doveadm fetch: Fixed body.snippet. +M src/lib-dcrypt/dcrypt.c +2016-06-14 22:32:36 +0300 Timo Sirainen (507dcd9fe) -M src/doveadm/doveadm-mail-fetch.c + lib-fs: Added write_bytes to statistics -2016-07-13 15:10:57 -0500 Timo Sirainen (c294b67dc) - dbox: Initialize pop3-uidl header on INBOX creation. +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h - This way we don't add any UIDLs to dovecot.index.cache on the first POP3 - UIDL access. We'll assume that pop3-uidl header is updated whenever any - backend UIDLs are added, which should happen nowadays. +2016-06-14 12:30:27 +0300 Aki Tuomi (f86bd28cf) -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c + dcrypt: Arm deinitialization code -2016-07-13 14:07:02 -0500 Timo Sirainen (12f9b06fb) - lib-storage: Initialize pop3-uidl header also when no backend UIDLs exist. +M src/lib-dcrypt/dcrypt.c - The first time POP3 UIDL command is used, set the header even when there are - no backend UIDLs to prevent any further UIDL caching. +2016-06-14 12:08:49 +0300 Aki Tuomi (1471b4239) -M src/lib-storage/index/index-pop3-uidl.c + dcrypt: Add test for public key loading -2016-07-11 14:56:41 +0300 Aki Tuomi (c14ec3952) - auth: Fail request if last passdb is noauthenticate +M src/lib-dcrypt/test-crypto.c +2016-06-14 12:08:34 +0300 Aki Tuomi (5029a1946) -M src/auth/auth-request.c + dcrypt-openssl: Pass pointer safely -2016-07-11 14:56:25 +0300 Aki Tuomi (319773b12) - gssapi: Add missing PASSDB_RESULT_NEXT clause +M src/lib-dcrypt/dcrypt-openssl.c +2016-06-14 10:49:24 +0300 Timo Sirainen (f19b3f14f) -M src/auth/mech-gssapi.c + lib-index: Fixed test-mail-index-sync-ext -2016-07-11 16:13:28 +0300 Timo Sirainen (76153564b) - lib-fs: Added fs_metadata_init_or_clear() helper +M src/lib-index/test-mail-index-sync-ext.c +2016-06-14 01:14:13 +0300 Timo Sirainen (3403e054e) -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c + lib-index: Fixes to handling resized records. -2016-07-11 14:18:36 +0300 Aki Tuomi (e1a3bc128) - passdb: Skip credentials handling for noauthenticate +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-sync-private.h +M src/lib-index/mail-index-sync-update.c +M src/lib-index/mail-index-transaction-export.c +2016-06-13 20:16:14 +0300 Timo Sirainen (54b88816e) -M src/auth/passdb.c + dict: Increased max number of pipelined requests from 5 to 1000. -2016-07-11 11:28:10 +0300 Timo Sirainen (3afcdd2b0) + The client is supposed to be the one throttling the requests. We mainly want + to avoid accidental abuses. Using 1000 is hopefully "large enough" without + being "too large". - lib-storage: Fixed crash on subscription listing if subscription refresh - fails. +M src/dict/dict-connection.c +2016-06-13 17:59:01 +0300 Timo Sirainen (84801834c) -M src/lib-storage/list/mailbox-list-iter.c + dict: Avoid potentially using 100% CPU -2016-07-09 20:11:45 +0300 Aki Tuomi (cd1786b34) + Continuing 65c570f18 fix. - auth: Skip authentication with noauthenticate +M src/dict/dict-connection.c +2016-06-13 17:11:28 +0300 Timo Sirainen (829653131) -M src/auth/auth-master-connection.c -M src/auth/auth-request-handler.c -M src/auth/auth-request.c -M src/auth/auth-worker-client.c -M src/auth/passdb-blocking.c -M src/auth/passdb-sql.c -M src/auth/passdb.h + lib-fs: Added fs_switch_ioloop() -2016-07-11 11:55:34 +0300 Timo Sirainen (baf1d3784) - mdbox: Fixed crash when saving POP3 UIDLs to a non-empty mailbox. +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-dict.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-posix.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test.c +M src/plugins/fs-compress/fs-compress.c - Fixes assert: +2016-06-13 17:31:34 +0300 Timo Sirainen (e597ab14b) - Panic: file mdbox-save.c: line 337: unreached + lib-fs: Code cleanup for fs-sis: Use struct fs.parent -M src/lib-storage/index/dbox-multi/mdbox-save.c -2016-07-11 11:40:41 +0300 Timo Sirainen (758d1194c) +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c - pop3c: Fixed crash in syncing when local indexes existed but UIDL wasn't - cached. +2016-06-13 12:49:19 +0300 Aki Tuomi (269a38b5e) + lib-dcrypt: Use hex encoded public key ID in callback -M src/lib-storage/index/pop3c/pop3c-sync.c -2016-07-11 10:22:06 +0300 Timo Sirainen (174ed0ddc) +M src/lib-dcrypt/istream-decrypt.c +M src/lib-dcrypt/istream-decrypt.h - lmtp: Don't send double-DISCONNECT to anvil. +2016-06-13 12:44:09 +0300 Aki Tuomi (8d0e0f098) - Happened with lmtp_user_concurrency_limit > 0. Fixes errors like: + lib-dcrypt: Use dcrypt_key_id_private when applicable - Error: connect limit: disconnection for unknown pid 123 + ident - lmtp/username -M src/lmtp/commands.c +M src/lib-dcrypt/istream-decrypt.c -2016-07-06 23:41:18 +0300 Timo Sirainen (efac0032e) +2016-05-11 08:02:29 +0300 Aki Tuomi (57614d9fe) - Compiler warning fix + ldap: Fix cyclic dependency -M src/doveadm/doveadm-zlib.c +M configure.ac +M src/Makefile.am +M src/lib-dict-extra/Makefile.am +M src/plugins/Makefile.am +A src/plugins/dict-ldap/Makefile.am +R100 src/lib-dict-extra/dict-ldap-settings.c src/plugins/dict-ldap/dict-ldap-settings.c +R100 src/lib-dict-extra/dict-ldap-settings.h src/plugins/dict-ldap/dict-ldap-settings.h +R100 src/lib-dict-extra/dict-ldap.c src/plugins/dict-ldap/dict-ldap.c -2016-07-05 18:15:55 +0300 Timo Sirainen (965a0254e) +2016-06-13 12:18:07 +0300 Timo Sirainen (ce9086952) - fs-sis*: Use fs_wrapper_*() wherever possible + dovecot-config: Add lib-dcrypt to LIBDOVECOT_INCLUDE + Since lib-dcrypt is part of libdovecot. -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c +M dovecot-config.in.in -2016-07-05 18:12:33 +0300 Timo Sirainen (b496de056) +2016-05-19 11:14:46 +0300 Martti Rannanjärvi (5a521f935) - fs-sis*: Minor error handling function cleanups. + master: make setting listen empty an error - We don't really need to go to the parent fs, so just use what is easiest. -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c +M src/master/master-settings.c -2016-07-05 18:03:36 +0300 Timo Sirainen (7da5f38bb) +2016-06-06 10:28:18 +0300 Timo Sirainen (d34b8a75f) - fs-sis*: Removed unnecessary error copying. + lib-fs: fs_wait_async() can't fail, so make it return void. - It was probably needed in the beginning, but nowadays the parent-most fs - keeps the error. There's no need to copy it around. + The individual requests can timeout, but not the waiting itself. +M src/doveadm/doveadm-fs.c +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-randomfail.c M src/lib-fs/fs-sis-queue.c M src/lib-fs/fs-sis.c +M src/lib-fs/fs-test.c +M src/plugins/fs-compress/fs-compress.c -2016-07-05 17:59:08 +0300 Timo Sirainen (2f97ab590) - - fs-metawrap: Use fs_wrapper_*() wherever possible +2016-06-13 09:56:20 +0300 Timo Sirainen (725051a12) + lmtp: Don't permanently allocate from data stack during init. -M src/lib-fs/fs-metawrap.c -2016-07-05 17:55:12 +0300 Timo Sirainen (fad8a5222) +M src/lmtp/main.c +M src/lmtp/main.h - fs-compress: Use fs_wrapper_*() wherever possible +2016-06-12 20:11:49 +0300 Timo Sirainen (760528b71) + lib-index: mail_index_ext_resize() was broken when record_size wasn't + changed. -M src/plugins/fs-compress/fs-compress.c -2016-07-05 17:52:00 +0300 Timo Sirainen (485061cae) +M src/lib-index/mail-index-transaction-update.c - lib-fs: Implement all lib-fs functions as wrappers to parent stream. +2016-06-12 18:57:10 +0300 Aki Tuomi (7e1a69e51) + lib-dcrypt: Fix various problems -M src/lib-fs/Makefile.am -M src/lib-fs/fs-api-private.h -A src/lib-fs/fs-wrapper.c -A src/lib-fs/fs-wrapper.h -2016-07-06 13:15:22 +0300 Timo Sirainen (6bdee9cee) +M src/lib-dcrypt/Makefile.am +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dcrypt/dcrypt-private.h +M src/lib-dcrypt/dcrypt.c +M src/lib-dcrypt/dcrypt.h - lib-dcrypt: istream-decrypt now differentiates between temporary errors and - corruption. +2016-06-11 21:23:57 +0300 Timo Sirainen (aeaf81861) + lib-mail: Improved message-parser unit tests. -M src/lib-dcrypt/istream-decrypt.c -2016-07-06 13:11:50 +0300 Timo Sirainen (e16a00aeb) +M src/lib-mail/test-message-parser.c - lib-dcrypt: Set stream_errno on istream-decrypt read failures. +2016-06-11 21:23:07 +0300 Timo Sirainen (1bc6f1c54) - Fixes assert-crashes that would happen otherwise. + lib-mail: Fixed message_parser_init_from_parts() with truncated MIME headers -M src/lib-dcrypt/istream-decrypt.c -2016-07-06 13:31:12 +0300 Timo Sirainen (d374ad014) +M src/lib-mail/message-parser.c - lib: Updated istream's stream_errno comments. +2016-06-11 21:20:37 +0300 Timo Sirainen (20faa69d8) + lib-mail: message-header-parser now keeps istream referenced. -M src/lib/istream.h -2016-07-06 13:24:03 +0300 Timo Sirainen (d49e6f5aa) +M src/lib-mail/message-header-parser.c - lib-compression: istream-zlib/lzma now differentiates between temporary - errors and corruption. +2016-06-11 20:50:39 +0300 Timo Sirainen (9202c6606) + lib-storage: mail_set_cache_corrupted*() now sets internal error to storage. -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c + At least index_mail_set_message_parts_corrupted() assumed that this was + being done. -2016-07-05 20:58:29 +0300 Timo Sirainen (8e8aca6fc) +M src/lib-storage/index/index-mail.c - lib-storage: Clarify that mail_namespace_find_inbox() never returns NULL. +2016-06-11 20:36:51 +0300 Timo Sirainen (f36c41854) - If namespaces==NULL, this function isn't even supposed to be called. + doveadm: Don't use already-freed data stack after init. -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-namespace.h + Broken by 0679f8a70. -2016-07-05 14:41:41 +0300 Aki Tuomi (833b6a122) +M src/doveadm/doveadm.c +M src/doveadm/main.c - passdb-static: Support password scheme +2016-06-11 17:13:12 +0300 Timo Sirainen (2522acb52) - This allows password argument to provide scheme instead of defaulting to - plain. If no scheme is provided, plain is defaulted. + cassandra: Try fallback_consistency also for write timeout failures. -M src/auth/passdb-static.c -2016-07-04 11:57:43 +0300 Martti Rannanjärvi (6d2fa6b9c) +M src/lib-sql/driver-cassandra.c - lib-dcrypt: tell in error_r that RSA key has to be converted to pkey +2016-06-07 08:50:12 +0300 Aki Tuomi (8266226f9) + doveadm-server: Disable idle timeout for now -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/test-crypto.c -2016-07-04 18:25:23 +0300 Aki Tuomi (4c16747ef) +M src/doveadm/client-connection-http.c - doveadm-pw: Use debug value when loading modules +2016-06-07 03:47:44 +0300 Timo Sirainen (1b3579352) + Fixed linking with OSX. -M src/doveadm/doveadm-pw.c -2016-07-04 18:24:29 +0300 Aki Tuomi (2fbaab1cd) +M src/lib-dcrypt/Makefile.am +M src/lib-ldap/Makefile.am - dcrypt: Fix linkage into libdovecot.so +2016-06-07 03:41:18 +0300 Timo Sirainen (49b6e2d72) + -Wstrict-bool warning fixes -M configure.ac -M src/lib-dcrypt/Makefile.am -2016-07-04 15:05:00 +0300 Timo Sirainen (eb566271a) +M src/lib-fs/fs-randomfail.c +M src/lib-mail/message-address.c +M src/lib/ioloop-epoll.c +M src/lib/ioloop-poll.c - master: Add master socket's io listener later. +2016-06-07 03:25:16 +0300 Timo Sirainen (c87f187b4) - Most importantly this fixes startup failure with kqueue: + lib-dcrypt: Fixed library dependencies - Panic: kevent(EV_ADD, READ, 56) failed: Bad file descriptor + _DEPENDENCIES needs an explicit paths, not "-lssl" and such. Fixes building + with e.g. OSX. - kqueue doesn't survive a fork(), so this change delays its creation until - after fork(). +M src/lib-dcrypt/Makefile.am -M src/master/service-listen.c -M src/master/service-monitor.c +2016-06-07 03:04:32 +0300 Timo Sirainen (759871175) -2016-07-04 14:44:40 +0300 Timo Sirainen (51121eee2) + lib-lda: Don't assert-crash if home directory isn't set. - master: Make sure stdout isn't closed on startup failures. - closing master_fd might have tried to close(0) since it wasn't initialized - to -1. +M src/lib-lda/duplicate.c -M src/master/service.c +2016-06-06 17:10:12 +0300 Timo Sirainen (64a07a73e) -2016-07-04 09:37:33 +0300 Aki Tuomi (ac0b7e939) + lib-mail: Fixed to 91fdb25b5 - configure: Add m4 and aux dir to configure + Caused by my manual edits to avoid the -Wstrict-bool warnings. +M src/lib-mail/message-address.c -M Makefile.am -M configure.ac -A m4/.gitkeep +2016-06-03 22:23:00 +0300 Timo Sirainen (0679f8a70) -2016-07-04 09:30:13 +0300 Aki Tuomi (d9c865ce7) + lib-master: Add automatic data stack frame to init unless disabled. - configure: Fix static array check +M src/config/doveconf.c +M src/lib-master/master-service.c +M src/lib-master/master-service.h +M src/master/main.c -M configure.ac +2016-06-05 17:17:12 +0300 Timo Sirainen (761c441db) -2016-07-04 09:21:22 +0300 Aki Tuomi (20e802d6b) + mbox: mbox_index_header.dirty_flag isn't boolean, so don't use TRUE/FALSE + with it. - dcrypt: Optional if no ECC support +M src/lib-storage/index/mbox/mbox-file.c +M src/lib-storage/index/mbox/mbox-sync.c -M configure.ac -M src/Makefile.am +2016-06-05 16:54:38 +0300 Timo Sirainen (a5286dc8a) -2016-07-01 17:42:29 +0300 Timo Sirainen (943b057de) + lib: define FALSE to be (!1) - dict-client: Attempt to connect to dict socket for 1 second before failing. + This allows the patched clang to treat FALSE as a boolean expression. +M src/lib/macros.h -M src/lib-dict/dict-client.c +2016-06-05 16:35:04 +0300 Timo Sirainen (f0339f522) -2016-07-01 15:13:55 +0300 Aki Tuomi (8f254394f) + global: Use only explicit int -> bool conversions - man: Provide usage for doveadm mailbox update + These were checked with a patched clang. +M src/director/director-connection.c +M src/director/director.c +M src/doveadm/dsync/dsync-brain.c +M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c +M src/imap-login/client-authenticate.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-index/mail-cache-compress.c +M src/lib-index/mail-index-transaction-update.c +M src/lib-mail/message-address.c +M src/lib-mail/rfc822-parser.c +M src/lib-otp/otp-parse.c +M src/lib-sql/driver-pgsql.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/index/index-search.c +M src/lib-storage/index/mbox/mbox-sync-rewrite.c +M src/lib-storage/list/mailbox-list-index-status.c +M src/lib/istream-sized.c +M src/lib/istream.c +M src/lib/net.c +M src/lib/restrict-access.c +M src/login-common/client-common-auth.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/acl/acl-backend.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/quota/Makefile.am +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota.c +M src/replication/replicator/doveadm-connection.c +M src/replication/replicator/replicator-queue.c -M doc/man/doveadm-mailbox.1.in +2016-06-05 05:06:27 +0300 Timo Sirainen (23bdbb7b1) -2016-07-01 01:14:34 +0300 Timo Sirainen (93fa374e8) + global: Require comparisons to be strict boolean expressions - lib-dcrypt: Removed dead code. + * No implicit integer -> boolean or pointer -> boolean conversions + * !expr can be used only if expr is boolean type + These were checked with a patched clang. It found various actual bugs, which + were fixed by the previous commits. -M src/lib-dcrypt/ostream-encrypt.c +M src/auth/db-ldap.c +M src/auth/mech-digest-md5.c +M src/auth/mech-ntlm.c +M src/auth/mech-scram-sha1.c +M src/auth/password-scheme-md5crypt.c +M src/auth/password-scheme-rpa.c +M src/director/director-connection.c +M src/doveadm/doveadm-auth.c +M src/doveadm/doveadm-director.c +M src/doveadm/doveadm-util.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/imap/imap-sync.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-dict-extra/dict-ldap-settings.c +M src/lib-http/http-server-request.c +M src/lib-http/test-http-client-errors.c +M src/lib-http/test-http-payload.c +M src/lib-imap/imap-bodystructure.c +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index-transaction-export.c +M src/lib-lda/duplicate.c +M src/lib-ldap/ldap-connection.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-part-serialize.c +M src/lib-mail/test-message-header-encode.c +M src/lib-mail/test-message-parser.c +M src/lib-master/test-master-service-settings-cache.c +M src/lib-ntlm/ntlm-des.c +M src/lib-ntlm/ntlm-encrypt.c +M src/lib-ntlm/ntlm-message.c +M src/lib-otp/otp-parse.c +M src/lib-settings/settings-parser.c +M src/lib-settings/settings.c +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-pgsql.c +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-storage/index/maildir/maildir-filename-flags.c +M src/lib-storage/index/maildir/maildir-filename.c +M src/lib-storage/index/mbox/mbox-file.c +M src/lib-storage/index/mbox/mbox-lock.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/mail-search.c +M src/lib-storage/mail-search.h +M src/lib/askpass.c +M src/lib/buffer.h +M src/lib/compat.h +M src/lib/file-cache.c +M src/lib/file-lock.c +M src/lib/hash.c +M src/lib/ioloop-select.c +M src/lib/macros.h +M src/lib/md4.c +M src/lib/md5.c +M src/lib/net.c +M src/lib/test-timing.c +M src/lib/test-unichar.c +M src/lib/var-expand.c +M src/lib/wildcard-match.c +M src/login-common/sasl-server.c +M src/login-common/ssl-proxy-openssl.c +M src/master/service-process.c +M src/plugins/fts-lucene/fts-backend-lucene.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/push-notification/push-notification-event-flagsclear.c +M src/plugins/push-notification/push-notification-event-flagsset.c +M src/plugins/push-notification/push-notification-event-messageappend.c +M src/plugins/push-notification/push-notification-event-messagenew.c +M src/plugins/push-notification/push-notification-event-messageread.c +M src/plugins/push-notification/push-notification-event-messagetrash.c +M src/plugins/push-notification/push-notification-plugin.c +M src/plugins/quota/Makefile.am +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c -2016-07-01 12:23:59 +0300 Timo Sirainen (804d4d397) +2016-06-05 16:30:47 +0300 Timo Sirainen (c1277b66e) - lib-storage: Fixed mailbox_delete_empty() error message when mails exist + global: uint32_t:1 -> bool:1 + They were uint32_t because I wanted to be sure that there wouldn't be any + padding added to the struct. But this should be true also with bool:1. -M src/lib-storage/index/index-storage.c +M src/auth/auth-cache.h +M src/lib-storage/index/index-sort-string.c -2016-07-01 16:37:09 +0300 Timo Sirainen (4f6d918d6) +2016-06-05 14:37:11 +0300 Timo Sirainen (0dffa25d2) - lib-http: Clarify response message when retries have happened. + global: unsigned int:1 -> bool:1 - "1 attempts" sounds like 1 attempt in total, while this was actually the - second attempt. + perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] -M src/lib-http/http-client-request.c +M src/anvil/anvil-connection.c +M src/anvil/penalty.c +M src/auth/auth-client-connection.h +M src/auth/auth-master-connection.h +M src/auth/auth-penalty.c +M src/auth/auth-postfix-connection.c +M src/auth/auth-request-handler.c +M src/auth/auth-request.h +M src/auth/auth-worker-client.c +M src/auth/auth-worker-server.c +M src/auth/db-checkpassword.c +M src/auth/db-passwd-file.h +M src/auth/db-sql.h +M src/auth/mech-digest-md5.c +M src/auth/passdb-pam.c +M src/auth/userdb-passwd.c +M src/auth/userdb-sql.c +M src/auth/userdb-static.c +M src/config/config-connection.c +M src/config/config-parser-private.h +M src/config/doveconf.c +M src/dict/dict-connection.h +M src/director/director-connection.c +M src/director/director-host.h +M src/director/director.h +M src/director/doveadm-connection.c +M src/director/login-connection.c +M src/director/mail-host.h +M src/director/user-directory.h +M src/doveadm/client-connection.h +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-mailbox-status.c +M src/doveadm/doveadm-mail.h +M src/doveadm/doveadm-print-flow.c +M src/doveadm/doveadm-print-pager.c +M src/doveadm/doveadm-print-tab.c +M src/doveadm/doveadm-print-table.c +M src/doveadm/doveadm-stats.c +M src/doveadm/dsync/dsync-brain-private.h +M src/doveadm/dsync/dsync-ibc-private.h +M src/doveadm/dsync/dsync-ibc-stream.c +M src/doveadm/dsync/dsync-mailbox-export.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/doveadm/dsync/dsync-mailbox-tree.h +M src/doveadm/server-connection.c +M src/imap-login/imap-login-client.h +M src/imap-urlauth/imap-urlauth-client.h +M src/imap-urlauth/imap-urlauth-login.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/cmd-append.c +M src/imap/cmd-idle.c +M src/imap/cmd-list.c +M src/imap/cmd-select.c +M src/imap/cmd-urlfetch.c +M src/imap/imap-client.h +M src/imap/imap-fetch-body.c +M src/imap/imap-fetch.h +M src/imap/imap-notify.h +M src/imap/imap-search.h +M src/imap/imap-sync.c +M src/indexer/indexer-client.c +M src/indexer/indexer-queue.h +M src/indexer/master-connection.c +M src/indexer/worker-connection.c +M src/ipc/ipc-connection.h +M src/lib-auth/auth-client-private.h +M src/lib-auth/auth-master.c +M src/lib-auth/auth-master.h +M src/lib-auth/auth-server-connection.h +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-compression/ostream-bzlib.c +M src/lib-compression/ostream-lzma.c +M src/lib-compression/ostream-zlib.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict-sql.c +M src/lib-fs/fs-api-private.h +M src/lib-http/http-client-private.h +M src/lib-http/http-header-parser.c +M src/lib-http/http-message-parser.h +M src/lib-http/http-request-parser.c +M src/lib-http/http-request.h +M src/lib-http/http-response.h +M src/lib-http/http-server-private.h +M src/lib-http/http-transfer-chunked.c +M src/lib-http/http-url.c +M src/lib-http/http-url.h +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-storage/imap-metadata.c +M src/lib-imap-storage/imap-msgpart-url.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-imap-urlauth/imap-urlauth-fetch.c +M src/lib-imap-urlauth/imap-urlauth-fetch.h +M src/lib-imap-urlauth/imap-urlauth-private.h +M src/lib-imap/imap-arg.h +M src/lib-imap/imap-parser.c +M src/lib-imap/imap-url.c +M src/lib-imap/imap-url.h +M src/lib-index/mail-cache-private.h +M src/lib-index/mail-cache-transaction.c +M src/lib-index/mail-index-private.h +M src/lib-index/mail-index-strmap.c +M src/lib-index/mail-index-sync-private.h +M src/lib-index/mail-index-sync.c +M src/lib-index/mail-index-transaction-private.h +M src/lib-index/mail-index-view-private.h +M src/lib-index/mail-index-view-sync.c +M src/lib-index/mail-index.h +M src/lib-index/mail-transaction-log-private.h +M src/lib-index/mail-transaction-log-view-private.h +M src/lib-index/mail-transaction-log.h +M src/lib-lda/duplicate.c +M src/lib-lda/lmtp-client.c +M src/lib-mail/istream-binary-converter.c +M src/lib-mail/istream-dot.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/message-decoder.c +M src/lib-mail/message-header-decode.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-header-parser.h +M src/lib-mail/message-parser.c +M src/lib-mail/message-search.c +M src/lib-master/ipc-server.c +M src/lib-master/master-instance.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-login.c +M src/lib-master/master-login.h +M src/lib-master/master-service-private.h +M src/lib-master/master-service-settings-cache.c +M src/lib-master/master-service-settings.h +M src/lib-master/master-service.h +M src/lib-master/service-settings.h +M src/lib-sql/driver-cassandra.c +M src/lib-sql/driver-mysql.c +M src/lib-sql/driver-pgsql.c +M src/lib-sql/driver-sqlite.c +M src/lib-sql/sql-api-private.h +M src/lib-ssl-iostream/iostream-openssl.h +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/dbox-common/dbox-file.h +M src/lib-storage/index/dbox-common/dbox-save.h +M src/lib-storage/index/dbox-multi/mdbox-map-private.h +M src/lib-storage/index/dbox-multi/mdbox-map.c +M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +M src/lib-storage/index/dbox-multi/mdbox-storage.h +M src/lib-storage/index/imapc/imapc-list.h +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.h +M src/lib-storage/index/index-mail.h +M src/lib-storage/index/index-rebuild.h +M src/lib-storage/index/index-search-private.h +M src/lib-storage/index/index-search.c +M src/lib-storage/index/index-sort-string.c +M src/lib-storage/index/index-thread-finish.c +M src/lib-storage/index/index-thread-private.h +M src/lib-storage/index/index-thread.c +M src/lib-storage/index/istream-mail.c +M src/lib-storage/index/maildir/maildir-copy.c +M src/lib-storage/index/maildir/maildir-keywords.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-storage.h +M src/lib-storage/index/maildir/maildir-sync.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/mbox/istream-raw-mbox.c +M src/lib-storage/index/mbox/mbox-save.c +M src/lib-storage/index/mbox/mbox-storage.h +M src/lib-storage/index/mbox/mbox-sync-private.h +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib-storage/index/pop3c/pop3c-storage.h +M src/lib-storage/index/raw/raw-storage.h +M src/lib-storage/list/mailbox-list-fs-iter.c +M src/lib-storage/list/mailbox-list-index-notify.c +M src/lib-storage/list/mailbox-list-index-sync.h +M src/lib-storage/list/mailbox-list-index.h +M src/lib-storage/list/mailbox-list-iter.c +M src/lib-storage/list/mailbox-list-none.c +M src/lib-storage/mail-namespace.h +M src/lib-storage/mail-search-register.c +M src/lib-storage/mail-search.h +M src/lib-storage/mail-storage-private.h +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lib-storage/mail-storage.h +M src/lib-storage/mail-user.h +M src/lib-storage/mailbox-list-private.h +M src/lib-storage/mailbox-search-result-private.h +M src/lib-storage/mailbox-tree.c +M src/lib/buffer.c +M src/lib/connection.h +M src/lib/file-dotlock.c +M src/lib/file-dotlock.h +M src/lib/ioloop-private.h +M src/lib/istream-crlf.c +M src/lib/istream-file-private.h +M src/lib/istream-jsonstr.c +M src/lib/istream-mmap.c +M src/lib/istream-private.h +M src/lib/istream-tee.c +M src/lib/istream.h +M src/lib/mempool.h +M src/lib/module-dir.h +M src/lib/ostream-file-private.h +M src/lib/ostream-private.h +M src/lib/ostream.h +M src/lmtp/client.h +M src/lmtp/lmtp-proxy.c +M src/log/log-connection.c +M src/login-common/client-common.h +M src/login-common/login-proxy.c +M src/login-common/ssl-proxy-openssl.c +M src/master/service-process.h +M src/master/service.h +M src/plugins/acl/acl-api-private.h +M src/plugins/acl/acl-api.h +M src/plugins/acl/acl-backend-vfile.h +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/acl/acl-mailbox-list.c +M src/plugins/expire/expire-plugin.c +M src/plugins/fts-lucene/fts-backend-lucene.c +M src/plugins/fts-solr/fts-backend-solr.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts-squat/squat-trie-private.h +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/fts/fts-api-private.h +M src/plugins/fts/fts-indexer.c +M src/plugins/fts/fts-storage.c +M src/plugins/fts/fts-storage.h +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-storage.c +M src/plugins/virtual/virtual-mail.c +M src/plugins/virtual/virtual-storage.h +M src/plugins/virtual/virtual-sync.c +M src/pop3/pop3-client.h +M src/replication/replicator/dsync-client.c +M src/replication/replicator/notify-connection.c +M src/replication/replicator/replicator-brain.c +M src/replication/replicator/replicator-queue.h -2016-07-01 16:36:31 +0300 Timo Sirainen (765b9a433) +2016-06-05 16:01:05 +0300 Timo Sirainen (8e047750f) - dict-client: Make sure query's start_time is up-to-date. + mbox: Code cleanup - use bool instead of int for tracking locked-status -M src/lib-dict/dict-client.c +M src/lib-storage/index/mbox/mbox-lock.c -2016-07-01 16:34:26 +0300 Timo Sirainen (e0b20cec3) +2016-05-09 14:28:08 +0300 Martti Rannanjärvi (e93184a90) - dict-client: Don't log slow background async commit/iteration replies. + lib: remove autoclose parameter from [io]_stream_create_fd - If a caller has already finished iteration, or does async commit without a - callback, it means that it started the query without caring when it - finishes. The caller may already have been doing blocking work while waiting - for the dict reply. We don't want to log a warning, because it could be - completely wrong. + Use [io]_stream_create_fd_autoclose() for autoclose. +M src/anvil/anvil-connection.c +M src/auth/auth-client-connection.c +M src/auth/auth-master-connection.c +M src/auth/auth-postfix-connection.c +M src/auth/auth-worker-client.c +M src/auth/auth-worker-server.c +M src/auth/db-passwd-file.c +M src/config/config-connection.c +M src/config/doveconf.c +M src/dict/dict-connection.c +M src/director/auth-connection.c +M src/director/director-connection.c +M src/director/director-test.c +M src/director/doveadm-connection.c +M src/director/login-connection.c +M src/director/notify-connection.c +M src/dns/dns-client.c +M src/doveadm/client-connection.c +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-stats.c +M src/doveadm/doveadm-zlib.c +M src/doveadm/doveadm.c +M src/doveadm/server-connection.c +M src/imap-hibernate/imap-client.c +M src/imap-urlauth/imap-urlauth-client.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/imap-client.c +M src/indexer/indexer-client.c +M src/indexer/master-connection.c +M src/indexer/worker-connection.c +M src/ipc/client.c +M src/ipc/ipc-connection.c +M src/lda/main.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-compression/test-compression.c M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dns/dns-lookup.c +M src/lib-http/test-http-payload.c +M src/lib-imap-client/imapc-connection.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-index/mail-index-strmap.c +M src/lib-lda/duplicate.c +M src/lib-lda/lmtp-client.c +M src/lib-lda/smtp-client.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-master/anvil-client.c +M src/lib-master/ipc-client.c +M src/lib-master/ipc-server.c +M src/lib-master/master-instance.c +M src/lib-master/master-login-auth.c +M src/lib-master/master-login.c +M src/lib-master/master-service-settings.c +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/maildir/maildir-keywords.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib-storage/index/mbox/mbox-file.c +M src/lib-storage/index/pop3c/pop3c-client.c +M src/lib/connection.c +M src/lib/file-copy.c +M src/lib/istream-file.c +M src/lib/istream-rawlog.c +M src/lib/istream.h +M src/lib/ostream-file.c +M src/lib/ostream-rawlog.c +M src/lib/ostream.h +M src/lib/test-iostream-temp.c +M src/lib/test-ostream-file.c +M src/lmtp/client.c +M src/lmtp/commands.c +M src/log/doveadm-connection.c +M src/log/log-connection.c +M src/login-common/client-common.c +M src/login-common/login-proxy.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/fts-squat/squat-test.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/fts/fts-expunge-log.c +M src/plugins/fts/fts-indexer.c +M src/plugins/mail-filter/istream-ext-filter.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/plugins/trash/trash-plugin.c +M src/plugins/virtual/virtual-config.c +M src/pop3/pop3-client.c +M src/replication/aggregator/notify-connection.c +M src/replication/aggregator/replicator-connection.c +M src/replication/replicator/dsync-client.c +M src/replication/replicator/notify-connection.c +M src/stats/client.c +M src/stats/fifo-input-connection.c +M src/util/rawlog.c -2016-07-01 16:31:52 +0300 Timo Sirainen (0597f83b7) - - cassandra: Added debug_queries connect setting. - - This logs all the queries and how long they took, without having to log all - the other Cassandra library debug messages. - -M src/lib-sql/driver-cassandra.c - -2016-07-01 16:31:19 +0300 Timo Sirainen (ae79144cb) - - cassandra: If query fails, include how long the reply took in the error - message. - - -M src/lib-sql/driver-cassandra.c +2016-05-02 18:27:02 +0300 Timo Sirainen (39dea5f2e) -2016-07-01 16:30:06 +0300 Timo Sirainen (971d8e933) + quota: Differentiate between forced and non-forced quota recalc - cassandra: Warn if queries take too long (default 5 secs) + The "count" backend doesn't need to recalc quota unless an explicit "doveadm + quota recalc" command is called. - Can be changed with e.g. "connect = ... warn_timeout=30s" +M src/plugins/quota/doveadm-quota.c +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota-maildir.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c +M src/plugins/quota/quota.h -M src/lib-sql/driver-cassandra.c +2016-05-02 18:16:00 +0300 Timo Sirainen (e2e64c109) -2016-07-01 16:27:30 +0300 Timo Sirainen (d1b137be8) + quota: Skip reading mail sizes when quota backend doesn't need it. - LAYOUT=index: Make sure error is preserved if created mailbox can't be added - to list index. + If quota backend is updating the quota internally, it's just going to ignore + the looked up size. The only reason for looking up the sizes is to check + with quota_try_alloc() whether user is going over quota. - mailbox_delete() could overwrite the error. +M src/plugins/quota/quota-count.c +M src/plugins/quota/quota-dirsize.c +M src/plugins/quota/quota-fs.c +M src/plugins/quota/quota-private.h +M src/plugins/quota/quota-storage.c +M src/plugins/quota/quota.c -M src/lib-storage/list/mailbox-list-index-backend.c +2016-06-05 15:48:20 +0200 Pali Rohár (99df8a838) -2016-07-01 11:56:46 +0300 Timo Sirainen (7c40beb8a) + lib-mail: Update tests for message address - dict-client: When skipping connect() due to earlier failure, preserve the - original error. +M src/lib-mail/test-message-address.c -M src/lib-dict/dict-client.c +2016-06-05 15:48:19 +0200 Pali Rohár (b435147a7) -2016-07-01 11:41:51 +0300 Timo Sirainen (7a7a88bb5) + lib-mail: message_address_write: Quote and escape strings if needed - dict-client: If commit fails to send BEGIN, don't try sending anything else. + ATEXT characters must be properly quoted when are in phrase. - Fixes memory leak and also fixes overwriting the original error message. + Test case: -M src/lib-dict/dict-client.c + { name = "test\"test", mailbox = "user", domain = "host" } -2016-07-01 11:12:03 +0300 Timo Sirainen (74bb40acd) + converts to: - lib-storage: Autoexpunging should ignore nonexistent mailboxes. + "test\"test" - The check was done too late after recent changes. +M src/lib-mail/message-address.c -M src/lib-storage/mail-autoexpunge.c +2016-06-05 15:48:18 +0200 Pali Rohár (91fdb25b5) -2016-07-01 11:07:47 +0300 Timo Sirainen (9b351a5c5) + lib-mail: parse_mailbox: Set display name instead mailbox when parsing + failed - doveadm mailbox update: Avoid assert-crash on errors. + It does not make sense to set mailbox without domain on incorrect input. + Rather set display name which is more likely useable value. + Test case: -M src/doveadm/doveadm-mail-mailbox.c + test -2016-07-01 02:49:32 +0300 Timo Sirainen (9ef42e2e3) + is parsed as: - login-proxy: cork+uncork in flush callbacks + { name = "test", mailbox = NULL, domain = NULL } - Potentially reduces latency at the end of a larger data transfer. +M src/lib-mail/message-address.c -M src/login-common/login-proxy.c +2016-06-05 15:48:17 +0200 Pali Rohár (9835bb7e5) -2016-07-01 01:11:02 +0300 Timo Sirainen (4de7ae77f) + lib-mail: parse_addr_spec: Email address without local-part is invalid - configure: Check if C99 "static" keyword is supported for array sizes. + Add explicit invalid_syntax flag also when end of input occure because + address is without domain invalid and in this case it was not correctly + propagated. +M src/lib-mail/message-address.c -M configure.ac -M src/lib/macros.h +2016-06-05 15:48:16 +0200 Pali Rohár (f185d56a9) -2016-06-30 22:35:59 +0200 Stephan Bosch (d844a8843) + lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if + last_comment is not NULL - lib-http: client: Fixed potential segfault problem in - http_client_connection_server_close(). + This will fix possible NULL pointer dereference when caller does not set + last_comment. - Used wrong variable: it is set to NULL by http_client_request_unref() before - it is used. Problem found by Coverity. +M src/lib-mail/message-address.c -M src/lib-http/http-client-connection.c +2016-06-05 15:48:15 +0200 Pali Rohár (d56bcbb35) -2016-06-30 18:13:52 +0300 Timo Sirainen (87e985574) + lib-mail: message_address_write: Fix generating group list with empty name - lib-dcrypt: Compiling fix + Empty name for group list must be quoted. + Test case: -M src/lib-dcrypt/dcrypt.c + { { name = NULL, mailbox = "", domain = NULL }, { name = NULL, mailbox = + NULL, domain = NULL } } -2016-06-30 16:21:40 +0300 Timo Sirainen (7934f377c) + converts to: - imap: Fixed reading LDA settings from config. + "":; +M src/lib-mail/message-address.c -M src/imap/imap-settings.c +2016-06-05 15:48:14 +0200 Pali Rohár (b98e12266) -2016-06-30 14:08:24 +0300 Timo Sirainen (3fea4d598) + lib-mail: message_address_write: Fix generating empty group list - master: Stopping didn't close dead-pipes early enough. + Empty group list ends with ": " not with ", ". - This caused stopping to be too slow. Broken by 0153cf542. + Test case: -M src/master/service-monitor.c + { { name = NULL, mailbox = "group", domain = NULL }, { name = NULL, + mailbox = NULL, domain = NULL } } -2016-06-30 12:10:29 +0300 Timo Sirainen (ab65ab6eb) + converts to: - lmtp: Removed assert, which triggers if anvil connect fails. + group:; +M src/lib-mail/message-address.c -M src/lmtp/commands.c +2016-06-06 02:27:35 +0300 Timo Sirainen (90dd3c6ed) -2016-06-30 12:08:19 +0300 Timo Sirainen (758df8fac) + fs-randomfail: Support failures after asynchronous commands have already + finished. - lmtp: Fixed pipelining of commands after RCPT TO - We should stop while waiting for anvil reply. Broken by ced943b0a. +M src/lib-fs/fs-randomfail.c -M src/lmtp/commands.c +2016-06-06 02:26:09 +0300 Timo Sirainen (65c570f18) -2016-06-30 11:57:19 +0300 Aki Tuomi (45bdb337b) + dict: Fixed hang when pipelining multiple commands. - auth-request: Whitespace fix +M src/dict/dict-connection.c -M src/auth/auth-request.c +2016-06-06 00:07:53 +0300 Timo Sirainen (c6c2b49bf) -2016-06-30 10:03:18 +0300 Aki Tuomi (52343c7b6) + lib-index: Extension record size resizing was still broken. - auth-request: Correctly allocate mech_password and credentials_scheme + Fixes assert-crash: Panic: file mail-index-util.c: line 143 + (mail_index_seq_array_add): assertion failed: (array->arr.element_size == + sizeof(seq) + aligned_record_size) +M src/lib-index/mail-index-transaction-update.c -M src/auth/auth-request.c +2016-06-05 17:48:41 +0300 Timo Sirainen (4cc046655) -2016-06-30 09:29:26 +0300 Aki Tuomi (b65a4929c) + global: More fixes to mismatched bool vs int handling - dcrypt: Free keys in test-stream +M src/auth/mech-skey.c +M src/lib-imap/test-imap-utf7.c +M src/lib-ntlm/ntlm-encrypt.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/test-mailbox-get.c +M src/lib/test-array.c -M src/lib-dcrypt/test-stream.c +2016-06-05 15:37:06 +0300 Timo Sirainen (d9a7e950a) -2016-06-30 09:06:51 +0300 Aki Tuomi (7875fb9b6) + global: Fixed mismatched bool vs. int/pointer handling - dcrypt: Add tests for 0 and 1 byte data + I don't think these fix any actual bugs. +M src/auth/auth-master-connection.c +M src/auth/auth-postfix-connection.c +M src/auth/auth.c +M src/auth/mech-otp-skey-common.c +M src/auth/mech-otp-skey-common.h +M src/dict/dict-connection.c +M src/doveadm/doveadm-cmd.c +M src/doveadm/doveadm-dump-index.c +M src/doveadm/doveadm-mail-fetch.c +M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-fs/fs-randomfail.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-response-parser.c +M src/lib-imap-urlauth/imap-urlauth-connection.c +M src/lib-imap/imap-envelope.c +M src/lib-imap/imap-parser.c +M src/lib-mail/mbox-from.c +M src/lib-mail/message-date.c +M src/lib-mail/test-message-header-decode.c +M src/lib-ntlm/ntlm-message.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/index-mail.c +M src/lib-storage/index/index-sync.c +M src/lib-storage/index/mbox/mbox-sync.c +M src/lib-storage/mailbox-list.c +M src/lib/file-lock.c +M src/lib/strfuncs.c +M src/lib/wildcard-match.c +M src/master/master-settings.c +M src/master/service-listen.c +M src/plugins/expire/doveadm-expire.c +M src/plugins/fts-squat/squat-test.c +M src/plugins/fts/fts-parser-script.c +M src/plugins/fts/fts-user.c +M src/plugins/imap-acl/imap-acl-plugin.c -M src/lib-dcrypt/test-stream.c +2016-06-05 16:51:12 +0300 Timo Sirainen (ba3dc5075) -2016-06-30 09:06:33 +0300 Aki Tuomi (c71657852) + lib-mail: Added comment about invalid timezones in message_date_parse() - dcrypt: Fix bugs in 0 and 1 byte payload files +M src/lib-mail/message-date.c -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/ostream-encrypt.c +2016-06-05 16:40:27 +0300 Timo Sirainen (389a9fe16) -2016-06-30 01:27:37 +0300 Timo Sirainen (c9f9b0c31) + director: Fixed error handling when directors support incompatible tags - lib-ssl-iostream: Compiler fix to previous commit + Connection should have been disconnected immediately, not after the next + command that would have produced "Incompatible protocol". +M src/director/director-connection.c -M src/lib-ssl-iostream/dovecot-openssl-common.c +2016-06-05 15:57:48 +0300 Timo Sirainen (759edc211) -2016-06-30 01:15:38 +0300 Timo Sirainen (bb2aa7119) + lib-dcrypt: Fixed error handling in dcrypt_key_id_public() - lib-ssl-iostream: Disable "CRYPTO_set_mem_functions() was called too late" - for now - It always happens at least with Ubuntu 16.04. +M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-ssl-iostream/dovecot-openssl-common.c +2016-06-05 15:35:13 +0300 Timo Sirainen (28846a726) -2016-06-29 23:56:18 +0300 Timo Sirainen (fc05ac28d) + lib-storage: Fixed error handling in list=children checking - auth: delay_until can optionally now have + suffix. +M src/lib-storage/list/mailbox-list-iter.c -M src/auth/auth-request.c +2016-06-05 15:32:09 +0300 Timo Sirainen (063fb9403) -2016-06-29 23:54:46 +0300 Timo Sirainen (82f1dbba4) + fts-lucene: Fixed error handling when checking if settings had changed. - auth: Fixed checking if delay_until is too large +M src/plugins/fts-lucene/fts-backend-lucene.c -M src/auth/auth-request.c +2016-06-05 15:31:20 +0300 Timo Sirainen (e9fdf11b7) -2016-06-29 22:29:20 +0300 Timo Sirainen (7be176606) + mailbox-alias plugin: Fixed error handling - dsync: When full resync is wanted in a stateful sync, output empty state. - This continues 3d49dc64d, which didn't actually work because - brain->require_full_resync was either cleared earlier or it was never even - set in this brain. +M src/plugins/mailbox-alias/mailbox-alias-plugin.c -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-ibc-pipe.c -M src/doveadm/dsync/dsync-ibc-private.h -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.c -M src/doveadm/dsync/dsync-ibc.h +2016-06-05 15:26:11 +0300 Timo Sirainen (4ee1a8353) -2016-06-29 21:09:48 +0300 Timo Sirainen (06aeecf47) + lib-storage: Search args equalness checks didn't compare keywords correctly. - doveadm: Read settings with service=doveadm + This may have broken the search in some situations. - This was done for mail commands while initializing the mail user, but other - commands weren't using it. This meant that doveadm was using only global - settings instead of protocol doveadm { .. } settings for everything except - mail commands. +M src/lib-storage/mail-search.c -M src/doveadm/doveadm.c -M src/doveadm/main.c +2016-06-05 15:23:45 +0300 Timo Sirainen (dcf24a3cd) -2016-06-29 20:44:37 +0300 Timo Sirainen (47441da37) + mbox: Fixed expunging first mail with CRLF linefeeds. - doveadm user: Avoid potential crashes when running via doveadm-server +M src/lib-storage/index/mbox/mbox-sync-rewrite.c -M src/doveadm/doveadm-auth-server.c +2016-06-05 15:18:04 +0300 Timo Sirainen (e1230c989) -2016-06-29 22:11:48 +0300 Timo Sirainen (8051312f9) + mdbox: Fix want_altpath flags/boolean mixup - lib: iostream-temp: Fixed o_stream_send_istream() with >2GB files + There was only a single flag, so this wasn't actually currently broken. +M src/lib-storage/index/dbox-multi/mdbox-map.c -M src/lib/iostream-temp.c +2016-06-05 15:11:56 +0300 Timo Sirainen (84ec868b0) -2016-06-29 19:22:51 +0300 Timo Sirainen (923ed5836) + auth: Fixed error handling in passdb/userdb dict config parsing - dict-sql: Treat NULL value the same as "key not found" +M src/auth/db-dict.c -M src/lib-dict/dict-sql.c +2016-06-05 14:54:05 +0300 Timo Sirainen (12f8ffba0) -2016-06-28 23:12:03 +0300 Timo Sirainen (c32f2e26a) + director: Fixed ignoring an obsolete up/down change while host is desynced. - doveadm: Added "service stop" command to stop specific services. +M src/director/director-connection.c -M src/doveadm/Makefile.am -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -A src/doveadm/doveadm-service.c +2016-06-05 04:29:00 +0300 Timo Sirainen (a21d4eb32) -2016-06-26 23:04:00 +0300 Timo Sirainen (e296bf525) + lib-dcrypt: Fixed function return type. - master: Allow stopping specific services via master socket. +M src/lib-dcrypt/dcrypt-openssl.c -M src/master/Makefile.am -M src/master/main.c -A src/master/master-client.c -A src/master/master-client.h -M src/master/service-listen.c -M src/master/service-monitor.c -M src/master/service.h +2016-06-04 03:47:37 +0300 Timo Sirainen (eaebcff84) -2016-06-28 23:38:48 +0300 Timo Sirainen (976683c77) + lazy-expunge: Fixed crash on error handling - master: Added service_monitor_stop_close() to stops service and close its - listeners. +M src/plugins/lazy-expunge/lazy-expunge-plugin.c -M src/master/service-monitor.c -M src/master/service-monitor.h +2016-06-03 20:14:01 +0300 Timo Sirainen (f27c7e633) -2016-06-28 23:38:11 +0300 Timo Sirainen (fde7b8a03) + lib-index: Fix duplicate fields in mail_cache_register_fields() - master: Added support for stopping specific services. + Broken by hash_table_insert() API change. The earlier code was also a bit + wrong by allocating a bit too much memory when there were duplicate fields + being registered. - We need to have a per-service fd for detecting a dead master. +M src/lib-index/mail-cache-fields.c -M src/master/service-monitor.c -M src/master/service-process.c -M src/master/service.c -M src/master/service.h +2016-06-03 20:10:02 +0300 Timo Sirainen (379b166be) -2016-06-29 19:12:58 +0300 Timo Sirainen (127b836fd) + lib-index: Fixed extension resizing - lib-storage: Fixed search arg initialization tracking for INTHREAD + Broken by 8483af4ff. +M src/lib-index/mail-index-sync-ext.c -M src/lib-storage/mail-search.c +2016-06-03 20:00:14 +0300 Timo Sirainen (1af0c5d88) -2016-06-29 18:49:57 +0300 Timo Sirainen (6b1428ff1) + lib-index: Added header-size asserts - virtual: Fixed error handling when matching mailboxes by metadata. +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-index-modseq.c +M src/lib-index/mail-index-sync-ext.c +M src/lib-index/mail-index-sync-keywords.c +M src/lib-index/mail-index-sync-update.c -M src/plugins/virtual/virtual-config.c +2016-06-03 19:58:29 +0300 Timo Sirainen (909a45f03) -2016-06-29 18:34:07 +0300 Timo Sirainen (390d6d596) + lib-index: Fixed fsck handling extension with invalid header size - maildir: Improved "Filename keeps changing" error handling/logging + Fixes: + Panic: file mail-index-sync-ext.c: line 393 (mail_index_sync_ext_init_new): + assertion failed: (hdr_buf->used == map->hdr.header_size) -M src/lib-storage/index/maildir/maildir-util.c +M src/lib-index/mail-index-fsck.c -2016-06-29 18:33:48 +0300 Timo Sirainen (26e22eaa0) +2016-06-03 19:31:09 +0300 Timo Sirainen (c224fff79) - maildir: Code comment update + global: Use hash_table_update() instead of _insert() where necessary. -M src/lib-storage/index/maildir/maildir-sync.c +M src/doveadm/doveadm-director.c +M src/doveadm/doveadm-stats.c +M src/lib-dict/dict-file.c +M src/lib-lda/duplicate.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/plugins/push-notification/push-notification-drivers.c +M src/pop3/pop3-commands.c -2016-06-29 18:31:21 +0300 Timo Sirainen (0649b7a16) +2016-06-03 19:20:35 +0300 Timo Sirainen (2a6c02a5e) - maildir: Fixed updating filenames in existing uidlist + lib-storage: Detect duplicate mailbox GUIDs in guid-cache. - Broken by 042668c0c. + Also fixes assert-crashing in hash_table_insert() when it happens. - This could have caused errors like: +M src/lib-storage/mailbox-guid-cache.c - - maildir_file_do(...): Filename keeps changing - - Expunged message reappeared, giving a new UID +2016-06-03 19:18:43 +0300 Timo Sirainen (32d69cb07) -M src/lib-storage/index/maildir/maildir-uidlist.c + maildir: Detect duplicate keywords in dovecot-keywords file -2016-06-03 17:30:58 +0300 Aki Tuomi (362698763) + Use the first such keyword's index, not the last. - doveadm-server: Do not crash if empty data in authorization + Also fixes assert-crashing in hash_table_insert() when it happens. +M src/lib-storage/index/maildir/maildir-keywords.c -M src/doveadm/client-connection-http.c +2016-06-03 19:17:03 +0300 Timo Sirainen (042668c0c) -2016-05-31 22:22:37 +0300 Aki Tuomi (418280f53) + maildir: Avoid extra memory usage on duplicate uidlist entries - doveadm: Implement user and auth cache flush to server + Also fixes assert-crashing in hash_table_insert() when it happens. +M src/lib-storage/index/maildir/maildir-uidlist.c -M src/doveadm/Makefile.am -A src/doveadm/doveadm-auth-server.c -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm.c -M src/doveadm/main.c +2016-06-03 17:54:36 +0300 Timo Sirainen (765b5eec2) -2016-06-04 08:14:45 +0300 Aki Tuomi (d53679051) + lib-index: Allow growing ext record_size after mail_index_update_ext() - doveadm-server: Skip doveadm_print_init + The existing records will just get some zero-padding at the end of records. - Some commands need to do output that is not doable with doveadm_print, so we - need to have a flag to indicate this. +M src/lib-index/mail-index-transaction-update.c +M src/lib-index/mail-index-util.c +M src/lib-index/mail-index-util.h -M src/doveadm/client-connection-http.c -M src/doveadm/doveadm-cmd.h +2016-06-03 17:52:39 +0300 Timo Sirainen (8483af4ff) -2016-06-29 16:34:11 +0300 Timo Sirainen (20a3cd140) + lib-index: Fixed changing extension record sizes. - lmtp: If anvil lookup fails, ignore lmtp_user_concurrency_limit + map needs to be cloned before any extension record size changes are done. + Otherwise the map cloning will crash or do something broken. - Previously it was randomly allowing or disallowing the client. +M src/lib-index/mail-index-sync-ext.c -M src/lmtp/commands.c +2016-06-03 17:40:11 +0300 Timo Sirainen (6aa6fdaba) -2016-06-29 15:25:28 +0300 Timo Sirainen (7e75c14dd) + lib-index: Minor code cleanup - use better variable names - auth: Added delay_until passdb extra field. +M src/lib-index/mail-index-sync-ext.c -M src/auth/auth-request.c -M src/auth/auth-request.h +2016-05-18 14:42:21 +0300 Baofeng Wang (cbc8f9d71) -2016-06-29 16:01:13 +0300 Timo Sirainen (7dbddb3b9) + lib-storage: add no_fts in struct mail_search_arg - auth: Fixed plaintext authentication when auth policy was already processed. + When flag is set, FTS will not be performed. - Broken by e82511362. + fts plugin: handle no_fts flag -M src/auth/auth-request.c + No fts will be performed once flag is set. Original patch from Timo Sirainen + -2016-06-29 15:49:38 +0300 Timo Sirainen (0f8880fdd) +M src/lib-storage/mail-search.h +M src/plugins/fts-lucene/lucene-wrapper.cc +M src/plugins/fts-solr/fts-backend-solr-old.c +M src/plugins/fts-solr/fts-backend-solr.c +M src/plugins/fts/fts-api.c +M src/plugins/fts/fts-storage.c - lib-fts: Added maxlen parameter to icu-normalizer. +2016-05-17 11:45:50 +0300 Baofeng Wang (3b22ecd86) - This is needed because the normalization can increase the token's length. + hash: refactor hash_table_insert_node() and its callers reference -M src/lib-fts/fts-filter-normalizer-icu.c -M src/lib-fts/fts-filter.h -M src/lib-fts/test-fts-filter.c + Refactor *changes* the behavior of hash_table_insert(). + * hash_table_insert() will assert when a key already exsists. And + hash_table_update() remains updating value when a key already exsists. -2016-06-28 22:20:20 +0300 Timo Sirainen (df0e630a9) + Refactor also changes the argument list referred by all its callers: + * hash_table_insert/update/resize(). - auth: Added ":remove" suffix for passdb/userdb extra fields to remove - fields. +M src/lib/hash.c +M src/lib/hash.h +2016-05-17 11:42:30 +0300 Baofeng Wang (0531c4817) -M src/auth/auth-request.c + lib-fts: fixup misuse of hash_table_insert() -2016-06-29 14:09:01 +0300 Timo Sirainen (f36ac996f) + Instead use hash_table_update() to replace value when a key exsists. - lmtp: Increase user's concurrency limit already after RCPT TO. +M src/lib-fts/fts-filter-stopwords.c - This way it's not possible for a lot of mails to arrive to user concurrently - and bypass the lmtp_user_concurrency_limit. +2016-05-30 19:07:16 +0300 Timo Sirainen (aa41b2e17) -M src/lmtp/client.c -M src/lmtp/client.h -M src/lmtp/commands.c + virtual: Moved virtual_mailbox_vfuncs to lib-storage. -2016-06-29 14:07:34 +0300 Timo Sirainen (2722e8d90) + This allows implementing other virtual storage backends. - lmtp: If user has rached lmtp_user_concurrency_limit, fail at RCPT TO stage. +M src/lib-storage/mail-storage-private.h +M src/plugins/fts/fts-api.c +M src/plugins/fts/fts-search.c +M src/plugins/fts/fts-storage.c +M src/plugins/virtual/virtual-storage.c +M src/plugins/virtual/virtual-storage.h - Otherwise LMTP client would have to send the entire email body before - getting the failure. +2016-06-01 12:37:22 +0300 Timo Sirainen (54647e7d2) -M src/lmtp/client.h -M src/lmtp/commands.c + master: Give a nicer error if unix/fifo_listener path is empty. -2016-06-20 14:43:04 +0300 Timo Sirainen (dbad2ad24) + The previous error was simply: - lib-storage: Fixed MAILBOX_METADATA_FIRST_SAVE_DATE with - mailbox_list_index=no + unlink(/var/run/dovecot/) failed: Is a directory - This also meant that autoexpunging wasn't working then. +M src/master/master-settings.c -M src/lib-storage/index/index-status.c +2016-06-02 15:11:21 +0300 Martti Rannanjärvi (6f00b3719) -2016-06-29 14:55:12 +0300 Aki Tuomi (5659f5edb) + print CFLAGS on ./configure - auth-policy: Do not do policy checks every time +M configure.ac -M src/auth/auth-request.c +2016-05-09 15:24:28 +0300 Martti Rannanjärvi (db623deb1) -2016-06-29 14:43:31 +0300 Timo Sirainen (3031ddfbd) + lib: net_get_ip_any[46]() to struct net_ip[46]_any - auth: Finish policy.[ch] renaming.. + Also add struct net_ip[46]_loopback. +M src/director/director.c +M src/lib-http/test-http-server.c +M src/lib/net.c +M src/lib/net.h +M src/master/service.c -M src/auth/Makefile.am -M src/auth/auth-policy.c -M src/auth/auth-request-handler.c -M src/auth/auth-request.c -M src/auth/main.c +2016-05-09 14:04:47 +0300 Baofeng Wang (74835112b) -2016-06-29 14:31:28 +0300 Timo Sirainen (8ce4a3a43) + lib: remove useless NULL check after calling vstrconcat - auth: Avoid nonstandard #pragma once + behavior change accordingly. +M src/lib/imem.c +M src/lib/strfuncs.c -M src/auth/auth-policy.h +2016-04-20 17:28:24 +0300 Baofeng Wang (a0c3a1388) -2016-06-29 14:30:56 +0300 Timo Sirainen (e041c2d02) + liblib: *_strndup() and *_strconcat() shouldn't pass through NULLs. - auth: Rename policy.[ch] to auth-policy.[ch] + Assert NULL string pointer in below functions: i_strndup(), t_strndup() and + p_strconcat(), t_strconcat(), i_strconcat() and vstrconcat. Replace former + NULL condition check accordingly. +M src/lib/imem.c +M src/lib/strfuncs.c -R100 src/auth/policy.c src/auth/auth-policy.c -R100 src/auth/policy.h src/auth/auth-policy.h +2016-04-28 11:47:59 +0300 Baofeng Wang (3927a2114) -2016-06-28 13:24:09 +0300 Martti Rannanjärvi (3dba61671) + lib-fs: do NOT feed i_strconcat() with NULL - lib-dcrypt: correctly set version 2 on key info + fill the string with valid content beforehand. - Dovecot format version 2 keys were incorrectly reported as version 1 before. +M src/lib-fs/fs-api.c -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/test-crypto.c +2016-04-12 13:08:05 +0300 Baofeng (7279da2bd) -2016-06-29 14:16:58 +0300 Timo Sirainen (5f8a6be68) + storage: do NOT feed p_strconcat() with NULL. - lib-index: Fixed view syncing when changes couldn't be read from transaction - logs + p_strconcat will never take NULL as an valid argument. So + ns->list->set.alt_dir has to be checked NULL. - Fixes errors like: +M src/lib-storage/index/dbox-multi/mdbox-storage.c - Log synchronization error at seq=0,offset=0 for .../dovecot.index: Append - with UID 5, but next_uid = 6 - .../dovecot.index view syncing failed to apply changes +2016-04-11 21:20:48 +0300 Baofeng (a713bc6d0) -M src/lib-index/mail-index-view-sync.c + auth: do NOT feed p_strconcat() with NULL -2016-06-29 14:12:29 +0300 Aki Tuomi (3b28618dd) + p_strconcat will never take NULL as an valid argument. Check possible NULL + string before calling it. - auth-policy: Do not allow/report when master query +M src/auth/auth.c - This way auth policy isn't consulted when e.g. doveadm is used. +2016-06-01 12:24:57 +0300 Teemu Huovila (3f3c1b629) -M src/auth/policy.c + lib-fts: Improved stopword file reading. -2016-06-29 13:52:09 +0300 Aki Tuomi (223cfcf8c) + The reading tries to be a little bit stricter now. Only stopwords at the + start of a new line are accepted now. Changed fi stopwords accordingly. Also + removed superfluous stack allocation in parsing. - auth-policy: Report success earlier +M src/lib-fts/Makefile.am +M src/lib-fts/fts-filter-stopwords.c +M src/lib-fts/stopwords/stopwords_fi.txt +A src/lib-fts/stopwords/stopwords_malformed.txt +M src/lib-fts/test-fts-filter.c +2016-05-30 12:40:00 +0300 Teemu Huovila (0605ff6f2) -M src/auth/auth-request-handler.c + lib-fts: Add stopword files for more languages. -2016-06-29 00:37:09 +0300 Timo Sirainen (be2be317d) - configure: Detect SSL_COMP_free_compression_methods() by linking +M src/lib-fts/Makefile.am +A src/lib-fts/stopwords/stopwords_da.txt +A src/lib-fts/stopwords/stopwords_de.txt +A src/lib-fts/stopwords/stopwords_es.txt +A src/lib-fts/stopwords/stopwords_it.txt +A src/lib-fts/stopwords/stopwords_nl.txt +A src/lib-fts/stopwords/stopwords_pt.txt +A src/lib-fts/stopwords/stopwords_ro.txt +A src/lib-fts/stopwords/stopwords_ru.txt - Fixes using libressl. +2016-05-30 11:54:26 +0300 Teemu Huovila (abfc91b50) -M configure.ac -M src/lib-ssl-iostream/dovecot-openssl-common.c + lib-fts: Move stopwords to subdirectory. -2016-06-28 22:01:29 +0300 Timo Sirainen (e1295b939) + All files incluided in dist are explicitly mentioned. The whole subdirectory + 'stopwords' could also be distributed, but that is more error prone. - lib: Added assert to iostream-temp +M src/lib-fts/Makefile.am +R100 src/lib-fts/stopwords_en.txt src/lib-fts/stopwords/stopwords_en.txt +R100 src/lib-fts/stopwords_fi.txt src/lib-fts/stopwords/stopwords_fi.txt +R100 src/lib-fts/stopwords_fr.txt src/lib-fts/stopwords/stopwords_fr.txt +R100 src/lib-fts/stopwords_no.txt src/lib-fts/stopwords/stopwords_no.txt +R100 src/lib-fts/stopwords_sv.txt src/lib-fts/stopwords/stopwords_sv.txt - Input stream isn't expected to shrink here. Potentially this could be - changed to an error instead. +2016-06-02 16:06:08 +0300 Timo Sirainen (690425efb) -M src/lib/iostream-temp.c + dict-sql: Improve error message for invalid value fields. -2016-06-28 19:45:12 +0300 Timo Sirainen (5157c3c44) + It'll now show which map's pattern matched, making it easier to find from + the config file. - lazy-expunge: Fixed crash when copying from internal namespace +M src/lib-dict/dict-sql.c - Most importantly fixes crash in LDA. +2016-06-02 00:52:37 +0300 Timo Sirainen (8bb454924) -M src/plugins/lazy-expunge/lazy-expunge-plugin.c + dict: Pipelined iteration replies may have been hanging. -2016-06-28 10:25:21 +0300 Timo Sirainen (2c8e5ee65) + For example: + - lookup start + - iterate start + - iterate finished, but can't reply yet + - lookup finished + - iterate reply can be sent now, but wasn't previously - dict-ldap: Fixed linking with OSX +M src/dict/dict-commands.c +2016-06-02 00:51:26 +0300 Timo Sirainen (680e9da0f) -M src/plugins/dict-ldap/Makefile.am + dict: Fixed crash when reaching max (5) pending commands. -2016-06-28 10:15:02 +0300 Timo Sirainen (80b88a63f) - auth: Compiler warning fixes +M src/dict/dict-connection.c +2016-06-01 18:11:29 +0300 Timo Sirainen (0928812e7) -M src/auth/policy.c + global: Use i_stream_get_max_buffer_size() wherever possible -2016-06-03 21:35:48 +0300 Aki Tuomi (084bdd0ff) + After 7be8ba0c0 it's no longer correct to access stream->max_buffer_size + directly. These changes fix using istream-chain with various wrapper + streams. - auth-policy: Hook auth policy to auth code +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-fs/istream-fs-file.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-binary-converter.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/istream-qp-decoder.c +M src/lib-ssl-iostream/istream-openssl.c +M src/lib-test/test-common.c +M src/lib/istream-concat.c +M src/lib/istream.c +2016-06-01 18:09:48 +0300 Timo Sirainen (71aed7ba8) -M src/auth/auth-request-handler.c -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/main.c + lib: i_stream_get_max_buffer_size() checks also parents' max sizes -2016-06-03 20:21:42 +0300 Aki Tuomi (5bbf5616f) + This fixes i_stream_get_max_buffer_size() to work correctly with + istream-chain. - auth-policy: Add policy implementation +M src/lib/istream.c +M src/lib/istream.h +2016-06-01 18:03:58 +0300 Timo Sirainen (7be8ba0c0) -M src/auth/Makefile.am -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h -M src/auth/auth-request.h -M src/auth/auth-settings.c -M src/auth/auth-settings.h -A src/auth/policy.c -A src/auth/policy.h -M src/config/settings-get.pl + lib: istream-chain didn't update its max_buffer_size -2016-06-10 14:31:00 +0300 Baofeng Wang (8edd4308b) + I had this code at some point earlier, but looks like it got lost from the + final commit. - fts plugin: Added fts_autoindex_exclude settings. +M src/lib/istream-chain.c - fts_autoindex_exclude setting specifies special-use flag or mailbox name to - be excluded. +2016-06-01 17:52:23 +0300 Timo Sirainen (26cf1f4e5) - - If a name starts with '\', it's treated as a case-insensitive special-use - flag. + lib-compression: istream.max_buffer_size == 0 isn't unlimited. - - Multiple names can be specified with serial numbers, for example: - plugin { - fts_autoindex_exclude = \Junk - fts_autoindex_exclude2 = \Trash - fts_autoindex_exclude3 = DUMPSTER - fts_autoindex_exclude4 = New folder - } +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c -M src/plugins/fts/fts-storage.c +2016-06-01 17:18:23 +0300 Timo Sirainen (082e10a9d) -2016-06-27 16:37:18 +0300 Timo Sirainen (3412a5bda) + fs-metawrap: Removed unnecessary code. - lib-dcrypt: Make static analyzer happier + As mentioned in a0cf7d392, this can't happen. +M src/lib-fs/fs-metawrap.c -M src/lib-dcrypt/test-crypto.c +2016-06-01 17:12:51 +0300 Timo Sirainen (b162e16ad) -2016-06-27 14:43:58 +0300 Aki Tuomi (714e6326e) + lib-fs: Improved unit tests. - dcrypt: Add tests for v1 and v2 public keys and RSA +M src/lib-fs/Makefile.am +A src/lib-fs/fs-test-async.c +M src/lib-fs/fs-test.c +M src/lib-fs/fs-test.h +M src/lib-fs/test-fs-metawrap.c -M src/lib-dcrypt/test-crypto.c +2016-06-01 17:12:10 +0300 Timo Sirainen (68ee8d7e6) -2016-06-27 14:43:27 +0300 Aki Tuomi (eddbff81e) + fs-metawrap: Removed unnecessary code. - dcrypt-openssl: Various fixes + The caller already set success==FALSE if ostream was closed. - Fix v1 and v2 key handling and some allocation issues. +M src/lib-fs/fs-metawrap.c -M src/lib-dcrypt/dcrypt-openssl.c +2016-06-01 17:11:53 +0300 Timo Sirainen (98ff8998f) -2016-06-27 14:13:15 +0300 Timo Sirainen (e91e99359) + lib-fs: Added more asserts - lib-dcrypt: Added sample-v1_short.asc to EXTRA_DIST +M src/lib-fs/fs-api.c -M src/lib-dcrypt/Makefile.am +2016-06-01 17:06:28 +0300 Timo Sirainen (a0cf7d392) -2016-06-27 13:21:05 +0300 Aki Tuomi (e0d192f4d) + lib-fs: Clarified fs_write_stream_abort() API and dropped its _async(). - istream-decrypt: Ensure we can open short v1 files + We can't handle an abort after an async fs_write_stream_finish() is already + going. +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h -A src/lib-dcrypt/sample-v1_short.asc -M src/lib-dcrypt/test-stream.c +2016-06-01 15:15:19 +0300 Timo Sirainen (adb9f4a60) -2016-06-27 13:19:35 +0300 Aki Tuomi (9491509b8) + lib-fs: Added fs_write_stream_abort_async() - istream-decrypt: Correctly check the header length for v1 +M src/lib-fs/fs-api.c +M src/lib-fs/fs-api.h -M src/lib-dcrypt/istream-decrypt.c +2016-06-01 13:30:22 +0300 Timo Sirainen (597db47e0) -2016-06-24 12:14:32 +0300 Timo Sirainen (3e85269f5) + lib: Fix to previous istream-chain max_buffer_size handling - last-login: Ignore the plugin if last_login_dict setting is empty + We were casting the wrong stream. +M src/lib/istream-chain.c -M src/plugins/last-login/last-login-plugin.c +2016-05-31 22:33:32 +0300 Timo Sirainen (38b9e0b19) -2016-06-23 18:04:40 +0300 Timo Sirainen (60d99d011) + fs-metawrap: Fixed buffer size while reading metadata header. - lib-ssl-iostream: Use ENGINE_set_default() + It's not enough to have the buffer size set to "large enough" at the time of + the stream creation, because i_stream_set_max_buffer_size() could be called + afterwards. +M src/lib-fs/fs-metawrap.c +M src/lib-fs/istream-metawrap.c -M src/lib-ssl-iostream/dovecot-openssl-common.c +2016-05-31 22:19:37 +0300 Timo Sirainen (04f988607) -2016-06-23 17:21:09 +0300 Timo Sirainen (90d2a4aff) + lib: Fixed max_buffer_size handling in istream-chain - lazy_expunge: Optimize checking for last instance when moving a mail. + The default max_buffer_size=256 was wrong in all situations. - It's never the last instance, so we don't need to even check it. + We're now assuming that the underlying istreams' max_buffer_size is always + correct. While gluing together two streams we're now allocating enough + memory to hold all of the wanted data (instead of assert-crashing as could + have happened earlier). This means that the max memory usage is actually the + two streams' max_buffer_size summed together. Ideally this would be fixed to + limit the max_buffer_size to maximum of the two, but that would require + further changes. -M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/lib/istream-chain.c -2016-06-22 01:24:42 +0300 Timo Sirainen (39b421449) +2016-05-10 10:19:57 +0300 Martti Rannanjärvi (9625595c4) - fts-lucene: Fixed crash on error or auto-rebuild conditions. + [LEN] to [static LEN] on some function parameters + Also add STATIC_ARRAY macro to hide it in c++ compilation. -M src/plugins/fts-lucene/lucene-wrapper.cc +M src/auth/mech-rpa.c +M src/auth/passdb.c +M src/auth/passdb.h +M src/auth/userdb.c +M src/auth/userdb.h +M src/lib-storage/index/mbox/mbox-md5-all.c +M src/lib-storage/index/mbox/mbox-md5-apop3d.c +M src/lib-storage/index/mbox/mbox-md5.h +M src/lib/guid.c +M src/lib/guid.h +M src/lib/macros.h +M src/lib/md4.c +M src/lib/md4.h +M src/lib/md5.c +M src/lib/md5.h +M src/lib/sha1.c +M src/lib/sha1.h +M src/lib/sha2.c +M src/lib/sha2.h +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.h -2016-06-21 22:08:25 +0300 Timo Sirainen (064fe96f7) +2016-06-01 08:43:23 +0300 Aki Tuomi (fed9f797a) - welcome plugin: -Wstrict-bool warning fix + doveadm: Do not use INT64 with mail cmds yet -M src/plugins/welcome/welcome-plugin.c +M src/doveadm/doveadm-mail-index.c +M src/doveadm/doveadm-mail-mailbox.c -2016-06-21 21:26:29 +0300 Timo Sirainen (f194f5c49) +2016-06-01 02:01:10 +0300 Timo Sirainen (b90dc2ae3) - LAYOUT=index: Existence or GUID lookups don't need to refresh mailboxes. + lib-dcrypt: Fixed check program dependencies -M src/lib-storage/list/mailbox-list-index-status.c +M src/lib-dcrypt/Makefile.am -2016-06-21 21:39:49 +0300 Timo Sirainen (7ffa59270) +2016-06-01 00:19:41 +0300 Timo Sirainen (4372103cb) - lib-storage: Added a kludgy quick-"parameter" to list_index_has_changed() + lib-dcrypt: Fixed dcrypt_openssl_generate_keypair() -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/mail-storage-private.h +M src/lib-dcrypt/dcrypt-openssl.c -2016-06-21 21:06:22 +0300 Timo Sirainen (cc9df1198) +2016-06-01 00:12:44 +0300 Timo Sirainen (0f56c2ae3) - LAYOUT=index: Avoid unnecessary work for setting \Marked flags in LIST - reply. + lib: Fixed file_copy() after recent changes. - If MAILBOX_LIST_ITER_RETURN_NO_FLAGS is set, the caller doesn't care about - the flags. -M src/lib-storage/list/mailbox-list-index-iter.c +M src/lib/file-copy.c -2016-06-20 11:33:47 +0300 Timo Sirainen (e9ff07194) +2016-05-31 17:16:17 +0300 Timo Sirainen (567ace1f6) - lib-dcrypt: dcrypt_keypair_generate() no longer assumes pair_r to be - initialized. + dict-client: Fixed idle_msecs setting. - It wasn't clear that it should have been zeroed. It also likely isn't very - useful to be able to place the generated key to existing keys. -M src/lib-dcrypt/dcrypt.c +M src/lib-dict/dict-client.c -2016-06-19 22:27:00 +0300 Timo Sirainen (7caacdeee) +2016-05-31 17:06:29 +0300 Timo Sirainen (1cc7a6c6a) - lib-dcrypt: Check for all the return values in unit tests + lib-fs: Don't duplicate backend name in fs_init() errors. + fs_init() already adds the "backend: " prefix to the error_r, so the callers + shouldn't do it again. -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c +M src/lib-fs/fs-metawrap.c +M src/lib-fs/fs-randomfail.c +M src/lib-fs/fs-sis-queue.c +M src/lib-fs/fs-sis.c -2016-06-19 22:21:59 +0300 Timo Sirainen (15648d9c7) +2016-05-31 17:01:41 +0300 Timo Sirainen (3d1ef0818) - lib-dcrypt: Added missing error handling. + lib-storage: Fixed error_r with mail_storage_service_lookup_next() - Most of these are probably unnecessary now that malloc() no longer fails. - Also some of the NULL checks may not be needed since OpenSSL functions - (usually?) return failure on NULL parameters, but sometimes they perform a - different operation. So overall, probably safer to include these checks. + We no longer want to hide the actual error message. -M src/lib-dcrypt/dcrypt-openssl.c +M src/lib-storage/mail-storage-service.c -2016-06-19 22:18:04 +0300 Timo Sirainen (c39dd4013) +2016-05-31 12:24:01 +0300 Timo Sirainen (e20f59207) - lib-dcrypt: Don't ignore BIO errors. + lib: iostream-temp: Fixed o_stream_send_istream() - Might happen due to out of memory? -M src/lib-dcrypt/dcrypt-openssl.c +M src/lib/iostream-temp.c -2016-06-19 21:21:56 +0300 Timo Sirainen (0e8ca25fa) +2016-05-30 22:39:39 +0300 Aki Tuomi (de1c645a7) - lib-dcrypt: dcrypt_key_type_public/private() can no longer fail. + lib-dcrypt: Use base64 encoded test samples - Removed unnecessary failure handling. -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt-private.h -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/dcrypt.h -M src/lib-dcrypt/ostream-encrypt.c +M src/lib-dcrypt/Makefile.am +A src/lib-dcrypt/sample-v1.asc +D src/lib-dcrypt/sample-v1.bin +A src/lib-dcrypt/sample-v2.asc +D src/lib-dcrypt/sample-v2.bin +M src/lib-dcrypt/test-stream.c -2016-06-19 21:20:27 +0300 Timo Sirainen (92b22c978) +2016-05-30 22:33:29 +0300 Aki Tuomi (99e5f462c) - lib-dcrypt: dcrypt_key_convert_private_to_public() can no longer fail. + lib-dcrypt: Fix strict type-punning warning - Removed unnecessary failure handling. M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt-private.h -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/dcrypt.h -M src/lib-dcrypt/test-crypto.c -2016-06-19 20:55:19 +0300 Timo Sirainen (49046dc11) +2016-05-30 22:30:31 +0300 Aki Tuomi (47d4ae26c) - lib-dcrypt: Assert-crash if key parameter is NULL. + lib-dcrypt: Fix various OpenSSL API usage issues - If it happens, it's a bug. M src/lib-dcrypt/dcrypt-openssl.c -2016-06-19 20:48:27 +0300 Timo Sirainen (83c5005bd) +2016-05-30 22:05:22 +0300 Aki Tuomi (87abc256d) - lib-dcrypt: Assert-crash if impossible private/public keys are seen. - - -M src/lib-dcrypt/dcrypt-openssl.c + lib-dcrypt: Remove duplication of samples -2016-06-21 18:47:42 +0300 Timo Sirainen (cb21fec78) - doveadm fs delete: Allow multiple paths also with -R parameter. +M src/lib-dcrypt/Makefile.am +2016-05-30 21:41:12 +0300 Timo Sirainen (4fbd5c5e1) -M src/doveadm/doveadm-fs.c + lib-dcrypt: Finish previous t_malloc() change. -2016-06-21 18:30:20 +0300 Timo Sirainen (dc9e4ab28) - doveadm: Fixed --long-parameters handling +M src/lib-dcrypt/istream-decrypt.c +2016-05-17 11:38:14 +0300 Martti Rannanjärvi (11f02cda5) -M src/doveadm/doveadm-cmd.c + Replace some t_malloc_no0 calls with t_malloc0 -2016-06-20 20:06:38 +0300 Timo Sirainen (15730f82f) + This might increase safety. - dbox: Optimize POP3 MAIL_FETCH_UIDL_BACKEND. +M src/lib-imap/imap-date.c +M src/lib-imap/imap-utf7.c +M src/lib-index/test-mail-index-sync-ext.c +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/login-common/ssl-proxy-openssl.c - We keep track of the highest UID known to have POP3 UIDL in index's header. - If saving adds a newer message, it'll also update the header. When fetching - UIDL_BACKEND, we can need to check only mails with lower UIDs. There are - some race conditions here, but normally UIDLs are set only once during - migration so it shouldn't matter. +2016-05-17 10:56:53 +0300 Martti Rannanjärvi (657d704a5) -M src/lib-storage/index/Makefile.am -M src/lib-storage/index/dbox-common/dbox-mail.c -M src/lib-storage/index/dbox-common/dbox-save.c -M src/lib-storage/index/dbox-common/dbox-save.h -M src/lib-storage/index/dbox-multi/mdbox-save.c -M src/lib-storage/index/dbox-single/sdbox-save.c -A src/lib-storage/index/index-pop3-uidl.c -A src/lib-storage/index/index-pop3-uidl.h -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-transaction.c -M src/lib-storage/mail-storage-private.h + Use t_new in complicated t_malloc_no0 calls -2016-06-20 11:39:55 +0300 Timo Sirainen (525ddf5f2) - Added welcome plugin. +M src/auth/auth-request-var-expand.c +M src/lib-http/http-transfer-chunked.c +M src/lib/net.c +2016-05-17 10:35:35 +0300 Martti Rannanjärvi (0175d37a5) -M configure.ac -M src/plugins/Makefile.am -A src/plugins/welcome/Makefile.am -A src/plugins/welcome/welcome-plugin.c + Remove t_malloc in favour of t_malloc_no0 -2016-06-21 15:11:04 +0300 Martti Rannanjärvi (4559dcffe) + Using either t_malloc_no0 or t_malloc0 makes it clear whether the allocated + memory is zeroed or not. - doc: fix wrong tense in doveadm-expunge man page +M src/auth/auth-request-var-expand.c +M src/auth/password-scheme.c +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-dump-log.c +M src/imap-hibernate/imap-client.c +M src/imap/imap-client.c +M src/lib-http/http-transfer-chunked.c +M src/lib-imap/imap-date.c +M src/lib-imap/imap-utf7.c +M src/lib-index/test-mail-index-sync-ext.c +M src/lib-lda/mail-deliver.c +M src/lib-lda/mail-send.c +M src/lib-mail/mail-user-hash.c +M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-storage/index/shared/shared-storage.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mailbox-list.c +M src/lib/data-stack.c +M src/lib/data-stack.h +M src/lib/hex-binary.c +M src/lib/mempool-datastack.c +M src/lib/mempool-unsafe-datastack.c +M src/lib/net.c +M src/lib/strfuncs.c +M src/lib/test-data-stack.c +M src/lib/test-istream-concat.c +M src/lib/test-istream-seekable.c +M src/lib/var-expand.c +M src/login-common/client-common.c +M src/login-common/login-settings.c +M src/login-common/ssl-proxy-openssl.c +M src/plugins/acl/acl-shared-storage.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/pop3/pop3-client.c +M src/pop3/pop3-commands.c +M src/ssl-params/ssl-params.c +2016-05-20 15:16:41 +0300 Timo Sirainen (378e6cb16) -M doc/man/doveadm-expunge.1.in + o_stream_send_istream() API changed again -2016-06-21 17:26:01 +0300 Timo Sirainen (07a1f7b10) + The new API enforces the caller to correctly handle all the possible + situations. It also makes in unambiguous whether to wait for input or output + stream. - fs-posix: Allow ":" as well as space as parameter separator. +M src/doveadm/server-connection.c +M src/imap/cmd-getmetadata.c +M src/imap/cmd-urlfetch.c +M src/imap/imap-fetch-body.c +M src/lib-fs/fs-api.c +M src/lib-fs/ostream-metawrap.c +M src/lib-http/http-client-request.c +M src/lib-http/http-server-response.c +M src/lib-http/test-http-payload.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-response-parser.c +M src/lib-http/test-http-transfer.c +M src/lib-imap-client/imapc-connection.c +M src/lib-storage/index/index-storage.c +M src/lib/file-copy.c +M src/lib/iostream-temp.c +M src/lib/ostream-file.c +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h +M src/lib/test-iostream-temp.c +M src/lib/test-ostream-file.c +M src/plugins/mail-filter/istream-ext-filter.c - This makes it consistent with all the other fs drivers. +2016-05-30 21:14:53 +0300 Timo Sirainen (1ada45cd3) -M src/lib-fs/fs-posix.c + lib-dcrypt: Always allow error_r to be NULL. -2016-06-21 17:24:11 +0300 Timo Sirainen (c39000f9a) + Especially dcrypt_openssl_private_to_public_key() was called with + error_r=NULL by the dcrypt.c itself. - fs-posix: Added "dirs" parameter to enable explicit directory removal. +M src/lib-dcrypt/dcrypt-openssl.c +2016-05-30 19:38:22 +0300 Timo Sirainen (f7ce05fb1) -M src/lib-fs/fs-posix.c + lib-dcrypt: sample-v2.bin shouldn't be executable -2016-06-21 16:49:19 +0300 Timo Sirainen (d5fbefd8e) - fs-posix: Autodelete directories also when "prefix" parameter is used. +M src/lib-dcrypt/sample-v2.bin +2016-05-30 15:36:17 +0300 Timo Sirainen (8d5a200b8) -M src/lib-fs/fs-posix.c + lib-dcrypt: Compiler warning fixes -2016-06-20 15:10:55 +0300 Baofeng Wang (ce3cb757b) - lib-storage: Add autoexpunge_max_mails configuration to autoexpunge +M src/lib-dcrypt/dcrypt-openssl.c - Mails are expunged until mail count is at autoexpunge_max_mails or below. +2016-05-27 13:01:41 +0300 Timo Sirainen (61d3fd148) - In below example, autoexpunge will expunge 1 mail when message count > 100 - and *then* try to expunge mails that are still older than 2 minutes: + lib-storage: mail_storage_service_next() now returns error string. - namespace { - .. - mailbox Trash { - autoexpunge = 2 mins - autoexpunge_max_mails = 100 - } - } -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h +M src/doveadm/doveadm-dsync.c +M src/doveadm/doveadm-mail.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h +M src/lmtp/commands.c -2016-06-21 12:04:24 +0300 Timo Sirainen (8425e55f5) +2016-05-27 12:55:36 +0300 Timo Sirainen (6dc2060d6) - lib-dict: Explicitly specify used dict_vfuncs methods for drivers. + lib-storage: mail_storage_service_lookup() now returns the full error. - This allows adding more methods without modifying all the existing drivers. -M src/lib-dict/dict-cdb.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-db.c -M src/lib-dict/dict-file.c -M src/lib-dict/dict-memcached-ascii.c -M src/lib-dict/dict-memcached.c -M src/lib-dict/dict-redis.c -M src/lib-dict/dict-sql.c +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h -2016-06-08 16:41:04 +0300 Baofeng Wang (1fb947e5e) +2016-05-27 12:49:30 +0300 Timo Sirainen (f6008a666) - lib-fts: add unit test to fts_tokenizer_delete_trailing_partial_char() + lmtp, quota-status: Don't send mail_storage_service_lookup() error to + client. + This is in preparation for changing the returned error to contain the full + error string. The current error string is pretty useless for any purpose. -M src/lib-fts/test-fts-tokenizer.c +M src/lmtp/commands.c +M src/plugins/quota/quota-status.c -2016-06-07 16:37:27 +0300 Baofeng Wang (5406c1012) +2016-05-27 22:18:17 +0300 Timo Sirainen (4673195d0) - lib-fts: allow hyphen character in domain part + doveadm mailbox delete: Added --unsafe option. - Allow hyphen character and remove possible trailing hyhpen character when - email tokenization is done. -M src/lib-fts/fts-tokenizer-address.c -M src/lib-fts/fts-tokenizer-common.c -M src/lib-fts/test-fts-tokenizer.c +M src/doveadm/doveadm-mail-mailbox.c -2016-06-07 15:58:38 +0300 Baofeng Wang (fb237dd84) +2016-05-27 22:15:07 +0300 Timo Sirainen (f8a63c14a) - lib-fts: remove trailing period character from email-address + lib-storage: Added MAILBOX_FLAG_DELETE_UNSAFE - any trailing period character '.' should be removed when email tokenization - is done. -M src/lib-fts/fts-tokenizer-address.c -M src/lib-fts/fts-tokenizer-common.c -M src/lib-fts/fts-tokenizer-common.h -M src/lib-fts/test-fts-tokenizer.c +M src/lib-storage/mail-storage.h +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/quota/quota-storage.c -2016-06-07 16:01:03 +0300 Baofeng Wang (9412c4829) +2016-05-06 00:29:16 +0300 Aki Tuomi (9385b3175) - lib-test: add test_assert_failed_strcmp to expose strings. + configure: Include lib-dcrypt in core - the macro is used to facilitate any test to show string comparision contents - when they doesn't match. -M src/lib-test/test-common.c -M src/lib-test/test-common.h +M configure.ac -2016-06-20 21:38:56 +0300 Timo Sirainen (9a0dba957) +2016-04-27 14:08:00 +0300 Aki Tuomi (316cbe323) - Makefile: Added run-test-valgrind.supp to EXTRA_DIST + lib-dcrypt: Initial implementation -M Makefile.am +M configure.ac +M src/Makefile.am +A src/lib-dcrypt/Makefile.am +A src/lib-dcrypt/dcrypt-gnutls.c +A src/lib-dcrypt/dcrypt-iostream-private.h +A src/lib-dcrypt/dcrypt-openssl.c +A src/lib-dcrypt/dcrypt-private.h +A src/lib-dcrypt/dcrypt.c +A src/lib-dcrypt/dcrypt.h +A src/lib-dcrypt/istream-decrypt.c +A src/lib-dcrypt/istream-decrypt.h +A src/lib-dcrypt/ostream-encrypt.c +A src/lib-dcrypt/ostream-encrypt.h +A src/lib-dcrypt/sample-v1.bin +A src/lib-dcrypt/sample-v2.bin +A src/lib-dcrypt/test-crypto.c +A src/lib-dcrypt/test-stream.c +M src/lib-storage/index/dbox-single/sdbox-file.c -2016-06-20 18:46:04 +0300 Timo Sirainen (80951e8df) +2016-05-30 14:45:09 +0300 Aki Tuomi (5d16ff58f) - Updated run-test-valgrind.supp + doveadm-director: Fix commands so that they compile -M run-test-valgrind.supp +M src/doveadm/doveadm-director.c -2016-06-20 17:52:28 +0300 Timo Sirainen (e28debf6b) +2016-05-27 11:29:09 +0300 Timo Sirainen (2a9af9ae3) - lib: file_create_locked() - Unexpectedly deleted temp file is error. + doveadm mailbox delete: Added -e parameter to delete only empty mailboxes. - This shouldn't happen and we shouldn't be silently retrying if it does. -M src/lib/file-create-locked.c +M src/doveadm/doveadm-mail-mailbox.c -2016-06-20 14:29:57 +0300 Timo Sirainen (1ad12f870) +2016-02-24 12:10:19 +0200 Aki Tuomi (264a0f242) - Added valgrind suppression for OpenSSL (344ac8966) +2016-05-29 19:14:58 +0200 Stephan Bosch (d8aa10df6) - openssl: Use our own malloc()/realloc() that will die on out-of-memory. + imap: Implemented support for the LITERAL- capability. - This is likely safer rather than caller thinking for example that some input - is invalid when it's only a temporary memory allocation problem. + This replaces the LITERAL+ capability when the imap_literal_minus setting is + enabled. -M src/lib-ssl-iostream/dovecot-openssl-common.c +M configure.ac +M doc/example-config/conf.d/20-imap.conf +M src/imap-login/imap-login-client.c +M src/imap-login/imap-login-settings.c +M src/imap-login/imap-login-settings.h +M src/imap/cmd-append.c +M src/imap/cmd-setmetadata.c +M src/imap/imap-client.c +M src/imap/imap-settings.c +M src/imap/imap-settings.h +M src/lib-imap/imap-parser.c +M src/lib-imap/imap-parser.h -2016-06-20 13:33:34 +0300 Timo Sirainen (f5e6b0568) +2016-05-29 19:23:39 +0200 Stephan Bosch (0adc24c0c) - lib-dcrypt: Allow specifying crypto_device (OpenSSL engine). + lib-imap: imap-parser: Turned the fatal error flag into a proper error code. -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt-private.h -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/dcrypt.h -M src/lib-dcrypt/test-crypto.c -M src/lib-dcrypt/test-stream.c +M src/imap-login/imap-login-client.c +M src/imap/cmd-append.c +M src/imap/cmd-setmetadata.c +M src/imap/imap-client.c +M src/lib-imap/imap-parser.c +M src/lib-imap/imap-parser.h +M src/lib-imap/test-imap-parser.c -2016-06-20 13:33:05 +0300 Timo Sirainen (44911be2c) +2016-05-29 19:58:55 +0200 Stephan Bosch (7bb371485) - lib-dcrypt: Added library dependencies to unit tests + lib-imap: imap-parser: Made the fatal result parameter of + imap_parser_get_error() optional. -M src/lib-dcrypt/Makefile.am +M src/lib-imap-client/imapc-connection.c +M src/lib-imap/imap-bodystructure.c +M src/lib-imap/imap-parser.c +M src/lib-imap/imap-parser.h +M src/plugins/virtual/virtual-config.c -2016-06-20 12:58:08 +0300 Timo Sirainen (bff052bd2) +2016-05-29 19:39:13 +0200 Stephan Bosch (468440fab) - lib-dcrypt, lib-ssl-iostream: Share OpenSSL init/deinit code. + lib-imap: imap-parser: Renamed error field to error_msg. -M src/Makefile.am -M src/lib-dcrypt/Makefile.am -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-ssl-iostream/Makefile.am -A src/lib-ssl-iostream/dovecot-openssl-common.c -A src/lib-ssl-iostream/dovecot-openssl-common.h -M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-imap/imap-parser.c -2016-06-20 13:05:37 +0300 Timo Sirainen (8fbcc7a11) +2016-05-27 21:55:56 +0300 Timo Sirainen (c866a0378) - lib-dcrypt: Fix to backend module loading. + dbox: Revert cache changes if some save/copy fails but transaction is + committed. - Especially don't die if we fail to load the module. -M src/lib-dcrypt/dcrypt.c +M src/lib-storage/index/dbox-multi/mdbox-save.c +M src/lib-storage/index/dbox-single/sdbox-save.c -2016-06-19 21:31:10 +0200 Stephan Bosch (f292589f4) +2016-05-27 21:34:26 +0300 Timo Sirainen (f819fafff) - lib-http: server: Created test program that tests error conditions. + lazy-expunge: Don't fail expunge if mail was already expunged. - Currently it is very limited, but it is due to be extended soon towards - testing most common error conditions. -M src/lib-http/Makefile.am -A src/lib-http/test-http-server-errors.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c -2016-06-20 02:41:37 +0200 Stephan Bosch (3da0c5295) +2016-05-27 21:32:23 +0300 Timo Sirainen (567d2fd59) - lib-http: Restructured Makefile.am to have less duplicated lines for the - test suite. + lazy-expunge: Fixed error logging. -M src/lib-http/Makefile.am +M src/plugins/lazy-expunge/lazy-expunge-plugin.c -2016-06-20 01:25:02 +0200 Stephan Bosch (183ca5c9e) +2016-05-27 18:30:01 +0300 Timo Sirainen (589bc28b5) - lib-http: server: Added settings to configure the connection's socket kernel - buffer sizes. + dsync: Debug logging improvement. - This is mainly useful for use in the lib-http test suite. -M src/lib-http/http-server-connection.c -M src/lib-http/http-server.c -M src/lib-http/http-server.h +M src/doveadm/dsync/dsync-mailbox-import.c -2016-06-20 01:20:33 +0200 Stephan Bosch (189b586eb) +2016-05-27 14:38:17 +0300 Timo Sirainen (f48452dad) - lib-http: server: Make sure provided connection FDs are non-blocking. + lib-fs: Fix to previous fs-metawrap commit + Argh. I was sure I compiled this before pushing it. -M src/lib-http/http-server-connection.c +M src/lib-fs/istream-metawrap.c -2016-06-20 01:15:18 +0200 Stephan Bosch (d8570b292) +2016-05-27 14:33:47 +0300 Timo Sirainen (d22b6aeaf) - lib-http: server: Wrap request payload in a timeout input stream. + lib-fs: fs-metawrap: Improved error logging on corrupted files. - The server cannot reset the timeout properly while the payload is being read - by the application. The HTTP client solved this same problem by identical - means. -M src/lib-http/http-server-connection.c +M src/lib-fs/istream-metawrap.c -2016-06-19 22:31:18 +0200 Stephan Bosch (83d369656) +2016-05-27 13:33:21 +0300 Timo Sirainen (0af543c1f) - lib-http: server: Fixed handling of idle timeout when request just starts - processing on the server. + lib-http: Default port for http should be 80, not 443. -M src/lib-http/http-server-connection.c +M src/lib-http/http-client-request.c -2016-06-19 22:35:43 +0200 Stephan Bosch (5ecd956aa) +2016-05-26 19:13:40 +0300 Timo Sirainen (4fecb0a09) - lib-http: server: Added more detailed debugging about when idle timeouts are - started/stopped. + doveadm: Fixed sending command -parameters to doveadm-server -M src/lib-http/http-server-connection.c +M src/doveadm/doveadm-mail.c -2016-06-17 16:59:37 +0200 Stephan Bosch (8c0379c3c) +2016-05-26 21:40:30 +0300 Timo Sirainen (901f49833) - lib-http: client: Added tests for manual handling of connection loss retries - to test-http-client-errors. + sdbox: Make sure we don't crash when altmove-flag is set but alt path is + missing. -M src/lib-http/test-http-client-errors.c +M src/lib-storage/index/dbox-single/sdbox-file.c -2016-06-17 16:59:15 +0200 Stephan Bosch (29d5559f1) +2016-05-26 18:27:27 +0300 Timo Sirainen (bcb07f51d) - lib-http: client: Implemented no_auto_retry setting that disables all - automatic request retries. + lib-http: Improved error logging for net_set_*_buffer_size() failures. - This currently only applies to requests sent over a connection that is - subsequently lost before a response is received. Before, such requests were - always implicitly resumbitted for a new connection, without the application - knowing about it. By enabling the no_auto_retry client setting, the - application is always notified of connection loss through the request's - response callback. As a consequence, requests need to be retried explicitly - using the http_client_request_try_retry(). M src/lib-http/http-client-connection.c -M src/lib-http/http-client.c -M src/lib-http/http-client.h - -2016-06-17 15:39:36 +0200 Stephan Bosch (ce91fd508) - - lib-http: client: Allow retrying requests that failed internally. - - -M src/lib-http/http-client-request.c - -2016-06-14 22:47:31 +0200 Stephan Bosch (91ebc77e7) - - lib-http: client: Added test for http_client_request_delay_msecs() in - test_http_client_errors. - - -M src/lib-http/test-http-client-errors.c -2016-05-26 18:27:27 +0300 Timo Sirainen (024ade622) +2016-05-26 18:25:06 +0300 Timo Sirainen (db0f43524) - lib-http: Improved error logging for net_set_*_buffer_size() failures. + dict-sql: Fixed memory leak -M src/lib-http/http-client-connection.c +M src/lib-dict/dict-sql-settings.c -2016-05-22 10:38:18 +0200 Stephan Bosch (534195d81) +2016-05-22 10:38:18 +0200 Stephan Bosch (03142e79f) lib-http: client: Created test program that triggers most possible error conditions. @@ -23455,14 +49381,14 @@ M src/lib-http/Makefile.am A src/lib-http/test-http-client-errors.c -2016-05-24 03:11:07 +0200 Stephan Bosch (ddb65fbdc) +2016-05-24 03:11:07 +0200 Stephan Bosch (b44c460e1) lib-http: test-http-payload: Added tests for the use of nested ioloops. M src/lib-http/test-http-payload.c -2016-05-23 21:57:18 +0200 Stephan Bosch (9ae8eaf77) +2016-05-23 21:57:18 +0200 Stephan Bosch (7362ba25c) lib-http: test-http-payload: Added cleanup code to make sure no child processes get orphaned at failures. @@ -23471,14 +49397,14 @@ M src/lib-http/test-http-payload.c -2016-05-22 19:16:42 +0200 Stephan Bosch (5ad09b076) +2016-05-22 19:16:42 +0200 Stephan Bosch (844b0294f) lib-http: test-http-payload: Added -D option to easily enable debug mode. M src/lib-http/test-http-payload.c -2016-05-23 03:16:07 +0200 Stephan Bosch (4c4ec1720) +2016-05-23 03:16:07 +0200 Stephan Bosch (f3f5732b2) lib-http: test-http-client: Callback is not called for explicitly aborted requests. @@ -23487,7 +49413,7 @@ M src/lib-http/test-http-client.c -2016-05-25 23:41:47 +0200 Stephan Bosch (8d558a576) +2016-05-25 23:41:47 +0200 Stephan Bosch (57c339f4e) lib-http: client: Fixed bug in handling of lost connections while returning from another ioloop. @@ -23504,21 +49430,32 @@ M src/lib-http/http-client-peer.c M src/lib-http/http-client-private.h -2016-05-23 02:38:49 +0200 Stephan Bosch (07b6d2bd9) +2016-05-23 02:38:49 +0200 Stephan Bosch (8a6dc5025) lib-http: client: Reworked connection close handling. - Now, the peer is immediately notified of the lost connection. Before, this - step was only taken when the connection was fully dereferenced. To prevent - recursive notifications between peer and connection, handling the loss of a - connection is deferred to the request handler. When a peer is freed, any - associated lingering connections have conn->peer set to NULL. + Now, the peer is immediately notified of the lost connection. Before, this + step was only taken when the connection was fully dereferenced. To prevent + recursive notifications between peer and connection, handling the loss of a + connection is deferred to the request handler. When a peer is freed, any + associated lingering connections have conn->peer set to NULL. + +M src/lib-http/http-client-connection.c +M src/lib-http/http-client-peer.c +M src/lib-http/http-client-private.h + +2016-05-23 02:36:10 +0200 Stephan Bosch (7abab3b19) + + lib-http: client: Improved labeling of debug messages. + + Request label is corrected. Labels are now pre-composed and stored. M src/lib-http/http-client-connection.c M src/lib-http/http-client-peer.c M src/lib-http/http-client-private.h +M src/lib-http/http-client-request.c -2016-05-22 12:48:37 +0200 Stephan Bosch (48e1753a8) +2016-05-22 12:48:37 +0200 Stephan Bosch (6ab81c81b) lib-http: client: Prevent useless and unexpected request callbacks during http_client_deinit(). @@ -23532,7 +49469,7 @@ M src/lib-http/http-client-request.c M src/lib-http/http-client.c -2016-05-20 00:04:12 +0200 Stephan Bosch (fff178493) +2016-05-20 00:04:12 +0200 Stephan Bosch (c972eaa35) lib-http: client: Added settings to configure the connection's socket kernel buffer sizes. @@ -23543,7 +49480,7 @@ M src/lib-http/http-client.c M src/lib-http/http-client.h -2016-05-20 00:02:49 +0200 Stephan Bosch (2b7757bef) +2016-05-20 00:02:49 +0200 Stephan Bosch (8848174ce) lib: Implemented net_set_send_buffer_size() and net_set_recv_buffer_size(). @@ -23553,7 +49490,7 @@ M src/lib/net.c M src/lib/net.h -2016-05-19 23:42:14 +0200 Stephan Bosch (d63cb1342) +2016-05-19 23:42:14 +0200 Stephan Bosch (1569b12af) lib-http: client: Removed curiously duplicated code. @@ -23562,7 +49499,7 @@ M src/lib-http/http-client-request.c -2016-05-21 13:17:58 +0200 Stephan Bosch (8d5c693b1) +2016-05-21 13:17:58 +0200 Stephan Bosch (481b066e8) lib-http: client: peer: Improved debug message that shows the loss of a connection. @@ -23570,7 +49507,7 @@ M src/lib-http/http-client-peer.c -2016-05-21 00:16:21 +0200 Stephan Bosch (0102e440a) +2016-05-21 00:16:21 +0200 Stephan Bosch (ebe0f5e38) lib-http: client: Made peer object reference-counted to prevent invalid memory access in request handling routine. @@ -23582,7 +49519,7 @@ M src/lib-http/http-client-private.h M src/lib-http/http-client.c -2016-05-21 13:16:08 +0200 Stephan Bosch (d2b6ff054) +2016-05-21 13:16:08 +0200 Stephan Bosch (3e9055cee) lib-http: client: Improved request reference counting in connection code. @@ -23594,7 +49531,7 @@ M src/lib-http/http-client-connection.c M src/lib-http/http-client-request.c -2016-05-22 10:42:01 +0200 Stephan Bosch (2cbef0fae) +2016-05-22 10:42:01 +0200 Stephan Bosch (6bdb1b488) lib-http: client: Fixed reference counting for requests that are aborted due to an early server response. @@ -23603,7 +49540,7 @@ M src/lib-http/http-client-connection.c -2016-05-19 23:40:26 +0200 Stephan Bosch (adc47546e) +2016-05-19 23:40:26 +0200 Stephan Bosch (43c49be6f) lib-http: client: Fixed reference counting for requests that are aborted due to having a broken outgoing payload stream. @@ -23611,7 +49548,7 @@ M src/lib-http/http-client-request.c -2016-05-18 19:40:32 +0300 Timo Sirainen (4a4f676c4) +2016-05-18 19:40:32 +0300 Timo Sirainen (d5c665cf2) lib-http: Changed http_client_request_error to set request to NULL @@ -23627,7 +49564,7 @@ M src/lib-http/http-client-queue.c M src/lib-http/http-client-request.c -2016-05-21 00:16:38 +0200 Stephan Bosch (e7a0878fd) +2016-05-21 00:16:38 +0200 Stephan Bosch (1c2f122ae) lib-http: response parser: Added check for the range of the response status value. @@ -23636,2120 +49573,2341 @@ M src/lib-http/http-response-parser.c -2016-06-20 03:07:58 +0300 Timo Sirainen (a5bf9e64b) +2016-05-25 22:29:47 +0300 Timo Sirainen (ba4626cd5) - lib-dict-extra: Compiler warning fix + cassandra: Added metrics=path connect setting. + Cassandra's metrics are written to the path in JSON format. It can be a file + or a FIFO. The path supports expanding the standard global %variables, such + as %{pid} -M src/lib-dict-extra/dict-fs.c +M src/lib-sql/driver-cassandra.c -2016-06-13 17:10:22 +0300 Timo Sirainen (adda15c33) +2016-05-25 22:08:04 +0300 Timo Sirainen (2c2934e71) - lib-dict: Added dict_switch_ioloop() + dict: Added missing main.h from previous commit -M src/lib-dict/dict-client.c -M src/lib-dict/dict-file.c -M src/lib-dict/dict-memcached-ascii.c -M src/lib-dict/dict-private.h -M src/lib-dict/dict-redis.c -M src/lib-dict/dict-sql.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/plugins/dict-ldap/dict-ldap.c +A src/dict/main.h -2016-06-02 00:57:17 +0300 Timo Sirainen (d05c72b45) +2016-05-25 20:00:01 +0300 Timo Sirainen (cbe49ba12) - lib-dict: dict-client rewrite to support async operations + dict: Show command statistics in process title. -M src/lib-dict/dict-client.c +M src/dict/Makefile.am +M src/dict/dict-commands.c +M src/dict/dict-commands.h +M src/dict/dict-connection.c +M src/dict/dict-connection.h +M src/dict/dict-settings.c +M src/dict/dict-settings.h +M src/dict/main.c -2016-05-06 17:24:42 +0300 Timo Sirainen (7ebd546ed) +2016-05-25 19:56:47 +0300 Timo Sirainen (b1d2b70ec) - lib: Added t_str_tabunescape() + lib: Fixed crashes in timing_get_median() and timing_get_95th() + These were writing outside allocated memory. They weren't actually used + anywhere yet though. -M src/lib/strescape.c -M src/lib/strescape.h -M src/lib/test-strescape.c +M src/lib/test-timing.c +M src/lib/timing.c -2016-06-20 02:25:47 +0300 Timo Sirainen (81b96aa2b) +2016-05-25 19:45:58 +0300 Timo Sirainen (65da08807) - lib-dcrypt: Use a more supported EC curve in unit test + lib: Added timing_reset() - Fixes running the test on CentOS 6. -M src/lib-dcrypt/test-crypto.c +M src/lib/test-timing.c +M src/lib/timing.c +M src/lib/timing.h -2016-06-20 01:47:59 +0300 Timo Sirainen (c5bb8ef0a) +2016-05-19 19:15:49 -0500 J. Nick Koston (9f2f22889) - lib-index: Don't break indexes on syscall failures during index refreshing. + dsync: race condition where done/finish is received after one side has + closed - Especially mmap() failures due to out of memory could have triggered this. - We treated the open as successful, which meant that an empty index was - opened. + We do not tell the remote we are closing if they have already told us + because they close the connection after sending ITEM_FINISH or ITEM_DONE and + will not be ever receive anything else from us unless it just happens to get + combined into the same packet as a previous response and is already in the + buffer. -M src/lib-index/mail-index-sync-update.c +M src/doveadm/dsync/dsync-ibc-stream.c -2016-06-19 23:18:43 +0300 Timo Sirainen (a12763b80) +2016-05-24 15:52:37 +0300 Timo Sirainen (838c70b2a) - lib-dcrypt: Fixed running unit tests in build directory. + lib-stats: Allow unregistering + re-registering stats. + Fixes: Panic: stats_register() called after stats_alloc_size() was already + called - this will break existing allocations -M src/lib-dcrypt/Makefile.am -M src/lib-dcrypt/test-stream.c + This could have happened with doveadm HTTP API when using multiple commands + in same HTTP connection. -2016-06-19 20:23:27 +0300 Timo Sirainen (c70202530) +M src/lib-stats/stats.c - mailbox-alias: Fixed renaming mailboxes when the plugin is loaded. +2016-05-23 23:24:31 +0300 Timo Sirainen (5b4708775) + lib-index: Fixed assert-crash caused by previous cache compression change. -M src/plugins/mailbox-alias/mailbox-alias-plugin.c + We can't call mail_cache_map() when cache file isn't open or we'll crash: -2016-06-19 18:44:55 +0300 Timo Sirainen (6fd4b93aa) + Panic: file mail-cache.c: line 468 (mail_cache_map): assertion failed: + (cache->need_compress_file_seq != 0 || + MAIL_INDEX_IS_IN_MEMORY(cache->index)) - lib-dcrypt: Fixed memory leak in test-crypto unit test +M src/lib-index/mail-cache-compress.c +2016-05-23 18:46:09 +0300 Timo Sirainen (230586a16) -M src/lib-dcrypt/test-crypto.c + lib-index: Make sure cache compression doesn't clear the file unneededly. -2016-06-19 18:38:39 +0300 Timo Sirainen (97559e0a2) + This probably never happened with current code, except when the cache file + was already broken. - doveadm dump: Updated obox's oid output. + mail_cache_compress() unmapped cache when map_with_read==TRUE, but we never + mapped it back. This would cause cache copying code to think cache was + unusable and not copy anything. +M src/lib-index/mail-cache-compress.c -M src/doveadm/doveadm-dump-index.c +2016-05-23 17:47:50 +0300 Timo Sirainen (86c4dc012) -2016-06-15 01:54:25 +0200 Stephan Bosch (4889576ce) + auth: Support %variable expansion for LDAP field names. - lib-http: client: Added more debug logging about the submission of delayed - requests. + For example this is now allowed: + user_attrs = \ + =namespace/%{ldap:enabledNamespace}/enabled=yes \ + ... -M src/lib-http/http-client-queue.c +M src/auth/db-ldap.c -2016-06-15 01:53:44 +0200 Stephan Bosch (cf757d601) +2016-05-23 13:12:41 +0300 Timo Sirainen (e181e75d2) - time-util: Fixed usec comparison in timeval_cmp_margin(). + lib-ldap: Use ldap_unbind_ext() instead of ldap_destroy() + This allows it to compile with older LDAP libraries. Their behavior (at + least in OpenLDAP) is identical as long as LDAP_OPT_CLIENT_CONTROLS haven't + been changed, which we haven't. -M src/lib/time-util.c +M src/lib-ldap/ldap-connection.c -2016-06-14 22:42:09 +0300 Teemu Huovila (d737445a4) +2016-05-23 13:08:20 +0300 Timo Sirainen (7e35289ec) - lib-dcrypt: Fix error_r pointer verification. + lib-ldap: Support libldap without LDAP_OPT_X_TLS_NEWCTX. -M src/lib-dcrypt/dcrypt.c +M src/lib-ldap/ldap-connection.c -2016-06-14 22:32:36 +0300 Timo Sirainen (c36510421) +2016-05-20 15:55:52 +0300 Timo Sirainen (8c8f6ed0a) - lib-fs: Added write_bytes to statistics + doveadm backup: Fixed unnecessary mailbox deletion. + Broken by 79490ec1a. The idea is to delete the mailbox early to avoid + unnecessary work, but we deleted it too early. If the last mail(s) were + deleted instead of just expunging them we deleted the whole mailbox. -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h +M src/doveadm/dsync/dsync-mailbox-import.c -2016-05-10 10:19:57 +0300 Martti Rannanjärvi (cf936f221) +2016-05-20 13:53:01 +0300 Timo Sirainen (c8920d5f3) - [LEN] to [static LEN] on some function parameters + lib: Minor panic message improvement. - Also add STATIC_ARRAY macro to hide it in c++ compilation. -M src/auth/mech-rpa.c -M src/auth/passdb.c -M src/auth/passdb.h -M src/auth/userdb.c -M src/auth/userdb.h -M src/lib-storage/index/mbox/mbox-md5-all.c -M src/lib-storage/index/mbox/mbox-md5-apop3d.c -M src/lib-storage/index/mbox/mbox-md5.h -M src/lib/guid.c -M src/lib/guid.h -M src/lib/macros.h -M src/lib/md4.c -M src/lib/md4.h -M src/lib/md5.c -M src/lib/md5.h -M src/lib/sha1.c -M src/lib/sha1.h -M src/lib/sha2.c -M src/lib/sha2.h -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/pop3-migration/pop3-migration-plugin.h +M src/lib/ioloop-epoll.c -2016-06-14 12:30:27 +0300 Aki Tuomi (a63f6d227) +2016-05-19 23:19:29 +0300 Timo Sirainen (71ecc9759) - dcrypt: Arm deinitialization code + lib-mail: Fixed istream-header-filter calling callback(hdr=NULL) + It should do it on the following parsings as well if there were any + callbacks that were called, or if the hdr==NULL callback added any headers. + This is important because the hdr==NULL call could do some cleanups. -M src/lib-dcrypt/dcrypt.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c -2016-06-14 12:08:49 +0300 Aki Tuomi (0901d3f50) +2016-05-19 15:19:21 +0300 Timo Sirainen (da574ef2d) - dcrypt: Add test for public key loading + lib: iostream-temp is a blocking ostream. + It goes either to in-memory buffer or to a file. -M src/lib-dcrypt/test-crypto.c +M src/lib/iostream-temp.c -2016-06-14 12:08:34 +0300 Aki Tuomi (920a34e4e) +2016-05-16 11:34:05 +0300 Baofeng Wang (b27a8a973) - dcrypt-openssl: Pass pointer safely + config: fix possible out-of-bound access in parsing function + Add low-bound check when decreasing string pointer from tail. -M src/lib-dcrypt/dcrypt-openssl.c +M src/config/config-parser.c -2016-06-14 10:49:24 +0300 Timo Sirainen (b4fe750eb) +2016-05-18 22:38:24 +0300 Timo Sirainen (456602d34) - lib-index: Fixed test-mail-index-sync-ext + lib-fs: istream-metawrap can now safely have a readable fd -M src/lib-index/test-mail-index-sync-ext.c +M src/lib-fs/istream-metawrap.c -2016-06-14 01:14:13 +0300 Timo Sirainen (acf2cc6f7) +2016-05-18 22:36:57 +0300 Timo Sirainen (d28179fd7) - lib-index: Fixes to handling resized records. + lib: Changed istream.abs_start_offset to be relative start_offset + i_stream_get_absolute_offset() walks through the stream's parents to get the + absolute offset. This allows streams to change their start_offset after they + have already created (e.g. istream-metawrap). -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-private.h -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index-transaction-export.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-fs/istream-metawrap.c +M src/lib/iostream-temp.c +M src/lib/istream-mmap.c +M src/lib/istream-private.h +M src/lib/istream.c +M src/lib/ostream-file.c -2016-06-13 20:16:14 +0300 Timo Sirainen (6aed77526) +2016-05-18 22:59:06 +0300 Timo Sirainen (79fff61b8) - dict: Increased max number of pipelined requests from 5 to 1000. + dict: Removed duplicate commit reply character - The client is supposed to be the one throttling the requests. We mainly want - to avoid accidental abuses. Using 1000 is hopefully "large enough" without - being "too large". + This broke dict-client with error: Invalid commit reply, expected id=1: OO1 -M src/dict/dict-connection.c +M src/dict/dict-commands.c -2016-06-13 17:59:01 +0300 Timo Sirainen (68df4591b) +2016-05-18 22:51:46 +0300 Timo Sirainen (30be8c9be) - dict: Avoid potentially using 100% CPU + lib: Compiler warning fix - Continuing 65c570f18 fix. -M src/dict/dict-connection.c +M src/lib/process-title.c -2016-06-13 17:11:28 +0300 Timo Sirainen (7e55f1ea2) +2016-05-18 22:51:31 +0300 Timo Sirainen (cd07d97b7) - lib-fs: Added fs_switch_ioloop() + lib: Fixed memory leak in ostream-file unit test -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-posix.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-test.c -M src/plugins/fs-compress/fs-compress.c +M src/lib/test-ostream-file.c -2016-06-13 17:31:34 +0300 Timo Sirainen (3986d36de) +2016-05-18 16:03:34 +0300 Aki Tuomi (1904e2fc7) - lib-fs: Code cleanup for fs-sis: Use struct fs.parent + Make libbsd optional + Also use setproctitle properly if libbsd is indeed used. -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c +M m4/arc4random.m4 +M src/lib-master/master-service.c +M src/lib/process-title.c +M src/lib/process-title.h -2016-06-13 12:49:19 +0300 Aki Tuomi (07a0a1869) +2016-05-18 22:26:50 +0300 Timo Sirainen (7a1749056) - lib-dcrypt: Use hex encoded public key ID in callback + lib-fs: istream-metawrap can't have a readable fd currently -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/istream-decrypt.h +M src/lib-fs/istream-metawrap.c -2016-06-07 03:47:44 +0300 Timo Sirainen (dce4c1d98) +2016-05-18 22:26:23 +0300 Timo Sirainen (a39c48f79) - Fixed linking with OSX. + lib: ostream-file unit test: Test sendfile() -M src/lib-dcrypt/Makefile.am -M src/lib-ldap/Makefile.am +M src/lib/test-ostream-file.c -2016-06-13 12:44:09 +0300 Aki Tuomi (3f7937766) +2016-05-18 22:12:01 +0300 Timo Sirainen (e6e5e9c03) - lib-dcrypt: Use dcrypt_key_id_private when applicable + lib: ostream-file: Fixed o_stream_send_istream() within same file + When copying content backwards. -M src/lib-dcrypt/istream-decrypt.c +M src/lib/ostream-file.c +M src/lib/test-ostream-file.c -2016-05-11 08:02:29 +0300 Aki Tuomi (cecf8cfdc) +2016-05-18 21:46:46 +0300 Timo Sirainen (21d094cf5) - ldap: Fix cyclic dependency + lib-imap-storage: Fixed fetching partial headers for message/rfc822 part + Again broken by 333602c40. -M configure.ac -M src/Makefile.am -M src/lib-dict-extra/Makefile.am -M src/plugins/Makefile.am -A src/plugins/dict-ldap/Makefile.am -R100 src/lib-dict-extra/dict-ldap-settings.c src/plugins/dict-ldap/dict-ldap-settings.c -R100 src/lib-dict-extra/dict-ldap-settings.h src/plugins/dict-ldap/dict-ldap-settings.h -R100 src/lib-dict-extra/dict-ldap.c src/plugins/dict-ldap/dict-ldap.c +M src/lib-imap-storage/imap-msgpart.c -2016-06-13 12:18:07 +0300 Timo Sirainen (dda8a314b) +2016-05-18 21:41:49 +0300 Timo Sirainen (76d21e300) - dovecot-config: Add lib-dcrypt to LIBDOVECOT_INCLUDE + lib-imap-storage: Don't sort uninitialized array on invalid header list. - Since lib-dcrypt is part of libdovecot. -M dovecot-config.in.in +M src/lib-imap-storage/imap-msgpart.c -2016-05-19 11:14:46 +0300 Martti Rannanjärvi (2f83c2f73) +2016-05-18 21:14:28 +0300 Timo Sirainen (564b73a66) - master: make setting listen empty an error + lib-imap-storage: Removed wrong assert. + Now that we're no longer putting the headers through istream-header-filter + it doesn't necessarily have CRLFs. Broken by 333602c40. -M src/master/master-settings.c +M src/lib-imap-storage/imap-msgpart.c -2016-06-12 20:11:49 +0300 Timo Sirainen (77893565e) +2016-05-18 14:56:59 +0300 Timo Sirainen (07bba7cf5) - lib-index: mail_index_ext_resize() was broken when record_size wasn't - changed. + lib-mail: istream-header-filter - Don't return -2 too early + We returned -2 after we already added the data to the buffer. We should have + returned -2 only on the next read() call if nothing was skipped. -M src/lib-index/mail-index-transaction-update.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c -2016-06-12 18:57:10 +0300 Aki Tuomi (fb252d6ca) +2016-05-18 14:52:03 +0300 Timo Sirainen (3f75daca2) - lib-dcrypt: Fix various problems + lib-mail: Added asserts to message_get_*_size() -M src/lib-dcrypt/Makefile.am -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/dcrypt-private.h -M src/lib-dcrypt/dcrypt.c -M src/lib-dcrypt/dcrypt.h +M src/lib-mail/message-size.c + +2016-05-18 14:27:03 +0300 Timo Sirainen (333602c40) -2016-06-11 21:23:57 +0300 Timo Sirainen (1f2c248dc) + lib-imap-storage: Don't double-filter HEADER.FIELDS (..) headers. - lib-mail: Improved message-parser unit tests. +M src/lib-imap-storage/imap-msgpart.c -M src/lib-mail/test-message-parser.c +2016-05-18 14:24:55 +0300 Timo Sirainen (049e3eaf8) -2016-06-11 21:23:07 +0300 Timo Sirainen (90c8dbd88) + lib-imap-storage: Minor error logging cleanup/fix. - lib-mail: Fixed message_parser_init_from_parts() with truncated MIME headers + We read from input, not from mail_input. In theory it could have the actual + error instead of mail_input (although right now it couldn't). +M src/lib-imap-storage/imap-msgpart.c -M src/lib-mail/message-parser.c +2016-05-18 19:22:40 +0300 Timo Sirainen (56f5cea32) -2016-06-11 21:20:37 +0300 Timo Sirainen (2a8dbe2b5) + lib: istream-file: Fixed o_stream_send_istream() - lib-mail: message-header-parser now keeps istream referenced. +M src/lib/ostream-file.c -M src/lib-mail/message-header-parser.c +2016-05-18 18:51:55 +0300 Timo Sirainen (43f651585) -2016-06-11 20:50:39 +0300 Timo Sirainen (62fc7d0cc) + lib-http: Fixed checking if istream or ostream needs waiting. - lib-storage: mail_set_cache_corrupted*() now sets internal error to storage. - At least index_mail_set_message_parts_corrupted() assumed that this was - being done. +M src/lib-http/http-client-request.c +M src/lib-http/http-server-response.c -M src/lib-storage/index/index-mail.c +2016-05-18 18:48:27 +0300 Timo Sirainen (7420207c4) -2016-06-11 17:13:12 +0300 Timo Sirainen (5aa66452f) + lib: If epoll_ctl() fails, panic instead of just fatal. - cassandra: Try fallback_consistency also for write timeout failures. + This makes it easier to fix such bugs. +M src/lib/ioloop-epoll.c -M src/lib-sql/driver-cassandra.c +2016-05-18 18:44:10 +0300 Timo Sirainen (ea854edb5) -2016-06-07 08:50:12 +0300 Aki Tuomi (8fdb634ad) + lib-mail: Improve ostream-dot unit test - doveadm-server: Disable idle timeout for now +M src/lib-mail/test-ostream-dot.c -M src/doveadm/client-connection-http.c +2016-05-18 18:41:33 +0300 Timo Sirainen (bcab95c67) -2016-06-07 03:25:16 +0300 Timo Sirainen (9a7dc9132) + lib: ostream-escaped: Fixed setting offset - lib-dcrypt: Fixed library dependencies - _DEPENDENCIES needs an explicit paths, not "-lssl" and such. Fixes building - with e.g. OSX. +M src/lib/ostream-escaped.c +M src/lib/test-ostream-escaped.c -M src/lib-dcrypt/Makefile.am +2016-05-18 18:42:14 +0300 Timo Sirainen (bf87a5247) -2016-06-07 03:04:32 +0300 Timo Sirainen (4a5eb0c4c) + lib: Added comment to what ostream.offset actually is - lib-lda: Don't assert-crash if home directory isn't set. +M src/lib/ostream.h -M src/lib-lda/duplicate.c +2016-05-18 17:56:55 +0300 Timo Sirainen (fbae84cc7) -2016-06-05 16:01:05 +0300 Timo Sirainen (318974e64) + lib-fs: ostream-metawrap: Fixed o_stream_send_istream() offset updates - mbox: Code cleanup - use bool instead of int for tracking locked-status +M src/lib-fs/ostream-metawrap.c -M src/lib-storage/index/mbox/mbox-lock.c +2016-05-18 17:45:09 +0300 Timo Sirainen (a06744657) -2016-05-02 18:27:02 +0300 Timo Sirainen (4441f95b3) + lib: Don't set ostream buffer as blocking - quota: Differentiate between forced and non-forced quota recalc - The "count" backend doesn't need to recalc quota unless an explicit "doveadm - quota recalc" command is called. +M src/lib/ostream-buffer.c -M src/plugins/quota/doveadm-quota.c -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota-maildir.c -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota.c -M src/plugins/quota/quota.h +2016-05-18 17:42:06 +0300 Timo Sirainen (25ec868bd) -2016-05-02 18:16:00 +0300 Timo Sirainen (6ab59f320) + lib: iostream-temp: Fixed sending more output after o_stream_send_istream() - quota: Skip reading mail sizes when quota backend doesn't need it. - If quota backend is updating the quota internally, it's just going to ignore - the looked up size. The only reason for looking up the sizes is to check - with quota_try_alloc() whether user is going over quota. +M src/lib/iostream-temp.c +M src/lib/test-iostream-temp.c -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-dirsize.c -M src/plugins/quota/quota-fs.c -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota.c +2016-05-18 17:41:32 +0300 Timo Sirainen (c076ad69e) -2016-06-06 02:27:35 +0300 Timo Sirainen (3eb750330) + lib: iostream-temp: Fixed o_stream_send_istream() - fs-randomfail: Support failures after asynchronous commands have already - finished. +M src/lib/iostream-temp.c +M src/lib/test-iostream-temp.c + +2016-05-16 13:21:57 +0300 Timo Sirainen (f6d5c9fbd) -M src/lib-fs/fs-randomfail.c + Removed buffer_reset(). -2016-06-06 02:26:09 +0300 Timo Sirainen (507292b59) + It was just a wrapper to buffer_set_used_size() and its comment was a bit + confusing (or obsolete), since it wasn't actually immediately zeroing out + the buffer. - dict: Fixed hang when pipelining multiple commands. +M src/lib-index/mail-cache-lookup.c +M src/lib-index/mail-index-map-read.c +M src/lib-index/mail-index-sync-update.c +M src/lib-mail/istream-header-filter.c +M src/lib/buffer.c +M src/lib/buffer.h +M src/lib/test-pkcs5.c +2016-05-16 13:19:50 +0300 Timo Sirainen (94a6b3df8) -M src/dict/dict-connection.c + lib: Updated buffer_set_used_size() comment and added unit test. -2016-06-06 00:07:53 +0300 Timo Sirainen (be08677cd) - lib-index: Extension record size resizing was still broken. +M src/lib/buffer.h +M src/lib/test-buffer.c - Fixes assert-crash: Panic: file mail-index-util.c: line 143 - (mail_index_seq_array_add): assertion failed: (array->arr.element_size == - sizeof(seq) + aligned_record_size) +2016-05-16 21:03:35 +0300 Timo Sirainen (d04f3e064) -M src/lib-index/mail-index-transaction-update.c + global: Simplify code with the new o_stream_send_istream() API -2016-06-05 16:51:12 +0300 Timo Sirainen (ff9e37db1) - lib-mail: Added comment about invalid timezones in message_date_parse() +M src/doveadm/server-connection.c +M src/imap/cmd-urlfetch.c +M src/imap/imap-fetch-body.c +M src/lib-fs/fs-api.c +M src/lib-fs/ostream-metawrap.c +M src/lib-http/http-client-request.c +M src/lib-http/http-server-response.c +M src/lib-http/test-http-payload.c +M src/lib-imap-client/imapc-connection.c +M src/lib/file-copy.c +M src/lib/ostream.c +M src/plugins/mail-filter/istream-ext-filter.c +2016-05-16 20:17:41 +0300 Timo Sirainen (1fb4c7c4c) -M src/lib-mail/message-date.c + lib: istream-sized should log errors with its own name, not parent's name -2016-06-05 16:40:27 +0300 Timo Sirainen (3920a5f31) - director: Fixed error handling when directors support incompatible tags +M src/lib/istream-sized.c - Connection should have been disconnected immediately, not after the next - command that would have produced "Incompatible protocol". +2016-05-16 20:12:40 +0300 Timo Sirainen (0e0fe9bed) -M src/director/director-connection.c + imap: Code cleanup - use istream-sized for GETMETADATA reply -2016-06-05 15:57:48 +0300 Timo Sirainen (df0fe3927) + This avoids doing the same work explicitly. - lib-dcrypt: Fixed error handling in dcrypt_key_id_public() +M src/imap/cmd-getmetadata.c +2016-05-16 20:06:30 +0300 Timo Sirainen (6f187ae85) -M src/lib-dcrypt/dcrypt-openssl.c + global: Use o_stream_nsend_istream() where useful -2016-06-05 15:35:13 +0300 Timo Sirainen (ddc96f79d) + We can skip all of the io error handling and just leave it to + o_stream_nfinish(). - lib-storage: Fixed error handling in list=children checking +M src/doveadm/client-connection-http.c +M src/doveadm/doveadm-fs.c +M src/lib-fs/fs-metawrap.c +M src/lib-lda/mail-send.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/plugins/fs-compress/fs-compress.c +2016-05-16 20:04:38 +0300 Timo Sirainen (b90fb7f78) -M src/lib-storage/list/mailbox-list-iter.c + lib: Added o_stream_nsend_istream() -2016-06-05 15:32:09 +0300 Timo Sirainen (8035f936c) - fts-lucene: Fixed error handling when checking if settings had changed. +M src/lib/ostream.c +M src/lib/ostream.h +2016-05-16 19:48:41 +0300 Timo Sirainen (6adf68365) -M src/plugins/fts-lucene/fts-backend-lucene.c + lib: Simplified and clarified o_stream_send_istream() API -2016-06-05 15:31:20 +0300 Timo Sirainen (e6447acb9) - mailbox-alias plugin: Fixed error handling +M src/lib-fs/ostream-metawrap.c +M src/lib/iostream-temp.c +M src/lib/ostream-file.c +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h +2016-05-16 19:33:40 +0300 Timo Sirainen (8b2cf1c1b) -M src/plugins/mailbox-alias/mailbox-alias-plugin.c + lib: Added ostream.blocking boolean -2016-06-05 15:26:11 +0300 Timo Sirainen (39918071d) + Similar to istream.blocking. - lib-storage: Search args equalness checks didn't compare keywords correctly. +M src/lib/ostream-buffer.c +M src/lib/ostream-file.c +M src/lib/ostream-null.c +M src/lib/ostream.c +M src/lib/ostream.h - This may have broken the search in some situations. +2016-05-16 19:26:26 +0300 Timo Sirainen (9de176ef7) -M src/lib-storage/mail-search.c + lib: Don't silently ignore partial writes for o_stream_nsend() -2016-06-05 15:23:45 +0300 Timo Sirainen (c1e4cd378) + Normally o_stream_nsend() should be used only for blocking streams or + streams with infinite (or "enough") buffer space. - mbox: Fixed expunging first mail with CRLF linefeeds. +M src/lib/ostream-private.h +M src/lib/ostream.c +M src/lib/ostream.h +2016-05-16 19:16:55 +0300 Timo Sirainen (61d89b0ca) -M src/lib-storage/index/mbox/mbox-sync-rewrite.c + lmtp: Fixed error logging when writing to temp file -2016-06-05 15:18:04 +0300 Timo Sirainen (6c65c2f0d) - mdbox: Fix want_altpath flags/boolean mixup +M src/lmtp/commands.c - There was only a single flag, so this wasn't actually currently broken. +2016-05-16 16:58:44 +0300 Timo Sirainen (f988b93c2) -M src/lib-storage/index/dbox-multi/mdbox-map.c + lib: Removed ostream.last_failed_errno -2016-06-05 15:11:56 +0300 Timo Sirainen (9cc085fa1) + It's been identical to ostream.stream_errno for a while now. - auth: Fixed error handling in passdb/userdb dict config parsing +M src/lib-index/mail-index-strmap.c +M src/lib-storage/index/index-attachment.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib/ostream.c +M src/lib/ostream.h +2016-05-16 16:55:34 +0300 Timo Sirainen (08ab0b21d) -M src/auth/db-dict.c + lib-compression: Changed impossible errors to asserts. -2016-06-05 14:54:05 +0300 Timo Sirainen (25349a4d8) + o_stream_flush() no longer calls the stream's flush() if stream has failed. - director: Fixed ignoring an obsolete up/down change while host is desynced. +M src/lib-compression/ostream-bzlib.c +M src/lib-compression/ostream-lzma.c +M src/lib-compression/ostream-zlib.c +2016-05-16 16:27:53 +0300 Timo Sirainen (2fb246462) -M src/director/director-connection.c + lib: istream-file: Code cleanup -2016-06-05 04:29:00 +0300 Timo Sirainen (9f8c464a8) + No functional changes - lib-dcrypt: Fixed function return type. +M src/lib/ostream-file.c +2016-05-16 16:09:52 +0300 Timo Sirainen (f339a8e73) -M src/lib-dcrypt/dcrypt-openssl.c + global: Don't assume o_stream_send_istream() return bytes sent. -2016-06-04 03:47:37 +0300 Timo Sirainen (3a398ecbc) + This won't be true soon after its API changes. - lazy-expunge: Fixed crash on error handling +M src/imap/cmd-getmetadata.c +M src/imap/imap-fetch-body.c +M src/imap/imap-fetch.c +M src/imap/imap-fetch.h +M src/lib-fs/fs-api.c +M src/lib-http/test-http-payload.c +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/mbox/mbox-sync-rewrite.c +M src/lib/file-copy.c +2016-05-16 15:49:08 +0300 Timo Sirainen (0f3d4fbcf) -M src/plugins/lazy-expunge/lazy-expunge-plugin.c + global: Use [io]_stream_get_error() insted of %m -2016-06-03 20:14:01 +0300 Timo Sirainen (dab6a443b) - lib-index: Fix duplicate fields in mail_cache_register_fields() +M src/auth/mech-winbind.c +M src/auth/userdb-passwd-file.c +M src/director/director-connection.c +M src/doveadm/doveadm-director.c +M src/doveadm/doveadm-penalty.c +M src/doveadm/doveadm-replicator.c +M src/doveadm/doveadm-stats.c +M src/doveadm/doveadm-who.c +M src/doveadm/doveadm-zlib.c +M src/lib-auth/auth-master.c +M src/lib-auth/auth-server-connection.c +M src/lib-http/http-server-response.c +M src/lib-index/mail-index-strmap.c +M src/lib-lda/duplicate.c +M src/lib-lda/lmtp-client.c +M src/lib-lda/smtp-client.c +M src/lib-master/anvil-client.c +M src/lib-master/master-instance.c +M src/lib-master/master-service-settings.c +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/index-attachment.c +M src/lib-storage/index/maildir/maildir-save.c +M src/lib-storage/index/maildir/maildir-uidlist.c +M src/lib/json-parser.c +M src/plugins/acl/acl-backend-vfile-acllist.c +M src/plugins/acl/acl-backend-vfile-update.c +M src/plugins/acl/acl-backend-vfile.c +M src/plugins/fts-squat/squat-trie.c +M src/plugins/fts-squat/squat-uidlist.c +M src/plugins/fts/fts-expunge-log.c - Broken by hash_table_insert() API change. The earlier code was also a bit - wrong by allocating a bit too much memory when there were duplicate fields - being registered. +2016-05-16 15:34:49 +0300 Timo Sirainen (43cc94434) -M src/lib-index/mail-cache-fields.c + global: Code cleanup - remove unnecessary errno changes. -2016-06-03 20:10:02 +0300 Timo Sirainen (a62105e9e) + These were left behind from changing %m to [io]_stream_get_error() - lib-index: Fixed extension resizing +M src/doveadm/dsync/dsync-mailbox-import.c +M src/imap/cmd-append.c +M src/imap/cmd-urlfetch.c +M src/lib-http/http-client-request.c +M src/lib-imap-storage/imap-msgpart.c +M src/lib-storage/index/index-mail-binary.c - Broken by 8483af4ff. +2016-05-16 15:22:11 +0300 Timo Sirainen (8acb8deef) -M src/lib-index/mail-index-sync-ext.c + dbox: iostream error logging improvements. -2016-06-03 20:00:14 +0300 Timo Sirainen (8c8d70670) - lib-index: Added header-size asserts +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/index/dbox-common/dbox-save.c +2016-05-16 21:53:00 +0300 Timo Sirainen (651f981ca) -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-keywords.c -M src/lib-index/mail-index-sync-update.c + global: Replaced all i_stream_read_data() with _more() and _bytes() -2016-06-03 19:58:29 +0300 Timo Sirainen (8faaab535) - lib-index: Fixed fsck handling extension with invalid header size +M src/imap-hibernate/imap-client.c +M src/lib-compression/compression.c +M src/lib-compression/istream-zlib.c +M src/lib-http/http-request-parser.c +M src/lib-http/http-response-parser.c +M src/lib-http/test-http-payload.c +M src/lib-mail/message-header-parser.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-size.c +M src/lib-storage/index/mbox/istream-raw-mbox.c +M src/login-common/login-proxy.c - Fixes: +2016-05-16 21:51:56 +0300 Timo Sirainen (d868a0463) - Panic: file mail-index-sync-ext.c: line 393 (mail_index_sync_ext_init_new): - assertion failed: (hdr_buf->used == map->hdr.header_size) + global: Fixed slighty wrong i_stream_read_data() with _read_bytes() -M src/lib-index/mail-index-fsck.c + These calls were reading one byte more than they were intended to read. This + didn't really cause any problems, but now they're correct. + +M src/lda/main.c +M src/lib-compression/istream-lz4.c +M src/lib-lda/duplicate.c +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/plugins/fts/fts-expunge-log.c + +2016-05-18 09:33:15 +0300 Aki Tuomi (4b5a2e923) -2016-06-03 19:20:35 +0300 Timo Sirainen (4313f95c6) + doveadm-mailbox-delete: Restore recursive parameter - lib-storage: Detect duplicate mailbox GUIDs in guid-cache. - Also fixes assert-crashing in hash_table_insert() when it happens. +M src/doveadm/doveadm-mail-mailbox.c -M src/lib-storage/mailbox-guid-cache.c +2016-05-18 09:29:04 +0300 Aki Tuomi (c7fd0af4f) -2016-06-03 19:18:43 +0300 Timo Sirainen (e2ec3d69d) + dict: Fix crash when no dictionaries defined - maildir: Detect duplicate keywords in dovecot-keywords file - Use the first such keyword's index, not the last. +M src/dict/dict-connection.c - Also fixes assert-crashing in hash_table_insert() when it happens. +2016-05-17 00:00:43 +0300 Timo Sirainen (5ceeb24b0) -M src/lib-storage/index/maildir/maildir-keywords.c + imap: Include sync timing information in tagged command replies. Show it + only when it's larger than 0 to avoid unnecessary output. -2016-06-03 19:17:03 +0300 Timo Sirainen (ec2ee6f35) - maildir: Avoid extra memory usage on duplicate uidlist entries +M src/imap/imap-client.c +M src/imap/imap-client.h +M src/imap/imap-sync.c - Also fixes assert-crashing in hash_table_insert() when it happens. +2016-05-17 23:51:43 +0300 Aki Tuomi (5f7f5baf6) -M src/lib-storage/index/maildir/maildir-uidlist.c + doveadm-mail-mailbox: Whitespace fix -2016-06-03 17:54:36 +0300 Timo Sirainen (e6696669b) - lib-index: Allow growing ext record_size after mail_index_update_ext() +M src/doveadm/doveadm-mail-mailbox.c - The existing records will just get some zero-padding at the end of records. +2016-05-17 23:31:29 +0300 Aki Tuomi (c220c8cd3) -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/mail-index-util.c -M src/lib-index/mail-index-util.h + doveadm-mailbox: Add update subcommand -2016-06-03 17:52:39 +0300 Timo Sirainen (f2c6d9c53) - lib-index: Fixed changing extension record sizes. +M src/doveadm/doveadm-mail-mailbox.c +M src/doveadm/doveadm-mail.c +M src/doveadm/doveadm-mail.h - map needs to be cloned before any extension record size changes are done. - Otherwise the map cloning will crash or do something broken. +2016-05-15 14:53:24 +0300 Timo Sirainen (44ef49403) -M src/lib-index/mail-index-sync-ext.c + lib-mail: Fixed istream-header-filter callback's matched with eoh -2016-06-03 17:40:11 +0300 Timo Sirainen (47cbd0ff7) + Reversed the matched-parameter handling for hdr->eoh, so it's consistent + with non-eoh headers. - lib-index: Minor code cleanup - use better variable names +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +2016-05-12 17:45:34 -0400 Timo Sirainen (2a444bfed) -M src/lib-index/mail-index-sync-ext.c + lib-ldap: Fixed assert-crash when killing LDAP connection. -2016-05-18 14:42:21 +0300 Baofeng Wang (fd3cdfde3) + libldap may have already closed the fd, so with epoll io_remove() would try + to remove it and crash with: - lib-storage: add no_fts in struct mail_search_arg + Panic: epoll_ctl(del, 12) failed: Bad file descriptor - When flag is set, FTS will not be performed. +M src/lib-ldap/ldap-connection.c - fts plugin: handle no_fts flag +2016-05-16 18:43:52 +0200 Stephan Bosch (d3b0b5d23) - No fts will be performed once flag is set. Original patch from Timo Sirainen - + uri-util: Changed URI host/authority parsing API to not use a boolean. -M src/lib-storage/mail-search.h -M src/plugins/fts-lucene/lucene-wrapper.cc -M src/plugins/fts-solr/fts-backend-solr-old.c -M src/plugins/fts-solr/fts-backend-solr.c -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-storage.c + The boolean indicated whether the basic reg-name syntax or the more limited + Internet host name syntax was to be expected. This change creates separate + functions for this. -2016-05-30 19:07:16 +0300 Timo Sirainen (8e0728383) +M src/lib-http/http-url.c +M src/lib-imap/imap-url.c +M src/lib/uri-util.c +M src/lib/uri-util.h - virtual: Moved virtual_mailbox_vfuncs to lib-storage. +2016-05-16 18:21:30 +0200 Stephan Bosch (14383bf2b) - This allows implementing other virtual storage backends. + uri-util: Two ATTR_NULL specifications were misplaced or wrong. -M src/lib-storage/mail-storage-private.h -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-search.c -M src/plugins/fts/fts-storage.c -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-storage.h -2016-06-01 12:37:22 +0300 Timo Sirainen (5c44d0956) +M src/lib/uri-util.c - master: Give a nicer error if unix/fifo_listener path is empty. +2016-05-16 18:19:24 +0200 Stephan Bosch (f95afa9df) - The previous error was simply: + uri-util: The uri_parse_host_name_dns() would segfault if the hostname_r + parameter was NULL. - unlink(/var/run/dovecot/) failed: Is a directory -M src/master/master-settings.c +M src/lib/uri-util.c -2016-06-02 16:06:08 +0300 Timo Sirainen (406b8be33) +2016-02-08 19:30:39 +0200 Phil Carmody (918498318) - dict-sql: Improve error message for invalid value fields. + lib: istream - migrate more to i_stream_read_more() - It'll now show which map's pattern matched, making it easier to find from - the config file. + More coccinelle semantic patching, again hand-checked. -M src/lib-dict/dict-sql.c + git grep 'i_stream_read_data' | sed s/:.*// | \ + while read f; do spatch --sp-file istream0.cocci --in-place "$f" ; done -2016-05-23 17:47:50 +0300 Timo Sirainen (789f321c2) + -- 8< --- istream0.cocci --- + @@ expression e1, e2, e3; + @@ - auth: Support %variable expansion for LDAP field names. + - i_stream_read_data(e1, e2, e3, 0) + + i_stream_read_more(e1, e2, e3) + -- 8< --- end - For example this is now allowed: + Signed-off-by: Phil Carmody - user_attrs = \ - =namespace/%{ldap:enabledNamespace}/enabled=yes \ - ... +M src/doveadm/dsync/dsync-ibc-stream.c +M src/lib-compression/istream-lz4.c +M src/lib-http/http-header-parser.c +M src/lib-http/http-transfer-chunked.c +M src/lib-lda/lmtp-client.c -M src/auth/db-ldap.c +2016-02-08 19:26:20 +0200 Phil Carmody (573424407) -2016-05-18 21:41:49 +0300 Timo Sirainen (169c8862c) + lib: istream - more migration to i_stream_read_bytes() - lib-imap-storage: Don't sort uninitialized array on invalid header list. + This time a coccinelle semantic patch, again hand checked: + git grep 'i_stream_read_data' | sed s/:.*// | \ + while read f; do spatch --sp-file istream.cocci --in-place "$f" ; done -M src/lib-imap-storage/imap-msgpart.c + -- 8< --- istream.cocci --- + @@ expression e1, e2, e3, e4; + @@ -2016-05-18 14:24:55 +0300 Timo Sirainen (7283d40b1) + - i_stream_read_data(e1, e2, e3, e4 - 1) + + i_stream_read_bytes(e1, e2, e3, e4) - lib-imap-storage: Minor error logging cleanup/fix. + -- 8< --- end - We read from input, not from mail_input. In theory it could have the actual - error instead of mail_input (although right now it couldn't). + Signed-off-by: Phil Carmody -M src/lib-imap-storage/imap-msgpart.c +M src/lib-compression/compression.c +M src/lib-compression/istream-lz4.c +M src/lib-compression/istream-zlib.c +M src/lib-fs/fs-api.c +M src/lib-index/mail-index-strmap.c +M src/lib-lda/duplicate.c +M src/lib-storage/index/dbox-common/dbox-file.c +M src/lib/istream.h +M src/lib/ostream-file.c +M src/plugins/fts/fts-expunge-log.c -2016-05-18 18:41:33 +0300 Timo Sirainen (3a349ae34) +2016-02-08 18:55:32 +0200 Phil Carmody (534e41e43) - lib: ostream-escaped: Fixed setting offset + lib: istream - migrate to i_stream_read_bytes() + Scripted to pick off the low hanging fruit, one liners with an explicit + '-1' in the final parameter, but hand-checked. -M src/lib/ostream-escaped.c -M src/lib/test-ostream-escaped.c + git grep 'i_stream_read_data.*, [^,]*- \?1)' | sed s/:.*// | \ + xargs sed -i -e 's/i_stream_read_data(\(.*\), \(.*\), \(.*\), \(.*[^ ]\) + \?- \?1)/i_stream_read_bytes(\1, \2, \3, \4)/' -2016-05-16 19:16:55 +0300 Timo Sirainen (9aaf79f7c) + Signed-off-by: Phil Carmody - lmtp: Fixed error logging when writing to temp file +M src/doveadm/doveadm-dump-dbox.c +M src/lib-compression/compression.c +M src/lib-fs/ostream-cmp.c +M src/lib-index/mail-index-strmap.c +M src/lib-storage/index/dbox-common/dbox-file-fix.c +M src/lib-storage/list/subscription-file.c +M src/lib/istream.h +2016-02-08 18:43:32 +0200 Phil Carmody (3858a7a5d) -M src/lmtp/commands.c + lib: istream - migrate to i_stream_read_more() -2016-05-16 15:49:08 +0300 Timo Sirainen (44069b065) + Scripted to find all the low-hanging-fruit (single line calls), but + hand-checked: - global: Use [io]_stream_get_error() insted of %m + git grep i_stream_read_data.*,\ 0\) | sed s/:.*// | \ + xargs sed -i -e 's/i_stream_read_data(\(.*\), \(.*\), \(.*\), + 0)/i_stream_read_more(\1, \2, \3)/' + Signed-off-by: Phil Carmody -M src/auth/mech-winbind.c -M src/auth/userdb-passwd-file.c -M src/director/director-connection.c -M src/doveadm/doveadm-director.c -M src/doveadm/doveadm-penalty.c -M src/doveadm/doveadm-replicator.c -M src/doveadm/doveadm-stats.c -M src/doveadm/doveadm-who.c +M src/director/director-test.c +M src/doveadm/doveadm-fs.c +M src/doveadm/doveadm-print.c M src/doveadm/doveadm-zlib.c -M src/lib-auth/auth-master.c -M src/lib-auth/auth-server-connection.c -M src/lib-http/http-server-response.c -M src/lib-index/mail-index-strmap.c -M src/lib-lda/duplicate.c -M src/lib-lda/lmtp-client.c -M src/lib-lda/smtp-client.c -M src/lib-master/anvil-client.c -M src/lib-master/master-instance.c -M src/lib-master/master-service-settings.c -M src/lib-storage/index/cydir/cydir-save.c -M src/lib-storage/index/dbox-multi/mdbox-purge.c -M src/lib-storage/index/dbox-single/sdbox-file.c -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/index-attachment.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/maildir/maildir-uidlist.c -M src/lib/json-parser.c -M src/plugins/acl/acl-backend-vfile-acllist.c -M src/plugins/acl/acl-backend-vfile-update.c -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-uidlist.c -M src/plugins/fts/fts-expunge-log.c - -2016-05-10 20:37:55 +0200 Stephan Bosch (b1254dfe4) +M src/doveadm/dsync/dsync-mail.c +M src/doveadm/dsync/dsync-mailbox-import.c +M src/imap-urlauth/imap-urlauth-worker.c +M src/imap/cmd-setmetadata.c +M src/lda/main.c +M src/lib-compression/istream-bzlib.c +M src/lib-compression/istream-lzma.c +M src/lib-compression/istream-zlib.c +M src/lib-compression/test-compression.c +M src/lib-dict-extra/dict-fs.c +M src/lib-fs/fs-api.c +M src/lib-http/http-message-parser.c +M src/lib-http/test-http-client.c +M src/lib-http/test-http-transfer.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-qp-decoder.c +M src/lib-mail/message-size.c +M src/lib-mail/test-istream-attachment.c +M src/lib-mail/test-istream-binary-converter.c +M src/lib-mail/test-istream-qp-decoder.c +M src/lib-ssl-iostream/iostream-openssl.c +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/index-mail-binary.c +M src/lib-storage/index/mbox/istream-raw-mbox.c +M src/lib-storage/mailbox-attribute.c +M src/lib/ostream.c +M src/lib/test-istream-unix.c +M src/login-common/client-common-auth.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts/fts-parser-tika.c +M src/plugins/mail-filter/ostream-ext-filter.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/pop3/pop3-commands.c - Added LIBDOVECOT_SQL_INCLUDE to dovecot-config and dovecot.m4. +2016-02-08 18:32:10 +0200 Phil Carmody (09142ea11) + lib: istream - provide alternatives to i_stream_read_data() -M dovecot-config.in.in -M dovecot.m4 + Providing as a parameter the number of bytes that you would be disappointed + to receive was confusing compared to providing the number that you would be + happy to receive. This lets us get rid of all the '-1's in the callers. The + callers which used 0 as a parameter were so common that it's worth providing + a separate API just to simplify their demands. -2016-05-11 05:19:14 -0400 Timo Sirainen (804a5518b) + Deep down, these are still the same underlying function. Currently we route + the new API through the old one, but eventually, the old API can be routed + through the new one, so that the friendlier interface has the simplest + implementation. - dsync: Fixed potential crash + Signed-off-by: Phil Carmody - This seems to be possible with dsync_mailbox_find_common_expunged_uid() -> - dsync_mailbox_common_uid_found() -> dsync_mailbox_rewind_search() -> - following search doesn't find anything. +M src/lib/istream.h -M src/doveadm/dsync/dsync-mailbox-import.c +2016-05-15 00:22:12 +0200 Stephan Bosch (9aa483ebc) -2016-05-03 19:42:08 +0300 Timo Sirainen (3def3a7f6) + uri-util: Added documentation for all functions in header. - doveadm fetch: Translate commas to spaces in body|binary.
with - This way we can do e.g.: +M src/lib/uri-util.h - doveadm fetch 'uid body.header.fields(from,to,subject)' ... +2016-05-08 23:44:42 +0200 Stephan Bosch (4e52bade0) - Although in theory we could also change the parser to allow spaces as long - as they're inside (..), but this is probably too much extra effort. + uri-util: Made URI encoding functions accept NULL pointer for additional + escaped characters. -M src/doveadm/doveadm-mail-fetch.c -2016-05-03 19:39:44 +0300 Timo Sirainen (48713ea8a) +M src/lib/uri-util.c +M src/lib/uri-util.h - lib-imap-storage: Allow HEADER.FIELDS(..) without space before '(' +2016-05-08 23:40:38 +0200 Stephan Bosch (e4e9ba5f4) - This is to allow doveadm fetch to use it. Attempting to do this without a - space in IMAP already fails elsewhere: + uri-util: Made uri_data_encode() public. - x fetch 1 body.peek[header.fields(from to)] x BAD Error in IMAP command - FETCH: Invalid characters in atom -M src/lib-imap-storage/imap-msgpart.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-05-03 14:58:37 +0300 Timo Sirainen (334702e6d) +2016-05-08 23:30:05 +0200 Stephan Bosch (af53c056c) - doveadm fetch: Fixed logging errors for istream failures + uri-util: Improved implementation of uri_data_encode(). -M src/doveadm/doveadm-mail-fetch.c +M src/lib/uri-util.c -2016-05-03 14:54:28 +0300 Timo Sirainen (7ec76ff54) +2016-05-08 23:12:07 +0200 Stephan Bosch (b4167b174) - doveadm fetch: Added body.
and binary.
fields + uri-util: Reworked URI scheme parsing. - These correspond to IMAP BODY[
]. + Made uri_cut_scheme() use uri_parse_scheme() internally rather than the + other way around. -M src/doveadm/Makefile.am -M src/doveadm/doveadm-mail-fetch.c +M src/lib-http/http-url.c +M src/lib-imap/imap-url.c +M src/lib/uri-util.c -2016-04-20 14:33:57 +0300 Martti Rannanjärvi (2812b0ea5) +2016-05-08 23:09:33 +0200 Stephan Bosch (66134fbce) - doveadm: error to print formatted without format + lib-imap: Started using struct uri_host in struct imap_url. - This changes the segfault of `doveadm -f formatted ...` to an error. -M src/doveadm/doveadm-print-formatted.c +M src/imap-login/client-authenticate.c +M src/lib-imap-urlauth/imap-urlauth.c +M src/lib-imap/imap-url.c +M src/lib-imap/imap-url.h +M src/lib-imap/test-imap-url.c -2016-04-30 14:22:21 +0200 Stephan Bosch (273ed7a13) +2016-05-08 23:08:00 +0200 Stephan Bosch (f74dbd3ff) - lib-http: server: Fixed assert failure occurring when closing the connection - while a request payload was still being read. + lib-http: Started using struct uri_host in struct http_url. -M src/lib-http/http-server-connection.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-request.c +M src/lib-http/http-url.c +M src/lib-http/http-url.h +M src/lib-http/test-http-client.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-url.c +M src/plugins/fts-solr/solr-connection.c +M src/plugins/fts/fts-parser-tika.c -2016-04-30 15:26:27 +0300 Timo Sirainen (5c33861d5) +2016-05-08 23:06:23 +0200 Stephan Bosch (8d2d2780c) - .gitignore: Added *~ + uri-util: Split struct uri_host from uri_authority. + Adds support for parsing host separately and manipulating host struct. -M .gitignore +M src/lib-http/http-url.c +M src/lib-imap/imap-url.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-04-26 19:26:34 +0300 Aki Tuomi (0fbf2c934) +2016-05-08 23:03:38 +0200 Stephan Bosch (62ed3307f) - doveadm-server: Handle istream send error. + uri-util: Added complete syntax comment. -M src/doveadm/client-connection-http.c +M src/lib/uri-util.c -2016-04-29 21:36:31 +0300 Teemu Huovila (a5658a114) +2016-05-09 00:31:43 +0200 Stephan Bosch (a643e1e3e) - lib-dict-extra: Avoid out of scope data stack usage. + uri-util: Added support for initializing the URI parser from data. -M src/lib-dict-extra/dict-ldap.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-04-20 17:34:53 +0300 Aki Tuomi (71e834420) +2016-05-09 00:30:14 +0200 Stephan Bosch (b7e953d7e) - lib: Add PKCS#5 pbkdf1 and 2 + uri-util: Parsing of unreserved syntax erroneously included percent + encoding. + This functionality is currently not used, so no problems would occur. -M src/lib/Makefile.am -A src/lib/pkcs5.c -A src/lib/pkcs5.h -M src/lib/test-lib.c -M src/lib/test-lib.h -A src/lib/test-pkcs5.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-04-27 09:14:29 +0300 Aki Tuomi (b89dd50a2) +2016-05-08 22:59:09 +0200 Stephan Bosch (b0dfc8fc0) - auth: Add PBKDF2 password scheme + uri-util: Implemented proper parsing of DNS-based host name for URI schemes + that use DNS host names, such as http and imap. -M src/auth/Makefile.am -A src/auth/password-scheme-pbkdf2.c -M src/auth/password-scheme.c -M src/auth/password-scheme.h +M src/lib-http/http-url.c +M src/lib-http/test-http-url.c +M src/lib-imap/imap-url.c +M src/lib-imap/test-imap-url.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-06-01 12:24:57 +0300 Teemu Huovila (f6e14400c) +2016-05-08 22:56:59 +0200 Stephan Bosch (32f28ff76) - lib-fts: Improved stopword file reading. + uri-util: Added public function for parsing single percent encoding + instances. - The reading tries to be a little bit stricter now. Only stopwords at the - start of a new line are accepted now. Changed fi stopwords accordingly. Also - removed superfluous stack allocation in parsing. -M src/lib-fts/Makefile.am -M src/lib-fts/fts-filter-stopwords.c -M src/lib-fts/stopwords/stopwords_fi.txt -A src/lib-fts/stopwords/stopwords_malformed.txt -M src/lib-fts/test-fts-filter.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-05-30 12:40:00 +0300 Teemu Huovila (77c9af343) +2016-05-08 22:55:25 +0200 Stephan Bosch (f883bf3ef) - lib-fts: Add stopword files for more languages. + uri-util: Removed have_port and have_host_ip flags. + Presence of port can be tested with port != 0. Presence of IP can be tested + with ip->family != 0. -M src/lib-fts/Makefile.am -A src/lib-fts/stopwords/stopwords_da.txt -A src/lib-fts/stopwords/stopwords_de.txt -A src/lib-fts/stopwords/stopwords_es.txt -A src/lib-fts/stopwords/stopwords_it.txt -A src/lib-fts/stopwords/stopwords_nl.txt -A src/lib-fts/stopwords/stopwords_pt.txt -A src/lib-fts/stopwords/stopwords_ro.txt -A src/lib-fts/stopwords/stopwords_ru.txt +M src/imap-login/client-authenticate.c +M src/lib-http/http-client-host.c +M src/lib-http/http-client-request.c +M src/lib-http/http-url.c +M src/lib-http/http-url.h +M src/lib-http/test-http-client.c +M src/lib-http/test-http-request-parser.c +M src/lib-http/test-http-url.c +M src/lib-imap-urlauth/imap-urlauth.c +M src/lib-imap/imap-url.c +M src/lib-imap/imap-url.h +M src/lib-imap/test-imap-url.c +M src/lib/uri-util.c +M src/lib/uri-util.h -2016-05-30 11:54:26 +0300 Teemu Huovila (c7021f420) +2016-05-15 17:25:17 +0300 Aki Tuomi (0edb839b5) - lib-fts: Move stopwords to subdirectory. + lib-ldap: Do not create new context and lose settings - All files incluided in dist are explicitly mentioned. The whole subdirectory - 'stopwords' could also be distributed, but that is more error prone. -M src/lib-fts/Makefile.am -R100 src/lib-fts/stopwords_en.txt src/lib-fts/stopwords/stopwords_en.txt -R100 src/lib-fts/stopwords_fi.txt src/lib-fts/stopwords/stopwords_fi.txt -R100 src/lib-fts/stopwords_fr.txt src/lib-fts/stopwords/stopwords_fr.txt -R100 src/lib-fts/stopwords_no.txt src/lib-fts/stopwords/stopwords_no.txt -R100 src/lib-fts/stopwords_sv.txt src/lib-fts/stopwords/stopwords_sv.txt +M src/lib-ldap/ldap-connection.c -2016-06-02 00:52:37 +0300 Timo Sirainen (8b895d07d) +2016-05-14 22:49:53 +0200 Stephan Bosch (a29f6be09) - dict: Pipelined iteration replies may have been hanging. + lib-mail: istream-qp-decoder: For efficiency, avoid copying data between + decode buffer and stream buffer. - For example: - - lookup start - - iterate start - - iterate finished, but can't reply yet - - lookup finished - - iterate reply can be sent now, but wasn't previously + Instead, use the decode buffer directly as stream buffer. -M src/dict/dict-commands.c +M src/lib-mail/istream-qp-decoder.c -2016-06-02 00:51:26 +0300 Timo Sirainen (72f0027d9) +2016-05-15 01:17:18 +0300 Timo Sirainen (ec9ed7c72) - dict: Fixed crash when reaching max (5) pending commands. + lib-ldap: Compiling fix - don't pass through void return -M src/dict/dict-connection.c +M src/lib-ldap/ldap-client.c -2016-06-01 18:11:29 +0300 Timo Sirainen (f67f6de07) +2016-05-13 14:22:40 -0400 Timo Sirainen (47d439878) - global: Use i_stream_get_max_buffer_size() wherever possible + imap: Set command start timestamps earlier. - After 7be8ba0c0 it's no longer correct to access stream->max_buffer_size - directly. These changes fix using istream-chain with various wrapper - streams. + Previously timing statistics in taglines weren't shown commands that didn't + read any parameters. -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c -M src/lib-fs/istream-fs-file.c -M src/lib-mail/istream-attachment-extractor.c -M src/lib-mail/istream-binary-converter.c -M src/lib-mail/istream-header-filter.c -M src/lib-mail/istream-qp-decoder.c -M src/lib-ssl-iostream/istream-openssl.c -M src/lib-test/test-common.c -M src/lib/istream-concat.c -M src/lib/istream.c + Also the timings now include the time speng reading command parameters from + client. For example: -2016-06-01 18:09:48 +0300 Timo Sirainen (41a18c16c) + a list "" {1} + + OK + % + * LIST (\HasNoChildren) "/" INBOX a OK List completed (0.001 + 1.214 secs). - lib: i_stream_get_max_buffer_size() checks also parents' max sizes +M src/imap/imap-client.c - This fixes i_stream_get_max_buffer_size() to work correctly with - istream-chain. +2016-05-13 13:35:50 -0400 Timo Sirainen (31fc5ca96) -M src/lib/istream.c -M src/lib/istream.h + lib: Fixed istream_seekable.stat() to return correct size. -2016-06-01 18:03:58 +0300 Timo Sirainen (51dcb33a3) + It was supposed to read until end of the stream, but it did it only when + stat() was called while stream was still fully in memory. - lib: istream-chain didn't update its max_buffer_size +M src/lib/istream-seekable.c - I had this code at some point earlier, but looks like it got lost from the - final commit. +2016-05-13 09:56:08 -0400 Timo Sirainen (ed47ce764) -M src/lib/istream-chain.c + lib-fs: Make sure fs-metawrap catches all write errors. -2016-06-01 17:52:23 +0300 Timo Sirainen (6bd205f9a) + The full istream may not have been written in case ostream only partially + wrote the data (e.g. out of disk space?) - lib-compression: istream.max_buffer_size == 0 isn't unlimited. +M src/lib-fs/fs-metawrap.c +2016-05-13 09:48:13 -0400 Timo Sirainen (da653f208) -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c + lib-fs: If fs-metawrap sees truncated header, it should return error. -2016-06-01 17:18:23 +0300 Timo Sirainen (3ffc655f0) - fs-metawrap: Removed unnecessary code. +M src/lib-fs/istream-metawrap.c - As mentioned in a0cf7d392, this can't happen. +2016-05-13 09:23:52 -0400 Timo Sirainen (6eb019208) -M src/lib-fs/fs-metawrap.c + lib: Fixed potential crash in i_stream_stat() failures. -2016-06-01 17:12:51 +0300 Timo Sirainen (1d29d49c7) + We shouldn't have been copying parent's stream_errno here. Especially + because the parent can be NULL. - lib-fs: Improved unit tests. +M src/lib/istream.c +2016-05-13 13:10:04 +0300 Aki Tuomi (75a7ba70c) -M src/lib-fs/Makefile.am -A src/lib-fs/fs-test-async.c -M src/lib-fs/fs-test.c -M src/lib-fs/fs-test.h -M src/lib-fs/test-fs-metawrap.c + dict: Set default transaction commit callback -2016-06-01 17:12:10 +0300 Timo Sirainen (f412ee7c6) + Removes need for NULL check on drivers - fs-metawrap: Removed unnecessary code. +M src/lib-dict/dict.c - The caller already set success==FALSE if ostream was closed. +2016-05-10 17:09:02 -0400 Timo Sirainen (25761530d) -M src/lib-fs/fs-metawrap.c + lib-storage: Fixed istream error handling while saving mails. -2016-06-01 17:11:53 +0300 Timo Sirainen (90ec94c78) + We might have logged them as write errors, or we might have ignored the + error if i_stream_read() failed. Now the behavior is consistent. - lib-fs: Added more asserts +M src/lib-storage/index/index-storage.c +2016-05-10 17:06:54 -0400 Timo Sirainen (c68f28e2c) -M src/lib-fs/fs-api.c + lib-storage: Moved common code to index_storage_save_continue() -2016-06-01 17:06:28 +0300 Timo Sirainen (d01057485) - lib-fs: Clarified fs_write_stream_abort() API and dropped its _async(). +M src/lib-storage/index/cydir/cydir-save.c +M src/lib-storage/index/dbox-common/dbox-save.c +M src/lib-storage/index/imapc/imapc-save.c +M src/lib-storage/index/index-storage.c +M src/lib-storage/index/index-storage.h +M src/lib-storage/index/maildir/maildir-save.c - We can't handle an abort after an async fs_write_stream_finish() is already - going. +2016-05-10 20:37:55 +0200 Stephan Bosch (7c91b85fa) -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h + Added LIBDOVECOT_SQL_INCLUDE to dovecot-config and dovecot.m4. -2016-06-01 15:15:19 +0300 Timo Sirainen (5f4111f3c) - lib-fs: Added fs_write_stream_abort_async() +M dovecot-config.in.in +M m4/dovecot.m4 +2016-05-09 11:08:33 +0300 Martti Rannanjärvi (2da53a58a) -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h + lib: remove failed bool from sized_istream struct -2016-05-14 22:49:53 +0200 Stephan Bosch (a69f79313) + This is no longer needed as we are now checking for stream_errno also in + istream.c - lib-mail: istream-qp-decoder: For efficiency, avoid copying data between - decode buffer and stream buffer. +M src/lib/istream-sized.c - Instead, use the decode buffer directly as stream buffer. +2016-05-10 13:51:29 +0300 Martti Rannanjärvi (a298a43f6) -M src/lib-mail/istream-qp-decoder.c + doc: remove doveadm mount manpages -2016-05-04 18:24:03 +0300 Timo Sirainen (5b6559c3d) - lib: istream's max_buffer_size=0 means 0, not unlimited. +M doc/man/Makefile.am +D doc/man/doveadm-mount.1.in +M doc/man/doveadm.1.in - Make sure we don't grow the buffer size then. +2016-05-12 15:10:47 -0400 Timo Sirainen (c24b4f9c4) -M src/lib/istream.c + lib-fs: Added FS_PROPERTY_FASTCOPY_CHANGED_METADATA -2016-06-01 13:30:22 +0300 Timo Sirainen (3dafbab91) - lib: Fix to previous istream-chain max_buffer_size handling +M src/lib-fs/fs-api.h - We were casting the wrong stream. +2016-05-12 08:09:56 -0400 Timo Sirainen (52ac19fa6) -M src/lib/istream-chain.c + lib-http: Queue's delayed timeout handler wasn't removed after work was + done. -2016-05-31 22:33:32 +0300 Timo Sirainen (9e7b4d660) - fs-metawrap: Fixed buffer size while reading metadata header. +M src/lib-http/http-client-queue.c - It's not enough to have the buffer size set to "large enough" at the time of - the stream creation, because i_stream_set_max_buffer_size() could be called - afterwards. +2016-05-12 07:24:39 -0400 Timo Sirainen (526af6914) -M src/lib-fs/fs-metawrap.c -M src/lib-fs/istream-metawrap.c + lib-fs: Minor code cleanup -2016-05-31 22:19:37 +0300 Timo Sirainen (dc43757ae) - lib: Fixed max_buffer_size handling in istream-chain +M src/lib-fs/fs-api.c - The default max_buffer_size=256 was wrong in all situations. +2016-05-12 07:23:51 -0400 Timo Sirainen (eaac25849) - We're now assuming that the underlying istreams' max_buffer_size is always - correct. While gluing together two streams we're now allocating enough - memory to hold all of the wanted data (instead of assert-crashing as could - have happened earlier). This means that the max memory usage is actually the - two streams' max_buffer_size summed together. Ideally this would be fixed to - limit the max_buffer_size to maximum of the two, but that would require - further changes. + lib-fs: Set fs error on fs_write_stream_abort() -M src/lib/istream-chain.c + Probably would be nice for fs_write_stream_abort() to have an error string + parameter, which could be used instead of this generic error. -2016-06-01 08:43:23 +0300 Aki Tuomi (936f81cf7) +M src/lib-fs/fs-api.c - doveadm: Do not use INT64 with mail cmds yet +2016-05-12 07:23:04 -0400 Timo Sirainen (d4a85e170) + lib-fs: Added asserts to make sure async writes are finished before close -M src/doveadm/doveadm-mail-index.c -M src/doveadm/doveadm-mail-mailbox.c -2016-06-01 02:01:10 +0300 Timo Sirainen (eabf9658a) +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c - lib-dcrypt: Fixed check program dependencies +2016-05-12 07:21:38 -0400 Timo Sirainen (8b8534cc0) + fs-metawrap: Minor code cleanup -M src/lib-dcrypt/Makefile.am + temp_output==NULL, so these calls are equal. -2016-06-01 00:19:41 +0300 Timo Sirainen (4ff22b583) +M src/lib-fs/fs-metawrap.c - lib-dcrypt: Fixed dcrypt_openssl_generate_keypair() +2016-05-12 07:18:49 -0400 Timo Sirainen (5a20b6bb2) + fs-metawrap: Propagate fs_write_stream_abort() to parent always -M src/lib-dcrypt/dcrypt-openssl.c + It needed to be done also when temp_output==NULL, because we had already + started sending it to parent, but async parent wasn't being finished. -2016-05-31 17:16:17 +0300 Timo Sirainen (24a4e2537) +M src/lib-fs/fs-metawrap.c - dict-client: Fixed idle_msecs setting. +2016-05-12 07:15:41 -0400 Timo Sirainen (cc8fdda7b) + fs-randomfail: Set fs error always when injecting failure. -M src/lib-dict/dict-client.c + It was done in some places, but not everywhere. -2016-05-31 17:06:29 +0300 Timo Sirainen (9b1bd5d40) +M src/lib-fs/fs-randomfail.c - lib-fs: Don't duplicate backend name in fs_init() errors. +2016-05-12 05:40:29 -0400 Timo Sirainen (5a6ad44f1) - fs_init() already adds the "backend: " prefix to the error_r, so the callers - shouldn't do it again. + lmtp: Removed (Dovecot) from Received header. -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c + Some people want to hide it, and I don't really see much benefit in + including it anyway. So lets just hide it from everyone. -2016-05-30 22:39:39 +0300 Aki Tuomi (d26c53ce4) +M src/lmtp/commands.c - lib-dcrypt: Use base64 encoded test samples +2016-05-11 16:58:59 -0400 Timo Sirainen (9254a9e94) + dict-sql: Cache reading settings files. -M src/lib-dcrypt/Makefile.am -A src/lib-dcrypt/sample-v1.asc -D src/lib-dcrypt/sample-v1.bin -A src/lib-dcrypt/sample-v2.asc -D src/lib-dcrypt/sample-v2.bin -M src/lib-dcrypt/test-stream.c + The settings were read for every dict init, which was done for every new + dict connection. This was using a lot of CPU. There are usually only a + couple dict-sql settings files, so we cache all of the ones we read. -2016-05-30 22:33:29 +0300 Aki Tuomi (fe60fa9da) +M src/lib-dict/dict-sql-settings.c +M src/lib-dict/dict-sql-settings.h +M src/lib-dict/dict-sql.c - lib-dcrypt: Fix strict type-punning warning +2016-05-11 16:57:33 -0400 Timo Sirainen (300c5b822) + lib-sql: Memory leak fix when freeing sql dbs from cache -M src/lib-dcrypt/dcrypt-openssl.c + Normally happened only at deinit. -2016-05-30 22:30:31 +0300 Aki Tuomi (725110603) +M src/lib-sql/sql-db-cache.c - lib-dcrypt: Fix various OpenSSL API usage issues +2016-05-11 05:19:14 -0400 Timo Sirainen (37312679c) + dsync: Fixed potential crash -M src/lib-dcrypt/dcrypt-openssl.c + This seems to be possible with dsync_mailbox_find_common_expunged_uid() -> + dsync_mailbox_common_uid_found() -> dsync_mailbox_rewind_search() -> + following search doesn't find anything. -2016-05-30 22:05:22 +0300 Aki Tuomi (2c6877f5f) +M src/doveadm/dsync/dsync-mailbox-import.c - lib-dcrypt: Remove duplication of samples +2016-05-10 17:35:43 -0400 Timo Sirainen (0d7325fd1) + lib-ldap: Reverted previous commit for now. -M src/lib-dcrypt/Makefile.am + We don't have libdovecot built at at this stage. But we can't build it + earlier, because it needs lib-dict-extra, which needs lib-ldap. So we have + cyclical dependencies now. -2016-05-30 21:14:53 +0300 Timo Sirainen (619830d4c) +M src/lib-ldap/Makefile.am - lib-dcrypt: Always allow error_r to be NULL. +2016-05-10 17:25:20 -0400 Timo Sirainen (6bff0a08e) - Especially dcrypt_openssl_private_to_public_key() was called with - error_r=NULL by the dcrypt.c itself. + lib-ldap: Add libdovecot dependency to libdovecot-ldap -M src/lib-dcrypt/dcrypt-openssl.c + Required for linking to work on OSX. -2016-05-30 19:38:22 +0300 Timo Sirainen (3dfcebbc1) +M src/lib-ldap/Makefile.am - lib-dcrypt: sample-v2.bin shouldn't be executable +2016-05-10 16:22:23 -0400 Timo Sirainen (948b838c8) + lib: Fixed crash when closing a failed istream-concat -M src/lib-dcrypt/sample-v2.bin + i_stream_concat_seek() could have set cur_input==NULL and we still attempted + to seek the cur_input at close time. -2016-05-30 15:36:17 +0300 Timo Sirainen (a991c2181) +M src/lib/istream-concat.c - lib-dcrypt: Compiler warning fixes +2016-05-10 10:42:33 -0400 Timo Sirainen (04a7e8986) + lib-index: "first saved UID of the day" wasn't updated right always. -M src/lib-dcrypt/dcrypt-openssl.c + It was using the UID of the first append. But it may not have been the + lowest UID. Do this after the appends are first sorted by their UID. -2016-05-27 22:18:17 +0300 Timo Sirainen (69cf950e7) +M src/lib-index/mail-index-transaction-finish.c - doveadm mailbox delete: Added --unsafe option. +2016-05-10 00:42:51 +0200 Stephan Bosch (d9be91cb4) + Added liblzma bug to Valgrind suppressions file. -M src/doveadm/doveadm-mail-mailbox.c + It caused `make test` to fail with valgrind. Occurred at least for Debian + Jessie with liblzma package version 5.1.1alpha+20120614-2+b3. -2016-05-27 22:15:07 +0300 Timo Sirainen (5a5ddc2fb) +M run-test-valgrind.supp - lib-storage: Added MAILBOX_FLAG_DELETE_UNSAFE +2016-04-20 17:23:12 +0300 Baofeng Wang (a11c0bcd4) + lib-storage: Add %{session} to mail_log_prefix by default -M src/lib-storage/mail-storage.h -M src/plugins/lazy-expunge/lazy-expunge-plugin.c -M src/plugins/quota/quota-storage.c + Parameter is added to initialization string. + +M doc/example-config/conf.d/10-logging.conf +M src/lib-storage/mail-storage-settings.c -2016-05-06 00:29:16 +0300 Aki Tuomi (220df2847) +2016-05-09 10:40:56 +0300 Martti Rannanjärvi (52041ed69) - configure: Include lib-dcrypt in core + lib: check stream_errno too when checking whether istream is closed -M configure.ac +M src/lib/istream.c -2016-04-27 14:08:00 +0300 Aki Tuomi (141f09fb6) +2016-04-24 21:06:41 +0300 Aki Tuomi (19a02b635) - lib-dcrypt: Initial implementation + lib: Use arc4random if present M configure.ac -M src/Makefile.am -A src/lib-dcrypt/Makefile.am -A src/lib-dcrypt/dcrypt-gnutls.c -A src/lib-dcrypt/dcrypt-iostream-private.h -A src/lib-dcrypt/dcrypt-openssl.c -A src/lib-dcrypt/dcrypt-private.h -A src/lib-dcrypt/dcrypt.c -A src/lib-dcrypt/dcrypt.h -A src/lib-dcrypt/istream-decrypt.c -A src/lib-dcrypt/istream-decrypt.h -A src/lib-dcrypt/ostream-encrypt.c -A src/lib-dcrypt/ostream-encrypt.h -A src/lib-dcrypt/sample-v1.bin -A src/lib-dcrypt/sample-v2.bin -A src/lib-dcrypt/test-crypto.c -A src/lib-dcrypt/test-stream.c -M src/lib-storage/index/dbox-single/sdbox-file.c +A m4/arc4random.m4 +M src/lib/rand.c +M src/lib/rand.h +M src/lib/randgen.c -2016-05-30 14:45:09 +0300 Aki Tuomi (497b8054e) +2016-04-12 10:25:09 +0300 Aki Tuomi (0bd188339) - doveadm-director: Fix commands so that they compile + lib: Do not use OpenSSL to read random bytes -M src/doveadm/doveadm-director.c +M configure.ac +M src/lib/randgen.c -2016-05-27 11:29:09 +0300 Timo Sirainen (d7dfbe245) +2016-05-09 08:04:39 +0300 Timo Sirainen (d72603a00) - doveadm mailbox delete: Added -e parameter to delete only empty mailboxes. + README: Added missing supported RFCs -M src/doveadm/doveadm-mail-mailbox.c +M README -2016-02-24 12:10:19 +0200 Aki Tuomi (e7f2fde23) +2016-05-09 00:55:21 +0300 Timo Sirainen (3fdae9cc0) - doveadm-director: Convert to ver2 infra + lib-dict: Compiler warning fix + I don't think it's possible that error was used uninitialized, but some gcc + version seems to think so. -M src/doveadm/doveadm-director.c +M src/lib-dict/dict-redis.c -2016-05-27 21:55:56 +0300 Timo Sirainen (336eedf3b) +2016-05-06 17:28:33 +0300 Timo Sirainen (cbe2d47fd) - dbox: Revert cache changes if some save/copy fails but transaction is - committed. + dict-client: Use standard str_tabescape-functions + There's no reason to reimplement them here separately. -M src/lib-storage/index/dbox-multi/mdbox-save.c -M src/lib-storage/index/dbox-single/sdbox-save.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-client.h -2016-05-27 21:34:26 +0300 Timo Sirainen (137dcd832) +2016-05-06 15:14:02 +0300 Timo Sirainen (661998e2c) - lazy-expunge: Don't fail expunge if mail was already expunged. + lib-dict: dict_transaction_commit*() returns now error string -M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/dict/dict-commands.c +M src/doveadm/doveadm-dict.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h +M src/lib-fs/fs-dict.c +M src/lib-storage/index/index-transaction.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/expire/doveadm-expire.c +M src/plugins/expire/expire-plugin.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota.c -2016-05-27 21:32:23 +0300 Timo Sirainen (2896dfdda) +2016-05-06 13:45:34 +0300 Timo Sirainen (c2a66e795) - lazy-expunge: Fixed error logging. + lib-dict: Changed internal transaction_commit() to return void + Somewhat simplifies the code now that it doesn't have to both call a + callback and return the same ret. -M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c -2016-05-27 18:30:01 +0300 Timo Sirainen (e56b1f272) +2016-05-06 13:44:15 +0300 Timo Sirainen (b2d3b5298) - dsync: Debug logging improvement. + dict-memcached-ascii: Fixed async commit -M src/doveadm/dsync/dsync-mailbox-import.c +M src/lib-dict/dict-memcached-ascii.c -2016-05-27 14:38:17 +0300 Timo Sirainen (ec6e02739) +2016-05-06 13:42:11 +0300 Timo Sirainen (ff3c2a32a) - lib-fs: Fix to previous fs-metawrap commit + dict-redis: Fixed memory leak in async commit - Argh. I was sure I compiled this before pushing it. -M src/lib-fs/istream-metawrap.c +M src/lib-dict/dict-redis.c -2016-05-27 14:33:47 +0300 Timo Sirainen (f71e3eb27) +2016-05-06 13:29:27 +0300 Timo Sirainen (055389c58) - lib-fs: fs-metawrap: Improved error logging on corrupted files. + lib-dict: dict_iterate_deinit() returns now error string -M src/lib-fs/istream-metawrap.c +M src/auth/userdb-dict.c +M src/dict/dict-commands.c +M src/doveadm/doveadm-dict.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h +M src/lib-fs/fs-dict.c +M src/lib-storage/index/index-attribute.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/expire/doveadm-expire.c -2016-05-26 19:13:40 +0300 Timo Sirainen (8baf2344f) +2016-05-06 13:10:42 +0300 Timo Sirainen (c4478af52) - doveadm: Fixed sending command -parameters to doveadm-server + lib-dict: Changed dict_wait() to return void. + If it encounters any failures, it should just make sure to abort any pending + async requests before returning. -M src/doveadm/doveadm-mail.c +M src/lib-dict-extra/dict-ldap.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h +M src/lib-storage/index/index-storage.c +M src/lib-storage/mail-user.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/quota/quota-dict.c -2016-05-26 21:40:30 +0300 Timo Sirainen (d1843ca66) +2016-05-06 13:08:06 +0300 Timo Sirainen (d5fea071f) - sdbox: Make sure we don't crash when altmove-flag is set but alt path is - missing. + dict-client: dict_wait() can't really fail -M src/lib-storage/index/dbox-single/sdbox-file.c +M src/lib-dict/dict-client.c -2016-05-26 18:25:06 +0300 Timo Sirainen (a436e90ca) +2016-05-06 12:59:38 +0300 Timo Sirainen (6cfe560af) - dict-sql: Fixed memory leak + dict: Pass through dict_lookup() error from dict server to client -M src/lib-dict/dict-sql-settings.c +M src/dict/dict-commands.c +M src/lib-dict/dict-client.c -2016-05-25 22:29:47 +0300 Timo Sirainen (a2f421418) +2016-05-06 12:33:11 +0300 Timo Sirainen (b5052fbfd) - cassandra: Added metrics=path connect setting. + lib-dict: dict_lookup() returns now error string - Cassandra's metrics are written to the path in JSON format. It can be a file - or a FIFO. The path supports expanding the standard global %variables, such - as %{pid} -M src/lib-sql/driver-cassandra.c +M src/auth/db-dict.c +M src/doveadm/doveadm-dict.c +M src/lib-dict-extra/dict-fs.c +M src/lib-dict-extra/dict-ldap.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h +M src/lib-fs/fs-dict.c +M src/lib-storage/index/index-attribute.c +M src/plugins/expire/expire-plugin.c +M src/plugins/quota/quota-dict.c -2016-05-25 22:08:04 +0300 Timo Sirainen (17aed59dc) +2016-05-06 12:19:21 +0300 Timo Sirainen (8f9a18189) - dict: Added missing main.h from previous commit + lib-dict: Moved/removed explicit stack frames in dict drivers. + Added them back to dict_set/unset/atomic_inc() in dict.c. Others are + unlikely to be called many times. -A src/dict/main.h +M src/lib-dict-extra/dict-ldap.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-memcached.c +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c -2016-05-25 20:00:01 +0300 Timo Sirainen (cfc6d8e5c) +2016-05-06 11:43:45 +0300 Timo Sirainen (20e042272) - dict: Show command statistics in process title. + lib-dict: Renamed dict_init_full() to dict_init() -M src/dict/Makefile.am -M src/dict/dict-commands.c -M src/dict/dict-commands.h +M src/auth/db-dict.c M src/dict/dict-connection.c -M src/dict/dict-connection.h -M src/dict/dict-settings.c -M src/dict/dict-settings.h -M src/dict/main.c - -2016-05-25 19:56:47 +0300 Timo Sirainen (c9adb47c3) - - lib: Fixed crashes in timing_get_median() and timing_get_95th() +M src/doveadm/doveadm-dict.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h +M src/lib-fs/fs-dict.c +M src/lib-storage/index/index-attribute.c +M src/plugins/acl/acl-lookup-dict.c +M src/plugins/expire/doveadm-expire.c +M src/plugins/expire/expire-plugin.c +M src/plugins/last-login/last-login-plugin.c +M src/plugins/quota-clone/quota-clone-plugin.c +M src/plugins/quota/quota-dict.c +M src/plugins/quota/quota.c - These were writing outside allocated memory. They weren't actually used - anywhere yet though. +2016-05-06 00:17:31 +0300 Timo Sirainen (9284599e2) -M src/lib/test-timing.c -M src/lib/timing.c + lib-http: If connect fails, include attempt count and total time in error. -2016-05-25 19:45:58 +0300 Timo Sirainen (801990c1c) + This will produce errors such as: 9002 connect(1.2.3.4:801) failed: + Connection timed out in 1.001 secs (4 attempts in 4.706 secs) - lib: Added timing_reset() +M src/lib-http/http-client-private.h +M src/lib-http/http-client-queue.c +2016-05-08 22:22:25 +0300 Timo Sirainen (5d31e4b38) -M src/lib/test-timing.c -M src/lib/timing.c -M src/lib/timing.h + lib-http: Allow http_client_settings.ssl==NULL -2016-05-19 19:15:49 -0500 J. Nick Koston (bde40af69) - dsync: race condition where done/finish is received after one side has - closed +M src/lib-http/http-client.c - We do not tell the remote we are closing if they have already told us - because they close the connection after sending ITEM_FINISH or ITEM_DONE and - will not be ever receive anything else from us unless it just happens to get - combined into the same packet as a previous response and is already in the - buffer. +2016-05-07 20:06:02 +0300 Timo Sirainen (2ed05ea82) -M src/doveadm/dsync/dsync-ibc-stream.c + config: Added support for SET_TIME_MSECS -2016-05-24 15:52:37 +0300 Timo Sirainen (bf5c1acf5) - lib-stats: Allow unregistering + re-registering stats. +M src/config/config-request.c - Fixes: Panic: stats_register() called after stats_alloc_size() was already - called - this will break existing allocations +2016-05-06 21:45:44 +0300 Timo Sirainen (7cd055a21) - This could have happened with doveadm HTTP API when using multiple commands - in same HTTP connection. + cassandra: Support milliseconds for request/connect_timeout -M src/lib-stats/stats.c -2016-05-23 23:24:31 +0300 Timo Sirainen (361575245) +M src/lib-sql/driver-cassandra.c - lib-index: Fixed assert-crash caused by previous cache compression change. +2016-05-06 21:44:22 +0300 Timo Sirainen (f69f73731) - We can't call mail_cache_map() when cache file isn't open or we'll crash: + lib-settings: Added SET_TIME_MSECS type. - Panic: file mail-cache.c: line 468 (mail_cache_map): assertion failed: - (cache->need_compress_file_seq != 0 || - MAIL_INDEX_IS_IN_MEMORY(cache->index)) -M src/lib-index/mail-cache-compress.c +M src/lib-settings/settings-parser.c +M src/lib-settings/settings-parser.h -2016-05-23 18:46:09 +0300 Timo Sirainen (26c937b6c) +2016-05-06 21:43:04 +0300 Timo Sirainen (2a8a6e1a8) - lib-index: Make sure cache compression doesn't clear the file unneededly. + lib-settings: Added settings_get_time_msecs() - This probably never happened with current code, except when the cache file - was already broken. - mail_cache_compress() unmapped cache when map_with_read==TRUE, but we never - mapped it back. This would cause cache copying code to think cache was - unusable and not copy anything. +M src/lib-settings/Makefile.am +M src/lib-settings/settings-parser.c +M src/lib-settings/settings-parser.h +A src/lib-settings/test-settings-parser.c -M src/lib-index/mail-cache-compress.c +2016-05-06 21:38:30 +0300 Timo Sirainen (5d1653a01) -2016-05-23 13:12:41 +0300 Timo Sirainen (24234b171) + lib-settings: settings_get_time() requires explicit unit now, except for 0. - lib-ldap: Use ldap_unbind_ext() instead of ldap_destroy() + This means that all the time interval settings in dovecot.conf must no + longer be simply a number. - This allows it to compile with older LDAP libraries. Their behavior (at - least in OpenLDAP) is identical as long as LDAP_OPT_CLIENT_CONTROLS haven't - been changed, which we haven't. +M src/lib-settings/settings-parser.c -M src/lib-ldap/ldap-connection.c +2016-05-03 19:42:08 +0300 Timo Sirainen (c001f4b96) -2016-05-23 13:08:20 +0300 Timo Sirainen (20e68d86f) + doveadm fetch: Translate commas to spaces in body|binary.
with - lib-ldap: Support libldap without LDAP_OPT_X_TLS_NEWCTX. + This way we can do e.g.: + doveadm fetch 'uid body.header.fields(from,to,subject)' ... -M src/lib-ldap/ldap-connection.c + Although in theory we could also change the parser to allow spaces as long + as they're inside (..), but this is probably too much extra effort. -2016-05-20 15:55:52 +0300 Timo Sirainen (153528ae6) +M src/doveadm/doveadm-mail-fetch.c - doveadm backup: Fixed unnecessary mailbox deletion. +2016-05-03 19:39:44 +0300 Timo Sirainen (6c1b37194) - Broken by 79490ec1a. The idea is to delete the mailbox early to avoid - unnecessary work, but we deleted it too early. If the last mail(s) were - deleted instead of just expunging them we deleted the whole mailbox. + lib-imap-storage: Allow HEADER.FIELDS(..) without space before '(' -M src/doveadm/dsync/dsync-mailbox-import.c + This is to allow doveadm fetch to use it. Attempting to do this without a + space in IMAP already fails elsewhere: -2016-05-19 23:19:29 +0300 Timo Sirainen (104a24496) + x fetch 1 body.peek[header.fields(from to)] x BAD Error in IMAP command + FETCH: Invalid characters in atom - lib-mail: Fixed istream-header-filter calling callback(hdr=NULL) +M src/lib-imap-storage/imap-msgpart.c - It should do it on the following parsings as well if there were any - callbacks that were called, or if the hdr==NULL callback added any headers. - This is important because the hdr==NULL call could do some cleanups. +2016-05-03 14:58:37 +0300 Timo Sirainen (2d7da70c0) -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c + doveadm fetch: Fixed logging errors for istream failures -2016-05-16 11:34:05 +0300 Baofeng Wang (dca07197a) - config: fix possible out-of-bound access in parsing function +M src/doveadm/doveadm-mail-fetch.c - Add low-bound check when decreasing string pointer from tail. +2016-05-03 14:54:28 +0300 Timo Sirainen (f24b245f4) -M src/config/config-parser.c + doveadm fetch: Added body.
and binary.
fields -2016-05-18 22:26:50 +0300 Timo Sirainen (81f0bc165) + These correspond to IMAP BODY[
]. - lib-fs: istream-metawrap can't have a readable fd currently +M src/doveadm/Makefile.am +M src/doveadm/doveadm-mail-fetch.c +2016-05-06 17:35:10 +0300 Timo Sirainen (09cd60ceb) -M src/lib-fs/istream-metawrap.c + dict-client: Added idle_msecs= parameter -2016-05-18 14:56:59 +0300 Timo Sirainen (06bd6c4d4) + This can be useful when connected to dict-async server where extra idling + connections don't matter so much as with blocking dict servers. - lib-mail: istream-header-filter - Don't return -2 too early +M src/lib-dict/dict-client.c - We returned -2 after we already added the data to the buffer. We should have - returned -2 only on the next read() call if nothing was skipped. +2016-04-20 14:33:57 +0300 Martti Rannanjärvi (44aebbf6d) -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c + doveadm: error to print formatted without format -2016-05-18 18:51:55 +0300 Timo Sirainen (580cfdf25) + This changes the segfault of `doveadm -f formatted ...` to an error. - lib-http: Fixed checking if istream or ostream needs waiting. +M src/doveadm/doveadm-print-formatted.c +2016-04-08 14:19:52 +0300 Martti Rannanjärvi (5b02d2191) -M src/lib-http/http-client-request.c -M src/lib-http/http-server-response.c + lib: Fixed potential collision in guid_generate() -2016-05-18 18:48:27 +0300 Timo Sirainen (94e8a82e5) + There wasn't enough padding for tv_nsec and it was also assuming 16 bit + PIDs. Because of these there was a tiny possibility of two guid_generate() + calls returning the same GUID. - lib: If epoll_ctl() fails, panic instead of just fatal. + This changes the GUID format a bit, but it was used only by sdbox code, + which doesn't assume anything about the GUID format. - This makes it easier to fix such bugs. +M src/lib/guid.c -M src/lib/ioloop-epoll.c +2016-04-26 10:39:21 +0300 Martti Rannanjärvi (c275cef63) -2016-05-18 09:33:15 +0300 Aki Tuomi (e17d7f4e6) + lib-http: use ssl_iostream_settings in http_client_settings - doveadm-mailbox-delete: Restore recursive parameter +M src/lib-http/http-client-connection.c +M src/lib-http/http-client.c +M src/lib-http/http-client.h +M src/lib-http/test-http-client.c -M src/doveadm/doveadm-mail-mailbox.c +2016-04-26 10:32:16 +0300 Martti Rannanjärvi (173d1d747) -2016-05-18 09:29:04 +0300 Aki Tuomi (744fa5af7) + lib-ssl-iostream: move ssl_iostream_settings_dup to iostream-ssl.c - dict: Fix crash when no dictionaries defined +M src/lib-ssl-iostream/iostream-openssl-context.c +M src/lib-ssl-iostream/iostream-ssl.c +M src/lib-ssl-iostream/iostream-ssl.h -M src/dict/dict-connection.c +2016-04-20 17:27:19 +0300 Baofeng Wang (2795f6183) -2016-05-17 00:00:43 +0300 Timo Sirainen (f00844631) + lib-storage: remove mdbox_purge_preserve_alt setting - imap: Include sync timing information in tagged command replies. Show it - only when it's larger than 0 to avoid unnecessary output. + remove setting and its reference. +M src/lib-storage/index/dbox-multi/mdbox-purge.c +M src/lib-storage/index/dbox-multi/mdbox-settings.c +M src/lib-storage/index/dbox-multi/mdbox-settings.h -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-sync.c +2016-05-06 22:24:20 +0300 Timo Sirainen (89b3a5314) -2016-05-17 23:31:29 +0300 Aki Tuomi (9b496d96f) + imap: Avoid assert-crash after a failed mailbox sync. - doveadm-mailbox: Add update subcommand + We didn't close the mailbox and we didn't update message counts, so we could + have crashed with: + Panic: Message count decreased -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h +M src/imap/imap-sync.c -2016-05-12 17:45:34 -0400 Timo Sirainen (b6d4252dc) +2016-05-05 21:26:37 +0300 Timo Sirainen (a16057fc5) - lib-ldap: Fixed assert-crash when killing LDAP connection. + stats: Handle getrusage() errors better - libldap may have already closed the fd, so with epoll io_remove() would try - to remove it and crash with: + I'm not aware of these errors actually happening anywhere, but its error + handling wouldn't have been correct if previous getrusage() calls had + succeeded. Now if it fails, log an error once and just keep on using the + last working rusage. - Panic: epoll_ctl(del, 12) failed: Bad file descriptor +M src/plugins/stats/mail-stats-fill.c -M src/lib-ldap/ldap-connection.c +2016-05-05 21:23:17 +0300 Timo Sirainen (553dc92ad) -2016-02-08 18:32:10 +0200 Phil Carmody (72c15660f) + stats: Work around shrinking system CPU usage - lib: istream - provide alternatives to i_stream_read_data() + Happening at least in Debian's Linux kernel 4.3.0-1-amd64. - Providing as a parameter the number of bytes that you would be disappointed - to receive was confusing compared to providing the number that you would be - happy to receive. This lets us get rid of all the '-1's in the callers. The - callers which used 0 as a parameter were so common that it's worth providing - a separate API just to simplify their demands. + getrusage() may returns ru_stime = 4000 or 8000, but later it drops to 0. + We'll just work around this by switching to the previous working ru_stime. - Deep down, these are still the same underlying function. Currently we route - the new API through the old one, but eventually, the old API can be routed - through the new one, so that the friendlier interface has the simplest - implementation. + This fixes errors like: Error: stats: session stats shrank: sys_cpu 0.0 < + 0.4000 - Signed-off-by: Phil Carmody +M src/plugins/stats/mail-stats-fill.c -M src/lib/istream.h +2016-05-06 12:51:28 +0300 Aki Tuomi (04d809e94) -2016-05-15 17:25:17 +0300 Aki Tuomi (3a02e96bd) + dict-ldap: Properly duplicate result - lib-ldap: Do not create new context and lose settings +M src/lib-dict-extra/dict-ldap.c -M src/lib-ldap/ldap-connection.c +2016-05-06 17:24:42 +0300 Timo Sirainen (6ea49f0ff) -2016-05-15 01:17:18 +0300 Timo Sirainen (015c15fd5) + lib: Added t_str_tabunescape() - lib-ldap: Compiling fix - don't pass through void return +M src/lib/strescape.c +M src/lib/strescape.h +M src/lib/test-strescape.c -M src/lib-ldap/ldap-client.c +2016-05-03 17:43:00 +0300 Timo Sirainen (6d25571dd) -2016-05-11 16:57:33 -0400 Timo Sirainen (71bcaeb23) + auth: Makefile dependency fix - lib-sql: Memory leak fix when freeing sql dbs from cache + Hopefully fixes: mv: cannot stat '.deps/auth-stats.Tpo': No such file or + directory - Normally happened only at deinit. +M src/auth/Makefile.am -M src/lib-sql/sql-db-cache.c +2016-05-06 14:34:57 +0300 Timo Sirainen (5af5137f6) -2016-05-06 13:42:11 +0300 Timo Sirainen (b35c9039d) + lib: Added i_stream_get_disconnect_reason() - dict-redis: Fixed memory leak in async commit +M src/lib/istream.c +M src/lib/istream.h -M src/lib-dict/dict-redis.c +2016-05-06 14:22:29 +0300 Timo Sirainen (c61779cfa) -2016-05-13 14:22:40 -0400 Timo Sirainen (26758def5) + lib: Improved connection_disconnect_reason() - imap: Set command start timestamps earlier. - Previously timing statistics in taglines weren't shown commands that didn't - read any parameters. +M src/lib/connection.c - Also the timings now include the time speng reading command parameters from - client. For example: +2016-05-05 18:10:46 +0300 Timo Sirainen (e5bc82395) - a list "" {1} - + OK - % - * LIST (\HasNoChildren) "/" INBOX a OK List completed (0.001 + 1.214 secs). + lazy-expunge: Handle mailbox create race conditions. -M src/imap/imap-client.c + Don't log an error if another process just created the lazy-expunge mailbox. -2016-05-13 13:35:50 -0400 Timo Sirainen (a0b127aa8) +M src/plugins/lazy-expunge/lazy-expunge-plugin.c - lib: Fixed istream_seekable.stat() to return correct size. +2016-05-05 16:15:15 +0300 Timo Sirainen (fece64e92) - It was supposed to read until end of the stream, but it did it only when - stat() was called while stream was still fully in memory. + lib-fs: Fixes to stats count tracking -M src/lib/istream-seekable.c + fs_exists(), fs_copy(), fs_rename() and fs_delete() could have increased the + count multiple times on async operations. -2016-05-13 09:56:08 -0400 Timo Sirainen (aae505b61) +M src/lib-fs/fs-api.c - lib-fs: Make sure fs-metawrap catches all write errors. +2016-05-05 14:58:46 +0300 Timo Sirainen (b11876430) - The full istream may not have been written in case ostream only partially - wrote the data (e.g. out of disk space?) + stats: Fixed ADD-USER stats tracking (auth stats) -M src/lib-fs/fs-metawrap.c -2016-05-13 09:48:13 -0400 Timo Sirainen (4132ed5a3) +M src/stats/mail-user.c - lib-fs: If fs-metawrap sees truncated header, it should return error. +2016-05-04 18:34:59 +0300 Timo Sirainen (a9be54bbb) + lib-fs: fs-metawrap stat() error handling improvement. -M src/lib-fs/istream-metawrap.c + We can't just treat i_stream_get_size() returning 0 as the reason being + istream is async and not fully read. It might be, but it might also be + because of other reasons. And since we're closing the istream we couldn't + even properly finish up the async handling. So for now just return an error + if we see this happening. -2016-05-13 09:23:52 -0400 Timo Sirainen (6bc001ee9) +M src/lib-fs/fs-metawrap.c - lib: Fixed potential crash in i_stream_stat() failures. +2016-05-04 18:24:03 +0300 Timo Sirainen (07b3a7d81) - We shouldn't have been copying parent's stream_errno here. Especially - because the parent can be NULL. + lib: istream's max_buffer_size=0 means 0, not unlimited. + + Make sure we don't grow the buffer size then. M src/lib/istream.c -2016-05-12 15:10:47 -0400 Timo Sirainen (f5f2a7a7f) +2016-05-04 15:36:44 +0300 Timo Sirainen (362db49a9) - lib-fs: Added FS_PROPERTY_FASTCOPY_CHANGED_METADATA + imap: Set client_command_context.tagline_reply before syncing. + Command post-hooks can't see it otherwise. -M src/lib-fs/fs-api.h +M src/imap/imap-sync.c -2016-04-28 12:45:01 +0300 Timo Sirainen (d375835dd) +2016-05-03 22:18:54 +0300 Timo Sirainen (6d02ce5bf) - lib-fs: Allow multiple fs_read_stream() calls to seekable istreams. + dsync: Fixed assert-crash if mailbox_attribute_set() fails - This fixes for example calling fs_default_copy() for an istream which was - already opened: + We shouldn't set importer->mail_error, because we're not going to fail the + import. - Panic: file fs-api.c: line 528 (fs_read_stream): assertion failed: - (!file->istream_open) + Fixes assert-crash: dsync-mailbox-import.c: line 2812 + (dsync_mailbox_import_deinit): assertion failed: (importer->failed == + (importer->mail_error != 0)) -M src/lib-fs/fs-api.c +M src/doveadm/dsync/dsync-mailbox-import.c -2016-04-28 12:47:02 +0300 Timo Sirainen (826f16c0c) +2016-05-03 20:28:42 +0300 Timo Sirainen (6e81d67a4) - lib-fs: Fixed multiple concurrent fs_read_stream() calls + lib-mail: Fixed istream-header-filter unit test names - Return a new limit-istream, so each istream can have its own independent - offset. -M src/lib-fs/fs-api.c +M src/lib-mail/test-istream-header-filter.c -2016-05-12 08:09:56 -0400 Timo Sirainen (9f300ec1a) +2016-05-03 20:20:28 +0300 Timo Sirainen (2fa41e3cd) - lib-http: Queue's delayed timeout handler wasn't removed after work was - done. + doveadm who: Fixed listing LMTP sessions -M src/lib-http/http-client-queue.c +M src/doveadm/doveadm-who.c -2016-05-11 16:58:59 -0400 Timo Sirainen (fa4f8f36b) +2016-05-03 20:17:12 +0300 Timo Sirainen (56bcd695f) - dict-sql: Cache reading settings files. + lib: Added more unit tests to str_*() - The settings were read for every dict init, which was done for every new - dict connection. This was using a lot of CPU. There are usually only a - couple dict-sql settings files, so we cache all of the ones we read. -M src/lib-dict/dict-sql-settings.c -M src/lib-dict/dict-sql-settings.h -M src/lib-dict/dict-sql.c +M src/lib/test-str.c + +2016-05-03 20:15:23 +0300 Timo Sirainen (cb06054f8) -2016-05-12 07:24:39 -0400 Timo Sirainen (5aa642046) + config: Fixed namespaces to work again - lib-fs: Minor code cleanup + Broken by 26a6ff7f0. old_settings_handle() should have returned FALSE for + settings it didn't handle. +M src/config/old-set-parser.c -M src/lib-fs/fs-api.c +2016-04-26 16:43:15 +0300 Baofeng Wang (71748cca1) -2016-05-12 07:23:51 -0400 Timo Sirainen (fece801a1) + global: Use mail_user_plugin_getenv_bool() wherever possible - lib-fs: Set fs error on fs_write_stream_abort() + New API is used to check boolean setting OR exsitence of an env variable. - Probably would be nice for fs_write_stream_abort() to have an error string - parameter, which could be used instead of this generic error. +M src/plugins/expire/expire-plugin.c +M src/plugins/fts/fts-storage.c +M src/plugins/lazy-expunge/lazy-expunge-plugin.c +M src/plugins/pop3-migration/pop3-migration-plugin.c +M src/plugins/stats/stats-plugin.c -M src/lib-fs/fs-api.c +2016-04-20 17:21:51 +0300 Baofeng Wang (527c2b071) -2016-05-12 07:23:04 -0400 Timo Sirainen (7bea15d9a) + lib-storage: add mail_user_plugin_getenv_bool - lib-fs: Added asserts to make sure async writes are finished before close + New API will check boolean-like env setting OR its exsitence. + Function returns FALSE when: + * Read out a null string, + "Or" * String starts with any letter in set {'N', 'n', 'F','f','0'} -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c + To keep downward compatibility, For other cases including an empty string, + function returns TRUE. -2016-05-12 07:21:38 -0400 Timo Sirainen (4c4a583c7) +M src/lib-storage/mail-user.c +M src/lib-storage/mail-user.h - fs-metawrap: Minor code cleanup +2016-04-30 14:05:42 +0300 Timo Sirainen (88bcf8121) - temp_output==NULL, so these calls are equal. + lib: Optimize str_append_n() -M src/lib-fs/fs-metawrap.c -2016-05-12 07:18:49 -0400 Timo Sirainen (69ced8292) +M src/lib/str.c - fs-metawrap: Propagate fs_write_stream_abort() to parent always +2016-04-30 14:03:32 +0300 Timo Sirainen (53e9cbd97) - It needed to be done also when temp_output==NULL, because we had already - started sending it to parent, but async parent wasn't being finished. + lib: Make str_*() inline which are simple buffer_* wrappers. -M src/lib-fs/fs-metawrap.c -2016-05-12 07:15:41 -0400 Timo Sirainen (a80011b6e) +M src/lib/str.c +M src/lib/str.h - fs-randomfail: Set fs error always when injecting failure. +2016-04-30 13:59:32 +0300 Timo Sirainen (b88c43d09) - It was done in some places, but not everywhere. + global: Avoid using buffer_get_data() -M src/lib-fs/fs-randomfail.c + Especially buffer_get_data(buf, NULL) generates worse code than just using + buf->data directly. -2016-05-10 17:35:43 -0400 Timo Sirainen (ebf2e93ed) +M src/lib-imap/imap-base-subject.c +M src/lib-index/mail-transaction-log-view.c +M src/lib-mail/istream-header-filter.c +M src/lib-mail/message-header-parser.c +M src/lib-storage/index/index-mail-headers.c +M src/lib-storage/mail-search.c +M src/lib/array.c +M src/lib/str.c - lib-ldap: Reverted previous commit for now. +2016-04-30 13:49:06 +0300 Timo Sirainen (2d5d7890b) - We don't have libdovecot built at at this stage. But we can't build it - earlier, because it needs lib-dict-extra, which needs lib-ldap. So we have - cyclical dependencies now. + global: Replace buffer_get_used_size(buf) with buf->used -M src/lib-ldap/Makefile.am + Doesn't make any diffence to code generation, but it's somewhat simpler + code. It's also more consistent since most of the code nowadays uses the + ->used. -2016-05-10 17:25:20 -0400 Timo Sirainen (1b228876c) +M src/auth/mech-rpa.c +M src/auth/password-scheme-rpa.c +M src/lib-index/mail-transaction-log-file.c +M src/lib-mail/message-part-serialize.c +M src/lib-ntlm/ntlm-encrypt.c +M src/lib-ntlm/ntlm-message.c +M src/lib/str.c - lib-ldap: Add libdovecot dependency to libdovecot-ldap +2016-04-20 17:27:50 +0300 Baofeng Wang (26a6ff7f0) - Required for linking to work on OSX. + config: Remove old_namespace() -M src/lib-ldap/Makefile.am + From config/old-set-parser.c, and its caller. The namespace section named + "private", "shared" or "public" is obsolete accordingly. -2016-05-10 16:22:23 -0400 Timo Sirainen (bd0bf1233) +M src/config/old-set-parser.c - lib: Fixed crash when closing a failed istream-concat +2016-05-02 13:26:05 +0300 Martti Rannanjärvi (ff17313ec) - i_stream_concat_seek() could have set cur_input==NULL and we still attempted - to seek the cur_input at close time. + lib-imap, imap: BINARY [UNKNOWNCTE] to [PARSE] -M src/lib/istream-concat.c -2016-05-10 10:42:33 -0400 Timo Sirainen (7c2d7b9e7) +M src/imap/cmd-fetch.c +M src/lib-imap/imap-resp-code.h - lib-index: "first saved UID of the day" wasn't updated right always. +2016-05-02 23:43:15 +0300 Timo Sirainen (38a985c06) - It was using the UID of the first append. But it may not have been the - lowest UID. Do this after the appends are first sorted by their UID. + lib-storage: Make it easier to debug mail's unclosed istream -M src/lib-index/mail-index-transaction-finish.c -2016-05-10 00:42:51 +0200 Stephan Bosch (99ce322e5) +M src/lib-storage/index/index-mail.c - Added liblzma bug to Valgrind suppressions file. +2016-05-03 18:25:50 +0300 Timo Sirainen (bf5682ed5) - It caused `make test` to fail with valgrind. Occurred at least for Debian - Jessie with liblzma package version 5.1.1alpha+20120614-2+b3. + lib-mail: istream-header-filter - fixed adding headers at eoh -M run-test-valgrind.supp -2016-05-09 08:04:39 +0300 Timo Sirainen (5f59c92c2) +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c - README: Added missing supported RFCs +2016-05-03 17:38:34 +0300 Timo Sirainen (32e3da4a5) + lib-mail: istream-header-filter: Fixed stat() with HEADER_FILTER_HIDE_BODY -M README -2016-05-06 00:17:31 +0300 Timo Sirainen (c2a17c802) +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c - lib-http: If connect fails, include attempt count and total time in error. +2016-05-03 17:25:07 +0300 Timo Sirainen (10d2dbb83) - This will produce errors such as: 9002 connect(1.2.3.4:801) failed: - Connection timed out in 1.001 secs (4 attempts in 4.706 secs) + lib-mail: istream-header-filter HEADER_FILTER_ADD_MISSING_EOH fixes -M src/lib-http/http-client-private.h -M src/lib-http/http-client-queue.c + When using HEADER_FILTER_CRLF_PRESERVE, add CR to the EOH if the previous + header line ended with CRLF. -2016-05-06 17:35:10 +0300 Timo Sirainen (8dfa9cf75) + When header ends to a header without newline, add two newlines so we can get + the actual EOH added. - dict-client: Added idle_msecs= parameter +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c - This can be useful when connected to dict-async server where extra idling - connections don't matter so much as with blocking dict servers. +2016-05-03 17:08:24 +0300 Timo Sirainen (c8e347856) -M src/lib-dict/dict-client.c + lib-mail: istream-header-filter: Fixed stat() with + HEADER_FILTER_END_BODY_WITH_LF -2016-05-06 22:24:20 +0300 Timo Sirainen (9f47b8c69) - imap: Avoid assert-crash after a failed mailbox sync. +M src/lib-mail/istream-header-filter.c +M src/lib-mail/test-istream-header-filter.c - We didn't close the mailbox and we didn't update message counts, so we could - have crashed with: +2016-05-03 16:54:46 +0300 Timo Sirainen (2739e568e) - Panic: Message count decreased + lib-mail: istream-header-filter - Check errors reading header -M src/imap/imap-sync.c + This probably doesn't affect the results much, since the stream_errno is set + anyway. But it's better to abort early, just in case the broken state might + end up asserting later. -2016-05-05 21:26:37 +0300 Timo Sirainen (99e68380d) +M src/lib-mail/istream-header-filter.c - stats: Handle getrusage() errors better +2016-05-03 15:49:00 +0300 Timo Sirainen (eb8143d99) - I'm not aware of these errors actually happening anywhere, but its error - handling wouldn't have been correct if previous getrusage() calls had - succeeded. Now if it fails, log an error once and just keep on using the - last working rusage. + lib: Added o_stream_unix_write_fd() assert: fd>=0 -M src/plugins/stats/mail-stats-fill.c -2016-05-05 21:23:17 +0300 Timo Sirainen (c8d8cb579) +M src/lib/ostream-unix.c - stats: Work around shrinking system CPU usage +2016-05-03 15:27:22 +0300 Timo Sirainen (d2c9e28ba) - Happening at least in Debian's Linux kernel 4.3.0-1-amd64. + lib-storage: Fixed potential crash in mailbox_sync_deinit() error handling - getrusage() may returns ru_stime = 4000 or 8000, but later it drops to 0. - We'll just work around this by switching to the previous working ru_stime. + If mailbox_sync*() was called before mailbox was opened, the automatic + mailbox opening could fail. mailbox_sync_deinit() would still try to access + box->view, which would be NULL. - This fixes errors like: Error: stats: session stats shrank: sys_cpu 0.0 < - 0.4000 +M src/lib-storage/index/index-sync.c -M src/plugins/stats/mail-stats-fill.c +2016-05-03 00:25:43 +0300 Timo Sirainen (9cd4b2da8) + + lib-storage: Another fix to mail storage initialization. -2016-05-06 12:51:28 +0300 Aki Tuomi (37f0b0448) + Allow mail_namespaces_init_location() to add the namespace directly to user, + since that's what the current callers always want. But compared to the + original code we're now calling mail_namespaces_init_finish() rather than + doing the same things ourself. - dict-ldap: Properly duplicate result +M src/lib-storage/mail-namespace.c +2016-05-02 17:31:30 +0300 Aki Tuomi (21c4d7937) -M src/lib-dict-extra/dict-ldap.c + lib-ldap: Handle various LDAP failures correctly -2016-05-03 17:43:00 +0300 Timo Sirainen (fc0f22ebd) - auth: Makefile dependency fix +M src/lib-ldap/ldap-connection.c - Hopefully fixes: mv: cannot stat '.deps/auth-stats.Tpo': No such file or - directory +2016-05-02 16:21:27 +0300 Aki Tuomi (3353c3891) -M src/auth/Makefile.am + lib-ldap: Do not retry with bad credentials -2016-05-06 14:34:57 +0300 Timo Sirainen (0e65dc9c8) - lib: Added i_stream_get_disconnect_reason() +M src/lib-ldap/ldap-connection.c +2016-05-02 17:00:22 +0300 Timo Sirainen (fc4e52888) -M src/lib/istream.c -M src/lib/istream.h + lib-storage: Changed mail storage initialization. -2016-05-06 14:22:29 +0300 Timo Sirainen (4a92e7afb) + Most importantly require mail_namespaces_init_finish() after + mail_storage_create(). This was needed so that mail_namespaces_created/added + hook would always have the ns->list set, which is required for several of + the hooks to work (e.g. mailbox list index) - lib: Improved connection_disconnect_reason() +M src/lib-storage/index/raw/raw-storage.c +M src/lib-storage/mail-namespace.c +M src/lib-storage/mail-user.c +2016-05-02 15:20:18 +0300 Timo Sirainen (9e6c76cae) -M src/lib/connection.c + lib-ldap: Added initial connection pooling code. -2016-05-05 18:10:46 +0300 Timo Sirainen (501231e84) + This is mainly about allowing multiple dict-ldaps to use the same + ldap-connection. In future we could support load balancing with multiple + concurrent LDAP connections. - lazy-expunge: Handle mailbox create race conditions. +M src/lib-dict-extra/dict-ldap.c +M src/lib-ldap/Makefile.am +M src/lib-ldap/ldap-client.c +M src/lib-ldap/ldap-client.h +A src/lib-ldap/ldap-connection-pool.c +A src/lib-ldap/ldap-connection-pool.h +M src/lib-ldap/ldap-connection.c +M src/lib-ldap/ldap-private.h - Don't log an error if another process just created the lazy-expunge mailbox. +2016-05-02 14:35:40 +0300 Timo Sirainen (8147f5c13) -M src/plugins/lazy-expunge/lazy-expunge-plugin.c + dict-ldap: Removed caching of ldap-clients -2016-05-05 16:15:15 +0300 Timo Sirainen (2615930e5) + With the previous per-username caching there could be a huge number of + dict-ldaps. - lib-fs: Fixes to stats count tracking +M src/lib-dict-extra/dict-ldap.c - fs_exists(), fs_copy(), fs_rename() and fs_delete() could have increased the - count multiple times on async operations. +2016-05-02 14:21:06 +0300 Timo Sirainen (969c46c1d) -M src/lib-fs/fs-api.c + dict-ldap: Don't reuse dict for different usernames. -2016-05-05 14:58:46 +0300 Timo Sirainen (bb3679aad) + Fixes doing priv/* lookups for multiple usernames. - stats: Fixed ADD-USER stats tracking (auth stats) + This currently also means that each username will create a separate LDAP + connection, which isn't ideal. But this is probably better fixed in lib-ldap + code similar to how lib-sql does connection pooling. +M src/lib-dict-extra/dict-ldap.c -M src/stats/mail-user.c +2016-05-02 12:01:40 +0300 Timo Sirainen (3c5d1187e) -2016-05-04 18:34:59 +0300 Timo Sirainen (e36e97499) + imap: Added struct client_command_context.tagline_reply - lib-fs: fs-metawrap stat() error handling improvement. + Can be used by plugins. - We can't just treat i_stream_get_size() returning 0 as the reason being - istream is async and not fully read. It might be, but it might also be - because of other reasons. And since we're closing the istream we couldn't - even properly finish up the async handling. So for now just return an error - if we see this happening. +M src/imap/imap-client.c +M src/imap/imap-client.h -M src/lib-fs/fs-metawrap.c +2016-05-02 10:14:20 +0300 Timo Sirainen (cc7699162) -2016-05-03 20:28:42 +0300 Timo Sirainen (b0626c087) + auth: Added %{auth_user/username/domain} variables - lib-mail: Fixed istream-header-filter unit test names +M src/auth/auth-request-var-expand.c +M src/auth/auth-request-var-expand.h -M src/lib-mail/test-istream-header-filter.c +2016-04-30 12:50:53 +0200 Stephan Bosch (ea623e25e) -2016-05-03 20:20:28 +0300 Timo Sirainen (9233125a5) + lib: Added ostream-unix for writing fd sockets via ostream. - doveadm who: Fixed listing LMTP sessions +M src/lib/Makefile.am +A src/lib/ostream-unix.c +A src/lib/ostream-unix.h -M src/doveadm/doveadm-who.c +2016-04-30 14:10:59 +0200 Stephan Bosch (2ac0ee863) -2016-05-02 23:43:15 +0300 Timo Sirainen (1c3f119d7) + lib: ostream-file: Allow creating derived file output streams. - lib-storage: Make it easier to debug mail's unclosed istream +M src/lib/Makefile.am +A src/lib/ostream-file-private.h +M src/lib/ostream-file.c -M src/lib-storage/index/index-mail.c +2016-04-30 13:55:52 +0200 Stephan Bosch (5e6d46380) -2016-05-03 18:25:50 +0300 Timo Sirainen (90c392325) + lib: ostream-file: Split o_stream_file_writev() from + o_stream_file_writev_full(). - lib-mail: istream-header-filter - fixed adding headers at eoh +M src/lib/ostream-file.c -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c +2016-04-30 13:51:59 +0200 Stephan Bosch (6fae619f0) -2016-05-03 17:38:34 +0300 Timo Sirainen (71c09f6b2) + lib: ostream-file: Renamed o_stream_writev() to o_stream_file_writev_full(). - lib-mail: istream-header-filter: Fixed stat() with HEADER_FILTER_HIDE_BODY +M src/lib/ostream-file.c -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c +2016-04-30 13:29:47 +0200 Stephan Bosch (9c8699034) -2016-05-03 17:25:07 +0300 Timo Sirainen (7fd1292b9) + lib: ostream-file: Renamed iov_size to iov_count everywhere and made it + unsigned int for consistency. - lib-mail: istream-header-filter HEADER_FILTER_ADD_MISSING_EOH fixes - When using HEADER_FILTER_CRLF_PRESERVE, add CR to the EOH if the previous - header line ended with CRLF. +M src/lib/ostream-file.c - When header ends to a header without newline, add two newlines so we can get - the actual EOH added. +2016-04-30 14:22:21 +0200 Stephan Bosch (0a6d1a48c) -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c + lib-http: server: Fixed assert failure occurring when closing the connection + while a request payload was still being read. -2016-05-03 17:08:24 +0300 Timo Sirainen (039474940) - lib-mail: istream-header-filter: Fixed stat() with - HEADER_FILTER_END_BODY_WITH_LF +M src/lib-http/http-server-connection.c +2016-04-30 15:26:27 +0300 Timo Sirainen (eaae34623) -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c + .gitignore: Added *~ -2016-05-03 16:54:46 +0300 Timo Sirainen (81905b930) - lib-mail: istream-header-filter - Check errors reading header +M .gitignore - This probably doesn't affect the results much, since the stream_errno is set - anyway. But it's better to abort early, just in case the broken state might - end up asserting later. +2016-04-30 14:55:14 +0300 Timo Sirainen (e353d03d3) -M src/lib-mail/istream-header-filter.c + lib-storage: Clear list error before mailbox_list_get_hierarchy_sep() + + With ACL plugin enabled the call could have triggered dovecot-acl-list + rebuild, which in turn could have set list errors if it didn't have + permissions to all the mailboxes. This caused IMAP logins to fail. -2016-05-03 15:27:22 +0300 Timo Sirainen (4497d28e1) +M src/lib-storage/mailbox-list.c - lib-storage: Fixed potential crash in mailbox_sync_deinit() error handling +2016-04-30 14:19:02 +0300 Timo Sirainen (12fd7a305) - If mailbox_sync*() was called before mailbox was opened, the automatic - mailbox opening could fail. mailbox_sync_deinit() would still try to access - box->view, which would be NULL. + lib-mail: message-parser assert-crashfix -M src/lib-storage/index/index-sync.c + Crashes when multipart MIME header is missing end-of-headers line and the + boundary begins with the same prefix as one of the parent boundaries. Broken + by 7a12331c6 -2016-05-02 17:31:30 +0300 Aki Tuomi (47f2320ca) +M src/lib-mail/message-parser.c +M src/lib-mail/test-message-parser.c - lib-ldap: Handle various LDAP failures correctly +2016-04-30 01:27:27 +0300 Timo Sirainen (e7c85ff10) + quota: Fix to earlier commit 62f2f6baf -M src/lib-ldap/ldap-connection.c + expunge_uids may become empty with prev_idx > 0 -2016-05-02 16:21:27 +0300 Aki Tuomi (eb2394176) +M src/plugins/quota/quota-storage.c - lib-ldap: Do not retry with bad credentials +2016-04-30 01:05:47 +0300 Timo Sirainen (22b0b59ad) + lib-fs: Fixed fs_get_metadata() with fs-metawrap -M src/lib-ldap/ldap-connection.c + If mail was already read to EOF. -2016-05-04 15:36:44 +0300 Timo Sirainen (139007fda) +M src/lib-fs/fs-metawrap.c - imap: Set client_command_context.tagline_reply before syncing. +2016-04-14 14:28:30 +0300 Martti Rannanjärvi (7633195df) - Command post-hooks can't see it otherwise. + lib-storage: mailbox_list_index yes by default -M src/imap/imap-sync.c -2016-05-03 22:18:54 +0300 Timo Sirainen (5f50fecfb) +M doc/example-config/conf.d/10-mail.conf +M src/lib-storage/mail-storage-settings.c - dsync: Fixed assert-crash if mailbox_attribute_set() fails +2016-04-26 14:27:39 -0600 Michael Slusarz (74780c1e2) - We shouldn't set importer->mail_error, because we're not going to fail the - import. + man: Add stub for doveadm-fs command - Fixes assert-crash: dsync-mailbox-import.c: line 2812 - (dsync_mailbox_import_deinit): assertion failed: (importer->failed == - (importer->mail_error != 0)) -M src/doveadm/dsync/dsync-mailbox-import.c +M .gitignore +M doc/man/Makefile.am +A doc/man/doveadm-fs.1.in -2016-05-02 15:20:18 +0300 Timo Sirainen (527dad09b) +2016-04-26 19:26:34 +0300 Aki Tuomi (3cd59a62a) - lib-ldap: Added initial connection pooling code. + doveadm-server: Handle istream send error. - This is mainly about allowing multiple dict-ldaps to use the same - ldap-connection. In future we could support load balancing with multiple - concurrent LDAP connections. -M src/lib-dict-extra/dict-ldap.c -M src/lib-ldap/Makefile.am -M src/lib-ldap/ldap-client.c -M src/lib-ldap/ldap-client.h -A src/lib-ldap/ldap-connection-pool.c -A src/lib-ldap/ldap-connection-pool.h -M src/lib-ldap/ldap-connection.c -M src/lib-ldap/ldap-private.h +M src/doveadm/client-connection-http.c -2016-05-02 14:35:40 +0300 Timo Sirainen (90afb1707) +2016-04-16 03:54:00 +0200 Stephan Bosch (e1a4ea6ad) - dict-ldap: Removed caching of ldap-clients + lib-http: server: Implemented means to gracefully shut down the server. - With the previous per-username caching there could be a huge number of - dict-ldaps. + While shutting down, it will not accept new requests and connections are + closed once they become idle. -M src/lib-dict-extra/dict-ldap.c +M src/lib-http/http-server-connection.c +M src/lib-http/http-server-private.h +M src/lib-http/http-server.c +M src/lib-http/http-server.h -2016-05-02 14:21:06 +0300 Timo Sirainen (f3781e51f) +2016-04-25 11:37:05 +0300 Aki Tuomi (3fd02e831) - dict-ldap: Don't reuse dict for different usernames. + lib-dict: Further remove APPEND - Fixes doing priv/* lookups for multiple usernames. - This currently also means that each username will create a separate LDAP - connection, which isn't ideal. But this is probably better fixed in lib-ldap - code similar to how lib-sql does connection pooling. +M src/lib-dict-extra/dict-fs.c +M src/lib-dict/dict-client.h +M src/lib-dict/dict-file.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-transaction-memory.c +M src/lib-dict/dict-transaction-memory.h -M src/lib-dict-extra/dict-ldap.c +2016-04-26 10:49:46 +0300 Martti Rannanjärvi (fe219d44d) -2016-05-02 12:01:40 +0300 Timo Sirainen (6d1972db0) + mail-log: log headers as utf8 - imap: Added struct client_command_context.tagline_reply - Can be used by plugins. +M src/plugins/mail-log/mail-log-plugin.c -M src/imap/imap-client.c -M src/imap/imap-client.h +2016-04-27 13:06:52 +0300 Martti Rannanjärvi (197a3e48d) -2016-05-02 10:14:20 +0300 Timo Sirainen (9ba5b7f02) + lib-lda: remove forced logging of session_id - auth: Added %{auth_user/username/domain} variables +M src/lib-lda/mail-deliver.c -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h +2016-04-27 13:31:56 +0300 Martti Rannanjärvi (68eb16778) -2016-04-30 14:55:14 +0300 Timo Sirainen (30c9ffa5f) + lib-master, doveadm: remove mountpoint-list.* and doveadm mount commands - lib-storage: Clear list error before mailbox_list_get_hierarchy_sep() - With ACL plugin enabled the call could have triggered dovecot-acl-list - rebuild, which in turn could have set list errors if it didn't have - permissions to all the mailboxes. This caused IMAP logins to fail. +M src/doveadm/Makefile.am +M src/doveadm/doveadm-cmd.c +D src/doveadm/doveadm-mount.c +M src/lib-master/Makefile.am +D src/lib-master/mountpoint-list.c +D src/lib-master/mountpoint-list.h + +2016-04-27 10:17:27 +0300 Martti Rannanjärvi (d61490e38) + + lib-storage: write subscription file in version 2 format + + Write subscriptions file in a format that only v2.2.17 or newer can read, so + after dovecot converts the files to the new format, downgrading to a version + older than v2.2.17 is not supported. -M src/lib-storage/mailbox-list.c +M src/lib-storage/list/subscription-file.c -2016-04-30 14:19:02 +0300 Timo Sirainen (0f6a26ede) +2016-04-29 21:36:31 +0300 Teemu Huovila (ac157a6a0) - lib-mail: message-parser assert-crashfix + lib-dict-extra: Avoid out of scope data stack usage. - Crashes when multipart MIME header is missing end-of-headers line and the - boundary begins with the same prefix as one of the parent boundaries. Broken - by 7a12331c6 -M src/lib-mail/message-parser.c -M src/lib-mail/test-message-parser.c +M src/lib-dict-extra/dict-ldap.c -2016-04-30 01:27:27 +0300 Timo Sirainen (0192511cb) +2016-04-27 12:46:02 +0200 Stephan Bosch (e2d420dc4) - quota: Fix to earlier commit 62f2f6baf + lib: Finished string trimming functions to trim characters from beginning + and/or end of a string. - expunge_uids may become empty with prev_idx > 0 + This also restructures the code to avoid code duplication as much as + possible. -M src/plugins/quota/quota-storage.c +M src/lib/strfuncs.c +M src/lib/strfuncs.h +M src/lib/test-strfuncs.c -2016-04-30 01:05:47 +0300 Timo Sirainen (b58c7f9aa) +2016-04-27 12:00:25 +0200 Stephan Bosch (befccf297) - lib-fs: Fixed fs_get_metadata() with fs-metawrap + lib-http: client: Added ability to configure a specific proxy for individual + requests. - If mail was already read to EOF. + This way, a request can be routed to a specific proxy (or origin server). + The destination can also be a unix socket. -M src/lib-fs/fs-metawrap.c +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h -2016-04-26 14:27:39 -0600 Michael Slusarz (91ccea17c) +2016-04-28 10:06:21 +0300 Martti Rannanjärvi (e08a3c92e) - man: Add stub for doveadm-fs command + lib-fs: don't append '/' to prefix in posix-fs -M .gitignore -M doc/man/Makefile.am -A doc/man/doveadm-fs.1.in +M src/lib-fs/fs-posix.c -2016-04-26 18:51:55 +0300 Timo Sirainen (eb83d99d3) +2016-04-26 18:51:55 +0300 Timo Sirainen (6de95f63d) lmtp: Connect to anvil earlier while still running as root @@ -25757,7 +51915,7 @@ M src/lmtp/commands.c -2016-04-28 22:33:14 +0300 Timo Sirainen (7f5d5fff7) +2016-04-28 22:33:14 +0300 Timo Sirainen (c1684fd2a) lib: Set timestamp part more accurately in guid_128_generate() @@ -25768,7 +51926,7 @@ M src/lib/guid.c -2016-04-29 21:57:36 +0300 Timo Sirainen (48526bfec) +2016-04-29 21:57:36 +0300 Timo Sirainen (314d5f114) lib-ldap: Make static analyzer happier @@ -25776,7 +51934,7 @@ M src/lib-ldap/ldap-search.c -2016-04-29 20:23:00 +0300 Timo Sirainen (7f68a693c) +2016-04-29 20:23:00 +0300 Timo Sirainen (efdaf9393) auth: Fixed final result in multiple userdbs @@ -25785,7 +51943,7 @@ M src/auth/auth-request.c -2016-04-29 19:59:36 +0300 Timo Sirainen (bbaeb01a3) +2016-04-29 19:59:36 +0300 Timo Sirainen (d0f0b5553) auth: Session ID wasn't exported to auth workers. @@ -25793,7 +51951,7 @@ M src/auth/auth-request.c -2016-04-29 19:25:52 +0300 Timo Sirainen (ae96eaa83) +2016-04-29 19:25:52 +0300 Timo Sirainen (c16f2d072) quota: Added quota_over_flag_lazy_check flag. @@ -25805,7 +51963,7 @@ M src/plugins/quota/quota.c M src/plugins/quota/quota.h -2016-04-29 19:20:11 +0300 Timo Sirainen (31a3bc995) +2016-04-29 19:20:11 +0300 Timo Sirainen (ad3bf8671) quota: dict-quota was broken by 464db6d9d @@ -25814,7 +51972,7 @@ M src/plugins/quota/quota-count.c -2016-04-29 18:58:53 +0300 Timo Sirainen (1548608e9) +2016-04-29 18:58:53 +0300 Timo Sirainen (cfeebb6dd) quota: Cleanup - split quota_over_flag to init & run parts @@ -25825,14 +51983,14 @@ M src/plugins/quota/quota.c M src/plugins/quota/quota.h -2016-04-29 18:55:34 +0300 Timo Sirainen (dcc6ade57) +2016-04-29 18:55:34 +0300 Timo Sirainen (a9c26c907) quota: Fixed debug logging for quota_over_flag M src/plugins/quota/quota.c -2016-04-29 18:53:04 +0300 Timo Sirainen (b3120486f) +2016-04-29 18:53:04 +0300 Timo Sirainen (272fef0a8) quota: Fixed quota_over_flag handling when quota usage==limit @@ -25841,7 +51999,7 @@ M src/plugins/quota/quota.c -2016-04-29 17:21:26 +0300 Timo Sirainen (b6037984f) +2016-04-29 17:21:26 +0300 Timo Sirainen (464db6d9d) quota-count: Cache quota usage within the same ioloop run. @@ -25850,7 +52008,7 @@ M src/plugins/quota/quota-count.c -2016-04-29 17:20:31 +0300 Timo Sirainen (316c00c38) +2016-04-29 17:20:31 +0300 Timo Sirainen (617092b0f) quota-count: Code cleanup - give consistent return value @@ -25858,7 +52016,7 @@ M src/plugins/quota/quota-count.c -2016-04-29 15:50:06 +0300 Timo Sirainen (86d26af6f) +2016-04-29 15:50:06 +0300 Timo Sirainen (8b48c53a8) global: Use buffer_get_writable_size() where possible @@ -25871,7 +52029,7 @@ M src/lib/aqueue.c M src/lib/str.c -2016-04-29 15:42:48 +0300 Timo Sirainen (bd3f28156) +2016-04-29 15:42:48 +0300 Timo Sirainen (62f2f6baf) quota: Optimize handling a large number of expunges. @@ -25881,21 +52039,21 @@ M src/plugins/quota/quota-storage.c -2016-04-29 14:30:46 +0300 Aki Tuomi (a17f0687f) +2016-04-29 14:30:46 +0300 Aki Tuomi (6876b613e) lib-ldap: Set minimum protocol if supported by library M src/lib-ldap/ldap-connection.c -2016-04-29 14:33:45 +0300 Timo Sirainen (ea3a3b638) +2016-04-29 14:33:45 +0300 Timo Sirainen (de8fc9d21) imapc: Fixed EXPUNGE handling when imapc_features didn't have modseq M src/lib-storage/index/imapc/imapc-mailbox.c -2016-04-29 14:07:05 +0300 Timo Sirainen (31a274ee6) +2016-04-29 14:07:05 +0300 Timo Sirainen (749097cae) lib-index: Use a bit larger initial records buffer size @@ -25905,14 +52063,14 @@ M src/lib-index/mail-index-map.c -2016-04-29 13:55:33 +0300 Timo Sirainen (9273e1847) +2016-04-29 13:55:33 +0300 Timo Sirainen (09539f3db) lib: buffer_create_dynamic() now adds +1 to init_size M src/lib/buffer.c -2016-04-29 12:55:52 +0300 Timo Sirainen (83373a25e) +2016-04-29 12:55:52 +0300 Timo Sirainen (50ae8852c) lib: Use p_malloc() explicitly in first buffer_alloc() @@ -25922,7 +52080,7 @@ M src/lib/buffer.c -2016-04-29 12:54:46 +0300 Timo Sirainen (81bbb8ec7) +2016-04-29 12:54:46 +0300 Timo Sirainen (7311925c6) lib: Implement i_realloc(mem==NULL) more efficiently @@ -25931,21 +52089,21 @@ M src/lib/mempool-system.c -2016-04-29 12:34:23 +0300 Timo Sirainen (62219bb5a) +2016-04-29 12:44:09 +0300 Timo Sirainen (2386c9f53) - lib-index: Memory allocation optimization + configure: Fixed (again) --with-ldap=plugin -M src/lib-index/mail-index-map.c +M m4/want_ldap.m4 -2016-04-29 12:44:31 +0300 Timo Sirainen (2dc8e2db1) +2016-04-29 12:34:23 +0300 Timo Sirainen (f7ef214d7) - configure: Fixed (again) --with-ldap=plugin + lib-index: Memory allocation optimization -M configure.ac +M src/lib-index/mail-index-map.c -2016-04-29 10:53:37 +0300 Timo Sirainen (274031f2e) +2016-04-29 10:53:37 +0300 Timo Sirainen (b4715b4a4) fts-lucene: Fixed crash on rescan @@ -25953,7 +52111,7 @@ M src/plugins/fts-lucene/lucene-wrapper.cc -2016-04-28 14:03:41 +0300 Aki Tuomi (46f024002) +2016-04-28 14:03:41 +0300 Aki Tuomi (576495f5f) lib-charset: Do not use //IGNORE on non-GNU system @@ -25961,14 +52119,14 @@ M src/lib-charset/charset-iconv.c M src/lib-charset/test-charset.c -2016-04-29 02:33:58 +0300 Timo Sirainen (18856082d) +2016-04-29 02:33:58 +0300 Timo Sirainen (337ae3d4d) lib-storage: mailbox_set_subscribed() ignores duplicate changes now. M src/lib-storage/mail-storage.c -2016-04-28 15:21:41 +0300 Timo Sirainen (125840997) +2016-04-28 15:21:41 +0300 Timo Sirainen (0b1f4c104) lib-storage: Added index_storage_list_index_has_changed_full() @@ -25978,7 +52136,31 @@ M src/lib-storage/index/index-storage.h M src/lib-storage/index/index-sync.c -2016-04-28 12:53:49 +0300 Timo Sirainen (65e6f715b) +2016-04-28 15:56:45 +0300 Timo Sirainen (2e1ec423f) + + lib-charset: Revert f086fd065 - wrong version + + This wasn't the version that was supposed to be merged.. + +M src/lib-charset/test-charset.c + +2016-04-28 14:03:41 +0300 Aki Tuomi (f086fd065) + + lib-charset: Do not use //IGNORE on non-GNU system + + +M src/lib-charset/test-charset.c + +2016-04-28 15:00:44 +0300 Timo Sirainen (df586de40) + + lib: [io]stream-rawlog.h should auto-include iostream-rawlog.h + + Otherwise compiler will warn about the missing enum. + +M src/lib/istream-rawlog.h +M src/lib/ostream-rawlog.h + +2016-04-28 12:53:49 +0300 Timo Sirainen (f434b3e43) doveadm dump: Added more index ext records. @@ -25986,35 +52168,78 @@ M src/doveadm/doveadm-dump-index.c -2016-04-27 23:58:12 +0300 Timo Sirainen (c05c1b4c1) +2016-04-28 12:45:01 +0300 Timo Sirainen (0ed8bcc50) + + lib-fs: Allow multiple fs_read_stream() calls to seekable istreams. + + This fixes for example calling fs_default_copy() for an istream which was + already opened: + + Panic: file fs-api.c: line 528 (fs_read_stream): assertion failed: + (!file->istream_open) + +M src/lib-fs/fs-api.c + +2016-04-28 12:47:02 +0300 Timo Sirainen (db5d7fbdb) + + lib-fs: Fixed multiple concurrent fs_read_stream() calls + + Return a new limit-istream, so each istream can have its own independent + offset. + +M src/lib-fs/fs-api.c + +2016-04-27 23:58:12 +0300 Timo Sirainen (0bcfa2a64) lazy-expunge: Open the mailbox with ACLs ignored. M src/plugins/lazy-expunge/lazy-expunge-plugin.c -2016-04-27 23:47:09 +0300 Timo Sirainen (f184b31ab) +2016-04-27 23:47:09 +0300 Timo Sirainen (994d09a23) lazy-expunge: Open mailbox with MAILBOX_FLAG_SAVEONLY flag. M src/plugins/lazy-expunge/lazy-expunge-plugin.c -2016-04-19 19:24:52 -0600 Michael Slusarz (9243e0798) +2016-04-19 19:24:52 -0600 Michael Slusarz (e43979fa0) man: Add more complete description of one-way sync M doc/man/doveadm-sync.1.in -2016-04-26 21:07:57 +0300 Timo Sirainen (4ad29d803) +2016-04-20 17:34:53 +0300 Aki Tuomi (df74b8f6f) + + lib: Add PKCS#5 pbkdf1 and 2 + + +M src/lib/Makefile.am +A src/lib/pkcs5.c +A src/lib/pkcs5.h +M src/lib/test-lib.c +M src/lib/test-lib.h +A src/lib/test-pkcs5.c + +2016-04-27 09:14:29 +0300 Aki Tuomi (21e185f46) + + auth: Add PBKDF2 password scheme + + +M src/auth/Makefile.am +A src/auth/password-scheme-pbkdf2.c +M src/auth/password-scheme.c +M src/auth/password-scheme.h + +2016-04-26 21:07:57 +0300 Timo Sirainen (ebf3d1a08) fts: Empty "fts" setting should be same as nonexistent. M src/plugins/fts/fts-storage.c -2016-04-26 17:12:25 +0300 Timo Sirainen (a82c82322) +2016-04-26 17:12:25 +0300 Timo Sirainen (0bd2fecf8) stats: Support multiple FIFO listeners. @@ -26023,14 +52248,22 @@ M src/stats/fifo-input-connection.h M src/stats/main.c -2016-04-26 11:12:45 +0300 Timo Sirainen (9de3ff6e9) +2016-04-26 15:56:40 +0300 Timo Sirainen (a7b9a392a) + + lib-storage: Remove unused mail_storage_service_all_init() + + +M src/lib-storage/mail-storage-service.c +M src/lib-storage/mail-storage-service.h + +2016-04-26 11:12:45 +0300 Timo Sirainen (1c0e48030) doveadm -u: Use mail_storage_service_all_init_mask() M src/doveadm/doveadm-mail.c -2016-04-26 11:11:57 +0300 Timo Sirainen (d5804a03e) +2016-04-26 11:11:57 +0300 Timo Sirainen (55e04e565) lib-storage: Added mail_storage_service_all_init_mask() @@ -26040,7 +52273,7 @@ M src/lib-storage/mail-storage-service.c M src/lib-storage/mail-storage-service.h -2016-04-26 11:10:35 +0300 Baofeng Wang (c87684e46) +2016-04-26 11:10:35 +0300 Baofeng Wang (92c610a38) lib-storage: fixup the broken search result with \seen or \delete @@ -26048,28 +52281,28 @@ M src/lib-storage/index/index-search.c -2016-04-26 10:31:49 +0300 Timo Sirainen (6956285ba) +2016-04-26 10:31:49 +0300 Timo Sirainen (26c0f5a54) lib-sql: Fixed building Cassandra as plugin M src/lib-sql/Makefile.am -2016-04-25 20:14:19 +0300 Timo Sirainen (53d07fbeb) +2016-04-25 20:14:19 +0300 Timo Sirainen (9a85ec311) fts-lucene: Rescan skipped namespace roots. M src/plugins/fts-lucene/lucene-wrapper.cc -2016-04-25 20:13:54 +0300 Timo Sirainen (70d210336) +2016-04-25 20:13:54 +0300 Timo Sirainen (af2564c7f) fts-lucene: Cleanup - move code to a separate function M src/plugins/fts-lucene/lucene-wrapper.cc -2016-04-25 16:58:30 +0300 Timo Sirainen (ad09af2c9) +2016-04-25 16:58:30 +0300 Timo Sirainen (270c7cd66) lib-mail: More fixes to istream-header-filter with large input. @@ -26084,7 +52317,7 @@ M src/lib-mail/istream-header-filter.c M src/lib-mail/test-istream-header-filter.c -2016-04-25 16:34:59 +0300 Timo Sirainen (5fdca8ef2) +2016-04-25 16:34:59 +0300 Timo Sirainen (88d100753) lib-mail: Improved istream-header-filter unit test. @@ -26094,7 +52327,7 @@ M src/lib-mail/test-istream-header-filter.c -2016-04-25 16:25:46 +0300 Timo Sirainen (d7524cf81) +2016-04-25 16:25:46 +0300 Timo Sirainen (76a71915c) lib-mail: istream-header-filter didn't limit memory usage. @@ -26104,7 +52337,7 @@ M src/lib-mail/istream-header-filter.c M src/lib-mail/test-istream-header-filter.c -2016-04-25 16:22:12 +0300 Timo Sirainen (30ad986a3) +2016-04-25 16:22:12 +0300 Timo Sirainen (2719970c2) lib-mail: Code cleanup to istream-header-filter unit test @@ -26113,7 +52346,7 @@ M src/lib-mail/test-istream-header-filter.c -2016-04-25 14:38:35 +0300 Timo Sirainen (7919e9560) +2016-04-25 14:38:35 +0300 Timo Sirainen (805d78344) dsync: If state is invalid, exit with code 2 instead of tempfail. @@ -26126,7 +52359,7 @@ M src/doveadm/dsync/dsync-mailbox-import.c M src/doveadm/dsync/dsync-mailbox-import.h -2016-04-25 14:35:21 +0300 Timo Sirainen (da0b62ea3) +2016-04-25 14:35:21 +0300 Timo Sirainen (3d49dc64d) dsync: If full resync is requested, return empty state string. @@ -26135,14 +52368,29 @@ M src/doveadm/dsync/dsync-brain.c -2016-04-25 14:08:37 +0300 Timo Sirainen (69811d9c7) +2016-04-25 14:08:37 +0300 Timo Sirainen (808fab194) dsync: Improved detecting state state string. M src/doveadm/dsync/dsync-mailbox-import.c -2016-04-15 16:12:44 +0300 Timo Sirainen (c7ea86d25) +2016-04-22 12:37:29 +0300 Martti Rannanjärvi (12e5ac049) + + lib-mail: return void from message_parser_deinit() + + +M src/doveadm/doveadm-mail-fetch.c +M src/lib-imap/test-imap-bodystructure.c +M src/lib-mail/istream-attachment-extractor.c +M src/lib-mail/istream-binary-converter.c +M src/lib-mail/message-parser.c +M src/lib-mail/message-parser.h +M src/lib-mail/message-snippet.c +M src/lib-mail/test-message-parser.c +M src/lib-mail/test-message-part.c + +2016-04-15 16:12:44 +0300 Timo Sirainen (c977ee6ce) lib-storage: Don't use same session ID for multiple mail_storage_service_next() calls. @@ -26155,14 +52403,14 @@ M src/lib-storage/mail-storage-service.c -2016-04-11 17:25:51 +0300 Timo Sirainen (e534a82dc) +2016-04-11 17:25:51 +0300 Timo Sirainen (3d798ec32) fs-posix: If link() fails, preserve its errno through the following unlink() M src/lib-fs/fs-posix.c -2016-04-11 17:20:52 +0300 Timo Sirainen (b7d31e7e7) +2016-04-11 17:20:52 +0300 Timo Sirainen (23e079a85) fs-posix: Minor code cleanup - removed unnecessary code. @@ -26170,7 +52418,20 @@ M src/lib-fs/fs-posix.c -2016-04-22 19:37:57 +0300 Timo Sirainen (0bbaf397a) +2016-04-25 12:07:25 +0300 Timo Sirainen (b540a53c8) + + imapc: Fixed crash caused by pool_unref() API change. + + Calling pool_unref() set the mail_private->pool=NULL, which crashed in + index_mail_free(). Fixed this by removing the unnecessary ref/unref + entirely. We're already waiting in imapc_mail_close() for all the existing + FETCHes to finish, so the callback will always have only valid mails with + valid pools. + +M src/lib-storage/index/imapc/imapc-mail-fetch.c +M src/lib-storage/index/imapc/imapc-mail.c + +2016-04-22 19:37:57 +0300 Timo Sirainen (f7d018e7e) cassandra: Added num_threads, connect_timeout and request_timeout settings. @@ -26178,7 +52439,7 @@ M src/lib-sql/Makefile.am M src/lib-sql/driver-cassandra.c -2016-04-21 19:18:55 +0300 Timo Sirainen (4968bfaf0) +2016-04-21 19:18:55 +0300 Timo Sirainen (f670747b6) lib-dovecot: Avoid duplication of listing *.la in both Makefile.am and configure @@ -26187,7 +52448,7 @@ M configure.ac M src/lib-dovecot/Makefile.am -2016-04-21 18:58:10 +0300 Timo Sirainen (2a81294e4) +2016-04-21 18:58:10 +0300 Timo Sirainen (57729dda3) lib-dict: Moved dict-ldap to lib-dict-extra @@ -26202,7 +52463,7 @@ R100 src/lib-dict/dict-ldap.c src/lib-dict-extra/dict-ldap.c M src/lib-dict/Makefile.am -2016-04-21 18:51:57 +0300 Timo Sirainen (bfbb24b9f) +2016-04-21 18:51:57 +0300 Timo Sirainen (ed77b0bf3) Split parts of lib-dict into lib-dict-extra. @@ -26220,7 +52481,26 @@ M src/lib-dict/Makefile.am M src/lib-dovecot/Makefile.am -2016-04-19 19:08:52 +0300 Timo Sirainen (cfb90f18e) +2016-04-22 22:44:01 +0300 Timo Sirainen (576326ec9) + + .gitignore: Updated to include auto-added m4/* + + +M .gitignore + +2016-04-22 22:36:39 +0300 Timo Sirainen (5b0714069) + + configure, Makefile: Tell autoconf/automake about m4 directory + + To finally get rid of the complaints: + + libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, + libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. + +M Makefile.am +M configure.ac + +2016-04-19 19:08:52 +0300 Timo Sirainen (5e3b05494) doveadm user: Added -e parameter to expand %variables in @@ -26232,7 +52512,7 @@ M src/doveadm/doveadm-auth.c -2016-04-19 19:07:51 +0300 Timo Sirainen (ed2e2ac26) +2016-04-19 19:07:51 +0300 Timo Sirainen (5a1c6ebe5) doveadm user: Code cleanup - move field printing to its own function. @@ -26240,14 +52520,14 @@ M src/doveadm/doveadm-auth.c -2016-04-22 18:35:04 +0300 Timo Sirainen (c6f44125b) +2016-04-22 18:35:04 +0300 Timo Sirainen (7195d775e) lib-mail: Improved test-message-parser further M src/lib-mail/test-message-parser.c -2016-04-22 18:28:20 +0300 Timo Sirainen (80622816d) +2016-04-22 18:28:20 +0300 Timo Sirainen (6df4a174b) lib-mail: Fixed inner MIME part boundary being a prefix of outer boundary. @@ -26255,7 +52535,7 @@ M src/lib-mail/message-parser.c M src/lib-mail/test-message-parser.c -2016-04-22 18:15:44 +0300 Timo Sirainen (55a79cff0) +2016-04-22 18:15:44 +0300 Timo Sirainen (7a12331c6) lib-mail: Fixed handling duplicate boundary prefixes. @@ -26272,7 +52552,7 @@ M src/lib-mail/message-parser.c M src/lib-mail/test-message-parser.c -2016-04-22 16:39:49 +0300 Timo Sirainen (ff1f5155e) +2016-04-22 16:39:49 +0300 Timo Sirainen (088bfb6b2) dsync: Fixed assert-crash in rename algorithm @@ -26282,7 +52562,7 @@ M src/doveadm/dsync/dsync-mailbox-tree-sync.c M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c -2016-04-22 16:28:56 +0300 Timo Sirainen (66da5866e) +2016-04-22 16:28:56 +0300 Timo Sirainen (e51f8aa02) dsync: Determine better when rename-algorithm might have gotten stuck. @@ -26293,7 +52573,7 @@ M src/doveadm/dsync/dsync-mailbox-tree-sync.c -2016-04-22 16:25:00 +0300 Timo Sirainen (412fb67b9) +2016-04-22 16:25:00 +0300 Timo Sirainen (34b0579f1) dsync: Fixed crash when rename algorithm thinks it has gone to infinite loop. @@ -26304,7 +52584,17 @@ M src/doveadm/dsync/dsync-mailbox-tree-sync.c M src/doveadm/dsync/dsync-mailbox-tree.h -2016-04-21 17:55:51 +0300 Timo Sirainen (973c6d6d8) +2016-04-21 17:59:19 +0300 Timo Sirainen (0ee52dafc) + + lib-fs: Assert-crash if file's istream isn't closed at fs_file_close() + + Some backends can't guarantee that the istream stays usable after the file + is closed. + +M src/lib-fs/fs-api-private.h +M src/lib-fs/fs-api.c + +2016-04-21 17:55:51 +0300 Timo Sirainen (ab41e122a) lib-fs: fs-metawrap stat() and get_metadata(): use existing istream if possible @@ -26314,7 +52604,7 @@ M src/lib-fs/fs-metawrap.c -2016-04-21 17:54:54 +0300 Timo Sirainen (5c201395f) +2016-04-21 17:54:54 +0300 Timo Sirainen (b2ff0468c) lib-fs: Added initial fs-metawrap unit test. @@ -26322,7 +52612,7 @@ M src/lib-fs/Makefile.am A src/lib-fs/test-fs-metawrap.c -2016-04-21 17:52:44 +0300 Timo Sirainen (bdff78333) +2016-04-21 17:52:44 +0300 Timo Sirainen (140afad72) lib-fs: Added fs-test backend for helping with creation of fs-wrapper unit tests. @@ -26334,7 +52624,7 @@ A src/lib-fs/fs-test.c A src/lib-fs/fs-test.h -2016-04-20 23:01:45 +0300 Timo Sirainen (06c326243) +2016-04-20 23:01:45 +0300 Timo Sirainen (800bb6860) lib: var_expand() now expands %{nonexistent} to UNSUPPORTED_VARIABLE_nonexistent @@ -26346,16 +52636,55 @@ M src/lib/test-var-expand.c M src/lib/var-expand.c -2016-04-21 21:45:02 +0300 Timo Sirainen (de73aa2bd) +2016-04-21 21:45:02 +0300 Timo Sirainen (0e6e3cc7e) + + lib-ssl-iostream: Return stacked errors as single combined string. + + Instead of logging stacked errors as separate log lines, which don't provide + any context of what created them. + +M src/lib-ssl-iostream/iostream-openssl-common.c + +2016-04-22 00:21:12 +0300 Timo Sirainen (90355e35d) + + imapc: Added support for imapc_features=modseq + + If the remote server supports CONDSTORE or QRESYNC extensions we'll use the + remote's MODSEQ and HIGHESTMODSEQ counts. + + There are some situations where the HIGHESTMODSEQ isn't updated exactly + correctly on an open mailbox, so this feature shouldn't be fully relied on. + It was primarily implemented for dsync+imapc support - both for preserving + modseqs and also for HIGHESTMODSEQ lookups. + +M src/lib-storage/index/imapc/imapc-mail.c +M src/lib-storage/index/imapc/imapc-mailbox.c +M src/lib-storage/index/imapc/imapc-settings.c +M src/lib-storage/index/imapc/imapc-settings.h +M src/lib-storage/index/imapc/imapc-storage.c +M src/lib-storage/index/imapc/imapc-storage.h +M src/lib-storage/index/imapc/imapc-sync.c + +2016-04-20 17:24:06 +0300 Baofeng Wang (84c1b1af9) + + liblib: pool_unref() should always set pool=NULL (alloconly pool) + + set pool to NULL before return. + +M src/lib/mempool-alloconly.c + +2016-03-22 10:24:22 -0400 Lennart Weller (972c9172e) - lib-ssl-iostream: Return stacked errors as single combined string. + Support multiple recipient_delimiters - Instead of logging stacked errors as separate log lines, which don't provide - any context of what created them. + The recipient_delimiter is treated as multiple one-character delimiters + rather than one multi-character delimiter if more than one character is + supplied. The address is split on the first character in recipient_delimiter + found. -M src/lib-ssl-iostream/iostream-openssl-common.c +M src/lmtp/commands.c -2016-04-19 16:55:02 +0300 Timo Sirainen (2f1be1ff6) +2016-04-19 16:55:02 +0300 Timo Sirainen (93c9909f6) lib-http: Include information about number of request attempts and its timing in response reason. @@ -26373,35 +52702,91 @@ M src/lib-http/http-client-request.c M src/lib-http/http-client.h -2016-04-22 16:00:36 +0300 Timo Sirainen (2335ab1f9) - - push-notification: Small optimization - don't lookup uidvalidity for each - message. - - -M src/plugins/push-notification/push-notification-txn-msg.c - -2016-04-22 00:21:12 +0300 Timo Sirainen (11c704a3d) - - imapc: Added support for imapc_features=modseq +2016-04-19 14:51:15 +0300 Aki Tuomi (cca227d29) - If the remote server supports CONDSTORE or QRESYNC extensions we'll use the - remote's MODSEQ and HIGHESTMODSEQ counts. + configure: Move checks to separate m4 files - There are some situations where the HIGHESTMODSEQ isn't updated exactly - correctly on an open mailbox, so this feature shouldn't be fully relied on. - It was primarily implemented for dsync+imapc support - both for preserving - modseqs and also for HIGHESTMODSEQ lookups. -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-settings.h -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/index/imapc/imapc-sync.c +M Makefile.am +M autogen.sh +M configure.ac +A m4/ac_checktype2.m4 +A m4/ac_typeof.m4 +A m4/blockdev.m4 +A m4/c99_vsnprintf.m4 +A m4/cc_clang.m4 +A m4/cflags.m4 +A m4/clock_gettime.m4 +A m4/crypt.m4 +A m4/crypt_xpg6.m4 +A m4/dbqlk.m4 +A m4/dirent_dtype.m4 +R100 dovecot.m4 m4/dovecot.m4 +A m4/endian.m4 +A m4/fd_passing.m4 +A m4/fdatasync.m4 +A m4/flexible_array_member.m4 +A m4/gc.m4 +A m4/glibc.m4 +A m4/gmtime_max.m4 +A m4/gmtime_tm_gmtoff.m4 +A m4/ioloop.m4 +A m4/iovec.m4 +A m4/ipv6.m4 +A m4/libcap.m4 +A m4/libwrap.m4 +A m4/linux_mremap.m4 +A m4/mmap_write.m4 +A m4/mntctl.m4 +A m4/modules.m4 +A m4/notify.m4 +A m4/nsl.m4 +A m4/off_t_max.m4 +A m4/pr_set_dumpable.m4 +A m4/q_quotactl.m4 +A m4/quota.m4 +A m4/rlimit.m4 +A m4/sendfile.m4 +A m4/size_t_signed.m4 +A m4/sockpeercred.m4 +A m4/sql.m4 +A m4/ssl.m4 +A m4/st_tim.m4 +A m4/test_with.m4 +A m4/time_t_signed.m4 +A m4/typeof.m4 +A m4/typeof_dev_t.m4 +A m4/unsetenv.m4 +A m4/vararg.m4 +A m4/want_bsdauth.m4 +A m4/want_bzlib.m4 +A m4/want_cassandra.m4 +A m4/want_cdb.m4 +A m4/want_checkpassword.m4 +A m4/want_clucene.m4 +A m4/want_db.m4 +A m4/want_gssapi.m4 +A m4/want_icu.m4 +A m4/want_ldap.m4 +A m4/want_lz4.m4 +A m4/want_lzma.m4 +A m4/want_mysql.m4 +A m4/want_nss.m4 +A m4/want_pam.m4 +A m4/want_passwd.m4 +A m4/want_pgsql.m4 +A m4/want_prefetch.m4 +A m4/want_shadow.m4 +A m4/want_sia.m4 +A m4/want_solr.m4 +A m4/want_sqlite.m4 +A m4/want_stemmer.m4 +A m4/want_textcat.m4 +A m4/want_vpopmail.m4 +A m4/want_zlib.m4 +A m4/warnings.m4 -2016-04-22 20:31:02 +0300 Timo Sirainen (58e4e5b37) +2016-04-22 20:31:02 +0300 Timo Sirainen (a77d7cc71) lib: Fix to previous istream-timeout commit @@ -26410,7 +52795,7 @@ M src/lib/istream-timeout.c -2016-04-22 20:10:34 +0300 Timo Sirainen (81672c783) +2016-04-22 20:10:34 +0300 Timo Sirainen (9766afd8d) lib: Improved istream-timeout error message. @@ -26420,14 +52805,22 @@ M src/lib/istream-timeout.c -2016-04-17 21:15:30 +0300 Timo Sirainen (ceefe5b61) +2016-04-17 21:15:30 +0300 Timo Sirainen (c72cfe4a2) cassandra: Added support for user and password settings. M src/lib-sql/driver-cassandra.c -2016-04-21 21:41:23 +0300 Timo Sirainen (b9e1531c8) +2016-04-22 16:00:36 +0300 Timo Sirainen (2d7ad82a3) + + push-notification: Small optimization - don't lookup uidvalidity for each + message. + + +M src/plugins/push-notification/push-notification-txn-msg.c + +2016-04-21 21:41:23 +0300 Timo Sirainen (e69026539) lib-ssl-iostream: Fixed reporting errors returned by OpenSSL. @@ -26436,28 +52829,95 @@ M src/lib-ssl-iostream/iostream-openssl-common.c -2016-04-15 23:59:24 +0200 Stephan Bosch (2a9968850) +2016-04-15 13:14:16 +0300 Martti Rannanjärvi (556d69b89) - lib-http: client: Implemented means to set request payload buffer rather - than an input stream. + imap: add variables to default imap_logout_format - This is not purely a convenience function: there have been bugs caused by - allocating a data input stream from a datastack buffer. With this function, - the buffer is copied to the request pool, so that it is durably allocated - while the request exists. This prevents futher mishaps. The server already - has an equivalent function for its response object. -M src/lib-http/http-client-request.c -M src/lib-http/http-client.h +M doc/example-config/conf.d/20-imap.conf +M src/imap/imap-settings.c + +2016-04-20 14:51:22 +0300 Martti Rannanjärvi (c1f5ec50a) + + lib-http, lib-mail, lib-storage: parent unrefs + + Remove some unneccesary parent unrefs from i_stream_*_destroys. Don't know + too many or too few were removed. + +M src/lib-http/http-server-request.c +M src/lib-http/http-transfer-chunked.c +M src/lib-mail/istream-header-filter.c +M src/lib-storage/index/mbox/istream-raw-mbox.c + +2016-04-19 14:09:01 +0300 Martti Rannanjärvi (899653bd8) + + lib: remove unneccesary i_stream_unrefs of parent + + +M src/lib/istream-failure-at.c +M src/lib/istream-limit.c +M src/lib/istream-rawlog.c +M src/lib/istream-sized.c + +2016-04-19 12:23:54 +0300 Timo Sirainen (5a1b498b6) + + lib: When istream is destroyed, it now always unrefs the parent istream if + it exists. + + This way the implementations don't have to do it themselves in their + destroy() function. This change doesn't necessarily require changing the + existing code, because if the istream implementation already unrefs the + parent it gets set to NULL so the auto-unref won't be done. + +M src/lib/iostream-private.h +M src/lib/iostream.c +M src/lib/istream-tee.c +M src/lib/istream.c +M src/lib/ostream.c + +2016-04-21 14:22:10 +0300 Martti Rannanjärvi (2982cfa23) + + doveadm: \f\n only between pages in pager + + No more \f\n in the end. + +M src/doveadm/doveadm-print-pager.c + +2016-04-21 16:02:39 +0300 Baofeng Wang (ac9600ec5) + + fixup: fix task for `lib-dict: remove dict_append()' + + +M src/lib-dict/dict-db.c +M src/lib-dict/dict-fs.c +M src/lib-dict/dict-memcached.c + +2016-04-20 17:24:51 +0300 Baofeng Wang (373b27178) + + lib-dict: remove dict_append() + + Remove all *_dict_append and redis_append functions and corresponding + command from lib-dict. + +M src/dict/dict-commands.c +M src/lib-dict/dict-client.c +M src/lib-dict/dict-file.c +M src/lib-dict/dict-ldap.c +M src/lib-dict/dict-memcached-ascii.c +M src/lib-dict/dict-private.h +M src/lib-dict/dict-redis.c +M src/lib-dict/dict-sql.c +M src/lib-dict/dict.c +M src/lib-dict/dict.h -2016-04-20 19:34:05 +0300 Timo Sirainen (7ce6777f7) +2016-04-20 19:34:05 +0300 Timo Sirainen (d5cfdf518) zlib: Compiling fix to a1630a3b3 - don't return a void function M src/plugins/zlib/zlib-plugin.c -2016-04-20 17:10:17 +0300 Timo Sirainen (a6a14c762) +2016-04-20 17:10:17 +0300 Timo Sirainen (f5a105b5e) lazy-expunge: Fixed using a mailbox (instead of namespace) as lazy_expunge destination. @@ -26467,7 +52927,7 @@ M src/plugins/lazy-expunge/lazy-expunge-plugin.c -2016-04-20 02:23:31 +0300 Timo Sirainen (61c30c7cd) +2016-04-20 02:23:31 +0300 Timo Sirainen (f330b7d9e) lib-index: If opening a cache file fails, try again later. @@ -26477,7 +52937,7 @@ M src/lib-index/mail-cache-compress.c M src/lib-index/mail-cache.c -2016-04-20 00:29:49 +0300 Timo Sirainen (06bed4f40) +2016-04-20 00:29:49 +0300 Timo Sirainen (46d91e9ea) lib-index: Fixed calling mail_cache_open_and_verify() on an already open cache. @@ -26494,7 +52954,7 @@ M src/lib-index/mail-cache.c -2016-04-20 02:47:13 +0300 Timo Sirainen (31349fd1e) +2016-04-20 02:47:13 +0300 Timo Sirainen (a1630a3b3) zlib plugin: Make sure we don't keep mail istream referenced after mail is closed. @@ -26502,7 +52962,56 @@ M src/plugins/zlib/zlib-plugin.c -2016-04-14 19:04:28 +0300 Timo Sirainen (b1c7419b9) +2016-04-18 15:40:56 +0300 Baofeng (d34a07d36) + + expire-plugin: code cleanup + + expire_mail_namespaces_created() will check dict_uri after namespace + validation check. + +M src/plugins/expire/expire-plugin.c + +2016-04-16 02:05:28 +0200 Stephan Bosch (2a9cadfcc) + + lib-http: client: Added pure attribute to some of the request property + functions. + + +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h + +2016-04-16 02:03:10 +0200 Stephan Bosch (5a3782467) + + lib-http: client: Cleaned up headers and added some more documentation + there. + + +M src/lib-http/http-client-private.h +M src/lib-http/http-client.h + +2016-04-15 23:59:24 +0200 Stephan Bosch (7a13cd226) + + lib-http: client: Implemented means to set request payload buffer rather + than an input stream. + + This is not purely a convenience function: there have been bugs caused by + allocating a data input stream from a datastack buffer. With this function, + the buffer is copied to the request pool, so that it is durably allocated + while the request exists. This prevents futher mishaps. The server already + has an equivalent function for its response object. + +M src/lib-http/http-client-request.c +M src/lib-http/http-client.h + +2016-04-19 21:14:37 +0300 Timo Sirainen (9e9711ebe) + + lib: Fixed bits_required64() with 32bit systems. + + Broken by 84f697c5e30565823619abaaeb57164c789d4b66. + +M src/lib/bits.h + +2016-04-14 19:04:28 +0300 Timo Sirainen (f2d7ae020) lazy-expunge: Allow lazy_expunge setting to point to a mailbox in any namespace. @@ -26512,7 +53021,132 @@ M src/plugins/lazy-expunge/lazy-expunge-plugin.c -2016-04-18 16:40:49 +0300 Timo Sirainen (882807103) +2016-02-05 15:57:30 +0200 Phil Carmody (84f697c5e) + + lib: bits - GCC (and clang) provide bit-twiddle intrinsics, use them + + Signed-off-by: Phil Carmody + +M src/lib/bits.c +M src/lib/bits.h + +2016-02-05 15:55:15 +0200 Phil Carmody (943ba393d) + + lib: test-bits - add fraclog test for most usual case, constant fracbits + + Were there to be any difference between the constant and non-constant tests, + then it would be a compiler error, but it's better to be defensive and know + about that case. + + Signed-off-by: Phil Carmody + +M src/lib/test-bits.c + +2016-02-03 19:18:21 +0200 Phil Carmody (20be2a7b3) + + lib: test-bits - test the new fractional log helpers + + Ensure that the beginning and end of every bucket range are both mapped into + that bucket. It also checks that the bucket ranges are contiguous. Assuming + the function's weakly monatonic, this is as good as testing every single + value. + + Signed-off-by: Phil Carmody + +M src/lib/test-bits.c + +2016-02-03 18:34:13 +0200 Phil Carmody (bb0eabc25) + + lib: bits - new fractional log-like helper + + For stats gathering, where the data can have a wide range of values, you + don't necessarily need the same granularity along the full range of values. + For example, 1ms and 11ms latencies are very different, but 1.001s and + 1.011s latencies are not worth distinguishing. Something logarithmic seems + more apt. Simply looking at power-of-2 sized bands (e.g. doing log2(n)), + however, is too granular, so these new helpers let you specify how fine to + (linearly) subdivide each of those bands. 1 fractional bit splits each power + of 2 band into 2 halves. 2 fractional bits splits each power of 2 band into + 4 quarters, and so on. 0 fractional bits is just log2(). + + Exact identification of percentiles is impossible, but it was anyway, as you + simply cannot store all the data required to calculate them. However, a mere + 896 buckets will permit you to have 32 bands per power of 2, 5 fracional + bits. The above example would have buckets such as 2.432s-2.496s, and + 55.3s-56.3s. Assuming smooth distribution lets you calculate percentiles + more accurately, just assume within each bucket is a trapezial distribution. + This holds even if the distribution is multi-modal, which it will be. + However, maths required. + + Signed-off-by: Phil Carmody + +M src/lib/bits.h + +2016-02-03 17:37:27 +0200 Phil Carmody (070088860) + + lib: test-array - test new element-assigning iterator + + Test that both (small) object copying and const/nonconst pointer copies + work. + + Signed-off-by: Phil Carmody + +M src/lib/test-array.c + +2016-02-03 17:33:05 +0200 Phil Carmody (2d7293239) + + lib: array - new copy-making array iterator + + Previously macros took a pointer, and that pointer was made to pointed to + each element of the array in turn. Typical use cases for things like char* + or struct* arrays were to immediately/repeatedly, dereference that pointer. + + This new iter (only one implementation done so far, more a proof of concept) + gets rid of the user-visable pointer, and performs the dereference every + time, and only when, a valid element is being iterated over. Empty array => + no assignment. No U.B. + + NOTE: This cannot be done without assuming C99. It breaks the build on + compilers that old if any components that are enabled use the macro. It + strongly suggests we just need to make C99 mandatory. + + Signed-off-by: Phil Carmody + +M src/lib/array.h + +2016-04-08 13:34:59 +0300 Martti Rannanjärvi (fc7dde204) + + Require IPv6 to build + + +M configure.ac +M src/auth/auth-penalty.c +M src/director/mail-host.c +M src/lib-http/test-http-url.c +M src/lib-imap/imap-keepalive.c +M src/lib-imap/test-imap-url.c +M src/lib/net.c +M src/lib/net.h +M src/lib/test-net.c +M src/lib/uri-util.c +M src/login-common/client-common.c +M src/master/main.c + +2016-04-08 14:30:40 +0300 Martti Rannanjärvi (9ef0a41be) + + doveadm: print to stdout in table formatter + + +M src/doveadm/doveadm-print-table.c + +2016-04-14 15:19:09 +0300 Martti Rannanjärvi (575fa28d9) + + lib-sql: ssl_verify_server_cert=1 default on mysql + + +M src/lib-sql/driver-mysql.c + +2016-04-18 16:40:49 +0300 Timo Sirainen (e5a3e4396) lib: Implement utc_mktime() with timegm() if it exists. @@ -26521,7 +53155,7 @@ M configure.ac M src/lib/utc-mktime.c -2016-04-19 11:55:00 +0300 Timo Sirainen (d1e486700) +2016-04-19 11:55:00 +0300 Timo Sirainen (b484ab4b5) auth: Added passdb/userdb { auth_verbose } setting. @@ -26532,7 +53166,7 @@ M src/auth/auth-settings.c M src/auth/auth-settings.h -2016-04-19 16:59:48 +0300 Timo Sirainen (6d85cb1ec) +2016-04-19 16:59:48 +0300 Timo Sirainen (291ce16ff) lib-storage: Added MAIL_STORAGE_CLASS_FLAG_NO_LIST_DELETES and MAILBOX_LIST_FLAG_NO_DELETES @@ -26543,14 +53177,49 @@ M src/lib-storage/mail-storage.c M src/lib-storage/mailbox-list.h -2016-04-15 14:51:42 +0300 Timo Sirainen (40e574795) +2016-04-14 14:39:52 +0300 Martti Rannanjärvi (84d2707fd) + + director: director_consistent_hashing=yes default + + +M src/director/director-settings.c + +2016-04-18 21:52:37 +0300 Timo Sirainen (c1d01419f) + + director: Compiler warning fix + + +M src/director/main.c + +2016-04-14 14:12:08 +0300 Martti Rannanjärvi (378fcd5bd) + + lib-storage: mdbox_rotate_size=10M default + + +M doc/example-config/conf.d/10-mail.conf +M src/lib-storage/index/dbox-multi/mdbox-settings.c + +2016-04-15 10:02:20 +0300 Baofeng (5545acdd3) + + director: Remove director_doveadm_port + + the flag is obsoleted by inet_listener doveadm name. And + listener_get_socket_type_fallback() will fallback to token ring when socket + name is missing. + +M doc/example-config/conf.d/10-director.conf +M src/director/director-settings.c +M src/director/director-settings.h +M src/director/main.c + +2016-04-15 14:51:42 +0300 Timo Sirainen (84ba16ca6) stats plugin: stats_notify_path can now specify path to the stats-mail FIFO M src/plugins/stats/stats-plugin.c -2016-04-15 15:01:20 +0300 Timo Sirainen (14e2d7575) +2016-04-15 15:01:20 +0300 Timo Sirainen (ba081c6b0) lib-stats: Handle better write() to stats process failing with EAGAIN @@ -26560,7 +53229,7 @@ M src/lib-stats/stats-connection.c -2016-04-13 23:12:00 +0200 Stephan Bosch (6da64a8fd) +2016-04-13 23:12:00 +0200 Stephan Bosch (31300f53e) lib-http: server: Prevent aborting finished or already aborted requests again. @@ -26568,21 +53237,21 @@ M src/lib-http/http-server-request.c -2016-04-13 17:19:52 +0300 Timo Sirainen (b025075e4) +2016-04-13 17:19:52 +0300 Timo Sirainen (60c456353) configure: Fixed building lib-ldap / dict-ldap --with-ldap=plugin M configure.ac -2016-04-13 17:17:53 +0300 Timo Sirainen (c6f4485a0) +2016-04-13 17:17:53 +0300 Timo Sirainen (cabe36c08) lib-dict: Don't build dict-ldap if --with-ldap=no M src/lib-dict/Makefile.am -2016-04-13 13:47:51 +0300 Timo Sirainen (ee73d9657) +2016-04-13 13:47:51 +0300 Timo Sirainen (cb445bd4e) doveconf: Improved the warning message about global setting not overriding a filter @@ -26590,6 +53259,13 @@ M src/config/config-parser.c +2016-04-13 13:40:31 +0300 Timo Sirainen (592289f4d) + + configure: Switched version number to 2.3.devel + + +M configure.ac + 2016-04-13 11:22:12 +0300 Aki Tuomi (45fee9df4) lib-dict: Disable debug log unless debug enabled diff -Nru dovecot-2.2.33.2/config.h.in dovecot-2.3.3/config.h.in --- dovecot-2.2.33.2/config.h.in 2017-08-15 20:20:55.000000000 +0000 +++ dovecot-2.3.3/config.h.in 2018-06-18 18:16:34.000000000 +0000 @@ -30,6 +30,9 @@ /* LDAP support is built in */ #undef BUILTIN_LDAP +/* Lua support is builtin */ +#undef BUILTIN_LUA + /* IMAP capabilities advertised in banner */ #undef CAPABILITY_BANNER_STRING @@ -45,7 +48,7 @@ /* Define if your dev_t is a structure instead of integer type */ #undef DEV_T_STRUCT -/* Path to /dev/urandom */ +/* Path to random source */ #undef DEV_URANDOM_PATH /* Disable asserts */ @@ -72,6 +75,9 @@ /* How to define flexible array members in structs */ #undef FLEXIBLE_ARRAY_MEMBER +/* Define this if you have arc4random_buf() */ +#undef HAVE_ARC4RANDOM + /* Build with ASN1_STRING_get0_data() support */ #undef HAVE_ASN1_STRING_GET0_DATA @@ -93,6 +99,10 @@ /* Define if you have the clock_gettime function */ #undef HAVE_CLOCK_GETTIME +/* Define to 1 if you have the declaration of `getrandom', and to 0 if you + don't. */ +#undef HAVE_DECL_GETRANDOM + /* Define if you have struct dirent->d_type */ #undef HAVE_DIRENT_D_TYPE @@ -138,12 +148,6 @@ /* Define if you want textcat support for FTS */ #undef HAVE_FTS_TEXTCAT -/* Define to 1 if you have the header file. */ -#undef HAVE_GC_GC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GC_H - /* Define to 1 if you have the `getmntent' function. */ #undef HAVE_GETMNTENT @@ -159,6 +163,9 @@ /* Define to 1 if you have the `getpeerucred' function. */ #undef HAVE_GETPEERUCRED +/* Define to 1 if you have the `getrandom' function. */ +#undef HAVE_GETRANDOM + /* Define to 1 if you have the `glob' function. */ #undef HAVE_GLOB @@ -224,6 +231,9 @@ */ #undef HAVE_KRB5_GSS_REGISTER_ACCEPTOR_IDENTITY +/* Define this if you have libbsd */ +#undef HAVE_LIBBSD + /* libcap is installed for cap_init() */ #undef HAVE_LIBCAP @@ -236,6 +246,9 @@ /* Define if you want ICU normalization support for FTS */ #undef HAVE_LIBICU +/* Define if you have libsodium */ +#undef HAVE_LIBSODIUM + /* Define to 1 if you have the header file. */ #undef HAVE_LIBTEXTCAT_TEXTCAT_H @@ -257,6 +270,9 @@ /* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF +/* Define to 1 if you have lua */ +#undef HAVE_LUA + /* Define if you have lz4 library */ #undef HAVE_LZ4 @@ -296,7 +312,7 @@ /* Define if your MySQL library supports setting cipher */ #undef HAVE_MYSQL_SSL_CIPHER -/* Define if your MySQL library supports verifying the name in the SSL +/* Defineif your MySQL library supports verifying the name in the SSL certificate */ #undef HAVE_MYSQL_SSL_VERIFY_SERVER_CERT @@ -423,6 +439,9 @@ /* Build with SSL/TLS support */ #undef HAVE_SSL +/* Define if you have SSL_CIPHER_get_kx_nid */ +#undef HAVE_SSL_CIPHER_get_kx_nid + /* Define if you have SSL_clear_options */ #undef HAVE_SSL_CLEAR_OPTIONS @@ -432,6 +451,18 @@ /* Build with SSL_COMP_free_compression_methods() support */ #undef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS +/* Define if you have SSL_CTX_add0_chain_cert */ +#undef HAVE_SSL_CTX_ADD0_CHAIN_CERT + +/* Define if you have SSL_CTX_set1_curves_list */ +#undef HAVE_SSL_CTX_SET1_CURVES_LIST + +/* Define if you have SSL_CTX_set_current_cert */ +#undef HAVE_SSL_CTX_SET_CURRENT_CERT + +/* Define if you have SSL_CTX_set_min_proto_version */ +#undef HAVE_SSL_CTX_SET_MIN_PROTO_VERSION + /* Build with TLS hostname support */ #undef HAVE_SSL_GET_SERVERNAME @@ -600,7 +631,7 @@ /* Use Linux inotify */ #undef IOLOOP_NOTIFY_INOTIFY -/* Use BSD kqueue directory changes notificaton */ +/* Use BSD kqueue directory changes notification */ #undef IOLOOP_NOTIFY_KQUEUE /* No special notify support */ @@ -621,9 +652,6 @@ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR -/* List of compiled in mail storages */ -#undef MAIL_STORAGES - /* Required memory alignment */ #undef MEM_ALIGN_SIZE @@ -696,12 +724,18 @@ /* Define if pread/pwrite needs _XOPEN_SOURCE 500 */ #undef PREAD_WRAPPERS +/* printf() fmt for dec time_t */ +#undef PRIdTIME_T + /* printf() format for size_t */ #undef PRIuSIZE_T /* printf() format for uoff_t */ #undef PRIuUOFF_T +/* printf() fmt for hex time_t */ +#undef PRIxTIME_T + /* Define if process title can be changed by modifying argv */ #undef PROCTITLE_HACK @@ -726,6 +760,9 @@ /* C99 static array */ #undef STATIC_ARRAY +/* Building with static code analyzer */ +#undef STATIC_CHECKER + /* reasonable mntctl buffer size */ #undef STATIC_MTAB_SIZE @@ -753,15 +790,15 @@ /* Define if off_t is long long */ #undef UOFF_T_LONG_LONG +/* Maximum value of uoff_t */ +#undef UOFF_T_MAX + /* Build with checkpassword userdb support */ #undef USERDB_CHECKPASSWORD /* Build with LDAP support */ #undef USERDB_LDAP -/* Build with NSS module support */ -#undef USERDB_NSS - /* Build with passwd support */ #undef USERDB_PASSWD @@ -777,9 +814,6 @@ /* Build with vpopmail support */ #undef USERDB_VPOPMAIL -/* Define if you want to use Boehm GC */ -#undef USE_GC - /* A 'va_copy' style function */ #undef VA_COPY diff -Nru dovecot-2.2.33.2/configure dovecot-2.3.3/configure --- dovecot-2.2.33.2/configure 2017-10-20 13:34:49.000000000 +0000 +++ dovecot-2.3.3/configure 2018-10-01 10:40:13.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Dovecot 2.2.33.2. +# Generated by GNU Autoconf 2.69 for Dovecot 2.3.3. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='Dovecot' PACKAGE_TARNAME='dovecot' -PACKAGE_VERSION='2.2.33.2' -PACKAGE_STRING='Dovecot 2.2.33.2' +PACKAGE_VERSION='2.3.3' +PACKAGE_STRING='Dovecot 2.3.3' PACKAGE_BUGREPORT='dovecot@dovecot.org' PACKAGE_URL='' @@ -639,7 +639,10 @@ abs_top_builddir RUN_TEST VALGRIND +PANDOC NOPLUGIN_LDFLAGS +BINARY_LDFLAGS +BINARY_CFLAGS SETTING_FILES HAVE_APPARMOR_FALSE HAVE_APPARMOR_TRUE @@ -663,6 +666,8 @@ QUOTA_LIBS HAVE_RQUOTA_FALSE HAVE_RQUOTA_TRUE +LIBTIRPC_LIBS +LIBTIRPC_CFLAGS RPCGEN BUILD_ZLIB_PLUGIN_FALSE BUILD_ZLIB_PLUGIN_TRUE @@ -691,9 +696,7 @@ LIBDOVECOT_DEPS LIBDOVECOT_LA_LIBS LIBDOVECOT -mailbox_list_drivers LINKED_STORAGE_LDADD -LINKED_STORAGE_LIBS dict_drivers CDB_LIBS DICT_LIBS @@ -711,7 +714,14 @@ AUTH_CFLAGS MODULE_SUFFIX MODULE_LIBS -CRYPT_LIBS +HAVE_LUA_FALSE +HAVE_LUA_TRUE +AUTH_LUA_PLUGIN_FALSE +AUTH_LUA_PLUGIN_TRUE +BUILD_LIBSODIUM_FALSE +BUILD_LIBSODIUM_TRUE +LIBSODIUM_LIBS +LIBSODIUM_CFLAGS MYSQL_CONFIG PG_CONFIG HAVE_LDAP_FALSE @@ -724,20 +734,30 @@ KRB5_CFLAGS KRB5_LIBS KRB5CONFIG +LUA_LIBS +LUA_CFLAGS +SSL_VERSION_GE_102_FALSE +SSL_VERSION_GE_102_TRUE BUILD_DCRYPT_OPENSSL_FALSE BUILD_DCRYPT_OPENSSL_TRUE BUILD_OPENSSL_FALSE BUILD_OPENSSL_TRUE -SSL_VERSION_GE_102_FALSE -SSL_VERSION_GE_102_TRUE SSL_LIBS SSL_CFLAGS +CRYPT_LIBS DOVECOT_PLUGIN_DEPS_FALSE DOVECOT_PLUGIN_DEPS_TRUE TCPWRAPPERS_FALSE TCPWRAPPERS_TRUE LIBWRAP_LIBS LIBCAP +HAVE_WHOLE_ARCHIVE_FALSE +HAVE_WHOLE_ARCHIVE_TRUE +LD_NO_WHOLE_ARCHIVE +LD_WHOLE_ARCHIVE +RELRO_LDFLAGS +PIE_LDFLAGS +PIE_CFLAGS LTLIBICONV LIBICONV CXXCPP @@ -798,7 +818,6 @@ BUILD_DOCS_FALSE BUILD_DOCS_TRUE moduledir -mail_storages HAVE_SYSTEMD_FALSE HAVE_SYSTEMD_TRUE systemdsystemunitdir @@ -885,9 +904,12 @@ ac_subst_files='' ac_user_opts=' enable_option_checking +with_libbsd enable_silent_rules enable_maintainer_mode +enable_hardening enable_devel_checks +enable_static_checker enable_asserts with_shared_libs with_mem_align @@ -912,6 +934,7 @@ with_textcat with_icu with_solr +with_sodium with_zlib with_bzlib with_lzma @@ -923,8 +946,6 @@ with_rundir with_statedir with_systemdsystemunitdir -with_gc -with_storages with_moduledir with_docs enable_dependency_tracking @@ -939,6 +960,8 @@ enable_rpath with_libiconv_prefix enable_largefile +with_random_source +with_lua with_apparmor ' ac_precious_vars='build_alias @@ -960,12 +983,19 @@ CXXCPP SSL_CFLAGS SSL_LIBS +LUA_CFLAGS +LUA_LIBS +LIBSODIUM_CFLAGS +LIBSODIUM_LIBS +LIBTIRPC_CFLAGS +LIBTIRPC_LIBS CLUCENE_CFLAGS CLUCENE_LIBS LIBEXTTEXTCAT_CFLAGS LIBEXTTEXTCAT_LIBS LIBICU_CFLAGS -LIBICU_LIBS' +LIBICU_LIBS +PANDOC' # Initialize some variables set by options. @@ -1516,7 +1546,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Dovecot 2.2.33.2 to adapt to many kinds of systems. +\`configure' configures Dovecot 2.3.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1587,7 +1617,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Dovecot 2.2.33.2:";; + short | recursive ) echo "Configuration of Dovecot 2.3.3:";; esac cat <<\_ACEOF @@ -1600,7 +1630,10 @@ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-hardening=yes Enable various hardenings (default: yes) --enable-devel-checks Enable some extra expensive checks for developers + --enable-static-checker Enable code to be used when building with static + code analyzer --enable-asserts Enable asserts (default) --enable-dependency-tracking do not reject slow dependency extractors @@ -1617,6 +1650,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-libbsd Use libbsd (default is no) --with-shared-libs Link binaries using shared Dovecot libraries (default) --with-mem-align=BYTES Set the memory alignment (default: 8) @@ -1647,6 +1681,8 @@ --with-icu Build with libicu support (for FTS normalization) (auto) --with-solr Build with Solr full text search support + --with-sodium Build with libsodium support (enables argon2, + default: auto) --with-zlib Build with zlib compression support (auto) --with-bzlib Build with bzlib compression support (auto) --with-lzma Build with LZMA compression support (auto) @@ -1661,9 +1697,6 @@ --with-statedir=DIR Permanent data directory (LOCALSTATEDIR/lib/dovecot) --with-systemdsystemunitdir=DIR Directory for systemd service files (auto=detect) - --with-gc Use Boehm garbage collector - --with-storages Build with specified mail storage formats (mdbox - sdbox maildir mbox cydir imapc pop3c) --with-moduledir=DIR Base directory for dynamically loadable modules --with-docs Install documentation (default) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use @@ -1677,6 +1710,10 @@ --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-random-source=file + Device file to use as random source + (default=/dev/urandom) + --with-lua=yes|plugin build Lua Bindings --with-apparmor enable apparmor plugin (default=auto) Some influential environment variables: @@ -1700,6 +1737,16 @@ CXXCPP C++ preprocessor SSL_CFLAGS C compiler flags for SSL, overriding pkg-config SSL_LIBS linker flags for SSL, overriding pkg-config + LUA_CFLAGS C compiler flags for LUA, overriding pkg-config + LUA_LIBS linker flags for LUA, overriding pkg-config + LIBSODIUM_CFLAGS + C compiler flags for LIBSODIUM, overriding pkg-config + LIBSODIUM_LIBS + linker flags for LIBSODIUM, overriding pkg-config + LIBTIRPC_CFLAGS + C compiler flags for LIBTIRPC, overriding pkg-config + LIBTIRPC_LIBS + linker flags for LIBTIRPC, overriding pkg-config CLUCENE_CFLAGS C compiler flags for CLUCENE, overriding pkg-config CLUCENE_LIBS @@ -1711,6 +1758,7 @@ LIBICU_CFLAGS C compiler flags for LIBICU, overriding pkg-config LIBICU_LIBS linker flags for LIBICU, overriding pkg-config + PANDOC Path to pandoc program Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1778,7 +1826,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Dovecot configure 2.2.33.2 +Dovecot configure 2.3.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2265,6 +2313,52 @@ } # ac_fn_c_check_header_mongrel +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -2505,7 +2599,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Dovecot $as_me 2.2.33.2, which was +It was created by Dovecot $as_me 2.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2855,11 +2949,17 @@ cat >>confdefs.h <<_ACEOF -#define DOVECOT_ABI_VERSION "2.2.ABIv33($PACKAGE_VERSION)" +#define DOVECOT_ABI_VERSION "2.3.ABIv3($PACKAGE_VERSION)" _ACEOF + + + + +am__api_version='1.15' + ac_aux_dir= -for ac_dir in . "$srcdir"/.; do +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -2875,7 +2975,7 @@ fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2887,10 +2987,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -am__api_version='1.15' - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -3375,7 +3471,7 @@ # Define the identity of the package. PACKAGE='dovecot' - VERSION='2.2.33.2' + VERSION='2.3.3' cat >>confdefs.h <<_ACEOF @@ -3613,10 +3709,21 @@ fi fi -ACLOCAL_AMFLAGS='-I $(top_srcdir)' +ACLOCAL_AMFLAGS='-I $(top_srcdir)/m4' + +# Check whether --enable-hardening was given. +if test "${enable_hardening+set}" = set; then : + enableval=$enable_hardening; enable_hardening=$enableval +else + enable_hardening=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to enable hardening" >&5 +$as_echo_n "checking Whether to enable hardening... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_hardening" >&5 +$as_echo "$enable_hardening" >&6; } # Check whether --enable-devel-checks was given. if test "${enable_devel_checks+set}" = set; then : @@ -3629,6 +3736,16 @@ fi +# Check whether --enable-static-checker was given. +if test "${enable_static_checker+set}" = set; then : + enableval=$enable_static_checker; if test x$enableval = xyes; then + +$as_echo "#define STATIC_CHECKER /**/" >>confdefs.h + + fi +fi + + # Check whether --enable-asserts was given. if test "${enable_asserts+set}" = set; then : enableval=$enable_asserts; if test x$enableval = xno; then @@ -4154,6 +4271,31 @@ +# Check whether --with-sodium was given. +if test "${with_sodium+set}" = set; then : + withval=$with_sodium; + want=want_`echo sodium|sed s/-/_/g` + if test $withval = yes || test $withval = no || test $withval = auto; then + eval $want=$withval + elif test $withval = plugin; then + if test "" = plugin; then + eval $want=plugin + else + as_fn_error $? "--with-sodium=plugin not supported" "$LINENO" 5 + fi + elif `echo $withval|grep '^/' >/dev/null`; then + as_fn_error $? "--with-sodium=path not supported. You may want to use instead: +CPPFLAGS=-I$withval/include LDFLAGS=-L$withval/lib ./configure --with-sodium" "$LINENO" 5 + else + as_fn_error $? "--with-sodium: Unknown value: $withval" "$LINENO" 5 + fi + +else + want_sodium=auto +fi + + + # Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : withval=$with_zlib; @@ -4391,51 +4533,6 @@ -# Check whether --with-gc was given. -if test "${with_gc+set}" = set; then : - withval=$with_gc; - want=want_`echo gc|sed s/-/_/g` - if test $withval = yes || test $withval = no || test $withval = auto; then - eval $want=$withval - elif test $withval = plugin; then - if test "" = plugin; then - eval $want=plugin - else - as_fn_error $? "--with-gc=plugin not supported" "$LINENO" 5 - fi - elif `echo $withval|grep '^/' >/dev/null`; then - as_fn_error $? "--with-gc=path not supported. You may want to use instead: -CPPFLAGS=-I$withval/include LDFLAGS=-L$withval/lib ./configure --with-gc" "$LINENO" 5 - else - as_fn_error $? "--with-gc: Unknown value: $withval" "$LINENO" 5 - fi - -else - want_gc=no -fi - - - -# Check whether --with-storages was given. -if test "${with_storages+set}" = set; then : - withval=$with_storages; - if test "$withval" = "yes" || test "$withval" = "no"; then - as_fn_error $? "--with-storages needs storage list as parameter" "$LINENO" 5 - fi - mail_storages="shared `echo "$withval"|sed 's/,/ /g'`" -else - mail_storages="shared mdbox sdbox maildir mbox cydir imapc pop3c" -fi - - -mail_storages="$mail_storages raw fail" -# drop duplicates -duplicates=`(for i in $mail_storages; do echo $i; done)|sort|uniq -d|xargs echo` -if test "$duplicates" != ""; then - as_fn_error $? "Duplicate --with-storages: $duplicates" "$LINENO" 5 -fi - - # Check whether --with-moduledir was given. if test "${with_moduledir+set}" = set; then : @@ -19170,10 +19267,10 @@ $as_echo "#define DOVECOT_VERSION_MAJOR 2" >>confdefs.h -$as_echo "#define DOVECOT_VERSION_MINOR 2" >>confdefs.h +$as_echo "#define DOVECOT_VERSION_MINOR 3" >>confdefs.h -for ac_header in strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \ +for ac_header in strings.h stdint.h unistd.h dirent.h malloc.h \ sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \ sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h \ quota.h sys/fs/quota_common.h \ @@ -19193,24 +19290,22 @@ done + have_clang=no if $CC -dM -E -x c /dev/null | grep __clang__ > /dev/null 2>&1; then have_clang=yes fi -if test "x$ac_cv_c_compiler_gnu" = "xyes"; then - # -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings - # -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems - # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings - CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" - - if test "$have_clang" = "yes"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else - #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3) - # error new clang - #endif + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () @@ -19220,26 +19315,45 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_c__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' else + gl_unknown_warnings_are_errors= +fi - # clang 3.3+ unfortunately this gives warnings with hash.h - CFLAGS="$CFLAGS -Wno-duplicate-decl-specifier" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - # This is simply to avoid warning when building strftime() wrappers.. - CFLAGS="$CFLAGS -fno-builtin-strftime" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + PIE_CFLAGS= + PIE_LDFLAGS= - #if __GNUC__ < 4 - # error old gcc - #endif + if test $enable_hardening = yes; then + OLD_CFLAGS=$CFLAGS + case "$host" in + *-*-mingw* | *-*-msvc* | *-*-cygwin* ) + ;; *) + CFLAGS="-fPIE -DPIE" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -pie" >&5 +$as_echo_n "checking whether C compiler handles -pie... " >&6; } +if ${gl_cv_warn_c__pie+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -pie" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () @@ -19248,21 +19362,37 @@ ; return 0; } -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # gcc4 - CFLAGS="$CFLAGS -Wstrict-aliasing=2" +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__pie=yes +else + gl_cv_warn_c__pie=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__pie" >&5 +$as_echo "$gl_cv_warn_c__pie" >&6; } +if test "x$gl_cv_warn_c__pie" = xyes; then : - # Use std=gnu99 if we have new enough gcc - old_cflags=$CFLAGS - CFLAGS="-std=gnu99" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + PIE_CFLAGS="-fPIE -DPIE" + PIE_LDFLAGS="-pie" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wl,-pie" >&5 +$as_echo_n "checking whether C compiler handles -Wl,-pie... " >&6; } +if ${gl_cv_warn_c__Wl__pie+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wl,-pie" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () @@ -19271,146 +19401,602 @@ ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__Wl__pie=yes +else + gl_cv_warn_c__Wl__pie=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wl__pie" >&5 +$as_echo "$gl_cv_warn_c__Wl__pie" >&6; } +if test "x$gl_cv_warn_c__Wl__pie" = xyes; then : - CFLAGS="$CFLAGS $old_cflags" + PIE_CFLAGS="-fPIE -DPIE" + PIE_LDFLAGS="-Wl,-pie" else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5 +$as_echo "not supported" >&6; } +fi - CFLAGS="$old_cflags" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -if test "$have_clang" = "yes"; then - # clang specific options - if test "$want_devel_checks" = "yes"; then - # FIXME: enable once md[45], sha[12] can be compiled without - #CFLAGS="$CFLAGS -fsanitize=integer,undefined -ftrapv" - : - fi -fi + + esac + CFLAGS=$OLD_CFLAGS + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -$as_echo_n "checking for library containing socket... " >&6; } -if ${ac_cv_search_socket+:} false; then : + + + + if test $enable_hardening = yes; then + case "$host" in + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fstack-protector-strong" >&5 +$as_echo_n "checking whether C compiler handles -fstack-protector-strong... " >&6; } +if ${gl_cv_warn_c__fstack_protector_strong+:} false; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fstack-protector-strong" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); int main () { -return socket (); + ; return 0; } + _ACEOF -for ac_lib in '' socket; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_socket=$ac_res +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__fstack_protector_strong=yes +else + gl_cv_warn_c__fstack_protector_strong=no fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_socket+:} false; then : - break -fi -done -if ${ac_cv_search_socket+:} false; then : + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" -else - ac_cv_search_socket=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -$as_echo "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fstack_protector_strong" >&5 +$as_echo "$gl_cv_warn_c__fstack_protector_strong" >&6; } +if test "x$gl_cv_warn_c__fstack_protector_strong" = xyes; then : -fi + CFLAGS="$CFLAGS -fstack-protector-strong" + +else -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5 -$as_echo_n "checking for library containing inet_addr... " >&6; } -if ${ac_cv_search_inet_addr+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fstack-protector" >&5 +$as_echo_n "checking whether C compiler handles -fstack-protector... " >&6; } +if ${gl_cv_warn_c__fstack_protector+:} false; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fstack-protector" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inet_addr (); int main () { -return inet_addr (); + ; return 0; } _ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_inet_addr=$ac_res +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__fstack_protector=yes +else + gl_cv_warn_c__fstack_protector=no fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_inet_addr+:} false; then : - break -fi -done -if ${ac_cv_search_inet_addr+:} false; then : + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" -else - ac_cv_search_inet_addr=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fstack_protector" >&5 +$as_echo "$gl_cv_warn_c__fstack_protector" >&6; } +if test "x$gl_cv_warn_c__fstack_protector" = xyes; then : + + CFLAGS="$CFLAGS -fstack-protector" + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_addr" >&5 -$as_echo "$ac_cv_search_inet_addr" >&6; } -ac_res=$ac_cv_search_inet_addr -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 -$as_echo_n "checking for library containing fdatasync... " >&6; } -if ${ac_cv_search_fdatasync+:} false; then : + esac + fi + + + + if test $enable_hardening = yes; then + case "$host" in + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" >&5 +$as_echo_n "checking whether C compiler handles -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2... " >&6; } +if ${gl_cv_warn_c__O2__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_2+:} false; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__O2__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_2=yes +else + gl_cv_warn_c__O2__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_2=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__O2__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_2" >&5 +$as_echo "$gl_cv_warn_c__O2__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_2" >&6; } +if test "x$gl_cv_warn_c__O2__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_2" = xyes; then : + + CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" + +fi + + esac + fi + + + + if test $enable_hardening = yes; then + case "$host" in + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -mfunction-return=thunk -mindirect-branch=thunk" >&5 +$as_echo_n "checking whether C compiler handles -mfunction-return=thunk -mindirect-branch=thunk... " >&6; } +if ${gl_cv_warn_c__mfunction_return_thunk__mindirect_branch_thunk+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -mfunction-return=thunk -mindirect-branch=thunk" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__mfunction_return_thunk__mindirect_branch_thunk=yes +else + gl_cv_warn_c__mfunction_return_thunk__mindirect_branch_thunk=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__mfunction_return_thunk__mindirect_branch_thunk" >&5 +$as_echo "$gl_cv_warn_c__mfunction_return_thunk__mindirect_branch_thunk" >&6; } +if test "x$gl_cv_warn_c__mfunction_return_thunk__mindirect_branch_thunk" = xyes; then : + + CFLAGS="$CFLAGS -mfunction-return=thunk -mindirect-branch=thunk" + +fi + + esac + fi + + + RELRO_LDFLAGS= + if test $enable_hardening = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for how to force completely read-only GOT table" >&5 +$as_echo_n "checking for how to force completely read-only GOT table... " >&6; } + ld_help=`$CC -Wl,-help 2>&1` + case $ld_help in + *"-z relro"*) RELRO_LDFLAGS="-Wl,-z -Wl,relro" ;; + esac + case $ld_help in + *"-z now"*) RELRO_LDFLAGS="$RELRO_LDFLAGS -Wl,-z -Wl,now" ;; + esac + if test "x$RELRO_LDFLAGS" != "x"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RELRO_LDFLAGS" >&5 +$as_echo "$RELRO_LDFLAGS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 +$as_echo "unknown" >&6; } + +fi + fi + + + + LD_WHOLE_ARCHIVE= + LD_NO_WHOLE_ARCHIVE= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option to include whole archive" >&5 +$as_echo_n "checking for linker option to include whole archive... " >&6; } + ld_help="`$CC -Wl,-help 2>&1`" + case "$ld_help" in + *"--whole-archive"*) + LD_WHOLE_ARCHIVE="--whole-archive" + LD_NO_WHOLE_ARCHIVE="--no-whole-archive" + ;; + esac + if test "x$LD_WHOLE_ARCHIVE" != "x"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: -Wl,$LD_WHOLE_ARCHIVE" >&5 +$as_echo "-Wl,$LD_WHOLE_ARCHIVE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5 +$as_echo "not supported" >&6; } + +fi + + + if test "x$LD_WHOLE_ARCHIVE" != "x"; then + HAVE_WHOLE_ARCHIVE_TRUE= + HAVE_WHOLE_ARCHIVE_FALSE='#' +else + HAVE_WHOLE_ARCHIVE_TRUE='#' + HAVE_WHOLE_ARCHIVE_FALSE= +fi + + + + + if test "x$ac_cv_c_compiler_gnu" = "xyes"; then + # -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings + # -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems + # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings + CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" + + if test "$have_clang" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3) + # error new clang + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + + # clang 3.3+ unfortunately this gives warnings with hash.h + CFLAGS="$CFLAGS -Wno-duplicate-decl-specifier" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # This is simply to avoid warning when building strftime() wrappers.. + CFLAGS="$CFLAGS -fno-builtin-strftime" + fi + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #if __GNUC__ < 4 + # error old gcc + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # gcc4 + CFLAGS="$CFLAGS -Wstrict-aliasing=2" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + # Use std=gnu99 if we have new enough gcc + old_cflags=$CFLAGS + CFLAGS="-std=gnu99" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + CFLAGS="$CFLAGS $old_cflags" + +else + + CFLAGS="$old_cflags" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + if test "$have_clang" = "yes"; then + # clang specific options + if test "$want_devel_checks" = "yes"; then + # FIXME: enable once md[45], sha[12] can be compiled without + #CFLAGS="$CFLAGS -fsanitize=integer,undefined -ftrapv" + : + fi + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_aton" >&5 +$as_echo_n "checking for library containing inet_aton... " >&6; } +if ${ac_cv_search_inet_aton+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char inet_aton (); +int +main () +{ +return inet_aton (); + ; + return 0; +} +_ACEOF +for ac_lib in '' resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_inet_aton=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_inet_aton+:} false; then : + break +fi +done +if ${ac_cv_search_inet_aton+:} false; then : + +else + ac_cv_search_inet_aton=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_aton" >&5 +$as_echo "$ac_cv_search_inet_aton" >&6; } +ac_res=$ac_cv_search_inet_aton +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_socket=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : + break +fi +done +if ${ac_cv_search_socket+:} false; then : + +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostent" >&5 +$as_echo_n "checking for library containing gethostent... " >&6; } +if ${ac_cv_search_gethostent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostent (); +int +main () +{ +return gethostent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostent=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostent+:} false; then : + break +fi +done +if ${ac_cv_search_gethostent+:} false; then : + +else + ac_cv_search_gethostent=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostent" >&5 +$as_echo "$ac_cv_search_gethostent" >&6; } +ac_res=$ac_cv_search_gethostent +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 +$as_echo_n "checking for library containing fdatasync... " >&6; } +if ${ac_cv_search_fdatasync+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19466,8 +20052,9 @@ fi -if test $want_libcap != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcap" >&5 + + if test $want_libcap != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcap" >&5 $as_echo_n "checking for cap_init in -lcap... " >&6; } if ${ac_cv_lib_cap_cap_init+:} false; then : $as_echo_n "(cached) " >&6 @@ -19508,44 +20095,45 @@ $as_echo "#define HAVE_LIBCAP /**/" >>confdefs.h - LIBCAP="-lcap" + LIBCAP="-lcap" else - if test "$want_libcap" = "yes"; then - as_fn_error $? "Can't build with libcap support: libcap not found" "$LINENO" 5 - fi + if test "$want_libcap" = "yes"; then + as_fn_error $? "Can't build with libcap support: libcap not found" "$LINENO" 5 + fi fi -fi + fi -have_libwrap=no -if test $want_libwrap != no; then - ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default" + + have_libwrap=no + if test $want_libwrap != no; then + ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default" if test "x$ac_cv_header_tcpd_h" = xyes; then : - old_LIBS=$LIBS + old_LIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have libwrap" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have libwrap" >&5 $as_echo_n "checking whether we have libwrap... " >&6; } if ${i_cv_have_libwrap+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - int allow_severity = 0; - int deny_severity = 0; + #include + int allow_severity = 0; + int deny_severity = 0; int main () { - request_init((void *)0); + request_init((void *)0); ; return 0; @@ -19553,11 +20141,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_libwrap=yes + i_cv_have_libwrap=yes else - i_cv_have_libwrap=no + i_cv_have_libwrap=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -19565,31 +20153,31 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_libwrap" >&5 $as_echo "$i_cv_have_libwrap" >&6; } - if test $i_cv_have_libwrap = yes; then + if test $i_cv_have_libwrap = yes; then $as_echo "#define HAVE_LIBWRAP /**/" >>confdefs.h - LIBWRAP_LIBS=-lwrap + LIBWRAP_LIBS=-lwrap - have_libwrap=yes - else - if test "$want_libwrap" = "yes"; then - as_fn_error $? "Can't build with libwrap support: libwrap not found" "$LINENO" 5 + have_libwrap=yes + else + if test "$want_libwrap" = "yes"; then + as_fn_error $? "Can't build with libwrap support: libwrap not found" "$LINENO" 5 + fi fi - fi - LIBS=$old_LIBS + LIBS=$old_LIBS else - if test "$want_libwrap" = "yes"; then - as_fn_error $? "Can't build with libwrap support: tcpd.h not found" "$LINENO" 5 - fi + if test "$want_libwrap" = "yes"; then + as_fn_error $? "Can't build with libwrap support: tcpd.h not found" "$LINENO" 5 + fi fi -fi - if test "$have_libwrap" = "yes"; then + fi + if test "$have_libwrap" = "yes"; then TCPWRAPPERS_TRUE= TCPWRAPPERS_FALSE='#' else @@ -19599,6 +20187,110 @@ + + ac_fn_c_check_header_mongrel "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_random_h" = xyes; then : + + for ac_func in getrandom +do : + ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom" +if test "x$ac_cv_func_getrandom" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETRANDOM 1 +_ACEOF + +fi +done + + ac_fn_c_check_decl "$LINENO" "getrandom" "ac_cv_have_decl_getrandom" "#include +" +if test "x$ac_cv_have_decl_getrandom" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETRANDOM $ac_have_decl +_ACEOF + + +fi + + + + + +# Check whether --with-libbsd was given. +if test "${with_libbsd+set}" = set; then : + withval=$with_libbsd; want_libbsd=$withval +else + want_libbsd=no +fi + + ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf" +if test "x$ac_cv_func_arc4random_buf" = xyes; then : + +$as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h + +else + + if test "$want_libbsd" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random_buf in -lbsd" >&5 +$as_echo_n "checking for arc4random_buf in -lbsd... " >&6; } +if ${ac_cv_lib_bsd_arc4random_buf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char arc4random_buf (); +int +main () +{ +return arc4random_buf (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bsd_arc4random_buf=yes +else + ac_cv_lib_bsd_arc4random_buf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_arc4random_buf" >&5 +$as_echo "$ac_cv_lib_bsd_arc4random_buf" >&6; } +if test "x$ac_cv_lib_bsd_arc4random_buf" = xyes; then : + + LIBS="$LIBS -lbsd" + +$as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h + + +$as_echo "#define HAVE_LIBBSD 1" >>confdefs.h + + +fi + + fi + +fi + + + + $as_echo "#define PACKAGE_WEBPAGE \"http://www.dovecot.org/\"" >>confdefs.h @@ -19621,9 +20313,10 @@ done -ac_fn_c_check_type "$LINENO" "struct sockpeercred" "ac_cv_type_struct_sockpeercred" " -#include -#include + + ac_fn_c_check_type "$LINENO" "struct sockpeercred" "ac_cv_type_struct_sockpeercred" " + #include + #include " if test "x$ac_cv_type_struct_sockpeercred" = xyes; then : @@ -19636,7 +20329,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 @@ -19697,13 +20391,15 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5 $as_echo_n "checking for typeof... " >&6; } if ${i_cv_have_typeof+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19711,8 +20407,8 @@ main () { - int foo; - typeof(foo) bar; + int foo; + typeof(foo) bar; ; return 0; @@ -19720,11 +20416,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_typeof=yes + i_cv_have_typeof=yes else - i_cv_have_typeof=no + i_cv_have_typeof=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -19732,22 +20428,23 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_typeof" >&5 $as_echo "$i_cv_have_typeof" >&6; } -if test $i_cv_have_typeof = yes; then + if test $i_cv_have_typeof = yes; then $as_echo "#define HAVE_TYPEOF /**/" >>confdefs.h -fi + fi + -have_ioloop=no + have_ioloop=no -if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use epoll" >&5 + if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use epoll" >&5 $as_echo_n "checking whether we can use epoll... " >&6; } if ${i_cv_epoll_works+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -19756,21 +20453,21 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include - int main() - { - return epoll_create(5) < 1; - } + int main() + { + return epoll_create(5) < 1; + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - i_cv_epoll_works=yes + i_cv_epoll_works=yes else - i_cv_epoll_works=no + i_cv_epoll_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19781,115 +20478,118 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_epoll_works" >&5 $as_echo "$i_cv_epoll_works" >&6; } - if test $i_cv_epoll_works = yes; then + if test $i_cv_epoll_works = yes; then $as_echo "#define IOLOOP_EPOLL /**/" >>confdefs.h - have_ioloop=yes - ioloop=epoll - else - if test "$ioloop" = "epoll" ; then - as_fn_error $? "epoll ioloop requested but epoll_create() is not available" "$LINENO" 5 + have_ioloop=yes + ioloop=epoll + else + if test "$ioloop" = "epoll" ; then + as_fn_error $? "epoll ioloop requested but epoll_create() is not available" "$LINENO" 5 + fi fi fi -fi -if test "$ioloop" = "best" || test "$ioloop" = "kqueue"; then - if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes; then + if test "$ioloop" = "best" || test "$ioloop" = "kqueue"; then + if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes; then $as_echo "#define IOLOOP_KQUEUE /**/" >>confdefs.h - ioloop=kqueue - have_ioloop=yes - elif test "$ioloop" = "kqueue"; then - as_fn_error $? "kqueue ioloop requested but kqueue() is not available" "$LINENO" 5 - fi -fi + ioloop=kqueue + have_ioloop=yes + elif test "$ioloop" = "kqueue"; then + as_fn_error $? "kqueue ioloop requested but kqueue() is not available" "$LINENO" 5 + fi + fi -if test "$ioloop" = "best" || test "$ioloop" = "poll"; then - ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" + if test "$ioloop" = "best" || test "$ioloop" = "poll"; then + ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" if test "x$ac_cv_func_poll" = xyes; then : $as_echo "#define IOLOOP_POLL /**/" >>confdefs.h - ioloop=poll - have_ioloop=yes + ioloop=poll + have_ioloop=yes fi -fi + fi -if test "$have_ioloop" = "no"; then + if test "$have_ioloop" = "no"; then $as_echo "#define IOLOOP_SELECT /**/" >>confdefs.h - ioloop="select" -fi + ioloop="select" + fi -have_notify=none -if test "$notify" = "" || test "$notify" = "inotify" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use inotify" >&5 + have_notify=none + + if test "$notify" = "" || test "$notify" = "inotify" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use inotify" >&5 $as_echo_n "checking whether we can use inotify... " >&6; } - if test "$ac_cv_func_inotify_init" = yes; then - have_notify=inotify - notify=inotify - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5 + if test "$ac_cv_func_inotify_init" = yes; then + have_notify=inotify + notify=inotify + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5 $as_echo "\"yes\"" >&6; } $as_echo "#define IOLOOP_NOTIFY_INOTIFY /**/" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5 $as_echo "\"no\"" >&6; } - if test "$notify" = "inotify"; then - as_fn_error $? "inotify requested but not available" "$LINENO" 5 - notify="" + if test "$notify" = "inotify"; then + as_fn_error $? "inotify requested but not available" "$LINENO" 5 + notify="" + fi fi fi -fi -if (test "$notify" = "" && test "$ioloop" = kqueue) || test "$notify" = "kqueue"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use BSD kqueue() notify" >&5 + if (test "$notify" = "" && test "$ioloop" = kqueue) || test "$notify" = "kqueue"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use BSD kqueue() notify" >&5 $as_echo_n "checking whether we can use BSD kqueue() notify... " >&6; } - if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes ; then - have_notify=kqueue - notify=kqueue - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5 + if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes ; then + have_notify=kqueue + notify=kqueue + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5 $as_echo "\"yes\"" >&6; } $as_echo "#define IOLOOP_NOTIFY_KQUEUE /**/" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5 $as_echo "\"no\"" >&6; } - if test "$notify" = "kqueue" ; then - as_fn_error $? "kqueue notify requested but kqueue() is not available" "$LINENO" 5 - notify="" + if test "$notify" = "kqueue" ; then + as_fn_error $? "kqueue notify requested but kqueue() is not available" "$LINENO" 5 + notify="" + fi fi fi -fi -if test "$have_notify" = "none"; then + if test "$have_notify" = "none"; then $as_echo "#define IOLOOP_NOTIFY_NONE /**/" >>confdefs.h -fi + fi + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have glibc" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have glibc" >&5 $as_echo_n "checking whether we have glibc... " >&6; } if ${i_cv_have_glibc+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #ifdef __GLIBC__ - we have glibc - #endif + #include + #ifdef __GLIBC__ + we have glibc + #endif int main () @@ -19901,11 +20601,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_glibc=no + i_cv_have_glibc=no else - i_cv_have_glibc=yes + i_cv_have_glibc=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -19913,19 +20613,18 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_glibc" >&5 $as_echo "$i_cv_have_glibc" >&6; } -if test "$i_cv_have_glibc" = "yes"; then + if test "$i_cv_have_glibc" = "yes"; then $as_echo "#define PREAD_WRAPPERS /**/" >>confdefs.h -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_fallocate() works" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_fallocate() works" >&5 $as_echo_n "checking whether posix_fallocate() works... " >&6; } if ${i_cv_posix_fallocate_works+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -19934,34 +20633,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define _XOPEN_SOURCE 600 - #include - #include - #include - #include - #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) - possibly broken posix_fallocate - #endif - int main() { - int fd = creat("conftest.temp", 0600); - int ret; - if (fd == -1) { - perror("creat()"); - return 2; + #define _XOPEN_SOURCE 600 + #include + #include + #include + #include + #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) + possibly broken posix_fallocate + #endif + int main() { + int fd = creat("conftest.temp", 0600); + int ret; + if (fd == -1) { + perror("creat()"); + return 2; + } + ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0; + unlink("conftest.temp"); + return ret; } - ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0; - unlink("conftest.temp"); - return ret; - } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - i_cv_posix_fallocate_works=yes + i_cv_posix_fallocate_works=yes else - i_cv_posix_fallocate_works=no + i_cv_posix_fallocate_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19972,11 +20671,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_posix_fallocate_works" >&5 $as_echo "$i_cv_posix_fallocate_works" >&6; } -if test $i_cv_posix_fallocate_works = yes; then + if test $i_cv_posix_fallocate_works = yes; then $as_echo "#define HAVE_POSIX_FALLOCATE /**/" >>confdefs.h -fi + fi + _plugin_deps=yes @@ -20152,8 +20852,6 @@ - - # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; @@ -20548,6 +21246,7 @@ case "$typeof_off_t" in int) offt_max=INT_MAX + uofft_max=UINT_MAX uofft_fmt="u" if test "$have_uoff_t" != "yes"; then @@ -20558,6 +21257,7 @@ ;; long) offt_max=LONG_MAX + uofft_max=ULONG_MAX uofft_fmt="lu" if test "$have_uoff_t" != "yes"; then @@ -20568,6 +21268,7 @@ ;; "long long") offt_max=LLONG_MAX + uofft_max=ULLONG_MAX uofft_fmt="llu" if test "$have_uoff_t" != "yes"; then @@ -20581,17 +21282,18 @@ ;; esac -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main () { - struct dirent d; - d.d_type = DT_DIR; + struct dirent d; + d.d_type = DT_DIR; ; return 0; @@ -20606,17 +21308,18 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include + #include + #include int main () { - off_t i = OFF_T_MAX; + off_t i = OFF_T_MAX; ; return 0; @@ -20624,7 +21327,7 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - : + : else @@ -20638,18 +21341,52 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + uoff_t i = UOFF_T_MAX; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + : + +else + + +cat >>confdefs.h <<_ACEOF +#define UOFF_T_MAX $uofft_max +_ACEOF + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + cat >>confdefs.h <<_ACEOF #define PRIuUOFF_T "$uofft_fmt" _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether size_t is signed" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether size_t is signed" >&5 $as_echo_n "checking whether size_t is signed... " >&6; } if ${i_cv_signed_size_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -20658,32 +21395,32 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - int main() { - /* return 0 if we're signed */ - exit((size_t)(int)-1 <= 0 ? 0 : 1); - } + #include + #include + int main() { + /* return 0 if we're signed */ + exit((size_t)(int)-1 <= 0 ? 0 : 1); + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - i_cv_signed_size_t=yes + i_cv_signed_size_t=yes - echo - echo "Your system's size_t is a signed integer, Dovecot isn't designed to" - echo "support it. It probably works just fine, but it's less resistant to" - echo "buffer overflows. If you're not worried about this and still want to" - echo "compile Dovecot, set ignore_signed_size=1 environment." + echo + echo "Your system's size_t is a signed integer, Dovecot isn't designed to" + echo "support it. It probably works just fine, but it's less resistant to" + echo "buffer overflows. If you're not worried about this and still want to" + echo "compile Dovecot, set ignore_signed_size=1 environment." - if test "$ignore_signed_size" = ""; then - as_fn_error $? "aborting" "$LINENO" 5 - fi - echo "..ignoring as requested.." + if test "$ignore_signed_size" = ""; then + as_fn_error $? "aborting" "$LINENO" 5 + fi + echo "..ignoring as requested.." else - i_cv_signed_size_t=no + i_cv_signed_size_t=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -20859,29 +21596,30 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $visible" >&5 $as_echo "$visible" >&6; } -case "$typeof_size_t" in - "unsigned long") - ssizet_max=LONG_MAX - sizet_fmt="lu" - ;; - "unsigned long long") - ssizet_max=LLONG_MAX - sizet_fmt="llu" - ;; - *) - ssizet_max=INT_MAX - sizet_fmt="u" + case "$typeof_size_t" in + "unsigned long") + ssizet_max=LONG_MAX + sizet_fmt="lu" + ;; + "unsigned long long") + ssizet_max=LLONG_MAX + sizet_fmt="llu" + ;; + *) + ssizet_max=INT_MAX + sizet_fmt="u" - if test "$typeof_size_t" = ""; then + if test "$typeof_size_t" = ""; then $as_echo "#define size_t unsigned int" >>confdefs.h $as_echo "#define ssize_t int" >>confdefs.h - fi - ;; -esac + fi + ;; + esac + cat >>confdefs.h <<_ACEOF @@ -20894,6 +21632,13 @@ _ACEOF +ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes; then : + +else + as_fn_error $? "inttypes.h missing but required" "$LINENO" 5 +fi + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" @@ -21019,18 +21764,29 @@ _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5 -$as_echo_n "checking for /dev/urandom... " >&6; } -if test -c /dev/urandom || test -s /dev/urandom; then + + +# Check whether --with-random-source was given. +if test "${with_random_source+set}" = set; then : + withval=$with_random_source; random_source=$withval +else + random_source=/dev/urandom +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $random_source" >&5 +$as_echo_n "checking for $random_source... " >&6; } +if test -c $random_source || test -s $random_source; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define DEV_URANDOM_PATH \"/dev/urandom\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define DEV_URANDOM_PATH "$random_source" +_ACEOF have_random_source=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + as_fn_error $? "$random_source not found or is not character device - please provide path for random source device" "$LINENO" 5 fi if test "$have_random_source" != "yes"; then @@ -21047,15 +21803,16 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff" >&5 $as_echo_n "checking for tm_gmtoff... " >&6; } -if ${i_cv_field_tm_gmtoff+:} false; then : + if ${i_cv_field_tm_gmtoff+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + #include int main () { @@ -21072,21 +21829,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -if test $i_cv_field_tm_gmtoff = yes; then + if test $i_cv_field_tm_gmtoff = yes; then $as_echo "#define HAVE_TM_GMTOFF /**/" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_field_tm_gmtoff" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_field_tm_gmtoff" >&5 $as_echo "$i_cv_field_tm_gmtoff" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how large time_t values gmtime() accepts" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how large time_t values gmtime() accepts" >&5 $as_echo_n "checking how large time_t values gmtime() accepts... " >&6; } if ${i_cv_gmtime_max_time_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -21095,45 +21853,45 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - int main() { - FILE *f; - int bits; + #include + #include + int main() { + FILE *f; + int bits; - for (bits = 1; bits < sizeof(time_t)*8; bits++) { - time_t t = ((time_t)1 << bits) - 1; - if (gmtime(&t) == NULL) { - bits--; - break; - } - } - if (bits > 40) { - /* Solaris 9 breaks after 55 bits. Perhaps other systems break earlier. - Let's just do the same as Cyrus folks and limit it to 40 bits. */ - bits = 40; - } + for (bits = 1; bits < sizeof(time_t)*8; bits++) { + time_t t = ((time_t)1 << bits) - 1; + if (gmtime(&t) == NULL) { + bits--; + break; + } + } + if (bits > 40) { + /* Solaris 9 breaks after 55 bits. Perhaps other systems break earlier. + Let's just do the same as Cyrus folks and limit it to 40 bits. */ + bits = 40; + } - f = fopen("conftest.temp", "w"); - if (f == NULL) { - perror("fopen()"); - return 1; + f = fopen("conftest.temp", "w"); + if (f == NULL) { + perror("fopen()"); + return 1; + } + fprintf(f, "%d", bits); + fclose(f); + return 0; } - fprintf(f, "%d", bits); - fclose(f); - return 0; - } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - i_cv_gmtime_max_time_t=`cat conftest.temp` - rm -f conftest.temp + i_cv_gmtime_max_time_t=`cat conftest.temp` + rm -f conftest.temp else - printf "check failed, assuming " - i_cv_gmtime_max_time_t=31 + printf "check failed, assuming " + i_cv_gmtime_max_time_t=31 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -21150,13 +21908,120 @@ _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5 -$as_echo_n "checking whether time_t is signed... " >&6; } -if ${i_cv_signed_time_t+:} false; then : + + + + order="long int long-long unsigned-int unsigned-long unsigned-long-long" + if test "long int long-long unsigned-int unsigned-long unsigned-long-long" = ""; then + order="int long long-long" + fi + + result="" + visible="unknown" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of time_t" >&5 +$as_echo_n "checking type of time_t... " >&6; } + if ${i_cv_typeof_time_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "x$ac_cv_c_compiler_gnu" = "xyes"; then + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + + for type in $order; do + case "$type" in + int) + fmt="%d" + ;; + unsigned-int) + fmt="%u" + ;; + long) + fmt="%ld" + ;; + unsigned-long) + fmt="%lu" + ;; + long-long) + fmt="%lld" + ;; + unsigned-long-long) + fmt="%llu" + ;; + *) + fmt="" + ;; + esac + + if test "$fmt" != ""; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + printf("$fmt", (time_t)0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + if test "$result" != ""; then + result="" + visible="unknown" + break + fi + result="`echo $type|sed 's/-/ /g'`" + visible="$result" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + CFLAGS="$old_CFLAGS" + fi + + if test "$result" = ""; then + for type in $order; do + type="`echo $type|sed 's/-/ /g'`" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + typedef $type time_t; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + if test "$result" != ""; then + result="" + visible="unknown" + break + fi + result="$type" + visible="$type" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + fi + + if test "$result" = ""; then + + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -21165,47 +22030,112 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - int main() { - /* return 0 if we're signed */ - exit((time_t)(int)-1 <= 0 ? 0 : 1); - } + #include + #include + int main() { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(time_t)); + exit(0); + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - i_cv_signed_time_t=yes - -else + size=`cat conftestval` + rm -f conftestval - i_cv_signed_time_t=no + for type in $order; do + actype="ac_cv_sizeof_`echo $type|sed 's/-/_/g'`" + if test "$size" = "`eval echo \\$$actype`"; then + result="`echo $type|sed 's/-/ /g'`" + visible="`expr $size \* 8`bit (using $result)" + break + fi + done + if test "$result" = ""; then + result=unknown + visible="`expr $size \* 8`bit (unknown type)" + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi + i_cv_typeof_time_t=$result/$visible fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_signed_time_t" >&5 -$as_echo "$i_cv_signed_time_t" >&6; } -if test $i_cv_signed_time_t = yes; then + + + typeof_time_t=`echo $i_cv_typeof_time_t | sed s,/.*$,,` + visible=`echo $i_cv_typeof_time_t | sed s,^.*/,,` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $visible" >&5 +$as_echo "$visible" >&6; } + + case "$typeof_time_t" in + long) + timet_len="l" + i_cv_signed_time_t=yes + ;; + int) + timet_len="" + i_cv_signed_time_t=yes + ;; + "long long") + timet_len="ll" + i_cv_signed_time_t=yes + ;; + "unsigned int") + timet_len="" + i_cv_signed_time_t=no + ;; + "unsigned long") + timet_len="l" + i_cv_signed_time_t=no + ;; + "unsigned long long") + timet_len="ll" + i_cv_signed_time_t=no + ;; + *) + as_fn_error $? "Unsupported time_t type" "$LINENO" 5 + ;; + esac + if test $i_cv_signed_time_t = yes; then $as_echo "#define TIME_T_SIGNED /**/" >>confdefs.h -fi + timet_d_fmt="$timet_len"d + else + timet_d_fmt="$timet_len"u + fi + timet_x_fmt="$timet_len"x + + +cat >>confdefs.h <<_ACEOF +#define PRIdTIME_T "$timet_d_fmt" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PRIxTIME_T "$timet_x_fmt" +_ACEOF + + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use C99 static in array sizes" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use C99 static in array sizes" >&5 $as_echo_n "checking if we can use C99 static in array sizes... " >&6; } if ${i_cv_c99_static_arrays+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void foo(unsigned char [static 20]); + void foo(unsigned char arr[static 20]); int main () @@ -21218,11 +22148,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_c99_static_arrays=yes + i_cv_c99_static_arrays=yes else - i_cv_c99_static_arrays=no + i_cv_c99_static_arrays=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21231,36 +22161,37 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_c99_static_arrays" >&5 $as_echo "$i_cv_c99_static_arrays" >&6; } -if test $i_cv_c99_static_arrays = yes; then - static_value=static -else - static_value= -fi + if test $i_cv_c99_static_arrays = yes; then + static_value=static + else + static_value= + fi cat >>confdefs.h <<_ACEOF #define STATIC_ARRAY $static_value _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use C99-like flexible array members" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use C99-like flexible array members" >&5 $as_echo_n "checking if we can use C99-like flexible array members... " >&6; } if ${i_cv_c99_flex_arrays+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - struct foo { - int x; - char y[]; - }; + struct foo { + int x; + char y[]; + }; int main () { - struct foo foo; + struct foo foo; ; return 0; @@ -21268,11 +22199,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_c99_flex_arrays=yes + i_cv_c99_flex_arrays=yes else - i_cv_c99_flex_arrays=no + i_cv_c99_flex_arrays=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21281,28 +22212,30 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_c99_flex_arrays" >&5 $as_echo "$i_cv_c99_flex_arrays" >&6; } -if test $i_cv_c99_flex_arrays = yes; then - flexible_value= -else - flexible_value=1 -fi + if test $i_cv_c99_flex_arrays = yes; then + flexible_value= + else + flexible_value=1 + fi cat >>confdefs.h <<_ACEOF #define FLEXIBLE_ARRAY_MEMBER $flexible_value _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct iovec" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct iovec" >&5 $as_echo_n "checking for struct iovec... " >&6; } -if ${i_cv_struct_iovec+:} false; then : + if ${i_cv_struct_iovec+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include + #include + #include + #include int main () { @@ -21320,26 +22253,28 @@ fi -if test $i_cv_struct_iovec = yes; then + if test $i_cv_struct_iovec = yes; then $as_echo "#define HAVE_STRUCT_IOVEC /**/" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_struct_iovec" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_struct_iovec" >&5 $as_echo "$i_cv_struct_iovec" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dev_t is struct" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dev_t is struct" >&5 $as_echo_n "checking whether dev_t is struct... " >&6; } if ${i_cv_dev_t_struct+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - struct test { dev_t a; }; - static struct test t = { 0 }; + #include + struct test { dev_t a; }; + static struct test t = { 0 }; int main () @@ -21351,11 +22286,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_dev_t_struct=no + i_cv_dev_t_struct=no else - i_cv_dev_t_struct=yes + i_cv_dev_t_struct=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21363,31 +22298,33 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_dev_t_struct" >&5 $as_echo "$i_cv_dev_t_struct" >&6; } -if test $i_cv_dev_t_struct = yes; then + if test $i_cv_dev_t_struct = yes; then $as_echo "#define DEV_T_STRUCT /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether RLIMIT_AS exists" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether RLIMIT_AS exists" >&5 $as_echo_n "checking whether RLIMIT_AS exists... " >&6; } if ${i_cv_have_rlimit_as+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include + #include + #include + #include int main () { - struct rlimit r; - getrlimit(RLIMIT_AS, &r); + struct rlimit r; + getrlimit(RLIMIT_AS, &r); ; return 0; @@ -21395,11 +22332,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_rlimit_as=yes + i_cv_have_rlimit_as=yes else - i_cv_have_rlimit_as=no + i_cv_have_rlimit_as=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21408,31 +22345,32 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_rlimit_as" >&5 $as_echo "$i_cv_have_rlimit_as" >&6; } -if test $i_cv_have_rlimit_as = yes; then + if test $i_cv_have_rlimit_as = yes; then $as_echo "#define HAVE_RLIMIT_AS /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether RLIMIT_NPROC exists" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether RLIMIT_NPROC exists" >&5 $as_echo_n "checking whether RLIMIT_NPROC exists... " >&6; } if ${i_cv_have_rlimit_nproc+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include + #include + #include + #include int main () { - struct rlimit r; - getrlimit(RLIMIT_NPROC, &r); + struct rlimit r; + getrlimit(RLIMIT_NPROC, &r); ; return 0; @@ -21440,11 +22378,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_rlimit_nproc=yes + i_cv_have_rlimit_nproc=yes else - i_cv_have_rlimit_nproc=no + i_cv_have_rlimit_nproc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21453,31 +22391,32 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_rlimit_nproc" >&5 $as_echo "$i_cv_have_rlimit_nproc" >&6; } -if test $i_cv_have_rlimit_nproc = yes; then + if test $i_cv_have_rlimit_nproc = yes; then $as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h -fi + fi + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether RLIMIT_CORE exists" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether RLIMIT_CORE exists" >&5 $as_echo_n "checking whether RLIMIT_CORE exists... " >&6; } if ${i_cv_have_rlimit_core+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include + #include + #include + #include int main () { - struct rlimit r; - getrlimit(RLIMIT_CORE, &r); + struct rlimit r; + getrlimit(RLIMIT_CORE, &r); ; return 0; @@ -21485,11 +22424,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_rlimit_core=yes + i_cv_have_rlimit_core=yes else - i_cv_have_rlimit_core=no + i_cv_have_rlimit_core=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21498,28 +22437,30 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_rlimit_core" >&5 $as_echo "$i_cv_have_rlimit_core" >&6; } -if test $i_cv_have_rlimit_core = yes; then + if test $i_cv_have_rlimit_core = yes; then $as_echo "#define HAVE_RLIMIT_CORE /**/" >>confdefs.h -fi + fi + + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PR_SET_DUMPABLE exists" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PR_SET_DUMPABLE exists" >&5 $as_echo_n "checking whether PR_SET_DUMPABLE exists... " >&6; } if ${i_cv_have_pr_set_dumpable+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main () { - prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); + prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); ; return 0; @@ -21527,11 +22468,11 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - i_cv_have_pr_set_dumpable=yes + i_cv_have_pr_set_dumpable=yes else - i_cv_have_pr_set_dumpable=no + i_cv_have_pr_set_dumpable=no fi rm -f core conftest.err conftest.$ac_objext \ @@ -21540,30 +22481,32 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_pr_set_dumpable" >&5 $as_echo "$i_cv_have_pr_set_dumpable" >&6; } -if test $i_cv_have_pr_set_dumpable = yes; then + if test $i_cv_have_pr_set_dumpable = yes; then $as_echo "#define HAVE_PR_SET_DUMPABLE /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux compatible mremap()" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux compatible mremap()" >&5 $as_echo_n "checking Linux compatible mremap()... " >&6; } if ${i_cv_have_linux_mremap+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #define __USE_GNU - #include + #include + #define __USE_GNU + #include int main () { - mremap(0, 0, 0, MREMAP_MAYMOVE); + mremap(0, 0, 0, MREMAP_MAYMOVE); ; return 0; @@ -21571,11 +22514,11 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - i_cv_have_linux_mremap=yes + i_cv_have_linux_mremap=yes else - i_cv_have_linux_mremap=no + i_cv_have_linux_mremap=no fi rm -f core conftest.err conftest.$ac_objext \ @@ -21584,19 +22527,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_linux_mremap" >&5 $as_echo "$i_cv_have_linux_mremap" >&6; } -if test $i_cv_have_linux_mremap = yes; then + if test $i_cv_have_linux_mremap = yes; then $as_echo "#define HAVE_LINUX_MREMAP /**/" >>confdefs.h -fi + fi + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shared mmaps get updated by write()s" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shared mmaps get updated by write()s" >&5 $as_echo_n "checking whether shared mmaps get updated by write()s... " >&6; } if ${i_cv_mmap_plays_with_write+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -21605,45 +22550,45 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include - #include - #include - #include - #include - int main() { - /* return 0 if we're signed */ - int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600); - void *mem; - if (f == -1) { - perror("open()"); - return 1; - } - unlink("conftest.mmap"); + #include + #include + #include + #include + #include + #include + #include + int main() { + /* return 0 if we're signed */ + int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600); + void *mem; + if (f == -1) { + perror("open()"); + return 1; + } + unlink("conftest.mmap"); - write(f, "1", 2); - mem = mmap(NULL, 2, PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); - if (mem == MAP_FAILED) { - perror("mmap()"); - return 1; - } - strcpy(mem, "2"); - msync(mem, 2, MS_SYNC); - lseek(f, 0, SEEK_SET); - write(f, "3", 2); + write(f, "1", 2); + mem = mmap(NULL, 2, PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); + if (mem == MAP_FAILED) { + perror("mmap()"); + return 1; + } + strcpy(mem, "2"); + msync(mem, 2, MS_SYNC); + lseek(f, 0, SEEK_SET); + write(f, "3", 2); - return strcmp(mem, "3") == 0 ? 0 : 1; - } + return strcmp(mem, "3") == 0 ? 0 : 1; + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - i_cv_mmap_plays_with_write=yes + i_cv_mmap_plays_with_write=yes else - i_cv_mmap_plays_with_write=no + i_cv_mmap_plays_with_write=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -21654,26 +22599,28 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_mmap_plays_with_write" >&5 $as_echo "$i_cv_mmap_plays_with_write" >&6; } -if test $i_cv_mmap_plays_with_write = no; then + if test $i_cv_mmap_plays_with_write = no; then $as_echo "#define MMAP_CONFLICTS_WRITE /**/" >>confdefs.h -fi + fi + + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fd passing works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fd passing works" >&5 $as_echo_n "checking whether fd passing works... " >&6; } if ${i_cv_fd_passing+:} false; then : $as_echo_n "(cached) " >&6 else - for i in 1 2; do - old_cflags="$CFLAGS" - CFLAGS="$CFLAGS -I$srcdir/src/lib $srcdir/src/lib/fdpass.c" - if test $i = 2; then - CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS" - fi + for i in 1 2; do + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -I$srcdir/src/lib $srcdir/src/lib/fdpass.c" + if test $i = 2; then + CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS" + fi - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -21682,102 +22629,105 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include - #include - #include - #include - #include "fdpass.h" + #include + #include + #include + #include + #include + #include + #include "fdpass.h" - int nopen(void) - { - int i, n; - struct stat sb; - for (i = n = 0; i < 256; i++) - if (fstat(i, &sb) == 0) n++; - return n; - } - int main(void) - { - int fd[2], send_fd, recv_fd, status, n1, n2; - struct stat st, st2; - char data; - - send_fd = creat("conftest.fdpass", 0600); - if (send_fd == -1) return 2; - unlink("conftest.fdpass"); - if (fstat(send_fd, &st) < 0) return 2; - if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2; - n1 = nopen(); - - switch (fork()) { - case -1: - return 2; - case 0: - alarm(1); - if (fd_send(fd[0], send_fd, &data, 1) != 1) return 2; - return 0; - default: - alarm(2); - if (wait(&status) == -1) - return 2; - if (status != 0) - return status; - if (fd_read(fd[1], &data, 1, &recv_fd) != 1) return 1; - if (fstat(recv_fd, &st2) < 0) return 2; - /* nopen check is for making sure that only a single fd - was received */ - n2 = nopen(); - return st.st_ino == st2.st_ino && n2 == n1 + 1 ? 0 : 1; - } - } + static + int nopen(void) + { + int i, n; + struct stat sb; + for (i = n = 0; i < 256; i++) + if (fstat(i, &sb) == 0) n++; + return n; + } + int main(void) + { + int fd[2], send_fd, recv_fd, status, n1, n2; + struct stat st, st2; + char data; + + send_fd = creat("conftest.fdpass", 0600); + if (send_fd == -1) return 2; + unlink("conftest.fdpass"); + if (fstat(send_fd, &st) < 0) return 2; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2; + n1 = nopen(); + + switch (fork()) { + case -1: + return 2; + case 0: + alarm(1); + if (fd_send(fd[0], send_fd, &data, 1) != 1) return 2; + return 0; + default: + alarm(2); + if (wait(&status) == -1) + return 2; + if (status != 0) + return status; + if (fd_read(fd[1], &data, 1, &recv_fd) != 1) return 1; + if (fstat(recv_fd, &st2) < 0) return 2; + /* nopen check is for making sure that only a single fd + was received */ + n2 = nopen(); + return st.st_ino == st2.st_ino && n2 == n1 + 1 ? 0 : 1; + } + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - CFLAGS=$old_cflags - if test $i = 2; then - i_cv_fd_passing=buggy_cmsg_macros - else - i_cv_fd_passing=yes - fi - break + CFLAGS=$old_cflags + if test $i = 2; then + i_cv_fd_passing=buggy_cmsg_macros + else + i_cv_fd_passing=yes + fi + break else - CFLAGS=$old_cflags - i_cv_fd_passing=no + CFLAGS=$old_cflags + i_cv_fd_passing=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - done + done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_fd_passing" >&5 $as_echo "$i_cv_fd_passing" >&6; }; -case "$host_os" in -darwin[1-9].*) - if test "$i_cv_fd_passing" = "yes"; then - i_cv_fd_passing=buggy_cmsg_macros - fi - ;; -esac + case "$host_os" in + darwin[1-9].*) + if test "$i_cv_fd_passing" = "yes"; then + i_cv_fd_passing=buggy_cmsg_macros + fi + ;; + esac -if test $i_cv_fd_passing = buggy_cmsg_macros; then + if test $i_cv_fd_passing = buggy_cmsg_macros; then $as_echo "#define BUGGY_CMSG_MACROS /**/" >>confdefs.h -fi -if test $i_cv_fd_passing = no; then - as_fn_error $? "fd passing is required for Dovecot to work" "$LINENO" 5 -fi + fi + if test $i_cv_fd_passing = no; then + as_fn_error $? "fd passing is required for Dovecot to work" "$LINENO" 5 + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5 $as_echo_n "checking for sendfile in -lsendfile... " >&6; } if ${ac_cv_lib_sendfile_sendfile+:} false; then : $as_echo_n "(cached) " >&6 @@ -21815,32 +22765,32 @@ $as_echo "$ac_cv_lib_sendfile_sendfile" >&6; } if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then : - LIBS="$LIBS -lsendfile" + LIBS="$LIBS -lsendfile" $as_echo "#define HAVE_SOLARIS_SENDFILE /**/" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux compatible sendfile()" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux compatible sendfile()" >&5 $as_echo_n "checking Linux compatible sendfile()... " >&6; } if ${i_cv_have_linux_sendfile+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #undef _FILE_OFFSET_BITS - #include - #include - #include + #undef _FILE_OFFSET_BITS + #include + #include + #include int main () { - sendfile(0, 0, (void *) 0, 0); + sendfile(0, 0, (void *) 0, 0); ; return 0; @@ -21848,11 +22798,11 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - i_cv_have_linux_sendfile=yes + i_cv_have_linux_sendfile=yes else - i_cv_have_linux_sendfile=no + i_cv_have_linux_sendfile=no fi rm -f core conftest.err conftest.$ac_objext \ @@ -21861,31 +22811,31 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_linux_sendfile" >&5 $as_echo "$i_cv_have_linux_sendfile" >&6; } - if test $i_cv_have_linux_sendfile = yes; then + if test $i_cv_have_linux_sendfile = yes; then $as_echo "#define HAVE_LINUX_SENDFILE /**/" >>confdefs.h - fi + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FreeBSD compatible sendfile()" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FreeBSD compatible sendfile()" >&5 $as_echo_n "checking FreeBSD compatible sendfile()... " >&6; } if ${i_cv_have_freebsd_sendfile+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include + #include + #include + #include int main () { - struct sf_hdtr hdtr; - sendfile(0, 0, 0, 0, &hdtr, (void *) 0, 0); + struct sf_hdtr hdtr; + sendfile(0, 0, 0, 0, &hdtr, (void *) 0, 0); ; return 0; @@ -21893,11 +22843,11 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - i_cv_have_freebsd_sendfile=yes + i_cv_have_freebsd_sendfile=yes else - i_cv_have_freebsd_sendfile=no + i_cv_have_freebsd_sendfile=no fi rm -f core conftest.err conftest.$ac_objext \ @@ -21906,31 +22856,33 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_freebsd_sendfile" >&5 $as_echo "$i_cv_have_freebsd_sendfile" >&6; } - if test $i_cv_have_freebsd_sendfile = yes; then + if test $i_cv_have_freebsd_sendfile = yes; then $as_echo "#define HAVE_FREEBSD_SENDFILE /**/" >>confdefs.h - fi + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unsetenv returns int" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if unsetenv returns int" >&5 $as_echo_n "checking if unsetenv returns int... " >&6; } if ${i_cv_unsetenv_ret_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main () { - if (unsetenv("env") < 0) ; + if (unsetenv("env") < 0) { } ; return 0; @@ -21938,11 +22890,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_unsetenv_ret_int=yes + i_cv_unsetenv_ret_int=yes else - i_cv_unsetenv_ret_int=no + i_cv_unsetenv_ret_int=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21950,33 +22902,35 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_unsetenv_ret_int" >&5 $as_echo "$i_cv_unsetenv_ret_int" >&6; } -if test $i_cv_unsetenv_ret_int = yes; then + if test $i_cv_unsetenv_ret_int = yes; then $as_echo "#define UNSETENV_RET_INT /**/" >>confdefs.h -fi + fi + + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use _XPG6 macro for crypt()" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use _XPG6 macro for crypt()" >&5 $as_echo_n "checking if we should use _XPG6 macro for crypt()... " >&6; } if ${i_cv_use_xpg6_crypt+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define _XOPEN_SOURCE 4 - #define _XOPEN_SOURCE_EXTENDED 1 - #define _XOPEN_VERSION 4 - #define _XPG4_2 - #define _XPG6 - #include + #define _XOPEN_SOURCE 4 + #define _XOPEN_SOURCE_EXTENDED 1 + #define _XOPEN_VERSION 4 + #define _XPG4_2 + #define _XPG6 + #include int main () { - crypt("a", "b"); + crypt("a", "b"); ; return 0; @@ -21984,11 +22938,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_use_xpg6_crypt=yes + i_cv_use_xpg6_crypt=yes else - i_cv_use_xpg6_crypt=no + i_cv_use_xpg6_crypt=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21996,33 +22950,93 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_use_xpg6_crypt" >&5 $as_echo "$i_cv_use_xpg6_crypt" >&6; } -if test $i_cv_use_xpg6_crypt = yes; then + if test $i_cv_use_xpg6_crypt = yes; then $as_echo "#define CRYPT_USE_XPG6 /**/" >>confdefs.h + fi + + + ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" +if test "x$ac_cv_func_crypt" = xyes; then : + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 +$as_echo_n "checking for crypt in -lcrypt... " >&6; } +if ${ac_cv_lib_crypt_crypt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char crypt (); +int +main () +{ +return crypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypt_crypt=yes +else + ac_cv_lib_crypt_crypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 +$as_echo "$ac_cv_lib_crypt_crypt" >&6; } +if test "x$ac_cv_lib_crypt_crypt" = xyes; then : + + AUTH_LIBS="-lcrypt $AUTH_LIBS" + CRYPT_LIBS="-lcrypt" + +else + + as_fn_error $? "crypt() wasn't found" "$LINENO" 5 + +fi + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct stat has st_?tim timespec fields" >&5 + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct stat has st_?tim timespec fields" >&5 $as_echo_n "checking if struct stat has st_?tim timespec fields... " >&6; } if ${i_cv_have_st_tim_timespec+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include + #include + #include + #include int main () { - struct stat st; - unsigned long x = st.st_mtim.tv_nsec; + struct stat st; + unsigned long x = st.st_mtim.tv_nsec; - return 0; + return 0; ; return 0; @@ -22030,11 +23044,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_st_tim_timespec=yes + i_cv_have_st_tim_timespec=yes else - i_cv_have_st_tim_timespec=no + i_cv_have_st_tim_timespec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -22042,33 +23056,33 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_st_tim_timespec" >&5 $as_echo "$i_cv_have_st_tim_timespec" >&6; } -if test $i_cv_have_st_tim_timespec = yes; then + if test $i_cv_have_st_tim_timespec = yes; then $as_echo "#define HAVE_STAT_XTIM /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct stat has st_?timespec fields" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct stat has st_?timespec fields" >&5 $as_echo_n "checking if struct stat has st_?timespec fields... " >&6; } if ${i_cv_have_st_timespec+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include + #include + #include + #include int main () { - struct stat st; - unsigned long x = st.st_mtimespec.tv_nsec; + struct stat st; + unsigned long x = st.st_mtimespec.tv_nsec; - return 0; + return 0; ; return 0; @@ -22076,11 +23090,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_st_timespec=yes + i_cv_have_st_timespec=yes else - i_cv_have_st_timespec=no + i_cv_have_st_timespec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -22088,32 +23102,34 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_st_timespec" >&5 $as_echo "$i_cv_have_st_timespec" >&6; } -if test $i_cv_have_st_timespec = yes; then + if test $i_cv_have_st_timespec = yes; then $as_echo "#define HAVE_STAT_XTIMESPEC /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if statvfs.f_mntfromname exists" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if statvfs.f_mntfromname exists" >&5 $as_echo_n "checking if statvfs.f_mntfromname exists... " >&6; } if ${i_cv_have_statvfs_f_mntfromname+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include + #include + #include int main () { - struct statvfs buf; - char *p = buf.f_mntfromname; + struct statvfs buf; + char *p = buf.f_mntfromname; - statvfs(".", &buf); + statvfs(".", &buf); ; return 0; @@ -22121,11 +23137,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_statvfs_f_mntfromname=yes + i_cv_have_statvfs_f_mntfromname=yes else - i_cv_have_statvfs_f_mntfromname=no + i_cv_have_statvfs_f_mntfromname=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -22133,32 +23149,32 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_statvfs_f_mntfromname" >&5 $as_echo "$i_cv_have_statvfs_f_mntfromname" >&6; } -if test $i_cv_have_statvfs_f_mntfromname = yes; then + if test $i_cv_have_statvfs_f_mntfromname = yes; then $as_echo "#define HAVE_STATVFS_MNTFROMNAME /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if statfs.f_mntfromname exists" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if statfs.f_mntfromname exists" >&5 $as_echo_n "checking if statfs.f_mntfromname exists... " >&6; } if ${i_cv_have_statfs_f_mntfromname+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include + #include + #include int main () { - struct statfs buf; - char *p = buf.f_mntfromname; + struct statfs buf; + char *p = buf.f_mntfromname; - statfs(".", &buf); + statfs(".", &buf); ; return 0; @@ -22166,11 +23182,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_statfs_f_mntfromname=yes + i_cv_have_statfs_f_mntfromname=yes else - i_cv_have_statfs_f_mntfromname=no + i_cv_have_statfs_f_mntfromname=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -22178,30 +23194,32 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_statfs_f_mntfromname" >&5 $as_echo "$i_cv_have_statfs_f_mntfromname" >&6; } -if test $i_cv_have_statfs_f_mntfromname = yes; then + if test $i_cv_have_statfs_f_mntfromname = yes; then $as_echo "#define HAVE_STATFS_MNTFROMNAME /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct dqblk.dqb_curblocks exists" >&5 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct dqblk.dqb_curblocks exists" >&5 $as_echo_n "checking if struct dqblk.dqb_curblocks exists... " >&6; } if ${i_cv_have_dqblk_dqb_curblocks+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include "$srcdir/src/plugins/quota/quota-fs.h" + #include + #include "$srcdir/src/plugins/quota/quota-fs.h" int main () { - struct dqblk dqblk; - unsigned int x = dqblk.dqb_curblocks; + struct dqblk dqblk; + unsigned int x = dqblk.dqb_curblocks; ; return 0; @@ -22209,11 +23227,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_dqblk_dqb_curblocks=yes + i_cv_have_dqblk_dqb_curblocks=yes else - i_cv_have_dqblk_dqb_curblocks=no + i_cv_have_dqblk_dqb_curblocks=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -22221,30 +23239,31 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_dqblk_dqb_curblocks" >&5 $as_echo "$i_cv_have_dqblk_dqb_curblocks" >&6; } -if test $i_cv_have_dqblk_dqb_curblocks = yes; then + if test $i_cv_have_dqblk_dqb_curblocks = yes; then $as_echo "#define HAVE_STRUCT_DQBLK_CURBLOCKS /**/" >>confdefs.h -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct dqblk.dqb_curspace exists" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct dqblk.dqb_curspace exists" >&5 $as_echo_n "checking if struct dqblk.dqb_curspace exists... " >&6; } if ${i_cv_have_dqblk_dqb_curspace+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include "$srcdir/src/plugins/quota/quota-fs.h" + #include + #include "$srcdir/src/plugins/quota/quota-fs.h" int main () { - struct dqblk dqblk; - unsigned int x = dqblk.dqb_curspace; + struct dqblk dqblk; + unsigned int x = dqblk.dqb_curspace; ; return 0; @@ -22252,11 +23271,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_dqblk_dqb_curspace=yes + i_cv_have_dqblk_dqb_curspace=yes else - i_cv_have_dqblk_dqb_curspace=no + i_cv_have_dqblk_dqb_curspace=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -22264,30 +23283,32 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_dqblk_dqb_curspace" >&5 $as_echo "$i_cv_have_dqblk_dqb_curspace" >&6; } -if test $i_cv_have_dqblk_dqb_curspace = yes; then + if test $i_cv_have_dqblk_dqb_curspace = yes; then $as_echo "#define HAVE_STRUCT_DQBLK_CURSPACE /**/" >>confdefs.h -fi + fi + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Q_QUOTACTL ioctl exists" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Q_QUOTACTL ioctl exists" >&5 $as_echo_n "checking if Q_QUOTACTL ioctl exists... " >&6; } if ${i_cv_have_ioctl_q_quotactl+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include + #include + #include int main () { - struct quotctl ctl; - ioctl(0, Q_QUOTACTL, &ctl); + struct quotctl ctl; + ioctl(0, Q_QUOTACTL, &ctl); ; return 0; @@ -22295,11 +23316,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have_ioctl_q_quotactl=yes + i_cv_have_ioctl_q_quotactl=yes else - i_cv_have_ioctl_q_quotactl=no + i_cv_have_ioctl_q_quotactl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -22308,20 +23329,21 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ioctl_q_quotactl" >&5 $as_echo "$i_cv_have_ioctl_q_quotactl" >&6; } -if test $i_cv_have_ioctl_q_quotactl = yes; then + if test $i_cv_have_ioctl_q_quotactl = yes; then $as_echo "#define HAVE_Q_QUOTACTL /**/" >>confdefs.h -fi + fi + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf()" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf()" >&5 $as_echo_n "checking for C99 vsnprintf()... " >&6; } if ${i_cv_c99_vsnprintf+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -22330,21 +23352,21 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - static int f(const char *fmt, ...) { - va_list args; - char buf[13]; - int ret; - - va_start(args, fmt); - ret = vsnprintf(buf, 11, fmt, args) != 12 || buf[11-1] != '\0'; - va_end(args); - return ret; - } - int main() { - return f("hello %s%d", "world", 1); - } + #include + #include + static int f(const char *fmt, ...) { + va_list args; + char buf[13]; + int ret; + + va_start(args, fmt); + ret = vsnprintf(buf, 11, fmt, args) != 12 || buf[11-1] != '\0'; + va_end(args); + return ret; + } + int main() { + return f("hello %s%d", "world", 1); + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : i_cv_c99_vsnprintf=yes @@ -22359,20 +23381,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_c99_vsnprintf" >&5 $as_echo "$i_cv_c99_vsnprintf" >&6; } -if test $i_cv_c99_vsnprintf = no; then + if test $i_cv_c99_vsnprintf = no; then $as_echo "#define HAVE_OLD_VSNPRINTF /**/" >>confdefs.h -fi + fi + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an implementation of va_copy()" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an implementation of va_copy()" >&5 $as_echo_n "checking for an implementation of va_copy()... " >&6; } if ${lib_cv_va_copy+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -22381,20 +23404,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - va_copy (args2, args1); - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - } + #include + #include + void f (int i, ...) { + va_list args1, args2; + va_start (args1, i); + va_copy (args2, args1); + if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) + exit (1); + va_end (args1); va_end (args2); + } + int main() { + f (0, 42); + return 0; + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : lib_cv_va_copy=yes @@ -22409,13 +23432,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lib_cv_va_copy" >&5 $as_echo "$lib_cv_va_copy" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an implementation of __va_copy()" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an implementation of __va_copy()" >&5 $as_echo_n "checking for an implementation of __va_copy()... " >&6; } if ${lib_cv___va_copy+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -22424,20 +23447,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - __va_copy (args2, args1); - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - } + #include + #include + void f (int i, ...) { + va_list args1, args2; + va_start (args1, i); + __va_copy (args2, args1); + if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) + exit (1); + va_end (args1); va_end (args2); + } + int main() { + f (0, 42); + return 0; + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : lib_cv___va_copy=yes @@ -22453,28 +23476,29 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lib_cv___va_copy" >&5 $as_echo "$lib_cv___va_copy" >&6; } -if test "x$lib_cv_va_copy" = "xyes"; then - va_copy_func=va_copy -else if test "x$lib_cv___va_copy" = "xyes"; then - va_copy_func=__va_copy -fi -fi + if test "x$lib_cv_va_copy" = "xyes"; then + va_copy_func=va_copy + else if test "x$lib_cv___va_copy" = "xyes"; then + va_copy_func=__va_copy + fi + fi -if test -n "$va_copy_func"; then + if test -n "$va_copy_func"; then cat >>confdefs.h <<_ACEOF #define VA_COPY $va_copy_func _ACEOF -fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_lists can be copied by value" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_lists can be copied by value" >&5 $as_echo_n "checking whether va_lists can be copied by value... " >&6; } if ${lib_cv_va_val_copy+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -22483,20 +23507,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - args2 = args1; - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - } + #include + #include + void f (int i, ...) { + va_list args1, args2; + va_start (args1, i); + args2 = args1; + if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) + exit (1); + va_end (args1); va_end (args2); + } + int main() { + f (0, 42); + return 0; + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : lib_cv_va_val_copy=yes @@ -22512,22 +23536,24 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lib_cv_va_val_copy" >&5 $as_echo "$lib_cv_va_val_copy" >&6; } -if test "x$lib_cv_va_val_copy" = "xno"; then + if test "x$lib_cv_va_val_copy" = "xno"; then $as_echo "#define VA_COPY_AS_ARRAY 1" >>confdefs.h -fi + fi + -have_modules=no -ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" + + have_modules=no + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - have_modules=yes - MODULE_LIBS="-export-dynamic" + have_modules=yes + MODULE_LIBS="-export-dynamic" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 @@ -22565,9 +23591,9 @@ $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - have_modules=yes - MODULE_LIBS="-export-dynamic -ldl" - DLLIB=-ldl + have_modules=yes + MODULE_LIBS="-export-dynamic -ldl" + DLLIB=-ldl fi @@ -22576,10 +23602,11 @@ -if test $ac_cv_header_sys_vmount_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reasonable mntctl buffer size" >&5 + + if test $ac_cv_header_sys_vmount_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reasonable mntctl buffer size" >&5 $as_echo_n "checking for reasonable mntctl buffer size... " >&6; } - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -22588,35 +23615,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include - int main() { - int size,count; char *m; - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - if ((count=mntctl(MCTL_QUERY,sizeof(size),&size))!=0 || !(m=malloc(size)) || - (count=mntctl(MCTL_QUERY,size,m))<=0) exit(1); - fprintf(f, "%d\n",(size * (count + 5))/count & ~1); /* 5 mounts more */ - exit(0); - } + #include + #include + #include + int main() { + int size,count; char *m; + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + if ((count=mntctl(MCTL_QUERY,sizeof(size),&size))!=0 || !(m=malloc(size)) || + (count=mntctl(MCTL_QUERY,size,m))<=0) exit(1); + fprintf(f, "%d\n",(size * (count + 5))/count & ~1); /* 5 mounts more */ + exit(0); + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - size=`cat conftestval` - rm -f conftestval + size=`cat conftestval` + rm -f conftestval cat >>confdefs.h <<_ACEOF #define STATIC_MTAB_SIZE $size _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $size" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $size" >&5 $as_echo "$size" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 $as_echo "default" >&6; } fi @@ -22624,15 +23651,15 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi + fi -have_ssl=no -build_dcrypt_openssl=no + have_ssl=no + build_dcrypt_openssl=no -if test $want_openssl != no && test $have_ssl = no; then - if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists openssl 2>/dev/null; then + if test $want_openssl != no && test $have_ssl = no; then + if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists openssl 2>/dev/null; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5 @@ -22724,11 +23751,11 @@ $as_echo "yes" >&6; } fi - CFLAGS="$CFLAGS $SSL_CFLAGS" - have_openssl=yes - else - # openssl 0.9.8 wants -ldl and it's required if there's only .a lib - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_read in -lssl" >&5 + CFLAGS="$CFLAGS $SSL_CFLAGS" + have_openssl=yes + else + # openssl 0.9.8 wants -ldl and it's required if there's only .a lib + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_read in -lssl" >&5 $as_echo_n "checking for SSL_read in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_read+:} false; then : $as_echo_n "(cached) " >&6 @@ -22766,7 +23793,7 @@ $as_echo "$ac_cv_lib_ssl_SSL_read" >&6; } if test "x$ac_cv_lib_ssl_SSL_read" = xyes; then : - for ac_header in openssl/ssl.h openssl/err.h + for ac_header in openssl/ssl.h openssl/err.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -22775,15 +23802,15 @@ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - SSL_LIBS="-lssl -lcrypto $DLLIB" + SSL_LIBS="-lssl -lcrypto $DLLIB" - have_openssl=yes + have_openssl=yes else - if test $want_openssl = yes; then - as_fn_error $? "Can't build with OpenSSL: openssl/ssl.h or openssl/err.h not found" "$LINENO" 5 - fi + if test $want_openssl = yes; then + as_fn_error $? "Can't build with OpenSSL: openssl/ssl.h or openssl/err.h not found" "$LINENO" 5 + fi fi @@ -22792,30 +23819,58 @@ else - if test $want_openssl = yes; then - as_fn_error $? "Can't build with OpenSSL: libssl not found" "$LINENO" 5 - fi + if test $want_openssl = yes; then + as_fn_error $? "Can't build with OpenSSL: libssl not found" "$LINENO" 5 + fi fi - fi - if test "$have_openssl" = "yes"; then + fi + if test "$have_openssl" = "yes"; then $as_echo "#define HAVE_OPENSSL /**/" >>confdefs.h - have_ssl="yes (OpenSSL)" - build_dcrypt_openssl="no" + have_ssl="yes (OpenSSL)" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL version is 1.0.1 or newer" >&5 +$as_echo_n "checking if OpenSSL version is 1.0.1 or newer... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #if OPENSSL_VERSION_NUMBER < 0x10001000L + #error "fail-compile" + #endif +int +main () +{ + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ssl_version_ge_101=true +else + ssl_version_ge_101=false +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_version_ge_101" >&5 +$as_echo "$ssl_version_ge_101" >&6; } + if test $ssl_version_ge_101 = false; then + as_fn_error $? "Found deprecated OpenSSL version, use 1.0.1 or newer" "$LINENO" 5 + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL version is 1.0.2 or better" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL version is 1.0.2 or better" >&5 $as_echo_n "checking if OpenSSL version is 1.0.2 or better... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #if OPENSSL_VERSION_NUMBER < 0x10002000L - #error "fail-compile" - #endif + #include + #if OPENSSL_VERSION_NUMBER < 0x10002000L + #error "fail-compile" + #endif int main () { @@ -22830,32 +23885,219 @@ ssl_version_ge_102=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_version_ge_102" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_version_ge_102" >&5 $as_echo "$ssl_version_ge_102" >&6; } - # SSL_clear_options introduced in openssl 0.9.8m but may be backported to - # older versions in "enterprise" OS releases; originally implemented as a - # macro but as a function in more recent openssl versions - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSL_clear_options exists" >&5 -$as_echo_n "checking whether SSL_clear_options exists... " >&6; } -if ${i_cv_have_ssl_clear_options+:} false; then : + # SSL_clear_options introduced in openssl 0.9.8m but may be backported to + # older versions in "enterprise" OS releases; originally implemented as a + # macro but as a function in more recent openssl versions + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSL_clear_options exists" >&5 +$as_echo_n "checking whether SSL_clear_options exists... " >&6; } +if ${i_cv_have_ssl_clear_options+:} false; then : + $as_echo_n "(cached) " >&6 +else + + old_LIBS=$LIBS + LIBS="$LIBS -lssl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + SSL *ssl; + long options; + SSL_clear_options(ssl, options); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + i_cv_have_ssl_clear_options=yes + +else + + i_cv_have_ssl_clear_options=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$old_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_clear_options" >&5 +$as_echo "$i_cv_have_ssl_clear_options" >&6; } + if test $i_cv_have_ssl_clear_options = yes; then + +$as_echo "#define HAVE_SSL_CLEAR_OPTIONS /**/" >>confdefs.h + + fi + + # New style mem functions? Should be in v1.1+ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CRYPTO_set_mem_functions has new style parameters" >&5 +$as_echo_n "checking whether CRYPTO_set_mem_functions has new style parameters... " >&6; } +if ${i_cv_have_ssl_new_mem_funcs+:} false; then : + $as_echo_n "(cached) " >&6 +else + + old_LIBS=$LIBS + LIBS="$LIBS -lssl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int CRYPTO_set_mem_functions( + void *(*m) (size_t, const char *, int), + void *(*r) (void *, size_t, const char *, int), + void (*f) (void *, const char *, int)); + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + i_cv_have_ssl_new_mem_funcs=yes + +else + + i_cv_have_ssl_new_mem_funcs=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$old_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_new_mem_funcs" >&5 +$as_echo "$i_cv_have_ssl_new_mem_funcs" >&6; } + if test $i_cv_have_ssl_new_mem_funcs = yes; then + +$as_echo "#define HAVE_SSL_NEW_MEM_FUNCS /**/" >>confdefs.h + + fi + + # SSL_CTX_set1_curves_list is a macro so plain AC_CHECK_LIB fails here. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSL_CTX_set1_curves_list exists" >&5 +$as_echo_n "checking whether SSL_CTX_set1_curves_list exists... " >&6; } +if ${i_cv_have_ssl_ctx_set1_curves_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + + old_LIBS=$LIBS + LIBS="$LIBS -lssl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + SSL_CTX_set1_curves_list((void*)0, ""); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + i_cv_have_ssl_ctx_set1_curves_list=yes + +else + + i_cv_have_ssl_ctx_set1_curves_list=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$old_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_ctx_set1_curves_list" >&5 +$as_echo "$i_cv_have_ssl_ctx_set1_curves_list" >&6; } + if test $i_cv_have_ssl_ctx_set1_curves_list = yes; then + +$as_echo "#define HAVE_SSL_CTX_SET1_CURVES_LIST /**/" >>confdefs.h + + fi + + # SSL_CTX_set_min_proto_version is also a macro so AC_CHECK_LIB fails here. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSL_CTX_set_min_proto_version exists" >&5 +$as_echo_n "checking whether SSL_CTX_set_min_proto_version exists... " >&6; } +if ${i_cv_have_ssl_ctx_set_min_proto_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + + old_LIBS=$LIBS + LIBS="$LIBS -lssl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + SSL_CTX_set_min_proto_version((void*)0, 0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + i_cv_have_ssl_ctx_set_min_proto_version=yes + +else + + i_cv_have_ssl_ctx_set_min_proto_version=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$old_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_ctx_set_min_proto_version" >&5 +$as_echo "$i_cv_have_ssl_ctx_set_min_proto_version" >&6; } + if test $i_cv_have_ssl_ctx_set_min_proto_version = yes; then + +$as_echo "#define HAVE_SSL_CTX_SET_MIN_PROTO_VERSION /**/" >>confdefs.h + + fi + + # SSL_CTX_add0_chain_cert is also a macro so AC_CHECK_LIB fails here. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSL_CTX_add0_chain_cert exists" >&5 +$as_echo_n "checking whether SSL_CTX_add0_chain_cert exists... " >&6; } +if ${i_cv_have_ssl_ctx_add0_chain_cert+:} false; then : $as_echo_n "(cached) " >&6 else - old_LIBS=$LIBS - LIBS="$LIBS -lssl" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + old_LIBS=$LIBS + LIBS="$LIBS -lssl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main () { - SSL *ssl; - long options; - SSL_clear_options(ssl, options); + SSL_CTX_add0_chain_cert((void*)0, 0); ; return 0; @@ -22863,48 +24105,45 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - i_cv_have_ssl_clear_options=yes + i_cv_have_ssl_ctx_add0_chain_cert=yes else - i_cv_have_ssl_clear_options=no + i_cv_have_ssl_ctx_add0_chain_cert=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS=$old_LIBS + LIBS=$old_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_clear_options" >&5 -$as_echo "$i_cv_have_ssl_clear_options" >&6; } - if test $i_cv_have_ssl_clear_options = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_ctx_add0_chain_cert" >&5 +$as_echo "$i_cv_have_ssl_ctx_add0_chain_cert" >&6; } + if test $i_cv_have_ssl_ctx_add0_chain_cert = yes; then -$as_echo "#define HAVE_SSL_CLEAR_OPTIONS /**/" >>confdefs.h +$as_echo "#define HAVE_SSL_CTX_ADD0_CHAIN_CERT /**/" >>confdefs.h - fi + fi - # New style mem functions? Should be in v1.1+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CRYPTO_set_mem_functions has new style parameters" >&5 -$as_echo_n "checking whether CRYPTO_set_mem_functions has new style parameters... " >&6; } -if ${i_cv_have_ssl_new_mem_funcs+:} false; then : + # SSL_CTX_set_current_cert is also a macro so AC_CHECK_LIB fails here. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSL_CTX_set_current_cert exists" >&5 +$as_echo_n "checking whether SSL_CTX_set_current_cert exists... " >&6; } +if ${i_cv_have_ssl_ctx_set_current_cert+:} false; then : $as_echo_n "(cached) " >&6 else - old_LIBS=$LIBS - LIBS="$LIBS -lssl" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + old_LIBS=$LIBS + LIBS="$LIBS -lssl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - int CRYPTO_set_mem_functions( - void *(*m) (size_t, const char *, int), - void *(*r) (void *, size_t, const char *, int), - void (*f) (void *, const char *, int)); + #include int main () { + SSL_CTX_set_current_cert((void*)0, 0); ; return 0; @@ -22912,27 +24151,73 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - i_cv_have_ssl_new_mem_funcs=yes + i_cv_have_ssl_ctx_set_current_cert=yes else - i_cv_have_ssl_new_mem_funcs=no + i_cv_have_ssl_ctx_set_current_cert=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS=$old_LIBS + LIBS=$old_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_new_mem_funcs" >&5 -$as_echo "$i_cv_have_ssl_new_mem_funcs" >&6; } - if test $i_cv_have_ssl_new_mem_funcs = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_ssl_ctx_set_current_cert" >&5 +$as_echo "$i_cv_have_ssl_ctx_set_current_cert" >&6; } + if test $i_cv_have_ssl_ctx_set_current_cert = yes; then -$as_echo "#define HAVE_SSL_NEW_MEM_FUNCS /**/" >>confdefs.h +$as_echo "#define HAVE_SSL_CTX_SET_CURRENT_CERT /**/" >>confdefs.h - fi + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CIPHER_get_kx_nid in -lssl" >&5 +$as_echo_n "checking for SSL_CIPHER_get_kx_nid in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_CIPHER_get_kx_nid+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $SSL_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lssl" >&5 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SSL_CIPHER_get_kx_nid (); +int +main () +{ +return SSL_CIPHER_get_kx_nid (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssl_SSL_CIPHER_get_kx_nid=yes +else + ac_cv_lib_ssl_SSL_CIPHER_get_kx_nid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CIPHER_get_kx_nid" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_CIPHER_get_kx_nid" >&6; } +if test "x$ac_cv_lib_ssl_SSL_CIPHER_get_kx_nid" = xyes; then : + + +$as_echo "#define HAVE_SSL_CIPHER_get_kx_nid /**/" >>confdefs.h + + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_remove_thread_state in -lssl" >&5 $as_echo_n "checking for ERR_remove_thread_state in -lssl... " >&6; } if ${ac_cv_lib_ssl_ERR_remove_thread_state+:} false; then : $as_echo_n "(cached) " >&6 @@ -22976,7 +24261,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_thread_stop in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_thread_stop in -lssl" >&5 $as_echo_n "checking for OPENSSL_thread_stop in -lssl... " >&6; } if ${ac_cv_lib_ssl_OPENSSL_thread_stop+:} false; then : $as_echo_n "(cached) " >&6 @@ -23020,7 +24305,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_cleanup in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_cleanup in -lssl" >&5 $as_echo_n "checking for OPENSSL_cleanup in -lssl... " >&6; } if ${ac_cv_lib_ssl_OPENSSL_cleanup+:} false; then : $as_echo_n "(cached) " >&6 @@ -23064,7 +24349,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_get_current_compression in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_get_current_compression in -lssl" >&5 $as_echo_n "checking for SSL_get_current_compression in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_get_current_compression+:} false; then : $as_echo_n "(cached) " >&6 @@ -23108,7 +24393,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_get_servername in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_get_servername in -lssl" >&5 $as_echo_n "checking for SSL_get_servername in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_get_servername+:} false; then : $as_echo_n "(cached) " >&6 @@ -23152,7 +24437,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_COMP_free_compression_methods in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_COMP_free_compression_methods in -lssl" >&5 $as_echo_n "checking for SSL_COMP_free_compression_methods in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_COMP_free_compression_methods+:} false; then : $as_echo_n "(cached) " >&6 @@ -23196,7 +24481,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSA_generate_key_ex in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSA_generate_key_ex in -lssl" >&5 $as_echo_n "checking for RSA_generate_key_ex in -lssl... " >&6; } if ${ac_cv_lib_ssl_RSA_generate_key_ex+:} false; then : $as_echo_n "(cached) " >&6 @@ -23240,7 +24525,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ASN1_STRING_get0_data in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ASN1_STRING_get0_data in -lssl" >&5 $as_echo_n "checking for ASN1_STRING_get0_data in -lssl... " >&6; } if ${ac_cv_lib_ssl_ASN1_STRING_get0_data+:} false; then : $as_echo_n "(cached) " >&6 @@ -23284,7 +24569,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_CTX_new in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_CTX_new in -lssl" >&5 $as_echo_n "checking for HMAC_CTX_new in -lssl... " >&6; } if ${ac_cv_lib_ssl_HMAC_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 @@ -23328,7 +24613,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lssl" >&5 $as_echo_n "checking for EVP_MD_CTX_new in -lssl... " >&6; } if ${ac_cv_lib_ssl_EVP_MD_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 @@ -23372,7 +24657,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJ_length in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJ_length in -lssl" >&5 $as_echo_n "checking for OBJ_length in -lssl... " >&6; } if ${ac_cv_lib_ssl_OBJ_length+:} false; then : $as_echo_n "(cached) " >&6 @@ -23416,7 +24701,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_get0_RSA in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_get0_RSA in -lssl" >&5 $as_echo_n "checking for EVP_PKEY_get0_RSA in -lssl... " >&6; } if ${ac_cv_lib_ssl_EVP_PKEY_get0_RSA+:} false; then : $as_echo_n "(cached) " >&6 @@ -23460,7 +24745,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_CTX_new_id in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_CTX_new_id in -lssl" >&5 $as_echo_n "checking for EVP_PKEY_CTX_new_id in -lssl... " >&6; } if ${ac_cv_lib_ssl_EVP_PKEY_CTX_new_id+:} false; then : $as_echo_n "(cached) " >&6 @@ -23500,7 +24785,7 @@ have_evp_pkey_ctx_new_id="yes" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EC_KEY_new in -lssl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EC_KEY_new in -lssl" >&5 $as_echo_n "checking for EC_KEY_new in -lssl... " >&6; } if ${ac_cv_lib_ssl_EC_KEY_new+:} false; then : $as_echo_n "(cached) " >&6 @@ -23540,24 +24825,15 @@ have_ec_key_new="yes" fi - if test "$have_evp_pkey_ctx_new_id" = "yes" && test "$have_ec_key_new" = "yes"; then - build_dcrypt_openssl="yes" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No ECC support in OpenSSL - not enabling dcrypt" >&5 + if test "$have_evp_pkey_ctx_new_id" = "yes" && test "$have_ec_key_new" = "yes"; then + build_dcrypt_openssl="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No ECC support in OpenSSL - not enabling dcrypt" >&5 $as_echo "$as_me: WARNING: No ECC support in OpenSSL - not enabling dcrypt" >&2;} + fi fi fi -fi - if test x$ssl_version_ge_102 = xtrue; then - SSL_VERSION_GE_102_TRUE= - SSL_VERSION_GE_102_FALSE='#' -else - SSL_VERSION_GE_102_TRUE='#' - SSL_VERSION_GE_102_FALSE= -fi - - - if test "$have_openssl" = "yes"; then + if test "$have_openssl" = "yes"; then BUILD_OPENSSL_TRUE= BUILD_OPENSSL_FALSE='#' else @@ -23565,7 +24841,7 @@ BUILD_OPENSSL_FALSE= fi - if test "$build_dcrypt_openssl" = "yes"; then + if test "$build_dcrypt_openssl" = "yes"; then BUILD_DCRYPT_OPENSSL_TRUE= BUILD_DCRYPT_OPENSSL_FALSE='#' else @@ -23573,9 +24849,17 @@ BUILD_DCRYPT_OPENSSL_FALSE= fi + if test x$ssl_version_ge_102 = xtrue; then + SSL_VERSION_GE_102_TRUE= + SSL_VERSION_GE_102_FALSE='#' +else + SSL_VERSION_GE_102_TRUE='#' + SSL_VERSION_GE_102_FALSE= +fi + -if test $want_gnutls != no && test $have_ssl = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_global_init in -lgnutls" >&5 + if test $want_gnutls != no && test $have_ssl = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_global_init in -lgnutls" >&5 $as_echo_n "checking for gnutls_global_init in -lgnutls... " >&6; } if ${ac_cv_lib_gnutls_gnutls_global_init+:} false; then : $as_echo_n "(cached) " >&6 @@ -23613,22 +24897,22 @@ $as_echo "$ac_cv_lib_gnutls_gnutls_global_init" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_global_init" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : $as_echo "#define HAVE_GNUTLS /**/" >>confdefs.h - SSL_LIBS="-lgnutls -lgcrypt" + SSL_LIBS="-lgnutls -lgcrypt" - have_ssl="yes (GNUTLS)" - have_gnutls=yes + have_ssl="yes (GNUTLS)" + have_gnutls=yes else - if test $want_gnutls = yes; then - as_fn_error $? "Can't build with GNUTLS: gnutls/gnutls.h not found" "$LINENO" 5 - fi + if test $want_gnutls = yes; then + as_fn_error $? "Can't build with GNUTLS: gnutls/gnutls.h not found" "$LINENO" 5 + fi fi @@ -23636,152 +24920,222 @@ else - if test $want_gnutls = yes; then - as_fn_error $? "Can't build with GNUTLS: libgnutls not found" "$LINENO" 5 - fi + if test $want_gnutls = yes; then + as_fn_error $? "Can't build with GNUTLS: libgnutls not found" "$LINENO" 5 + fi fi -fi + fi -if test "$have_ssl" != "no"; then + if test "$have_ssl" != "no"; then $as_echo "#define HAVE_SSL /**/" >>confdefs.h -fi + fi -if test $want_gc != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5 -$as_echo_n "checking for GC_malloc in -lgc... " >&6; } -if ${ac_cv_lib_gc_GC_malloc+:} false; then : - $as_echo_n "(cached) " >&6 + + +userdb="" +passdb="" +not_userdb="" +not_passdb="" + +passdb="$passdb static" +userdb="$userdb static" +dict_drivers="" + + + +# Check whether --with-lua was given. +if test "${with_lua+set}" = set; then : + withval=$with_lua; with_lua=$withval else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + with_lua=no -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char GC_malloc (); -int -main () -{ -return GC_malloc (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gc_GC_malloc=yes +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we will be linking in Lua" >&5 +$as_echo_n "checking whether we will be linking in Lua... " >&6; } + if test "x$with_lua" = "xplugin"; then : + + with_lua_plugin=yes + with_lua=yes + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lua" >&5 +$as_echo "$with_lua" >&6; } + + if test "x$with_lua" != "xno"; then : + for LUAPC in lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua; do + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5 +$as_echo_n "checking for LUA... " >&6; } + +if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LUAPC >= 5.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LUAPC >= 5.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "$LUAPC >= 5.1" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - ac_cv_lib_gc_GC_malloc=no + pkg_failed=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried +fi +if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LUAPC >= 5.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LUAPC >= 5.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "$LUAPC >= 5.1" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 -$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; } -if test "x$ac_cv_lib_gc_GC_malloc" = xyes; then : - for ac_header in gc/gc.h gc.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LUAPC >= 5.1" 2>&1` + else + LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LUAPC >= 5.1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LUA_PKG_ERRORS" >&5 -done + LUAPC="" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LUAPC="" +else + LUA_CFLAGS=$pkg_cv_LUA_CFLAGS + LUA_LIBS=$pkg_cv_LUA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +$as_echo "#define HAVE_LUA 1" >>confdefs.h + + with_lua=yes + +fi # otherwise pkg_check will fail + if test "x$LUA_LIBS" != "x"; then break; fi + done +fi + + if test "x$with_lua" = "xyes"; then : -$as_echo "#define USE_GC /**/" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chosen LUA" >&5 +$as_echo_n "checking for chosen LUA... " >&6; } + if test "x$LUAPC" = "x"; then : - LIBS="$LIBS -lgc" + as_fn_error $? "cannot find lua" "$LINENO" 5, else - if test $want_gc = yes; then - as_fn_error $? "Can't build with GC: libgc not found" "$LINENO" 5 - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUAPC" >&5 +$as_echo "$LUAPC" >&6; } fi fi + if test "x$with_lua" = "xyes"; then : + if test "x$with_lua_plugin" != "xyes"; then : -userdb="" -passdb="" -not_userdb="" -not_passdb="" +$as_echo "#define BUILTIN_LUA /**/" >>confdefs.h + + +fi + +fi -passdb="$passdb static" -userdb="$userdb static" -if test $want_prefetch_userdb != no; then + if test $want_prefetch_userdb != no; then $as_echo "#define USERDB_PREFETCH /**/" >>confdefs.h - userdb="$userdb prefetch" -else - not_userdb="$not_userdb prefetch" -fi + userdb="$userdb prefetch" + else + not_userdb="$not_userdb prefetch" + fi -if test $want_passwd != no; then + + if test $want_passwd != no; then $as_echo "#define USERDB_PASSWD /**/" >>confdefs.h $as_echo "#define PASSDB_PASSWD /**/" >>confdefs.h - userdb="$userdb passwd" - passdb="$passdb passwd" -else - not_passdb="$not_passdb passwd" - not_userdb="$not_userdb passwd" -fi + userdb="$userdb passwd" + passdb="$passdb passwd" + else + not_passdb="$not_passdb passwd" + not_userdb="$not_userdb passwd" + fi -if test $want_passwd_file != no; then + if test $want_passwd_file != no; then $as_echo "#define USERDB_PASSWD_FILE /**/" >>confdefs.h $as_echo "#define PASSDB_PASSWD_FILE /**/" >>confdefs.h - userdb="$userdb passwd-file" - passdb="$passdb passwd-file" -else - not_passdb="$not_passdb passwd-file" - not_userdb="$not_userdb passwd-file" -fi + userdb="$userdb passwd-file" + passdb="$passdb passwd-file" + else + not_passdb="$not_passdb passwd-file" + not_userdb="$not_userdb passwd-file" + fi + -have_shadow=no -if test $want_shadow != no; then - ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam" + have_shadow=no + if test $want_shadow != no; then + ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam" if test "x$ac_cv_func_getspnam" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default" if test "x$ac_cv_header_shadow_h" = xyes; then : $as_echo "#define PASSDB_SHADOW /**/" >>confdefs.h - have_shadow=yes + have_shadow=yes else - if test $want_shadow = yes; then - as_fn_error $? "Can't build with shadow support: shadow.h not found" "$LINENO" 5 - fi + if test $want_shadow = yes; then + as_fn_error $? "Can't build with shadow support: shadow.h not found" "$LINENO" 5 + fi fi @@ -23789,21 +25143,22 @@ else - if test $want_shadow = yes; then - as_fn_error $? "Can't build with shadow support: getspnam() not found" "$LINENO" 5 - fi + if test $want_shadow = yes; then + as_fn_error $? "Can't build with shadow support: getspnam() not found" "$LINENO" 5 + fi fi -fi -if test $have_shadow = no; then - not_passdb="$not_passdb shadow" -else - passdb="$passdb shadow" -fi + fi + if test $have_shadow = no; then + not_passdb="$not_passdb shadow" + else + passdb="$passdb shadow" + fi -if test $want_pam != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 + + if test $want_pam != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 $as_echo_n "checking for pam_start in -lpam... " >&6; } if ${ac_cv_lib_pam_pam_start+:} false; then : $as_echo_n "(cached) " >&6 @@ -23841,26 +25196,26 @@ $as_echo "$ac_cv_lib_pam_pam_start" >&6; } if test "x$ac_cv_lib_pam_pam_start" = xyes; then : - have_pam=no - ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default" + have_pam=no + ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default" if test "x$ac_cv_header_security_pam_appl_h" = xyes; then : $as_echo "#define HAVE_SECURITY_PAM_APPL_H /**/" >>confdefs.h - have_pam=yes + have_pam=yes fi - ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default" if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then : $as_echo "#define HAVE_PAM_PAM_APPL_H /**/" >>confdefs.h - have_pam=yes + have_pam=yes fi @@ -23868,22 +25223,22 @@ else - if test $want_pam = yes; then - as_fn_error $? "Can't build with PAM support: libpam not found" "$LINENO" 5 - fi + if test $want_pam = yes; then + as_fn_error $? "Can't build with PAM support: libpam not found" "$LINENO" 5 + fi fi -fi + fi -if test "$have_pam" = "yes"; then - AUTH_LIBS="$AUTH_LIBS -lpam" + if test "$have_pam" = "yes"; then + AUTH_LIBS="$AUTH_LIBS -lpam" $as_echo "#define PASSDB_PAM /**/" >>confdefs.h - passdb="$passdb pam" + passdb="$passdb pam" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_setcred in -lpam" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_setcred in -lpam" >&5 $as_echo_n "checking for pam_setcred in -lpam... " >&6; } if ${ac_cv_lib_pam_pam_setcred+:} false; then : $as_echo_n "(cached) " >&6 @@ -23927,54 +25282,57 @@ fi -elif test $want_pam = yes; then - as_fn_error $? "Can't build with PAM support: pam_appl.h not found" "$LINENO" 5 -else - not_passdb="$not_passdb pam" -fi + elif test $want_pam = yes; then + as_fn_error $? "Can't build with PAM support: pam_appl.h not found" "$LINENO" 5 + else + not_passdb="$not_passdb pam" + fi + -if test $want_checkpassword != no; then + if test $want_checkpassword != no; then $as_echo "#define PASSDB_CHECKPASSWORD /**/" >>confdefs.h $as_echo "#define USERDB_CHECKPASSWORD /**/" >>confdefs.h - passdb="$passdb checkpassword" - userdb="$userdb checkpassword" -else - not_passdb="$not_passdb checkpassword" - not_userdb="$not_userdb checkpassword" -fi + passdb="$passdb checkpassword" + userdb="$userdb checkpassword" + else + not_passdb="$not_passdb checkpassword" + not_userdb="$not_userdb checkpassword" + fi -have_bsdauth=no -if test $want_bsdauth != no; then - ac_fn_c_check_func "$LINENO" "auth_userokay" "ac_cv_func_auth_userokay" + + have_bsdauth=no + if test $want_bsdauth != no; then + ac_fn_c_check_func "$LINENO" "auth_userokay" "ac_cv_func_auth_userokay" if test "x$ac_cv_func_auth_userokay" = xyes; then : $as_echo "#define PASSDB_BSDAUTH /**/" >>confdefs.h - have_bsdauth=yes + have_bsdauth=yes else - if test $want_bsdauth = yes; then - as_fn_error $? "Can't build with BSD authentication support: auth_userokay() not found" "$LINENO" 5 - fi + if test $want_bsdauth = yes; then + as_fn_error $? "Can't build with BSD authentication support: auth_userokay() not found" "$LINENO" 5 + fi fi -fi -if test $have_bsdauth = no; then - not_passdb="$not_passdb bsdauth" -else - passdb="$passdb bsdauth" -fi + fi + if test $have_bsdauth = no; then + not_passdb="$not_passdb bsdauth" + else + passdb="$passdb bsdauth" + fi + -have_gssapi=no -if test $want_gssapi != no; then - # Extract the first word of "krb5-config", so it can be a program name with args. + have_gssapi=no + if test $want_gssapi != no; then + # Extract the first word of "krb5-config", so it can be a program name with args. set dummy krb5-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -24012,12 +25370,12 @@ fi - if test $KRB5CONFIG != NO; then - if ! $KRB5CONFIG --version gssapi 2>/dev/null > /dev/null; then - # krb5-config doesn't support gssapi. - KRB5_LIBS="`$KRB5CONFIG --libs`" - KRB5_CFLAGS=`$KRB5CONFIG --cflags` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_acquire_cred in -lgss" >&5 + if test $KRB5CONFIG != NO; then + if ! $KRB5CONFIG --version gssapi 2>/dev/null > /dev/null; then + # krb5-config doesn't support gssapi. + KRB5_LIBS="`$KRB5CONFIG --libs`" + KRB5_CFLAGS=`$KRB5CONFIG --cflags` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_acquire_cred in -lgss" >&5 $as_echo_n "checking for gss_acquire_cred in -lgss... " >&6; } if ${ac_cv_lib_gss_gss_acquire_cred+:} false; then : $as_echo_n "(cached) " >&6 @@ -24055,58 +25413,58 @@ $as_echo "$ac_cv_lib_gss_gss_acquire_cred" >&6; } if test "x$ac_cv_lib_gss_gss_acquire_cred" = xyes; then : - # Solaris - KRB5_LIBS="$KRB5_LIBS -lgss" + # Solaris + KRB5_LIBS="$KRB5_LIBS -lgss" else - # failed - KRB5_LIBS= + # failed + KRB5_LIBS= fi - else - KRB5_LIBS=`$KRB5CONFIG --libs gssapi` - KRB5_CFLAGS=`$KRB5CONFIG --cflags gssapi` - fi - if test "$KRB5_LIBS" != ""; then + else + KRB5_LIBS=`$KRB5CONFIG --libs gssapi` + KRB5_CFLAGS=`$KRB5CONFIG --cflags gssapi` + fi + if test "$KRB5_LIBS" != ""; then - # Although krb5-config exists, all systems still don't - # have gssapi.h - old_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $KRB5_CFLAGS" - ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default" + # Although krb5-config exists, all systems still don't + # have gssapi.h + old_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $KRB5_CFLAGS" + ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then : $as_echo "#define HAVE_GSSAPI_GSSAPI_H /**/" >>confdefs.h - have_gssapi=yes + have_gssapi=yes fi - ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_h" = xyes; then : $as_echo "#define HAVE_GSSAPI_H /**/" >>confdefs.h - have_gssapi=yes + have_gssapi=yes fi - if test $have_gssapi != no; then - if test $want_gssapi = plugin; then - have_gssapi=plugin - fi + if test $have_gssapi != no; then + if test $want_gssapi = plugin; then + have_gssapi=plugin + fi $as_echo "#define HAVE_GSSAPI /**/" >>confdefs.h - for ac_header in gssapi/gssapi_ext.h gssapi_krb5.h gssapi/gssapi_krb5.h + for ac_header in gssapi/gssapi_ext.h gssapi_krb5.h gssapi/gssapi_krb5.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -24119,7 +25477,7 @@ done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gss_userok in -lgss" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gss_userok in -lgss" >&5 $as_echo_n "checking for __gss_userok in -lgss... " >&6; } if ${ac_cv_lib_gss___gss_userok+:} false; then : $as_echo_n "(cached) " >&6 @@ -24160,16 +25518,16 @@ $as_echo "#define HAVE___GSS_USEROK /**/" >>confdefs.h - KRB5_LIBS="$KRB5_LIBS -lgss" + KRB5_LIBS="$KRB5_LIBS -lgss" fi - # MIT has a #define for Heimdal acceptor_identity, but it's way too - # difficult to test for it.. - old_LIBS=$LIBS - LIBS="$LIBS $KRB5_LIBS" - for ac_func in gsskrb5_register_acceptor_identity krb5_gss_register_acceptor_identity + # MIT has a #define for Heimdal acceptor_identity, but it's way too + # difficult to test for it.. + old_LIBS=$LIBS + LIBS="$LIBS $KRB5_LIBS" + for ac_func in gsskrb5_register_acceptor_identity krb5_gss_register_acceptor_identity do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -24182,14 +25540,14 @@ done - # does the kerberos library support SPNEGO? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GSSAPI supports SPNEGO" >&5 + # does the kerberos library support SPNEGO? + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GSSAPI supports SPNEGO" >&5 $as_echo_n "checking whether GSSAPI supports SPNEGO... " >&6; } if ${i_cv_gssapi_spnego+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling @@ -24198,37 +25556,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #ifdef HAVE_GSSAPI_H - # include - #else - # include - #endif - #include - #include - int main(void) { - OM_uint32 minor_status; - gss_OID_set mech_set; - unsigned char spnego_oid[] = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x02 }; - unsigned int i; - - gss_indicate_mechs(&minor_status, &mech_set); - for (i = 0; i < mech_set->count; i++) { - if (mech_set->elements[i].length == 6 && - memcmp(mech_set->elements[i].elements, - spnego_oid, 6) == 0) - return 0; - } - return 1; - } + #ifdef HAVE_GSSAPI_H + # include + #else + # include + #endif + #include + #include + int main(void) { + OM_uint32 minor_status; + gss_OID_set mech_set; + unsigned char spnego_oid[] = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x02 }; + unsigned int i; + + gss_indicate_mechs(&minor_status, &mech_set); + for (i = 0; i < mech_set->count; i++) { + if (mech_set->elements[i].length == 6 && + memcmp(mech_set->elements[i].elements, + spnego_oid, 6) == 0) + return 0; + } + return 1; + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - i_cv_gssapi_spnego=yes + i_cv_gssapi_spnego=yes else - i_cv_gssapi_spnego=no + i_cv_gssapi_spnego=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -24239,36 +25597,36 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_gssapi_spnego" >&5 $as_echo "$i_cv_gssapi_spnego" >&6; } - if test "$i_cv_gssapi_spnego" = "yes"; then + if test "$i_cv_gssapi_spnego" = "yes"; then $as_echo "#define HAVE_GSSAPI_SPNEGO /**/" >>confdefs.h - fi - LIBS=$old_LIBS + fi + LIBS=$old_LIBS - if test $want_gssapi != plugin; then - AUTH_LIBS="$AUTH_LIBS $KRB5_LIBS" - AUTH_CFLAGS="$AUTH_CFLAGS $KRB5_CFLAGS" + if test $want_gssapi != plugin; then + AUTH_LIBS="$AUTH_LIBS $KRB5_LIBS" + AUTH_CFLAGS="$AUTH_CFLAGS $KRB5_CFLAGS" $as_echo "#define BUILTIN_GSSAPI /**/" >>confdefs.h - else - have_gssapi_plugin=yes - fi - else - if test $want_gssapi != auto; then - as_fn_error $? "Can't build with GSSAPI support: gssapi.h not found" "$LINENO" 5 - fi - fi - CFLAGS=$old_CFLAGS - fi - else - if test $want_gssapi != auto; then - as_fn_error $? "Can't build with GSSAPI support: krb5-config not found" "$LINENO" 5 - fi - fi -fi - if test "$have_gssapi_plugin" = "yes"; then + else + have_gssapi_plugin=yes + fi + else + if test $want_gssapi != auto; then + as_fn_error $? "Can't build with GSSAPI support: gssapi.h not found" "$LINENO" 5 + fi + fi + CFLAGS=$old_CFLAGS + fi + else + if test $want_gssapi != auto; then + as_fn_error $? "Can't build with GSSAPI support: krb5-config not found" "$LINENO" 5 + fi + fi + fi + if test "$have_gssapi_plugin" = "yes"; then GSSAPI_PLUGIN_TRUE= GSSAPI_PLUGIN_FALSE='#' else @@ -24277,36 +25635,38 @@ fi -have_sia=no -if test $want_sia != no; then - ac_fn_c_check_func "$LINENO" "sia_validate_user" "ac_cv_func_sia_validate_user" + + have_sia=no + if test $want_sia != no; then + ac_fn_c_check_func "$LINENO" "sia_validate_user" "ac_cv_func_sia_validate_user" if test "x$ac_cv_func_sia_validate_user" = xyes; then : $as_echo "#define PASSDB_SIA /**/" >>confdefs.h - AUTH_LIBS="$AUTH_LIBS -depth_ring_search" - have_sia=yes + AUTH_LIBS="$AUTH_LIBS -depth_ring_search" + have_sia=yes else - if test $want_sia = yes; then - as_fn_error $? "Can't build with SIA support: sia_validate_user() not found" "$LINENO" 5 - fi + if test $want_sia = yes; then + as_fn_error $? "Can't build with SIA support: sia_validate_user() not found" "$LINENO" 5 + fi fi -fi + fi -if test $have_sia = no; then - not_passdb="$not_passdb sia" -else - passdb="$passdb sia" -fi + if test $have_sia = no; then + not_passdb="$not_passdb sia" + else + passdb="$passdb sia" + fi -have_ldap=no -if test $want_ldap != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -lldap" >&5 + + have_ldap=no + if test $want_ldap != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -lldap" >&5 $as_echo_n "checking for ldap_init in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_init+:} false; then : $as_echo_n "(cached) " >&6 @@ -24344,10 +25704,10 @@ $as_echo "$ac_cv_lib_ldap_ldap_init" >&6; } if test "x$ac_cv_lib_ldap_ldap_init" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default" if test "x$ac_cv_header_ldap_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_initialize+:} false; then : $as_echo_n "(cached) " >&6 @@ -24391,7 +25751,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -lldap" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -lldap" >&5 $as_echo_n "checking for ldap_start_tls_s in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_start_tls_s+:} false; then : $as_echo_n "(cached) " >&6 @@ -24435,8 +25795,8 @@ fi - LDAP_LIBS="-lldap" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_free in -lldap" >&5 + LDAP_LIBS="-lldap" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_free in -lldap" >&5 $as_echo_n "checking for ber_free in -lldap... " >&6; } if ${ac_cv_lib_ldap_ber_free+:} false; then : $as_echo_n "(cached) " >&6 @@ -24474,12 +25834,12 @@ $as_echo "$ac_cv_lib_ldap_ber_free" >&6; } if test "x$ac_cv_lib_ldap_ber_free" = xyes; then : - # do nothing, default is to add -lldap to LIBS - : + # do nothing, default is to add -lldap to LIBS + : else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_free in -llber" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_free in -llber" >&5 $as_echo_n "checking for ber_free in -llber... " >&6; } if ${ac_cv_lib_lber_ber_free+:} false; then : $as_echo_n "(cached) " >&6 @@ -24517,7 +25877,7 @@ $as_echo "$ac_cv_lib_lber_ber_free" >&6; } if test "x$ac_cv_lib_lber_ber_free" = xyes; then : - LDAP_LIBS="$LDAP_LIBS -llber" + LDAP_LIBS="$LDAP_LIBS -llber" fi @@ -24525,12 +25885,13 @@ fi - if test $want_ldap != plugin; then - AUTH_LIBS="$AUTH_LIBS $LDAP_LIBS" + if test $want_ldap != plugin; then + AUTH_LIBS="$AUTH_LIBS $LDAP_LIBS" + DICT_LIBS="$DICT_LIBS $LDAP_LIBS" $as_echo "#define BUILTIN_LDAP /**/" >>confdefs.h - fi + fi $as_echo "#define USERDB_LDAP /**/" >>confdefs.h @@ -24538,7 +25899,7 @@ $as_echo "#define PASSDB_LDAP /**/" >>confdefs.h - for ac_header in sasl.h sasl/sasl.h + for ac_header in sasl.h sasl/sasl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -24551,13 +25912,13 @@ done - have_ldap=yes + have_ldap=yes else - if test $want_ldap != auto; then - as_fn_error $? "Can't build with LDAP support: ldap.h not found" "$LINENO" 5 - fi + if test $want_ldap != auto; then + as_fn_error $? "Can't build with LDAP support: ldap.h not found" "$LINENO" 5 + fi fi @@ -24565,27 +25926,27 @@ else - if test $want_ldap != auto; then - as_fn_error $? "Can't build with LDAP support: libldap not found" "$LINENO" 5 - fi + if test $want_ldap != auto; then + as_fn_error $? "Can't build with LDAP support: libldap not found" "$LINENO" 5 + fi fi -fi + fi -if test $have_ldap = no; then - not_passdb="$not_passdb ldap" - not_userdb="$not_userdb ldap" -else - userdb="$userdb ldap" - passdb="$passdb ldap" - if test $want_ldap = plugin; then - have_ldap_plugin=yes - userdb="$userdb (plugin)" - passdb="$passdb (plugin)" + if test $have_ldap = no; then + not_passdb="$not_passdb ldap" + not_userdb="$not_userdb ldap" + else + userdb="$userdb ldap" + passdb="$passdb ldap" + if test $want_ldap = plugin; then + have_ldap_plugin=yes + userdb="$userdb (plugin)" + passdb="$passdb (plugin)" + fi fi -fi - if test "$have_ldap_plugin" = "yes"; then + if test "$have_ldap_plugin" = "yes"; then LDAP_PLUGIN_TRUE= LDAP_PLUGIN_FALSE='#' else @@ -24593,7 +25954,7 @@ LDAP_PLUGIN_FALSE= fi - if test "$want_ldap" != "no"; then + if test "$want_ldap" != "no"; then HAVE_LDAP_TRUE= HAVE_LDAP_FALSE='#' else @@ -24601,27 +25962,27 @@ HAVE_LDAP_FALSE= fi -dict_drivers= -if test $want_db != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking db_env_create in -ldb" >&5 + + if test $want_db != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking db_env_create in -ldb" >&5 $as_echo_n "checking db_env_create in -ldb... " >&6; } if ${i_cv_have_db_env_create+:} false; then : $as_echo_n "(cached) " >&6 else - old_LIBS=$LIBS - LIBS="$LIBS -ldb" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + old_LIBS=$LIBS + LIBS="$LIBS -ldb" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main () { - db_env_create(0, 0); + db_env_create(0, 0); ; return 0; @@ -24629,48 +25990,49 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - i_cv_have_db_env_create=yes + i_cv_have_db_env_create=yes else - i_cv_have_db_env_create=no + i_cv_have_db_env_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS=$old_LIBS + LIBS=$old_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_db_env_create" >&5 $as_echo "$i_cv_have_db_env_create" >&6; } - if test $i_cv_have_db_env_create = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" + if test $i_cv_have_db_env_create = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" if test "x$ac_cv_header_db_h" = xyes; then : - DICT_LIBS="$DICT_LIBS -ldb" - dict_drivers="$dict_drivers db" + DICT_LIBS="$DICT_LIBS -ldb" + dict_drivers="$dict_drivers db" $as_echo "#define BUILD_DB /**/" >>confdefs.h else - if test $want_db = yes; then - as_fn_error $? "Can't build with db support: db.h not found" "$LINENO" 5 - fi + if test $want_db = yes; then + as_fn_error $? "Can't build with db support: db.h not found" "$LINENO" 5 + fi fi - else - if test $want_db = yes; then - as_fn_error $? "Can't build with db support: libdb not found" "$LINENO" 5 + else + if test $want_db = yes; then + as_fn_error $? "Can't build with db support: libdb not found" "$LINENO" 5 + fi fi fi -fi -if test $want_cdb != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdb_init in -lcdb" >&5 + + if test $want_cdb != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdb_init in -lcdb" >&5 $as_echo_n "checking for cdb_init in -lcdb... " >&6; } if ${ac_cv_lib_cdb_cdb_init+:} false; then : $as_echo_n "(cached) " >&6 @@ -24708,20 +26070,20 @@ $as_echo "$ac_cv_lib_cdb_cdb_init" >&6; } if test "x$ac_cv_lib_cdb_cdb_init" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "cdb.h" "ac_cv_header_cdb_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "cdb.h" "ac_cv_header_cdb_h" "$ac_includes_default" if test "x$ac_cv_header_cdb_h" = xyes; then : - DICT_LIBS="$DICT_LIBS -lcdb" - dict_drivers="$dict_drivers cdb" + DICT_LIBS="$DICT_LIBS -lcdb" + dict_drivers="$dict_drivers cdb" $as_echo "#define BUILD_CDB /**/" >>confdefs.h else - if test $want_cdb = yes; then - as_fn_error $? "Can't build with CDB support: cdb.h not found" "$LINENO" 5 - fi + if test $want_cdb = yes; then + as_fn_error $? "Can't build with CDB support: cdb.h not found" "$LINENO" 5 + fi fi @@ -24729,16 +26091,17 @@ else - if test $want_cdb = yes; then - as_fn_error $? "Can't build with CDB support: libcdb not found" "$LINENO" 5 - fi + if test $want_cdb = yes; then + as_fn_error $? "Can't build with CDB support: libcdb not found" "$LINENO" 5 + fi fi -fi + fi + -if test $want_pgsql != no; then - # Extract the first word of "pg_config", so it can be a program name with args. + if test $want_pgsql != no; then + # Extract the first word of "pg_config", so it can be a program name with args. set dummy pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -24776,33 +26139,33 @@ fi - if test $PG_CONFIG = NO; then - # based on code from PHP - for i in /usr /usr/local /usr/local/pgsql; do - for j in include include/pgsql include/postgres include/postgresql ""; do - if test -r "$i/$j/libpq-fe.h"; then - PGSQL_INCLUDE=$i/$j - fi - done - for lib in lib lib64; do - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do - if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then - PGSQL_LIBDIR=$i/$j - fi - done + if test $PG_CONFIG = NO; then + # based on code from PHP + for i in /usr /usr/local /usr/local/pgsql; do + for j in include include/pgsql include/postgres include/postgresql ""; do + if test -r "$i/$j/libpq-fe.h"; then + PGSQL_INCLUDE=$i/$j + fi + done + for lib in lib lib64; do + for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then + PGSQL_LIBDIR=$i/$j + fi + done + done done - done - else - PGSQL_INCLUDE="`$PG_CONFIG --includedir`" - PGSQL_LIBDIR="`$PG_CONFIG --libdir`" - fi + else + PGSQL_INCLUDE="`$PG_CONFIG --includedir`" + PGSQL_LIBDIR="`$PG_CONFIG --libdir`" + fi - old_LIBS=$LIBS - if test "$PGSQL_LIBDIR" != ""; then - LIBS="$LIBS -L$PGSQL_LIBDIR" - fi + old_LIBS=$LIBS + if test "$PGSQL_LIBDIR" != ""; then + LIBS="$LIBS -L$PGSQL_LIBDIR" + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5 $as_echo_n "checking for PQconnectdb in -lpq... " >&6; } if ${ac_cv_lib_pq_PQconnectdb+:} false; then : $as_echo_n "(cached) " >&6 @@ -24840,7 +26203,7 @@ $as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; } if test "x$ac_cv_lib_pq_PQconnectdb" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeStringConn in -lpq" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeStringConn in -lpq" >&5 $as_echo_n "checking for PQescapeStringConn in -lpq... " >&6; } if ${ac_cv_lib_pq_PQescapeStringConn+:} false; then : $as_echo_n "(cached) " >&6 @@ -24884,50 +26247,51 @@ fi - old_CPPFLAGS=$CPPFLAGS - if test "$PGSQL_INCLUDE" != ""; then - CPPFLAGS="$CPPFLAGS -I$PGSQL_INCLUDE" - fi - ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default" + old_CPPFLAGS=$CPPFLAGS + if test "$PGSQL_INCLUDE" != ""; then + CPPFLAGS="$CPPFLAGS -I$PGSQL_INCLUDE" + fi + ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default" if test "x$ac_cv_header_libpq_fe_h" = xyes; then : - if test "$PGSQL_INCLUDE" != ""; then - PGSQL_CFLAGS="$PGSQL_CFLAGS -I$PGSQL_INCLUDE" - fi - if test "$PGSQL_LIBDIR" != ""; then - PGSQL_LIBS="$PGSQL_LIBS -L$PGSQL_LIBDIR" - fi - PGSQL_LIBS="$PGSQL_LIBS -lpq" + if test "$PGSQL_INCLUDE" != ""; then + PGSQL_CFLAGS="$PGSQL_CFLAGS -I$PGSQL_INCLUDE" + fi + if test "$PGSQL_LIBDIR" != ""; then + PGSQL_LIBS="$PGSQL_LIBS -L$PGSQL_LIBDIR" + fi + PGSQL_LIBS="$PGSQL_LIBS -lpq" $as_echo "#define HAVE_PGSQL /**/" >>confdefs.h - found_sql_drivers="$found_sql_drivers pgsql" + found_sql_drivers="$found_sql_drivers pgsql" else - if test $want_pgsql = yes; then - as_fn_error $? "Can't build with PostgreSQL support: libpq-fe.h not found" "$LINENO" 5 - fi + if test $want_pgsql = yes; then + as_fn_error $? "Can't build with PostgreSQL support: libpq-fe.h not found" "$LINENO" 5 + fi fi - CPPFLAGS=$old_CPPFLAGS + CPPFLAGS=$old_CPPFLAGS else - if test $want_pgsql = yes; then - as_fn_error $? "Can't build with PostgreSQL support: libpq not found" "$LINENO" 5 - fi + if test $want_pgsql = yes; then + as_fn_error $? "Can't build with PostgreSQL support: libpq not found" "$LINENO" 5 + fi fi - LIBS=$old_LIBS -fi + LIBS=$old_LIBS + fi -have_mysql=no -if test $want_mysql != no; then - # Extract the first word of "mysql_config", so it can be a program name with args. + + have_mysql=no + if test $want_mysql != no; then + # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -24965,34 +26329,34 @@ fi - if test $MYSQL_CONFIG = NO; then - # based on code from PHP - MYSQL_LIBS="-lmysqlclient -lz -lm" - for i in /usr /usr/local /usr/local/mysql; do - for j in include include/mysql ""; do - if test -r "$i/$j/mysql.h"; then - MYSQL_INCLUDE="-I$i/$j" - fi - done - for j in lib lib/mysql lib64 lib64/mysql ""; do - if test -f "$i/$j/libmysqlclient.so" || test -f "$i/$j/libmysqlclient.a"; then - MYSQL_LIBS="-L$i/$j -lmysqlclient -lz -lm" - fi - done - done - else - MYSQL_INCLUDE="`$MYSQL_CONFIG --include`" - MYSQL_LIBS="`$MYSQL_CONFIG --libs`" - fi + if test $MYSQL_CONFIG = NO; then + # based on code from PHP + MYSQL_LIBS="-lmysqlclient -lz -lm" + for i in /usr /usr/local /usr/local/mysql; do + for j in include include/mysql ""; do + if test -r "$i/$j/mysql.h"; then + MYSQL_INCLUDE="-I$i/$j" + fi + done + for j in lib lib/mysql lib64 lib64/mysql ""; do + if test -f "$i/$j/libmysqlclient.so" || test -f "$i/$j/libmysqlclient.a"; then + MYSQL_LIBS="-L$i/$j -lmysqlclient -lz -lm" + fi + done + done + else + MYSQL_INCLUDE="`$MYSQL_CONFIG --include`" + MYSQL_LIBS="`$MYSQL_CONFIG --libs`" + fi - old_LIBS=$LIBS - if test "$MYSQL_LIBS" != ""; then - LIBS="$LIBS $MYSQL_LIBS" - fi + old_LIBS=$LIBS + if test "$MYSQL_LIBS" != ""; then + LIBS="$LIBS $MYSQL_LIBS" + fi - mysql_lib="" - LIBS="$LIBS -lz -lm" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 + mysql_lib="" + LIBS="$LIBS -lz -lm" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 $as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then : $as_echo_n "(cached) " >&6 @@ -25030,18 +26394,18 @@ $as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; } if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then : - old_CPPFLAGS=$CPPFLAGS - if test "$MYSQL_INCLUDE" != ""; then - CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE" - fi - ac_fn_c_check_header_mongrel "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default" + old_CPPFLAGS=$CPPFLAGS + if test "$MYSQL_INCLUDE" != ""; then + CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE" + fi + ac_fn_c_check_header_mongrel "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default" if test "x$ac_cv_header_mysql_h" = xyes; then : - if test "$MYSQL_INCLUDE" != ""; then - MYSQL_CFLAGS="$MYSQL_CFLAGS $MYSQL_INCLUDE" - fi + if test "$MYSQL_INCLUDE" != ""; then + MYSQL_CFLAGS="$MYSQL_CFLAGS $MYSQL_INCLUDE" + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_ssl_set in -lmysqlclient" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_ssl_set in -lmysqlclient" >&5 $as_echo_n "checking for mysql_ssl_set in -lmysqlclient... " >&6; } if ${ac_cv_lib_mysqlclient_mysql_ssl_set+:} false; then : $as_echo_n "(cached) " >&6 @@ -25082,16 +26446,16 @@ $as_echo "#define HAVE_MYSQL_SSL /**/" >>confdefs.h - if test "x$have_openssl" = "yes"; then - ssl_define="#define HAVE_OPENSSL" - else - ssl_define="" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$have_openssl" = "yes"; then + ssl_define="#define HAVE_OPENSSL" + else + ssl_define="" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - $ssl_define - #include + $ssl_define + #include int main () @@ -25109,17 +26473,17 @@ $as_echo "#define HAVE_MYSQL_SSL_CIPHER /**/" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - $ssl_define - #include + $ssl_define + #include int main () { - int i = MYSQL_OPT_SSL_VERIFY_SERVER_CERT; + int i = MYSQL_OPT_SSL_VERIFY_SERVER_CERT; ; return 0; @@ -25140,41 +26504,147 @@ fi - have_mysql=yes + have_mysql=yes $as_echo "#define HAVE_MYSQL /**/" >>confdefs.h - found_sql_drivers="$found_sql_drivers mysql" + found_sql_drivers="$found_sql_drivers mysql" else - if test $want_mysql = yes; then - as_fn_error $? "Can't build with MySQL support: mysql.h not found" "$LINENO" 5 - fi + if test $want_mysql = yes; then + as_fn_error $? "Can't build with MySQL support: mysql.h not found" "$LINENO" 5 + fi fi - CPPFLAGS=$old_CPPFLAGS + CPPFLAGS=$old_CPPFLAGS else - if test $want_mysql = yes; then - as_fn_error $? "Can't build with MySQL support: libmysqlclient not found" "$LINENO" 5 - fi + if test $want_mysql = yes; then + as_fn_error $? "Can't build with MySQL support: libmysqlclient not found" "$LINENO" 5 + fi fi - if test $have_mysql != yes; then - MYSQL_LIBS= - MYSQL_CFLAGS= + if test $have_mysql != yes; then + MYSQL_LIBS= + MYSQL_CFLAGS= + fi + LIBS=$old_LIBS fi - LIBS=$old_LIBS + + + if test "$want_sodium" != "no"; then : + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSODIUM" >&5 +$as_echo_n "checking for LIBSODIUM... " >&6; } + +if test -n "$LIBSODIUM_CFLAGS"; then + pkg_cv_LIBSODIUM_CFLAGS="$LIBSODIUM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsodium") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBSODIUM_CFLAGS=`$PKG_CONFIG --cflags "libsodium" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBSODIUM_LIBS"; then + pkg_cv_LIBSODIUM_LIBS="$LIBSODIUM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsodium") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBSODIUM_LIBS=`$PKG_CONFIG --libs "libsodium" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBSODIUM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsodium" 2>&1` + else + LIBSODIUM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsodium" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBSODIUM_PKG_ERRORS" >&5 + + have_sodium=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_sodium=no +else + LIBSODIUM_CFLAGS=$pkg_cv_LIBSODIUM_CFLAGS + LIBSODIUM_LIBS=$pkg_cv_LIBSODIUM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + OLD_LIBS="$LIBS" + LIBS="$LIBS $LIBSODIUM_LIBS" + ac_fn_c_check_func "$LINENO" "crypto_pwhash_str_verify" "ac_cv_func_crypto_pwhash_str_verify" +if test "x$ac_cv_func_crypto_pwhash_str_verify" = xyes; then : + + have_sodium=yes + AUTH_LIBS="$AUTH_LIBS $LIBSODIUM_LIBS" + +$as_echo "#define HAVE_LIBSODIUM 1" >>confdefs.h + + +fi + + LIBS="$OLD_LIBS" + +fi + if test "$want_sodium" = "yes" && test "$have_sodium" != "yes" ; then : + + as_fn_error $? "Can't build with libsodium: not found" "$LINENO" 5 + +fi + fi + if test "$have_sodium" = "yes"; then + BUILD_LIBSODIUM_TRUE= + BUILD_LIBSODIUM_FALSE='#' +else + BUILD_LIBSODIUM_TRUE='#' + BUILD_LIBSODIUM_FALSE= +fi + + -if test $want_sqlite != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5 + if test $want_sqlite != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5 $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; } if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then : $as_echo_n "(cached) " >&6 @@ -25212,21 +26682,21 @@ $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; } if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3_h" = xyes; then : - SQLITE_LIBS="$SQLITE_LIBS -lsqlite3" + SQLITE_LIBS="$SQLITE_LIBS -lsqlite3" $as_echo "#define HAVE_SQLITE /**/" >>confdefs.h - found_sql_drivers="$found_sql_drivers sqlite" + found_sql_drivers="$found_sql_drivers sqlite" else - if test $want_sqlite = yes; then - as_fn_error $? "Can't build with SQLite support: sqlite3.h not found" "$LINENO" 5 - fi + if test $want_sqlite = yes; then + as_fn_error $? "Can't build with SQLite support: sqlite3.h not found" "$LINENO" 5 + fi fi @@ -25234,16 +26704,17 @@ else - if test $want_sqlite = yes; then - as_fn_error $? "Can't build with SQLite support: libsqlite3 not found" "$LINENO" 5 - fi + if test $want_sqlite = yes; then + as_fn_error $? "Can't build with SQLite support: libsqlite3 not found" "$LINENO" 5 + fi fi -fi + fi + -if test $want_cassandra != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cass_session_new in -lcassandra" >&5 + if test $want_cassandra != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cass_session_new in -lcassandra" >&5 $as_echo_n "checking for cass_session_new in -lcassandra... " >&6; } if ${ac_cv_lib_cassandra_cass_session_new+:} false; then : $as_echo_n "(cached) " >&6 @@ -25281,16 +26752,16 @@ $as_echo "$ac_cv_lib_cassandra_cass_session_new" >&6; } if test "x$ac_cv_lib_cassandra_cass_session_new" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "cassandra.h" "ac_cv_header_cassandra_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "cassandra.h" "ac_cv_header_cassandra_h" "$ac_includes_default" if test "x$ac_cv_header_cassandra_h" = xyes; then : - CASSANDRA_LIBS="$CASSANDRA_LIBS -lcassandra" + CASSANDRA_LIBS="$CASSANDRA_LIBS -lcassandra" $as_echo "#define HAVE_CASSANDRA /**/" >>confdefs.h - found_sql_drivers="$found_sql_drivers cassandra" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cass_cluster_set_constant_speculative_execution_policy in -lcassandra" >&5 + found_sql_drivers="$found_sql_drivers cassandra" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cass_cluster_set_constant_speculative_execution_policy in -lcassandra" >&5 $as_echo_n "checking for cass_cluster_set_constant_speculative_execution_policy in -lcassandra... " >&6; } if ${ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy+:} false; then : $as_echo_n "(cached) " >&6 @@ -25306,272 +26777,171 @@ #ifdef __cplusplus extern "C" #endif -char cass_cluster_set_constant_speculative_execution_policy (); -int -main () -{ -return cass_cluster_set_constant_speculative_execution_policy (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy=yes -else - ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy" >&5 -$as_echo "$ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy" >&6; } -if test "x$ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy" = xyes; then : - - -$as_echo "#define HAVE_CASSANDRA_SPECULATIVE_POLICY 1" >>confdefs.h - - -fi - - -else - - if test $want_cassandra = yes; then - as_fn_error $? "Can't build with Cassandra support: cassandra.h not found" "$LINENO" 5 - fi - -fi - - - -else - - if test $want_cassandra = yes; then - as_fn_error $? "Can't build with Cassandra support: libcassandra not found" "$LINENO" 5 - fi - -fi - -fi - -SQL_CFLAGS="$MYSQL_CFLAGS $PGSQL_CFLAGS $SQLITE_CFLAGS $CASSANDRA_CFLAGS" -if test "$want_sql" != "plugin"; then - SQL_LIBS="$MYSQL_LIBS $PGSQL_LIBS $SQLITE_LIBS $CASSANDRA_LIBS" -else - -$as_echo "#define SQL_DRIVER_PLUGINS /**/" >>confdefs.h - -fi -sql_drivers= -not_sql_drivers= - -if test "$found_sql_drivers" != "" || test "$want_sql" != "no"; then - sql_drivers="$found_sql_drivers" - - -$as_echo "#define PASSDB_SQL /**/" >>confdefs.h - - -$as_echo "#define USERDB_SQL /**/" >>confdefs.h - - AUTH_LIBS="$AUTH_LIBS $SQL_LIBS" - passdb="$passdb sql" - userdb="$userdb sql" -else - not_passdb="$not_passdb sql" - not_userdb="$not_userdb sql" -fi - -have_vpopmail=no -if test $want_vpopmail != no; then - vpop_etc="$vpopmail_home/etc" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpopmail configuration at $vpop_etc/lib_deps" >&5 -$as_echo_n "checking for vpopmail configuration at $vpop_etc/lib_deps... " >&6; } - if ! test -f $vpop_etc/lib_deps; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - vpop_etc="$vpopmail_home" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpopmail configuration at $vpop_etc/lib_deps" >&5 -$as_echo_n "checking for vpopmail configuration at $vpop_etc/lib_deps... " >&6; } - fi - if test -f $vpop_etc/lib_deps; then - AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpop_etc/inc_deps` $CFLAGS" - AUTH_LIBS="$AUTH_LIBS `cat $vpop_etc/lib_deps`" - -$as_echo "#define USERDB_VPOPMAIL /**/" >>confdefs.h - - -$as_echo "#define PASSDB_VPOPMAIL /**/" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - have_vpopmail=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - if test $want_vpopmail = yes; then - as_fn_error $? "Can't build with vpopmail support: $vpop_etc/lib_deps not found" "$LINENO" 5 - fi - fi -fi - -if test $have_vpopmail = no; then - not_passdb="$not_passdb vpopmail" - not_userdb="$not_userdb vpopmail" -else - userdb="$userdb vpopmail" - passdb="$passdb vpopmail" -fi - -ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" -if test "x$ac_cv_func_crypt" = xyes; then : - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 -$as_echo_n "checking for crypt in -lcrypt... " >&6; } -if ${ac_cv_lib_crypt_crypt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char crypt (); +char cass_cluster_set_constant_speculative_execution_policy (); int main () { -return crypt (); +return cass_cluster_set_constant_speculative_execution_policy (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypt_crypt=yes + ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy=yes else - ac_cv_lib_crypt_crypt=no + ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 -$as_echo "$ac_cv_lib_crypt_crypt" >&6; } -if test "x$ac_cv_lib_crypt_crypt" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy" >&5 +$as_echo "$ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy" >&6; } +if test "x$ac_cv_lib_cassandra_cass_cluster_set_constant_speculative_execution_policy" = xyes; then : - AUTH_LIBS="-lcrypt $AUTH_LIBS" - CRYPT_LIBS="-lcrypt" -else +$as_echo "#define HAVE_CASSANDRA_SPECULATIVE_POLICY 1" >>confdefs.h - as_fn_error $? "crypt() wasn't found" "$LINENO" 5 fi -fi +else + + if test $want_cassandra = yes; then + as_fn_error $? "Can't build with Cassandra support: cassandra.h not found" "$LINENO" 5 + fi +fi -if test $have_modules = yes; then -$as_echo "#define HAVE_MODULES /**/" >>confdefs.h +else + if test $want_cassandra = yes; then + as_fn_error $? "Can't build with Cassandra support: libcassandra not found" "$LINENO" 5 + fi +fi - # shrext_cmds comes from libtool.m4 - module=yes eval MODULE_SUFFIX=$shrext_cmds - if test "$MODULE_SUFFIX" = ""; then - # too old libtool? - MODULE_SUFFIX=.so fi -cat >>confdefs.h <<_ACEOF -#define MODULE_SUFFIX "$MODULE_SUFFIX" -_ACEOF + have_vpopmail=no + if test $want_vpopmail != no; then + vpop_etc="$vpopmail_home/etc" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpopmail configuration at $vpop_etc/lib_deps" >&5 +$as_echo_n "checking for vpopmail configuration at $vpop_etc/lib_deps... " >&6; } + if ! test -f $vpop_etc/lib_deps; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + vpop_etc="$vpopmail_home" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpopmail configuration at $vpop_etc/lib_deps" >&5 +$as_echo_n "checking for vpopmail configuration at $vpop_etc/lib_deps... " >&6; } + fi + if test -f $vpop_etc/lib_deps; then + AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpop_etc/inc_deps` $CFLAGS" + AUTH_LIBS="$AUTH_LIBS `cat $vpop_etc/lib_deps`" -fi +$as_echo "#define USERDB_VPOPMAIL /**/" >>confdefs.h -have_nss=no -if test $want_nss != no; then - if test $have_modules != yes; then - if test $want_nss = yes; then - as_fn_error $? "Can't build with NSS support: Dynamic modules not supported" "$LINENO" 5 - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS support" >&5 -$as_echo_n "checking for NSS support... " >&6; } -if ${i_cv_have_nss+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +$as_echo "#define PASSDB_VPOPMAIL /**/" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + have_vpopmail=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + if test $want_vpopmail = yes; then + as_fn_error $? "Can't build with vpopmail support: $vpop_etc/lib_deps not found" "$LINENO" 5 + fi + fi + fi - #include + if test $have_vpopmail = no; then + not_passdb="$not_passdb vpopmail" + not_userdb="$not_userdb vpopmail" + else + userdb="$userdb vpopmail" + passdb="$passdb vpopmail" + fi -int -main () -{ - enum nss_status status = NSS_STATUS_TRYAGAIN; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : + SQL_CFLAGS="$MYSQL_CFLAGS $PGSQL_CFLAGS $SQLITE_CFLAGS $CASSANDRA_CFLAGS" + if test "$want_sql" != "plugin"; then + SQL_LIBS="$MYSQL_LIBS $PGSQL_LIBS $SQLITE_LIBS $CASSANDRA_LIBS" + else - i_cv_have_nss=yes +$as_echo "#define SQL_DRIVER_PLUGINS /**/" >>confdefs.h -else + fi + sql_drivers= + not_sql_drivers= - i_cv_have_nss=no + if test "$found_sql_drivers" != "" || test "$want_sql" != "no"; then + sql_drivers="$found_sql_drivers" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have_nss" >&5 -$as_echo "$i_cv_have_nss" >&6; } - if test $i_cv_have_nss = yes; then +$as_echo "#define PASSDB_SQL /**/" >>confdefs.h -$as_echo "#define USERDB_NSS /**/" >>confdefs.h - have_nss=yes - else - if test $want_nss = yes; then - as_fn_error $? "Can't build with NSS support: nss.h not found or not usable" "$LINENO" 5 - fi - fi +$as_echo "#define USERDB_SQL /**/" >>confdefs.h + + AUTH_LIBS="$AUTH_LIBS $SQL_LIBS" + passdb="$passdb sql" + userdb="$userdb sql" + else + not_passdb="$not_passdb sql" + not_userdb="$not_userdb sql" fi -fi -if test $have_nss = no; then - not_userdb="$not_userdb nss" + + if test "x$with_lua_plugin" = "xyes"; then + AUTH_LUA_PLUGIN_TRUE= + AUTH_LUA_PLUGIN_FALSE='#' else - userdb="$userdb nss" + AUTH_LUA_PLUGIN_TRUE='#' + AUTH_LUA_PLUGIN_FALSE= fi + if test "x$with_luajit" = "xyes" || test "x$with_lua" = "xyes"; then + HAVE_LUA_TRUE= + HAVE_LUA_FALSE='#' +else + HAVE_LUA_TRUE='#' + HAVE_LUA_FALSE= +fi +if test "x$with_luajit" = "xyes" || test "x$with_lua" = "xyes"; then : + if test "x$with_lua_plugin" = "xyes"; then : + userdb="$userdb lua (plugin)"; passdb="$passdb lua (plugin)" +elif userdb="$userdb lua"; passdb="$passdb lua"; then : +fi +fi +if test $have_modules = yes; then +$as_echo "#define HAVE_MODULES /**/" >>confdefs.h + # shrext_cmds comes from libtool.m4 + module=yes eval MODULE_SUFFIX=$shrext_cmds + if test "$MODULE_SUFFIX" = ""; then + # too old libtool? + MODULE_SUFFIX=.so + fi +cat >>confdefs.h <<_ACEOF +#define MODULE_SUFFIX "$MODULE_SUFFIX" +_ACEOF +fi @@ -25580,48 +26950,17 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined" >&5 -$as_echo_n "checking if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined... " >&6; } -if ${i_cv_have___big_endian__+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #if !(__BIG_ENDIAN__ || __LITTLE_ENDIAN__) - #error nope - #endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - i_cv_have___big_endian__=yes -else - i_cv_have___big_endian__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_have___big_endian__" >&5 -$as_echo "$i_cv_have___big_endian__" >&6; } -if test $i_cv_have___big_endian__ = yes; then -$as_echo "#define WORDS_BIGENDIAN __BIG_ENDIAN__" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 @@ -25845,27 +27184,26 @@ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac -fi -have_ipv6=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6" >&5 + have_ipv6=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6" >&5 $as_echo_n "checking for IPv6... " >&6; } -if ${i_cv_type_in6_addr+:} false; then : + if ${i_cv_type_in6_addr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include -#include + #include + #include + #include + #include + #include int main () { -struct in6_addr i; +struct in6_addr i; (void)i; ; return 0; } @@ -25878,71 +27216,51 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -if test $i_cv_type_in6_addr = yes; then + if test $i_cv_type_in6_addr = yes; then $as_echo "#define HAVE_IPV6 /**/" >>confdefs.h - have_ipv6=yes -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_type_in6_addr" >&5 + have_ipv6=yes + else + as_fn_error $? "Can't build without IPv6 support." "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_type_in6_addr" >&5 $as_echo "$i_cv_type_in6_addr" >&6; } -maildir_libs='$(top_builddir)/src/lib-storage/index/maildir/libstorage_maildir.la' -mbox_libs='$(top_builddir)/src/lib-storage/index/mbox/libstorage_mbox.la' -dbox_common_libs='$(top_builddir)/src/lib-storage/index/dbox-common/libstorage_dbox_common.la' -sdbox_libs='$(top_builddir)/src/lib-storage/index/dbox-single/libstorage_dbox_single.la' -mdbox_libs='$(top_builddir)/src/lib-storage/index/dbox-multi/libstorage_dbox_multi.la' -cydir_libs='$(top_builddir)/src/lib-storage/index/cydir/libstorage_cydir.la' -imapc_libs='$(top_builddir)/src/lib-storage/index/imapc/libstorage_imapc.la $(top_builddir)/src/lib-imap-client/libimap_client.la' -pop3c_libs='$(top_builddir)/src/lib-storage/index/pop3c/libstorage_pop3c.la' -raw_libs='$(top_builddir)/src/lib-storage/index/raw/libstorage_raw.la' -shared_libs='$(top_builddir)/src/lib-storage/index/shared/libstorage_shared.la' CORE_LIBS='$(top_builddir)/src/lib-dovecot/libdovecot.la' STORAGE_LIB='$(top_builddir)/src/lib-storage/libdovecot-storage.la' -LINKED_STORAGE_LIBS= - -mailbox_list_drivers="maildir imapdir fs index none shared" -have_sdbox=no -have_mdbox=no -for storage in $mail_storages; do - LINKED_STORAGE_LIBS="$LINKED_STORAGE_LIBS `eval echo \\$${storage}_libs`" - if test $storage = sdbox; then - have_sdbox=yes - fi - if test $storage = mdbox; then - have_mdbox=yes - fi - if test $storage = sdbox || test $storage = mdbox; then - LINKED_STORAGE_LIBS="$LINKED_STORAGE_LIBS $dbox_common_libs" - dbox_common_libs="" - fi - if test $storage = imapc; then - mailbox_list_drivers="$mailbox_list_drivers imapc" - fi -done LINKED_STORAGE_LDADD= +LIBDOVECOT_LA_LIBS='\ + $(top_builddir)/src/lib-dict-extra/libdict_extra.la \ + $(top_builddir)/src/lib-oauth2/liboauth2.la \ + $(top_builddir)/src/lib-smtp/libsmtp.la \ + $(top_builddir)/src/lib-program-client/libprogram_client.la \ + $(top_builddir)/src/lib-master/libmaster.la \ + $(top_builddir)/src/lib-settings/libsettings.la \ + $(top_builddir)/src/lib-old-stats/libold_stats.la \ + $(top_builddir)/src/lib-http/libhttp.la \ + $(top_builddir)/src/lib-fs/libfs.la \ + $(top_builddir)/src/lib-dict/libdict.la \ + $(top_builddir)/src/lib-dns/libdns.la \ + $(top_builddir)/src/lib-imap/libimap.la \ + $(top_builddir)/src/lib-mail/libmail.la \ + $(top_builddir)/src/lib-sasl/libsasl.la \ + $(top_builddir)/src/lib-auth/libauth.la \ + $(top_builddir)/src/lib-charset/libcharset.la \ + $(top_builddir)/src/lib-ssl-iostream/libssl_iostream.la \ + $(top_builddir)/src/lib-dcrypt/libdcrypt.la \ + $(top_builddir)/src/lib-test/libtest.la \ + $(top_builddir)/src/lib/liblib.la' +# This is used in dovecot-config, which is grepped in dovecot.m4, +# so it needs to be in a single line. +LIBDOVECOT_LA_LIBS=`echo "$LIBDOVECOT_LA_LIBS" | tr -d '\t\n\\\\'` -cat >>confdefs.h <<_ACEOF -#define MAIL_STORAGES "$mail_storages" -_ACEOF - - -if test $have_sdbox = yes; then - # create alias for sdbox - mail_storages="$mail_storages dbox" -fi -if test $have_mdbox = yes; then - mail_storages="$mail_storages mdbox_deleted" -fi - - -LIBDOVECOT_LA_LIBS='$(top_builddir)/src/lib-dict-extra/libdict_extra.la $(top_builddir)/src/lib-oauth2/liboauth2.la $(top_builddir)/src/lib-program-client/libprogram_client.la $(top_builddir)/src/lib-master/libmaster.la $(top_builddir)/src/lib-settings/libsettings.la $(top_builddir)/src/lib-stats/libstats.la $(top_builddir)/src/lib-http/libhttp.la $(top_builddir)/src/lib-fs/libfs.la $(top_builddir)/src/lib-dict/libdict.la $(top_builddir)/src/lib-smtp/libsmtp.la $(top_builddir)/src/lib-dns/libdns.la $(top_builddir)/src/lib-imap/libimap.la $(top_builddir)/src/lib-mail/libmail.la $(top_builddir)/src/lib-sasl/libsasl.la $(top_builddir)/src/lib-auth/libauth.la $(top_builddir)/src/lib-charset/libcharset.la $(top_builddir)/src/lib-ssl-iostream/libssl_iostream.la $(top_builddir)/src/lib-dcrypt/libdcrypt.la $(top_builddir)/src/lib-test/libtest.la $(top_builddir)/src/lib/liblib.la' if test "$want_shared_libs" = "yes"; then LIBDOVECOT_DEPS='$(top_builddir)/src/lib-dovecot/libdovecot.la' LIBDOVECOT="$LIBDOVECOT_DEPS \$(MODULE_LIBS)" @@ -26065,33 +27383,36 @@ COMPRESS_LIBS= -if test "$want_zlib" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" + + + if test "$want_zlib" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : - have_zlib=yes - have_compress_lib=yes + have_zlib=yes + have_compress_lib=yes $as_echo "#define HAVE_ZLIB /**/" >>confdefs.h - COMPRESS_LIBS="$COMPRESS_LIBS -lz" + COMPRESS_LIBS="$COMPRESS_LIBS -lz" else - if test "$want_zlib" = "yes"; then - as_fn_error $? "Can't build with zlib support: zlib.h not found" "$LINENO" 5 - fi + if test "$want_zlib" = "yes"; then + as_fn_error $? "Can't build with zlib support: zlib.h not found" "$LINENO" 5 + fi fi -fi + fi + -if test "$want_bzlib" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" + if test "$want_bzlib" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" if test "x$ac_cv_header_bzlib_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzdopen in -lbz2" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzdopen in -lbz2" >&5 $as_echo_n "checking for BZ2_bzdopen in -lbz2... " >&6; } if ${ac_cv_lib_bz2_BZ2_bzdopen+:} false; then : $as_echo_n "(cached) " >&6 @@ -26129,38 +27450,39 @@ $as_echo "$ac_cv_lib_bz2_BZ2_bzdopen" >&6; } if test "x$ac_cv_lib_bz2_BZ2_bzdopen" = xyes; then : - have_bzlib=yes - have_compress_lib=yes + have_bzlib=yes + have_compress_lib=yes $as_echo "#define HAVE_BZLIB /**/" >>confdefs.h - COMPRESS_LIBS="$COMPRESS_LIBS -lbz2" + COMPRESS_LIBS="$COMPRESS_LIBS -lbz2" else - if test "$want_bzlib" = "yes"; then - as_fn_error $? "Can't build with bzlib support: libbz2 not found" "$LINENO" 5 - fi + if test "$want_bzlib" = "yes"; then + as_fn_error $? "Can't build with bzlib support: libbz2 not found" "$LINENO" 5 + fi fi else - if test "$want_bzlib" = "yes"; then - as_fn_error $? "Can't build with bzlib support: bzlib.h not found" "$LINENO" 5 - fi + if test "$want_bzlib" = "yes"; then + as_fn_error $? "Can't build with bzlib support: bzlib.h not found" "$LINENO" 5 + fi fi -fi + fi + -if test "$want_lzma" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" + if test "$want_lzma" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" if test "x$ac_cv_header_lzma_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_stream_decoder in -llzma" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_stream_decoder in -llzma" >&5 $as_echo_n "checking for lzma_stream_decoder in -llzma... " >&6; } if ${ac_cv_lib_lzma_lzma_stream_decoder+:} false; then : $as_echo_n "(cached) " >&6 @@ -26198,39 +27520,39 @@ $as_echo "$ac_cv_lib_lzma_lzma_stream_decoder" >&6; } if test "x$ac_cv_lib_lzma_lzma_stream_decoder" = xyes; then : - have_lzma=yes - have_compress_lib=yes + have_lzma=yes + have_compress_lib=yes $as_echo "#define HAVE_LZMA /**/" >>confdefs.h - COMPRESS_LIBS="$COMPRESS_LIBS -llzma" + COMPRESS_LIBS="$COMPRESS_LIBS -llzma" else - if test "$want_lzma" = "yes"; then - as_fn_error $? "Can't build with lzma support: liblzma not found" "$LINENO" 5 - fi + if test "$want_lzma" = "yes"; then + as_fn_error $? "Can't build with lzma support: liblzma not found" "$LINENO" 5 + fi fi else - if test "$want_lzma" = "yes"; then - as_fn_error $? "Can't build with lzma support: lzma.h not found" "$LINENO" 5 - fi + if test "$want_lzma" = "yes"; then + as_fn_error $? "Can't build with lzma support: lzma.h not found" "$LINENO" 5 + fi fi -fi + fi -if test "$want_lz4" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default" + if test "$want_lz4" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default" if test "x$ac_cv_header_lz4_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress in -llz4" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress in -llz4" >&5 $as_echo_n "checking for LZ4_compress in -llz4... " >&6; } if ${ac_cv_lib_lz4_LZ4_compress+:} false; then : $as_echo_n "(cached) " >&6 @@ -26268,101 +27590,197 @@ $as_echo "$ac_cv_lib_lz4_LZ4_compress" >&6; } if test "x$ac_cv_lib_lz4_LZ4_compress" = xyes; then : - have_lz4=yes - have_compress_lib=yes + have_lz4=yes + have_compress_lib=yes $as_echo "#define HAVE_LZ4 /**/" >>confdefs.h - COMPRESS_LIBS="$COMPRESS_LIBS -llz4" + COMPRESS_LIBS="$COMPRESS_LIBS -llz4" + +else + + if test "$want_lz4" = "yes"; then + as_fn_error $? "Can't build with lz4 support: liblz4 not found" "$LINENO" 5 + fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5 +$as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; } +if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-llz4 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char LZ4_compress_default (); +int +main () +{ +return LZ4_compress_default (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lz4_LZ4_compress_default=yes +else + ac_cv_lib_lz4_LZ4_compress_default=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5 +$as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; } +if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then : + + +$as_echo "#define HAVE_LZ4_COMPRESS_DEFAULT /**/" >>confdefs.h + + +fi + + +else + + if test "$want_lz4" = "yes"; then + as_fn_error $? "Can't build with lz4 support: lz4.h not found" "$LINENO" 5 + fi + +fi + + + fi + + + + if test "$have_compress_lib" = "yes"; then + BUILD_ZLIB_PLUGIN_TRUE= + BUILD_ZLIB_PLUGIN_FALSE='#' +else + BUILD_ZLIB_PLUGIN_TRUE='#' + BUILD_ZLIB_PLUGIN_FALSE= +fi + + + + RPCGEN=${RPCGEN-rpcgen} + if ! $RPCGEN -c /dev/null > /dev/null; then + RPCGEN= + fi + + + have_rquota=no + if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBTIRPC" >&5 +$as_echo_n "checking for LIBTIRPC... " >&6; } + +if test -n "$LIBTIRPC_CFLAGS"; then + pkg_cv_LIBTIRPC_CFLAGS="$LIBTIRPC_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBTIRPC_CFLAGS=`$PKG_CONFIG --cflags "libtirpc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBTIRPC_LIBS"; then + pkg_cv_LIBTIRPC_LIBS="$LIBTIRPC_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBTIRPC_LIBS=`$PKG_CONFIG --libs "libtirpc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else + pkg_failed=yes +fi + else + pkg_failed=untried +fi - if test "$want_lz4" = "yes"; then - as_fn_error $? "Can't build with lz4 support: liblz4 not found" "$LINENO" 5 - fi -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5 -$as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; } -if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llz4 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char LZ4_compress_default (); -int -main () -{ -return LZ4_compress_default (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lz4_LZ4_compress_default=yes +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - ac_cv_lib_lz4_LZ4_compress_default=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + _pkg_short_errors_supported=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5 -$as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; } -if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then : + if test $_pkg_short_errors_supported = yes; then + LIBTIRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtirpc" 2>&1` + else + LIBTIRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtirpc" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBTIRPC_PKG_ERRORS" >&5 -$as_echo "#define HAVE_LZ4_COMPRESS_DEFAULT /**/" >>confdefs.h + ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default" +if test "x$ac_cv_header_rpc_rpc_h" = xyes; then : + have_rquota=yes fi -else - if test "$want_lz4" = "yes"; then - as_fn_error $? "Can't build with lz4 support: lz4.h not found" "$LINENO" 5 - fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -fi + ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default" +if test "x$ac_cv_header_rpc_rpc_h" = xyes; then : + have_rquota=yes fi - if test "$have_compress_lib" = "yes"; then - BUILD_ZLIB_PLUGIN_TRUE= - BUILD_ZLIB_PLUGIN_FALSE='#' + else - BUILD_ZLIB_PLUGIN_TRUE='#' - BUILD_ZLIB_PLUGIN_FALSE= -fi + LIBTIRPC_CFLAGS=$pkg_cv_LIBTIRPC_CFLAGS + LIBTIRPC_LIBS=$pkg_cv_LIBTIRPC_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_rquota=yes + QUOTA_LIBS="$QUOTA_LIBS \$(LIBTIRPC_LIBS)" -RPCGEN=${RPCGEN-rpcgen} -if ! $RPCGEN -c /dev/null > /dev/null; then - RPCGEN= fi - - -have_rquota=no -if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then + fi + if test "$have_rquota" = yes; then $as_echo "#define HAVE_RQUOTA /**/" >>confdefs.h - have_rquota=yes -fi - if test "$have_rquota" = "yes"; then + fi + if test "$have_rquota" = "yes"; then HAVE_RQUOTA_TRUE= HAVE_RQUOTA_FALSE='#' else @@ -26371,8 +27789,8 @@ fi -QUOTA_LIBS="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing quota_open" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing quota_open" >&5 $as_echo_n "checking for library containing quota_open... " >&6; } if ${ac_cv_search_quota_open+:} false; then : $as_echo_n "(cached) " >&6 @@ -26429,19 +27847,21 @@ $as_echo "#define HAVE_QUOTA_OPEN /**/" >>confdefs.h - QUOTA_LIBS="-lquota" + QUOTA_LIBS="$QUOTA_LIBS -lquota" fi + fts=" squat" not_fts="" -have_solr=no -if test "$want_solr" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_Parse in -lexpat" >&5 + + have_solr=no + if test "$want_solr" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_Parse in -lexpat" >&5 $as_echo_n "checking for XML_Parse in -lexpat... " >&6; } if ${ac_cv_lib_expat_XML_Parse+:} false; then : $as_echo_n "(cached) " >&6 @@ -26479,17 +27899,17 @@ $as_echo "$ac_cv_lib_expat_XML_Parse" >&6; } if test "x$ac_cv_lib_expat_XML_Parse" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" if test "x$ac_cv_header_expat_h" = xyes; then : - have_solr=yes - fts="$fts solr" + have_solr=yes + fts="$fts solr" else - if test $want_solr = yes; then - as_fn_error $? "Can't build with Solr support: expat.h not found" "$LINENO" 5 - fi + if test $want_solr = yes; then + as_fn_error $? "Can't build with Solr support: expat.h not found" "$LINENO" 5 + fi fi @@ -26497,14 +27917,14 @@ else - if test $want_solr = yes; then - as_fn_error $? "Can't build with Solr support: libexpat not found" "$LINENO" 5 - fi + if test $want_solr = yes; then + as_fn_error $? "Can't build with Solr support: libexpat not found" "$LINENO" 5 + fi fi -fi - if test "$have_solr" = "yes"; then + fi + if test "$have_solr" = "yes"; then BUILD_SOLR_TRUE= BUILD_SOLR_FALSE='#' else @@ -26513,8 +27933,9 @@ fi -have_lucene=no -if test "$want_lucene" = "yes"; then + + have_lucene=no + if test "$want_lucene" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLUCENE" >&5 @@ -26575,17 +27996,17 @@ echo "$CLUCENE_PKG_ERRORS" >&5 - # no pkg-config file for clucene. fallback to defaults. - # FIXME: we should verify here that this actually works.. - CLUCENE_LIBS="-lclucene-shared -lclucene-core" + # no pkg-config file for clucene. fallback to defaults. + # FIXME: we should verify here that this actually works.. + CLUCENE_LIBS="-lclucene-shared -lclucene-core" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - # no pkg-config file for clucene. fallback to defaults. - # FIXME: we should verify here that this actually works.. - CLUCENE_LIBS="-lclucene-shared -lclucene-core" + # no pkg-config file for clucene. fallback to defaults. + # FIXME: we should verify here that this actually works.. + CLUCENE_LIBS="-lclucene-shared -lclucene-core" else CLUCENE_CFLAGS=$pkg_cv_CLUCENE_CFLAGS @@ -26594,12 +28015,13 @@ $as_echo "yes" >&6; } fi - have_lucene=yes - fts="$fts lucene" -fi + have_lucene=yes + fts="$fts lucene" + fi + -if test $want_stemmer != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sb_stemmer_new in -lstemmer" >&5 + if test $want_stemmer != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sb_stemmer_new in -lstemmer" >&5 $as_echo_n "checking for sb_stemmer_new in -lstemmer... " >&6; } if ${ac_cv_lib_stemmer_sb_stemmer_new+:} false; then : $as_echo_n "(cached) " >&6 @@ -26637,21 +28059,22 @@ $as_echo "$ac_cv_lib_stemmer_sb_stemmer_new" >&6; } if test "x$ac_cv_lib_stemmer_sb_stemmer_new" = xyes; then : - have_fts_stemmer=yes + have_fts_stemmer=yes $as_echo "#define HAVE_FTS_STEMMER /**/" >>confdefs.h else - if test $want_stemmer = yes; then - as_fn_error $? "Can't build with stemmer support: libstemmer not found" "$LINENO" 5 - fi + if test $want_stemmer = yes; then + as_fn_error $? "Can't build with stemmer support: libstemmer not found" "$LINENO" 5 + fi fi -fi - if test "$have_fts_stemmer" = "yes"; then + fi + + if test "$have_fts_stemmer" = "yes"; then BUILD_FTS_STEMMER_TRUE= BUILD_FTS_STEMMER_FALSE='#' else @@ -26660,8 +28083,9 @@ fi -if test $want_textcat != no; then - if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists libexttextcat 2>/dev/null; then + + if test $want_textcat != no; then + if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists libexttextcat 2>/dev/null; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEXTTEXTCAT" >&5 @@ -26753,13 +28177,13 @@ $as_echo "yes" >&6; } fi - TEXTCAT_DATADIR=`$PKG_CONFIG --variable=pkgdatadir libexttextcat` + TEXTCAT_DATADIR=`$PKG_CONFIG --variable=pkgdatadir libexttextcat` $as_echo "#define HAVE_FTS_EXTTEXTCAT /**/" >>confdefs.h - have_fts_exttextcat=yes - # Debian Wheezy workaround - LIBEXTTEXTCAT_CFLAGS include path is wrong: - for ac_header in libexttextcat/textcat.h + have_fts_exttextcat=yes + # Debian Wheezy workaround - LIBEXTTEXTCAT_CFLAGS include path is wrong: + for ac_header in libexttextcat/textcat.h do : ac_fn_c_check_header_mongrel "$LINENO" "libexttextcat/textcat.h" "ac_cv_header_libexttextcat_textcat_h" "$ac_includes_default" if test "x$ac_cv_header_libexttextcat_textcat_h" = xyes; then : @@ -26771,8 +28195,8 @@ done - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -lexttextcat" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -lexttextcat" >&5 $as_echo_n "checking for special_textcat_Init in -lexttextcat... " >&6; } if ${ac_cv_lib_exttextcat_special_textcat_Init+:} false; then : $as_echo_n "(cached) " >&6 @@ -26810,8 +28234,8 @@ $as_echo "$ac_cv_lib_exttextcat_special_textcat_Init" >&6; } if test "x$ac_cv_lib_exttextcat_special_textcat_Init" = xyes; then : - have_fts_exttextcat=yes - for ac_header in libexttextcat/textcat.h + have_fts_exttextcat=yes + for ac_header in libexttextcat/textcat.h do : ac_fn_c_check_header_mongrel "$LINENO" "libexttextcat/textcat.h" "ac_cv_header_libexttextcat_textcat_h" "$ac_includes_default" if test "x$ac_cv_header_libexttextcat_textcat_h" = xyes; then : @@ -26823,16 +28247,16 @@ done - LIBEXTTEXTCAT_LIBS=-lexttextcat + LIBEXTTEXTCAT_LIBS=-lexttextcat $as_echo "#define HAVE_FTS_EXTTEXTCAT /**/" >>confdefs.h - TEXTCAT_DATADIR="/usr/share/libexttextcat" + TEXTCAT_DATADIR="/usr/share/libexttextcat" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -ltextcat" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -ltextcat" >&5 $as_echo_n "checking for special_textcat_Init in -ltextcat... " >&6; } if ${ac_cv_lib_textcat_special_textcat_Init+:} false; then : $as_echo_n "(cached) " >&6 @@ -26870,9 +28294,9 @@ $as_echo "$ac_cv_lib_textcat_special_textcat_Init" >&6; } if test "x$ac_cv_lib_textcat_special_textcat_Init" = xyes; then : - have_fts_textcat=yes - TEXTCAT_DATADIR="/usr/share/libtextcat" - for ac_header in libtextcat/textcat.h + have_fts_textcat=yes + TEXTCAT_DATADIR="/usr/share/libtextcat" + for ac_header in libtextcat/textcat.h do : ac_fn_c_check_header_mongrel "$LINENO" "libtextcat/textcat.h" "ac_cv_header_libtextcat_textcat_h" "$ac_includes_default" if test "x$ac_cv_header_libtextcat_textcat_h" = xyes; then : @@ -26890,11 +28314,11 @@ fi - if test $want_textcat = yes && test "$have_fts_exttextcat" != yes && test "$have_fts_textcat" != yes; then - as_fn_error $? "Can't build with textcat support: libtextcat or libexttextcat not found" "$LINENO" 5 + if test $want_textcat = yes && test "$have_fts_exttextcat" != yes && test "$have_fts_textcat" != yes; then + as_fn_error $? "Can't build with textcat support: libtextcat or libexttextcat not found" "$LINENO" 5 + fi fi - fi - if test "$have_fts_exttextcat" = yes || test "$have_fts_textcat" = yes; then + if test "$have_fts_exttextcat" = yes || test "$have_fts_textcat" = yes; then $as_echo "#define HAVE_FTS_TEXTCAT /**/" >>confdefs.h @@ -26903,9 +28327,9 @@ #define TEXTCAT_DATADIR "$TEXTCAT_DATADIR" _ACEOF + fi fi -fi - if test "$have_fts_textcat" = "yes"; then + if test "$have_fts_textcat" = "yes"; then BUILD_FTS_TEXTCAT_TRUE= BUILD_FTS_TEXTCAT_FALSE='#' else @@ -26913,7 +28337,7 @@ BUILD_FTS_TEXTCAT_FALSE= fi - if test "$have_fts_exttextcat" = "yes"; then + if test "$have_fts_exttextcat" = "yes"; then BUILD_FTS_EXTTEXTCAT_TRUE= BUILD_FTS_EXTTEXTCAT_FALSE='#' else @@ -26922,8 +28346,10 @@ fi -if test "$want_icu" != "no"; then - if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists icu-i18n 2>/dev/null; then + + + if test "$want_icu" != "no"; then + if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists icu-i18n 2>/dev/null; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBICU" >&5 @@ -27015,15 +28441,15 @@ $as_echo "yes" >&6; } fi - have_icu=yes + have_icu=yes $as_echo "#define HAVE_LIBICU /**/" >>confdefs.h - elif test "$want_icu" = "yes"; then - as_fn_error $? "Can't build with libicu support: libicu-i18n not found" "$LINENO" 5 + elif test "$want_icu" = "yes"; then + as_fn_error $? "Can't build with libicu support: libicu-i18n not found" "$LINENO" 5 + fi fi -fi - if test "$have_icu" = "yes"; then + if test "$have_icu" = "yes"; then BUILD_LIBICU_TRUE= BUILD_LIBICU_FALSE='#' else @@ -27033,88 +28459,6 @@ - want_apparmor=auto - -# Check whether --with-apparmor was given. -if test "${with_apparmor+set}" = set; then : - withval=$with_apparmor; want_apparmor=$withval -fi - - - have_apparmor=no - if test $want_apparmor != no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/apparmor.h" "ac_cv_header_sys_apparmor_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_apparmor_h" = xyes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aa_change_hat in -lapparmor" >&5 -$as_echo_n "checking for aa_change_hat in -lapparmor... " >&6; } -if ${ac_cv_lib_apparmor_aa_change_hat+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lapparmor $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char aa_change_hat (); -int -main () -{ -return aa_change_hat (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_apparmor_aa_change_hat=yes -else - ac_cv_lib_apparmor_aa_change_hat=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_apparmor_aa_change_hat" >&5 -$as_echo "$ac_cv_lib_apparmor_aa_change_hat" >&6; } -if test "x$ac_cv_lib_apparmor_aa_change_hat" = xyes; then : - - have_apparmor=yes - APPARMOR_LIBS=-lapparmor - - -fi - - -fi - - - fi - - if test $want_apparmor = yes; then - if test $have_apparmor = no; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "apparmor was not found -See \`config.log' for more details" "$LINENO" 5; } - fi - fi - - if test "$have_apparmor" = "yes"; then - HAVE_APPARMOR_TRUE= - HAVE_APPARMOR_FALSE='#' -else - HAVE_APPARMOR_TRUE='#' - HAVE_APPARMOR_FALSE= -fi - - - want_apparmor=auto @@ -27206,14 +28550,14 @@ fi -FILES1=`find $srcdir/src -name '*settings.[ch]'|grep "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -v 'lib-master.*c$' | sort -r | sed s/^..//` +FILES1=`find $srcdir/src -name '*settings.[ch]'|grep "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -E -v 'lib-(master|smtp).*c$' | sort -r | sed s/^..//` FILES2=`find $srcdir/src -name '*settings.[ch]'|grep -v "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -v all-settings | sort -r | sed s/^..//` SETTING_FILES=`echo $FILES1 $FILES2 | sed -e s,$srcdir/src,./src,g -e 's,./src,$(top_srcdir)/src,g'` -capability_banner="IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE" -capability="$capability_banner SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE" +capability_banner="IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE" +capability="$capability_banner SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY" cat >>confdefs.h <<_ACEOF #define CAPABILITY_STRING "$capability" @@ -27226,11 +28570,17 @@ CFLAGS="$CFLAGS $EXTRA_CFLAGS" +BINARY_LDFLAGS="$PIE_LDFLAGS $RELRO_LDFLAGS" +BINARY_CFLAGS="$PIE_CFLAGS" + + + + NOPLUGIN_LDFLAGS="-no-undefined" if test "$with_gnu_ld" = yes; then NOPLUGIN_LDFLAGS="$NOPLUGIN_LDFLAGS -Wl,--as-needed" fi -LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS" +LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS $EXTRA_LDFLAGS" @@ -27258,6 +28608,60 @@ fi + + + # Optional tool for making documentation + for ac_prog in pandoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PANDOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PANDOC"; then + ac_cv_prog_PANDOC="$PANDOC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PANDOC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PANDOC=$ac_cv_prog_PANDOC +if test -n "$PANDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 +$as_echo "$PANDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PANDOC" && break +done +test -n "$PANDOC" || PANDOC="true" + + + if test "$PANDOC" = "true"; then + if test ! -e README; then + as_fn_error $? "Cannot produce documentation without pandoc - disable with PANDOC=false ./configure" "$LINENO" 5 + fi + fi + + if test "$docdir" = ""; then docdir='${datadir}/doc/${PACKAGE_TARNAME}' fi @@ -27346,7 +28750,7 @@ ac_config_headers="$ac_config_headers config.h" -ac_config_files="$ac_config_files Makefile doc/Makefile doc/man/Makefile doc/wiki/Makefile doc/example-config/Makefile doc/example-config/conf.d/Makefile src/Makefile src/lib/Makefile src/lib-sql/Makefile src/lib-auth/Makefile src/lib-charset/Makefile src/lib-compression/Makefile src/lib-dcrypt/Makefile src/lib-dict/Makefile src/lib-dict-extra/Makefile src/lib-dns/Makefile src/lib-fs/Makefile src/lib-fts/Makefile src/lib-http/Makefile src/lib-oauth2/Makefile src/lib-imap/Makefile src/lib-imap-storage/Makefile src/lib-imap-client/Makefile src/lib-imap-urlauth/Makefile src/lib-index/Makefile src/lib-lda/Makefile src/lib-ldap/Makefile src/lib-mail/Makefile src/lib-master/Makefile src/lib-ntlm/Makefile src/lib-program-client/Makefile src/lib-otp/Makefile src/lib-dovecot/Makefile src/lib-sasl/Makefile src/lib-settings/Makefile src/lib-smtp/Makefile src/lib-ssl-iostream/Makefile src/lib-stats/Makefile src/lib-test/Makefile src/lib-storage/Makefile src/lib-storage/list/Makefile src/lib-storage/index/Makefile src/lib-storage/index/imapc/Makefile src/lib-storage/index/pop3c/Makefile src/lib-storage/index/maildir/Makefile src/lib-storage/index/mbox/Makefile src/lib-storage/index/dbox-common/Makefile src/lib-storage/index/dbox-multi/Makefile src/lib-storage/index/dbox-single/Makefile src/lib-storage/index/cydir/Makefile src/lib-storage/index/raw/Makefile src/lib-storage/index/shared/Makefile src/lib-storage/register/Makefile src/anvil/Makefile src/auth/Makefile src/config/Makefile src/doveadm/Makefile src/doveadm/dsync/Makefile src/lda/Makefile src/log/Makefile src/lmtp/Makefile src/dict/Makefile src/director/Makefile src/dns/Makefile src/indexer/Makefile src/ipc/Makefile src/imap/Makefile src/imap-hibernate/Makefile src/imap-login/Makefile src/imap-urlauth/Makefile src/login-common/Makefile src/master/Makefile src/pop3/Makefile src/pop3-login/Makefile src/replication/Makefile src/replication/aggregator/Makefile src/replication/replicator/Makefile src/ssl-params/Makefile src/stats/Makefile src/util/Makefile src/plugins/Makefile src/plugins/acl/Makefile src/plugins/imap-acl/Makefile src/plugins/autocreate/Makefile src/plugins/dict-ldap/Makefile src/plugins/expire/Makefile src/plugins/fs-compress/Makefile src/plugins/fts/Makefile src/plugins/fts-lucene/Makefile src/plugins/fts-solr/Makefile src/plugins/fts-squat/Makefile src/plugins/last-login/Makefile src/plugins/lazy-expunge/Makefile src/plugins/listescape/Makefile src/plugins/mail-filter/Makefile src/plugins/mail-log/Makefile src/plugins/mailbox-alias/Makefile src/plugins/notify/Makefile src/plugins/notify-status/Makefile src/plugins/push-notification/Makefile src/plugins/pop3-migration/Makefile src/plugins/quota/Makefile src/plugins/quota-clone/Makefile src/plugins/imap-quota/Makefile src/plugins/replication/Makefile src/plugins/snarf/Makefile src/plugins/stats/Makefile src/plugins/imap-stats/Makefile src/plugins/trash/Makefile src/plugins/virtual/Makefile src/plugins/welcome/Makefile src/plugins/zlib/Makefile src/plugins/imap-zlib/Makefile src/plugins/mail-crypt/Makefile src/plugins/var-expand-crypt/Makefile src/plugins/apparmor/Makefile stamp.h dovecot-config.in" +ac_config_files="$ac_config_files Makefile doc/Makefile doc/man/Makefile doc/wiki/Makefile doc/example-config/Makefile doc/example-config/conf.d/Makefile src/Makefile src/lib/Makefile src/lib-sql/Makefile src/lib-auth/Makefile src/lib-charset/Makefile src/lib-compression/Makefile src/lib-dcrypt/Makefile src/lib-dict/Makefile src/lib-dict-backend/Makefile src/lib-dict-extra/Makefile src/lib-dns/Makefile src/lib-fs/Makefile src/lib-fts/Makefile src/lib-http/Makefile src/lib-oauth2/Makefile src/lib-imap/Makefile src/lib-imap-storage/Makefile src/lib-imap-client/Makefile src/lib-imap-urlauth/Makefile src/lib-index/Makefile src/lib-lda/Makefile src/lib-ldap/Makefile src/lib-lua/Makefile src/lib-mail/Makefile src/lib-master/Makefile src/lib-ntlm/Makefile src/lib-program-client/Makefile src/lib-otp/Makefile src/lib-dovecot/Makefile src/lib-sasl/Makefile src/lib-settings/Makefile src/lib-smtp/Makefile src/lib-ssl-iostream/Makefile src/lib-old-stats/Makefile src/lib-test/Makefile src/lib-storage/Makefile src/lib-storage/list/Makefile src/lib-storage/index/Makefile src/lib-storage/index/imapc/Makefile src/lib-storage/index/pop3c/Makefile src/lib-storage/index/maildir/Makefile src/lib-storage/index/mbox/Makefile src/lib-storage/index/dbox-common/Makefile src/lib-storage/index/dbox-multi/Makefile src/lib-storage/index/dbox-single/Makefile src/lib-storage/index/cydir/Makefile src/lib-storage/index/raw/Makefile src/lib-storage/index/shared/Makefile src/anvil/Makefile src/auth/Makefile src/config/Makefile src/doveadm/Makefile src/doveadm/dsync/Makefile src/lda/Makefile src/log/Makefile src/lmtp/Makefile src/dict/Makefile src/director/Makefile src/dns/Makefile src/indexer/Makefile src/ipc/Makefile src/imap/Makefile src/imap-hibernate/Makefile src/imap-login/Makefile src/imap-urlauth/Makefile src/login-common/Makefile src/master/Makefile src/pop3/Makefile src/pop3-login/Makefile src/submission/Makefile src/submission-login/Makefile src/replication/Makefile src/replication/aggregator/Makefile src/replication/replicator/Makefile src/stats/Makefile src/old-stats/Makefile src/util/Makefile src/plugins/Makefile src/plugins/acl/Makefile src/plugins/imap-acl/Makefile src/plugins/autocreate/Makefile src/plugins/expire/Makefile src/plugins/fs-compress/Makefile src/plugins/fts/Makefile src/plugins/fts-lucene/Makefile src/plugins/fts-solr/Makefile src/plugins/fts-squat/Makefile src/plugins/last-login/Makefile src/plugins/lazy-expunge/Makefile src/plugins/listescape/Makefile src/plugins/mail-filter/Makefile src/plugins/mail-log/Makefile src/plugins/mailbox-alias/Makefile src/plugins/notify/Makefile src/plugins/notify-status/Makefile src/plugins/push-notification/Makefile src/plugins/pop3-migration/Makefile src/plugins/quota/Makefile src/plugins/quota-clone/Makefile src/plugins/imap-quota/Makefile src/plugins/replication/Makefile src/plugins/snarf/Makefile src/plugins/old-stats/Makefile src/plugins/imap-old-stats/Makefile src/plugins/trash/Makefile src/plugins/virtual/Makefile src/plugins/welcome/Makefile src/plugins/zlib/Makefile src/plugins/imap-zlib/Makefile src/plugins/mail-crypt/Makefile src/plugins/var-expand-crypt/Makefile src/plugins/apparmor/Makefile src/plugins/charset-alias/Makefile stamp.h dovecot-config.in" cat >confcache <<\_ACEOF @@ -27510,6 +28914,10 @@ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_WHOLE_ARCHIVE_TRUE}" && test -z "${HAVE_WHOLE_ARCHIVE_FALSE}"; then + as_fn_error $? "conditional \"HAVE_WHOLE_ARCHIVE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${TCPWRAPPERS_TRUE}" && test -z "${TCPWRAPPERS_FALSE}"; then as_fn_error $? "conditional \"TCPWRAPPERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -27518,10 +28926,6 @@ as_fn_error $? "conditional \"DOVECOT_PLUGIN_DEPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${SSL_VERSION_GE_102_TRUE}" && test -z "${SSL_VERSION_GE_102_FALSE}"; then - as_fn_error $? "conditional \"SSL_VERSION_GE_102\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${BUILD_OPENSSL_TRUE}" && test -z "${BUILD_OPENSSL_FALSE}"; then as_fn_error $? "conditional \"BUILD_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -27530,6 +28934,10 @@ as_fn_error $? "conditional \"BUILD_DCRYPT_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${SSL_VERSION_GE_102_TRUE}" && test -z "${SSL_VERSION_GE_102_FALSE}"; then + as_fn_error $? "conditional \"SSL_VERSION_GE_102\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GSSAPI_PLUGIN_TRUE}" && test -z "${GSSAPI_PLUGIN_FALSE}"; then as_fn_error $? "conditional \"GSSAPI_PLUGIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -27542,6 +28950,18 @@ as_fn_error $? "conditional \"HAVE_LDAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_LIBSODIUM_TRUE}" && test -z "${BUILD_LIBSODIUM_FALSE}"; then + as_fn_error $? "conditional \"BUILD_LIBSODIUM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AUTH_LUA_PLUGIN_TRUE}" && test -z "${AUTH_LUA_PLUGIN_FALSE}"; then + as_fn_error $? "conditional \"AUTH_LUA_PLUGIN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LUA_TRUE}" && test -z "${HAVE_LUA_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LUA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BUILD_PGSQL_TRUE}" && test -z "${BUILD_PGSQL_FALSE}"; then as_fn_error $? "conditional \"BUILD_PGSQL\" was never defined. @@ -27595,10 +29015,6 @@ as_fn_error $? "conditional \"HAVE_APPARMOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_APPARMOR_TRUE}" && test -z "${HAVE_APPARMOR_FALSE}"; then - as_fn_error $? "conditional \"HAVE_APPARMOR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -27996,7 +29412,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Dovecot $as_me 2.2.33.2, which was +This file was extended by Dovecot $as_me 2.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -28062,7 +29478,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Dovecot config.status 2.2.33.2 +Dovecot config.status 2.3.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -28589,6 +30005,7 @@ "src/lib-compression/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-compression/Makefile" ;; "src/lib-dcrypt/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-dcrypt/Makefile" ;; "src/lib-dict/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-dict/Makefile" ;; + "src/lib-dict-backend/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-dict-backend/Makefile" ;; "src/lib-dict-extra/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-dict-extra/Makefile" ;; "src/lib-dns/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-dns/Makefile" ;; "src/lib-fs/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-fs/Makefile" ;; @@ -28602,6 +30019,7 @@ "src/lib-index/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-index/Makefile" ;; "src/lib-lda/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-lda/Makefile" ;; "src/lib-ldap/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-ldap/Makefile" ;; + "src/lib-lua/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-lua/Makefile" ;; "src/lib-mail/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-mail/Makefile" ;; "src/lib-master/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-master/Makefile" ;; "src/lib-ntlm/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-ntlm/Makefile" ;; @@ -28612,7 +30030,7 @@ "src/lib-settings/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-settings/Makefile" ;; "src/lib-smtp/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-smtp/Makefile" ;; "src/lib-ssl-iostream/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-ssl-iostream/Makefile" ;; - "src/lib-stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-stats/Makefile" ;; + "src/lib-old-stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-old-stats/Makefile" ;; "src/lib-test/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-test/Makefile" ;; "src/lib-storage/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-storage/Makefile" ;; "src/lib-storage/list/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-storage/list/Makefile" ;; @@ -28627,7 +30045,6 @@ "src/lib-storage/index/cydir/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-storage/index/cydir/Makefile" ;; "src/lib-storage/index/raw/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-storage/index/raw/Makefile" ;; "src/lib-storage/index/shared/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-storage/index/shared/Makefile" ;; - "src/lib-storage/register/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib-storage/register/Makefile" ;; "src/anvil/Makefile") CONFIG_FILES="$CONFIG_FILES src/anvil/Makefile" ;; "src/auth/Makefile") CONFIG_FILES="$CONFIG_FILES src/auth/Makefile" ;; "src/config/Makefile") CONFIG_FILES="$CONFIG_FILES src/config/Makefile" ;; @@ -28649,17 +30066,18 @@ "src/master/Makefile") CONFIG_FILES="$CONFIG_FILES src/master/Makefile" ;; "src/pop3/Makefile") CONFIG_FILES="$CONFIG_FILES src/pop3/Makefile" ;; "src/pop3-login/Makefile") CONFIG_FILES="$CONFIG_FILES src/pop3-login/Makefile" ;; + "src/submission/Makefile") CONFIG_FILES="$CONFIG_FILES src/submission/Makefile" ;; + "src/submission-login/Makefile") CONFIG_FILES="$CONFIG_FILES src/submission-login/Makefile" ;; "src/replication/Makefile") CONFIG_FILES="$CONFIG_FILES src/replication/Makefile" ;; "src/replication/aggregator/Makefile") CONFIG_FILES="$CONFIG_FILES src/replication/aggregator/Makefile" ;; "src/replication/replicator/Makefile") CONFIG_FILES="$CONFIG_FILES src/replication/replicator/Makefile" ;; - "src/ssl-params/Makefile") CONFIG_FILES="$CONFIG_FILES src/ssl-params/Makefile" ;; "src/stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/stats/Makefile" ;; + "src/old-stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/old-stats/Makefile" ;; "src/util/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/Makefile" ;; "src/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/Makefile" ;; "src/plugins/acl/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/acl/Makefile" ;; "src/plugins/imap-acl/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/imap-acl/Makefile" ;; "src/plugins/autocreate/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/autocreate/Makefile" ;; - "src/plugins/dict-ldap/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/dict-ldap/Makefile" ;; "src/plugins/expire/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/expire/Makefile" ;; "src/plugins/fs-compress/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/fs-compress/Makefile" ;; "src/plugins/fts/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/fts/Makefile" ;; @@ -28681,8 +30099,8 @@ "src/plugins/imap-quota/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/imap-quota/Makefile" ;; "src/plugins/replication/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/replication/Makefile" ;; "src/plugins/snarf/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/snarf/Makefile" ;; - "src/plugins/stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/stats/Makefile" ;; - "src/plugins/imap-stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/imap-stats/Makefile" ;; + "src/plugins/old-stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/old-stats/Makefile" ;; + "src/plugins/imap-old-stats/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/imap-old-stats/Makefile" ;; "src/plugins/trash/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/trash/Makefile" ;; "src/plugins/virtual/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/virtual/Makefile" ;; "src/plugins/welcome/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/welcome/Makefile" ;; @@ -28691,6 +30109,7 @@ "src/plugins/mail-crypt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mail-crypt/Makefile" ;; "src/plugins/var-expand-crypt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/var-expand-crypt/Makefile" ;; "src/plugins/apparmor/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/apparmor/Makefile" ;; + "src/plugins/charset-alias/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/charset-alias/Makefile" ;; "stamp.h") CONFIG_FILES="$CONFIG_FILES stamp.h" ;; "dovecot-config.in") CONFIG_FILES="$CONFIG_FILES dovecot-config.in" ;; @@ -30146,8 +31565,7 @@ echo "SSL ............ : $have_ssl" echo "GSSAPI ......... : $have_gssapi" echo "passdbs ........ :$passdb" -echo "dcrypt ..........: $build_dcrypt_openssl" - +echo "CFLAGS ......... : $CFLAGS" if test "$not_passdb" != ""; then echo " :$not_passdb" fi diff -Nru dovecot-2.2.33.2/configure.ac dovecot-2.3.3/configure.ac --- dovecot-2.2.33.2/configure.ac 2017-10-20 13:31:06.000000000 +0000 +++ dovecot-2.3.3/configure.ac 2018-10-01 10:39:55.000000000 +0000 @@ -2,37 +2,27 @@ # Be sure to update ABI version also if anything changes that might require # recompiling plugins. Most importantly that means if any structs are changed. -AC_INIT([Dovecot],[2.2.33.2],[dovecot@dovecot.org]) -AC_DEFINE_UNQUOTED([DOVECOT_ABI_VERSION], "2.2.ABIv33($PACKAGE_VERSION)", [Dovecot ABI version]) -AC_CONFIG_AUX_DIR([.]) +AC_INIT([Dovecot],[2.3.3],[dovecot@dovecot.org]) +AC_DEFINE_UNQUOTED([DOVECOT_ABI_VERSION], "2.3.ABIv3($PACKAGE_VERSION)", [Dovecot ABI version]) + AC_CONFIG_SRCDIR([src]) +AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) AM_MAINTAINER_MODE PKG_PROG_PKG_CONFIG -ACLOCAL_AMFLAGS='-I $(top_srcdir)' +ACLOCAL_AMFLAGS='-I $(top_srcdir)/m4' AC_SUBST(ACLOCAL_AMFLAGS) -dnl TEST_WITH(name, value, [plugin]) -AC_DEFUN([TEST_WITH], [ - want=want_`echo $1|sed s/-/_/g` - if test $2 = yes || test $2 = no || test $2 = auto; then - eval $want=$2 - elif test $2 = plugin; then - if test "$3" = plugin; then - eval $want=plugin - else - AC_ERROR([--with-$1=plugin not supported]) - fi - elif `echo $2|grep '^/' >/dev/null`; then - AC_ERROR([--with-$1=path not supported. You may want to use instead: -CPPFLAGS=-I$2/include LDFLAGS=-L$2/lib ./configure --with-$1]) - else - AC_ERROR([--with-$1: Unknown value: $2]) - fi -]) +AC_ARG_ENABLE(hardening, +AS_HELP_STRING([--enable-hardening=yes], [Enable various hardenings (default: yes)]), + enable_hardening=$enableval, + enable_hardening=yes) + +AC_MSG_CHECKING([Whether to enable hardening]) +AC_MSG_RESULT([$enable_hardening]) AC_ARG_ENABLE(devel-checks, AS_HELP_STRING([--enable-devel-checks], [Enable some extra expensive checks for developers]), @@ -41,6 +31,12 @@ want_devel_checks=yes fi) +AC_ARG_ENABLE(static-checker, +AS_HELP_STRING([--enable-static-checker], [Enable code to be used when building with static code analyzer]), + if test x$enableval = xyes; then + AC_DEFINE(STATIC_CHECKER,, [Building with static code analyzer]) + fi) + AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts], [Enable asserts (default)]), if test x$enableval = xno; then @@ -184,6 +180,11 @@ TEST_WITH(solr, $withval), want_solr=no) +AC_ARG_WITH(sodium, +AS_HELP_STRING([--with-sodium], [Build with libsodium support (enables argon2, default: auto)]), + TEST_WITH(sodium, $withval), + want_sodium=auto) + AC_ARG_WITH(zlib, AS_HELP_STRING([--with-zlib], [Build with zlib compression support (auto)]), TEST_WITH(zlib, $withval), @@ -271,26 +272,6 @@ fi AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "") -AC_ARG_WITH(gc, -AS_HELP_STRING([--with-gc], [Use Boehm garbage collector]), - TEST_WITH(gc, $withval), - want_gc=no) - -AC_ARG_WITH(storages, -AS_HELP_STRING([--with-storages], [Build with specified mail storage formats (mdbox sdbox maildir mbox cydir imapc pop3c)]), [ - if test "$withval" = "yes" || test "$withval" = "no"; then - AC_MSG_ERROR([--with-storages needs storage list as parameter]) - fi - mail_storages="shared `echo "$withval"|sed 's/,/ /g'`" ], - mail_storages="shared mdbox sdbox maildir mbox cydir imapc pop3c") -AC_SUBST(mail_storages) -mail_storages="$mail_storages raw fail" -# drop duplicates -duplicates=`(for i in $mail_storages; do echo $i; done)|sort|uniq -d|xargs echo` -if test "$duplicates" != ""; then - AC_ERROR([Duplicate --with-storages: $duplicates]) -fi - DC_DOVECOT_MODULEDIR AC_ARG_WITH(docs, @@ -328,7 +309,7 @@ AC_DEFINE([DOVECOT_VERSION_MAJOR], regexp(AC_PACKAGE_VERSION, [^\([0-9]+\)\.\([0-9]+\)], [\1]), [Dovecot major version]) AC_DEFINE([DOVECOT_VERSION_MINOR], regexp(AC_PACKAGE_VERSION, [^\([0-9]+\)\.\([0-9]+\)], [\2]), [Dovecot minor version]) -AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \ +AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h \ sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \ sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h \ quota.h sys/fs/quota_common.h \ @@ -336,119 +317,23 @@ xfs/xqm.h execinfo.h ucontext.h malloc_np.h sys/utsname.h sys/vmount.h \ sys/utsname.h glob.h linux/falloc.h ucred.h sys/ucred.h) -dnl * clang check -have_clang=no -if $CC -dM -E -x c /dev/null | grep __clang__ > /dev/null 2>&1; then - have_clang=yes -fi - -dnl * gcc specific options -if test "x$ac_cv_c_compiler_gnu" = "xyes"; then - # -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings - # -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems - # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings - CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" - - if test "$have_clang" = "yes"; then - AC_TRY_COMPILE([ - #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3) - # error new clang - #endif - ],,,[ - # clang 3.3+ unfortunately this gives warnings with hash.h - CFLAGS="$CFLAGS -Wno-duplicate-decl-specifier" - ]) - else - # This is simply to avoid warning when building strftime() wrappers.. - CFLAGS="$CFLAGS -fno-builtin-strftime" - fi - - AC_TRY_COMPILE([ - #if __GNUC__ < 4 - # error old gcc - #endif - ],,[ - # gcc4 - CFLAGS="$CFLAGS -Wstrict-aliasing=2" - ]) - - # Use std=gnu99 if we have new enough gcc - old_cflags=$CFLAGS - CFLAGS="-std=gnu99" - AC_TRY_COMPILE([ - ],, [ - CFLAGS="$CFLAGS $old_cflags" - ], [ - CFLAGS="$old_cflags" - ]) -fi -if test "$have_clang" = "yes"; then - # clang specific options - if test "$want_devel_checks" = "yes"; then - # FIXME: enable once md[45], sha[12] can be compiled without - #CFLAGS="$CFLAGS -fsanitize=integer,undefined -ftrapv" - : - fi -fi - -dnl ** -dnl ** just some generic stuff... -dnl ** - -AC_SEARCH_LIBS(socket, socket) -AC_SEARCH_LIBS(inet_addr, nsl) -AC_SEARCH_LIBS(fdatasync, rt, [ - AC_DEFINE(HAVE_FDATASYNC,, [Define if you have fdatasync()]) -]) +CC_CLANG +AC_CC_PIE +AC_CC_F_STACK_PROTECTOR +AC_CC_D_FORTIFY_SOURCE +AC_CC_RETPOLINE +AC_LD_RELRO +AC_LD_WHOLE_ARCHIVE + +DOVECOT_CFLAGS + +DOVECOT_NSL +DOVECOT_FDATASYNC +DOVECOT_LIBCAP +DOVECOT_LIBWRAP -if test $want_libcap != no; then - AC_CHECK_LIB(cap, cap_init, [ - AC_DEFINE(HAVE_LIBCAP,, [libcap is installed for cap_init()]) - LIBCAP="-lcap" - AC_SUBST(LIBCAP) - ], [ - if test "$want_libcap" = "yes"; then - AC_ERROR([Can't build with libcap support: libcap not found]) - fi - ]) -fi - -have_libwrap=no -if test $want_libwrap != no; then - AC_CHECK_HEADER(tcpd.h, [ - old_LIBS=$LIBS - - AC_CACHE_CHECK([whether we have libwrap],i_cv_have_libwrap,[ - AC_TRY_COMPILE([ - #include - int allow_severity = 0; - int deny_severity = 0; - ], [ - request_init((void *)0); - ], [ - i_cv_have_libwrap=yes - ], [ - i_cv_have_libwrap=no - ]) - ]) - if test $i_cv_have_libwrap = yes; then - AC_DEFINE(HAVE_LIBWRAP,, [Define if you have libwrap]) - LIBWRAP_LIBS=-lwrap - AC_SUBST(LIBWRAP_LIBS) - have_libwrap=yes - else - if test "$want_libwrap" = "yes"; then - AC_ERROR([Can't build with libwrap support: libwrap not found]) - fi - fi - LIBS=$old_LIBS - ], [ - if test "$want_libwrap" = "yes"; then - AC_ERROR([Can't build with libwrap support: tcpd.h not found]) - fi - ]) -fi -AM_CONDITIONAL(TCPWRAPPERS, test "$have_libwrap" = "yes") +DOVECOT_RANDOM +DOVECOT_ARC4RANDOM AC_DEFINE(PACKAGE_WEBPAGE, "http://www.dovecot.org/", [Support URL]) @@ -461,170 +346,14 @@ malloc_usable_size glob fallocate posix_fadvise \ getpeereid getpeerucred inotify_init timegm) -AC_CHECK_TYPES([struct sockpeercred],,,[ -#include -#include -]) - -AC_SEARCH_LIBS(clock_gettime, rt, [ - AC_DEFINE(HAVE_CLOCK_GETTIME,, [Define if you have the clock_gettime function]) -]) - -AC_CACHE_CHECK([for typeof],i_cv_have_typeof,[ - AC_TRY_COMPILE([ - ], [ - int foo; - typeof(foo) bar; - ], [ - i_cv_have_typeof=yes - ], [ - i_cv_have_typeof=no - ]) -]) -if test $i_cv_have_typeof = yes; then - AC_DEFINE(HAVE_TYPEOF,, [Define if you have typeof()]) -fi - -dnl * I/O loop function -have_ioloop=no - -if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then - AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[ - AC_TRY_RUN([ - #include - - int main() - { - return epoll_create(5) < 1; - } - ], [ - i_cv_epoll_works=yes - ], [ - i_cv_epoll_works=no - ]) - ]) - if test $i_cv_epoll_works = yes; then - AC_DEFINE(IOLOOP_EPOLL,, [Implement I/O loop with Linux 2.6 epoll()]) - have_ioloop=yes - ioloop=epoll - else - if test "$ioloop" = "epoll" ; then - AC_MSG_ERROR([epoll ioloop requested but epoll_create() is not available]) - fi - fi -fi - -if test "$ioloop" = "best" || test "$ioloop" = "kqueue"; then - if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes; then - AC_DEFINE(IOLOOP_KQUEUE,, [Implement I/O loop with BSD kqueue()]) - ioloop=kqueue - have_ioloop=yes - elif test "$ioloop" = "kqueue"; then - AC_MSG_ERROR([kqueue ioloop requested but kqueue() is not available]) - fi -fi - -if test "$ioloop" = "best" || test "$ioloop" = "poll"; then - AC_CHECK_FUNC(poll, [ - AC_DEFINE(IOLOOP_POLL,, [Implement I/O loop with poll()]) - ioloop=poll - have_ioloop=yes - ]) -fi - -if test "$have_ioloop" = "no"; then - AC_DEFINE(IOLOOP_SELECT,, [Implement I/O loop with select()]) - ioloop="select" -fi - -have_notify=none - -if test "$notify" = "" || test "$notify" = "inotify" ; then - dnl * inotify? - AC_MSG_CHECKING([whether we can use inotify]) - if test "$ac_cv_func_inotify_init" = yes; then - have_notify=inotify - notify=inotify - AC_MSG_RESULT("yes") - AC_DEFINE(IOLOOP_NOTIFY_INOTIFY,, [Use Linux inotify]) - else - AC_MSG_RESULT("no") - if test "$notify" = "inotify"; then - AC_MSG_ERROR([inotify requested but not available]) - notify="" - fi - fi -fi - -if (test "$notify" = "" && test "$ioloop" = kqueue) || test "$notify" = "kqueue"; then - dnl * BSD kqueue() notify - AC_MSG_CHECKING([whether we can use BSD kqueue() notify]) - if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes ; then - have_notify=kqueue - notify=kqueue - AC_MSG_RESULT("yes") - AC_DEFINE(IOLOOP_NOTIFY_KQUEUE,, [Use BSD kqueue directory changes notificaton]) - else - AC_MSG_RESULT("no") - if test "$notify" = "kqueue" ; then - AC_MSG_ERROR([kqueue notify requested but kqueue() is not available]) - notify="" - fi - fi -fi - -if test "$have_notify" = "none"; then - AC_DEFINE(IOLOOP_NOTIFY_NONE,, [No special notify support]) -fi +DOVECOT_SOCKPEERCRED +DOVECOT_CLOCK_GETTIME -AC_CACHE_CHECK([whether we have glibc],i_cv_have_glibc,[ - AC_TRY_COMPILE([ - #include - #ifdef __GLIBC__ - we have glibc - #endif - ],, [ - i_cv_have_glibc=no - ], [ - i_cv_have_glibc=yes - ]) -]) -if test "$i_cv_have_glibc" = "yes"; then - AC_DEFINE(PREAD_WRAPPERS,, [Define if pread/pwrite needs _XOPEN_SOURCE 500]) -fi +DOVECOT_TYPEOF +DOVECOT_IOLOOP +DOVECOT_NOTIFY -dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. -dnl * It may also be broken in AIX. -AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ - AC_TRY_RUN([ - #define _XOPEN_SOURCE 600 - #include - #include - #include - #include - #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) - possibly broken posix_fallocate - #endif - int main() { - int fd = creat("conftest.temp", 0600); - int ret; - if (fd == -1) { - perror("creat()"); - return 2; - } - ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0; - unlink("conftest.temp"); - return ret; - } - ], [ - i_cv_posix_fallocate_works=yes - ], [ - i_cv_posix_fallocate_works=no - ]) -]) -if test $i_cv_posix_fallocate_works = yes; then - AC_DEFINE(HAVE_POSIX_FALLOCATE,, [Define if you have a working posix_fallocate()]) -fi +DOVECOT_GLIBC dnl * OS specific options DC_PLUGIN_DEPS @@ -648,127 +377,6 @@ AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(long long) -AC_DEFUN([AC_TYPEOF], [ - dnl * first check if we can get the size with redefining typedefs - - order="$2" - if test "$2" = ""; then - order="int long long-long" - fi - - result="" - visible="unknown" - AC_MSG_CHECKING([type of $1]) - AC_CACHE_VAL(i_cv_typeof_$1,[ - if test "x$ac_cv_c_compiler_gnu" = "xyes"; then - dnl * try with printf() + -Werror - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - - for type in $order; do - case "$type" in - int) - fmt="%d" - ;; - unsigned-int) - fmt="%u" - ;; - long) - fmt="%ld" - ;; - unsigned-long) - fmt="%lu" - ;; - long-long) - fmt="%lld" - ;; - unsigned-long-long) - fmt="%llu" - ;; - *) - fmt="" - ;; - esac - - if test "$fmt" != ""; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]], [[ - printf("$fmt", ($1)0); - ]])],[ - if test "$result" != ""; then - dnl * warning check isn't working - result="" - visible="unknown" - break - fi - result="`echo $type|sed 's/-/ /g'`" - visible="$result" - ],[]) - fi - done - CFLAGS="$old_CFLAGS" - fi - - if test "$result" = ""; then - for type in $order; do - type="`echo $type|sed 's/-/ /g'`" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - typedef $type $1; - ]], [[]])],[ - if test "$result" != ""; then - dnl * compiler allows redefining to anything - result="" - visible="unknown" - break - fi - result="$type" - visible="$type" - ],[]) - done - fi - - if test "$result" = ""; then - dnl * check with sizes - - dnl * older autoconfs don't include sys/types.h, so do it manually - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof($1)); - exit(0); - } - ]])],[ - size=`cat conftestval` - rm -f conftestval - - for type in $order; do - actype="ac_cv_sizeof_`echo $type|sed 's/-/_/g'`" - if test "$size" = "`eval echo \\$$actype`"; then - result="`echo $type|sed 's/-/ /g'`" - visible="`expr $size \* 8`bit (using $result)" - break - fi - done - if test "$result" = ""; then - result=unknown - visible="`expr $size \* 8`bit (unknown type)" - fi - ],[],[]) - fi - i_cv_typeof_$1=$result/$visible - ]) - - typeof_$1=`echo $i_cv_typeof_$1 | sed s,/.*$,,` - visible=`echo $i_cv_typeof_$1 | sed s,^.*/,,` - AC_MSG_RESULT($visible) -]) - AC_SYS_LARGEFILE AC_CHECK_TYPES(_Bool) @@ -783,6 +391,7 @@ case "$typeof_off_t" in int) offt_max=INT_MAX + uofft_max=UINT_MAX uofft_fmt="u" if test "$have_uoff_t" != "yes"; then AC_DEFINE(UOFF_T_INT,, [Define if off_t is int]) @@ -791,6 +400,7 @@ ;; long) offt_max=LONG_MAX + uofft_max=ULONG_MAX uofft_fmt="lu" if test "$have_uoff_t" != "yes"; then AC_DEFINE(UOFF_T_LONG,, [Define if off_t is long]) @@ -799,6 +409,7 @@ ;; "long long") offt_max=LLONG_MAX + uofft_max=ULLONG_MAX uofft_fmt="llu" if test "$have_uoff_t" != "yes"; then AC_DEFINE(UOFF_T_LONG_LONG,, [Define if off_t is long long]) @@ -810,94 +421,19 @@ ;; esac -dnl * Do we have struct dirent->d_type -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include -]], [[ - struct dirent d; - d.d_type = DT_DIR; -]])],[ - AC_DEFINE(HAVE_DIRENT_D_TYPE,, [Define if you have struct dirent->d_type]) -],[]) - -dnl * Do we have OFF_T_MAX? -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include -]], [[ - off_t i = OFF_T_MAX; -]])],[ - : -],[ - AC_DEFINE_UNQUOTED(OFF_T_MAX, $offt_max, [Maximum value of off_t]) -]) +DOVECOT_DIRENT_DTYPE +DOVECOT_OFF_T_MAX +DOVECOT_UOFF_T_MAX AC_DEFINE_UNQUOTED(PRIuUOFF_T, "$uofft_fmt", [printf() format for uoff_t]) -dnl * make sure size_t isn't signed. we'd probably work fine with it, but -dnl * it's more likely vulnerable to buffer overflows. Anyway, C99 specifies -dnl * that it's unsigned and only some old systems define it as signed. -AC_CACHE_CHECK([whether size_t is signed],i_cv_signed_size_t,[ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - /* return 0 if we're signed */ - exit((size_t)(int)-1 <= 0 ? 0 : 1); - } - ]])],[ - i_cv_signed_size_t=yes - - echo - echo "Your system's size_t is a signed integer, Dovecot isn't designed to" - echo "support it. It probably works just fine, but it's less resistant to" - echo "buffer overflows. If you're not worried about this and still want to" - echo "compile Dovecot, set ignore_signed_size=1 environment." - - if test "$ignore_signed_size" = ""; then - AC_MSG_ERROR([aborting]) - fi - echo "..ignoring as requested.." - ],[ - i_cv_signed_size_t=no - ],[]) -]) -dnl Note: we check size_t rather than ssize_t here, because on OSX 10.2 -dnl ssize_t = int and size_t = unsigned long. We're mostly concerned about -dnl printf format here, so check the size_t one. -AC_TYPEOF(size_t, unsigned-int unsigned-long unsigned-long-long) -case "$typeof_size_t" in - "unsigned long") - ssizet_max=LONG_MAX - sizet_fmt="lu" - ;; - "unsigned long long") - ssizet_max=LLONG_MAX - sizet_fmt="llu" - ;; - *) - dnl older systems didn't have ssize_t, default to int - ssizet_max=INT_MAX - sizet_fmt="u" - - if test "$typeof_size_t" = ""; then - AC_DEFINE(size_t, unsigned int, [Define to 'unsigned int' if you don't have it]) - AC_DEFINE(ssize_t, int, [Define to 'int' if you don't have it]) - fi - ;; -esac +DOVECOT_SIZE_T_SIGNED AC_DEFINE_UNQUOTED(SSIZE_T_MAX, $ssizet_max, [Maximum value of ssize_t]) AC_DEFINE_UNQUOTED(PRIuSIZE_T, "$sizet_fmt", [printf() format for size_t]) -AC_DEFUN([AC_CHECKTYPE2], [ - AC_MSG_CHECKING([for $1]) - AC_CACHE_VAL(i_cv_type_$1, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - $2]], [[$1 t;]])],[i_cv_type_$1=yes],[i_cv_type_$1=no])]) - AC_MSG_RESULT($i_cv_type_$1) -]) +dnl we require inttypes.h for PRIu{8,16,32,64} macros +AC_CHECK_HEADER(inttypes.h,,AC_MSG_ERROR([inttypes.h missing but required])) dnl some systems don't have stdint.h, but still have some of the types dnl defined elsewhere @@ -924,13 +460,19 @@ AC_DEFINE_UNQUOTED(MEM_ALIGN_SIZE, $mem_align, [Required memory alignment]) dnl * find random source -AC_MSG_CHECKING([for /dev/urandom]) -if test -c /dev/urandom || test -s /dev/urandom; then + +AC_ARG_WITH(random-source, +AS_HELP_STRING([--with-random-source=file], [Device file to use as random source (default=/dev/urandom)]), + random_source=$withval, + random_source=/dev/urandom) + +AC_MSG_CHECKING([for $random_source]) +if test -c $random_source || test -s $random_source; then AC_MSG_RESULT(yes) - AC_DEFINE(DEV_URANDOM_PATH, "/dev/urandom", [Path to /dev/urandom]) + AC_DEFINE_UNQUOTED(DEV_URANDOM_PATH, ["$random_source"], [Path to random source]) have_random_source=yes else - AC_MSG_RESULT(no) + AC_MSG_ERROR([$random_source not found or is not character device - please provide path for random source device]) fi if test "$have_random_source" != "yes"; then @@ -940,924 +482,56 @@ ]) fi -dnl * do we have tm_gmtoff -AC_MSG_CHECKING([for tm_gmtoff]) -AC_CACHE_VAL(i_cv_field_tm_gmtoff, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include ]], -[[struct tm *tm; return tm->tm_gmtoff;]])], -[i_cv_field_tm_gmtoff=yes], -[i_cv_field_tm_gmtoff=no])]) -if test $i_cv_field_tm_gmtoff = yes; then - AC_DEFINE(HAVE_TM_GMTOFF,, [Define if you have struct tm->tm_gmtoff]) -fi -AC_MSG_RESULT($i_cv_field_tm_gmtoff) - -dnl * how large time_t values does gmtime() accept? -AC_CACHE_CHECK([how large time_t values gmtime() accepts],i_cv_gmtime_max_time_t,[ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - FILE *f; - int bits; - - for (bits = 1; bits < sizeof(time_t)*8; bits++) { - time_t t = ((time_t)1 << bits) - 1; - if (gmtime(&t) == NULL) { - bits--; - break; - } - } - if (bits > 40) { - /* Solaris 9 breaks after 55 bits. Perhaps other systems break earlier. - Let's just do the same as Cyrus folks and limit it to 40 bits. */ - bits = 40; - } - - f = fopen("conftest.temp", "w"); - if (f == NULL) { - perror("fopen()"); - return 1; - } - fprintf(f, "%d", bits); - fclose(f); - return 0; - } - ]])],[ - i_cv_gmtime_max_time_t=`cat conftest.temp` - rm -f conftest.temp - ], [ - printf "check failed, assuming " - i_cv_gmtime_max_time_t=31 - ],[]) -]) -AC_DEFINE_UNQUOTED(TIME_T_MAX_BITS, $i_cv_gmtime_max_time_t, [max. time_t bits gmtime() can handle]) - -AC_CACHE_CHECK([whether time_t is signed],i_cv_signed_time_t,[ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - /* return 0 if we're signed */ - exit((time_t)(int)-1 <= 0 ? 0 : 1); - } - ]])],[ - i_cv_signed_time_t=yes - ], [ - i_cv_signed_time_t=no - ]) -]) -if test $i_cv_signed_time_t = yes; then - AC_DEFINE(TIME_T_SIGNED,, [Define if your time_t is signed]) -fi - -AC_CACHE_CHECK([if we can use C99 static in array sizes],i_cv_c99_static_arrays,[ - AC_TRY_COMPILE([ - void foo(unsigned char [static 20]); - ], [ - ], [ - i_cv_c99_static_arrays=yes - ], [ - i_cv_c99_static_arrays=no - ]) -]) - -if test $i_cv_c99_static_arrays = yes; then - static_value=static -else - static_value= -fi -AC_DEFINE_UNQUOTED(STATIC_ARRAY, $static_value, [C99 static array]) - -dnl Our implementation of AC_C_FLEXIBLE_ARRAY_MEMBER. -dnl Use it until autoconf 2.61+ becomes more widely used -AC_CACHE_CHECK([if we can use C99-like flexible array members],i_cv_c99_flex_arrays,[ - AC_TRY_COMPILE([ - struct foo { - int x; - char y[]; - }; - ], [ - struct foo foo; - ], [ - i_cv_c99_flex_arrays=yes - ], [ - i_cv_c99_flex_arrays=no - ]) -]) - -if test $i_cv_c99_flex_arrays = yes; then - flexible_value= -else - flexible_value=1 -fi -AC_DEFINE_UNQUOTED(FLEXIBLE_ARRAY_MEMBER, $flexible_value, [How to define flexible array members in structs]) - -dnl * do we have struct iovec -AC_MSG_CHECKING([for struct iovec]) -AC_CACHE_VAL(i_cv_struct_iovec, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include ]], -[[struct iovec *iovec;]])], -[i_cv_struct_iovec=yes], -[i_cv_struct_iovec=no])]) - -if test $i_cv_struct_iovec = yes; then - AC_DEFINE(HAVE_STRUCT_IOVEC,, [Define if you have struct iovec]) -fi -AC_MSG_RESULT($i_cv_struct_iovec) - -dnl * is dev_t an integer or something else? -AC_CACHE_CHECK([whether dev_t is struct],i_cv_dev_t_struct,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - struct test { dev_t a; }; - static struct test t = { 0 }; - ]], - [[ ]])], [ - i_cv_dev_t_struct=no - ],[ - i_cv_dev_t_struct=yes - ]) -]) -if test $i_cv_dev_t_struct = yes; then - AC_DEFINE(DEV_T_STRUCT,, [Define if your dev_t is a structure instead of integer type]) -fi - -dnl * Do we have RLIMIT_AS? -AC_CACHE_CHECK([whether RLIMIT_AS exists],i_cv_have_rlimit_as,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include - ]], [[ - struct rlimit r; - getrlimit(RLIMIT_AS, &r); - ]])],[ - i_cv_have_rlimit_as=yes - ], [ - i_cv_have_rlimit_as=no - ]) -]) - -if test $i_cv_have_rlimit_as = yes; then - AC_DEFINE(HAVE_RLIMIT_AS,, [Define if you have RLIMIT_AS for setrlimit()]) -fi - -dnl * Do we have RLIMIT_NPROC? -AC_CACHE_CHECK([whether RLIMIT_NPROC exists],i_cv_have_rlimit_nproc,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include - ]], [[ - struct rlimit r; - getrlimit(RLIMIT_NPROC, &r); - ]])],[ - i_cv_have_rlimit_nproc=yes - ],[ - i_cv_have_rlimit_nproc=no - ]) -]) - -if test $i_cv_have_rlimit_nproc = yes; then - AC_DEFINE(HAVE_RLIMIT_NPROC,, [Define if you have RLIMIT_NPROC for setrlimit()]) -fi - -dnl * Do we have RLIMIT_CORE? -AC_CACHE_CHECK([whether RLIMIT_CORE exists],i_cv_have_rlimit_core,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include - ]], [[ - struct rlimit r; - getrlimit(RLIMIT_CORE, &r); - ]])],[ - i_cv_have_rlimit_core=yes - ],[ - i_cv_have_rlimit_core=no - ]) -]) - -if test $i_cv_have_rlimit_core = yes; then - AC_DEFINE(HAVE_RLIMIT_CORE,, [Define if you have RLIMIT_CORE for getrlimit()]) -fi - -AC_CACHE_CHECK([whether PR_SET_DUMPABLE exists],i_cv_have_pr_set_dumpable,[ - AC_TRY_LINK([ - #include - ], [ - prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); - ], [ - i_cv_have_pr_set_dumpable=yes - ], [ - i_cv_have_pr_set_dumpable=no - ]) -]) -if test $i_cv_have_pr_set_dumpable = yes; then - AC_DEFINE(HAVE_PR_SET_DUMPABLE,, [Define if you have prctl(PR_SET_DUMPABLE)]) -fi - -dnl * Linux compatible mremap() -AC_CACHE_CHECK([Linux compatible mremap()],i_cv_have_linux_mremap,[ - AC_TRY_LINK([ - #include - #define __USE_GNU - #include - ], [ - mremap(0, 0, 0, MREMAP_MAYMOVE); - ], [ - i_cv_have_linux_mremap=yes - ], [ - i_cv_have_linux_mremap=no - ]) -]) -if test $i_cv_have_linux_mremap = yes; then - AC_DEFINE(HAVE_LINUX_MREMAP,, [Define if you have Linux-compatible mremap()]) -fi - -dnl * If mmap() plays nicely with write() -AC_CACHE_CHECK([whether shared mmaps get updated by write()s],i_cv_mmap_plays_with_write,[ - AC_TRY_RUN([ - #include - #include - #include - #include - #include - #include - #include - int main() { - /* return 0 if we're signed */ - int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600); - void *mem; - if (f == -1) { - perror("open()"); - return 1; - } - unlink("conftest.mmap"); - - write(f, "1", 2); - mem = mmap(NULL, 2, PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); - if (mem == MAP_FAILED) { - perror("mmap()"); - return 1; - } - strcpy(mem, "2"); - msync(mem, 2, MS_SYNC); - lseek(f, 0, SEEK_SET); - write(f, "3", 2); - - return strcmp(mem, "3") == 0 ? 0 : 1; - } - ], [ - i_cv_mmap_plays_with_write=yes - ], [ - i_cv_mmap_plays_with_write=no - ]) -]) -if test $i_cv_mmap_plays_with_write = no; then - AC_DEFINE(MMAP_CONFLICTS_WRITE,, [Define if shared mmaps don't get updated by write()s]) -fi - -dnl * see if fd passing works -AC_CACHE_CHECK([whether fd passing works],i_cv_fd_passing,[ - for i in 1 2; do - old_cflags="$CFLAGS" - CFLAGS="$CFLAGS -I$srcdir/src/lib $srcdir/src/lib/fdpass.c" - if test $i = 2; then - CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS" - fi - - AC_TRY_RUN([ - #include - #include - #include - #include - #include - #include - #include "fdpass.h" - - int nopen(void) - { - int i, n; - struct stat sb; - for (i = n = 0; i < 256; i++) - if (fstat(i, &sb) == 0) n++; - return n; - } - int main(void) - { - int fd[2], send_fd, recv_fd, status, n1, n2; - struct stat st, st2; - char data; - - send_fd = creat("conftest.fdpass", 0600); - if (send_fd == -1) return 2; - unlink("conftest.fdpass"); - if (fstat(send_fd, &st) < 0) return 2; - if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2; - n1 = nopen(); - - switch (fork()) { - case -1: - return 2; - case 0: - alarm(1); - if (fd_send(fd[0], send_fd, &data, 1) != 1) return 2; - return 0; - default: - alarm(2); - if (wait(&status) == -1) - return 2; - if (status != 0) - return status; - if (fd_read(fd[1], &data, 1, &recv_fd) != 1) return 1; - if (fstat(recv_fd, &st2) < 0) return 2; - /* nopen check is for making sure that only a single fd - was received */ - n2 = nopen(); - return st.st_ino == st2.st_ino && n2 == n1 + 1 ? 0 : 1; - } - } - ], [ - CFLAGS=$old_cflags - if test $i = 2; then - i_cv_fd_passing=buggy_cmsg_macros - else - i_cv_fd_passing=yes - fi - break - ], [ - dnl no, try with BUGGY_CMSG_MACROS - CFLAGS=$old_cflags - i_cv_fd_passing=no - ]) - done -]); - -case "$host_os" in -darwin[[1-9]].*) - if test "$i_cv_fd_passing" = "yes"; then - i_cv_fd_passing=buggy_cmsg_macros - fi - ;; -esac - -if test $i_cv_fd_passing = buggy_cmsg_macros; then - AC_DEFINE(BUGGY_CMSG_MACROS,, [Define if you have buggy CMSG macros]) -fi -if test $i_cv_fd_passing = no; then - AC_ERROR([fd passing is required for Dovecot to work]) -fi - -dnl * Solaris compatible sendfile() -AC_CHECK_LIB(sendfile, sendfile, [ - LIBS="$LIBS -lsendfile" - AC_DEFINE(HAVE_SOLARIS_SENDFILE,, [Define if you have Solaris-compatible sendfile()]) -], [ - dnl * Linux compatible sendfile() - don't check if Solaris one was found. - dnl * This seems to pass with Solaris for some reason.. - AC_CACHE_CHECK([Linux compatible sendfile()],i_cv_have_linux_sendfile,[ - AC_TRY_LINK([ - #undef _FILE_OFFSET_BITS - #include - #include - #include - ], [ - sendfile(0, 0, (void *) 0, 0); - ], [ - i_cv_have_linux_sendfile=yes - ], [ - i_cv_have_linux_sendfile=no - ]) - ]) - if test $i_cv_have_linux_sendfile = yes; then - AC_DEFINE(HAVE_LINUX_SENDFILE,, [Define if you have Linux-compatible sendfile()]) - fi - - dnl * FreeBSD compatible sendfile() - AC_CACHE_CHECK([FreeBSD compatible sendfile()],i_cv_have_freebsd_sendfile,[ - AC_TRY_LINK([ - #include - #include - #include - ], [ - struct sf_hdtr hdtr; - sendfile(0, 0, 0, 0, &hdtr, (void *) 0, 0); - ], [ - i_cv_have_freebsd_sendfile=yes - ], [ - i_cv_have_freebsd_sendfile=no - ]) - ]) - if test $i_cv_have_freebsd_sendfile = yes; then - AC_DEFINE(HAVE_FREEBSD_SENDFILE,, [Define if you have FreeBSD-compatible sendfile()]) - fi -]) - -AC_CACHE_CHECK([if unsetenv returns int],i_cv_unsetenv_ret_int,[ - AC_TRY_COMPILE([ - #include - ], [ - if (unsetenv("env") < 0) ; - ], [ - i_cv_unsetenv_ret_int=yes - ], [ - i_cv_unsetenv_ret_int=no - ]) -]) -if test $i_cv_unsetenv_ret_int = yes; then - AC_DEFINE(UNSETENV_RET_INT,, [Define if unsetenv() returns int]) -fi - -dnl * Check for crypt() if unistd.h compiles with _XOPEN_SOURCE + _XPG6 -dnl * Add other macros there too "just in case". -AC_CACHE_CHECK([if we should use _XPG6 macro for crypt()],i_cv_use_xpg6_crypt,[ - AC_TRY_COMPILE([ - #define _XOPEN_SOURCE 4 - #define _XOPEN_SOURCE_EXTENDED 1 - #define _XOPEN_VERSION 4 - #define _XPG4_2 - #define _XPG6 - #include - ], [ - crypt("a", "b"); - ], [ - i_cv_use_xpg6_crypt=yes - ], [ - i_cv_use_xpg6_crypt=no - ]) -]) -if test $i_cv_use_xpg6_crypt = yes; then - AC_DEFINE(CRYPT_USE_XPG6,, [Define if _XPG6 macro is needed for crypt()]) -fi - -AC_CACHE_CHECK([if struct stat has st_?tim timespec fields],i_cv_have_st_tim_timespec,[ - AC_TRY_COMPILE([ - #include - #include - #include - ], [ - struct stat st; - unsigned long x = st.st_mtim.tv_nsec; - - return 0; - ], [ - i_cv_have_st_tim_timespec=yes - ], [ - i_cv_have_st_tim_timespec=no - ]) -]) -if test $i_cv_have_st_tim_timespec = yes; then - AC_DEFINE(HAVE_STAT_XTIM,, [Define if you have st_?tim timespec fields in struct stat]) -fi - -AC_CACHE_CHECK([if struct stat has st_?timespec fields],i_cv_have_st_timespec,[ - AC_TRY_COMPILE([ - #include - #include - #include - ], [ - struct stat st; - unsigned long x = st.st_mtimespec.tv_nsec; - - return 0; - ], [ - i_cv_have_st_timespec=yes - ], [ - i_cv_have_st_timespec=no - ]) -]) -if test $i_cv_have_st_timespec = yes; then - AC_DEFINE(HAVE_STAT_XTIMESPEC,, [Define if you have st_?timespec fields in struct stat]) -fi - -dnl * Check if statvfs() can be used to find out block device for files -AC_CACHE_CHECK([if statvfs.f_mntfromname exists],i_cv_have_statvfs_f_mntfromname,[ - AC_TRY_COMPILE([ - #include - #include - ], [ - struct statvfs buf; - char *p = buf.f_mntfromname; - - statvfs(".", &buf); - ], [ - i_cv_have_statvfs_f_mntfromname=yes - ], [ - i_cv_have_statvfs_f_mntfromname=no - ]) -]) -if test $i_cv_have_statvfs_f_mntfromname = yes; then - AC_DEFINE(HAVE_STATVFS_MNTFROMNAME,, [Define if you have statvfs.f_mntfromname]) -fi - -dnl * Check if statfs() can be used to find out block device for files -AC_CACHE_CHECK([if statfs.f_mntfromname exists],i_cv_have_statfs_f_mntfromname,[ - AC_TRY_COMPILE([ - #include - #include - ], [ - struct statfs buf; - char *p = buf.f_mntfromname; - - statfs(".", &buf); - ], [ - i_cv_have_statfs_f_mntfromname=yes - ], [ - i_cv_have_statfs_f_mntfromname=no - ]) -]) -if test $i_cv_have_statfs_f_mntfromname = yes; then - AC_DEFINE(HAVE_STATFS_MNTFROMNAME,, [Define if you have statfs.f_mntfromname]) -fi - -dnl * Check if we have struct dqblk.dqb_curblocks -AC_CACHE_CHECK([if struct dqblk.dqb_curblocks exists],i_cv_have_dqblk_dqb_curblocks,[ - AC_TRY_COMPILE([ - #include - #include "$srcdir/src/plugins/quota/quota-fs.h" - ], [ - struct dqblk dqblk; - unsigned int x = dqblk.dqb_curblocks; - ], [ - i_cv_have_dqblk_dqb_curblocks=yes - ], [ - i_cv_have_dqblk_dqb_curblocks=no - ]) -]) -if test $i_cv_have_dqblk_dqb_curblocks = yes; then - AC_DEFINE(HAVE_STRUCT_DQBLK_CURBLOCKS,, [Define if struct sqblk.dqb_curblocks exists]) -fi - -dnl * Check if we have struct dqblk.dqb_curspace -AC_CACHE_CHECK([if struct dqblk.dqb_curspace exists],i_cv_have_dqblk_dqb_curspace,[ - AC_TRY_COMPILE([ - #include - #include "$srcdir/src/plugins/quota/quota-fs.h" - ], [ - struct dqblk dqblk; - unsigned int x = dqblk.dqb_curspace; - ], [ - i_cv_have_dqblk_dqb_curspace=yes - ], [ - i_cv_have_dqblk_dqb_curspace=no - ]) -]) -if test $i_cv_have_dqblk_dqb_curspace = yes; then - AC_DEFINE(HAVE_STRUCT_DQBLK_CURSPACE,, [Define if struct sqblk.dqb_curspace exists]) -fi - -dnl * Check if we have Q_QUOTACTL ioctl (Solaris) -AC_CACHE_CHECK([if Q_QUOTACTL ioctl exists],i_cv_have_ioctl_q_quotactl,[ - AC_TRY_COMPILE([ - #include - #include - ], [ - struct quotctl ctl; - ioctl(0, Q_QUOTACTL, &ctl); - ], [ - i_cv_have_ioctl_q_quotactl=yes - ], [ - i_cv_have_ioctl_q_quotactl=no - ]) -]) +DOVECOT_TM_GMTOFF +DOVECOT_GMTIME_MAX +DOVECOT_TIME_T -if test $i_cv_have_ioctl_q_quotactl = yes; then - AC_DEFINE(HAVE_Q_QUOTACTL,, [Define if Q_QUOTACTL exists]) -fi +DOVECOT_C_STATIC_ARRAY +DOVECOT_C_FLEXIBLE_ARRAY_MEMBER -dnl *** -dnl *** C99 vsnprintf()? -dnl *** - -AC_CACHE_CHECK([for C99 vsnprintf()],i_cv_c99_vsnprintf,[ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - static int f(const char *fmt, ...) { - va_list args; - char buf[13]; - int ret; - - va_start(args, fmt); - ret = vsnprintf(buf, 11, fmt, args) != 12 || buf[11-1] != '\0'; - va_end(args); - return ret; - } - int main() { - return f("hello %s%d", "world", 1); - }]])], - [i_cv_c99_vsnprintf=yes], - [i_cv_c99_vsnprintf=no]) -]) -if test $i_cv_c99_vsnprintf = no; then - AC_DEFINE(HAVE_OLD_VSNPRINTF,, [Define if you don't have C99 compatible vsnprintf() call]) -fi +DOVECOT_IOVEC -dnl *** -dnl *** va_copy checks (from GLIB) -dnl *** - -AC_CACHE_CHECK([for an implementation of va_copy()],lib_cv_va_copy,[ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - va_copy (args2, args1); - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - }]])], - [lib_cv_va_copy=yes], - [lib_cv_va_copy=no],[]) -]) -AC_CACHE_CHECK([for an implementation of __va_copy()],lib_cv___va_copy,[ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - __va_copy (args2, args1); - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - }]])], - [lib_cv___va_copy=yes], - [lib_cv___va_copy=no],[]) -]) +DOVECOT_TYPEOF_DEV_T -if test "x$lib_cv_va_copy" = "xyes"; then - va_copy_func=va_copy -else if test "x$lib_cv___va_copy" = "xyes"; then - va_copy_func=__va_copy -fi -fi +DOVECOT_RLIMIT_AS +DOVECOT_RLIMIT_NPROC +DOVECOT_RLIMIT_CORE -if test -n "$va_copy_func"; then - AC_DEFINE_UNQUOTED(VA_COPY,$va_copy_func,[A 'va_copy' style function]) -fi +DOVECOT_PR_SET_DUMPABLE -AC_CACHE_CHECK([whether va_lists can be copied by value],lib_cv_va_val_copy,[ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - args2 = args1; - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - }]])], - [lib_cv_va_val_copy=yes], - [lib_cv_va_val_copy=no],[]) -]) +DOVECOT_LINUX_MREMAP -if test "x$lib_cv_va_val_copy" = "xno"; then - AC_DEFINE(VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copied as values]) -fi +DOVECOT_MMAP_WRITE -dnl * dynamic modules? -have_modules=no -AC_CHECK_FUNC(dlopen, [ - have_modules=yes - MODULE_LIBS="-export-dynamic" -], [ - AC_CHECK_LIB(dl, dlopen, [ - have_modules=yes - MODULE_LIBS="-export-dynamic -ldl" - DLLIB=-ldl - ]) -]) +DOVECOT_FD_PASSING -dnl ** -dnl ** AIX mntctl -dnl ** +DOVECOT_SENDFILE -if test $ac_cv_header_sys_vmount_h = yes; then - AC_MSG_CHECKING([for reasonable mntctl buffer size]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - #include - int main() { - int size,count; char *m; - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - if ((count=mntctl(MCTL_QUERY,sizeof(size),&size))!=0 || !(m=malloc(size)) || - (count=mntctl(MCTL_QUERY,size,m))<=0) exit(1); - fprintf(f, "%d\n",(size * (count + 5))/count & ~1); /* 5 mounts more */ - exit(0); - } - ]])],[ - size=`cat conftestval` - rm -f conftestval - AC_DEFINE_UNQUOTED(STATIC_MTAB_SIZE,$size, [reasonable mntctl buffer size]) - AC_MSG_RESULT($size) - ],[ - AC_MSG_RESULT(default) - ]) -fi +DOVECOT_UNSETENV_RET_INT +DOVECOT_CRYPT_XPG6 +DOVECOT_CRYPT -dnl ** -dnl ** SSL -dnl ** +DOVECOT_ST_TIM_TIMESPEC -have_ssl=no -build_dcrypt_openssl=no +DOVECOT_FILE_BLOCKDEV -if test $want_openssl != no && test $have_ssl = no; then - if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists openssl 2>/dev/null; then - PKG_CHECK_MODULES(SSL, openssl) - CFLAGS="$CFLAGS $SSL_CFLAGS" - have_openssl=yes - else - # openssl 0.9.8 wants -ldl and it's required if there's only .a lib - AC_CHECK_LIB(ssl, SSL_read, [ - AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [ - SSL_LIBS="-lssl -lcrypto $DLLIB" - AC_SUBST(SSL_LIBS) - have_openssl=yes - ], [ - if test $want_openssl = yes; then - AC_ERROR([Can't build with OpenSSL: openssl/ssl.h or openssl/err.h not found]) - fi - ]) - ], [ - if test $want_openssl = yes; then - AC_ERROR([Can't build with OpenSSL: libssl not found]) - fi - ], -lcrypto $DLLIB) - fi - if test "$have_openssl" = "yes"; then - AC_DEFINE(HAVE_OPENSSL,, [Build with OpenSSL support]) - have_ssl="yes (OpenSSL)" - build_dcrypt_openssl="no" - - AC_MSG_CHECKING([if OpenSSL version is 1.0.2 or better]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if OPENSSL_VERSION_NUMBER < 0x10002000L - #error "fail-compile" - #endif]], [[ return 0; ]])], [ssl_version_ge_102=true], [ssl_version_ge_102=false]) - AC_MSG_RESULT([$ssl_version_ge_102]) - - # SSL_clear_options introduced in openssl 0.9.8m but may be backported to - # older versions in "enterprise" OS releases; originally implemented as a - # macro but as a function in more recent openssl versions - AC_CACHE_CHECK([whether SSL_clear_options exists],i_cv_have_ssl_clear_options,[ - old_LIBS=$LIBS - LIBS="$LIBS -lssl" - AC_TRY_LINK([ - #include - ], [ - SSL *ssl; - long options; - SSL_clear_options(ssl, options); - ], [ - i_cv_have_ssl_clear_options=yes - ], [ - i_cv_have_ssl_clear_options=no - ]) - LIBS=$old_LIBS - ]) - if test $i_cv_have_ssl_clear_options = yes; then - AC_DEFINE(HAVE_SSL_CLEAR_OPTIONS,, [Define if you have SSL_clear_options]) - fi +DOVECOT_DQBLK_CURBLOCKS +DOVECOT_DQBLK_CURSPACE - # New style mem functions? Should be in v1.1+ - AC_CACHE_CHECK([whether CRYPTO_set_mem_functions has new style parameters],i_cv_have_ssl_new_mem_funcs,[ - old_LIBS=$LIBS - LIBS="$LIBS -lssl" - AC_TRY_LINK([ - #include - int CRYPTO_set_mem_functions( - void *(*m) (size_t, const char *, int), - void *(*r) (void *, size_t, const char *, int), - void (*f) (void *, const char *, int)); - ], [ - ], [ - i_cv_have_ssl_new_mem_funcs=yes - ], [ - i_cv_have_ssl_new_mem_funcs=no - ]) - LIBS=$old_LIBS - ]) - if test $i_cv_have_ssl_new_mem_funcs = yes; then - AC_DEFINE(HAVE_SSL_NEW_MEM_FUNCS,, [Define if CRYPTO_set_mem_functions has new style parameters]) - fi +DOVECOT_Q_QUOTACTL - AC_CHECK_LIB(ssl, ERR_remove_thread_state, [ - AC_DEFINE(HAVE_OPENSSL_ERR_REMOVE_THREAD_STATE,, [Define if you have ERR_remove_thread_state]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, OPENSSL_thread_stop, [ - AC_DEFINE(HAVE_OPENSSL_AUTO_THREAD_DEINIT,, [Define if OpenSSL performs thread cleanup automatically]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, OPENSSL_cleanup, [ - AC_DEFINE(HAVE_OPENSSL_CLEANUP,, [OpenSSL supports OPENSSL_cleanup()]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, SSL_get_current_compression, [ - AC_DEFINE(HAVE_SSL_COMPRESSION,, [Build with OpenSSL compression]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, SSL_get_servername, [ - AC_DEFINE(HAVE_SSL_GET_SERVERNAME,, [Build with TLS hostname support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, SSL_COMP_free_compression_methods, [ - AC_DEFINE(HAVE_SSL_COMP_FREE_COMPRESSION_METHODS,, [Build with SSL_COMP_free_compression_methods() support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, RSA_generate_key_ex, [ - AC_DEFINE(HAVE_RSA_GENERATE_KEY_EX,, [Build with RSA_generate_key_ex() support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, ASN1_STRING_get0_data, [ - AC_DEFINE(HAVE_ASN1_STRING_GET0_DATA,, [Build with ASN1_STRING_get0_data() support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, HMAC_CTX_new, [ - AC_DEFINE(HAVE_HMAC_CTX_NEW,, [Build with HMAC_CTX_new() support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, EVP_MD_CTX_new, [ - AC_DEFINE(HAVE_EVP_MD_CTX_NEW,, [Build with EVP_MD_CTX_new() support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, OBJ_length, [ - AC_DEFINE(HAVE_OBJ_LENGTH,, [Build with OBJ_length() support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, EVP_PKEY_get0_RSA, [ - AC_DEFINE(HAVE_EVP_PKEY_get0,, [Build with EVP_PKEY_get0_*() support]) - ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, [EVP_PKEY_CTX_new_id], [have_evp_pkey_ctx_new_id="yes"],, $SSL_LIBS) - AC_CHECK_LIB(ssl, [EC_KEY_new], [have_ec_key_new="yes"],, $SSL_LIBS) - if test "$have_evp_pkey_ctx_new_id" = "yes" && test "$have_ec_key_new" = "yes"; then - build_dcrypt_openssl="yes" - else - AC_MSG_WARN([No ECC support in OpenSSL - not enabling dcrypt]) - fi - fi -fi -AM_CONDITIONAL([SSL_VERSION_GE_102], [test x$ssl_version_ge_102 = xtrue]) +DOVECOT_C99_VSNPRINTF -AM_CONDITIONAL(BUILD_OPENSSL, test "$have_openssl" = "yes") -AM_CONDITIONAL(BUILD_DCRYPT_OPENSSL, test "$build_dcrypt_openssl" = "yes") +DOVECOT_VA_COPY +DOVECOT_VA_COPY_BYVAL -if test $want_gnutls != no && test $have_ssl = no; then - AC_CHECK_LIB(gnutls, gnutls_global_init, [ - AC_CHECK_HEADER(gnutls/gnutls.h, [ - AC_DEFINE(HAVE_GNUTLS,, [Build with GNUTLS support]) - SSL_LIBS="-lgnutls -lgcrypt" - AC_SUBST(SSL_LIBS) - have_ssl="yes (GNUTLS)" - have_gnutls=yes - ], [ - if test $want_gnutls = yes; then - AC_ERROR([Can't build with GNUTLS: gnutls/gnutls.h not found]) - fi - ]) - ], [ - if test $want_gnutls = yes; then - AC_ERROR([Can't build with GNUTLS: libgnutls not found]) - fi - ], -lgcrypt) -fi +DOVECOT_MODULES -if test "$have_ssl" != "no"; then - AC_DEFINE(HAVE_SSL,, [Build with SSL/TLS support]) -fi +DOVECOT_MNTCTL -dnl ** -dnl ** Garbage Collector -dnl ** +DOVECOT_SSL -if test $want_gc != no; then - AC_CHECK_LIB(gc, GC_malloc, [ - AC_CHECK_HEADERS(gc/gc.h gc.h) - AC_DEFINE(USE_GC,, [Define if you want to use Boehm GC]) - LIBS="$LIBS -lgc" - ], [ - if test $want_gc = yes; then - AC_ERROR([Can't build with GC: libgc not found]) - fi - ]) -fi dnl ** dnl ** userdb and passdb checks @@ -1870,608 +544,37 @@ passdb="$passdb static" userdb="$userdb static" +dict_drivers="" -if test $want_prefetch_userdb != no; then - AC_DEFINE(USERDB_PREFETCH,, [Build with prefetch userdb support]) - userdb="$userdb prefetch" -else - not_userdb="$not_userdb prefetch" -fi - -if test $want_passwd != no; then - AC_DEFINE(USERDB_PASSWD,, [Build with passwd support]) - AC_DEFINE(PASSDB_PASSWD,, [Build with passwd support]) - userdb="$userdb passwd" - passdb="$passdb passwd" -else - not_passdb="$not_passdb passwd" - not_userdb="$not_userdb passwd" -fi - -if test $want_passwd_file != no; then - AC_DEFINE(USERDB_PASSWD_FILE,, [Build with passwd-file support]) - AC_DEFINE(PASSDB_PASSWD_FILE,, [Build with passwd-file support]) - userdb="$userdb passwd-file" - passdb="$passdb passwd-file" -else - not_passdb="$not_passdb passwd-file" - not_userdb="$not_userdb passwd-file" -fi - -have_shadow=no -if test $want_shadow != no; then - AC_CHECK_FUNC(getspnam, [ - AC_CHECK_HEADER(shadow.h, [ - AC_DEFINE(PASSDB_SHADOW,, [Build with shadow support]) - have_shadow=yes - ], [ - if test $want_shadow = yes; then - AC_ERROR([Can't build with shadow support: shadow.h not found]) - fi - ]) - ], [ - if test $want_shadow = yes; then - AC_ERROR([Can't build with shadow support: getspnam() not found]) - fi - ]) -fi -if test $have_shadow = no; then - not_passdb="$not_passdb shadow" -else - passdb="$passdb shadow" -fi - -if test $want_pam != no; then - AC_CHECK_LIB(pam, pam_start, [ - have_pam=no - AC_CHECK_HEADER(security/pam_appl.h, [ - AC_DEFINE(HAVE_SECURITY_PAM_APPL_H,, - [Define if you have security/pam_appl.h]) - have_pam=yes - ]) - - AC_CHECK_HEADER(pam/pam_appl.h, [ - AC_DEFINE(HAVE_PAM_PAM_APPL_H,, - [Define if you have pam/pam_appl.h]) - have_pam=yes - ]) - ], [ - if test $want_pam = yes; then - AC_ERROR([Can't build with PAM support: libpam not found]) - fi - ]) -fi - -if test "$have_pam" = "yes"; then - AUTH_LIBS="$AUTH_LIBS -lpam" - AC_DEFINE(PASSDB_PAM,, [Build with PAM support]) - passdb="$passdb pam" - - AC_CHECK_LIB(pam, pam_setcred, [ - AC_DEFINE(HAVE_PAM_SETCRED,, [Define if you have pam_setcred()]) - ]) -elif test $want_pam = yes; then - AC_ERROR([Can't build with PAM support: pam_appl.h not found]) -else - not_passdb="$not_passdb pam" -fi - -if test $want_checkpassword != no; then - AC_DEFINE(PASSDB_CHECKPASSWORD,, [Build with checkpassword passdb support]) - AC_DEFINE(USERDB_CHECKPASSWORD,, [Build with checkpassword userdb support]) - passdb="$passdb checkpassword" - userdb="$userdb checkpassword" -else - not_passdb="$not_passdb checkpassword" - not_userdb="$not_userdb checkpassword" -fi - -have_bsdauth=no -if test $want_bsdauth != no; then - AC_CHECK_FUNC(auth_userokay, [ - AC_DEFINE(PASSDB_BSDAUTH,, [Build with BSD authentication support]) - have_bsdauth=yes - ], [ - if test $want_bsdauth = yes; then - AC_ERROR([Can't build with BSD authentication support: auth_userokay() not found]) - fi - ]) -fi -if test $have_bsdauth = no; then - not_passdb="$not_passdb bsdauth" -else - passdb="$passdb bsdauth" -fi - -have_gssapi=no -if test $want_gssapi != no; then - AC_CHECK_PROG(KRB5CONFIG, krb5-config, krb5-config, NO) - if test $KRB5CONFIG != NO; then - if ! $KRB5CONFIG --version gssapi 2>/dev/null > /dev/null; then - # krb5-config doesn't support gssapi. - KRB5_LIBS="`$KRB5CONFIG --libs`" - KRB5_CFLAGS=`$KRB5CONFIG --cflags` - AC_CHECK_LIB(gss, gss_acquire_cred, [ - # Solaris - KRB5_LIBS="$KRB5_LIBS -lgss" - ], [ - # failed - KRB5_LIBS= - ], $KRB5_LIBS) - else - KRB5_LIBS=`$KRB5CONFIG --libs gssapi` - KRB5_CFLAGS=`$KRB5CONFIG --cflags gssapi` - fi - if test "$KRB5_LIBS" != ""; then - AC_SUBST(KRB5_LIBS) - AC_SUBST(KRB5_CFLAGS) - - # Although krb5-config exists, all systems still don't - # have gssapi.h - old_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $KRB5_CFLAGS" - AC_CHECK_HEADER([gssapi/gssapi.h], [ - AC_DEFINE(HAVE_GSSAPI_GSSAPI_H,, [GSSAPI headers in gssapi/gssapi.h]) - have_gssapi=yes - ]) - AC_CHECK_HEADER([gssapi.h], [ - AC_DEFINE(HAVE_GSSAPI_H,, [GSSAPI headers in gssapi.h]) - have_gssapi=yes - ]) - if test $have_gssapi != no; then - if test $want_gssapi = plugin; then - have_gssapi=plugin - fi - AC_DEFINE(HAVE_GSSAPI,, [Build with GSSAPI support]) - AC_CHECK_HEADERS(gssapi/gssapi_ext.h gssapi_krb5.h gssapi/gssapi_krb5.h) - AC_CHECK_LIB(gss, __gss_userok, [ - AC_DEFINE(HAVE___GSS_USEROK,, - [Define if you have __gss_userok()]) - KRB5_LIBS="$KRB5_LIBS -lgss" - ],, $KRB5_LIBS) - - # MIT has a #define for Heimdal acceptor_identity, but it's way too - # difficult to test for it.. - old_LIBS=$LIBS - LIBS="$LIBS $KRB5_LIBS" - AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity krb5_gss_register_acceptor_identity) - - # does the kerberos library support SPNEGO? - AC_CACHE_CHECK([whether GSSAPI supports SPNEGO],i_cv_gssapi_spnego,[ - AC_TRY_RUN([ - #ifdef HAVE_GSSAPI_H - # include - #else - # include - #endif - #include - #include - int main(void) { - OM_uint32 minor_status; - gss_OID_set mech_set; - unsigned char spnego_oid[] = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x02 }; - unsigned int i; - - gss_indicate_mechs(&minor_status, &mech_set); - for (i = 0; i < mech_set->count; i++) { - if (mech_set->elements[i].length == 6 && - memcmp(mech_set->elements[i].elements, - spnego_oid, 6) == 0) - return 0; - } - return 1; - } - ], [ - i_cv_gssapi_spnego=yes - ], [ - i_cv_gssapi_spnego=no - ]) - ]) - if test "$i_cv_gssapi_spnego" = "yes"; then - AC_DEFINE(HAVE_GSSAPI_SPNEGO,, [GSSAPI supports SPNEGO]) - fi - LIBS=$old_LIBS - - if test $want_gssapi != plugin; then - AUTH_LIBS="$AUTH_LIBS $KRB5_LIBS" - AUTH_CFLAGS="$AUTH_CFLAGS $KRB5_CFLAGS" - AC_DEFINE(BUILTIN_GSSAPI,, [GSSAPI support is built in]) - else - have_gssapi_plugin=yes - fi - else - if test $want_gssapi != auto; then - AC_ERROR([Can't build with GSSAPI support: gssapi.h not found]) - fi - fi - CFLAGS=$old_CFLAGS - fi - else - if test $want_gssapi != auto; then - AC_ERROR([Can't build with GSSAPI support: krb5-config not found]) - fi - fi -fi -AM_CONDITIONAL(GSSAPI_PLUGIN, test "$have_gssapi_plugin" = "yes") - -have_sia=no -if test $want_sia != no; then - AC_CHECK_FUNC(sia_validate_user, [ - AC_DEFINE(PASSDB_SIA,, [Build with Tru64 SIA support]) - AUTH_LIBS="$AUTH_LIBS -depth_ring_search" - have_sia=yes - ], [ - if test $want_sia = yes; then - AC_ERROR([Can't build with SIA support: sia_validate_user() not found]) - fi - ]) -fi - -if test $have_sia = no; then - not_passdb="$not_passdb sia" -else - passdb="$passdb sia" -fi - -have_ldap=no -if test $want_ldap != no; then - AC_CHECK_LIB(ldap, ldap_init, [ - AC_CHECK_HEADER(ldap.h, [ - AC_CHECK_LIB(ldap, ldap_initialize, [ - AC_DEFINE(LDAP_HAVE_INITIALIZE,, [Define if you have ldap_initialize]) - ]) - AC_CHECK_LIB(ldap, ldap_start_tls_s, [ - AC_DEFINE(LDAP_HAVE_START_TLS_S,, [Define if you have ldap_start_tls_s]) - ]) - LDAP_LIBS="-lldap" - AC_CHECK_LIB(ldap, ber_free, [ - # do nothing, default is to add -lldap to LIBS - : - ], [ - AC_CHECK_LIB(lber, ber_free, [ - LDAP_LIBS="$LDAP_LIBS -llber" - ]) - ]) - AC_SUBST(LDAP_LIBS) - if test $want_ldap != plugin; then - AUTH_LIBS="$AUTH_LIBS $LDAP_LIBS" - AC_DEFINE(BUILTIN_LDAP,, [LDAP support is built in]) - fi - - AC_DEFINE(USERDB_LDAP,, [Build with LDAP support]) - AC_DEFINE(PASSDB_LDAP,, [Build with LDAP support]) - AC_CHECK_HEADERS(sasl.h sasl/sasl.h) - have_ldap=yes - ], [ - if test $want_ldap != auto; then - AC_ERROR([Can't build with LDAP support: ldap.h not found]) - fi - ]) - ], [ - if test $want_ldap != auto; then - AC_ERROR([Can't build with LDAP support: libldap not found]) - fi - ]) -fi - -if test $have_ldap = no; then - not_passdb="$not_passdb ldap" - not_userdb="$not_userdb ldap" -else - userdb="$userdb ldap" - passdb="$passdb ldap" - if test $want_ldap = plugin; then - have_ldap_plugin=yes - userdb="$userdb (plugin)" - passdb="$passdb (plugin)" - fi -fi -AM_CONDITIONAL(LDAP_PLUGIN, test "$have_ldap_plugin" = "yes") -AM_CONDITIONAL(HAVE_LDAP, test "$want_ldap" != "no") -dict_drivers= - -if test $want_db != no; then - AC_CACHE_CHECK([db_env_create in -ldb],i_cv_have_db_env_create,[ - old_LIBS=$LIBS - LIBS="$LIBS -ldb" - AC_TRY_LINK([ - #include - ], [ - db_env_create(0, 0); - ], [ - i_cv_have_db_env_create=yes - ], [ - i_cv_have_db_env_create=no - ]) - LIBS=$old_LIBS - ]) - if test $i_cv_have_db_env_create = yes; then - AC_CHECK_HEADER(db.h, [ - DICT_LIBS="$DICT_LIBS -ldb" - dict_drivers="$dict_drivers db" - AC_DEFINE(BUILD_DB,, [Build with Berkeley DB support]) - ], [ - if test $want_db = yes; then - AC_ERROR([Can't build with db support: db.h not found]) - fi - ]) - else - if test $want_db = yes; then - AC_ERROR([Can't build with db support: libdb not found]) - fi - fi -fi - -if test $want_cdb != no; then - AC_CHECK_LIB(cdb, cdb_init, [ - AC_CHECK_HEADER(cdb.h, [ - DICT_LIBS="$DICT_LIBS -lcdb" - dict_drivers="$dict_drivers cdb" - AC_DEFINE(BUILD_CDB,, [Build with CDB support]) - ], [ - if test $want_cdb = yes; then - AC_ERROR([Can't build with CDB support: cdb.h not found]) - fi - ]) - ], [ - if test $want_cdb = yes; then - AC_ERROR([Can't build with CDB support: libcdb not found]) - fi - ]) -fi - -if test $want_pgsql != no; then - AC_CHECK_PROG(PG_CONFIG, pg_config, pg_config, NO) - if test $PG_CONFIG = NO; then - # based on code from PHP - for i in /usr /usr/local /usr/local/pgsql; do - for j in include include/pgsql include/postgres include/postgresql ""; do - if test -r "$i/$j/libpq-fe.h"; then - PGSQL_INCLUDE=$i/$j - fi - done - for lib in lib lib64; do - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do - if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then - PGSQL_LIBDIR=$i/$j - fi - done - done - done - else - PGSQL_INCLUDE="`$PG_CONFIG --includedir`" - PGSQL_LIBDIR="`$PG_CONFIG --libdir`" - fi - - old_LIBS=$LIBS - if test "$PGSQL_LIBDIR" != ""; then - LIBS="$LIBS -L$PGSQL_LIBDIR" - fi - - AC_CHECK_LIB(pq, PQconnectdb, [ - AC_CHECK_LIB(pq, PQescapeStringConn, [ - AC_DEFINE(HAVE_PQESCAPE_STRING_CONN,, [Define if libpq has PQescapeStringConn function]) - ]) - old_CPPFLAGS=$CPPFLAGS - if test "$PGSQL_INCLUDE" != ""; then - CPPFLAGS="$CPPFLAGS -I$PGSQL_INCLUDE" - fi - AC_CHECK_HEADER(libpq-fe.h, [ - if test "$PGSQL_INCLUDE" != ""; then - PGSQL_CFLAGS="$PGSQL_CFLAGS -I$PGSQL_INCLUDE" - fi - if test "$PGSQL_LIBDIR" != ""; then - PGSQL_LIBS="$PGSQL_LIBS -L$PGSQL_LIBDIR" - fi - PGSQL_LIBS="$PGSQL_LIBS -lpq" - AC_DEFINE(HAVE_PGSQL,, [Build with PostgreSQL support]) - found_sql_drivers="$found_sql_drivers pgsql" - ], [ - if test $want_pgsql = yes; then - AC_ERROR([Can't build with PostgreSQL support: libpq-fe.h not found]) - fi - ]) - CPPFLAGS=$old_CPPFLAGS - ], [ - if test $want_pgsql = yes; then - AC_ERROR([Can't build with PostgreSQL support: libpq not found]) - fi - ]) - LIBS=$old_LIBS -fi - -have_mysql=no -if test $want_mysql != no; then - AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, mysql_config, NO) - if test $MYSQL_CONFIG = NO; then - # based on code from PHP - MYSQL_LIBS="-lmysqlclient -lz -lm" - for i in /usr /usr/local /usr/local/mysql; do - for j in include include/mysql ""; do - if test -r "$i/$j/mysql.h"; then - MYSQL_INCLUDE="-I$i/$j" - fi - done - for j in lib lib/mysql lib64 lib64/mysql ""; do - if test -f "$i/$j/libmysqlclient.so" || test -f "$i/$j/libmysqlclient.a"; then - MYSQL_LIBS="-L$i/$j -lmysqlclient -lz -lm" - fi - done - done - else - MYSQL_INCLUDE="`$MYSQL_CONFIG --include`" - MYSQL_LIBS="`$MYSQL_CONFIG --libs`" - fi - - old_LIBS=$LIBS - if test "$MYSQL_LIBS" != ""; then - LIBS="$LIBS $MYSQL_LIBS" - fi - - mysql_lib="" - LIBS="$LIBS -lz -lm" - AC_CHECK_LIB(mysqlclient, mysql_init, [ - old_CPPFLAGS=$CPPFLAGS - if test "$MYSQL_INCLUDE" != ""; then - CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE" - fi - AC_CHECK_HEADER(mysql.h, [ - if test "$MYSQL_INCLUDE" != ""; then - MYSQL_CFLAGS="$MYSQL_CFLAGS $MYSQL_INCLUDE" - fi - - AC_CHECK_LIB(mysqlclient, mysql_ssl_set, [ - AC_DEFINE(HAVE_MYSQL_SSL,, [Define if your MySQL library has SSL functions]) - if test "x$have_openssl" = "yes"; then - ssl_define="#define HAVE_OPENSSL" - else - ssl_define="" - fi - AC_TRY_COMPILE([ - $ssl_define - #include - ], [ - mysql_ssl_set(0, 0, 0, 0, 0, 0); - ], [ - AC_DEFINE(HAVE_MYSQL_SSL_CIPHER,, [Define if your MySQL library supports setting cipher]) - - AC_TRY_COMPILE([ - $ssl_define - #include - ], [ - int i = MYSQL_OPT_SSL_VERIFY_SERVER_CERT; - ], [ - AC_DEFINE(HAVE_MYSQL_SSL_VERIFY_SERVER_CERT,, [Define if your MySQL library supports verifying the name in the SSL certificate]) - ]) - ]) - ]) - - have_mysql=yes - AC_DEFINE(HAVE_MYSQL,, [Build with MySQL support]) - found_sql_drivers="$found_sql_drivers mysql" - ], [ - if test $want_mysql = yes; then - AC_ERROR([Can't build with MySQL support: mysql.h not found]) - fi - ]) - CPPFLAGS=$old_CPPFLAGS - ], [ - if test $want_mysql = yes; then - AC_ERROR([Can't build with MySQL support: libmysqlclient not found]) - fi - ]) - - if test $have_mysql != yes; then - MYSQL_LIBS= - MYSQL_CFLAGS= - fi - LIBS=$old_LIBS -fi - -if test $want_sqlite != no; then - AC_CHECK_LIB(sqlite3, sqlite3_open, [ - AC_CHECK_HEADER(sqlite3.h, [ - SQLITE_LIBS="$SQLITE_LIBS -lsqlite3" - - AC_DEFINE(HAVE_SQLITE,, [Build with SQLite3 support]) - found_sql_drivers="$found_sql_drivers sqlite" - ], [ - if test $want_sqlite = yes; then - AC_ERROR([Can't build with SQLite support: sqlite3.h not found]) - fi - ]) - ], [ - if test $want_sqlite = yes; then - AC_ERROR([Can't build with SQLite support: libsqlite3 not found]) - fi - ]) -fi - -if test $want_cassandra != no; then - AC_CHECK_LIB(cassandra, cass_session_new, [ - AC_CHECK_HEADER(cassandra.h, [ - CASSANDRA_LIBS="$CASSANDRA_LIBS -lcassandra" - - AC_DEFINE(HAVE_CASSANDRA,, [Build with Cassandra support]) - found_sql_drivers="$found_sql_drivers cassandra" - AC_CHECK_LIB(cassandra, cass_cluster_set_constant_speculative_execution_policy, [ - AC_DEFINE(HAVE_CASSANDRA_SPECULATIVE_POLICY, 1, [Cassandra supports speculative execution policy]) - ]) - ], [ - if test $want_cassandra = yes; then - AC_ERROR([Can't build with Cassandra support: cassandra.h not found]) - fi - ]) - ], [ - if test $want_cassandra = yes; then - AC_ERROR([Can't build with Cassandra support: libcassandra not found]) - fi - ]) -fi - -SQL_CFLAGS="$MYSQL_CFLAGS $PGSQL_CFLAGS $SQLITE_CFLAGS $CASSANDRA_CFLAGS" -if test "$want_sql" != "plugin"; then - SQL_LIBS="$MYSQL_LIBS $PGSQL_LIBS $SQLITE_LIBS $CASSANDRA_LIBS" -else - AC_DEFINE(SQL_DRIVER_PLUGINS,, [Build SQL drivers as plugins]) -fi -sql_drivers= -not_sql_drivers= - -if test "$found_sql_drivers" != "" || test "$want_sql" != "no"; then - sql_drivers="$found_sql_drivers" - - AC_DEFINE(PASSDB_SQL,, [Build with SQL support]) - AC_DEFINE(USERDB_SQL,, [Build with SQL support]) - AUTH_LIBS="$AUTH_LIBS $SQL_LIBS" - passdb="$passdb sql" - userdb="$userdb sql" -else - not_passdb="$not_passdb sql" - not_userdb="$not_userdb sql" -fi - -have_vpopmail=no -if test $want_vpopmail != no; then - vpop_etc="$vpopmail_home/etc" - AC_MSG_CHECKING([for vpopmail configuration at $vpop_etc/lib_deps]) - if ! test -f $vpop_etc/lib_deps; then - AC_MSG_RESULT(not found) - vpop_etc="$vpopmail_home" - AC_MSG_CHECKING([for vpopmail configuration at $vpop_etc/lib_deps]) - fi - if test -f $vpop_etc/lib_deps; then - AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpop_etc/inc_deps` $CFLAGS" - AUTH_LIBS="$AUTH_LIBS `cat $vpop_etc/lib_deps`" - AC_DEFINE(USERDB_VPOPMAIL,, [Build with vpopmail support]) - AC_DEFINE(PASSDB_VPOPMAIL,, [Build with vpopmail support]) - AC_MSG_RESULT(found) - have_vpopmail=yes - else - AC_MSG_RESULT(not found) - if test $want_vpopmail = yes; then - AC_ERROR([Can't build with vpopmail support: $vpop_etc/lib_deps not found]) - fi - fi -fi - -if test $have_vpopmail = no; then - not_passdb="$not_passdb vpopmail" - not_userdb="$not_userdb vpopmail" -else - userdb="$userdb vpopmail" - passdb="$passdb vpopmail" -fi - -AC_CHECK_FUNC(crypt,, [ - AC_CHECK_LIB(crypt, crypt, [ - AUTH_LIBS="-lcrypt $AUTH_LIBS" - CRYPT_LIBS="-lcrypt" - ], [ - AC_MSG_ERROR([crypt() wasn't found]) - ]) -]) -AC_SUBST(CRYPT_LIBS) +dnl *** auth/userdb/dict things +DOVECOT_WANT_LUA +DOVECOT_WANT_PREFETCH +DOVECOT_WANT_PASSWD +DOVECOT_WANT_SHADOW +DOVECOT_WANT_PAM +DOVECOT_WANT_CHECKPASSWORD +DOVECOT_WANT_BSDAUTH +DOVECOT_WANT_GSSAPI +DOVECOT_WANT_SIA +DOVECOT_WANT_LDAP +DOVECOT_WANT_DB +DOVECOT_WANT_CDB +DOVECOT_WANT_PGSQL +DOVECOT_WANT_MYSQL +DOVECOT_WANT_SODIUM +DOVECOT_WANT_SQLITE +DOVECOT_WANT_CASSANDRA +DOVECOT_WANT_VPOPMAIL + +DOVECOT_SQL + +AM_CONDITIONAL([AUTH_LUA_PLUGIN], [test "x$with_lua_plugin" = "xyes"]) +AM_CONDITIONAL([HAVE_LUA], [test "x$with_luajit" = "xyes" || test "x$with_lua" = "xyes"]) +AS_IF([test "x$with_luajit" = "xyes" || test "x$with_lua" = "xyes"], + AS_IF([test "x$with_lua_plugin" = "xyes"], + [userdb="$userdb lua (plugin)"; passdb="$passdb lua (plugin)"], + [userdb="$userdb lua"; passdb="$passdb lua"], + ), []) if test $have_modules = yes; then AC_DEFINE(HAVE_MODULES,, [Define if you have dynamic module support]) @@ -2487,41 +590,6 @@ AC_SUBST(MODULE_SUFFIX) fi -have_nss=no -if test $want_nss != no; then - if test $have_modules != yes; then - if test $want_nss = yes; then - AC_ERROR([Can't build with NSS support: Dynamic modules not supported]) - fi - else - AC_CACHE_CHECK([for NSS support],i_cv_have_nss,[ - AC_TRY_COMPILE([ - #include - ], [ - enum nss_status status = NSS_STATUS_TRYAGAIN; - ], [ - i_cv_have_nss=yes - ], [ - i_cv_have_nss=no - ]) - ]) - if test $i_cv_have_nss = yes; then - AC_DEFINE(USERDB_NSS,, [Build with NSS module support]) - have_nss=yes - else - if test $want_nss = yes; then - AC_ERROR([Can't build with NSS support: nss.h not found or not usable]) - fi - fi - fi -fi - -if test $have_nss = no; then - not_userdb="$not_userdb nss" -else - userdb="$userdb nss" -fi - AC_SUBST(AUTH_CFLAGS) AC_SUBST(AUTH_LIBS) AC_SUBST(SQL_CFLAGS) @@ -2539,110 +607,49 @@ AC_SUBST(CDB_LIBS) AC_SUBST(dict_drivers) -dnl ** -dnl ** Endianess -dnl ** +AC_C_BIGENDIAN -dnl At least Apple's gcc supports __BIG_ENDIAN__ and __LITTLE_ENDIAN__ -dnl defines. Use them if possible to allow cross-compiling. -AC_CACHE_CHECK([if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined],i_cv_have___big_endian__,[ - AC_TRY_COMPILE([ - #if !(__BIG_ENDIAN__ || __LITTLE_ENDIAN__) - #error nope - #endif - ], [ - ], [ - i_cv_have___big_endian__=yes - ], [ - i_cv_have___big_endian__=no - ]) -]) -if test $i_cv_have___big_endian__ = yes; then - AC_DEFINE(WORDS_BIGENDIAN, __BIG_ENDIAN__, [Define if your CPU is big endian]) -else - AC_C_BIGENDIAN -fi - -dnl ** -dnl ** IPv6 support -dnl ** - -have_ipv6=no -AC_MSG_CHECKING([for IPv6]) -AC_CACHE_VAL(i_cv_type_in6_addr, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -#include -#include ]], -[[struct in6_addr i;]])], -[i_cv_type_in6_addr=yes], -[i_cv_type_in6_addr=no])]) -if test $i_cv_type_in6_addr = yes; then - AC_DEFINE(HAVE_IPV6,, [Build with IPv6 support]) - have_ipv6=yes -fi -AC_MSG_RESULT($i_cv_type_in6_addr) +DOVECOT_IPV6 dnl ** dnl ** storage classes dnl ** -maildir_libs='$(top_builddir)/src/lib-storage/index/maildir/libstorage_maildir.la' -mbox_libs='$(top_builddir)/src/lib-storage/index/mbox/libstorage_mbox.la' -dbox_common_libs='$(top_builddir)/src/lib-storage/index/dbox-common/libstorage_dbox_common.la' -sdbox_libs='$(top_builddir)/src/lib-storage/index/dbox-single/libstorage_dbox_single.la' -mdbox_libs='$(top_builddir)/src/lib-storage/index/dbox-multi/libstorage_dbox_multi.la' -cydir_libs='$(top_builddir)/src/lib-storage/index/cydir/libstorage_cydir.la' -imapc_libs='$(top_builddir)/src/lib-storage/index/imapc/libstorage_imapc.la $(top_builddir)/src/lib-imap-client/libimap_client.la' -pop3c_libs='$(top_builddir)/src/lib-storage/index/pop3c/libstorage_pop3c.la' -raw_libs='$(top_builddir)/src/lib-storage/index/raw/libstorage_raw.la' -shared_libs='$(top_builddir)/src/lib-storage/index/shared/libstorage_shared.la' - CORE_LIBS='$(top_builddir)/src/lib-dovecot/libdovecot.la' STORAGE_LIB='$(top_builddir)/src/lib-storage/libdovecot-storage.la' -LINKED_STORAGE_LIBS= - -mailbox_list_drivers="maildir imapdir fs index none shared" -have_sdbox=no -have_mdbox=no -for storage in $mail_storages; do - LINKED_STORAGE_LIBS="$LINKED_STORAGE_LIBS `eval echo \\$${storage}_libs`" - if test $storage = sdbox; then - have_sdbox=yes - fi - if test $storage = mdbox; then - have_mdbox=yes - fi - if test $storage = sdbox || test $storage = mdbox; then - LINKED_STORAGE_LIBS="$LINKED_STORAGE_LIBS $dbox_common_libs" - dbox_common_libs="" - fi - if test $storage = imapc; then - mailbox_list_drivers="$mailbox_list_drivers imapc" - fi -done LINKED_STORAGE_LDADD= -AC_SUBST(LINKED_STORAGE_LIBS) AC_SUBST(LINKED_STORAGE_LDADD) -AC_SUBST(mailbox_list_drivers) -AC_DEFINE_UNQUOTED(MAIL_STORAGES, "$mail_storages", [List of compiled in mail storages]) - -if test $have_sdbox = yes; then - # create alias for sdbox - mail_storages="$mail_storages dbox" -fi -if test $have_mdbox = yes; then - mail_storages="$mail_storages mdbox_deleted" -fi dnl ** dnl ** Shared libraries usage dnl ** -LIBDOVECOT_LA_LIBS='$(top_builddir)/src/lib-dict-extra/libdict_extra.la $(top_builddir)/src/lib-oauth2/liboauth2.la $(top_builddir)/src/lib-program-client/libprogram_client.la $(top_builddir)/src/lib-master/libmaster.la $(top_builddir)/src/lib-settings/libsettings.la $(top_builddir)/src/lib-stats/libstats.la $(top_builddir)/src/lib-http/libhttp.la $(top_builddir)/src/lib-fs/libfs.la $(top_builddir)/src/lib-dict/libdict.la $(top_builddir)/src/lib-smtp/libsmtp.la $(top_builddir)/src/lib-dns/libdns.la $(top_builddir)/src/lib-imap/libimap.la $(top_builddir)/src/lib-mail/libmail.la $(top_builddir)/src/lib-sasl/libsasl.la $(top_builddir)/src/lib-auth/libauth.la $(top_builddir)/src/lib-charset/libcharset.la $(top_builddir)/src/lib-ssl-iostream/libssl_iostream.la $(top_builddir)/src/lib-dcrypt/libdcrypt.la $(top_builddir)/src/lib-test/libtest.la $(top_builddir)/src/lib/liblib.la' +LIBDOVECOT_LA_LIBS='\ + $(top_builddir)/src/lib-dict-extra/libdict_extra.la \ + $(top_builddir)/src/lib-oauth2/liboauth2.la \ + $(top_builddir)/src/lib-smtp/libsmtp.la \ + $(top_builddir)/src/lib-program-client/libprogram_client.la \ + $(top_builddir)/src/lib-master/libmaster.la \ + $(top_builddir)/src/lib-settings/libsettings.la \ + $(top_builddir)/src/lib-old-stats/libold_stats.la \ + $(top_builddir)/src/lib-http/libhttp.la \ + $(top_builddir)/src/lib-fs/libfs.la \ + $(top_builddir)/src/lib-dict/libdict.la \ + $(top_builddir)/src/lib-dns/libdns.la \ + $(top_builddir)/src/lib-imap/libimap.la \ + $(top_builddir)/src/lib-mail/libmail.la \ + $(top_builddir)/src/lib-sasl/libsasl.la \ + $(top_builddir)/src/lib-auth/libauth.la \ + $(top_builddir)/src/lib-charset/libcharset.la \ + $(top_builddir)/src/lib-ssl-iostream/libssl_iostream.la \ + $(top_builddir)/src/lib-dcrypt/libdcrypt.la \ + $(top_builddir)/src/lib-test/libtest.la \ + $(top_builddir)/src/lib/liblib.la' +# This is used in dovecot-config, which is grepped in dovecot.m4, +# so it needs to be in a single line. +LIBDOVECOT_LA_LIBS=`echo "$LIBDOVECOT_LA_LIBS" | tr -d '\t\n\\\\'` + if test "$want_shared_libs" = "yes"; then LIBDOVECOT_DEPS='$(top_builddir)/src/lib-dovecot/libdovecot.la' LIBDOVECOT="$LIBDOVECOT_DEPS \$(MODULE_LIBS)" @@ -2728,104 +735,18 @@ dnl ** COMPRESS_LIBS= -if test "$want_zlib" != "no"; then - AC_CHECK_HEADER(zlib.h, [ - have_zlib=yes - have_compress_lib=yes - AC_DEFINE(HAVE_ZLIB,, [Define if you have zlib library]) - COMPRESS_LIBS="$COMPRESS_LIBS -lz" - ], [ - if test "$want_zlib" = "yes"; then - AC_ERROR([Can't build with zlib support: zlib.h not found]) - fi - ]) -fi -if test "$want_bzlib" != "no"; then - AC_CHECK_HEADER(bzlib.h, [ - AC_CHECK_LIB(bz2, BZ2_bzdopen, [ - have_bzlib=yes - have_compress_lib=yes - AC_DEFINE(HAVE_BZLIB,, [Define if you have bzlib library]) - COMPRESS_LIBS="$COMPRESS_LIBS -lbz2" - ], [ - if test "$want_bzlib" = "yes"; then - AC_ERROR([Can't build with bzlib support: libbz2 not found]) - fi - ]) - ], [ - if test "$want_bzlib" = "yes"; then - AC_ERROR([Can't build with bzlib support: bzlib.h not found]) - fi - ]) -fi +DOVECOT_WANT_ZLIB +DOVECOT_WANT_BZLIB +DOVECOT_WANT_LZMA +DOVECOT_WANT_LZ4 -if test "$want_lzma" != "no"; then - AC_CHECK_HEADER(lzma.h, [ - AC_CHECK_LIB(lzma, lzma_stream_decoder, [ - have_lzma=yes - have_compress_lib=yes - AC_DEFINE(HAVE_LZMA,, [Define if you have lzma library]) - COMPRESS_LIBS="$COMPRESS_LIBS -llzma" - ], [ - if test "$want_lzma" = "yes"; then - AC_ERROR([Can't build with lzma support: liblzma not found]) - fi - ]) - ], [ - if test "$want_lzma" = "yes"; then - AC_ERROR([Can't build with lzma support: lzma.h not found]) - fi - ]) -fi -AC_SUBST(COMPRESS_LIBS) - -if test "$want_lz4" != "no"; then - AC_CHECK_HEADER(lz4.h, [ - AC_CHECK_LIB(lz4, LZ4_compress, [ - have_lz4=yes - have_compress_lib=yes - AC_DEFINE(HAVE_LZ4,, [Define if you have lz4 library]) - COMPRESS_LIBS="$COMPRESS_LIBS -llz4" - ], [ - if test "$want_lz4" = "yes"; then - AC_ERROR([Can't build with lz4 support: liblz4 not found]) - fi - ]) - AC_CHECK_LIB(lz4, LZ4_compress_default, [ - AC_DEFINE(HAVE_LZ4_COMPRESS_DEFAULT,, - [Define if you have LZ4_compress_default]) - ], [ - ]) - ], [ - if test "$want_lz4" = "yes"; then - AC_ERROR([Can't build with lz4 support: lz4.h not found]) - fi - ]) -fi AC_SUBST(COMPRESS_LIBS) AM_CONDITIONAL(BUILD_ZLIB_PLUGIN, test "$have_compress_lib" = "yes") -RPCGEN=${RPCGEN-rpcgen} -if ! $RPCGEN -c /dev/null > /dev/null; then - RPCGEN= -fi -AC_SUBST(RPCGEN) - -have_rquota=no -if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then - AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes]) - have_rquota=yes -fi -AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes") - -QUOTA_LIBS="" -AC_SEARCH_LIBS(quota_open, quota, [ - AC_DEFINE(HAVE_QUOTA_OPEN,, [Define if you have quota_open()]) - QUOTA_LIBS="-lquota" -]) -AC_SUBST(QUOTA_LIBS) +DOVECOT_RPCGEN +DOVECOT_QUOTA dnl dnl ** Full text search @@ -2834,96 +755,12 @@ fts=" squat" not_fts="" -have_solr=no -if test "$want_solr" != "no"; then - dnl need libexpat - AC_CHECK_LIB(expat, XML_Parse, [ - AC_CHECK_HEADER(expat.h, [ - have_solr=yes - fts="$fts solr" - ], [ - if test $want_solr = yes; then - AC_ERROR([Can't build with Solr support: expat.h not found]) - fi - ]) - ], [ - if test $want_solr = yes; then - AC_ERROR([Can't build with Solr support: libexpat not found]) - fi - ]) -fi -AM_CONDITIONAL(BUILD_SOLR, test "$have_solr" = "yes") +DOVECOT_WANT_SOLR +DOVECOT_WANT_CLUCENE +DOVECOT_WANT_STEMMER +DOVECOT_WANT_TEXTCAT -have_lucene=no -if test "$want_lucene" = "yes"; then - PKG_CHECK_MODULES(CLUCENE, libclucene-core,, [ - # no pkg-config file for clucene. fallback to defaults. - # FIXME: we should verify here that this actually works.. - CLUCENE_LIBS="-lclucene-shared -lclucene-core" - ]) - have_lucene=yes - fts="$fts lucene" -fi - -if test $want_stemmer != no; then - AC_CHECK_LIB(stemmer, sb_stemmer_new, [ - have_fts_stemmer=yes - AC_DEFINE(HAVE_FTS_STEMMER,, [Define if you want stemming support for FTS]) - ], [ - if test $want_stemmer = yes; then - AC_ERROR([Can't build with stemmer support: libstemmer not found]) - fi - ]) -fi -AM_CONDITIONAL(BUILD_FTS_STEMMER, test "$have_fts_stemmer" = "yes") - -if test $want_textcat != no; then - if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists libexttextcat 2>/dev/null; then - PKG_CHECK_MODULES(LIBEXTTEXTCAT, libexttextcat) - TEXTCAT_DATADIR=`$PKG_CONFIG --variable=pkgdatadir libexttextcat` - AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, [Define if you want exttextcat support for FTS]) - have_fts_exttextcat=yes - # Debian Wheezy workaround - LIBEXTTEXTCAT_CFLAGS include path is wrong: - AC_CHECK_HEADERS(libexttextcat/textcat.h) - else - AC_CHECK_LIB(exttextcat, special_textcat_Init, [ - have_fts_exttextcat=yes - AC_CHECK_HEADERS(libexttextcat/textcat.h) - LIBEXTTEXTCAT_LIBS=-lexttextcat - AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, [Define if you want exttextcat support for FTS]) - TEXTCAT_DATADIR="/usr/share/libexttextcat" - AC_SUBST(LIBEXTTEXTCAT_LIBS) - ], [ - AC_CHECK_LIB(textcat, special_textcat_Init, [ - have_fts_textcat=yes - TEXTCAT_DATADIR="/usr/share/libtextcat" - AC_CHECK_HEADERS(libtextcat/textcat.h) - ]) - ]) - if test $want_textcat = yes && test "$have_fts_exttextcat" != yes && test "$have_fts_textcat" != yes; then - AC_ERROR([Can't build with textcat support: libtextcat or libexttextcat not found]) - fi - fi - if test "$have_fts_exttextcat" = yes || test "$have_fts_textcat" = yes; then - AC_DEFINE(HAVE_FTS_TEXTCAT,, [Define if you want textcat support for FTS]) - AC_DEFINE_UNQUOTED(TEXTCAT_DATADIR, "$TEXTCAT_DATADIR", [Points to textcat pkgdatadir containing the language files]) - fi -fi -AM_CONDITIONAL(BUILD_FTS_TEXTCAT, test "$have_fts_textcat" = "yes") -AM_CONDITIONAL(BUILD_FTS_EXTTEXTCAT, test "$have_fts_exttextcat" = "yes") - -if test "$want_icu" != "no"; then - if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists icu-i18n 2>/dev/null; then - PKG_CHECK_MODULES(LIBICU, icu-i18n) - have_icu=yes - AC_DEFINE(HAVE_LIBICU,, [Define if you want ICU normalization support for FTS]) - elif test "$want_icu" = "yes"; then - AC_ERROR([Can't build with libicu support: libicu-i18n not found]) - fi -fi -AM_CONDITIONAL(BUILD_LIBICU, test "$have_icu" = "yes") - -DOVECOT_WANT_APPARMOR +DOVECOT_WANT_ICU DOVECOT_WANT_APPARMOR @@ -2939,7 +776,7 @@ dnl ** dnl get a list of setting .[ch] files, but list .h files first -FILES1=`find $srcdir/src -name '*settings.[[ch]]'|grep "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -v 'lib-master.*c$' | sort -r | sed s/^..//` +FILES1=`find $srcdir/src -name '*settings.[[ch]]'|grep "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -E -v 'lib-(master|smtp).*c$' | sort -r | sed s/^..//` FILES2=`find $srcdir/src -name '*settings.[[ch]]'|grep -v "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -v all-settings | sort -r | sed s/^..//` SETTING_FILES=`echo $FILES1 $FILES2 | sed -e s,$srcdir/src,./src,g -e 's,./src,$(top_srcdir)/src,g'` AC_SUBST(SETTING_FILES) @@ -2950,20 +787,27 @@ dnl IDLE doesn't really belong to banner. It's there just to make Blackberries dnl happy, because otherwise BIS server disables push email. -capability_banner="IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE" -capability="$capability_banner SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE" +capability_banner="IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE" +capability="$capability_banner SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY" AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", [IMAP capabilities]) AC_DEFINE_UNQUOTED(CAPABILITY_BANNER_STRING, "$capability_banner", [IMAP capabilities advertised in banner]) CFLAGS="$CFLAGS $EXTRA_CFLAGS" +BINARY_LDFLAGS="$PIE_LDFLAGS $RELRO_LDFLAGS" +BINARY_CFLAGS="$PIE_CFLAGS" + +AC_SUBST(BINARY_CFLAGS) +AC_SUBST(BINARY_LDFLAGS) + NOPLUGIN_LDFLAGS="-no-undefined" if test "$with_gnu_ld" = yes; then NOPLUGIN_LDFLAGS="$NOPLUGIN_LDFLAGS -Wl,--as-needed" fi -LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS" +LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS $EXTRA_LDFLAGS" AC_SUBST(NOPLUGIN_LDFLAGS) DC_CC_WRAPPER +DC_PANDOC if test "$docdir" = ""; then dnl docdir supported only by autoconf v2.59c and later @@ -2990,6 +834,7 @@ src/lib-compression/Makefile src/lib-dcrypt/Makefile src/lib-dict/Makefile +src/lib-dict-backend/Makefile src/lib-dict-extra/Makefile src/lib-dns/Makefile src/lib-fs/Makefile @@ -3003,6 +848,7 @@ src/lib-index/Makefile src/lib-lda/Makefile src/lib-ldap/Makefile +src/lib-lua/Makefile src/lib-mail/Makefile src/lib-master/Makefile src/lib-ntlm/Makefile @@ -3013,7 +859,7 @@ src/lib-settings/Makefile src/lib-smtp/Makefile src/lib-ssl-iostream/Makefile -src/lib-stats/Makefile +src/lib-old-stats/Makefile src/lib-test/Makefile src/lib-storage/Makefile src/lib-storage/list/Makefile @@ -3028,7 +874,6 @@ src/lib-storage/index/cydir/Makefile src/lib-storage/index/raw/Makefile src/lib-storage/index/shared/Makefile -src/lib-storage/register/Makefile src/anvil/Makefile src/auth/Makefile src/config/Makefile @@ -3050,17 +895,18 @@ src/master/Makefile src/pop3/Makefile src/pop3-login/Makefile +src/submission/Makefile +src/submission-login/Makefile src/replication/Makefile src/replication/aggregator/Makefile src/replication/replicator/Makefile -src/ssl-params/Makefile src/stats/Makefile +src/old-stats/Makefile src/util/Makefile src/plugins/Makefile src/plugins/acl/Makefile src/plugins/imap-acl/Makefile src/plugins/autocreate/Makefile -src/plugins/dict-ldap/Makefile src/plugins/expire/Makefile src/plugins/fs-compress/Makefile src/plugins/fts/Makefile @@ -3082,8 +928,8 @@ src/plugins/imap-quota/Makefile src/plugins/replication/Makefile src/plugins/snarf/Makefile -src/plugins/stats/Makefile -src/plugins/imap-stats/Makefile +src/plugins/old-stats/Makefile +src/plugins/imap-old-stats/Makefile src/plugins/trash/Makefile src/plugins/virtual/Makefile src/plugins/welcome/Makefile @@ -3092,6 +938,7 @@ src/plugins/mail-crypt/Makefile src/plugins/var-expand-crypt/Makefile src/plugins/apparmor/Makefile +src/plugins/charset-alias/Makefile stamp.h dovecot-config.in]) @@ -3114,8 +961,7 @@ echo "SSL ............ : $have_ssl" echo "GSSAPI ......... : $have_gssapi" echo "passdbs ........ :$passdb" -echo "dcrypt ..........: $build_dcrypt_openssl" - +echo "CFLAGS ......... : $CFLAGS" if test "$not_passdb" != ""; then echo " :$not_passdb" fi diff -Nru dovecot-2.2.33.2/debian/99-mail-stack-delivery.conf dovecot-2.3.3/debian/99-mail-stack-delivery.conf --- dovecot-2.2.33.2/debian/99-mail-stack-delivery.conf 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/99-mail-stack-delivery.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -# Some general options -# Installed protocols are now auto-included by /etc/dovecot/dovecot.conf -# Since mail-stack-delivery depends on them it is more flexible to not -# explicitly list them here, but achieves the same. -# protocols = imap pop3 sieve - -disable_plaintext_auth = yes - -# Since 18.04 basic SSL enablement is set up by dovecot-core and configured -# in /etc/dovecot/conf.d/10-ssl.conf. -# So by default basic enablement is no more done here. The old section is kept -# as comment for reference to the old defaults. -# -# ssl = yes -# ssl_cert = was automatically rejected:%n%r -} - -# Plugins configuration -plugin { - sieve=~/.dovecot.sieve - sieve_dir=~/sieve -} - -# Authentication configuration -auth_mechanisms = plain login - -service auth { - # Postfix smtp-auth - unix_listener /var/spool/postfix/private/dovecot-auth { - mode = 0660 - user = postfix - group = postfix - } -} diff -Nru dovecot-2.2.33.2/debian/changelog dovecot-2.3.3/debian/changelog --- dovecot-2.2.33.2/debian/changelog 2018-02-26 17:34:24.000000000 +0000 +++ dovecot-2.3.3/debian/changelog 2019-01-08 14:46:10.000000000 +0000 @@ -1,3 +1,212 @@ +dovecot (1:2.3.3-1ubuntu1~ppa18.04+1) bionic; urgency=medium + + * Backport from Disco. + + -- Nicolas Derive Tue, 08 Jan 2019 15:46:10 +0100 + +dovecot (1:2.3.3-1ubuntu1) disco; urgency=medium + + * Merge with Debian unstable (LP: #1803296). Remaining changes: + - d/control: carry mail-stack-delivery as empty transitional package + - d/p/fix-glibc-crypt-ftbfs: cherry-pick from upstream to find crypt(3) + correctly to fix FTBFS (LP: 1793138). + + -- Karl Stenerud Thu, 15 Nov 2018 11:58:22 +0100 + +dovecot (1:2.3.3-1) unstable; urgency=medium + + [ Jelmer Vernooij ] + * Trim trailing whitespace. + + [ Apollon Oikonomopoulos ] + * [6591a99] New upstream version 2.3.3 + * [3d718ec] Bump Standards-Version to 4.2.1; no changes needed + * [123bd32] Update pigeonhole to 0.5.3 + + -- Apollon Oikonomopoulos Thu, 04 Oct 2018 17:29:40 +0300 + +dovecot (1:2.3.2.1-1ubuntu3) cosmic; urgency=high + + * No change rebuild against openssl 1.1.1 with TLS 1.3 support. + + -- Dimitri John Ledkov Sat, 29 Sep 2018 01:36:48 +0100 + +dovecot (1:2.3.2.1-1ubuntu2) cosmic; urgency=medium + + * d/p/fix-glibc-crypt-ftbfs: cherry-pick from upstream to find crypt(3) + correctly to fix FTBFS (LP: #1793138). + + -- Robie Basak Thu, 20 Sep 2018 08:51:00 +0100 + +dovecot (1:2.3.2.1-1ubuntu1) cosmic; urgency=medium + + * Merge with Debian unstable (LP: #1771524). Remaining changes: + - carry mail-stack-delivery as empty transitional package + (can be dropped >20.04) + * Dropped Changes + - Add updated autopkgtest to debian/tests/* (LP: 1638865) + (those becamce superfluous by being mostly identical to the tests in + debian/tests/usage that are now packaged by Debian.) + + -- Christian Ehrhardt Fri, 03 Aug 2018 12:31:43 +0200 + +dovecot (1:2.3.2.1-1) unstable; urgency=medium + + * [40ba9f0] New upstream bugfix release 2.3.2.1 + * [87045ac] Drop fix-ftbfs-on-32bit.patch; merged upstream + * [5bb22a4] Bump Standards-Version to 4.1.5; no changes needed + + -- Apollon Oikonomopoulos Tue, 10 Jul 2018 17:51:43 +0300 + +dovecot (1:2.3.2-2) unstable; urgency=medium + + * [48067de] Fix FTBFS on 32-bit platforms by cherry-picking upstream commit + 1e23986f. + + -- Apollon Oikonomopoulos Wed, 04 Jul 2018 12:43:14 +0300 + +dovecot (1:2.3.2-1) unstable; urgency=medium + + * [bb03669] New upstream version 2.3.2 + + Upload to unstable + * [d29da3a] Merge 2.3 package changes from experimental. Important changes: + + [b3d1e17] Enable AppArmor support, see + https://wiki2.dovecot.org/Plugins/Apparmor + • B-D on libapparmor-dev + + [c0c55bd] Enable Lua scripting support for authdb/passdb. + • B-D on liblua5.3-dev + • New binary package, dovecot-auth-lua + + [4f6792e] Build with sodium support, enabling the ARGON2I and ARGON2ID + password schemes. + • B-D on libsodium-dev + + [54347e7] Build with ICU support enabling FTS unicode normalization + • B-D on libicu-dev + + New dovecot-submissiond binary package for the dovecot submission agent; + see https://wiki2.dovecot.org/Submission. + * [4db4813] Change maintainer address to dovecot@packages.d.o + * [5118354] Update pigeonhole to 0.5.2 + * [52a7af4] Drop murmur3-big-endian.patch; merged upstream + * [22a6eee] Refresh dovecot_name.patch + * [3af7568] dovecot_name.patch: apply to submissiond as well + + -- Apollon Oikonomopoulos Wed, 04 Jul 2018 08:57:45 +0300 + +dovecot (1:2.2.36-1) unstable; urgency=medium + + * [19f2274] d/gbp.conf: set merge-mode to "merge" to preserve pigeonhole/ + when importing new dovecot sources + * [6b9bf0d] New upstream version 2.2.36 + * [be12f22] Bump pigeonhole version to 0.4.24 + + Remove new file under doc/rfc + + Ship the new imap_filter_sieve module in dovecot-sieve + * [b77be59] Bump Standards-Version to 4.1.4; no changes needed + + -- Apollon Oikonomopoulos Wed, 06 Jun 2018 09:31:49 +0300 + +dovecot (1:2.2.35-2ubuntu1) cosmic; urgency=medium + + * Merge with Debian unstable (LP: #1771816). Remaining changes: + - Add updated autopkgtest to debian/tests/* (these tests got simplified + and streamlined to use the packages default configuration which solves + LP: #1638865) + * Dropped Changes (now upstream) + - SECURITY UPDATE: rfc822_parse_domain Information Leak Vulnerability + - SECURITY UPDATE: TLS SNI config lookups DoS + - SECURITY UPDATE: Memory leak that can cause crash due to memory exhaustion + * Dropped Changes (no more needed after 18.04) + - handle conffile removal of /etc/init/dovecot.conf (due to dropping + upstart). + * Dropped Changes (no more needed) + - Drop build dependency on libstemmer-dev (universe) - this is now in main + - Disable dovecot-lucene plugin as it had various issues and is deprecated + in favor of solr anyway (LP 1524526) - no more failing in Cosmic. + * Dropped Changes (mail-stack-delivery) + It was decided to no more carry mail-stack-delivery as a package in favor + to out-of-package solutions. It became less useful due to one of the + biggest benefit (auto-ssl setup) being part of the base setup now. + - Add mail-stack-delivery + - add package in d/rules, d/control + - add d/*mail-stack-delivery* maintainer scripts and default conf + - d/mail-stack-delivery.preinst: Move previously installed backups and + config files to a new package namespace. + - d/mail-stack-delivery.README.Debian clarified use of configuration files + - d/mail-stack-delivery.postinst: Use ssl key/cert paths now set up by + dovecot-core; transition for such configs formerly set up by + mail-stack-delivery to use the new default ssl config (if user had no + conffile change or choses new defaults). + - d/mail-stack-delivery.postinst: if moving dovecot to the new defaults on + upgrade, also move the related postfix key/cert entries. + - debian/99-mail-stack-delivery.conf: do not explicitly enable protocols + as all installed are auto-included from the base config now. + - adapt autopkgtests to match new version. + - d/control: for the ssl transition to work we need to ensure dovecot-core + is complete before upgrading mail-stack-delivery, so add a Pre-Depends. + - d/mail-stack-delivery.postinst: add SSL_CERT/SSL_KEY detection to + postconf section (was formerly initialized at the now dropped key setup) + - d/mail-stack-delivery.postinst: fix SSL_CERT/SSL_KEY detection to only + read non-comments from the right keywords and to strip common bad-chars + - d/mail-stack-delivery.postinst: stop modifying mandatory tls config, + recent upstream has sane defaults now + - debian/99-mail-stack-delivery.conf: drop explicit ssl_cipher_list, + recent upstream has sane defaults now + * Added Changes: + - carry mail-stack-delivery as empty transitional package + (can be dropped >20.04) + + -- Christian Ehrhardt Wed, 16 May 2018 14:40:19 +0200 + +dovecot (1:2.2.35-2) unstable; urgency=medium + + * [7665652] Use git-subtree to generate pigeonhole patch from git; add + single-debian-patch to d/source/local-options + * [bfa0f10] d/rules: specify libdir manually; previous upload moved modules + under /usr/lib/, which was bound to break existing setups + * [982e826] d/copyright: adjust pigeonhole path and bump years + + -- Apollon Oikonomopoulos Thu, 22 Mar 2018 16:56:40 +0200 + +dovecot (1:2.2.35-1) unstable; urgency=medium + + * [8108cba] New upstream version 2.2.35 + * [6cbbaa1] Update pigeonhole to 0.4.23 (Closes: #892137) + * [9ace5f2] Switch Vcs-* URLs to salsa.d.o + * [ef40625] d/rules: call configure via dh_auto_configure. + Thanks to Helmut Grohne (Closes: #885854) + * [a459455] Drop B-D on libcurl4-gnutls-dev; removed upstream since 2.2 + * [235af9d] Update upstream signing key + + -- Apollon Oikonomopoulos Tue, 20 Mar 2018 11:15:42 +0200 + +dovecot (1:2.2.34-2) unstable; urgency=high + + * [868dc65] Update pigeonhole to 0.4.22 + * Set urgency to high due to the security fixes in 2.2.34-1 + + -- Apollon Oikonomopoulos Fri, 02 Mar 2018 18:36:23 +0200 + +dovecot (1:2.2.34-1) unstable; urgency=medium + + * [f53dc9a] New upstream version 2.2.34 + Fixes the following security issues: + + CVE-2017-15130: TLS SNI config lookups may lead to excessive memory + usage (Closes: #891820) + + CVE-2017-14461: rfc822_parse_domain information leak vulnerability + (Closes: #891819) + + CVE-2017-15132: auth client leaks memory if SASL authentication is + aborted (Closes: #888432) + * [0dc98c6] Do not patch all-settings.c; regenerate it at build time + instead. Thanks to Aki Tuomi! + * [e678e3b] Bump dh compat to 11 + + B-D on debhelper (>= 11~) + + Use dh_installsystemd instead of dh_systemd_enable + * [271b290] Bump Standards-Version to 4.1.3; no changes needed + * [3cd6715] d/copyright: bump upstream and debian years + * [380d1ac] Drop the ENABLED flag from /etc/default/dovecot (but let the + initscript handle it if it exists) + * [97d6fae] d/watch: switch upstream URL to https:// + + -- Apollon Oikonomopoulos Thu, 01 Mar 2018 10:55:49 +0200 + dovecot (1:2.2.33.2-1ubuntu4) bionic; urgency=medium * SECURITY UPDATE: rfc822_parse_domain Information Leak Vulnerability @@ -653,7 +862,7 @@ dovecot (1:2.2.13-2) unstable; urgency=medium - * [bd5e34b] Patches from upstreams' hg repo to fix BYE and LOGOUT not being + * [bd5e34b] Patches from upstreams' hg repo to fix BYE and LOGOUT not being sent. (Closes: #751682) * [452e336] Czech translation for debconf. Thanks to Michal Šimůnek (Closes: #751389) @@ -967,7 +1176,7 @@ from the previous release had to be removed. Namely: - TCP Wrappers support - Hurd compatability support - - Triggers + - Triggers All this will be coming back in the next version but for now, if you need any of it, stick with -5. * [1f869e0] NEWS.Debian was not getting added to the package (Closes: #693621) @@ -978,7 +1187,7 @@ dovecot (1:2.1.7-5) unstable; urgency=high - * [132bc3b] Remove call to ntp-wait in init script. Dovecot handles a + * [132bc3b] Remove call to ntp-wait in init script. Dovecot handles a skewed clock much better now. (Closes: #693225) -- Jaldhar H. Vyas Wed, 14 Nov 2012 14:45:29 -0500 @@ -1740,7 +1949,7 @@ * Er that should be fcntl not fnctl. (Closes: #539474, #539486) * For the sake of completeness, fixed some errors in the example config file. - (They are in the !include statements which are commented out by default + (They are in the !include statements which are commented out by default so it is unlikely that most users will actually be affected.) (Closes: #539391) @@ -2209,7 +2418,7 @@ dovecot (1.0.rc30-1) unstable; urgency=low * New upstream release. - * + * -- Fabio Tranchitella Sat, 07 Apr 2007 11:17:45 +0200 @@ -2444,9 +2653,9 @@ dovecot (1.0.rc1-1) unstable; urgency=low * New upstream release. - * Add a build-dependency on linux-kernel-headers for the xfs quotas + * Add a build-dependency on linux-kernel-headers for the xfs quotas stuff. Make it higher than the version in sarge because sarges xfs - includes are too old. If any knowledgeable person would like to + includes are too old. If any knowledgeable person would like to give me a patch for this, please do. (Closes: #374793) -- Jaldhar H. Vyas Wed, 28 Jun 2006 11:42:07 -0400 @@ -2454,7 +2663,7 @@ dovecot (1.0.beta9-1) unstable; urgency=low * New upstream release - * Added XFS quota support. Thanks Pawel Jarosz + * Added XFS quota support. Thanks Pawel Jarosz (Closes: #373936) -- Jaldhar H. Vyas Mon, 19 Jun 2006 16:55:20 -0400 @@ -2490,7 +2699,7 @@ * New upstream release. * [SECURITY] Fixes a directory traversal vulnerability. - (see: http://www.dovecot.org/list/dovecot-news/2006-May/000006.html + (see: http://www.dovecot.org/list/dovecot-news/2006-May/000006.html and CVE-2006-2414) * Set urgency to high: this version fixes a security bug * Standards-Version: 3.7.2, no changes needed. @@ -2523,7 +2732,7 @@ * debian/control: added build-depends on byacc. * debian/rules: removed --with-vpopmail option, because libvpopmail-dev is in contrib and we don't wanto to have dovecot build-depends on it. - * debian/patches/dovecot-example.dpatch: added two small commented + * debian/patches/dovecot-example.dpatch: added two small commented block of configuration for dovecot-lda. -- Fabio Tranchitella Sun, 26 Feb 2006 20:59:06 +0000 @@ -2539,7 +2748,7 @@ * Removed the code for upgrading impad.pem. This might bite if you if you try and upgrade a woody version of dovecot to this one. So don't do that. (Closes: #337715) - * dovecot-imapd,dovecot-pop3d: depend on dovecot-common >= 1.0beta3-1 + * dovecot-imapd,dovecot-pop3d: depend on dovecot-common >= 1.0beta3-1 as the way SSL parameters are generated has changed. (Closes: #353404) -- Jaldhar H. Vyas Fri, 17 Feb 2006 22:06:21 -0500 @@ -2562,7 +2771,7 @@ * Added man page for maildirmake.dovecot, thanks to Henry Precheur. (Closes: #340498) * Use /usr/lib/dovecot/modules as basedir for dynamic modules. - Upstream suggests /usr/lib/dovecot, but we already use it as + Upstream suggests /usr/lib/dovecot, but we already use it as libexec directory. -- Fabio Tranchitella Wed, 21 Dec 2005 13:44:38 +0000 @@ -2590,7 +2799,7 @@ the --ingroup option to adduser to add dovecot to group mail isn't used anymore. (Closes: #330960, #331106) - * commented out userdb passdb from default configuration. Most + * commented out userdb passdb from default configuration. Most people won't need that. (Closes: #330978) -- Jaldhar H. Vyas Thu, 6 Oct 2005 14:25:33 -0400 @@ -2617,7 +2826,7 @@ + debian/patches/documentation.dpatch: some cosmetic fixes about mysql backend. * Jaldhar H. Vyas - + debian/control: tighten dovecot-imapd and dovecot-pop3d's dependency on + + debian/control: tighten dovecot-imapd and dovecot-pop3d's dependency on dovecot-common (Closes: #319465) + debian/patches/dovecot-example.dpatch: some more fixes to default configuration. (Closes: #319413, #319941) @@ -2664,8 +2873,8 @@ * dovecot-common: typo in postinst resulted in incorrect generation of keys for first-time installers. Hence urgency high. - * dovecot-common: In init script, make extra check to make sure an - IMAP or POP3 server called from inetd is dovecot and not some other + * dovecot-common: In init script, make extra check to make sure an + IMAP or POP3 server called from inetd is dovecot and not some other random inferior product. (Closes: #293348) -- Jaldhar H. Vyas Sat, 5 Feb 2005 13:56:31 -0500 @@ -2695,10 +2904,10 @@ dovecot (0.99.13-2) unstable; urgency=low - * dovecot-imapd, dovecot-pop3d: It occurred to me that the effects of - fixing #288391 will cause confusion in the minds of new installers so I - should add a warning in README.Debian and NEWS.Debian in a vain - effort to stave off swarms of bug reports. (Vain, because no one + * dovecot-imapd, dovecot-pop3d: It occurred to me that the effects of + fixing #288391 will cause confusion in the minds of new installers so I + should add a warning in README.Debian and NEWS.Debian in a vain + effort to stave off swarms of bug reports. (Vain, because no one actually reads documentation anyway.) -- Jaldhar H. Vyas Sat, 8 Jan 2005 11:29:59 -0500 @@ -2730,7 +2939,7 @@ dovecot (0.99.11-3) unstable; urgency=medium - * applied dovecot-large-header-fix patch to prevent 100% CPU + * applied dovecot-large-header-fix patch to prevent 100% CPU utilization when dealing with really large headers. (Closes: #271458) @@ -2789,7 +2998,7 @@ dovecot (0.99.10.6-2) unstable; urgency=high - * I needed to enable one more parameter in the configuration in order + * I needed to enable one more parameter in the configuration in order to get dot-locking working. Hence this should still be high urgency. (Really Closes: #185335) @@ -2808,7 +3017,7 @@ dovecot (0.99.10.5-4) unstable; urgency=high - * Crap, typo in dovecot-common.postinst sorry. This should only + * Crap, typo in dovecot-common.postinst sorry. This should only affect new installs though. -- Jaldhar H. Vyas Fri, 11 Jun 2004 22:30:41 -0400 @@ -2854,7 +3063,7 @@ dovecot (0.99.10.4-3) unstable; urgency=high - * dovecot-common: Fix postinst to no longer delete /etc/pam.d/imap + * dovecot-common: Fix postinst to no longer delete /etc/pam.d/imap (Closes: #232832) -- Jaldhar H. Vyas Mon, 15 Mar 2004 10:27:52 -0500 @@ -2872,7 +3081,7 @@ + This fixes the curruption of .subscriptions files wth folders in maildir format. (Closes: #222272) * Some extra information included in dovecot-common.README.Debian. - (Closes: #221106) There should probaly be more so if you have ideas + (Closes: #221106) There should probaly be more so if you have ideas let me know. -- Jaldhar H. Vyas Mon, 1 Dec 2003 23:41:00 -0500 @@ -2891,7 +3100,7 @@ dovecot (0.99.10-10) unstable; urgency=low - * maildirmake.dovecot will now let you create maildirs whose names + * maildirmake.dovecot will now let you create maildirs whose names have spaces in them and chown them to a specified user. Thanks Paul Slootman (Closes: #219168) @@ -2926,15 +3135,15 @@ dovecot (0.99.10-5) unstable; urgency=high - * dovecot-pop3d, dovecot-imapd: make sure init script doesn't - attempt to start the daemons if unconfigured thus preventing + * dovecot-pop3d, dovecot-imapd: make sure init script doesn't + attempt to start the daemons if unconfigured thus preventing segfault on startup. (Closes: #206992, #207140) -- Jaldhar H. Vyas Mon, 25 Aug 2003 16:40:53 -0400 dovecot (0.99.10-4) unstable; urgency=low - * Updated PAM configuration to the new scheme and added appropriate + * Updated PAM configuration to the new scheme and added appropriate dependency. -- Jaldhar H. Vyas Fri, 22 Aug 2003 12:54:54 -0400 @@ -2942,8 +3151,8 @@ dovecot (0.99.10-3) unstable; urgency=low * dovecot-pop3d: Patch for proper PAM service name. - * dovecot-imapd, dovecot-pop3d: Make sure there is an appropriate - entry in the protocol = line in /etc/dovecot.conf so the service + * dovecot-imapd, dovecot-pop3d: Make sure there is an appropriate + entry in the protocol = line in /etc/dovecot.conf so the service will start up without errors. (Closes: #204213) -- Jaldhar H. Vyas Thu, 21 Aug 2003 13:47:00 -0400 @@ -2967,8 +3176,8 @@ dovecot (0.99.10-1) unstable; urgency=low * New upstream release. - * PAM service name has changed to dovecot (for IMAP and POP3.) I've included - code to move /etc/pam.d/imap to /etc/pam.d/dovecot but if things suddenly + * PAM service name has changed to dovecot (for IMAP and POP3.) I've included + code to move /etc/pam.d/imap to /etc/pam.d/dovecot but if things suddenly stop working, this is the first thing to check. -- Jaldhar H. Vyas Thu, 26 Jun 2003 22:31:07 -0400 @@ -2977,7 +3186,7 @@ * New upstream release. Fixes broken imaps support. * Typo in configure options that broke LDAP support on woody corrected. - * Only start /usr/sbin/dovecot if either the IMAP or POP3 servers are + * Only start /usr/sbin/dovecot if either the IMAP or POP3 servers are installed. (Closes: #192066) -- Jaldhar H. Vyas Mon, 23 Jun 2003 23:26:04 -0400 @@ -2993,7 +3202,7 @@ * New upstream release. * The IMAP and POP3 servers have been split into seperate package so you don't have to install both. There is also a dovecot-common package - for the parts they share. The dovecot package is now a dummy just for + for the parts they share. The dovecot package is now a dummy just for transitioning to this new scheme. (Closes: #187826) * Allow chmod in maildirmake.dovecot to fail gracefully (Closes: #191244) @@ -3029,7 +3238,7 @@ * Make a seperate check for /etc/ssl/private/imapd.pem in case we don't have it. (Closes: #185334) - * Move check for dovecot user and creation code to postinsts' configure + * Move check for dovecot user and creation code to postinsts' configure phase. (Closes: #185333) -- Jaldhar H. Vyas Wed, 19 Mar 2003 01:50:10 -0500 @@ -3057,8 +3266,8 @@ dovecot (0.99.7-2) unstable; urgency=low - * Added two upstream patches to fix broken plain authentication and - building with vpopmail support (which is not enabled in the Debian + * Added two upstream patches to fix broken plain authentication and + building with vpopmail support (which is not enabled in the Debian package yet.) -- Jaldhar H. Vyas Fri, 17 Jan 2003 14:24:22 -0500 diff -Nru dovecot-2.2.33.2/debian/compat dovecot-2.3.3/debian/compat --- dovecot-2.2.33.2/debian/compat 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/compat 2019-01-08 14:46:08.000000000 +0000 @@ -1 +1 @@ -10 +9 diff -Nru dovecot-2.2.33.2/debian/control dovecot-2.3.3/debian/control --- dovecot-2.2.33.2/debian/control 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/control 2019-01-08 14:45:37.000000000 +0000 @@ -2,36 +2,41 @@ Section: mail Priority: optional Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Dovecot Maintainers +XSBC-Original-Maintainer: Dovecot Maintainers Uploaders: Jaldhar H. Vyas , Jelmer Vernooij , Apollon Oikonomopoulos -Build-Depends: debhelper (>= 10), +Build-Depends: debhelper (>= 9~), default-libmysqlclient-dev, dh-exec, dpkg-dev (>= 1.16.1), krb5-multidev, + libapparmor-dev, libbz2-dev, - libcurl4-gnutls-dev, + libclucene-dev (>= 2.3), libdb-dev, + libicu-dev, libexpat-dev, libexttextcat-dev, libldap2-dev, liblz4-dev, liblzma-dev, + liblua5.3-dev, libpam0g-dev, libpq-dev, libsasl2-dev, + libsodium-dev, libsqlite3-dev, libssl-dev, + libstemmer-dev, libwrap0-dev, lsb-release, pkg-config, zlib1g-dev -Standards-Version: 4.1.1 +Standards-Version: 4.2.1 Homepage: http://dovecot.org/ -Vcs-Git: https://anonscm.debian.org/git/collab-maint/dovecot.git -Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/dovecot.git +Vcs-Git: https://salsa.debian.org/debian/dovecot.git +Vcs-Browser: https://salsa.debian.org/debian/dovecot Package: dovecot-core Architecture: any @@ -47,6 +52,7 @@ dovecot-imapd, dovecot-ldap, dovecot-lmtpd, + dovecot-lucene, dovecot-managesieved, dovecot-mysql, dovecot-pgsql, @@ -54,12 +60,11 @@ dovecot-sieve, dovecot-solr, dovecot-sqlite, + dovecot-submissiond, ntp Provides: dovecot-abi-${dovecot:ABI-Version}, dovecot-common -Replaces: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4), - dovecot-lucene (<<1:2.2.24~) -Breaks: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4), - dovecot-lucene (<<1:2.2.24~) +Replaces: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4) +Breaks: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4) Description: secure POP3/IMAP server - core files Dovecot is a mail server whose major goals are security and extreme reliability. It tries very hard to handle all error conditions and verify @@ -247,18 +252,59 @@ . This package provides Solr full text search support for Dovecot. -Package: mail-stack-delivery -Architecture: all -Pre-Depends: dovecot-core (>= ${source:Version}) -Depends: dovecot-imapd, dovecot-pop3d, dovecot-managesieved, - postfix, ${misc:Depends} -Replaces: dovecot-postfix (<< 1:1.2.12-0ubuntu1~) -Description: mail server delivery agent stack provided by Ubuntu server team - Ubuntu's mail stack provides fully operational delivery with - safe defaults and additional options. Out of the box it supports IMAP, - POP3 and SMTP services with SASL authentication and Maildir as default - storage engine. +Package: dovecot-lucene +Architecture: any +Depends: dovecot-core (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} +Description: secure POP3/IMAP server - Lucene support + Dovecot is a mail server whose major goals are security and extreme + reliability. It tries very hard to handle all error conditions and verify + that all data is valid, making it nearly impossible to crash. It supports + mbox/Maildir and its own dbox/mdbox formats, and should also be pretty + fast, extensible, and portable. . - This package contains configuration files for dovecot. + This package provides Lucene full text search support for Dovecot. + +Package: dovecot-submissiond +Architecture: any +Depends: dovecot-core (= ${binary:Version}), + ucf (>= 2.0020), + ${misc:Depends}, + ${shlibs:Depends} +Breaks: dovecot-submission (<< 1:2.3.1-2~) +Replaces: dovecot-submission (<< 1:2.3.1-2~) +Description: secure POP3/IMAP server - mail submission agent + Dovecot is a mail server whose major goals are security and extreme + reliability. It tries very hard to handle all error conditions and verify + that all data is valid, making it nearly impossible to crash. It supports + mbox/Maildir and its own dbox/mdbox formats, and should also be pretty + fast, extensible, and portable. . - This package modifies postfix's configuration to integrate with dovecot + This package contains the Dovecot Mail Submission Agent which implements a + basic SMTP submission service with BURL support. + +Package: dovecot-auth-lua +Architecture: any +Depends: dovecot-core (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Description: secure POP3/IMAP server - Lua authentication plugin + Dovecot is a mail server whose major goals are security and extreme + reliability. It tries very hard to handle all error conditions and verify + that all data is valid, making it nearly impossible to crash. It supports + mbox/Maildir and its own dbox/mdbox formats, and should also be pretty + fast, extensible, and portable. + . + This package contains an authentication plugin allowing password and user + databases to be implemented in Lua. + +Package: mail-stack-delivery +Depends: dovecot-core, ${misc:Depends} +Architecture: all +Priority: optional +Section: oldlibs +Description: transitional package + This is a transitional package. It can safely be removed. + . + If you had formerly set up dovecot via mail-stack-delivery this package will + still have the configuration /etc/dovecot/conf.d/99-mail-stack-delivery.conf + associated to it which will be removed if you purge the package. diff -Nru dovecot-2.2.33.2/debian/copyright dovecot-2.3.3/debian/copyright --- dovecot-2.2.33.2/debian/copyright 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/copyright 2018-11-15 10:58:22.000000000 +0000 @@ -7,13 +7,13 @@ Source: https://github.com/dovecot/core Files: * -Copyright: (c) 2001-2017 Dovecot authors +Copyright: (c) 2001-2018 Dovecot authors Comment: see AUTHORS License: LGPL-2.1 Files: src/lib/* src/lib-sql/* -Copyright: (c) 2001-2017 Dovecot authors +Copyright: (c) 2001-2018 Dovecot authors Comment: see AUTHORS License: MIT @@ -108,12 +108,12 @@ (c) 2009-2012 Marco Nenciarini (c) 2011-2013 Micah Anderson (c) 2014-2015 Jelmer Vernooij - (c) 2016-2017 Apollon Oikonomopoulos + (c) 2016-2018 Apollon Oikonomopoulos License: GPL-2+ -Files: debian/patches/pigeonhole.patch -Copyright: (c) 2002-2017 Stephan Bosch - (c) 2002-2016 Dovecot authors +Files: pigeonhole/* +Copyright: (c) 2002-2018 Stephan Bosch + (c) 2002-2018 Dovecot authors Comment: Source obtained from https://pigeonhole.dovecot.org/ License: LGPL-2.1 diff -Nru dovecot-2.2.33.2/debian/dh.pem dovecot-2.3.3/debian/dh.pem --- dovecot-2.2.33.2/debian/dh.pem 1970-01-01 00:00:00.000000000 +0000 +++ dovecot-2.3.3/debian/dh.pem 2018-11-15 10:58:22.000000000 +0000 @@ -0,0 +1,13 @@ +-----BEGIN DH PARAMETERS----- +MIICCAKCAgEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb +IlFKCHmONATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjft +awv/XLb0Brft7jhr+1qJn6WunyQRfEsf5kkoZlHs5Fs9wgB8uKFjvwWY2kg2HFXT +mmkWP6j9JM9fg2VdI9yjrZYcYvNWIIVSu57VKQdwlpZtZww1Tkq8mATxdGwIyhgh +fDKQXkYuNs474553LBgOhgObJ4Oi7Aeij7XFXfBvTFLJ3ivL9pVYFxg5lUl86pVq +5RXSJhiY+gUQFXKOWoqqxC2tMxcNBFB6M6hVIavfHLpk7PuFBFjb7wqK6nFXXQYM +fbOXD4Wm4eTHq/WujNsJM9cejJTgSiVhnc7j0iYa0u5r8S/6BtmKCGTYdgJzPshq +ZFIfKxgXeyAMu+EXV3phXWx3CYjAutlG4gjiT6B05asxQ9tb/OD9EI5LgtEgqSEI +ARpyPBKnh+bXiHGaEL26WyaZwycYavTiPBqUaDS2FQvaJYPpyirUTOjbu8LbBN6O ++S6O/BQfvsqmKHxZR05rwF2ZspZPoJDDoiM7oYZRW+ftH2EpcM7i16+4G912IXBI +HNAGkSfVsFqpk7TqmI2P3cGG/7fckKbAj030Nck0BjGZ//////////8CAQI= +-----END DH PARAMETERS----- diff -Nru dovecot-2.2.33.2/debian/dovecot-core.dirs dovecot-2.3.3/debian/dovecot-core.dirs --- dovecot-2.2.33.2/debian/dovecot-core.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-core.dirs 2018-11-15 10:58:22.000000000 +0000 @@ -1,5 +1,4 @@ etc/dovecot/conf.d etc/dovecot/private -usr/sbin usr/share/dovecot/protocols.d var/lib/dovecot diff -Nru dovecot-2.2.33.2/debian/dovecot-core.dovecot.default dovecot-2.3.3/debian/dovecot-core.dovecot.default --- dovecot-2.2.33.2/debian/dovecot-core.dovecot.default 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-core.dovecot.default 2018-11-15 10:58:22.000000000 +0000 @@ -1,7 +1,4 @@ # /etc/default/dovecot -# Set to '0' to explicitly disable starting Dovecot -#ENABLED=0 - # Set to '1' to allow Dovecot daemons to produce core dumps #ALLOW_COREDUMPS=1 diff -Nru dovecot-2.2.33.2/debian/dovecot-core.install dovecot-2.3.3/debian/dovecot-core.install --- dovecot-2.2.33.2/debian/dovecot-core.install 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-core.install 2018-11-15 10:58:22.000000000 +0000 @@ -2,4 +2,5 @@ doc/example-config/*.conf* usr/share/dovecot doc/example-config/conf.d/*.conf* usr/share/dovecot/conf.d debian/maildirmake.dovecot usr/bin +debian/dh.pem usr/share/dovecot debian/openssl.cnf => usr/share/dovecot/dovecot-openssl.cnf diff -Nru dovecot-2.2.33.2/debian/dovecot-core.maintscript dovecot-2.3.3/debian/dovecot-core.maintscript --- dovecot-2.2.33.2/debian/dovecot-core.maintscript 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-core.maintscript 2018-11-15 10:58:22.000000000 +0000 @@ -1,2 +1 @@ rm_conffile /etc/dovecot/README 1:2.2.27-3~ -rm_conffile /etc/init/dovecot.conf 1:2.2.22-1ubuntu4 diff -Nru dovecot-2.2.33.2/debian/dovecot-core.NEWS dovecot-2.3.3/debian/dovecot-core.NEWS --- dovecot-2.2.33.2/debian/dovecot-core.NEWS 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-core.NEWS 2018-11-15 10:58:22.000000000 +0000 @@ -1,3 +1,19 @@ +dovecot (1:2.3.2-1) unstable; urgency=medium + + Upgrading to the 2.3 series may require manual configuration changes. + Some settings have been removed, while others have had their defaults + changed. Please see + + /usr/share/doc/dovecot-core/wiki/Upgrading.2.3.txt.gz + + or the online version at + + https://wiki2.dovecot.org/Upgrading/2.3 + + for more information and review your configuration accordingly. + + -- Apollon Oikonomopoulos Sat, 24 Mar 2018 00:34:07 +0200 + dovecot (1:2.2.31-1) unstable; urgency=medium TLS is now enabled by default, using the ssl-cert-snakeoil certificate diff -Nru dovecot-2.2.33.2/debian/dovecot-dev.dirs dovecot-2.3.3/debian/dovecot-dev.dirs --- dovecot-2.2.33.2/debian/dovecot-dev.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-dev.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -usr/include -usr/lib/dovecot -usr/share/dovecot -usr/share/aclocal diff -Nru dovecot-2.2.33.2/debian/dovecot-gssapi.dirs dovecot-2.3.3/debian/dovecot-gssapi.dirs --- dovecot-2.2.33.2/debian/dovecot-gssapi.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-gssapi.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/dovecot/modules/auth diff -Nru dovecot-2.2.33.2/debian/dovecot-imapd.dirs dovecot-2.3.3/debian/dovecot-imapd.dirs --- dovecot-2.2.33.2/debian/dovecot-imapd.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-imapd.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -usr/lib/dovecot -usr/lib/dovecot/modules -usr/share/dovecot/conf.d -etc/ufw/applications.d diff -Nru dovecot-2.2.33.2/debian/dovecot-ldap.dirs dovecot-2.3.3/debian/dovecot-ldap.dirs --- dovecot-2.2.33.2/debian/dovecot-ldap.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-ldap.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/lib/dovecot/modules/auth -usr/lib/dovecot/modules/dict -usr/share/dovecot/conf.d diff -Nru dovecot-2.2.33.2/debian/dovecot-lmtpd.dirs dovecot-2.3.3/debian/dovecot-lmtpd.dirs --- dovecot-2.2.33.2/debian/dovecot-lmtpd.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-lmtpd.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/lib/dovecot -usr/share/dovecot/conf.d diff -Nru dovecot-2.2.33.2/debian/dovecot-lucene.dirs dovecot-2.3.3/debian/dovecot-lucene.dirs --- dovecot-2.2.33.2/debian/dovecot-lucene.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-lucene.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/dovecot/modules diff -Nru dovecot-2.2.33.2/debian/dovecot-managesieved.dirs dovecot-2.3.3/debian/dovecot-managesieved.dirs --- dovecot-2.2.33.2/debian/dovecot-managesieved.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-managesieved.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/lib/dovecot -usr/lib/dovecot/modules/settings -usr/share/dovecot/conf.d diff -Nru dovecot-2.2.33.2/debian/dovecot-mysql.dirs dovecot-2.3.3/debian/dovecot-mysql.dirs --- dovecot-2.2.33.2/debian/dovecot-mysql.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-mysql.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/lib/dovecot/modules/auth -usr/lib/dovecot/modules/dict - diff -Nru dovecot-2.2.33.2/debian/dovecot-pgsql.dirs dovecot-2.3.3/debian/dovecot-pgsql.dirs --- dovecot-2.2.33.2/debian/dovecot-pgsql.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-pgsql.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/lib/dovecot/modules/auth -usr/lib/dovecot/modules/dict - diff -Nru dovecot-2.2.33.2/debian/dovecot-pop3d.dirs dovecot-2.3.3/debian/dovecot-pop3d.dirs --- dovecot-2.2.33.2/debian/dovecot-pop3d.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-pop3d.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/lib/dovecot -usr/share/dovecot/conf.d -etc/ufw/applications.d diff -Nru dovecot-2.2.33.2/debian/dovecot-sieve.dirs dovecot-2.3.3/debian/dovecot-sieve.dirs --- dovecot-2.2.33.2/debian/dovecot-sieve.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-sieve.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -usr/bin -usr/lib/dovecot/modules -usr/lib/dovecot/modules/doveadm -usr/share/dovecot/conf.d -usr/share/man/man1 - - diff -Nru dovecot-2.2.33.2/debian/dovecot-solr.dirs dovecot-2.3.3/debian/dovecot-solr.dirs --- dovecot-2.2.33.2/debian/dovecot-solr.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-solr.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/lib/dovecot/modules -usr/share/dovecot diff -Nru dovecot-2.2.33.2/debian/dovecot-sqlite.dirs dovecot-2.3.3/debian/dovecot-sqlite.dirs --- dovecot-2.2.33.2/debian/dovecot-sqlite.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-sqlite.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/lib/dovecot/modules/auth -usr/lib/dovecot/modules/dict - diff -Nru dovecot-2.2.33.2/debian/dovecot-submissiond.postinst dovecot-2.3.3/debian/dovecot-submissiond.postinst --- dovecot-2.2.33.2/debian/dovecot-submissiond.postinst 1970-01-01 00:00:00.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-submissiond.postinst 2018-11-15 10:58:22.000000000 +0000 @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ]; then + CONFFILES="conf.d/20-submission.conf" + + for conffile in $CONFFILES ; do + # Tell ucf that the file in /usr/share/dovecot is the latest + # maintainer version, and let it handle how to manage the real + # configuration file in /etc/dovecot. + ucf --three-way /usr/share/dovecot/$conffile /etc/dovecot/$conffile + # Use --force to allow hijacking the file from dovecot-submission + ucfr --force dovecot-submissiond /etc/dovecot/$conffile + done + + if [ -f /usr/share/dovecot/protocols.d/submission.protocol ]; then + rm -f /usr/share/dovecot/protocols.d/submission.protocol + fi + echo 'protocols = $protocols submission' > /usr/share/dovecot/protocols.d/submissiond.protocol +fi + +#DEBHELPER# diff -Nru dovecot-2.2.33.2/debian/dovecot-submissiond.postrm dovecot-2.3.3/debian/dovecot-submissiond.postrm --- dovecot-2.2.33.2/debian/dovecot-submissiond.postrm 1970-01-01 00:00:00.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-submissiond.postrm 2018-11-15 10:58:22.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +if [ "$1" = "purge" ] ; then + for conffile in `ucfq --with-colons dovecot-submissiond | cut -d: -f1`; do + # we mimic dpkg as closely as possible, so we remove configuration + # files with dpkg backup extensions too: + ### Some of the following is from Tore Anderson: + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-new .ucf-old .ucf-dist; do + rm -f $conffile$ext + done + # remove the configuration file itself + rm -f $conffile + # and finally clear it out from the ucf database + if which ucf >/dev/null; then + ucf --purge $conffile + fi + if which ucfr >/dev/null; then + ucfr --purge dovecot-submissiond $conffile + fi + done + +fi + +if [ "$1" = "purge" ] || [ "$1" = "remove" ]; then + rm -f /usr/share/dovecot/protocols.d/submissiond.protocol +fi + +#DEBHELPER# diff -Nru dovecot-2.2.33.2/debian/dovecot-submissiond.prerm dovecot-2.3.3/debian/dovecot-submissiond.prerm --- dovecot-2.2.33.2/debian/dovecot-submissiond.prerm 1970-01-01 00:00:00.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-submissiond.prerm 2018-11-15 10:58:22.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ -d /run/systemd/system ]; then + deb-systemd-invoke stop dovecot.socket || true +fi + +if [ -x "/etc/init.d/dovecot" ]; then + invoke-rc.d dovecot stop +fi + +#DEBHELPER# diff -Nru dovecot-2.2.33.2/debian/dovecot-submissiond.triggers dovecot-2.3.3/debian/dovecot-submissiond.triggers --- dovecot-2.2.33.2/debian/dovecot-submissiond.triggers 1970-01-01 00:00:00.000000000 +0000 +++ dovecot-2.3.3/debian/dovecot-submissiond.triggers 2018-11-15 10:58:22.000000000 +0000 @@ -0,0 +1 @@ +activate-noawait register-dovecot-plugin diff -Nru dovecot-2.2.33.2/debian/gbp.conf dovecot-2.3.3/debian/gbp.conf --- dovecot-2.2.33.2/debian/gbp.conf 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/gbp.conf 2018-11-15 10:58:22.000000000 +0000 @@ -15,3 +15,6 @@ [pq] patch-numbers = False + +[import-orig] +merge-mode = merge diff -Nru dovecot-2.2.33.2/debian/mail-stack-delivery.dirs dovecot-2.3.3/debian/mail-stack-delivery.dirs --- dovecot-2.2.33.2/debian/mail-stack-delivery.dirs 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/mail-stack-delivery.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -var/backups -var/backups/mail-stack-delivery diff -Nru dovecot-2.2.33.2/debian/mail-stack-delivery.postinst dovecot-2.3.3/debian/mail-stack-delivery.postinst --- dovecot-2.2.33.2/debian/mail-stack-delivery.postinst 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/mail-stack-delivery.postinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ -#!/bin/sh - -set -e - -POSTFIX_BCKFILE="/var/backups/mail-stack-delivery/main.cf-backup" - -set_postfix_option() { - opt="$1" - # Backup the existion value of the option - postconf $(echo ${opt} | cut -d= -f1) >> ${POSTFIX_BCKFILE} || true - # Set the new value of the option - postconf -e "${opt}" - echo -n '.' -} - -backup() { - file="${1}" - if [ -e "${file}" ]; then - backup=$(mktemp "${file}.backup.XXXXX") - echo "Backing up old ${file} to ${backup}" - mv "${file}" "${backup}" - fi -} - -if [ "$1" = "configure" ]; then - # Note: ssl upgrade handling can be dropped after 18.04 as snakeoil - # support is in Debian now - # - this section formerly set up the symlinks to snakeoil (now dovecot-core) - # - /etc/dovecot/conf.d/10-ssl.conf is managed by ucf in dovecot-core since - # this version - # - due to depends this will run AFTER the configure of dovecot-core - # - This is special since Debian took different (better) config paths - # - Keys are now set up by dovecot-core, but we need to care about old - # configs done by mail-stack-delivery to "transfer" as smooth as possible. - # The old config by mail-stack-delivery was: keys prepared (different - # paths), but not enabled in /etc/dovecot/conf.d/10-ssl.conf - # - # First part: SSL upgrade handling mail-stack-delivery -> dovecot-core - # We have the following cases on upgrade: - # A - If a user opted to take the new config - # A1 - formerly used the default config, then ssl was prepared but not - # enabled. So in this case just create the same default as a "new - # install" would now (default -> default without collisions). - # A2 - formerly used a custom config but now chose maintainers version. - # This throws away custom ssl config intentionally - set it up as - # on a new install as well in that case. - # So A1 == A2 and would be the default, but if mail-stack-delivery was - # installed the existance of /etc/dovecot/private/dovecot.pem has - # blocked the creation of the new keys in dovecot-core. - # B - If a user kept a custom config, then we keep all files as-is to - # continue to work as it was before and not set up any "new" ssl things. - # A/B can be fully decided AFTER dovecot-core installed (via query to ucf) - # Since mail-stack-delivery depends on dovecot-core it will be configured - # after it. - # - # Second part: SSL upgrade handling mail-stack-delivery -> dovecot-core - # If a user opted to "keep" an old custom 10-ssl.conf he won't get the - # enablement via that. - # Therefore if 99-mail-stack-delivery.conf matched the old logged md5sum - # it was auto-upgraded, but in this special case we want to keep it. - # - # - le-nl considers empty versions (new install) as greater, so no match - # in that case (as intended) - if [ -n "$2" ] && dpkg --compare-versions -- "$2" le-nl "1:2.2.33.2-1ubuntu1~"; then - msdconf="/etc/dovecot/conf.d/99-mail-stack-delivery.conf" - sslconf="/etc/dovecot/conf.d/10-ssl.conf" - customconf=$(ucfq --with-colons "${sslconf}" | cut -d':' -f 4) - if [ ! "x${customconf}" = "xYes" ]; then - # Default config is in use, set up keys - newcert="/etc/dovecot/private/dovecot.pem" - oldcert="/etc/dovecot/dovecot.pem" - newkey="/etc/dovecot/private/dovecot.key" - oldkey="/etc/dovecot/private/dovecot.pem" - # Remove old mail-stack-delivery SSL artifacts - # (Never really remove, as it could be complex or expensive to restore) - echo "The system is using the new Dovecot Key/Cert paths," - echo "update Key/Cert formerly set up by mail-stack-delivery to match." - backup "/etc/dovecot/dovecot.pem" - backup "/etc/dovecot/private/dovecot.pem" - # Backup potential other artifact on the key path - backup "/etc/dovecot/private/dovecot.key" - # Add debian-core style snakeoil links - ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem "${newcert}" - ln -s /etc/ssl/private/ssl-cert-snakeoil.key "${newkey}" - # Once here the user chose to take the new defaults, so we "moved" the - # formerly used cert paths in dovecot (above), in this case we also need - # to modify the postfix conf to follow as well. - if [ -f "/etc/postfix/main.cf" ]; then # postfix conf exists - if [ -f "$POSTFIX_BCKFILE" ]; then # this is a "normal" case modified by mail-stack-delivery - curcert=$(postconf smtpd_tls_cert_file | cut -d= -f2 | tr -d ' ') - curkey=$(postconf smtpd_tls_key_file | cut -d= -f2 | tr -d ' ') - if [ "${curcert}" = "${oldcert}" -a "${curkey}" = "${oldkey}" ]; then - # Config is still on the defaults that mail-stack-delivery set up - echo "Postfix conf still on mail-stack-delivery defaults, auto-following dovecot changes" - set_postfix_option "smtpd_tls_cert_file = ${newcert}" - set_postfix_option "smtpd_tls_key_file = ${newkey}" - else - echo "Dovecot/Mail-Stack-Delivery now use the new default key paths" - echo "key: ${newkey}" - echo "cert: ${newcert}" - echo "But the local postfix configuration was modified," - echo "thereby postfix will not be updated automatically." - echo "Current postfix-key: ${curkey}" - echo "Current postfix-cert: ${curcert}" - echo "Please update manually to match your required configuration" - fi - fi - fi - else - # Kept custom config, so we want to ensure we don't auto-upgrade - # 99-mail-stack-delivery.conf to the ssl disabled version that relies on - # 10-ssl.conf to do so. - if [ -e "${msdconf}.olddefault" ]; then - echo "Custom ${sslconf}, so retain former ${msdconf}" - mv "${msdconf}" "${msdconf}.newdefault" - backup "${msdconf}.newdefault" - mv "${msdconf}.olddefault" "${msdconf}" - fi - fi - # remove unconditionally after upgrade handling, keep backup for fallback - backup "${msdconf}.olddefault" - fi - - # Configure postfix either on new install - # or if the postfix backup file is no longer there - # (only deleted when the pkg is removed) - if [ -f "/etc/postfix/main.cf" ]; then - if [ -e "$POSTFIX_BCKFILE" ]; then - cp "$POSTFIX_BCKFILE" "${POSTFIX_BCKFILE}-$(date +%Y%m%d%H%M)" - fi - if [ -z "$2" -o ! -e "$POSTFIX_BCKFILE" ]; then - if which postconf >/dev/null; then - # Setup postfix - SSL_CERT=$( (grep -m 1 "^ssl_cert" /etc/dovecot/conf.d/10-ssl.conf || echo '/etc/ssl/certs/dovecot.pem') | cut -d'=' -f2 | tr -d '< ') - SSL_KEY=$( (grep -m 1 "^ssl_key" /etc/dovecot/conf.d/10-ssl.conf || echo '/etc/ssl/private/dovecot.pem') | cut -d'=' -f2 | tr -d '< ') - echo 'Mail stack delivery changes some postfix settings.' - echo 'Old values are stored in '$POSTFIX_BCKFILE'.' - echo 'Feel free to revert any of them when the process is done.' - echo 'Configuring postfix for mail-stack-delivery integration: ' - set_postfix_option "home_mailbox = Maildir/" - set_postfix_option "smtpd_sasl_auth_enable = yes" - set_postfix_option "smtpd_sasl_type = dovecot" - set_postfix_option "smtpd_sasl_path = private/dovecot-auth" - set_postfix_option "smtpd_sasl_authenticated_header = yes" - set_postfix_option "smtpd_sasl_security_options = noanonymous" - set_postfix_option "smtpd_sasl_local_domain = \$myhostname" - set_postfix_option "broken_sasl_auth_clients = yes" - set_postfix_option "smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination" - set_postfix_option "smtpd_sender_restrictions = reject_unknown_sender_domain" - set_postfix_option "mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -m \"\${EXTENSION}\"" - set_postfix_option "smtpd_tls_cert_file = ${SSL_CERT}" - set_postfix_option "smtpd_tls_key_file = ${SSL_KEY}" - set_postfix_option "smtpd_use_tls = yes" - set_postfix_option "smtp_use_tls = yes" - set_postfix_option "smtpd_tls_received_header = yes" - set_postfix_option "smtpd_tls_auth_only = yes" - set_postfix_option "tls_random_source = dev:/dev/urandom" - echo ' done.' - fi - fi - else - echo "" - echo "Postfix not configured. Run" - echo "sudo dpkg-reconfigure postfix and choose" - echo "the type of mail server. Then run" - echo "sudo dpkg-reconfigure mail-stack-delivery to" - echo "finish mail-stack-delivery installation." - echo "" - fi - - if [ -x "/etc/init.d/dovecot" ]; then - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d dovecot restart - else - service dovecot restart - fi - fi - if [ -x "/etc/init.d/postfix" ]; then - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d postfix restart - else - service postfix restart - fi - fi - -fi - -#DEBHELPER# diff -Nru dovecot-2.2.33.2/debian/mail-stack-delivery.postrm dovecot-2.3.3/debian/mail-stack-delivery.postrm --- dovecot-2.2.33.2/debian/mail-stack-delivery.postrm 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/mail-stack-delivery.postrm 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -#!/bin/sh -set -e - -POSTFIX_BCKFILE="/var/backups/mail-stack-delivery/main.cf-backup" - -PATH=/usr/sbin:$PATH -export PATH - -if [ "$1" = "remove" -o "$1" = "purge" ]; then - # Restore postfix configuration - if [ "$1" = "remove" ]; then - if which postconf >/dev/null && [ -f "${POSTFIX_BCKFILE}" ]; then - while read line; do - postconf -e "$line" - done < "${POSTFIX_BCKFILE}" - rm -f "${POSTFIX_BCKFILE}" - fi - fi - if [ -x "/etc/init.d/dovecot" ]; then - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d dovecot restart - else - service dovecot restart - fi - fi - if [ -x "/etc/init.d/postfix" ]; then - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d postfix restart - else - service postfix restart - fi - fi -fi - -#DEBHELPER# diff -Nru dovecot-2.2.33.2/debian/mail-stack-delivery.preinst dovecot-2.3.3/debian/mail-stack-delivery.preinst --- dovecot-2.2.33.2/debian/mail-stack-delivery.preinst 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/mail-stack-delivery.preinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -#!/bin/sh - -set -e - -# Prepare to move a conffile without triggering a dpkg question -prep_mv_conffile() { - PKGNAME="$1" - CONFFILE="$2" - if [ -e "$CONFFILE" ]; then - md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" - old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" - if [ "$md5sum" = "$old_md5sum" ]; then - rm -f "$CONFFILE" - else - if [ -e "$CONFFILE" ]; then - if [ "$CONFFILE" = "/etc/dovecot/conf.d/01-dovecot-postfix.conf" ]; then - mv -f "$CONFFILE" "/etc/dovecot/conf.d/01-mail-stack-delivery.conf" - fi - if [ "$CONFFILE" = "/etc/dovecot/auth.d/01-dovecot-postfix.auth" ]; then - mv -f "$CONFFILE" "/etc/dovecot/auth.d/01-mail-stack-delivery.auth" - fi - fi - fi - fi -} -case "$1" in -install|upgrade) - # Check if mail-stack-delivery.conf had any customizations - if [ -f "/usr/share/dovecot/mail-stack-delivery.conf" ]; then - if [ -f "/etc/dovecot/mail-stack-delivery.conf" ]; then - mv /etc/dovecot/mail-stack-delivery.conf /etc/dovecot/mail-stack-delivery.conf.bak - DIR=`mktemp -d` - egrep -v ^protocol /etc/dovecot/mail-stack-delivery.conf.bak > $DIR/mail-stack-delivery-custom.conf - egrep -v ^protocol /usr/share/dovecot/mail-stack-delivery.conf > $DIR/mail-stack-delivery.conf - if diff -qur $DIR/mail-stack-delivery-dist.conf $DIR/mail-stack-delivery-custom.conf 1>/dev/null 2>&1; then - rm -f /etc/dovecot/mail-stack-delivery.conf.bak - else - awk ' /^auth default/ {flag=1;next} /^}/{flag=0} flag { print }' /etc/dovecot/mail-stack-delivery.conf.bak > /etc/dovecot/auth.d/01-mail-stack-delivery.auth - awk ' /^## Dovecot conf/{flag=1} /^auth default/{flag=0} flag { print }' /etc/dovecot/mail-stack-delivery.conf.bak > /etc/dovecot/conf.d/01-mail-stack-delivery.conf - awk ' /^# If you wish to use another authentication server than dovecot-auth/{flag=1} flag { print }' /etc/dovecot/mail-stack-delivery.conf.bak >> /etc/dovecot/conf.d/01-mail-stack-delivery.conf - fi - rm -rf $DIR - fi - fi - - # If we had the default 99-mail-stack-delivery.conf save it as it is - # potentially needed in postinst for a special case of the ssl transition - # from mail-stack-delivery to dovecot-core - if [ "$1" = "upgrade" ]; then - msdconf="/etc/dovecot/conf.d/99-mail-stack-delivery.conf" - oldsumdpkg=$(dpkg-query -W -f='${Conffiles}' mail-stack-delivery | \ - sed -n -e "\' $msdconf ' { s/ obsolete$//; s/.* //; p }") - oldsumfile=$(md5sum "$msdconf" | cut -d' ' -f 1) - if [ "$oldsumdpkg" = "$oldsumfile" ]; then - # the existance of the unmodified file is the marker for postinst - # to retain it if 10-ssl.conf is not on the new default - cp -f "$msdconf" "$msdconf.olddefault" - fi - fi - ;; - - abort-upgrade) - # remove unconditionally on abort - rm -f /etc/dovecot/conf.d/99-mail-stack-delivery.conf.olddefault - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# diff -Nru dovecot-2.2.33.2/debian/mail-stack-delivery.README.Debian dovecot-2.3.3/debian/mail-stack-delivery.README.Debian --- dovecot-2.2.33.2/debian/mail-stack-delivery.README.Debian 2017-08-16 14:50:29.000000000 +0000 +++ dovecot-2.3.3/debian/mail-stack-delivery.README.Debian 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -Introduction -------------------- - -Mail-stack-delivery will not install any binary or library files. This package -contains only configuration file /etc/dovecot/mail-stack-delivery.conf with -configuration prerpared by Ubuntu Server Team. - -The matching configuration for dovecot is placed in: - /etc/dovecot/conf.d/99-mail-stack-delivery.conf - -During installation of package, it modifies postfix's configuration and -stores original version of /etc/postfix/main.cf in /var/backup/mail-stack-delivery. - -Features of mail-stack-delivery: ----------------------------- - -- IMAP4rev1 and POP3, including support for TLS and SSL -- SMTP, including support for TLS and SSL -- support for sieve scripting -- managesieve for managing sieve scripts directly on server -- dovecot MDA, including extensions separated with '+' -- Maildir storage engine -- SASL authentication (plain and login) -- support only for medium and high TLS/SSL ciphers diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0001-lib-mail-rfc822-parser-Add-asserts-to-make-sure-pars.patch dovecot-2.3.3/debian/patches/CVE-2017-14461/0001-lib-mail-rfc822-parser-Add-asserts-to-make-sure-pars.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0001-lib-mail-rfc822-parser-Add-asserts-to-make-sure-pars.patch 2018-02-26 17:30:38.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-14461/0001-lib-mail-rfc822-parser-Add-asserts-to-make-sure-pars.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -From 30dc856f7b97b75b0e0d69f5003d5d99a13249b4 Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Fri, 22 Dec 2017 18:31:52 +0200 -Subject: [PATCH 1/7] lib-mail: rfc822-parser - Add asserts to make sure parser - state is correct - ---- - src/lib-mail/rfc822-parser.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/lib-mail/rfc822-parser.c b/src/lib-mail/rfc822-parser.c -index 6dd2254..edb07f5 100644 ---- a/src/lib-mail/rfc822-parser.c -+++ b/src/lib-mail/rfc822-parser.c -@@ -211,6 +211,7 @@ int rfc822_parse_quoted_string(struct rfc822_parser_context *ctx, string_t *str) - const unsigned char *start; - size_t len; - -+ i_assert(ctx->data < ctx->end); - i_assert(*ctx->data == '"'); - ctx->data++; - -@@ -313,6 +314,7 @@ rfc822_parse_domain_literal(struct rfc822_parser_context *ctx, string_t *str) - %d94-126 ; characters not including "[", - ; "]", or "\" - */ -+ i_assert(ctx->data < ctx->end); - i_assert(*ctx->data == '['); - - for (start = ctx->data; ctx->data != ctx->end; ctx->data++) { -@@ -338,6 +340,7 @@ int rfc822_parse_domain(struct rfc822_parser_context *ctx, string_t *str) - domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] - obs-domain = atom *("." atom) - */ -+ i_assert(ctx->data < ctx->end); - i_assert(*ctx->data == '@'); - ctx->data++; - --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0002-lib-mail-test-message-address-Add-TEST_MESSAGE_ADDRE.patch dovecot-2.3.3/debian/patches/CVE-2017-14461/0002-lib-mail-test-message-address-Add-TEST_MESSAGE_ADDRE.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0002-lib-mail-test-message-address-Add-TEST_MESSAGE_ADDRE.patch 2018-02-26 17:30:44.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-14461/0002-lib-mail-test-message-address-Add-TEST_MESSAGE_ADDRE.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ -From 8d65e2345e1dbedb00b662ee0abd05be2e7e6b7e Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Fri, 22 Dec 2017 18:36:09 +0200 -Subject: [PATCH 2/7] lib-mail: test-message-address - Add - TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST flag - -This commit just adds the flag and sets it to 0 for all existing tests. ---- - src/lib-mail/test-message-address.c | 100 +++++++++++++++++++----------------- - 1 file changed, 54 insertions(+), 46 deletions(-) - -diff --git a/src/lib-mail/test-message-address.c b/src/lib-mail/test-message-address.c -index de69d96..f6a8766 100644 ---- a/src/lib-mail/test-message-address.c -+++ b/src/lib-mail/test-message-address.c -@@ -5,6 +5,10 @@ - #include "message-address.h" - #include "test-common.h" - -+enum test_message_address { -+ TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST = BIT(0), -+}; -+ - static bool cmp_addr(const struct message_address *a1, - const struct message_address *a2) - { -@@ -38,161 +42,162 @@ static void test_message_address(void) - const char *wanted_filled_output; - struct message_address addr; - struct message_address filled_addr; -+ enum test_message_address flags; - } tests[] = { - /* user@domain -> */ - { "user@domain", "", NULL, - { NULL, NULL, NULL, "user", "domain", FALSE }, -- { NULL, NULL, NULL, "user", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user", "domain", FALSE }, 0 }, - { "\"user\"@domain", "", NULL, - { NULL, NULL, NULL, "user", "domain", FALSE }, -- { NULL, NULL, NULL, "user", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user", "domain", FALSE }, 0 }, - { "\"user name\"@domain", "<\"user name\"@domain>", NULL, - { NULL, NULL, NULL, "user name", "domain", FALSE }, -- { NULL, NULL, NULL, "user name", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user name", "domain", FALSE }, 0 }, - { "\"user@na\\\\me\"@domain", "<\"user@na\\\\me\"@domain>", NULL, - { NULL, NULL, NULL, "user@na\\me", "domain", FALSE }, -- { NULL, NULL, NULL, "user@na\\me", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user@na\\me", "domain", FALSE }, 0 }, - { "\"user\\\"name\"@domain", "<\"user\\\"name\"@domain>", NULL, - { NULL, NULL, NULL, "user\"name", "domain", FALSE }, -- { NULL, NULL, NULL, "user\"name", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user\"name", "domain", FALSE }, 0 }, - { "\"\"@domain", "<\"\"@domain>", NULL, - { NULL, NULL, NULL, "", "domain", FALSE }, -- { NULL, NULL, NULL, "", "domain", FALSE } }, -+ { NULL, NULL, NULL, "", "domain", FALSE }, 0 }, - { "user", "", "", - { NULL, NULL, NULL, "user", "", TRUE }, -- { NULL, NULL, NULL, "user", "MISSING_DOMAIN", TRUE } }, -+ { NULL, NULL, NULL, "user", "MISSING_DOMAIN", TRUE }, 0 }, - { "@domain", "<\"\"@domain>", "", - { NULL, NULL, NULL, "", "domain", TRUE }, -- { NULL, NULL, NULL, "MISSING_MAILBOX", "domain", TRUE } }, -+ { NULL, NULL, NULL, "MISSING_MAILBOX", "domain", TRUE }, 0 }, - - /* Display Name -> Display Name */ - { "Display Name", "\"Display Name\"", "\"Display Name\" ", - { NULL, "Display Name", NULL, "", "", TRUE }, -- { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - { "\"Display Name\"", "\"Display Name\"", "\"Display Name\" ", - { NULL, "Display Name", NULL, "", "", TRUE }, -- { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - { "Display \"Name\"", "\"Display Name\"", "\"Display Name\" ", - { NULL, "Display Name", NULL, "", "", TRUE }, -- { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - { "\"Display\" \"Name\"", "\"Display Name\"", "\"Display Name\" ", - { NULL, "Display Name", NULL, "", "", TRUE }, -- { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "Display Name", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - { "\"\"", "", "", - { NULL, "", NULL, "", "", TRUE }, -- { NULL, "", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "", NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - - /* -> */ - { "", NULL, NULL, - { NULL, NULL, NULL, "user", "domain", FALSE }, -- { NULL, NULL, NULL, "user", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user", "domain", FALSE }, 0 }, - { "<\"user\"@domain>", "", NULL, - { NULL, NULL, NULL, "user", "domain", FALSE }, -- { NULL, NULL, NULL, "user", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user", "domain", FALSE }, 0 }, - { "<\"user name\"@domain>", NULL, NULL, - { NULL, NULL, NULL, "user name", "domain", FALSE }, -- { NULL, NULL, NULL, "user name", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user name", "domain", FALSE }, 0 }, - { "<\"user@na\\\\me\"@domain>", NULL, NULL, - { NULL, NULL, NULL, "user@na\\me", "domain", FALSE }, -- { NULL, NULL, NULL, "user@na\\me", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user@na\\me", "domain", FALSE }, 0 }, - { "<\"user\\\"name\"@domain>", NULL, NULL, - { NULL, NULL, NULL, "user\"name", "domain", FALSE }, -- { NULL, NULL, NULL, "user\"name", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user\"name", "domain", FALSE }, 0 }, - { "<\"\"@domain>", NULL, NULL, - { NULL, NULL, NULL, "", "domain", FALSE }, -- { NULL, NULL, NULL, "", "domain", FALSE } }, -+ { NULL, NULL, NULL, "", "domain", FALSE }, 0 }, - { "", NULL, "", - { NULL, NULL, NULL, "user", "", TRUE }, -- { NULL, NULL, NULL, "user", "MISSING_DOMAIN", TRUE } }, -+ { NULL, NULL, NULL, "user", "MISSING_DOMAIN", TRUE }, 0 }, - { "<@route>", "<@route:\"\">", "", - { NULL, NULL, "@route", "", "", TRUE }, -- { NULL, NULL, "INVALID_ROUTE", "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, NULL, "INVALID_ROUTE", "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - - /* user@domain (Display Name) -> "Display Name" */ - { "user@domain (DisplayName)", "DisplayName ", NULL, - { NULL, "DisplayName", NULL, "user", "domain", FALSE }, -- { NULL, "DisplayName", NULL, "user", "domain", FALSE } }, -+ { NULL, "DisplayName", NULL, "user", "domain", FALSE }, 0 }, - { "user@domain (Display Name)", "\"Display Name\" ", NULL, - { NULL, "Display Name", NULL, "user", "domain", FALSE }, -- { NULL, "Display Name", NULL, "user", "domain", FALSE } }, -+ { NULL, "Display Name", NULL, "user", "domain", FALSE }, 0 }, - { "user@domain (Display\"Name)", "\"Display\\\"Name\" ", NULL, - { NULL, "Display\"Name", NULL, "user", "domain", FALSE }, -- { NULL, "Display\"Name", NULL, "user", "domain", FALSE } }, -+ { NULL, "Display\"Name", NULL, "user", "domain", FALSE }, 0 }, - { "user (Display Name)", "\"Display Name\" ", "\"Display Name\" ", - { NULL, "Display Name", NULL, "user", "", TRUE }, -- { NULL, "Display Name", NULL, "user", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "Display Name", NULL, "user", "MISSING_DOMAIN", TRUE }, 0 }, - { "@domain (Display Name)", "\"Display Name\" <\"\"@domain>", "\"Display Name\" ", - { NULL, "Display Name", NULL, "", "domain", TRUE }, -- { NULL, "Display Name", NULL, "MISSING_MAILBOX", "domain", TRUE } }, -+ { NULL, "Display Name", NULL, "MISSING_MAILBOX", "domain", TRUE }, 0 }, - { "user@domain ()", "", NULL, - { NULL, NULL, NULL, "user", "domain", FALSE }, -- { NULL, NULL, NULL, "user", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user", "domain", FALSE }, 0 }, - - /* Display Name -> "Display Name" */ - { "DisplayName ", NULL, NULL, - { NULL, "DisplayName", NULL, "user", "domain", FALSE }, -- { NULL, "DisplayName", NULL, "user", "domain", FALSE } }, -+ { NULL, "DisplayName", NULL, "user", "domain", FALSE }, 0 }, - { "Display Name ", "\"Display Name\" ", NULL, - { NULL, "Display Name", NULL, "user", "domain", FALSE }, -- { NULL, "Display Name", NULL, "user", "domain", FALSE } }, -+ { NULL, "Display Name", NULL, "user", "domain", FALSE }, 0 }, - { "\"Display Name\" ", NULL, NULL, - { NULL, "Display Name", NULL, "user", "domain", FALSE }, -- { NULL, "Display Name", NULL, "user", "domain", FALSE } }, -+ { NULL, "Display Name", NULL, "user", "domain", FALSE }, 0 }, - { "\"Display\\\"Name\" ", NULL, NULL, - { NULL, "Display\"Name", NULL, "user", "domain", FALSE }, -- { NULL, "Display\"Name", NULL, "user", "domain", FALSE } }, -+ { NULL, "Display\"Name", NULL, "user", "domain", FALSE }, 0 }, - { "Display Name ", "\"Display Name\" ", "\"Display Name\" ", - { NULL, "Display Name", NULL, "user", "", TRUE }, -- { NULL, "Display Name", NULL, "user", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "Display Name", NULL, "user", "MISSING_DOMAIN", TRUE }, 0 }, - { "\"\" ", "", NULL, - { NULL, NULL, NULL, "user", "domain", FALSE }, -- { NULL, NULL, NULL, "user", "domain", FALSE } }, -+ { NULL, NULL, NULL, "user", "domain", FALSE }, 0 }, - - /* <@route:user@domain> -> <@route:user@domain> */ - { "<@route:user@domain>", NULL, NULL, - { NULL, NULL, "@route", "user", "domain", FALSE }, -- { NULL, NULL, "@route", "user", "domain", FALSE } }, -+ { NULL, NULL, "@route", "user", "domain", FALSE }, 0 }, - { "<@route,@route2:user@domain>", NULL, NULL, - { NULL, NULL, "@route,@route2", "user", "domain", FALSE }, -- { NULL, NULL, "@route,@route2", "user", "domain", FALSE } }, -+ { NULL, NULL, "@route,@route2", "user", "domain", FALSE }, 0 }, - { "<@route@route2:user@domain>", "<@route,@route2:user@domain>", NULL, - { NULL, NULL, "@route,@route2", "user", "domain", FALSE }, -- { NULL, NULL, "@route,@route2", "user", "domain", FALSE } }, -+ { NULL, NULL, "@route,@route2", "user", "domain", FALSE }, 0 }, - { "<@route@route2:user>", "<@route,@route2:user>", "<@route,@route2:user@MISSING_DOMAIN>", - { NULL, NULL, "@route,@route2", "user", "", TRUE }, -- { NULL, NULL, "@route,@route2", "user", "MISSING_DOMAIN", TRUE } }, -+ { NULL, NULL, "@route,@route2", "user", "MISSING_DOMAIN", TRUE }, 0 }, - { "<@route@route2:\"\"@domain>", "<@route,@route2:\"\"@domain>", NULL, - { NULL, NULL, "@route,@route2", "", "domain", FALSE }, -- { NULL, NULL, "@route,@route2", "", "domain", FALSE } }, -+ { NULL, NULL, "@route,@route2", "", "domain", FALSE }, 0 }, - - /* Display Name <@route:user@domain> -> - "Display Name" <@route:user@domain> */ - { "Display Name <@route:user@domain>", "\"Display Name\" <@route:user@domain>", NULL, - { NULL, "Display Name", "@route", "user", "domain", FALSE }, -- { NULL, "Display Name", "@route", "user", "domain", FALSE } }, -+ { NULL, "Display Name", "@route", "user", "domain", FALSE }, 0 }, - { "Display Name <@route,@route2:user@domain>", "\"Display Name\" <@route,@route2:user@domain>", NULL, - { NULL, "Display Name", "@route,@route2", "user", "domain", FALSE }, -- { NULL, "Display Name", "@route,@route2", "user", "domain", FALSE } }, -+ { NULL, "Display Name", "@route,@route2", "user", "domain", FALSE }, 0 }, - { "Display Name <@route@route2:user@domain>", "\"Display Name\" <@route,@route2:user@domain>", NULL, - { NULL, "Display Name", "@route,@route2", "user", "domain", FALSE }, -- { NULL, "Display Name", "@route,@route2", "user", "domain", FALSE } }, -+ { NULL, "Display Name", "@route,@route2", "user", "domain", FALSE }, 0 }, - { "Display Name <@route@route2:user>", "\"Display Name\" <@route,@route2:user>", "\"Display Name\" <@route,@route2:user@MISSING_DOMAIN>", - { NULL, "Display Name", "@route,@route2", "user", "", TRUE }, -- { NULL, "Display Name", "@route,@route2", "user", "MISSING_DOMAIN", TRUE } }, -+ { NULL, "Display Name", "@route,@route2", "user", "MISSING_DOMAIN", TRUE }, 0 }, - { "Display Name <@route@route2:\"\"@domain>", "\"Display Name\" <@route,@route2:\"\"@domain>", NULL, - { NULL, "Display Name", "@route,@route2", "", "domain", FALSE }, -- { NULL, "Display Name", "@route,@route2", "", "domain", FALSE } }, -+ { NULL, "Display Name", "@route,@route2", "", "domain", FALSE }, 0 }, - - /* other tests: */ - { "\"foo: ;,\" ", NULL, NULL, - { NULL, "foo: ;,", NULL, "user", "domain", FALSE }, -- { NULL, "foo: ;,", NULL, "user", "domain", FALSE } }, -+ { NULL, "foo: ;,", NULL, "user", "domain", FALSE }, 0 }, - { "<>", "", "", - { NULL, NULL, NULL, "", "", TRUE }, -- { NULL, NULL, NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, NULL, NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - { "<@>", "", "", - { NULL, NULL, NULL, "", "", TRUE }, -- { NULL, NULL, "INVALID_ROUTE", "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE } }, -+ { NULL, NULL, "INVALID_ROUTE", "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, - }; - static struct message_address group_prefix = { - NULL, NULL, NULL, "group", NULL, FALSE -@@ -231,6 +236,9 @@ static void test_message_address(void) - wanted_string = test->input; - test_assert_idx(strcmp(str_c(str), wanted_string) == 0, i); - -+ if ((test->flags & TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST) != 0) -+ continue; -+ - /* test the address as a list of itself */ - for (unsigned int list_length = 2; list_length <= 5; list_length++) { - str_truncate(group, 0); --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0003-lib-mail-Fix-out-of-bounds-read-when-parsing-an-inva.patch dovecot-2.3.3/debian/patches/CVE-2017-14461/0003-lib-mail-Fix-out-of-bounds-read-when-parsing-an-inva.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0003-lib-mail-Fix-out-of-bounds-read-when-parsing-an-inva.patch 2018-02-26 17:30:50.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-14461/0003-lib-mail-Fix-out-of-bounds-read-when-parsing-an-inva.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -From b72d864b8c34cb21076214c0b28101baec530141 Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Fri, 22 Dec 2017 18:36:55 +0200 -Subject: [PATCH 3/7] lib-mail: Fix out-of-bounds read when parsing an invalid - email address - -The included unit test doesn't fail, but running it with valgrind shows -"Invalid read of size 1" error. - -Broken in d6737a17a27402e7a262f7ba8a2ed588d576f23c - -Discovered by Aleksandar Nikolic of Cisco Talos ---- - src/lib-mail/message-address.c | 3 ++- - src/lib-mail/test-message-address.c | 10 ++++++++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/src/lib-mail/message-address.c b/src/lib-mail/message-address.c -index beb81ee..787a26e 100644 ---- a/src/lib-mail/message-address.c -+++ b/src/lib-mail/message-address.c -@@ -221,7 +221,8 @@ static int parse_addr_spec(struct message_address_parser_context *ctx) - /* end of input or parsing local-part failed */ - ctx->addr.invalid_syntax = TRUE; - } -- if (ret != 0 && *ctx->parser.data == '@') { -+ if (ret != 0 && ctx->parser.data != ctx->parser.end && -+ *ctx->parser.data == '@') { - ret2 = parse_domain(ctx); - if (ret2 <= 0) - ret = ret2; -diff --git a/src/lib-mail/test-message-address.c b/src/lib-mail/test-message-address.c -index f6a8766..c963aa6 100644 ---- a/src/lib-mail/test-message-address.c -+++ b/src/lib-mail/test-message-address.c -@@ -198,6 +198,16 @@ static void test_message_address(void) - { "<@>", "", "", - { NULL, NULL, NULL, "", "", TRUE }, - { NULL, NULL, "INVALID_ROUTE", "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, 0 }, -+ -+ /* Test against a out-of-bounds read bug - keep these two tests -+ together in this same order: */ -+ { "aaaa@", "", "", -+ { NULL, NULL, NULL, "aaaa", "", TRUE }, -+ { NULL, NULL, NULL, "aaaa", "MISSING_DOMAIN", TRUE }, 0 }, -+ { "a(aa", "", "", -+ { NULL, NULL, NULL, "", "", TRUE }, -+ { NULL, NULL, NULL, "MISSING_MAILBOX", "MISSING_DOMAIN", TRUE }, -+ TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST }, - }; - static struct message_address group_prefix = { - NULL, NULL, NULL, "group", NULL, FALSE --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0004-lib-mail-Make-sure-parsers-don-t-accidentally-go-muc.patch dovecot-2.3.3/debian/patches/CVE-2017-14461/0004-lib-mail-Make-sure-parsers-don-t-accidentally-go-muc.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0004-lib-mail-Make-sure-parsers-don-t-accidentally-go-muc.patch 2018-02-26 17:31:00.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-14461/0004-lib-mail-Make-sure-parsers-don-t-accidentally-go-muc.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,302 +0,0 @@ -From e9b86842441a668b30796bff7d60828614570a1b Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Fri, 22 Dec 2017 18:42:53 +0200 -Subject: [PATCH 4/7] lib-mail: Make sure parsers don't accidentally go much - beyond end pointer - ---- - src/lib-mail/message-address.c | 18 +++++++++--------- - src/lib-mail/message-date.c | 4 ++-- - src/lib-mail/message-part-data.c | 2 +- - src/lib-mail/rfc2231-parser.c | 2 +- - src/lib-mail/rfc822-parser.c | 38 +++++++++++++++++++------------------- - 5 files changed, 32 insertions(+), 32 deletions(-) - -Index: dovecot-2.2.33.2/src/lib-mail/message-address.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-address.c 2018-02-26 12:30:57.299651958 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-address.c 2018-02-26 12:30:57.295651955 -0500 -@@ -84,7 +84,7 @@ static int parse_local_part(struct messa - local-part = dot-atom / quoted-string / obs-local-part - obs-local-part = word *("." word) - */ -- i_assert(ctx->parser.data != ctx->parser.end); -+ i_assert(ctx->parser.data < ctx->parser.end); - - str_truncate(ctx->str, 0); - if (*ctx->parser.data == '"') -@@ -117,7 +117,7 @@ static int parse_domain_list(struct mess - /* obs-domain-list = "@" domain *(*(CFWS / "," ) [CFWS] "@" domain) */ - str_truncate(ctx->str, 0); - for (;;) { -- if (ctx->parser.data == ctx->parser.end) -+ if (ctx->parser.data >= ctx->parser.end) - return 0; - - if (*ctx->parser.data != '@') -@@ -153,7 +153,7 @@ static int parse_angle_addr(struct messa - if (parse_domain_list(ctx) <= 0 || *ctx->parser.data != ':') { - if (ctx->fill_missing) - ctx->addr.route = "INVALID_ROUTE"; -- if (ctx->parser.data == ctx->parser.end) -+ if (ctx->parser.data >= ctx->parser.end) - return -1; - /* try to continue anyway */ - } else { -@@ -203,7 +203,7 @@ static int parse_name_addr(struct messag - ctx->addr.domain = "SYNTAX_ERROR"; - ctx->addr.invalid_syntax = TRUE; - } -- return ctx->parser.data != ctx->parser.end; -+ return ctx->parser.data < ctx->parser.end ? 1 : 0; - } - - static int parse_addr_spec(struct message_address_parser_context *ctx) -@@ -211,7 +211,7 @@ static int parse_addr_spec(struct messag - /* addr-spec = local-part "@" domain */ - int ret, ret2 = -2; - -- i_assert(ctx->parser.data != ctx->parser.end); -+ i_assert(ctx->parser.data < ctx->parser.end); - - str_truncate(ctx->parser.last_comment, 0); - -@@ -221,7 +221,7 @@ static int parse_addr_spec(struct messag - /* end of input or parsing local-part failed */ - ctx->addr.invalid_syntax = TRUE; - } -- if (ret != 0 && ctx->parser.data != ctx->parser.end && -+ if (ret != 0 && ctx->parser.data < ctx->parser.end && - *ctx->parser.data == '@') { - ret2 = parse_domain(ctx); - if (ret2 <= 0) -@@ -317,7 +317,7 @@ static int parse_group(struct message_ad - if (parse_mailbox(ctx) <= 0) { - /* broken mailbox - try to continue anyway. */ - } -- if (ctx->parser.data == ctx->parser.end || -+ if (ctx->parser.data >= ctx->parser.end || - *ctx->parser.data != ',') - break; - ctx->parser.data++; -@@ -328,7 +328,7 @@ static int parse_group(struct message_ad - } - } - if (ret >= 0) { -- if (ctx->parser.data == ctx->parser.end || -+ if (ctx->parser.data >= ctx->parser.end || - *ctx->parser.data != ';') - ret = -1; - else { -@@ -368,7 +368,7 @@ static int parse_address_list(struct mes - max_addresses--; - if ((ret = parse_address(ctx)) == 0) - break; -- if (ctx->parser.data == ctx->parser.end || -+ if (ctx->parser.data >= ctx->parser.end || - *ctx->parser.data != ',') { - ret = -1; - break; -Index: dovecot-2.2.33.2/src/lib-mail/message-date.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-date.c 2018-02-26 12:30:57.299651958 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-date.c 2018-02-26 12:30:57.295651955 -0500 -@@ -103,7 +103,7 @@ static int next_token(struct message_dat - int ret; - - str_truncate(ctx->str, 0); -- ret = ctx->parser.data == ctx->parser.end ? 0 : -+ ret = ctx->parser.data >= ctx->parser.end ? 0 : - rfc822_parse_atom(&ctx->parser, ctx->str); - - *value = str_data(ctx->str); -@@ -205,7 +205,7 @@ message_date_parser_tokens(struct messag - tm.tm_min = (value[0]-'0') * 10 + (value[1]-'0'); - - /* [:ss] */ -- if (ctx->parser.data != ctx->parser.end && -+ if (ctx->parser.data < ctx->parser.end && - IS_TIME_SEP(*ctx->parser.data)) { - ctx->parser.data++; - rfc822_skip_lwsp(&ctx->parser); -Index: dovecot-2.2.33.2/src/lib-mail/message-part-data.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-part-data.c 2018-02-26 12:30:57.299651958 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-part-data.c 2018-02-26 12:30:57.295651955 -0500 -@@ -373,7 +373,7 @@ parse_content_language(struct message_pa - array_append(&langs, &lang, 1); - str_truncate(str, 0); - -- if (parser.data == parser.end || *parser.data != ',') -+ if (parser.data >= parser.end || *parser.data != ',') - break; - parser.data++; - rfc822_skip_lwsp(&parser); -Index: dovecot-2.2.33.2/src/lib-mail/rfc2231-parser.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/rfc2231-parser.c 2018-02-26 12:30:57.299651958 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/rfc2231-parser.c 2018-02-26 12:30:57.295651955 -0500 -@@ -59,7 +59,7 @@ int rfc2231_parse(struct rfc822_parser_c - if (ret < 0) { - /* try to continue anyway.. */ - broken = TRUE; -- if (ctx->data == ctx->end) -+ if (ctx->data >= ctx->end) - break; - ctx->data++; - continue; -Index: dovecot-2.2.33.2/src/lib-mail/rfc822-parser.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/rfc822-parser.c 2018-02-26 12:30:57.299651958 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/rfc822-parser.c 2018-02-26 12:30:57.295651955 -0500 -@@ -72,7 +72,7 @@ int rfc822_skip_comment(struct rfc822_pa - str_truncate(ctx->last_comment, 0); - - start = ++ctx->data; -- for (; ctx->data != ctx->end; ctx->data++) { -+ for (; ctx->data < ctx->end; ctx->data++) { - switch (*ctx->data) { - case '(': - level++; -@@ -84,7 +84,7 @@ int rfc822_skip_comment(struct rfc822_pa - ctx->data - start); - } - ctx->data++; -- return ctx->data != ctx->end; -+ return ctx->data < ctx->end ? 1 : 0; - } - break; - case '\\': -@@ -95,7 +95,7 @@ int rfc822_skip_comment(struct rfc822_pa - start = ctx->data + 1; - - ctx->data++; -- if (ctx->data == ctx->end) -+ if (ctx->data >= ctx->end) - return -1; - break; - } -@@ -107,7 +107,7 @@ int rfc822_skip_comment(struct rfc822_pa - - int rfc822_skip_lwsp(struct rfc822_parser_context *ctx) - { -- for (; ctx->data != ctx->end;) { -+ for (; ctx->data < ctx->end;) { - if (*ctx->data == ' ' || *ctx->data == '\t' || - *ctx->data == '\r' || *ctx->data == '\n') { - ctx->data++; -@@ -120,7 +120,7 @@ int rfc822_skip_lwsp(struct rfc822_parse - if (rfc822_skip_comment(ctx) < 0) - return -1; - } -- return ctx->data != ctx->end; -+ return ctx->data < ctx->end ? 1 : 0; - } - - int rfc822_parse_atom(struct rfc822_parser_context *ctx, string_t *str) -@@ -132,10 +132,10 @@ int rfc822_parse_atom(struct rfc822_pars - atext = - ; Any character except controls, SP, and specials. - */ -- if (ctx->data == ctx->end || !IS_ATEXT(*ctx->data)) -+ if (ctx->data >= ctx->end || !IS_ATEXT(*ctx->data)) - return -1; - -- for (start = ctx->data++; ctx->data != ctx->end; ctx->data++) { -+ for (start = ctx->data++; ctx->data < ctx->end; ctx->data++) { - if (IS_ATEXT(*ctx->data)) - continue; - -@@ -161,10 +161,10 @@ int rfc822_parse_dot_atom(struct rfc822_ - - For RFC-822 compatibility allow LWSP around '.' - */ -- if (ctx->data == ctx->end || !IS_ATEXT(*ctx->data)) -+ if (ctx->data >= ctx->end || !IS_ATEXT(*ctx->data)) - return -1; - -- for (start = ctx->data++; ctx->data != ctx->end; ) { -+ for (start = ctx->data++; ctx->data < ctx->end; ) { - if (IS_ATEXT(*ctx->data)) { - ctx->data++; - continue; -@@ -194,7 +194,7 @@ int rfc822_parse_mime_token(struct rfc82 - { - const unsigned char *start; - -- for (start = ctx->data; ctx->data != ctx->end; ctx->data++) { -+ for (start = ctx->data; ctx->data < ctx->end; ctx->data++) { - if (IS_ATEXT_NON_TSPECIAL(*ctx->data) || *ctx->data == '.') - continue; - -@@ -215,7 +215,7 @@ int rfc822_parse_quoted_string(struct rf - i_assert(*ctx->data == '"'); - ctx->data++; - -- for (start = ctx->data; ctx->data != ctx->end; ctx->data++) { -+ for (start = ctx->data; ctx->data < ctx->end; ctx->data++) { - switch (*ctx->data) { - case '"': - str_append_n(str, start, ctx->data - start); -@@ -231,7 +231,7 @@ int rfc822_parse_quoted_string(struct rf - break; - case '\\': - ctx->data++; -- if (ctx->data == ctx->end) -+ if (ctx->data >= ctx->end) - return -1; - - str_append_n(str, start, ctx->data - start - 1); -@@ -257,7 +257,7 @@ rfc822_parse_atom_or_dot(struct rfc822_p - The difference between this function and rfc822_parse_dot_atom() - is that this doesn't just silently skip over all the whitespace. - */ -- for (start = ctx->data; ctx->data != ctx->end; ctx->data++) { -+ for (start = ctx->data; ctx->data < ctx->end; ctx->data++) { - if (IS_ATEXT(*ctx->data) || *ctx->data == '.') - continue; - -@@ -279,7 +279,7 @@ int rfc822_parse_phrase(struct rfc822_pa - obs-phrase = word *(word / "." / CFWS) - */ - -- if (ctx->data == ctx->end) -+ if (ctx->data >= ctx->end) - return 0; - if (*ctx->data == '.') - return -1; -@@ -317,10 +317,10 @@ rfc822_parse_domain_literal(struct rfc82 - i_assert(ctx->data < ctx->end); - i_assert(*ctx->data == '['); - -- for (start = ctx->data; ctx->data != ctx->end; ctx->data++) { -+ for (start = ctx->data; ctx->data < ctx->end; ctx->data++) { - if (*ctx->data == '\\') { - ctx->data++; -- if (ctx->data == ctx->end) -+ if (ctx->data >= ctx->end) - break; - } else if (*ctx->data == ']') { - ctx->data++; -@@ -389,7 +389,7 @@ int rfc822_parse_content_param(struct rf - *key_r = NULL; - *value_r = NULL; - -- if (ctx->data == ctx->end) -+ if (ctx->data >= ctx->end) - return 0; - if (*ctx->data != ';') - return -1; -@@ -412,10 +412,10 @@ int rfc822_parse_content_param(struct rf - /* broken / no value */ - } else if (*ctx->data == '"') { - ret = rfc822_parse_quoted_string(ctx, tmp); -- } else if (ctx->data != ctx->end && *ctx->data == '=') { -+ } else if (ctx->data < ctx->end && *ctx->data == '=') { - /* workaround for broken input: - name==?utf-8?b?...?= */ -- while (ctx->data != ctx->end && *ctx->data != ';' && -+ while (ctx->data < ctx->end && *ctx->data != ';' && - *ctx->data != ' ' && *ctx->data != '\t' && - *ctx->data != '\r' && *ctx->data != '\n') { - str_append_c(tmp, *ctx->data); diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0005-lib-mail-Add-rfc822_parser_deinit.patch dovecot-2.3.3/debian/patches/CVE-2017-14461/0005-lib-mail-Add-rfc822_parser_deinit.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0005-lib-mail-Add-rfc822_parser_deinit.patch 2018-02-26 17:31:05.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-14461/0005-lib-mail-Add-rfc822_parser_deinit.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -From f5cd17a27f0b666567747f8c921ebe1026970f11 Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Fri, 22 Dec 2017 18:56:53 +0200 -Subject: [PATCH 5/7] lib-mail: Add rfc822_parser_deinit() - -It's not a strict requirement to call this, but it assert-crashes if the -state isn't valid. ---- - src/lib-mail/rfc822-parser.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/lib-mail/rfc822-parser.h b/src/lib-mail/rfc822-parser.h -index 87e9aa2..466a68a 100644 ---- a/src/lib-mail/rfc822-parser.h -+++ b/src/lib-mail/rfc822-parser.h -@@ -16,6 +16,14 @@ extern unsigned char rfc822_atext_chars[256]; - void rfc822_parser_init(struct rfc822_parser_context *ctx, - const unsigned char *data, size_t size, - string_t *last_comment) ATTR_NULL(4); -+static inline void rfc822_parser_deinit(struct rfc822_parser_context *ctx) -+{ -+ /* make sure the parsing didn't trigger a bug that caused reading -+ past the end pointer. */ -+ i_assert(ctx->data <= ctx->end); -+ /* make sure the parser is no longer accessed */ -+ ctx->data = ctx->end = NULL; -+} - - /* The functions below return 1 = more data available, 0 = no more data - available (but a value might have been returned now), -1 = invalid input. --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0006-lib-mail-Refactor-code-to-make-the-next-commit-small.patch dovecot-2.3.3/debian/patches/CVE-2017-14461/0006-lib-mail-Refactor-code-to-make-the-next-commit-small.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0006-lib-mail-Refactor-code-to-make-the-next-commit-small.patch 2018-02-26 17:31:18.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-14461/0006-lib-mail-Refactor-code-to-make-the-next-commit-small.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -From 18a7a161c8dae6f630770a3cbab7374a0c3dd732 Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Tue, 9 Jan 2018 11:33:59 -0500 -Subject: [PATCH 6/7] lib-mail: Refactor code to make the next commit smaller - ---- - src/lib-mail/message-address.c | 4 ++-- - src/lib-mail/message-id.c | 30 +++++++++++++----------------- - src/lib-mail/message-parser.c | 5 ++--- - 3 files changed, 17 insertions(+), 22 deletions(-) - -diff --git a/src/lib-mail/message-address.c b/src/lib-mail/message-address.c -index 88d638a..afeef88 100644 ---- a/src/lib-mail/message-address.c -+++ b/src/lib-mail/message-address.c -@@ -400,9 +400,9 @@ message_address_parse_real(pool_t pool, const unsigned char *data, size_t size, - - if (rfc822_skip_lwsp(&ctx.parser) <= 0) { - /* no addresses */ -- return NULL; -+ } else { -+ (void)parse_address_list(&ctx, max_addresses); - } -- (void)parse_address_list(&ctx, max_addresses); - return ctx.first_addr; - } - -diff --git a/src/lib-mail/message-id.c b/src/lib-mail/message-id.c -index d6aa357..772535b 100644 ---- a/src/lib-mail/message-id.c -+++ b/src/lib-mail/message-id.c -@@ -9,6 +9,7 @@ static bool get_untokenized_msgid(const char **msgid_p, string_t *msgid) - { - struct rfc822_parser_context parser; - int ret; -+ bool success = FALSE; - - rfc822_parser_init(&parser, (const unsigned char *)*msgid_p, - strlen(*msgid_p), NULL); -@@ -27,23 +28,18 @@ static bool get_untokenized_msgid(const char **msgid_p, string_t *msgid) - ret = rfc822_parse_quoted_string(&parser, msgid); - else - ret = rfc822_parse_dot_atom(&parser, msgid); -- if (ret <= 0) -- return FALSE; -- -- if (*parser.data != '@') -- return FALSE; -- str_append_c(msgid, '@'); -- parser.data++; -- rfc822_skip_lwsp(&parser); -- -- if (rfc822_parse_dot_atom(&parser, msgid) <= 0) -- return FALSE; -- -- if (*parser.data != '>') -- return FALSE; -- -- *msgid_p = (const char *)parser.data + 1; -- return TRUE; -+ if (ret > 0 && *parser.data == '@') { -+ str_append_c(msgid, '@'); -+ parser.data++; -+ rfc822_skip_lwsp(&parser); -+ -+ if (rfc822_parse_dot_atom(&parser, msgid) > 0 && -+ *parser.data == '>') { -+ *msgid_p = (const char *)parser.data + 1; -+ success = TRUE; -+ } -+ } -+ return success; - } - - static void strip_lwsp(char *str) -diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c -index 8caf7d8..b95448a 100644 ---- a/src/lib-mail/message-parser.c -+++ b/src/lib-mail/message-parser.c -@@ -499,9 +499,8 @@ static void parse_content_type(struct message_parser_ctx *ctx, - ctx->part->flags |= MESSAGE_PART_FLAG_MULTIPART_DIGEST; - } - -- if (ret < 0) -- return; -- if ((ctx->part->flags & MESSAGE_PART_FLAG_MULTIPART) == 0 || -+ if (ret < 0 || -+ (ctx->part->flags & MESSAGE_PART_FLAG_MULTIPART) == 0 || - ctx->last_boundary != NULL) - return; - --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0007-global-Call-rfc822_parser_deinit-wherever-possible.patch dovecot-2.3.3/debian/patches/CVE-2017-14461/0007-global-Call-rfc822_parser_deinit-wherever-possible.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-14461/0007-global-Call-rfc822_parser_deinit-wherever-possible.patch 2018-02-26 17:31:29.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-14461/0007-global-Call-rfc822_parser_deinit-wherever-possible.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,250 +0,0 @@ -From 0ed696987e5e5d44e971da2a10f6275b276ece34 Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Fri, 22 Dec 2017 18:58:11 +0200 -Subject: [PATCH 7/7] global: Call rfc822_parser_deinit() wherever possible - ---- - src/lib-mail/istream-attachment-extractor.c | 1 + - src/lib-mail/message-address.c | 1 + - src/lib-mail/message-date.c | 1 + - src/lib-mail/message-decoder.c | 6 +++++- - src/lib-mail/message-id.c | 1 + - src/lib-mail/message-parser.c | 5 ++++- - src/lib-mail/message-part-data.c | 8 +++++++- - src/lib-mail/message-search.c | 1 + - src/lib-mail/test-rfc2231-parser.c | 1 + - src/lib-mail/test-rfc822-parser.c | 2 ++ - src/plugins/fts/fts-build-mail.c | 1 + - src/plugins/fts/fts-parser-script.c | 5 ++++- - 12 files changed, 29 insertions(+), 4 deletions(-) - -Index: dovecot-2.2.33.2/src/lib-mail/istream-attachment-extractor.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/istream-attachment-extractor.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/istream-attachment-extractor.c 2018-02-26 12:31:26.395674639 -0500 -@@ -87,6 +87,7 @@ static void parse_content_type(struct at - (void)rfc822_parse_content_type(&parser, content_type); - astream->part.content_type = i_strdup(str_c(content_type)); - } T_END; -+ rfc822_parser_deinit(&parser); - } - - static void -Index: dovecot-2.2.33.2/src/lib-mail/message-address.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-address.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-address.c 2018-02-26 12:31:26.395674639 -0500 -@@ -403,6 +403,7 @@ message_address_parse_real(pool_t pool, - } else { - (void)parse_address_list(&ctx, max_addresses); - } -+ rfc822_parser_deinit(&ctx.parser); - return ctx.first_addr; - } - -Index: dovecot-2.2.33.2/src/lib-mail/message-date.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-date.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-date.c 2018-02-26 12:31:26.395674639 -0500 -@@ -252,6 +252,7 @@ bool message_date_parse(const unsigned c - ctx.str = t_str_new(128); - success = message_date_parser_tokens(&ctx, timestamp_r, - timezone_offset_r); -+ rfc822_parser_deinit(&ctx.parser); - } T_END; - - return success; -Index: dovecot-2.2.33.2/src/lib-mail/message-decoder.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-decoder.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-decoder.c 2018-02-26 12:31:26.395674639 -0500 -@@ -117,6 +117,7 @@ enum message_cte message_decoder_parse_c - message_cte = MESSAGE_CTE_QP; - break; - } -+ rfc822_parser_deinit(&parser); - return message_cte; - } - -@@ -137,8 +138,10 @@ parse_content_type(struct message_decode - str = t_str_new(64); - ret = rfc822_parse_content_type(&parser, str); - ctx->content_type = i_strdup(str_c(str)); -- if (ret < 0) -+ if (ret < 0) { -+ rfc822_parser_deinit(&parser); - return; -+ } - - rfc2231_parse(&parser, &results); - for (; *results != NULL; results += 2) { -@@ -147,6 +150,7 @@ parse_content_type(struct message_decode - break; - } - } -+ rfc822_parser_deinit(&parser); - } - - static bool message_decode_header(struct message_decoder_context *ctx, -Index: dovecot-2.2.33.2/src/lib-mail/message-id.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-id.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-id.c 2018-02-26 12:31:26.395674639 -0500 -@@ -39,6 +39,7 @@ static bool get_untokenized_msgid(const - success = TRUE; - } - } -+ rfc822_parser_deinit(&parser); - return success; - } - -Index: dovecot-2.2.33.2/src/lib-mail/message-parser.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-parser.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-parser.c 2018-02-26 12:31:26.395674639 -0500 -@@ -501,8 +501,10 @@ static void parse_content_type(struct me - - if (ret < 0 || - (ctx->part->flags & MESSAGE_PART_FLAG_MULTIPART) == 0 || -- ctx->last_boundary != NULL) -+ ctx->last_boundary != NULL) { -+ rfc822_parser_deinit(&parser); - return; -+ } - - rfc2231_parse(&parser, &results); - for (; *results != NULL; results += 2) { -@@ -512,6 +514,7 @@ static void parse_content_type(struct me - break; - } - } -+ rfc822_parser_deinit(&parser); - } - - static bool block_is_at_eoh(const struct message_block *block) -Index: dovecot-2.2.33.2/src/lib-mail/message-part-data.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-part-data.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-part-data.c 2018-02-26 12:31:26.395674639 -0500 -@@ -308,6 +308,7 @@ parse_content_type(struct message_part_d - parse_mime_parameters(&parser, pool, - &data->content_type_params, - &data->content_type_params_count); -+ rfc822_parser_deinit(&parser); - } - - static void -@@ -326,6 +327,7 @@ parse_content_transfer_encoding(struct m - data->content_transfer_encoding = - p_strdup(pool, str_c(str)); - } -+ rfc822_parser_deinit(&parser); - } - - static void -@@ -339,13 +341,16 @@ parse_content_disposition(struct message - rfc822_skip_lwsp(&parser); - - str = t_str_new(256); -- if (rfc822_parse_mime_token(&parser, str) < 0) -+ if (rfc822_parse_mime_token(&parser, str) < 0) { -+ rfc822_parser_deinit(&parser); - return; -+ } - data->content_disposition = p_strdup(pool, str_c(str)); - - parse_mime_parameters(&parser, pool, - &data->content_disposition_params, - &data->content_disposition_params_count); -+ rfc822_parser_deinit(&parser); - } - - static void -@@ -378,6 +383,7 @@ parse_content_language(struct message_pa - parser.data++; - rfc822_skip_lwsp(&parser); - } -+ rfc822_parser_deinit(&parser); - - if (array_count(&langs) > 0) { - array_append_zero(&langs); -Index: dovecot-2.2.33.2/src/lib-mail/message-search.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/message-search.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/message-search.c 2018-02-26 12:31:26.395674639 -0500 -@@ -61,6 +61,7 @@ static void parse_content_type(struct me - ctx->content_type_text = - strncasecmp(str_c(content_type), "text/", 5) == 0 || - strncasecmp(str_c(content_type), "message/", 8) == 0; -+ rfc822_parser_deinit(&parser); - } - - static void handle_header(struct message_search_context *ctx, -Index: dovecot-2.2.33.2/src/lib-mail/test-rfc2231-parser.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/test-rfc2231-parser.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/test-rfc2231-parser.c 2018-02-26 12:31:26.399674643 -0500 -@@ -36,6 +36,7 @@ static void test_rfc2231_parser(void) - test_assert(rfc2231_parse(&parser, &result) == 0); - for (i = 0; output[i] != NULL && result[i] != NULL; i++) - test_assert(strcmp(output[i], result[i]) == 0); -+ rfc822_parser_deinit(&parser); - test_assert(output[i] == NULL && result[i] == NULL); - test_end(); - } -Index: dovecot-2.2.33.2/src/lib-mail/test-rfc822-parser.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-mail/test-rfc822-parser.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/lib-mail/test-rfc822-parser.c 2018-02-26 12:31:26.399674643 -0500 -@@ -31,6 +31,7 @@ static void test_rfc822_parse_quoted_str - test_assert_idx(rfc822_parse_quoted_string(&parser, str) == tests[i].ret, i); - test_assert_idx(tests[i].ret < 0 || - strcmp(tests[i].output, str_c(str)) == 0, i); -+ rfc822_parser_deinit(&parser); - str_truncate(str, 0); - } - test_end(); -@@ -60,6 +61,7 @@ static void test_rfc822_parse_content_pa - test_assert_idx(strcmp(output[i].value, value) == 0, i); - i++; - } -+ rfc822_parser_deinit(&parser); - test_assert(ret == 0); - test_assert(i == N_ELEMENTS(output)); - test_end(); -Index: dovecot-2.2.33.2/src/plugins/fts/fts-build-mail.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/plugins/fts/fts-build-mail.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/plugins/fts/fts-build-mail.c 2018-02-26 12:31:26.399674643 -0500 -@@ -56,6 +56,7 @@ static void fts_build_parse_content_type - (void)rfc822_parse_content_type(&parser, content_type); - ctx->content_type = str_lcase(i_strdup(str_c(content_type))); - } T_END; -+ rfc822_parser_deinit(&parser); - } - - static void -Index: dovecot-2.2.33.2/src/plugins/fts/fts-parser-script.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/plugins/fts/fts-parser-script.c 2018-02-26 12:31:26.399674643 -0500 -+++ dovecot-2.2.33.2/src/plugins/fts/fts-parser-script.c 2018-02-26 12:31:26.399674643 -0500 -@@ -173,8 +173,10 @@ static void parse_content_disposition(co - - /* type; param; param; .. */ - str = t_str_new(32); -- if (rfc822_parse_mime_token(&parser, str) < 0) -+ if (rfc822_parse_mime_token(&parser, str) < 0) { -+ rfc822_parser_deinit(&parser); - return; -+ } - - rfc2231_parse(&parser, &results); - filename2 = NULL; -@@ -191,6 +193,7 @@ static void parse_content_disposition(co - much about the filename actually, just about its extension */ - *filename_r = filename2; - } -+ rfc822_parser_deinit(&parser); - } - - static struct fts_parser * diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0001-lib-dns-Move-before-lib-master.patch dovecot-2.3.3/debian/patches/CVE-2017-15130/0001-lib-dns-Move-before-lib-master.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0001-lib-dns-Move-before-lib-master.patch 2018-02-26 17:32:31.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15130/0001-lib-dns-Move-before-lib-master.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -From 22311315b9f780211329c1522eb5aaa4faaa9391 Mon Sep 17 00:00:00 2001 -From: Aki Tuomi -Date: Mon, 19 Feb 2018 14:19:08 +0200 -Subject: [PATCH 1/6] lib-dns: Move before lib-master - ---- - src/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index e1e40e1..c1f87ee 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -7,11 +7,11 @@ LIBDOVECOT_SUBDIRS = \ - lib \ - lib-settings \ - lib-auth \ -+ lib-dns \ - lib-master \ - lib-charset \ - lib-ssl-iostream \ - lib-dcrypt \ -- lib-dns \ - lib-dict \ - lib-sasl \ - lib-stats \ --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0002-config-Add-config_filter_get_all.patch dovecot-2.3.3/debian/patches/CVE-2017-15130/0002-config-Add-config_filter_get_all.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0002-config-Add-config_filter_get_all.patch 2018-02-26 17:32:37.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15130/0002-config-Add-config_filter_get_all.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -From f3504763c27c2661716c0d1dbd3e0fc662107a21 Mon Sep 17 00:00:00 2001 -From: Aki Tuomi -Date: Thu, 30 Nov 2017 15:46:40 +0200 -Subject: [PATCH 2/6] config: Add config_filter_get_all - -Returns all filters ---- - src/config/config-filter.c | 15 +++++++++++++++ - src/config/config-filter.h | 3 +++ - 2 files changed, 18 insertions(+) - -diff --git a/src/config/config-filter.c b/src/config/config-filter.c -index 78d65e8..2805e9d 100644 ---- a/src/config/config-filter.c -+++ b/src/config/config-filter.c -@@ -252,6 +252,21 @@ config_filter_find_all(struct config_filter_context *ctx, pool_t pool, - } - - struct config_filter_parser *const * -+config_filter_get_all(struct config_filter_context *ctx) -+{ -+ ARRAY_TYPE(config_filter_parsers) filters; -+ unsigned int i; -+ -+ t_array_init(&filters, 8); -+ for (i = 0; ctx->parsers[i] != NULL; i++) { -+ array_append(&filters, &ctx->parsers[i], 1); -+ } -+ array_sort(&filters, config_filter_parser_cmp_rev); -+ array_append_zero(&filters); -+ return array_idx(&filters, 0); -+} -+ -+struct config_filter_parser *const * - config_filter_find_subset(struct config_filter_context *ctx, - const struct config_filter *filter) - { -diff --git a/src/config/config-filter.h b/src/config/config-filter.h -index 7e45fc1..fda3182 100644 ---- a/src/config/config-filter.h -+++ b/src/config/config-filter.h -@@ -45,6 +45,9 @@ struct config_filter_parser *const * - config_filter_find_subset(struct config_filter_context *ctx, - const struct config_filter *filter); - -+struct config_filter_parser *const * -+config_filter_get_all(struct config_filter_context *ctx); -+ - /* Returns TRUE if filter matches mask. */ - bool config_filter_match(const struct config_filter *mask, - const struct config_filter *filter); --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0003-config-Add-command-to-request-all-filters.patch dovecot-2.3.3/debian/patches/CVE-2017-15130/0003-config-Add-command-to-request-all-filters.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0003-config-Add-command-to-request-all-filters.patch 2018-02-26 17:32:42.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15130/0003-config-Add-command-to-request-all-filters.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -From 02da33a59fddd51cc3b8d95989de95574b7332f1 Mon Sep 17 00:00:00 2001 -From: Aki Tuomi -Date: Thu, 30 Nov 2017 15:46:52 +0200 -Subject: [PATCH 3/6] config: Add command to request all filters - ---- - src/config/config-connection.c | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/src/config/config-connection.c b/src/config/config-connection.c -index e617229..2885e05 100644 ---- a/src/config/config-connection.c -+++ b/src/config/config-connection.c -@@ -150,6 +150,36 @@ static int config_connection_request(struct config_connection *conn, - return 0; - } - -+static int config_filters_request(struct config_connection *conn) -+{ -+ struct config_filter_parser *const *filters = config_filter_get_all(config_filter); -+ o_stream_cork(conn->output); -+ while(*filters != NULL) { -+ const struct config_filter *filter = &(*filters)->filter; -+ o_stream_nsend_str(conn->output, "FILTER"); -+ if (filter->service != NULL) -+ o_stream_nsend_str(conn->output, t_strdup_printf("\tservice=%s", -+ filter->service)); -+ if (filter->local_name != NULL) -+ o_stream_nsend_str(conn->output, t_strdup_printf("\tlocal-name=%s", -+ filter->local_name)); -+ if (filter->local_bits > 0) -+ o_stream_nsend_str(conn->output, t_strdup_printf("\tlocal-net=%s/%u", -+ net_ip2addr(&filter->local_net), -+ filter->local_bits)); -+ if (filter->remote_bits > 0) -+ o_stream_nsend_str(conn->output, t_strdup_printf("\tremote-net=%s/%u", -+ net_ip2addr(&filter->remote_net), -+ filter->remote_bits)); -+ o_stream_nsend_str(conn->output, "\n"); -+ filters++; -+ } -+ o_stream_nsend_str(conn->output, "\n"); -+ o_stream_uncork(conn->output); -+ return 0; -+} -+ -+ - static void config_connection_input(struct config_connection *conn) - { - const char *const *args, *line; -@@ -186,6 +216,10 @@ static void config_connection_input(struct config_connection *conn) - if (config_connection_request(conn, args + 1) < 0) - break; - } -+ if (strcmp(args[0], "FILTERS") == 0) { -+ if (config_filters_request(conn) < 0) -+ break; -+ } - } - } - --- -2.1.4 - diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0004-lib-master-Support-validating-config-filters-against.patch dovecot-2.3.3/debian/patches/CVE-2017-15130/0004-lib-master-Support-validating-config-filters-against.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0004-lib-master-Support-validating-config-filters-against.patch 2018-02-26 17:32:51.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15130/0004-lib-master-Support-validating-config-filters-against.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,295 +0,0 @@ -From 390592e6af07e02064ebdbb1bbcf06528887370f Mon Sep 17 00:00:00 2001 -From: Aki Tuomi -Date: Thu, 30 Nov 2017 15:47:25 +0200 -Subject: [PATCH 4/6] lib-master: Support validating config filters against - requests - -Validation will sanitize the input request and drop any fields -that have no filter in config. E.g. if you have a local block -with name, and nothing else, then lip/rip will be dropped -from the request. ---- - src/lib-master/Makefile.am | 2 + - src/lib-master/master-service-settings-cache.c | 90 ++++++++++++++++++++++ - src/lib-master/master-service-settings-cache.h | 2 +- - src/lib-master/master-service-settings.c | 60 +++++++++++++++ - src/lib-master/master-service-settings.h | 3 + - .../test-master-service-settings-cache.c | 8 ++ - 6 files changed, 164 insertions(+), 1 deletion(-) - -Index: dovecot-2.2.33.2/src/lib-master/Makefile.am -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-master/Makefile.am 2018-02-26 12:32:48.551744208 -0500 -+++ dovecot-2.2.33.2/src/lib-master/Makefile.am 2018-02-26 12:32:48.547744205 -0500 -@@ -4,6 +4,7 @@ noinst_LTLIBRARIES = libmaster.la - - AM_CPPFLAGS = \ - -I$(top_srcdir)/src/lib \ -+ -I$(top_srcdir)/src/lib-dns \ - -I$(top_srcdir)/src/lib-test \ - -I$(top_srcdir)/src/lib-settings \ - -I$(top_srcdir)/src/lib-ssl-iostream \ -@@ -58,6 +59,7 @@ noinst_PROGRAMS = $(test_programs) - - test_libs = \ - ../lib-test/libtest.la \ -+ ../lib-dns/libdns.la \ - ../lib/liblib.la - - test_deps = $(noinst_LTLIBRARIES) $(test_libs) -Index: dovecot-2.2.33.2/src/lib-master/master-service-settings-cache.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-master/master-service-settings-cache.c 2018-02-26 12:32:48.551744208 -0500 -+++ dovecot-2.2.33.2/src/lib-master/master-service-settings-cache.c 2018-02-26 12:32:48.547744205 -0500 -@@ -1,9 +1,11 @@ - /* Copyright (c) 2010-2017 Dovecot authors, see the included COPYING file */ - - #include "lib.h" -+#include "wildcard-match.h" - #include "hash.h" - #include "llist.h" - #include "settings-parser.h" -+#include "dns-util.h" - #include "master-service-private.h" - #include "master-service-settings.h" - #include "master-service-settings-cache.h" -@@ -12,6 +14,14 @@ - #define CACHE_INITIAL_ENTRY_POOL_SIZE (1024*16) - #define CACHE_ADD_ENTRY_POOL_SIZE 1024 - -+struct config_filter { -+ struct config_filter *prev, *next; -+ -+ const char *local_name; -+ struct ip_addr local_ip, remote_ip; -+ unsigned int local_bits, remote_bits; -+}; -+ - struct settings_entry { - struct settings_entry *prev, *next; - -@@ -41,6 +51,8 @@ struct master_service_settings_cache { - HASH_TABLE(char *, struct settings_entry *) local_name_hash; - HASH_TABLE(struct ip_addr *, struct settings_entry *) local_ip_hash; - -+ struct config_filter *filters; -+ - /* Initial size for new settings entry pools */ - size_t approx_entry_pool_size; - /* number of bytes malloced by cached settings entries -@@ -70,6 +82,78 @@ master_service_settings_cache_init(struc - return cache; - } - -+int master_service_settings_cache_init_filter(struct master_service_settings_cache *cache) -+{ -+ const char *const *filters; -+ const char *error; -+ -+ if (cache->filters != NULL) -+ return 0; -+ if (master_service_settings_get_filters(cache->service, &filters, &error) < 0) { -+ i_error("master-service: cannot get filters: %s", error); -+ return -1; -+ } -+ -+ /* parse filters */ -+ while(*filters != NULL) { -+ const char *const *keys = t_strsplit_spaces(*filters, " "); -+ struct config_filter *filter = -+ p_new(cache->pool, struct config_filter, 1); -+ while(*keys != NULL) { -+ if (strncmp(*keys, "local-net=", 10) == 0) { -+ (void)net_parse_range((*keys)+10, -+ &filter->local_ip, &filter->local_bits); -+ } else if (strncmp(*keys, "remote-net=", 11) == 0) { -+ (void)net_parse_range((*keys)+11, -+ &filter->remote_ip, &filter->remote_bits); -+ } else if (strncmp(*keys, "local-name=", 11) == 0) { -+ filter->local_name = p_strdup(cache->pool, (*keys)+11); -+ } -+ keys++; -+ } -+ DLLIST_PREPEND(&cache->filters, filter); -+ filters++; -+ } -+ return 0; -+} -+ -+/* Remove any elements which there is no filter for */ -+static void -+master_service_settings_cache_fix_input(struct master_service_settings_cache *cache, -+ const struct master_service_settings_input *input, -+ struct master_service_settings_input *new_input) -+{ -+ bool found_lip, found_rip, found_local_name; -+ -+ found_lip = found_rip = found_local_name = FALSE; -+ -+ struct config_filter *filter = cache->filters; -+ while(filter != NULL) { -+ if (filter->local_bits > 0 && -+ net_is_in_network(&input->local_ip, &filter->local_ip, -+ filter->local_bits)) -+ found_lip = TRUE; -+ if (filter->remote_bits > 0 && -+ net_is_in_network(&input->remote_ip, &filter->remote_ip, -+ filter->remote_bits)) -+ found_rip = TRUE; -+ if (input->local_name != NULL && filter->local_name != NULL && -+ dns_match_wildcard(input->local_name, filter->local_name)) -+ found_local_name = TRUE; -+ filter = filter->next; -+ }; -+ -+ *new_input = *input; -+ -+ if (!found_lip) -+ i_zero(&new_input->local_ip); -+ if (!found_rip) -+ i_zero(&new_input->remote_ip); -+ if (!found_local_name) -+ new_input->local_name = NULL; -+} -+ -+ - void master_service_settings_cache_deinit(struct master_service_settings_cache **_cache) - { - struct master_service_settings_cache *cache = *_cache; -@@ -273,6 +357,12 @@ int master_service_settings_cache_read(s - return 0; - - new_input = *input; -+ if (cache->filters != NULL) { -+ master_service_settings_cache_fix_input(cache, input, &new_input); -+ if (cache_find(cache, &new_input, parser_r)) -+ return 0; -+ } -+ - if (dyn_parsers != NULL) { - settings_parser_dyn_update(cache->pool, &new_input.roots, - dyn_parsers); -Index: dovecot-2.2.33.2/src/lib-master/master-service-settings-cache.h -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-master/master-service-settings-cache.h 2018-02-26 12:32:48.551744208 -0500 -+++ dovecot-2.2.33.2/src/lib-master/master-service-settings-cache.h 2018-02-26 12:32:48.547744205 -0500 -@@ -6,7 +6,7 @@ master_service_settings_cache_init(struc - const char *module, - const char *service_name); - void master_service_settings_cache_deinit(struct master_service_settings_cache **cache); -- -+int master_service_settings_cache_init_filter(struct master_service_settings_cache *cache); - int master_service_settings_cache_read(struct master_service_settings_cache *cache, - const struct master_service_settings_input *input, - const struct dynamic_settings_parser *dyn_parsers, -Index: dovecot-2.2.33.2/src/lib-master/master-service-settings.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-master/master-service-settings.c 2018-02-26 12:32:48.551744208 -0500 -+++ dovecot-2.2.33.2/src/lib-master/master-service-settings.c 2018-02-26 12:32:48.547744205 -0500 -@@ -304,6 +304,18 @@ config_send_request(struct master_servic - } - - static int -+config_send_filters_request(int fd, const char *path, const char **error_r) -+{ -+ int ret; -+ ret = write_full(fd, CONFIG_HANDSHAKE"FILTERS\n", strlen(CONFIG_HANDSHAKE"FILTERS\n")); -+ if (ret < 0) { -+ *error_r = t_strdup_printf("write_full(%s) failed: %m", path); -+ return -1; -+ } -+ return 0; -+} -+ -+static int - master_service_apply_config_overrides(struct master_service *service, - struct setting_parser_context *parser, - const char **error_r) -@@ -399,6 +411,54 @@ void master_service_config_socket_try_op - service->config_fd = fd; - } - -+int master_service_settings_get_filters(struct master_service *service, -+ const char *const **filters, -+ const char **error_r) -+{ -+ struct master_service_settings_input input; -+ int fd; -+ bool retry = TRUE; -+ const char *path = NULL; -+ ARRAY_TYPE(const_string) filters_tmp; -+ t_array_init(&filters_tmp, 8); -+ i_zero(&input); -+ -+ if (getenv("DOVECONF_ENV") == NULL && -+ (service->flags & MASTER_SERVICE_FLAG_NO_CONFIG_SETTINGS) == 0) { -+ retry = service->config_fd != -1; -+ for (;;) { -+ fd = master_service_open_config(service, &input, &path, error_r); -+ if (fd == -1) { -+ return -1; -+ } -+ if (config_send_filters_request(fd, path, error_r) == 0) -+ break; -+ -+ i_close_fd(&fd); -+ if (!retry) -+ return -1; -+ retry = FALSE; -+ } -+ service->config_fd = fd; -+ struct istream *is = i_stream_create_fd(fd, (size_t)-1, FALSE); -+ const char *line; -+ /* try read response */ -+ while((line = i_stream_read_next_line(is)) != NULL) { -+ if (*line == '\0') -+ break; -+ if (strncmp(line, "FILTER\t", 7) == 0) { -+ line = t_strdup(line+7); -+ array_append(&filters_tmp, &line, 1); -+ } -+ } -+ i_stream_unref(&is); -+ } -+ -+ array_append_zero(&filters_tmp); -+ *filters = array_idx(&filters_tmp, 0); -+ return 0; -+} -+ - int master_service_settings_read(struct master_service *service, - const struct master_service_settings_input *input, - struct master_service_settings_output *output_r, -Index: dovecot-2.2.33.2/src/lib-master/master-service-settings.h -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-master/master-service-settings.h 2018-02-26 12:32:48.551744208 -0500 -+++ dovecot-2.2.33.2/src/lib-master/master-service-settings.h 2018-02-26 12:32:48.547744205 -0500 -@@ -67,6 +67,9 @@ extern const struct setting_parser_info - /* Try to open the config socket if it's going to be needed later by - master_service_settings_read*() */ - void master_service_config_socket_try_open(struct master_service *service); -+int master_service_settings_get_filters(struct master_service *service, -+ const char *const **filters, -+ const char **error_r); - int master_service_settings_read(struct master_service *service, - const struct master_service_settings_input *input, - struct master_service_settings_output *output_r, -Index: dovecot-2.2.33.2/src/lib-master/test-master-service-settings-cache.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-master/test-master-service-settings-cache.c 2018-02-26 12:32:48.551744208 -0500 -+++ dovecot-2.2.33.2/src/lib-master/test-master-service-settings-cache.c 2018-02-26 12:32:48.547744205 -0500 -@@ -53,6 +53,14 @@ int master_service_settings_read(struct - return 0; - } - -+int master_service_settings_get_filters(struct master_service *service ATTR_UNUSED, -+ const char *const **filters ATTR_UNUSED, -+ const char **error_r ATTR_UNUSED) -+{ -+ return -1; -+} -+ -+ - const struct master_service_settings * - master_service_settings_get(struct master_service *service ATTR_UNUSED) - { diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0005-login-common-Enable-config-filtering-by-local-name.patch dovecot-2.3.3/debian/patches/CVE-2017-15130/0005-login-common-Enable-config-filtering-by-local-name.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0005-login-common-Enable-config-filtering-by-local-name.patch 2018-02-26 17:33:27.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15130/0005-login-common-Enable-config-filtering-by-local-name.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -From bc27538d084e01a7a1aca3330e27aebfc0e311eb Mon Sep 17 00:00:00 2001 -From: Aki Tuomi -Date: Thu, 30 Nov 2017 20:52:11 +0200 -Subject: [PATCH 5/6] login-common: Enable config filtering by local name - -Prevents servername misuse. ---- - src/login-common/login-settings.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -Index: dovecot-2.2.33.2/src/login-common/login-settings.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/login-common/login-settings.c 2018-02-26 12:33:24.563777040 -0500 -+++ dovecot-2.2.33.2/src/login-common/login-settings.c 2018-02-26 12:33:24.563777040 -0500 -@@ -183,6 +183,14 @@ login_settings_read(pool_t pool, - set_cache = master_service_settings_cache_init(master_service, - input.module, - input.service); -+ /* lookup filters -+ -+ this is only enabled if service_count > 1 because otherwise -+ login process will process only one request and this is only -+ useful when more than one request is processed. -+ */ -+ if (master_service_get_service_count(master_service) > 1) -+ master_service_settings_cache_init_filter(set_cache); - } - - if (master_service_settings_cache_read(set_cache, &input, NULL, diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0006-lib-master-Fix-dns_match_wildcard-result-value-check.patch dovecot-2.3.3/debian/patches/CVE-2017-15130/0006-lib-master-Fix-dns_match_wildcard-result-value-check.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15130/0006-lib-master-Fix-dns_match_wildcard-result-value-check.patch 2018-02-26 17:33:31.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15130/0006-lib-master-Fix-dns_match_wildcard-result-value-check.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -From 00016646cc32a3fa1cf54c22ed7388ed06bbc0f1 Mon Sep 17 00:00:00 2001 -From: Aki Tuomi -Date: Mon, 26 Feb 2018 12:53:19 +0200 -Subject: [PATCH 6/6] lib-master: Fix dns_match_wildcard result value check - -It returns 0, not TRUE. - -diff --git a/src/lib-master/master-service-settings-cache.c b/src/lib-master/master-service-settings-cache.c -index 11e9204..471c6a1 100644 ---- a/src/lib-master/master-service-settings-cache.c -+++ b/src/lib-master/master-service-settings-cache.c -@@ -138,7 +138,7 @@ master_service_settings_cache_fix_input(struct master_service_settings_cache *ca - filter->remote_bits)) - found_rip = TRUE; - if (input->local_name != NULL && filter->local_name != NULL && -- dns_match_wildcard(input->local_name, filter->local_name)) -+ dns_match_wildcard(input->local_name, filter->local_name) == 0) - found_local_name = TRUE; - filter = filter->next; - }; diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15132-additional.patch dovecot-2.3.3/debian/patches/CVE-2017-15132-additional.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15132-additional.patch 2018-02-23 14:48:23.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15132-additional.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -From a9b135760aea6d1790d447d351c56b78889dac22 Mon Sep 17 00:00:00 2001 -From: Aki Tuomi -Date: Fri, 26 Jan 2018 10:55:54 +0200 -Subject: [PATCH] lib-auth: Remove request after abort - -Otherwise the request will still stay in hash table -and get dereferenced when all requests are aborted -causing an attempt to access free'd memory. - -Found by Apollon Oikonomopoulos - -Broken in 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 ---- - src/lib-auth/auth-client-request.c | 2 ++ - src/lib-auth/auth-server-connection.c | 7 +++++++ - src/lib-auth/auth-server-connection.h | 2 ++ - 3 files changed, 11 insertions(+) - -Index: dovecot-2.2.33.2/src/lib-auth/auth-client-request.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-auth/auth-client-request.c -+++ dovecot-2.2.33.2/src/lib-auth/auth-client-request.c -@@ -180,6 +180,8 @@ void auth_client_request_abort(struct au - - auth_client_send_cancel(request->conn->client, request->id); - call_callback(request, AUTH_REQUEST_STATUS_ABORT, NULL, NULL); -+ /* remove the request */ -+ auth_server_connection_remove_request(request->conn, request->id); - pool_unref(&request->pool); - } - -Index: dovecot-2.2.33.2/src/lib-auth/auth-server-connection.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-auth/auth-server-connection.c -+++ dovecot-2.2.33.2/src/lib-auth/auth-server-connection.c -@@ -481,3 +481,10 @@ auth_server_connection_add_request(struc - hash_table_insert(conn->requests, POINTER_CAST(id), request); - return id; - } -+ -+void auth_server_connection_remove_request(struct auth_server_connection *conn, -+ unsigned int id) -+{ -+ i_assert(conn->handshake_received); -+ hash_table_remove(conn->requests, POINTER_CAST(id)); -+} -Index: dovecot-2.2.33.2/src/lib-auth/auth-server-connection.h -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-auth/auth-server-connection.h -+++ dovecot-2.2.33.2/src/lib-auth/auth-server-connection.h -@@ -38,4 +38,6 @@ void auth_server_connection_disconnect(s - unsigned int - auth_server_connection_add_request(struct auth_server_connection *conn, - struct auth_client_request *request); -+void auth_server_connection_remove_request(struct auth_server_connection *conn, -+ unsigned int id); - #endif diff -Nru dovecot-2.2.33.2/debian/patches/CVE-2017-15132.patch dovecot-2.3.3/debian/patches/CVE-2017-15132.patch --- dovecot-2.2.33.2/debian/patches/CVE-2017-15132.patch 2018-02-23 14:48:23.000000000 +0000 +++ dovecot-2.3.3/debian/patches/CVE-2017-15132.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -From 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Mon, 18 Dec 2017 16:50:51 +0200 -Subject: [PATCH] lib-auth: Fix memory leak in auth_client_request_abort() - -This caused memory leaks when authentication was aborted. For example -with IMAP: - -a AUTHENTICATE PLAIN -* - -Broken by 9137c55411aa39d41c1e705ddc34d5bd26c65021 ---- - src/lib-auth/auth-client-request.c | 1 + - 1 file changed, 1 insertion(+) - -Index: dovecot-2.2.33.2/src/lib-auth/auth-client-request.c -=================================================================== ---- dovecot-2.2.33.2.orig/src/lib-auth/auth-client-request.c -+++ dovecot-2.2.33.2/src/lib-auth/auth-client-request.c -@@ -180,6 +180,7 @@ void auth_client_request_abort(struct au - - auth_client_send_cancel(request->conn->client, request->id); - call_callback(request, AUTH_REQUEST_STATUS_ABORT, NULL, NULL); -+ pool_unref(&request->pool); - } - - unsigned int auth_client_request_get_id(struct auth_client_request *request) diff -Nru dovecot-2.2.33.2/debian/patches/debian-changes dovecot-2.3.3/debian/patches/debian-changes --- dovecot-2.2.33.2/debian/patches/debian-changes 1970-01-01 00:00:00.000000000 +0000 +++ dovecot-2.3.3/debian/patches/debian-changes 2018-11-15 10:58:22.000000000 +0000 @@ -0,0 +1,134130 @@ +This patch contains the pigeonhole sieve implementation from +https://github.com/dovecot/pigeonhole. It is automatically generated from the +package's git tree on build. +--- /dev/null ++++ dovecot-2.3.3/pigeonhole/AUTHORS +@@ -0,0 +1,8 @@ ++Stephan Bosch ++ ++This package is built for and partly based on the Dovecot Secure IMAP server ++written by: ++ ++Timo Sirainen . ++ ++Grepping 'patch by' from ChangeLog shows up more people. +--- /dev/null ++++ dovecot-2.3.3/pigeonhole/COPYING +@@ -0,0 +1,4 @@ ++See AUTHORS file for list of copyright holders. ++ ++Everything is licenced under LGPLv2.1 (see COPYING.LGPL) unless otherwise ++mentioned at the beginning of the file. +--- /dev/null ++++ dovecot-2.3.3/pigeonhole/COPYING.LGPL +@@ -0,0 +1,502 @@ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ Version 2.1, February 1999 ++ ++ Copyright (C) 1991, 1999 Free Software Foundation, Inc. ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++[This is the first released version of the Lesser GPL. It also counts ++ as the successor of the GNU Library Public License, version 2, hence ++ the version number 2.1.] ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++Licenses are intended to guarantee your freedom to share and change ++free software--to make sure the software is free for all its users. ++ ++ This license, the Lesser General Public License, applies to some ++specially designated software packages--typically libraries--of the ++Free Software Foundation and other authors who decide to use it. You ++can use it too, but we suggest you first think carefully about whether ++this license or the ordinary General Public License is the better ++strategy to use in any particular case, based on the explanations below. ++ ++ When we speak of free software, we are referring to freedom of use, ++not price. Our General Public Licenses are designed to make sure that ++you have the freedom to distribute copies of free software (and charge ++for this service if you wish); that you receive source code or can get ++it if you want it; that you can change the software and use pieces of ++it in new free programs; and that you are informed that you can do ++these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++distributors to deny you these rights or to ask you to surrender these ++rights. These restrictions translate to certain responsibilities for ++you if you distribute copies of the library or if you modify it. ++ ++ For example, if you distribute copies of the library, whether gratis ++or for a fee, you must give the recipients all the rights that we gave ++you. You must make sure that they, too, receive or can get the source ++code. If you link other code with the library, you must provide ++complete object files to the recipients, so that they can relink them ++with the library after making changes to the library and recompiling ++it. And you must show them these terms so they know their rights. ++ ++ We protect your rights with a two-step method: (1) we copyright the ++library, and (2) we offer you this license, which gives you legal ++permission to copy, distribute and/or modify the library. ++ ++ To protect each distributor, we want to make it very clear that ++there is no warranty for the free library. Also, if the library is ++modified by someone else and passed on, the recipients should know ++that what they have is not the original version, so that the original ++author's reputation will not be affected by problems that might be ++introduced by others. ++ ++ Finally, software patents pose a constant threat to the existence of ++any free program. We wish to make sure that a company cannot ++effectively restrict the users of a free program by obtaining a ++restrictive license from a patent holder. Therefore, we insist that ++any patent license obtained for a version of the library must be ++consistent with the full freedom of use specified in this license. ++ ++ Most GNU software, including some libraries, is covered by the ++ordinary GNU General Public License. This license, the GNU Lesser ++General Public License, applies to certain designated libraries, and ++is quite different from the ordinary General Public License. We use ++this license for certain libraries in order to permit linking those ++libraries into non-free programs. ++ ++ When a program is linked with a library, whether statically or using ++a shared library, the combination of the two is legally speaking a ++combined work, a derivative of the original library. The ordinary ++General Public License therefore permits such linking only if the ++entire combination fits its criteria of freedom. The Lesser General ++Public License permits more lax criteria for linking other code with ++the library. ++ ++ We call this license the "Lesser" General Public License because it ++does Less to protect the user's freedom than the ordinary General ++Public License. It also provides other free software developers Less ++of an advantage over competing non-free programs. These disadvantages ++are the reason we use the ordinary General Public License for many ++libraries. However, the Lesser license provides advantages in certain ++special circumstances. ++ ++ For example, on rare occasions, there may be a special need to ++encourage the widest possible use of a certain library, so that it becomes ++a de-facto standard. To achieve this, non-free programs must be ++allowed to use the library. A more frequent case is that a free ++library does the same job as widely used non-free libraries. In this ++case, there is little to gain by limiting the free library to free ++software only, so we use the Lesser General Public License. ++ ++ In other cases, permission to use a particular library in non-free ++programs enables a greater number of people to use a large body of ++free software. For example, permission to use the GNU C Library in ++non-free programs enables many more people to use the whole GNU ++operating system, as well as its variant, the GNU/Linux operating ++system. ++ ++ Although the Lesser General Public License is Less protective of the ++users' freedom, it does ensure that the user of a program that is ++linked with the Library has the freedom and the wherewithal to run ++that program using a modified version of the Library. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. Pay close attention to the difference between a ++"work based on the library" and a "work that uses the library". The ++former contains code derived from the library, whereas the latter must ++be combined with the library in order to run. ++ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License Agreement applies to any software library or other ++program which contains a notice placed by the copyright holder or ++other authorized party saying it may be distributed under the terms of ++this Lesser General Public License (also called "this License"). ++Each licensee is addressed as "you". ++ ++ A "library" means a collection of software functions and/or data ++prepared so as to be conveniently linked with application programs ++(which use some of those functions and data) to form executables. ++ ++ The "Library", below, refers to any such software library or work ++which has been distributed under these terms. A "work based on the ++Library" means either the Library or any derivative work under ++copyright law: that is to say, a work containing the Library or a ++portion of it, either verbatim or with modifications and/or translated ++straightforwardly into another language. (Hereinafter, translation is ++included without limitation in the term "modification".) ++ ++ "Source code" for a work means the preferred form of the work for ++making modifications to it. For a library, complete source code means ++all the source code for all modules it contains, plus any associated ++interface definition files, plus the scripts used to control compilation ++and installation of the library. ++ ++ Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running a program using the Library is not restricted, and output from ++such a program is covered only if its contents constitute a work based ++on the Library (independent of the use of the Library in a tool for ++writing it). Whether that is true depends on what the Library does ++and what the program that uses the Library does. ++ ++ 1. You may copy and distribute verbatim copies of the Library's ++complete source code as you receive it, in any medium, provided that ++you conspicuously and appropriately publish on each copy an ++appropriate copyright notice and disclaimer of warranty; keep intact ++all the notices that refer to this License and to the absence of any ++warranty; and distribute a copy of this License along with the ++Library. ++ ++ You may charge a fee for the physical act of transferring a copy, ++and you may at your option offer warranty protection in exchange for a ++fee. ++ ++ 2. You may modify your copy or copies of the Library or any portion ++of it, thus forming a work based on the Library, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) The modified work must itself be a software library. ++ ++ b) You must cause the files modified to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ c) You must cause the whole of the work to be licensed at no ++ charge to all third parties under the terms of this License. ++ ++ d) If a facility in the modified Library refers to a function or a ++ table of data to be supplied by an application program that uses ++ the facility, other than as an argument passed when the facility ++ is invoked, then you must make a good faith effort to ensure that, ++ in the event an application does not supply such function or ++ table, the facility still operates, and performs whatever part of ++ its purpose remains meaningful. ++ ++ (For example, a function in a library to compute square roots has ++ a purpose that is entirely well-defined independent of the ++ application. Therefore, Subsection 2d requires that any ++ application-supplied function or table used by this function must ++ be optional: if the application does not supply it, the square ++ root function must still compute square roots.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Library, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Library, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote ++it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Library. ++ ++In addition, mere aggregation of another work not based on the Library ++with the Library (or with a work based on the Library) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may opt to apply the terms of the ordinary GNU General Public ++License instead of this License to a given copy of the Library. To do ++this, you must alter all the notices that refer to this License, so ++that they refer to the ordinary GNU General Public License, version 2, ++instead of to this License. (If a newer version than version 2 of the ++ordinary GNU General Public License has appeared, then you can specify ++that version instead if you wish.) Do not make any other change in ++these notices. ++ ++ Once this change is made in a given copy, it is irreversible for ++that copy, so the ordinary GNU General Public License applies to all ++subsequent copies and derivative works made from that copy. ++ ++ This option is useful when you wish to copy part of the code of ++the Library into a program that is not a library. ++ ++ 4. You may copy and distribute the Library (or a portion or ++derivative of it, under Section 2) in object code or executable form ++under the terms of Sections 1 and 2 above provided that you accompany ++it with the complete corresponding machine-readable source code, which ++must be distributed under the terms of Sections 1 and 2 above on a ++medium customarily used for software interchange. ++ ++ If distribution of object code is made by offering access to copy ++from a designated place, then offering equivalent access to copy the ++source code from the same place satisfies the requirement to ++distribute the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 5. A program that contains no derivative of any portion of the ++Library, but is designed to work with the Library by being compiled or ++linked with it, is called a "work that uses the Library". Such a ++work, in isolation, is not a derivative work of the Library, and ++therefore falls outside the scope of this License. ++ ++ However, linking a "work that uses the Library" with the Library ++creates an executable that is a derivative of the Library (because it ++contains portions of the Library), rather than a "work that uses the ++library". The executable is therefore covered by this License. ++Section 6 states terms for distribution of such executables. ++ ++ When a "work that uses the Library" uses material from a header file ++that is part of the Library, the object code for the work may be a ++derivative work of the Library even though the source code is not. ++Whether this is true is especially significant if the work can be ++linked without the Library, or if the work is itself a library. The ++threshold for this to be true is not precisely defined by law. ++ ++ If such an object file uses only numerical parameters, data ++structure layouts and accessors, and small macros and small inline ++functions (ten lines or less in length), then the use of the object ++file is unrestricted, regardless of whether it is legally a derivative ++work. (Executables containing this object code plus portions of the ++Library will still fall under Section 6.) ++ ++ Otherwise, if the work is a derivative of the Library, you may ++distribute the object code for the work under the terms of Section 6. ++Any executables containing that work also fall under Section 6, ++whether or not they are linked directly with the Library itself. ++ ++ 6. As an exception to the Sections above, you may also combine or ++link a "work that uses the Library" with the Library to produce a ++work containing portions of the Library, and distribute that work ++under terms of your choice, provided that the terms permit ++modification of the work for the customer's own use and reverse ++engineering for debugging such modifications. ++ ++ You must give prominent notice with each copy of the work that the ++Library is used in it and that the Library and its use are covered by ++this License. You must supply a copy of this License. If the work ++during execution displays copyright notices, you must include the ++copyright notice for the Library among them, as well as a reference ++directing the user to the copy of this License. Also, you must do one ++of these things: ++ ++ a) Accompany the work with the complete corresponding ++ machine-readable source code for the Library including whatever ++ changes were used in the work (which must be distributed under ++ Sections 1 and 2 above); and, if the work is an executable linked ++ with the Library, with the complete machine-readable "work that ++ uses the Library", as object code and/or source code, so that the ++ user can modify the Library and then relink to produce a modified ++ executable containing the modified Library. (It is understood ++ that the user who changes the contents of definitions files in the ++ Library will not necessarily be able to recompile the application ++ to use the modified definitions.) ++ ++ b) Use a suitable shared library mechanism for linking with the ++ Library. A suitable mechanism is one that (1) uses at run time a ++ copy of the library already present on the user's computer system, ++ rather than copying library functions into the executable, and (2) ++ will operate properly with a modified version of the library, if ++ the user installs one, as long as the modified version is ++ interface-compatible with the version that the work was made with. ++ ++ c) Accompany the work with a written offer, valid for at ++ least three years, to give the same user the materials ++ specified in Subsection 6a, above, for a charge no more ++ than the cost of performing this distribution. ++ ++ d) If distribution of the work is made by offering access to copy ++ from a designated place, offer equivalent access to copy the above ++ specified materials from the same place. ++ ++ e) Verify that the user has already received a copy of these ++ materials or that you have already sent this user a copy. ++ ++ For an executable, the required form of the "work that uses the ++Library" must include any data and utility programs needed for ++reproducing the executable from it. However, as a special exception, ++the materials to be distributed need not include anything that is ++normally distributed (in either source or binary form) with the major ++components (compiler, kernel, and so on) of the operating system on ++which the executable runs, unless that component itself accompanies ++the executable. ++ ++ It may happen that this requirement contradicts the license ++restrictions of other proprietary libraries that do not normally ++accompany the operating system. Such a contradiction means you cannot ++use both them and the Library together in an executable that you ++distribute. ++ ++ 7. You may place library facilities that are a work based on the ++Library side-by-side in a single library together with other library ++facilities not covered by this License, and distribute such a combined ++library, provided that the separate distribution of the work based on ++the Library and of the other library facilities is otherwise ++permitted, and provided that you do these two things: ++ ++ a) Accompany the combined library with a copy of the same work ++ based on the Library, uncombined with any other library ++ facilities. This must be distributed under the terms of the ++ Sections above. ++ ++ b) Give prominent notice with the combined library of the fact ++ that part of it is a work based on the Library, and explaining ++ where to find the accompanying uncombined form of the same work. ++ ++ 8. You may not copy, modify, sublicense, link with, or distribute ++the Library except as expressly provided under this License. Any ++attempt otherwise to copy, modify, sublicense, link with, or ++distribute the Library is void, and will automatically terminate your ++rights under this License. However, parties who have received copies, ++or rights, from you under this License will not have their licenses ++terminated so long as such parties remain in full compliance. ++ ++ 9. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Library or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Library (or any work based on the ++Library), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Library or works based on it. ++ ++ 10. Each time you redistribute the Library (or any work based on the ++Library), the recipient automatically receives a license from the ++original licensor to copy, distribute, link with or modify the Library ++subject to these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties with ++this License. ++ ++ 11. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Library at all. For example, if a patent ++license would not permit royalty-free redistribution of the Library by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Library. ++ ++If any portion of this section is held invalid or unenforceable under any ++particular circumstance, the balance of the section is intended to apply, ++and the section as a whole is intended to apply in other circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 12. If the distribution and/or use of the Library is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Library under this License may add ++an explicit geographical distribution limitation excluding those countries, ++so that distribution is permitted only in or among countries not thus ++excluded. In such case, this License incorporates the limitation as if ++written in the body of this License. ++ ++ 13. The Free Software Foundation may publish revised and/or new ++versions of the Lesser General Public License from time to time. ++Such new versions will be similar in spirit to the present version, ++but may differ in detail to address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Library ++specifies a version number of this License which applies to it and ++"any later version", you have the option of following the terms and ++conditions either of that version or of any later version published by ++the Free Software Foundation. If the Library does not specify a ++license version number, you may choose any version ever published by ++the Free Software Foundation. ++ ++ 14. If you wish to incorporate parts of the Library into other free ++programs whose distribution conditions are incompatible with these, ++write to the author to ask for permission. For software which is ++copyrighted by the Free Software Foundation, write to the Free ++Software Foundation; we sometimes make exceptions for this. Our ++decision will be guided by the two goals of preserving the free status ++of all derivatives of our free software and of promoting the sharing ++and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO ++WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ++EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR ++OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY ++KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE ++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ++LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME ++THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ++ ++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ++WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ++AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU ++FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR ++CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE ++LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING ++RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A ++FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF ++SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH ++DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Libraries ++ ++ If you develop a new library, and you want it to be of the greatest ++possible use to the public, we recommend making it free software that ++everyone can redistribute and change. You can do so by permitting ++redistribution under these terms (or, alternatively, under the terms of the ++ordinary General Public License). ++ ++ To apply these terms, attach the following notices to the library. It is ++safest to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least the ++"copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the library, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the ++ library `Frob' (a library for tweaking knobs) written by James Random Hacker. ++ ++ , 1 April 1990 ++ Ty Coon, President of Vice ++ ++That's all there is to it! +--- /dev/null ++++ dovecot-2.3.3/pigeonhole/INSTALL +@@ -0,0 +1,874 @@ ++Compiling ++========= ++ ++If you downloaded the sources using Mercurial, you will need to execute ++./autogen.sh first to build the automake structure in your source tree. This ++process requires autotools and libtool to be installed. ++ ++If you installed Dovecot from sources, Pigeonhole's configure script should be ++able to find the installed dovecot-config automatically: ++ ++./configure ++make ++sudo make install ++ ++If your system uses a $prefix different than the default /usr/local, the ++configure script can still find the installed dovecot-config automatically when ++supplied with the proper --prefix argument: ++ ++./configure --prefix=/usr ++make ++sudo make install ++ ++If this doesn't work, you can use --with-dovecot= configure option, where ++the path points to a directory containing dovecot-config file. This can point to ++an installed file: ++ ++./configure --with-dovecot=/usr/local/lib/dovecot ++make ++sudo make install ++ ++or to a Dovecot source directory that is already compiled: ++ ++./configure --with-dovecot=../dovecot-2.1.0 ++make ++sudo make install ++ ++The following additional parameters may be of interest for the configuration of ++the Pigeonhole build: ++ ++ --with-managesieve=yes ++ Controls whether Pigeonhole ManageSieve is compiled and installed, which is ++ the default. ++ ++ --with-unfinished-features=no ++ Controls whether unfinished features and extensions are built. Enabling this ++ will enable the compilation of code that is considered unfinished and highly ++ experimental and may therefore introduce bugs and unexpected behavior. ++ In fact, it may not compile at all. Enable this only when you are eager to ++ test some of the new development functionality. ++ ++ --with-ldap=no ++ Controls wether Sieve LDAP support is built. This allows retrieving Sieve ++ scripts from an LDAP database. When set to `yes', support is built in. When ++ set to `plugin', LDAP support is compiled into a Sieve plugin called ++ `sieve_storage_ldap'. ++ ++Configuration ++============= ++ ++The Pigeonhole package provides the following items: ++ ++ - The Sieve interpreter plugin for Dovecot's Local Delivery Agent (LDA): This ++ facilitates the actual Sieve filtering upon delivery. ++ ++ - The ManageSieve Service: This implements the ManageSieve protocol through ++ which users can remotely manage Sieve scripts on the server. ++ ++The functionality of these items is described in more detail in the README file. ++In this file and in this section their configuration is described. Example ++configuration files are provided in the doc/example-config directory of this ++package. ++ ++Sieve Interpreter - Script Locations ++------------------------------------ ++ ++The Sieve interpreter can retrieve Sieve scripts from several types of ++locations. The default `file' location type is a local filesystem path pointing ++to a Sieve script file or a directory containing multiple Sieve script files. ++More complex setups can use other location types such as `ldap' or `dict' to ++fetch Sieve scripts from remote databases. ++ ++All settings that specify the location of one ore more Sieve scripts accept the ++following syntax: ++ ++location = [:]path[;