2018-07-09 10:47:03 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (0719df592)

    Released v2.3.2.1.


M	NEWS
M	configure.ac

2018-07-02 11:52:14 +0100 Paul Howarth <paul@city-fan.org> (f7c56d4b1)

    lib-compression: Fix assert-crash in test suite on 32bit systems

    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.

M	src/lib-compression/test-compression.c

2018-07-06 11:25:07 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (6c7efd9dd)

    lib-ssl-iostream: Shutdown connection cleanly whenever i/ostream is
    destroyed

    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.

M	src/lib-ssl-iostream/istream-openssl.c
M	src/lib-ssl-iostream/ostream-openssl.c

2018-07-06 11:24:41 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (c6d7e0d24)

    lib-ssl-iostream: Split code to openssl_iostream_shutdown()


M	src/lib-ssl-iostream/iostream-openssl.c
M	src/lib-ssl-iostream/iostream-openssl.h

2018-06-12 16:07:25 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (bc10a45e9)

    lib-storage: Fix memory leak when mail_storage_service_next() is called
    multiple times

    dsync uses it twice for the same mail_storage_service_user.

M	src/lib-storage/mail-storage-service.c

2018-06-28 17:52:55 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (582970113)

    Released v2.3.2.


M	NEWS
M	configure.ac

2018-06-19 12:33:49 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (cb05284d7)

    imapc: Fix handling UIDVALIDITY changes

    Index was being correctly reset, but the transaction was rolled back.

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

2018-06-19 12:31:43 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (8952ef673)

    lib-index: Make sure error is set on sync & commit failures

    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

2018-06-17 01:14:42 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (6bae54415)

    Released v2.3.2.rc1


M	NEWS
M	configure.ac

2018-06-18 17:03:01 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (8ffa9f269)

    lib: When log writing keeps returning EAGAIN, change process title only once

    Otherwise each call will use up data stack memory.

M	src/lib/failures.c

2018-06-18 16:19:55 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (daaf81513)

    lib: If log write returns EAGAIN, use poll() instead of ioloop for waiting

    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.

M	src/lib/failures.c

2018-06-18 16:07:30 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (ad5447e35)

    lib: Revert earlier "log write is blocking" handling change

    1) It was buggy, because it set O_NONBLOCK rather than removing it.

    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.

    Reverts 861d40b9aebabccae7d48e49a18cbc631ab1fefe

M	src/lib/failures.c

2018-05-03 15:22:09 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (6f364a136)

    fs-posix: mkdir missing directory if it's changed by FS_METADATA_WRITE_FNAME

    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-fs/fs-posix.c

2018-01-31 19:48:49 +0200 Aki Tuomi <aki.tuomi@dovecot.fi> (3f310ab60)

    lib-imap: imap_match_deinit(NULL) should be a no-op


M	src/lib-imap/imap-match.c

2018-02-25 19:13:18 +0100 Stephan Bosch <stephan.bosch@dovecot.fi> (28983eb41)

    lib: iostream-pump: Make iostream_pump_unref() implementation match other
    similar code.

    This also means that iostream_pump_unref(NULL) is now a no-op.

M	src/lib/iostream-pump.c
M	src/lib/iostream-pump.h

2018-05-25 11:07:38 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (4db613a47)

    lib-fs: fs_unlock(NULL) should be a no-op


M	src/lib-fs/fs-api.c

2018-05-25 11:03:25 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (919db520f)

    global: start relying on fs_iter_deinit(NULL) being a no-op


M	src/lib-dict-extra/dict-fs.c

2018-05-25 11:02:56 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (8f7561879)

    lib-fs: fs_iter_deinit(NULL) should be a no-op


M	src/lib-fs/fs-api.c

2018-05-25 10:53:54 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (4cabfcd06)

    global: start relying on fs_deinit(NULL) and fs_unref(NULL) being no-ops

    Cleanup performed with the following semantic patch:

    	@@
    expression E;
    @@

    	- if (E != NULL) {
    - 	fs_unref(&E);
    - }
    + fs_unref(&E);

    	@@
    expression E;
    @@

    	- if (E != NULL) {
    - 	fs_deinit(&E);
    - }
    + fs_deinit(&E);

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

2018-05-25 10:48:29 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (3eb5fc7ad)

    lib-fs: fs_unref(NULL) should be a no-op


M	src/lib-fs/fs-api.c

2018-05-25 10:38:36 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (1714aa0a0)

    global: start relying on fs_file_close(NULL) being a no-op

    Cleanup performed with the following semantic patch:

    	@@
    expression E;
    @@

    	- if (E != NULL) {
    - 	fs_file_close(E);
    - }
    + fs_file_close(E);

M	src/lib-fs/fs-metawrap.c
M	src/plugins/fs-compress/fs-compress.c
M	src/plugins/mail-crypt/fs-crypt-common.c

2018-05-25 10:35:35 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (13afec579)

    lib-fs: fs_file_close(NULL) should be a no-op


M	src/lib-fs/fs-api.c

2018-05-25 10:31:27 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (f7fac54b5)

    global: start relying on fs_file_deinit(NULL) being a no-op

    Cleanup performed with the following semantic patch:

    	@@
    expression E;
    @@

    	- if (E != NULL) {
    - 	fs_file_deinit(&E);
    - }
    + fs_file_deinit(&E);

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

2018-05-25 10:18:34 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (14829716f)

    lib-fs: fs_file_deinit(NULL) should be a no-op


M	src/lib-fs/fs-api.c

2018-05-25 19:13:30 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (de3f7051b)

    global: start relying on http_client_request_abort(NULL) being a no-op

    Cleanup performed with the following semantic patch:

    	@@
    expression E;
    @@

    	- if (E != NULL) {
    - 	http_client_request_abort(&E);
    - }
    + http_client_request_abort(&E);

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

2018-05-25 19:11:35 -0400 Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> (30f854e6e)

    lib-http: http_client_request_abort(NULL) should be a no-op


M	src/lib-http/http-client-request.c

2018-06-07 14:20:33 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (bf307d4c2)

    imap: Finish client ostream at disconnect

    With IMAP COMPRESS this sends the EOF marker, indicating cleanly closed 
    connection.

M	src/imap/imap-client.c

2018-03-04 20:09:21 +0200 Aki Tuomi <aki.tuomi@dovecot.fi> (d1972d1d6)

    lib-lua: Remove script from linked list on destroy

    Otherwise it might cause a crash

M	src/lib-lua/dlua-script.c

2018-04-17 12:20:26 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (18fbc4a90)

    lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage

    f8aaa6e63a56085f61f128838ad7a3aa080d9d5b introduced warnings on gcc

M	src/lib-ssl-iostream/iostream-openssl-context.c

2018-06-12 15:31:35 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (b06a22f1d)

    global: Fix str_begins() usage

    I messed up their cherry-pick merging.

M	src/lib-fs/fs-posix.c
M	src/lib-program-client/program-client.c

2018-03-07 18:56:00 +0100 Stephan Bosch <stephan.bosch@dovecot.fi> (b9969c4d2)

    lda: Fix error message for invalid -r parameter to mention `-r' rather than
    `-a'.


M	src/lda/main.c

2018-03-07 18:54:38 +0100 Stephan Bosch <stephan.bosch@dovecot.fi> (b87c67779)

    lda: Add -r parameter to usage help message.


M	src/lda/main.c

2018-05-03 18:33:25 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (5af358949)

    fts: When indexing virtual mailbox, index each real mailbox entirely

    Index all the unindexed messages in them at once, instead of jumping between 
    real mailboxes and indexing them in small pieces.

M	src/plugins/fts/fts-storage.c

2018-05-03 18:33:00 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (e209e104a)

    fts: Indexing virtual mailbox didn't always index the last mails


M	src/plugins/fts/fts-storage.c

2018-05-03 18:30:51 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (107b32376)

    fts: Make sure indexing virtual mailbox doesn't recurse and index mail
    multiple times


M	src/plugins/fts/fts-storage.c

2018-06-08 19:56:01 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (42e32102a)

    doveadm: Fix compiler warning


M	src/doveadm/client-connection-tcp.c

2018-05-17 18:35:04 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (0db446f13)

    lib-master: postlogin: Don't unreference already closed login-connection

    If the login-connection was already closed, this caused too many 
    unreferences.

    Fixes: Panic: file master-login.c: line 544 (master_login_conn_unref):
    assertion failed: (conn->clients == NULL)

M	src/lib-master/master-login.c

2018-05-04 15:27:14 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (4c7f044d8)

    auth: Improve auth-master connections' error logging

    Include connect and handshake times in the error message.

M	src/auth/auth-master-connection.c
M	src/auth/auth-master-connection.h
M	src/auth/auth-request-handler.c

2018-05-04 14:14:35 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (e8cddebde)

    lib-master: Add auth connect & handshake times to master_login_auth_request
    errors


M	src/lib-master/master-login-auth.c

2018-05-04 14:10:49 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (9d00608a6)

    lib-master: Add request time also for internal failure error messages


M	src/lib-master/master-login-auth.c

2018-05-04 14:03:46 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (207dcaf69)

    lib-master: Use more exact timestamp in master_login_auth_request failures


M	src/lib-master/master-login-auth.c

2018-05-04 13:56:45 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (5da2d47ca)

    lib-master: Improve error logging for master_auth_connection failures


M	src/lib-master/master-auth.c

2018-05-04 13:42:23 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (e2250ad44)

    lib-master: Improve error logging for post-login script failures


M	src/lib-master/master-login.c
M	src/lib-master/master-login.h

2018-05-04 13:23:07 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (082f6f244)

    lib-master: Improve error logging when master_login_connection gets
    disconnected


M	src/lib-master/master-login.c
M	src/lib-master/master-login.h

2018-05-04 13:07:50 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (54c421010)

    lib-master: Keep linked list of master_login_clients per connection

    This allows improving logging on connection errors.

M	src/lib-master/master-login.c
M	src/lib-master/master-login.h

2018-04-13 16:14:18 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (f37d91677)

    lib-master: If connect() to backend UNIX socket is retried, log a warning

    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.

    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.

M	src/lib-master/master-auth.c

2018-04-13 16:12:27 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (7cf910e89)

    lib-master: Add how long request took for "Internal auth failure" errors


M	src/lib-master/master-login-auth.c

2018-01-11 15:35:42 +0200 Phil Carmody <phil@dovecot.fi> (1367401f9)

    global - migrate more complicated strncmp expressions to str_begins

    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.

    --- 8< --- strncmp2.cocci ---
    @@ expression e1, e2; identifier i2;
    @@

      i2 = strlen(e2)
     ...
    - strncmp(e1, e2, i2) == 0
    + str_begins(e1, e2)

    @@ expression e1, e2; identifier i2;
    @@

      i2 = strlen(e2)
     ...
    - strncmp(e1, e2, i2) != 0
    + !str_begins(e1, e2)

    @@ expression e1, e2; identifier i1;
    @@

      i1 = strlen(e1)
     ...
    - strncmp(e1, e2, i1) == 0
    + str_begins(e2, e1)

    @@ expression e1, e2; identifier i1;
    @@

      i1 = strlen(e1)
     ...
    - strncmp(e1, e2, i1) != 0
    + !str_begins(e2, e1)

    --- 8< ---------------------

    Signed-off-by: Phil Carmody <phil@dovecot.fi>

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

2018-01-11 15:20:09 +0200 Phil Carmody <phil@dovecot.fi> (d026e2d2e)

    global - migrate from strncmp to str_begins

    Simplify a bunch of verbose strncmp(,,strlen()) calls.

    --- 8< --- strncmp.cocci ---
    @@ expression e1, e2;
    @@

    - strncmp(e1, e2, strlen(e2)) == 0
    + str_begins(e1, e2)

    @@ expression e1, e2;
    @@

    - strncmp(e1, e2, strlen(e2)) != 0
    + !str_begins(e1, e2)

    @@ expression e1, e2;
    @@

    - strncmp(e1, e2, strlen(e1)) == 0
    + str_begins(e2, e1)

    @@ expression e1, e2;
    @@

    - strncmp(e1, e2, strlen(e1)) != 0
    + !str_begins(e2, e1)

    --- 8< ---------------------

    Signed-off-by: Phil Carmody <phil@dovecot.fi>

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

2018-01-11 15:03:36 +0200 Phil Carmody <phil@dovecot.fi> (9be765076)

    global - migrate strncmp literals to str_begins

    Simplify a bunch of strncmp(,,number) calls.

    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'

    I ran a longer script to verify that all of the string literals and the
    length matched. They didn't:

    $ 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 &&

    With the new functions, that kind of typo is impossible.

    Signed-off-by: Phil Carmody <phil@dovecot.fi>

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-02-02 14:27:58 +0200 Phil Carmody <phil@dovecot.fi> (ad6c57faf)

    lib: strfuncs - string match length and prefix checking helpers

    strncmp(input, "literal", 7) is an idiom used everywhere, but leaves room
    for human error in calculating the length.

    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.

    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.

    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 <phil@dovecot.fi>

M	src/lib/strfuncs.c
M	src/lib/strfuncs.h
M	src/lib/test-strfuncs.c

2018-06-05 20:28:45 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (d7b27d1c7)

    doveadm: Simplify destroying ioloop using o_stream_switch_ioloop_to()


M	src/doveadm/client-connection-http.c
M	src/doveadm/client-connection-tcp.c

2018-06-05 20:23:52 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (9db5a1d01)

    doveadm-server: Fix hang when sending a lot of output to clients

    Nowadays ostream adds its io to the stream's specified ioloop, not to 
    current ioloop.

M	src/doveadm/client-connection-tcp.c

2018-04-06 17:57:30 +0200 Fabian Freyer <fabian.freyer@physik.tu-berlin.de> (fefa9c470)

    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/index/index-storage.c

2018-04-29 12:17:45 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (21aa3158b)

    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/lib-event.c

2018-05-18 15:56:15 +0200 Stephan Bosch <stephan.bosch@dovecot.fi> (ca66aa9ed)

    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-http/http-client.c

2018-05-18 12:47:02 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (a6ab92792)

    lib: Fix potential crashes when writing to log fails with EAGAIN

    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/failures.c

2018-03-12 13:58:02 +0200 Timo Sirainen <timo.sirainen@dovecot.fi> (19985774b)

    lib-ssl-iostream: Fix potential crash if istream is destroyed before ostream

    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-ssl-iostream/iostream-openssl.c
M	src/lib-ssl-iostream/ostream-openssl.c

2018-04-24 11:46:21 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (45bda1946)

    systemd: Indicate where changes should be made


M	dovecot.service.in

2018-04-24 11:45:36 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (4a87bf15b)

    systemd: Increase file descriptors by default


M	dovecot.service.in

2018-04-24 11:45:07 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (5eae0e4df)

    systemd: Allow writing to home by default


M	dovecot.service.in

2018-04-24 11:44:33 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (8f0265f98)

    systemd: Remove NoNewPrivileges and CAP_BOUNDING_SET

    These break sieve by preventing SUID binary as sendmail_path.

M	dovecot.service.in

2018-06-05 13:57:26 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (6472b5cc0)

    lib-compression: Use i_stream_nonseekable_try_seek() instead of
    reimplementing it


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

2018-06-05 13:53:51 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (70aaf84c3)

    lib-compression: Use i_stream_default_stat() instead of reimplementing it


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

2018-06-05 14:22:08 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (7866c3ecf)

    lib-compression: deflate ostream - Use Z_FINISH on final flush

    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-compression/ostream-zlib.c
M	src/lib-compression/test-compression.c

2018-06-05 13:34:47 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (bd7afb3d1)

    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/istream-private.h
M	src/lib/istream.c

2018-06-05 13:34:02 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (3e626387c)

    lib-dcrypt: istream-decrypt - Add support for seeking


M	src/lib-dcrypt/istream-decrypt.c
M	src/lib-dcrypt/test-stream.c

2018-06-05 13:25:30 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (86536a2f7)

    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/istream-private.h
M	src/lib/istream.c

2018-05-29 11:53:15 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (8e9693f17)

    pop3c: Ensure pop3c index directory is autocreated

    Otherwise we might think that the box has been unexpectedly autodeleted and
    pop3_migration will fail.

    Broken by 91ee70ed04d33fecd7fc94621f236013d520d7b3

M	src/lib-storage/index/pop3c/pop3c-storage.c

2018-05-21 19:38:29 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (755a4fe7c)

    lib-storage: maildir - Remove unnecessary variable


M	src/lib-storage/index/maildir/maildir-save.c

2018-05-21 14:31:58 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (c1dc49287)

    lib-storage: maildir - Use index keywords only when saving mail

    This fixes mail attachment keywords to work with maildir too.

M	src/lib-storage/index/maildir/maildir-save.c

2018-05-21 14:28:03 +0300 Aki Tuomi <aki.tuomi@dovecot.fi> (59eb90663)

    lib-storage: maildir - Use array code for keywords when saving mail

    This is safer alternative and makes following change easier.

M	src/lib-storage/index/maildir/maildir-save.c

2018-05-18 10:24:46 +0200 Stephan Bosch <stephan.bosch@dovecot.fi> (e3dc64746)

    lib-smtp: client: Fix assertion panic occurring when DATA dot stream cannot
    be finished immediately.

    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.

    Panic was:

    Panic: file ostream.c: line 394 (o_stream_send_istream): assertion failed:
    (!_outstream->finished)

M	src/lib-smtp/smtp-client-command.c
M	src/lib-smtp/smtp-client-private.h

2018-05-27 15:48:42 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (07660d37a)

    imap: Log unhibernation debug message only with mail_debug=yes


M	src/imap/imap-state.c

2018-05-23 17:13:23 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (637b84dbd)

    doveadm director: Remove unnecessary extra newlines from output


M	src/doveadm/doveadm-director.c

2018-04-16 16:29:38 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (d2eaf7ac7)

    lib-ssl-iostream: Make ssl_iostream_unref() private


M	src/lib-ssl-iostream/iostream-ssl-private.h
M	src/lib-ssl-iostream/iostream-ssl.h

2018-04-16 16:28:24 +0300 Timo Sirainen <timo.sirainen@dovecot.fi> (1ea1304a2)

    global: Replace ssl_iostream_unref() with ssl_iostream_destroy()

