2008-07-02 Timo Sirainen * src/auth/passdb-ldap.c, src/auth/passdb-sql.c: "Empty password returned without no_password" message -> "nopassword". [72a560a00def] [tip] 2008-07-01 Timo Sirainen * src/lib-storage/index/maildir/maildir-filename.c: Maildir: If there are multiple :2, in filename, use the last one both getting and setting the flags. [639f6fb48277] 2008-07-02 Timo Sirainen * doc/thread-refs.txt: Updated thread index documentation. [7760a30a5f7e] 2008-06-28 Timo Sirainen * src/lib-index/mail-transaction-log-file.c: Index modseq handling crashfix. [465931d0a642] 2008-06-27 Timo Sirainen * src/lib-storage/index/maildir/maildir-sync-index.c: Maildir: \Recent flags weren't set correctly if mail was saved externally. [820cc75d6ccc] * src/lib-storage/index/index-thread-finish.c: THREAD X-REFERENCES2: Assert-crashfix. [ccbbfa63a36e] * dovecot-example.conf: Removed a comment about [::] maybe listening for IPv4 as well. It should listen only on IPv6 on all modern OSes. [532e9496fe88] * configure.in: When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it. [adb7d13d7d97] * src/plugins/quota/Makefile.am: rquota_xdr compilation fixes for AIX (hopefully won't break other OSes). [22244e559776] * src/imap/cmd-fetch.c, src/imap/imap-fetch.c, src/lib-index/mail- index-modseq.c, src/lib-storage/index/index-sort-string.c, src/lib- storage/index/index-sort.c: Memory leak fixes. [439636cce455] 2008-06-26 Timo Sirainen * src/lib-storage/index/index-sort-string.c: s/reseting/resetting/ [83019368c9dc] * src/lib-storage/index/index-sort-string.c: Sort index sometimes failed wrongly with "Sort IDs broken" errors. [d75fdd0fb8b2] * src/lib-storage/index/index-mail.c: Fetch BODYSTRUCTURE: Added missing NIL to the plain reply. [01c23befce4f] * doc/thread-refs.txt, src/lib-index/mail-hash.c, src/lib-index/mail- hash.h, src/lib-storage/index/Makefile.am, src/lib-storage/index /index-thread-finish.c, src/lib-storage/index/index-thread-links.c, src/lib-storage/index/index-thread-list.c, src/lib-storage/index /index-thread-private.h, src/lib-storage/index/index-thread.c: Thread index fixes and optimizations. [04a3be30e5a6] * src/lib-storage/index/index-thread.c: Threading: Fixed fallbacking to in-memory hash if the primary hash couldn't be updated. [5e3b995372d4] 2008-06-24 Timo Sirainen * src/lib-imap/imap-bodystructure.c, src/lib-mail/Makefile.am, src /lib-mail/message-decoder.c, src/lib-mail/message-parser.c, src/lib- mail/rfc2231-parser.c, src/lib-mail/rfc2231-parser.h, src/tests /test-mail.c: Merge RFC 2231 header continuations in BODY/BODYSTRUCTURE replies. Also use them internally while parsing messages. [3412c43d6707] * src/lib-imap/imap-bodystructure.c: Added missing Content-Language: support for BODYSTRUCTURE. [e787f6cae97c] * src/imap/imap-fetch.c: FETCH BODY/BODYSTRUCTURE failures replied with too many NILs. [e29ddf600a09] 2008-06-23 Timo Sirainen * src/master/main.c: Include "nss" in dovecot --build-options. [cd2789afcb09] * configure.in, src/lib/restrict-process-size.c, src/lib/restrict- process-size.h, src/master/main.c: If core dump limit is 0, add "core dumps disabled" to startup log line. [aad49536db41] * src/lib-storage/index/maildir/maildir-storage.c: Maildir: Create maildirfolder file also when dovecot-shared file exists when creating new mailboxes. [346fb1ff74ed] 2008-06-22 Timo Sirainen * dovecot-example.conf: Removed login_greeting_capability setting, it's no longer used. [6d1214687c89] 2008-06-21 Timo Sirainen * src/imap-login/client.c, src/imap/main.c, src/login-common/client- common.h, src/login-common/master.c, src/master/login-process.c, src/master/mail-process.c, src/master/mail-process.h, src/master /master-login-interface.h: Just send CAPABILITY response code for all LOGIN/AUTHENTICATE commands. Simplifies things and Lemonade spec specifies it as a "MUST be sent" anyway. [138a64b6dffe] * src/imap-login/client.c: Don't drop automatic post-login CAPABILITY reply if client sent CAPABILITY command _before_ STARTTLS. [80b06754846b] * src/master/master-settings.c: Don't give a bogus error message if multiple socket listen blocks are used. [f33e8e801023] * src/lib-storage/index/maildir/maildir-uidlist.c: maildir: Convert dovecot-uidlist files to new format immediately when opening them. Without this it's possible that entries are appended to old format uidlist in the new format. [87214cbd824c] 2008-06-20 Timo Sirainen * src/plugins/fts-squat/squat-trie.c: squat: Potential crashfix with mmap_disable=yes. [8df17bb25a6e] * src/lib-mail/message-parser.c: Message parser: Fixed assert-crash if cached MIME structure was broken. [e06d4049d282] * src/plugins/quota/Makefile.am: quota: Generated rquota_xdr.c file was missing LF after first #include. [fd32947addb4] * src/lib/restrict-access.c: AIX compiling fix. [bdc5cf87dbaa] * src/lib-index/mail-index-sync-update.c: Index files: Fixed reading uninitialized memory when handling extension resets generated by older Dovecot versions. [9b5040a75f9f] * src/lib-storage/index/mbox/mbox-sync-update.c: mbox: Fixed a crash when adding a new X-IMAPbase: header with keywords. [5dcc04b62e14] 2008-06-19 Timo Sirainen * src/lib/mempool-system-clean.c: Don't use malloc_usable_size() for clearing out memory before freeing it. It doesn't seem to work perfectly everywhere. Maybe put it back at some point. [96b8f50c9eea] 2008-06-21 Timo Sirainen * src/lib-index/mail-index-modseq.c, src/lib-index/mail-index-view- private.h, src/lib-index/mail-index-view-sync.c, src/lib-index/mail- transaction-log-file.c, src/lib-storage/index/index-status.c: View syncing: Keep track of highest modseq in views. If we lose transaction log, return all messages with higher modseq than the old highest-modseq as having changed. This works better than the previous code which compared the old modseq which may have already changed after the previous view sync. Return changes based on modseq being larger than [91758686277a] * src/lib-index/mail-index-modseq.c, src/lib-index/mail-index- modseq.h, src/lib-index/mail-transaction-log-append.c, src/lib-index /mail-transaction-log-file.c, src/lib-index/mail-transaction-log- private.h, src/lib-index/mail-transaction-log-view.c, src/util/logview.c: Keep modseqs as 1 until the first modseq ext intro record enables them. Performance should be better again when modseqs are disabled. [502cfdcc5650] * src/imap/cmd-select.c, src/lib-storage/index/index-status.c, src /lib-storage/mail-storage.h: CONDSTORE: Return HIGHESTMODSEQ correctly even if indexes are in memory. [b4286cde68d0] * configure.in: Renamed --enable-debug to --enable-devel-checks, which describes it better. [55d1a2bf4573] * src/imap-login/client-authenticate.c, src/imap-login/client.c, src /imap-login/client.h, src/imap/main.c, src/login-common/client- common.h, src/login-common/master.c, src/master/login-process.c, src/master/mail-process.c, src/master/mail-process.h, src/master /master-login-interface.h, src/master/master-settings.c, src/pop3-login/client-authenticate.c, src/pop3/main.c: Send login command OK reply in IMAP/POP3 process. [9e226056a208] * src/imap-login/client-authenticate.c, src/imap-login/client.c, src /imap-login/client.h, src/imap-login/imap-proxy.c, src/imap/client.c, src/imap/client.h, src/imap/main.c, src/login- common/client-common.h, src/login-common/master.c, src/master/login- process.c, src/master/mail-process.c, src/master/mail-process.h, src/master/master-login-interface.h, src/master/master-settings.c, src/pop3-login/client-authenticate.c, src/pop3-login/client.c, src/pop3-login/client.h, src/pop3-login/pop3-proxy.c, src/pop3/client.c, src/pop3/client.h, src/pop3/main.c: If commands are pipelined after the login command, pass them to the IMAP/POP3 process so it can process the command instead of discarding it. [2351a81ce699] * src/lib-storage/index/index-storage.c: Make sure the mailbox is opened when enabling modseqs (fixes a STATUS crash). [187183c360dd] * src/lib/istream.c, src/lib/istream.h: Added i_stream_add_data(). [4a166ccec256] * configure.in: Include ENABLE in banner capabilities, since it can be pipelined after login. [30871a9961f7] * src/imap-login/client.c: Don't return BAD if ENABLE command is used in pre-auth state. Just ignore it. [67a2d45e8e95] * configure.in, src/imap-login/client-authenticate.c, src/imap- login/client.c, src/imap-login/client.h, src/login-common/common.h, src/login-common/main.c, src/master/login-process.c, src/master /master-settings-defs.c, src/master/master-settings.c, src/master /master-settings.h: Removed login_greeting_capability setting. Instead now a minimal pre-login capability list is sent in the banner. CAPABILITY command still returns a full list. If CAPABILITY command wasn't used, the full capability list is sent in LOGIN/AUTHENTICATE tagged OK reply. [4b4d2a4423ec] * src/imap-login/client.c, src/imap-login/imap-proxy.c: Renamed x-local-ip/port to x-connected-ip/port [9a7469e52f91] * dovecot-example.conf, src/imap-login/client.c, src/imap-login/imap- proxy.c, src/login-common/client-common.c, src/login-common/client- common.h, src/login-common/common.h, src/login-common/main.c, src/master/login-process.c, src/master/master-settings-defs.c, src/master/master-settings.c, src/master/master-settings.h, src/pop3-login/client.c: Support transferring original IPs and ports through IMAP proxies. Clients from login_trusted_networks are allowed to override them. Dovecot's IMAP proxy sends them via IMAP ID command. They're always sent if the remote advertises ID in the banner's CAPABILITY. [3644883cf44e] * src/auth/auth-request.c, src/lib/network.c, src/lib/network.h: Created net_parse_range() from auth code. [423b8e3fedbb] * src/plugins/virtual/virtual-storage.c: virtual: Fixed to work with the previous CONDSTORE commit. [b1784b48821d] * README, configure.in, dovecot-example.conf, src/imap-login/client.c, src/imap-login/client.h, src/imap/Makefile.am, src/imap/client.h, src/imap/cmd-id.c, src/imap/commands.c, src/imap/commands.h, src/imap/common.h, src/imap/main.c, src/lib-imap/Makefile.am, src /lib-imap/imap-id.c, src/lib-imap/imap-id.h, src/master/login- process.c, src/master/mail-process.c, src/master/master-settings- defs.c, src/master/master-settings.c, src/master/master-settings.h: Added support for IMAP ID extension. [ca2ff54ee9b4] * src/lib-imap/imap-quote.c, src/lib-imap/imap-quote.h: Added imap_dquote_append(). [8f3115354d14] * src/lib/strfuncs.c, src/lib/strfuncs.h: Added str_array_icase_find(). [1789ac4637b0] * configure.in, src/master/main.c, src/master/master-settings.c: Uppercased PACKAGE_NAME macro and started using it in some places. [5061533382be] * src/imap/cmd-store.c, src/lib-index/mail-index-transaction- private.h, src/lib-index/mail-index-transaction.c, src/lib-index /mail-index.h, src/lib-index/mail-transaction-log-append.c, src/lib- storage/index/cydir/cydir-storage.c, src/lib-storage/index/dbox /dbox-storage.c, src/lib-storage/index/index-storage.h, src/lib- storage/index/index-transaction.c, src/lib-storage/index/maildir /maildir-storage.c, src/lib-storage/index/mbox/mbox-storage.c, src /lib-storage/index/raw/raw-storage.c, src/lib-storage/mail-storage- private.h, src/lib-storage/mail-storage.c, src/lib-storage/mail- storage.h: CONDSTORE: STORE UNCHANGEDSINCE conflicts are now checked atomically. [e04513064165] 2008-06-20 Timo Sirainen * src/imap/commands-util.c, src/imap/commands-util.h, src/lib-charset /charset-utf8.h, src/lib-imap/imap-bodystructure.c, src/lib-imap /imap-bodystructure.h, src/lib-mail/message-header-parser.c, src /lib-mail/message-header-parser.h, src/lib-storage/mail-namespace.c, src/lib-storage/mail-namespace.h, src/lib-storage/mail-storage.c, src/lib-storage/mail-storage.h, src/lib-storage/mailbox-list.c, src /lib-storage/mailbox-list.h, src/lib/aqueue.h, src/lib/array.c, src/lib/array.h, src/lib/buffer.c, src/lib/buffer.h, src/lib/crc32.h, src/lib/data-stack.h, src/lib/hash.h, src/lib/hex- dec.h, src/lib/istream.c, src/lib/istream.h, src/lib/lib.h, src/lib/network.h, src/lib/ostream-file.c, src/lib/ostream- internal.h, src/lib/ostream.c, src/lib/ostream.h, src/lib/primes.h, src/lib/priorityq.h, src/lib/seq-range-array.h, src/lib/str.h, src/lib/strfuncs.h, src/lib/unichar.h, src/lib/var-expand.h, src /login-common/client-common.h, src/login-common/login-proxy.c, src /login-common/login-proxy.h, src/login-common/ssl-proxy-openssl.c, src/login-common/ssl-proxy.c, src/login-common/ssl-proxy.h: Added more consts, ATTR_CONSTs and ATTR_PUREs. [81806d402514] * src/lib/macros.h: Added ATTR_PURE macro, which expands to pure attribute if available. [3d65aeed7ea0] * src/imap/imap-fetch.c, src/lib-storage/index/index-mail.c, src/lib- storage/index/index-search.c, src/lib-storage/mail-search-build.c, src/lib-storage/mail-search.h, src/lib-storage/mail-storage.h, src/plugins/virtual/virtual-mail.c: FETCH X-MAILBOX and SEARCH X-MAILBOX can be used with virtual mailboxes to find out the original mailbox. In non-virtual mailboxes they always just use the current mailbox name. [c1bbdc2b262e] * src/lib-storage/index/index-search.c, src/lib-storage/mail-search- build.c, src/lib-storage/mail-search.c, src/lib-storage/mail- search.h: Added non-optimized support for SEARCH INTHREAD. [bf9c51edbc66] * src/lib-storage/index/index-search.c, src/lib-storage/mail-search.c, src/lib-storage/mail-search.h, src/lib-storage/mail-storage.c: Search code cleanups and minor optimizations. [1e69c84a1e5a] * src/lib-storage/mail-storage.c, src/lib-storage/mail-storage.h: Added mailbox_search_result_build(). [021c39f58af3] * src/imap/cmd-thread.c, src/lib-storage/index/index-thread.c, src /lib-storage/mail-thread.h: Thread code cleanups + fixes [d987e018483b] * src/lib/seq-range-array.c, src/lib/seq-range-array.h, src/tests /test-lib.c: Added seq_range_array_have_common(). [3e8bcf4f6f5e] 2008-06-19 Timo Sirainen * src/deliver/deliver.c: deliver: Settings inside protocol imap {} weren't ignored. [34085062ad89] * src/plugins/fts-squat/fts-backend-squat.c: Compiler warning fixes. [5e8de444ad43] * configure.in, src/plugins/quota/quota-fs.h: AIX FS quota: Include sys/fs/quota_common.h [34e7c571434d] * src/lib/restrict-access.c: Compiling fix for AIX. [fbbb1cdb2fe9] * src/lib-storage/index/mbox/mbox-mail.c: mbox: Don't give "Can't find next message offset" warnings when (quota) plugin accesses the message being saved. [40863bb70e3c] * src/lib-storage/index/mbox/mbox-save.c: mbox: Don't crash if saving is aborted early. [11727b49373e] 2008-06-18 Timo Sirainen * src/lib-storage/index/index-search-result.c, src/lib-storage /mailbox-search-result-private.h, src/lib-storage/mailbox-search- result.c, src/plugins/virtual/virtual-config.c, src/plugins/virtual /virtual-storage.c, src/plugins/virtual/virtual-storage.h, src/plugins/virtual/virtual-sync.c: Virtual mailboxes: Speed up initial search result building using modseqs. [29d6c17f2009] * src/util/logview.c: logview: Show flags field in extension intros. [02bef9a155d7] * src/lib-index/mail-index-transaction-private.h, src/lib-index/mail- index-transaction.c, src/lib-index/mail-transaction-log-append.c: mail_index_update_header_ext() can now be called multiple times for the same extension. [efb782e078b9] * src/lib-index/mail-index-sync-ext.c, src/lib-index/mail-transaction- log-append.c, src/lib-index/mail-transaction-log.h: Mail index extension introductions now add a "no resizes" flag to the intro records. If it's found, the header and record sizes are used only if the extension doesn't exist yet, otherwise they're ignored. [5bedea448cf9] * src/lib-storage/index/maildir/maildir-storage.c: Removed accidentally committed debug code that caused Maildir tmp/ directory to be scanned every time mailbox was opened. [15f01af8449a] * src/lib-storage/mailbox-search-result-private.h, src/lib-storage /mailbox-search-result.c: Added mailbox_search_result_alloc() for building search results manually. [9e4be86d4b7d] * src/lib-index/mail-transaction-log-append.c: mail_index_update_header_ext(): Don't crash if size isn't 32bit aligned. [053d1aa325f6] * src/auth/passdb-cache.c: Code cleanup: Don't mix up '\0' and NULL. [9cd7caa922d6] * src/lib-index/mail-index-transaction.c: mail_index_ext_resize() may have looked up old record size from wrong message. [51a56b173df7] * configure.in: Check strtoimax() and strtoumax() with inttypes.h included. They won't be detected otherwise with HP-UX. [ef8af0eb161a] * src/lib-storage/index/Makefile.am, src/lib-storage/index/index- search-result.c, src/lib-storage/index/index-search-result.h, src /lib-storage/index/index-sync-private.h, src/lib-storage/index /index-sync-search.c, src/lib-storage/index/index-sync.c: Moved non-syncing related search result updating code to a separate file and did some other cleanups. [3ffac3f6173f] * src/lib-storage/index/index-sync-private.h, src/lib-storage/index /index-sync-search.c, src/lib-storage/index/index-sync.c: Search result update handling code cleanups. [38bdfafa655c] * src/lib-storage/index/index-fetch.c, src/lib/seq-range-array.c, src/lib/seq-range-array.h, src/plugins/fts-squat/squat-trie.c, src/plugins/fts/fts-api.c: Renamed seq_range_array_remove_invert_range() to seq_range_array_intersect(). [d12fc53f71be] * src/lib-index/mail-index-view-sync.c: Mailbox view sync: If modseqs are enabled, use them as well as direct flag/keyword comparing to find out changes when transaction logs are missing. [ad087a4c480f] * src/auth/mech-rpa.c: RPA auth mechanism: Fixed handling usernames longer than 255 characters. [a097b704be1b] 2008-06-17 Timo Sirainen * TODO, src/lib-index/mail-index-sync-update.c, src/lib-index/mail- index-view-sync.c: Mailbox view sync: Figure out the changes by comparing old and new maps if any of the required transaction logs are missing. [bc5eca410ed3] * src/lib-index/mail-index-sync-update.c: Added assert. [ab08272053c5] * src/lib-index/mail-index-map.c: mail_index_record_map_move_to_private(): Drop messages from record_map the map hasn't itself seen yet. [b8262c3a36f3] * src/lib-index/mail-index-view.c, src/lib-index/mail-index.h: Added mail_index_map_lookup_keywords(). [cca4ef877d43] * src/lib-storage/index/index-sync-search.c: CONTEXT=SEARCH optimization: Don't look up expunged messages' UIDs if we don't have any saved search results. [bc05d48eac44] * src/lib-index/mail-transaction-log.c: Rotated transaction logs weren't always unlocked, potentially causing other processes to fail with timeout errors. [1da72e385de4] * src/lib-storage/index/maildir/maildir-save.c: Maildir saving: Fixed a potential crash when saving a mail with keywords. [2e75e5a42f0e] * src/lib-index/mail-index-view-sync.c: Mail index view sync: Don't look for expunges if we already did it once. [94fe6f7747da] * src/lib-index/mail-index-view-sync.c, src/lib-index/mail-index.h, src/lib-storage/index/index-sync.c: Changed mail index view syncing API to return only flag changes. Currently it has only a single caller and it's not interested in anything else. [8ded6c06bcfc] * src/lib-index/mail-index-view-sync.c: mail_index_view_sync_begin() code cleanup. [650330db2f99] * src/lib-index/mail-index-view-sync.c: mail_index_view_sync_begin() _FLAG_FIX_INCONSISTENT code cleanup. [af9d5fd1071c] * src/lib-index/mail-index-view-sync.c, src/lib-index/mail-index.h, src/lib-storage/index/index-sync.c: mail_index_view_sync_begin() now delays its failures to _commit(). [3882c6cbfa99] * README: Updated conformed RFC list. [6718f97ed2c3] 2008-06-13 Timo Sirainen * src/imap/cmd-append.c: APPEND: Uncork stream only after syncing and sending tagged reply. [490fdb3c04de] * configure.in: If $shrext_cmds isn't set for some reason, fallback to ".so" suffix. [fe465f0f86fb] * src/lib/macros.h: MEMBER(): Don't try to use the C99 "." feature with HP-UX. [04d86d65c469] * configure.in: Fixed looking up plugin suffix. [3f8282688777] * src/lib-storage/index/maildir/maildir-uidlist.c: Compiler warning fix [e4884450ecf4] * configure.in: Fixed setting MODULE_SUFFIX with OS X. [7e2f20d65631] * src/plugins/acl/Makefile.am, src/plugins/convert/Makefile.am, src/plugins/expire/Makefile.am, src/plugins/fts-lucene/Makefile.am, src/plugins/fts-squat/Makefile.am, src/plugins/fts/Makefile.am, src/plugins/lazy-expunge/Makefile.am, src/plugins/mail- log/Makefile.am, src/plugins/mbox-snarf/Makefile.am, src/plugins/quota/Makefile.am, src/plugins/trash/Makefile.am: Previous changes broke plugin symlink creation in make install. [f5d1dc944a7c] * configure.in, src/lib/mempool-system-clean.c, src/lib/mempool- system.c: FreeBSD compile warning fix. [b145040d5adb] * src/lib/mempool-system-clean.c: Removed accidentally committed debug code. [fa00c24cf0d6] * src/lib-charset/charset-utf8.c: Compiler warning fix when compiling without iconv. [481fa709dce3] * src/lib/nfs-workarounds.c: FreeBSD NFS workarounds: We called fchown() with random UID. It shouldn't have really mattered though, because the call failed always anyway. [85f457b9b3ad] * src/lib-storage/index/index-sort-private.h, src/lib-storage/index /index-sort-string.c, src/lib-storage/index/index-sort.c: Reversing the primary sort criterion reversed also reversed secondary criterions. Fixed reverse sorting the first condition. [f431c67621ed] * src/lib/array.c, src/lib/array.h, src/tests/test-lib.c: Added array_reverse(). [69c1e3e13464] * src/lib/Makefile.am, src/lib/array.c, src/lib/array.h: Uninlined some of the more complex array functions. [63df79ccfedb] * src/lib-imap/imap-base-subject.c: imap_get_base_subject_cased(): Subject trailers weren't removed correctly. Also cleaned up the code a bit. [3c8736e8f08d] * src/lib-storage/index/index-sort.c: Message sorting by date, arrival or size was broken. [b5a6e6783786] * src/auth/userdb-prefetch.c: prefetch: Updated log message. [ea275bc7c8a1] * src/util/logview.c: logview: Expand header update records to user-readable form. [98aa72f63578] * src/login-common/main.c, src/master/login-process.c: Change fd limit in login process after it's execed. This fixes OSes which don't allow setting fd limit below what's already used (e.g. HP-UX). [53604857c7d2] * src/master/login-process.c: Cleanup: Calculate file descriptor count a bit more correctly. [560611fa3d68] * configure.in, src/lib/compat.c, src/lib/compat.h: Support systems with non-C99 vsnprintf(). [7f9f7fc02359] * src/lib/data-stack.c: t_get_bytes_available(): Return a bit less than is available because some space is wasted to alignmentation (and for other things when DEBUG enabled). [9a00bd31ca99] 2008-06-12 Timo Sirainen * src/plugins/quota/quota-fs.c: HP-UX fs quota: Convert blocks to bytes using filesystem's actual block size instead of using a hardcoded DEV_BSIZE (should this be done with other OSes too?) [a1fd8b29f629] * configure.in, src/lib/compat.c, src/lib/compat.h: Added more fallbacks if strtoll() or strtoull() isn't implemented (e.g. HP-UX). [35877d1131db] * src/plugins/quota/quota-fs.c: HP-UX: Fixed compiling problem in fs-quota. [f4c53ad3610f] * src/plugins/quota/quota-fs.c: fs quota: message/inode values and limits were set wrong, except for Solaris [e4e9cc00d9ba] * configure.in, dovecot-config.in.in, src/auth/Makefile.am, src/deliver/Makefile.am, src/dict/Makefile.am, src/imap/Makefile.am, src/plugins/convert/Makefile.am, src/plugins/expire/Makefile.am, src/plugins/fts-squat/Makefile.am, src/pop3/Makefile.am, src/tests/Makefile.am, src/util/Makefile.am: If we need -lcrypto for randomness, put it to $LIBS instead of $RAND_LIBS since it needs to be linked to all binaries anyway. [7b39370dae6b] 2008-06-17 Timo Sirainen * src/lib-storage/mail-search-build.c: Increased default mail search args memory pool size. [0df78677ea1b] * src/lib-index/mail-transaction-log-file.c: Make sure initial_modseq is correct when rotating transaction log. [6480642aba24] * src/lib-index/mail-transaction-log-append.c: Update sync_highest_modseq while appending new transactions. Our own transaction commits [38cb76c22dc5] * src/imap/imap-sync.c: QRESYNC: We could have sent VANISHED with UID 0. [dbfa021f8985] 2008-06-13 Timo Sirainen * src/deliver/deliver.c, src/lib-mail/mbox-from.c, src/lib-mail/mbox- from.h, src/lib-storage/index/mbox/istream-raw-mbox.c: mbox_from_parse() now returns also the parsed timezone. [d076e1758c6a] * src/lib-imap/imap-date.c, src/lib-imap/imap-date.h: Added imap_to_datetime_tz() to create IMAP date-time with specified timezone. [1b1fe3d50079] 2008-06-12 Timo Sirainen * src/plugins/quota/quota.c: Quota: If quota root has unwanted parameters, log an error and die. [e557042b2c1c] * src/lib-storage/index/dbox/dbox-save.c: dbox: Don't double-free memory if message saving is aborted. [e019f0152775] * src/lib-mail/message-header-parser.c: Message header parser: Don't return values pointing to input stream. It seemed to work most of the time, but not always when combined with message-parser. [1b0d19442120] * src/tests/test-common.c, src/tests/test-common.h, src/tests/test- mail.c: tests: Test message-parser better with nonblocking input. [2ac2ca9089bf] * src/lib-storage/index/index-thread.c: threading left search parameters broken when returning. [c6a49099a4fc] * src/lib-storage/index/index-thread-links.c: mail_hash_update() updated wrong index. [e1c13a782399] * src/imap/imap-sync.c: CONTEXT=SEARCH: Removed extra ')' from ESEARCH replies. [b2d18f10b5a7] * src/lib-storage/index/dbox/dbox-storage.c: dbox: Set MAILBOX_NOCHILDREN flag for selectable mailboxes if we know it. [5a6aa66e2ccd] * src/lib-storage/index/dbox/dbox-storage.c: dbox: Set MAILBOX_CHILDREN flag for \NoSelect mailboxes if we know it. [1550dc4f24a5] * src/lib-storage/index/index-search.c: SEARCH: Fixed NOT not matching anything. [7caab06fb890] * src/lib-storage/index/index-thread.c: thread indexes: Fixed infinite loop. [6659785091ab] * configure.in, src/lib/module-dir.c, src/plugins/acl/Makefile.am, src/plugins/convert/Makefile.am, src/plugins/expire/Makefile.am, src/plugins/fts-lucene/Makefile.am, src/plugins/fts- squat/Makefile.am, src/plugins/fts/Makefile.am, src/plugins/lazy- expunge/Makefile.am, src/plugins/mail-log/Makefile.am, src/plugins /mbox-snarf/Makefile.am, src/plugins/quota/Makefile.am, src/plugins/trash/Makefile.am: Use dynamic module suffix provided by libtool rather than hardcoded ".so". [b63aa0ffe564] * src/deliver/deliver.h: HP-UX: Added missing EX_CONFIG macro [0307382cf011] * src/plugins/quota/quota-fs.c, src/plugins/quota/quota-fs.h: HP-UX: Fixed quota-fs compiling. [c0ff3c147375] * configure.in: HP-UX: Fixed fd passing. [b13dca205eaa] * configure.in, src/lib/compat.c, src/lib/compat.h: HP-UX: pread() and pwrite() are broken, use our own implementation. [5abe05d7d093] 2008-06-11 Timo Sirainen * src/lib-dict/dict-sql.c: dict sql: Iterated keys need to contain private/shared prefix. [654cd4d966be] * src/plugins/expire/expire-tool.c: expire-tool: Iterate dict recursively - we want everything. [3fa91ced11e8] * src/lib-dict/dict-sql.c: Fixed dict iteration with SQL backend. [59ec9752c3dd] * src/imap/cmd-close.c: CLOSE: Use MAILBOX_SYNC_FLAG_EXPUNGE. [a36001eb64af] * src/imap/client.h, src/imap/cmd-close.c, src/imap/cmd-expunge.c, src/imap/cmd-idle.c, src/imap/imap-fetch.c, src/imap/imap-sync.c, src/imap/imap-sync.h: QRESYNC: Send HIGHESTMODSEQ automatically in all tagged replies whenever it seems useful. [ffaf1ea49704] * src/imap/client.c, src/imap/client.h, src/imap/cmd-close.c, src/imap /cmd-select.c, src/imap/cmd-unselect.c: Changed the way mailbox changing ambiguity is checked. [ea6727a1220e] * src/imap/client.h, src/imap/cmd-select.c, src/imap/imap-fetch.c, src/imap/imap-sync.c, src/lib-index/mail-index-view-sync.c, src/lib- index/mail-index.h, src/lib-storage/index/index-sync.c, src/lib- storage/mail-storage.h: QRESYNC: If MODSEQs were returned in FETCH replies but there are pending expunges, send a low enough HIGHESTMODSEQ reply to make sure the client will later see the expunges. [2d62129a709b] * src/imap/imap-sync.c: QRESYNC: Always send UID in FETCH sync replies. [1ae3d4a5057b] * src/imap/imap-fetch.c: QRESYNC crashfix [f8a0e11566c8] * src/lib-index/mail-index-modseq.c, src/lib-index/mail-index- modseq.h, src/lib-index/mail-index-private.h, src/lib-index/mail- index-sync-update.c, src/lib-index/mail-index-view-sync.c, src/lib- index/mail-transaction-log-file.c, src/lib-index/mail-transaction- log-private.h, src/lib-index/mail-transaction-log-view.c, src/lib- index/mail-transaction-log.h, src/lib-storage/index/index-fetch.c, src/util/logview.c: Modseqs are no longer calculated from transaction log sequence + offset. Now they begin from 1 and each "visible" transaction increases it by one. [d10cb44ab446] * src/plugins/virtual/Makefile.am: Added missing virtual-plugin.h [85191a8cd7df] * src/imap/cmd-search.c: UID SEARCH: Don't return EXPUNGEs if search criteria contains sequences. [a32df93cc112] * src/util/logview.c: logview: Handle unexpected header sizes correctly. [a5bbb3abeff8] 2008-06-10 Timo Sirainen * src/imap/cmd-list.c: LIST: Renamed X-STATUS return option to STATUS, since the first draft of the standard was released now. The capability isn't added yet though. [9185f2adeefb] * src/lib/env-util.c: env_clean(): calloc() is probably the safest way to do it. [8704bd29617b] * src/lib/env-util.c: env_clean(): Try yet another way that appears to work better. [5ae1c7c4edcf] 2008-06-09 Timo Sirainen * src/lib-mail/message-search.c, src/lib-mail/message-search.h, src /lib-storage/index/index-search.c: Removed pool parameter from message_search_init(). [d440b7cad709] * configure.in, src/lib/env-util.c: Use clearenv() if available. [27b97457d274] * src/lib/env-util.c: env_clean(): Don't free environment memory pool to make sure the environment won't get corrupted in case the clearing fails. [7d7ac2149243] * src/deliver/deliver.c: deliver: Kludge more to get boolean settings with "yes" as default value to work correctly. [64c9fa2d2cae] * src/lib-storage/index/maildir/maildir-copy.c: Maildir: When hardlink-copying a file, copy the W=vsize if it exists in the original filename. [40da0a9ccd9d] * doc/thread-refs.txt: Added documentation about how thread indexes work. [524b4acad38b] * configure.in: Added a note about this being UNSTABLE branch. [4aa830b4f8bc] * README, TODO, configure.in, dovecot-example.conf, src/imap/client.c, src/imap/client.h, src/imap/cmd-append.c, src/imap/cmd-search.c, src/imap/cmd-sort.c, src/imap/cmd-store.c, src/imap/cmd-thread.c, src/imap/commands.h, src/imap/imap-search.c, src/imap/imap-sync.c, src/lib-index/mail-index-map.c, src/lib-index/mail-index-private.h, src/lib-index/mail-index-sync-ext.c, src/lib-index/mail-index-sync- update.c, src/lib-index/mail-index-transaction.c, src/lib-index /mail-index.c, src/lib-index/mail-index.h, src/lib-mail/message- parser.c, src/lib-storage/index/Makefile.am, src/lib- storage/index/cydir/cydir-storage.c, src/lib-storage/index/dbox /dbox-mail.c, src/lib-storage/index/dbox/dbox-storage.c, src/lib- storage/index/index-mail.c, src/lib-storage/index/index-mail.h, src /lib-storage/index/index-search.c, src/lib-storage/index/index- storage.h, src/lib-storage/index/index-sync.c, src/lib- storage/index/maildir/maildir-mail.c, src/lib-storage/index/maildir /maildir-storage.c, src/lib-storage/index/mbox/mbox-mail.c, src/lib- storage/index/mbox/mbox-storage.c, src/lib-storage/index/raw/raw- mail.c, src/lib-storage/index/raw/raw-storage.c, src/lib-storage /mail-storage.c, src/lib-storage/mail-storage.h, src/plugins/convert /convert-storage.c, src/plugins/expire/expire-tool.c, src/plugins /fts-squat/fts-backend-squat.c, src/plugins/fts/fts-storage.c, src/plugins/lazy-expunge/lazy-expunge-plugin.c, src/plugins/mbox- snarf/mbox-snarf-plugin.c, src/plugins/quota/quota-count.c, src/plugins/quota/quota-storage.c, src/pop3/client.c, src/pop3/commands.c, src/util/idxview.c: Merged latest v1.1 changes. [8e206e25a142] 2008-05-17 Timo Sirainen * src/lib-storage/index/index-thread-links.c: Link unreferencing was done backwards for References: header. [86e84fb00776] 2008-06-09 Timo Sirainen * src/imap/Makefile.am, src/imap/cmd-thread.c, src/imap/imap-thread- finish.c, src/imap/imap-thread-links.c, src/imap/imap-thread- private.h, src/imap/imap-thread.c, src/imap/imap-thread.h, src/imap/main.c, src/lib-storage/Makefile.am, src/lib- storage/index/Makefile.am, src/lib-storage/index/index-storage.c, src/lib-storage/index/index-thread-finish.c, src/lib-storage/index /index-thread-links.c, src/lib-storage/index/index-thread-private.h, src/lib-storage/index/index-thread.c, src/lib-storage/mail-thread.h: Moved threading code to lib-storage. [37f23e0476e2] 2008-05-17 Timo Sirainen * src/lib-storage/index/index-thread-links.c: mail_hash_update() updated wrong index. [56114dc2ccfc] 2008-06-09 Timo Sirainen * src/imap/cmd-thread.c, src/imap/imap-thread-finish.c, src/imap/imap- thread-private.h, src/imap/imap-thread.c, src/imap/imap-thread.h, src/imap/main.c: Moved code around so that cmd-thread.c can do the THREAD reply writing. [b2fefe24b849] * src/imap/imap-thread-finish.c, src/imap/imap-thread-private.h, src/imap/imap-thread.c: Use iterators to go through the thread instead of directly writing to output stream. [844857c8ad1d] 2008-05-13 Timo Sirainen * src/imap/imap-thread-finish.c: Error handling fix [42973d5eb385] * src/imap/imap-thread-finish.c: Fix THREAD=REFERENCES2. [7e7e2b1996b0] 2008-06-09 Timo Sirainen * src/imap/cmd-thread.c, src/imap/imap-thread-finish.c, src/imap/imap- thread-links.c, src/imap/imap-thread-private.h, src/imap/imap- thread.c, src/imap/imap-thread.h: Link refcounting redesign to fix problems. Started getting rid of client/command dependencies from threading code. [05511835e4b1] 2008-05-13 Timo Sirainen * src/imap/imap-thread-finish.c: Removed recently added wrong code. [0d6531065d89] * src/imap/imap-thread-finish.c: Code cleanups [3718262bec49] * src/imap/imap-thread-finish.c: Dummy root fix [ad51fc17da67] * src/lib-index/mail-hash.c: Added assert [8f6fa7aa0236] 2008-05-09 Timo Sirainen * src/imap/imap-thread.c: Use hook_mailbox_index_opened instead of hook_mailbox_opened. [5046f47f273b] * src/lib-storage/index/index-storage.c, src/lib-storage/mail-storage- private.h, src/lib-storage/mail-storage.c: Added hook_mailbox_index_opened. [1e21a556c153] 2008-06-09 Timo Sirainen * TODO, configure.in, dovecot-example.conf, src/imap/Makefile.am, src/imap/cmd-thread.c, src/imap/imap-thread-finish.c, src/imap/imap- thread.c, src/imap/imap-thread.h, src/lib-index/Makefile.am, src /lib-index/mail-index-sync-ext.c, src/lib-mail/message-parser.c, src/lib/istream-crlf.c: Merged initial mail thread indexing implementation. [929198b1f313] 2008-05-09 Timo Sirainen * src/imap/imap-thread-private.h, src/imap/imap-thread.c, src/lib- index/mail-hash.c, src/lib-index/mail-hash.h: Thread index fixes [bc346cfdf954] 2008-05-06 Timo Sirainen * src/imap/imap-thread.c, src/lib-index/mail-hash.c, src/lib-index /mail-hash.h: Fixed deadlocking and other locking issues. [ec1c76b75de3] * src/imap/imap-thread-finish.c, src/imap/imap-thread.c: Crashfix. Memory leak fixes. [4e13694c0400] * src/lib-index/mail-hash.c: Added asserts. Did some fixes. [472326085681] 2008-03-16 Timo Sirainen * TODO: updated [f01d8d387447] * src/imap/Makefile.am, src/imap/cmd-thread.c, src/imap/imap-thread- finish.c, src/imap/imap-thread-links.c, src/imap/imap-thread- private.h, src/imap/imap-thread.c, src/imap/imap-thread.h, src/imap/main.c, src/lib-index/mail-hash.c, src/lib-index/mail- hash.h: Initial thread indexing code. [34d402399040] 2008-03-12 Timo Sirainen * src/lib-index/mail-index-sync-ext.c: Expunge handler crashfix [cad7aba678ad] 2008-03-06 Timo Sirainen * src/lib-index/mail-index-sync-ext.c, src/lib-index/mail-index-sync- update.c: Expunge handler calling fixes. [304089d87792] * src/lib-index/mail-index.c: mail_index_ext_register(): Allow registering an extension without record or header. It can still be used to register expunge/sync handlers. [35b9020ea25b] * src/lib-index/mail-cache.c: Catch dotlock creation timeout error. [91b26b5c5a23] * src/lib-index/mail-transaction-log-file.c: Error message fix. [07ae4a8d83c0] * src/lib-storage/mail-storage.c, src/lib-storage/mail-storage.h: Added mailbox_transaction_get_mailbox() [f2d856bb0cae] * src/lib-imap/imap-quote.c: imap_quote(): Don't crash if allocating from data stack pool. [ebcfd53efe94] 2008-03-04 Timo Sirainen * dovecot-example.conf, src/lib-storage/index/mbox/mbox-lock.c, src /lib-storage/index/mbox/mbox-lock.h, src/lib-storage/index/mbox /mbox-storage.c, src/lib-storage/index/mbox/mbox-storage.h, src/lib /restrict-access.c, src/lib/restrict-access.h, src/master/auth- process.c, src/master/login-process.c, src/master/mail-process.c, src/master/master-settings-defs.c, src/master/master-settings.c, src/master/master-settings.h: Replaced mail_extra_groups setting with mail_privileged_group and mail_access_groups settings. mail_privileged_group allows temporary access to the group when creating mbox INBOX dotlocks. [12adb981226e] * src/master/master-settings.c: If mail_uid or mail_gid doesn't exist, log an error. [2e8ff3074f5b] * src/plugins/expire/expire-tool.c: Fail if any parameters other than --test is given. [d25860363eaf] * src/lib-storage/index/dbox/dbox-mail.c: If save time is missing, use the file's ctime instead of current time. [64c1d13202cb] * src/plugins/expire/expire-env.c: Forgot to change expire time to be calculated as hours after debugging. [5597b0835902] * src/lib-index/mail-index-view-sync.c, src/lib-index/mail-index.h, src/lib-storage/index/dbox/dbox-file.c, src/lib-storage/index/dbox /dbox-file.h, src/lib-storage/index/dbox/dbox-mail.c, src/lib- storage/index/dbox/dbox-storage.c, src/lib-storage/index/dbox/dbox- storage.h, src/lib-storage/index/dbox/dbox-sync-file.c, src/lib- storage/index/dbox/dbox-sync.c, src/lib-storage/index/index-mail.c, src/lib-storage/index/maildir/maildir-save.c, src/lib/Makefile.am, src/lib/fdatasync-path.c, src/lib/fdatasync-path.h, src/master /child-process.c, src/master/child-process.h, src/master/mail- process.c, src/master/mail-process.h, src/master/main.c, src/plugins/expire/Makefile.am, src/plugins/expire/expire-env.c, src/plugins/expire/expire-env.h, src/plugins/expire/expire-plugin.c, src/plugins/expire/expire-tool.c: Moved fdatasync_path() to a global function. [aaeae4a920f7] 2008-03-03 Timo Sirainen * src/lib-storage/index/index-search.c: SEARCH NOT SUBJECT didn't work correctly. [028939047ffb] * src/lib/mempool-alloconly.c: DEBUG: Use t_buffer_alloc_last_full() before calling i_warning() to make sure we don't trash unallocated data from data stack. [1defcf913178] * src/lib/data-stack.c, src/lib/data-stack.h: Added t_buffer_alloc_last_full(). [26d7e3336a48] * src/tests/test-imap.c: Added more tests to imap_match(). [2fca2f050f33] * src/lib-storage/index/dbox/dbox-storage.c: LIST: Show \NoSelect status correctly. [35480e6e45b3] * src/lib-storage/index/dbox/dbox-storage.c: Mailbox deletion fixes. [28fd0d83d117] * src/lib-storage/list/mailbox-list-fs-iter.c: Mailbox listing fix. [c9567a98760d] * src/deliver/deliver.c, src/lib-mail/Makefile.am, src/lib-mail/mbox- from.c, src/lib-mail/mbox-from.h, src/lib- storage/index/mbox/Makefile.am, src/lib-storage/index/mbox/mbox- from.c, src/lib-storage/index/mbox/mbox-from.h: Moved mbox From_-line handling to lib-mail, since it's also used by deliver. [5d37ca11808d] * src/lib-index/mail-index-sync.c: mail_index_sync_have_any(): Refresh index to see if there are any new unseen changes before returning anything. [533bee708cc0] * src/imap/cmd-close.c: CLOSE: Synchronize the mailbox after expunging messages to actually get them expunged. [efff12e19514] 2008-03-02 Timo Sirainen * src/auth/auth-request.c: Fixed pass=yes with blocking passdbs. Also master_user wasn't exported correctly to blocking passdbs. [2b8568b54384] * src/plugins/acl/acl-backend-vfile.c: Ignore spaces and TABs at the end of ACL lines. [8ef6b651e2f8] * src/lib-storage/index/mbox/mbox-lock.c: Don't try to flush NFS file handle cache for mbox files. [7f412e03ab8e] * src/plugins/mail-log/mail-log-plugin.c: Copies were tracked using the source transaction instead of destination transaction, so rollbacking source transaction logged bogus "transaction rolled back" messages. [bb78360d7aa4] * src/lib-imap/imap-match.c: imap_match(): "foo/bar/%" pattern matching to "foo/" should return CHILDREN instead of NO. [f8d49fe38db5] * .hgignore, src/tests/Makefile.am, src/tests/test-imap.c: Added unit tests for imap_match() [2937b7f44f79] * src/lib-index/mail-cache-lookup.c, src/lib-index/mail-cache- private.h, src/lib-index/mail-cache-transaction.c, src/lib-index /mail-cache.c: Optimized cache record loop tracking. [fea46320f834] 2008-03-01 Timo Sirainen * src/lib/istream-limit.c: Seek also non-seekable parent streams to current offset as long as we're not seeking backwards. [29a6eec987e5] 2008-02-29 Timo Sirainen * src/deliver/deliver.c: Trying to user $USER environment didn't work before environment was already cleared. Get it earlier. [e4aa76ca2bc5] * src/deliver/deliver.c: If username lookup fails, return EX_USAGE instead of EX_TEMPFAIL because we haven't yet opened the log file. [1d79c534b54b] * src/lib/seq-range-array.c: Implemented optimized seq_range_array_add_range(). [18f5d0538baa] * src/tests/test-lib.c: Use smaller test buffer sizes [338ea1ecca5f] * src/tests/test-lib.c: Added randomized unit test for seq_range_array*() [9b10a0c47e9b] * src/lib-storage/index/index-mail-headers.c: array_clear() is now equivalent to buffer_clear(), use it. [5889b8a76c4b] * src/tests/test-lib.c: Added unit testing for buffer_t. [a56c676ce65d] * src/lib/buffer.c: buffer_reset(buf) and buffer_set_used_size(buf, 0) now do the same thing. [7995da69b348] * src/lib/priorityq.c: Fixed removing last item from priority queue. [1b8277a36723] 2008-02-28 Timo Sirainen * src/lib/istream-limit.c: If underlying stream doesn't support seeking, don't try to seek to original position. [ade241ae256e] * src/lib/istream-crlf.c: Added support for seeking forwards in the stream. Also mark the stream as non-seekable since seeking backwards doesn't work. [e063797bdcd5] 2008-02-27 Timo Sirainen * src/lib-storage/index/mbox/mbox-sync-update.c, src/lib- storage/index/mbox/mbox-sync.c: Fixed dirty flag/keyword handling. [446899ed6a65] 2008-02-26 Timo Sirainen * configure.in: Base docdir to datadir instead of datarootdir which doesn't exist in old autoconfs either. [9bc49f7ff7da] * configure.in: Added support for autoconf versions older than 2.59c. [93431cc2d39e] * doc/wiki/Makefile.am.in: wiki docs weren't using docdir. [272a05aeb53d] * src/plugins/quota/quota-maildir.c, src/plugins/quota/quota- private.h, src/plugins/quota/quota.c: quota_rule=?:.. specifies the default quota limits to use when backend doesn't have any. If backend has limits, this rule is ignored. [746aee869ac5] * src/plugins/quota/quota-dict.c, src/plugins/quota/quota-dirsize.c, src/plugins/quota/quota-fs.c, src/plugins/quota/quota-maildir.c, src/plugins/quota/quota-private.h, src/plugins/quota/quota.c: Relative (%) limits in quota rules and warnings work now if the backend specifies or changes the limits (e.g. Maildir++ maildirsize file) [7c5ceaaa3066] * src/auth/db-ldap.c, src/auth/userdb-ldap.c: Don't crash if ldap userdb lookup fails. [2e3f6188e164] 2008-02-25 Timo Sirainen * src/lib-storage/index/index-mailbox-check.c, src/lib-storage/index /index-sync.c: mailbox_notify_changes(): Don't trigger the timeout once a second to see if the timeout really occurred. [8a3a06fc5d10] * src/lib-storage/index/cydir/cydir-sync.c, src/lib-storage/index/dbox /dbox-sync.c, src/lib-storage/index/index-storage.h, src/lib- storage/index/index-sync.c, src/lib-storage/index/maildir/maildir- sync.c, src/lib-storage/index/mbox/mbox-sync.c: Check and update sync_last_check in one common function. [baff41db898a] * src/lib-storage/index/index-mail-headers.c: And compile fix for last change. [643b9f2ca446] * src/lib-storage/index/index-mail-headers.c: array_clear() only truncates the array, growing its size later doesn't fill it with zero. Use buffer_reset() instead here which does zeroing. [20dc04cd6548] * src/imap/commands.c: LOGOUT command also closes mailbox, so mark it as such to fix command pipelining problems. [2f559fb30617] 2008-02-24 Timo Sirainen * src/plugins/trash/trash-plugin.c: Allow #comments in trash config [5ad7032ee313] 2008-02-21 Timo Sirainen * src/imap/imap-search.c, src/lib-storage/index/index-search.c, src /lib-storage/mail-search.c, src/lib-storage/mail-search.h: SEARCH SUBJECT now changes LWSP to spaces to match ENVELOPE's subject field. [79fee036a09f] * src/lib-imap/imap-quote.c: imap_quote*() with LWSP compression: Make sure TABs are always converted to spaces. [2c1768e723c7] * src/lib/data-stack.c: DEBUG: Buffer overflow checking caused false errors sometimes. [8a470f7fd622] * src/lib-storage/index/index-search.c: Header searches shouldn't include the header name or ":" in matching. [8d2d400fbb89] * src/lib-storage/index/index-mail.c: index_mail_get_date() didn't return timezone if date was already parsed. [24470b86ee63] * src/lib-storage/index/index-search.c: More fixes to SEARCH BEFORE/ON/SINCE timezone handling. [6e7db5f06497] * src/auth/auth-request.c: Fixed proxy_maybe handling. [ab9c6952cc49] * src/auth/passdb-cache.c: auth_debug: Hide passwords from "cache hit" log lines if auth_debug_passwords=no [14335cfd2fd2] * src/auth/auth-worker-client.c: Blocking passdbs that returned some userdb_* fields returned also an extra userdb_ field. [c5a666d16a81] * src/auth/passdb-cache.c: auth_debug: Show cache contents in "cache hit" lines. [00cff54ecfb4] * dovecot-example.conf, src/lib/network.c: [::] listens only for IPv6 addresses now. This gets rid of IPv4-mapped IPv6 addresses. Use "listen = *, [::]" for listening both. [1919baa9e636] * src/lib-storage/index/mbox/mbox-sync.c: Fixed "uid_validity updated unexpectedly" errors when mbox file was being recreated and index files still existed. [fa2b3c9b7d08] * src/lib-mail/message-parser.c: Assert fix [3c046e52f649] * src/lib-storage/index/maildir/maildir-uidlist.c: Make sure we don't use a stale first_unwritten_pos to optimize dovecot-uidlist writing. [50b8d966d987] 2008-02-20 Timo Sirainen * src/deliver/deliver.c: Don't crash if trying to deliver mail to mailbox outside all namespaces. [e041d85a6236] * src/lib-storage/index/index-search.c: SEARCH BEFORE/ON/SINCE didn't handling timezones correctly. [ac5d76fc8eb2] 2008-02-17 Timo Sirainen * configure.in: Changed the default ioloop to "best". [68241b50fabe] * src/lib-storage/index/maildir/maildir-save.c: fdatasync() the new/ and/or cur/ directory after mails are renamed. [16e06a1c43e6] * src/imap/cmd-idle.c: Assert-crashfix if IDLE finishes immediately. [374ee665b95f] * src/lib-storage/index/mbox/mbox-mail.c: Fixed "Cached message offset lost" errors when quota plugin was used. [0a15a13f382f] * configure.in: Fixed --enable-ipv6 [3c2ed5046fc8] * dovecot-example.conf: Typofixes [3a2a20a4141c] * src/plugins/fts/fts-api.c: Don't crash if FTS backend initialization fails. [9014a3cc5d39] 2008-02-16 Timo Sirainen * configure.in: If __gss_userok() is found from -lgss, make sure we link with -lgss. [27e714c659d6] * src/master/mail-process.c: Last commit broke mail_drop_priv_before_exec/mail_chroot conflict check. [a00dc6f78106] * dovecot-example.conf, src/master/mail-process.c: mail_chroot no longer needs to be in valid_chroot_dirs. [f3508f678485] * dovecot-example.conf: Added a warning comment to mail_extra_groups. [5b4e578372f7] * src/imap/cmd-list.c: Don't convert real separators to virtual separators. The mailbox listing code already did it for us. [5d4efb4fb414] * .hgignore: Updated [de707046ab32] * src/imap/imap-fetch-body.c, src/imap/imap-fetch.h: If stream ends unexpectedly, it was most likely because of a broken cached field, so mark the cache corrupted. [6b326bab415d] * src/lib-storage/index/index-mail.c: When setting cache corrupted, make sure we don't write broken values to the new cache file. Also log broken virtual size fetches better and support 0 as a generic "some fields" value. [e1cb4e647fa5] * src/plugins/fts-squat/squat-trie.c, src/plugins/fts/fts-search.c: Memory leak fixes [7e8bcf1ef37b] * src/plugins/fts-squat/squat-trie.c: Expunge fix [affc1f7ccca7] * src/plugins/fts-squat/squat-trie.c: Fixed squat lookup. [49e91699be7d] * src/plugins/fts-squat/squat-trie.c: Fixed handling expunges. [9137bd313e04] 2008-02-15 Timo Sirainen * src/master/mail-process.c: Check for "/./" chrooting in home dirs only if valid_chroot_dirs isn't empty. [077a8ccac8af] * src/plugins/fts-squat/squat-trie.c: squat_trie_lookup() for empty string returns now all UIDs from root node. This is mainly useful for debugging. [68a59be6fb29] * src/lib-mail/message-parser.c, src/lib-storage/mail-storage.c, src /lib-storage/mailbox-list-private.h, src/lib-storage/mailbox-list.c: Memory leak fixes [7e93b52dbada] * src/lib-index/mail-index-transaction.c: Fixed bad memcpy() usage with memmove(). [97b8ea4dd200] 2008-02-14 Timo Sirainen * src/lib-mail/message-parser.c, src/lib-mail/message-parser.h, src /lib-mail/message-search.c, src/lib-storage/index/index-mail- headers.c, src/lib-storage/index/index-mail.c, src/plugins/fts/fts- storage.c, src/tests/test-mail.c: Changed message_parser_deinit() to return -1 if the parser was using preparsed broken message parts. Callers catch the error and mark the cache file corrupted. [f24fd0a7d453] * src/lib-mail/message-search.c, src/lib-mail/message-search.h, src /lib-storage/index/index-search.c: message_search_more*() now returns bool instead of int. They can't fail. [b246d9bfab50] * src/lib-storage/index/cydir/cydir-mail.c, src/lib-storage/index/dbox /dbox-mail.c, src/lib-storage/index/index-mail.c, src/lib- storage/index/index-mail.h, src/lib-storage/index/index-search.c, src/lib-storage/index/maildir/maildir-mail.c, src/lib- storage/index/mbox/mbox-mail.c, src/lib-storage/index/raw/raw- mail.c, src/lib-storage/mail-storage-private.h, src/lib-storage /mail-storage.h, src/lib-storage/mail.c: Added mail_set_cache_corrupted() to rebuild the cache file and force recalculating the given field. [221e58854b33] * src/lib-charset/charset-iconv.c: Crashfix for converting invalid input to UTF-8. [ff4431c2272d] 2008-02-13 Timo Sirainen * src/plugins/convert/convert-tool.c: convert-tool returned inverted exit status. [5e4c711a0c06] * src/plugins/fts/fts-api-private.h: Compile fix with some compilers [5612692d751c] * src/plugins/fts-squat/fts-backend-squat.c: Compiler warning fix (wrong enums used, just happened to work) [be58c216dbf0] * src/lib-index/mail-index-sync-update.c: Code cleanup for last commit [2194777bcd8e] * src/lib-index/mail-index-sync-update.c: Log an error if uid_validity field is updated unexpectedly. If next_uid field decreases log an error and ignore the update. [5e3c1fde2f78] * src/util/idxview.c: Don't crash if there are no extensions. [fd29c90047e9] 2008-02-12 Timo Sirainen * configure.in: This code tree is now v1.2.UNSTABLE. [74e1dc23e441] 2008-06-09 Timo Sirainen * src/lib-storage/index/index-search.c, src/lib-storage/mailbox- search-result-private.h, src/lib-storage/mailbox-search-result.c: Saved search results: Remember what messages' static checks never match, so we don't waste time checking them over and over again. [882888286bf5] * src/plugins/virtual/virtual-mail.c, src/plugins/virtual/virtual- storage.c, src/plugins/virtual/virtual-storage.h, src/plugins/virtual/virtual-sync.c: virtual mailboxes: Use saved search results to find out which messages were added/removed. Also several other fixes and optimizations. [c8b19aca45d9] * src/lib-storage/mail-storage.c: mailbox_sync(): Don't add FIX_INCONSISTENT flag if there are saved search results, otherwise they won't be updated. [242a4fae3587] * src/lib/seq-range-array.c, src/lib/seq-range-array.h: Added seq_range_count(). [bba1bb98d162] 2008-06-08 Timo Sirainen * src/lib-storage/mailbox-search-result.c: CONTEXT=SEARCH: Handle correctly if the same mail is added and removed (or removed and added) before next sync. [303b71884a05] 2008-06-07 Timo Sirainen * configure.in, src/imap/cmd-expunge.c, src/lib-imap/imap- messageset.c, src/lib-imap/imap-messageset.h, src/lib-index/mail- index-transaction.c, src/lib-storage/index/index-mail.c, src/lib- storage/mail-search-build.c, src/lib-storage/mail-storage.h, src/plugins/virtual/virtual-config.c, src/plugins/virtual/virtual- mail.c, src/plugins/virtual/virtual-storage.c, src/plugins/virtual /virtual-storage.h, src/plugins/virtual/virtual-sync.c: Merged virtual mailbox support. [eb0f45d0c9f2] 2008-03-16 Timo Sirainen * src/lib-storage/mail-search-build.c: Fixed SEARCH UID [40b0892de395] 2008-03-15 Timo Sirainen * src/plugins/virtual/virtual-storage.c: Fixed using mailboxes from namespaces with a prefix or non-default separator. [df3728c2093c] 2008-03-14 Timo Sirainen * configure.in, src/plugins/Makefile.am, src/plugins/virtual/Makefile.am, src/plugins/virtual/virtual- config.c, src/plugins/virtual/virtual-mail.c, src/plugins/virtual /virtual-plugin.c, src/plugins/virtual/virtual-plugin.h, src/plugins/virtual/virtual-storage.c, src/plugins/virtual/virtual- storage.h, src/plugins/virtual/virtual-sync.c, src/plugins/virtual /virtual-transaction.c: Added initial support for virtual mailboxes. [8fc919084252] * src/imap/Makefile.am, src/imap/cmd-search.c, src/imap/imap- messageset.c, src/imap/imap-messageset.h, src/imap/imap-search.c, src/imap/imap-search.h, src/lib-imap/Makefile.am, src/lib-imap/imap- messageset.c, src/lib-imap/imap-messageset.h, src/lib- storage/Makefile.am, src/lib-storage/index/index-search.c, src/lib- storage/mail-search-build.c, src/lib-storage/mail-search-build.h, src/lib-storage/mail-search.h, src/plugins/fts/fts-storage.c, src/pop3/commands.c: Moved IMAP messageset handling to lib-imap/ and searching to lib- storage/. Rewrote messageset handling to use struct seq_range instead. [2d3d1a61f734] * src/imap/cmd-expunge.c, src/lib-storage/mail-storage.h: Added MAILBOX_SYNC_FLAG_EXPUNGE. [d274d0870a1a] * src/lib-index/mail-index-transaction.c: MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES: Don't crash if trying to add keywords to newly added messages. [e6e32571025e] * src/lib-storage/index/index-search.c, src/lib-storage/mail-search.h: Added support for SEARCH_UIDSET. [4c9027eacfce] * src/lib-storage/index/cydir/cydir-mail.c, src/lib-storage/index/dbox /dbox-mail.c, src/lib-storage/index/index-mail.c, src/lib- storage/index/index-mail.h, src/lib-storage/index/index-search.c, src/lib-storage/index/maildir/maildir-mail.c, src/lib- storage/index/mbox/mbox-mail.c, src/lib-storage/index/raw/raw- mail.c, src/lib-storage/mail-storage-private.h: struct mail can't necessarily be casted to struct index_mail. Added a new get_index_mail() method to return it. [1ff4a6d15b11] * src/lib-storage/mail-storage-private.h, src/lib-storage/mail- storage.c: Added transaction flags to struct mailbox_transaction_context. [f83c391c2428] * src/lib-index/mail-index-transaction.c: MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES: Avoid also keyword updates. Also fixed a bug with flag updates. [94ad5f7d08ac] 2008-06-07 Timo Sirainen * src/lib-storage/mail-search.c, src/lib-storage/mail-search.h, src /lib-storage/mailbox-search-result.c: SEARCH UPDATE: Convert seqsets in saved results to uidsets so that they can be matched correctly later if messages are expunged. [ec49260ed4ee] * src/lib-storage/index/cydir/cydir-storage.c, src/lib- storage/index/dbox/dbox-storage.c, src/lib-storage/index/index- fetch.c, src/lib-storage/index/index-storage.h, src/lib- storage/index/maildir/maildir-storage.c, src/lib-storage/index/mbox /mbox-storage.c, src/lib-storage/index/raw/raw-storage.c, src/lib- storage/mail-storage-private.h, src/lib-storage/mail-storage.c, src /lib-storage/mail-storage.h: Added mailbox_get_uid_range(). [1004a3555a03] * src/imap/imap-sync.c, src/imap/imap-thread.c, src/lib- storage/index/cydir/cydir-storage.c, src/lib-storage/index/dbox /dbox-storage.c, src/lib-storage/index/index-fetch.c, src/lib- storage/index/index-storage.h, src/lib-storage/index/maildir /maildir-storage.c, src/lib-storage/index/mbox/mbox-storage.c, src /lib-storage/index/raw/raw-storage.c, src/lib-storage/mail-search.c, src/lib-storage/mail-storage-private.h, src/lib-storage/mail- storage.c, src/lib-storage/mail-storage.h, src/plugins/fts/fts- search.c, src/plugins/fts/fts-storage.c, src/plugins/lazy-expunge /lazy-expunge-plugin.c: Renamed mailbox_get_uids() to mailbox_get_seq_range(). [f8e902acfbae] * src/imap/cmd-search.c: SEARCH PARTIAL: Don't treat range as seq-range because it isn't one. [959fcc5e9068] * src/imap/cmd-search.c: SEARCH=CONTEXT error checking fix / changes. [6fb9a58ad8c5] * src/imap/cmd-search.c: CONTEXT=SEARCH: Implemented SEARCH PARTIAL (non-optimized). [edd180c77b99] 2008-06-06 Timo Sirainen * src/imap/cmd-select.c, src/imap/imap-search.c, src/lib- imap/Makefile.am, src/lib-imap/imap-messageset.c, src/lib-imap/imap- messageset.h, src/lib-imap/imap-seqset.c, src/lib-imap/imap- seqset.h, src/lib-storage/mail-search-build.c: Renamed imap_messageset_parse() to imap_seq_set_parse(). Added imap_seq_range_parse(). [efbfe9344c14] 2008-06-05 Timo Sirainen * src/imap/imap-sync.c: CONTEXT=SEARCH: ADDTO and REMOVEFROM can be sent in same ESEARCH reply. [d003fb4bb7d9] * configure.in, src/imap/Makefile.am, src/imap/client.c, src/imap/client.h, src/imap/cmd-cancelupdate.c, src/imap/cmd- close.c, src/imap/cmd-delete.c, src/imap/cmd-logout.c, src/imap/cmd- search.c, src/imap/cmd-select.c, src/imap/cmd-unselect.c, src/imap/commands.c, src/imap/commands.h, src/imap/imap-sync.c, src /lib-storage/Makefile.am, src/lib-storage/index/Makefile.am, src /lib-storage/index/index-search.c, src/lib-storage/index/index- storage.c, src/lib-storage/index/index-sync-private.h, src/lib- storage/index/index-sync-search.c, src/lib-storage/index/index- sync.c, src/lib-storage/mail-search.c, src/lib-storage/mail-storage- private.h, src/lib-storage/mail-storage.c, src/lib-storage/mail- storage.h, src/lib-storage/mailbox-search-result-private.h, src/lib- storage/mailbox-search-result.c: Implemented CONTEXT=SEARCH extension. [879208fdc7e3] * src/lib/seq-range-array.c, src/lib/seq-range-array.h: Added seq_range_array_merge() [f0dc2a3dee54] * src/imap/cmd-search.c: Extended UID SEARCH should include UID in the ESEARCH reply. [3215e880909f] * src/imap/cmd-expunge.c: Crashfix to previous search args commit. [eb17957ee1fe] 2008-06-04 Timo Sirainen * src/lib-storage/mail-storage.c: Keep mail_search_args referenced during searches. [803e3574f4f5] * src/imap/cmd-copy.c, src/imap/cmd-expunge.c, src/imap/cmd-fetch.c, src/imap/cmd-search.c, src/imap/cmd-select.c, src/imap/cmd-sort.c, src/imap/cmd-store.c, src/imap/cmd-thread.c, src/imap/imap- expunge.c, src/imap/imap-expunge.h, src/imap/imap-fetch.c, src/imap /imap-fetch.h, src/imap/imap-search.c, src/imap/imap-search.h, src/imap/imap-sort.c, src/imap/imap-sort.h, src/imap/imap-thread.c, src/imap/imap-thread.h, src/lib-storage/index/index-search.c, src /lib-storage/index/index-storage.h, src/lib-storage/mail-search- build.c, src/lib-storage/mail-search-build.h, src/lib-storage/mail- search.c, src/lib-storage/mail-search.h, src/lib-storage/mail- storage-private.h, src/lib-storage/mail-storage.c, src/lib-storage /mail-storage.h, src/plugins/convert/convert-storage.c, src/plugins/expire/expire-tool.c, src/plugins/fts-squat/fts-backend- squat.c, src/plugins/fts/fts-search.c, src/plugins/fts/fts- storage.c, src/plugins/fts/fts-storage.h, src/plugins/mbox-snarf /mbox-snarf-plugin.c, src/plugins/quota/quota-count.c, src/plugins/quota/quota-storage.c, src/plugins/trash/trash-plugin.c, src/pop3/client.c, src/pop3/commands.c: Make mail_search_args an independent structure that can be used for multiple separate searches. [077bb84e9e77] 2008-03-16 Timo Sirainen * README: Updated conformed RFCs list [d5cae1f5fb6a] * configure.in, src/lib-storage/index/index-search.c, src/lib-storage /mail-search-build.c, src/lib-storage/mail-search.h: Implemented WITHIN extension. [c78e9204f3f2] * configure.in, src/imap/client.c, src/imap/client.h, src/imap/cmd- copy.c, src/imap/cmd-expunge.c, src/imap/cmd-fetch.c, src/imap/cmd- search.c, src/imap/cmd-sort.c, src/imap/cmd-store.c, src/imap/cmd- thread.c, src/imap/imap-fetch.c, src/imap/imap-search.c, src/imap /imap-search.h, src/lib-storage/mail-search-build.c, src/lib-storage /mail-search-build.h: Implemented SEARCHRES extension. [03146f02403f] * src/lib-storage/mail-search-build.c: Fixed SEARCH UID [7f57fd10c9bd] * configure.in, src/imap/cmd-search.c: Implemented ESEARCH extension [cf0cce4b0e4e] * src/imap/imap-search.c: Messageset 1,* was thought of as invalid [8ca66e0ac4ed] * src/imap/client.h, src/imap/cmd-expunge.c, src/imap/imap-sync.c: EXPUNGE: Send HIGHESTMODSEQ only if something was actually expunged. [19327e95a787] * src/imap/imap-expunge.c: Use MAILBOX_TRANSACTION_FLAG_REFRESH to make sure we see the latest \Deleted flags before expunging. [3980292275ab] * src/imap/client.c, src/imap/cmd-select.c: If CONDSTORE is enabled only after mailbox has been selected, send HIGHESTMODSEQ so client knows if it had missed some changes. [27a0de620b0c] * src/imap/client.c, src/imap/client.h, src/imap/cmd-close.c, src/imap /cmd-expunge.c, src/imap/cmd-select.c, src/imap/cmd-unselect.c, src/imap/imap-expunge.c, src/imap/imap-expunge.h: Fixed CLOSE HIGEHSTMODSEQ race condition. Added some checks to make sure mailbox isn't being closed/opened while the previous SELECT/CLOSE is still being processed. [6e2e4e5c52f3] * src/imap/cmd-store.c, src/lib-storage/index/index-transaction.c, src /lib-storage/mail-storage.h: Added MAILBOX_TRANSACTION_FLAG_REFRESH. Use it with STORE UNCHANGEDSINCE. [5d3b6a766032] 2008-03-15 Timo Sirainen * configure.in: Added CONDSTORE and QRESYNC capabilities [7d208a7e0cbd] * src/imap/client.h, src/imap/cmd-close.c, src/imap/cmd-copy.c, src/imap/cmd-enable.c, src/imap/cmd-expunge.c, src/imap/cmd-fetch.c, src/imap/cmd-search.c, src/imap/cmd-select.c, src/imap/cmd-store.c, src/imap/imap-fetch.c, src/imap/imap-fetch.h, src/imap/imap- search.c, src/imap/imap-search.h, src/imap/imap-sync.c, src/lib- index/mail-index-modseq.c, src/lib-index/mail-index-modseq.h, src /lib-storage/index/cydir/cydir-storage.c, src/lib-storage/index/dbox /dbox-storage.c, src/lib-storage/index/index-fetch.c, src/lib- storage/index/index-storage.h, src/lib-storage/index/maildir /maildir-storage.c, src/lib-storage/index/mbox/mbox-storage.c, src /lib-storage/index/raw/raw-storage.c, src/lib-storage/mail-storage- private.h, src/lib-storage/mail-storage.c, src/lib-storage/mail- storage.h, src/util/idxview.c: Added QRESYNC support. [bad3a811a148] * src/lib/seq-range-array.c, src/lib/seq-range-array.h: Added seq_range_array_iter_nth() [af2441dc6de6] * src/lib-index/mail-index-modseq.c, src/lib-index/mail-index- modseq.h: Left out from initial CONDSTORE commit. [4fd41f9467ea] * src/lib-index/mail-index-view-sync.c: Crashfix for previous view sync change [96207583aaa0] * src/imap/cmd-search.c, src/lib-index/mail-index-sync-ext.c, src/lib- storage/index/index-mail.c, src/lib-storage/index/index-search.c: CONDSTORE fixes [98a03cf8ad5d] * src/lib-index/mail-index-view-sync.c, src/lib-index/mail-index.h, src/lib-storage/index/index-sync.c: View sync returns now also hidden records, but they're marked as such. Mailbox syncing returns hidden records as modseq changes. [271131a1e060] * src/lib-index/mail-index-view-private.h, src/lib-index/mail-index- view-sync.c: Keep view's map always at least up-to-date with syncing. If there have been no expunges, the map is immediately replaced with the latest map. Before the map may not have been updated until syncing was finished. This change is necessary to update modseqs correctly while they're being enabled. [1285aedb353c] 2008-03-14 Timo Sirainen * src/lib-index/mail-index-transaction.c: MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES: Don't crash if trying to add keywords to newly added messages. [23bbefd2ef4e] 2008-03-13 Timo Sirainen * configure.in, src/imap/Makefile.am, src/imap/cmd-enable.c, src/imap/commands.c, src/imap/commands.h: Added support for ENABLE extension. [bec7141872eb] 2008-03-15 Timo Sirainen * src/imap/client.c, src/imap/client.h, src/imap/cmd-append.c, src/imap/cmd-copy.c, src/imap/cmd-fetch.c, src/imap/cmd-search.c, src/imap/cmd-select.c, src/imap/cmd-store.c, src/imap/imap-fetch.c, src/imap/imap-fetch.h, src/imap/imap-status.c, src/imap/imap-sync.c, src/lib-imap/imap-util.c, src/lib-imap/imap-util.h, src/lib- index/Makefile.am, src/lib-index/mail-index-map.c, src/lib-index /mail-index-private.h, src/lib-index/mail-index-sync-ext.c, src/lib- index/mail-index-sync-keywords.c, src/lib-index/mail-index-sync- private.h, src/lib-index/mail-index-sync-update.c, src/lib-index /mail-index-transaction.c, src/lib-index/mail-index-view-sync.c, src /lib-index/mail-index.c, src/lib-index/mail-index.h, src/lib- storage/index/cydir/cydir-mail.c, src/lib-storage/index/cydir/cydir- storage.c, src/lib-storage/index/dbox/dbox-mail.c, src/lib- storage/index/dbox/dbox-storage.c, src/lib-storage/index/index- mail.c, src/lib-storage/index/index-mail.h, src/lib-storage/index /index-search.c, src/lib-storage/index/index-status.c, src/lib- storage/index/index-storage.c, src/lib-storage/index/index- storage.h, src/lib-storage/index/index-transaction.c, src/lib- storage/index/maildir/maildir-mail.c, src/lib-storage/index/maildir /maildir-storage.c, src/lib-storage/index/mbox/mbox-mail.c, src/lib- storage/index/mbox/mbox-storage.c, src/lib-storage/index/raw/raw- mail.c, src/lib-storage/index/raw/raw-storage.c, src/lib-storage /mail-search-build.c, src/lib-storage/mail-search.h, src/lib-storage /mail-storage-private.h, src/lib-storage/mail-storage.c, src/lib- storage/mail-storage.h, src/lib-storage/mail.c: Initial CONDSTORE support. [4b8c1c164d8f] 2008-03-14 Timo Sirainen * src/imap/Makefile.am, src/imap/cmd-search.c, src/imap/imap- messageset.c, src/imap/imap-messageset.h, src/imap/imap-search.c, src/imap/imap-search.h, src/lib-imap/Makefile.am, src/lib-imap/imap- messageset.c, src/lib-imap/imap-messageset.h, src/lib- storage/Makefile.am, src/lib-storage/index/index-search.c, src/lib- storage/mail-search-build.c, src/lib-storage/mail-search-build.h, src/lib-storage/mail-search.h, src/plugins/fts/fts-storage.c, src/pop3/commands.c: Moved IMAP messageset handling to lib-imap/ and searching to lib- storage/. Rewrote messageset handling to use struct seq_range instead. [56f55bd35aa5] * src/lib-storage/index/index-search.c, src/lib-storage/mail-search.h: Added support for SEARCH_UIDSET. [6dbd70663adf] 2008-06-09 Timo Sirainen * src/lib-storage/mail-storage.c: mailbox_sync(): Don't call mailbox_sync_next() - it's not necessary and it just slows down the syncing. [d8d1fdbe29bf] * src/lib-storage/index/index-sync.c: Minor code cleanup [dcdf6f9e1fc0] 2008-06-07 Timo Sirainen * src/lib/failures.c: If writing to log failed with EAGAIN (shouldn't normally happen), waiting for the log fd to be writable again was buggy. [7c9895192a23] 2008-06-06 Timo Sirainen * src/lib-storage/index/index-sort-string.c: sort index: Try to catch broken sort_ids and recreate them correctly instead of assert-crashing. [dd899a1841d9] * src/lib-storage/index/index-sort-string.c: sort index: Messages without sort_id weren't sorted correctly on secondary sort conditions. [63602977ca9b] * src/lib-storage/index/index-sort-string.c: sort index: Removed some optimization checks that wouldn't always be true, causing bad results. [5824e6f1d279] * src/lib-storage/index/maildir/maildir-uidlist.c: maildir: Write dovecot-uidlist before syncing index to make sure that any new messages' filenames are available immediately when they're seen in index. [5f481022db04] 2008-06-04 Timo Sirainen * configure.in, src/auth/mech-gssapi.c: gssapi: Check for gssapi_krb5.h existence before trying to use it. [280e570a5ced] * src/lib-storage/index/index-sort-string.c: sort index: Fixed infinite looping. [c008dde3c973] 2008-06-03 Timo Sirainen * src/lib-mail/istream-header-filter.c: mbox: Empty lines were inserted in the middle of saved mails' headers. [e043135e971d] * src/auth/passdb.c: auth_debug_passwords: Include the password when logging about "Requested x scheme, but we have only y". [ff3adeb71d47] * NEWS: Changed deliver -c parameter to -p parameter, which is the correct one. [c88c1365b60d] * src/deliver/deliver.c: deliver: Added -p parameter to help. [bb47eb08015f] * .hgtags: Added tag 1.1.rc8 for changeset 58c7f5c31db1 [098539c6d034] * NEWS, TODO, configure.in: Released v1.1.rc8. [58c7f5c31db1] [1.1.rc8] 2008-06-02 Timo Sirainen * src/plugins/expire/expire-plugin.c: expire plugin: Pass username to dict_init(). [d73cc550b389] * src/lib-dict/dict.c: dict: Added assert to make sure username is never NULL. [04cb8f657b65] * src/lib-storage/index/dbox/dbox-file-maildir.c: Compiler warning fix [09f98612f10d] * src/lib-storage/index/mbox/mbox-save.c: mbox: We always add end-of-headers line while saving the message, so make sure the parsing code also sees it and updates cache correctly. [d5588b153cf6] * src/lib-mail/istream-header-filter.c, src/lib-mail/istream-header- filter.h: header filter istream: Added HEADER_FILTER_ADD_MISSING_EOH flag to add end-of-headers line if it's missing. [50120b047f0a] * src/lib-mail/message-parser.c: If cached message part showed header's size to be smaller than in reality, return "broken" instead of assert-crashing. [f27e6f583817] * src/lib-storage/index/index-mail.c, src/lib-storage/index/index- mail.h: dbox: Forgot to add pop3.uidl cache variables in previous commit. [60733457ea20] * src/tests/Makefile.am: Link test-imap with libcharset.a as well (required by some linkers) [cb55e435b79e] * src/lib-storage/index/dbox/dbox-sync-rebuild.c: dbox sync rebuilding: Don't leave all maildir file fds open until the end of sync. It can cause too many open files. [8ae5268762b5] * src/lib-storage/index/dbox/dbox-file-maildir.c, src/lib- storage/index/dbox/dbox-file.h, src/lib-storage/index/dbox/dbox- mail.c, src/lib-storage/index/dbox/dbox-sync-file.c: dbox: Use POP3 UIDLs from metadata if they exist. [2d367594b41c] * src/lib-storage/index/dbox/dbox-file-maildir.c, src/lib- storage/index/dbox/dbox-file.c, src/lib-storage/index/dbox/dbox- sync-file.c: dbox: When converting maildir-format file to native dbox format, be sure to set received/save dates in metadata. Try to write virtual size as well if it exists in the maildir filename. [c53e20911f07] * src/deliver/deliver.c, src/lib-storage/index/maildir/maildir-copy.c, src/lib-storage/index/raw/raw-mail.c, src/lib-storage/index/raw/raw- storage.c, src/lib-storage/index/raw/raw-storage.h: deliver: Added -c parameter to provide path to delivered mail. This allows maildir to save it using hard links. [a1a146de3ccc] * src/lib-storage/index/maildir/maildir-copy.c: maildir copy: Try to use hard linking also between different namespaces. [76bc7f7e1d60] * src/lib-storage/index/dbox/dbox-file.c: dbox: Fixed opening a maildir-converted file. [f681e55f5c60] * src/lib-storage/index/maildir/maildir-uidlist.c: dbox: Crashfix when using old maildir files. [ffa9c0dc27a7] * src/lib-storage/index/dbox/dbox-file-maildir.c: dbox: If converted maildir filenames don't contain ,W=, don't return broken values. [0fad9c4d0146] * src/plugins/convert/convert-storage.c: maildir -> dbox conversion: Create the destination mailbox so the conversion won't fail with rename() error. [40a660972c70] * src/lib-storage/index/dbox/dbox-storage.c: dbox: Support creating non-selectable mailboxes ("directories"). [326ca0ed8983] 2008-05-31 Timo Sirainen * src/lib-storage/index/mbox/mbox-sync.c: Rewrite X-IMAPbase: header before updating index file header, so that we write the latest mtime as sync_stamp. [e528d9e3cdc8] * src/imap/client.c: Don't try to call a cancelled command if it hasn't started running. Cancel the input-waiting command last. These should fix "Trying to close mailbox with open transactions" assert when client disconnects. [a99b9735f875] * src/lib-storage/index/index-mail.c, src/lib-storage/index/maildir /maildir-mail.c, src/pop3/commands.c: MAIL_FETCH_UIDL_BACKEND crashed with non-maildir backends. Changed the API a bit and fixed/cleaned/optimized POP3 UIDL listing a bit. [8e7a15987428] 2008-05-30 Timo Sirainen * .hgtags: Added tag 1.1.rc7 for changeset 290bd8b0c2d7 [89041c61c10b] * NEWS, configure.in: Released v1.1.rc7. [290bd8b0c2d7] [1.1.rc7] * src/tests/Makefile.am: Link test-imap with libmail.a as well (required by some linkers) [e2497df7cf3f] * src/lib/compat.h: Previous fix broke CMP_ST_CTIME() nsec checks. [5766890f1275] * src/lib/compat.h: Fixed compiling in BSD systems. [0d842b055838] * .hgtags: Added tag 1.1.rc6 for changeset 79857a116d28 [eb8334db63a7] * NEWS, TODO, configure.in: Released v1.1.rc6. [79857a116d28] [1.1.rc6] * src/lib-storage/index/index-mail-headers.c: When saving new messages, make sure we parse the "Date" header so we can add "date.sent" to cache file even if "hdr.Date" isn't added. [346f172c8c71] * src/lib-index/mail-index-private.h, src/lib-index/mail-index.c, src /lib-index/mail-transaction-log-file.c, src/lib-index/mail- transaction-log.c, src/lib-index/mail-transaction-log.h: Fixes to handling races in initial index creation. [de08cc81da73] 2008-05-29 Timo Sirainen * src/imap/imap-search.c: SEARCH/SORT/THREAD: If search parameters are missing, return a clear error message. [b7fcace54fad] * src/imap/cmd-sort.c, src/imap/cmd-thread.c: If SORT/THREAD has invalid search parameters, return BAD instead of NO. [443dcddf9a9a] * src/lib-storage/index/maildir/maildir-mail.c, src/lib-storage/mail- storage.h, src/pop3/commands.c: Maildir: If POP3 UIDL extra field is found from dovecot-uidlist, it's used instead of the default UIDL format (or X-UIDL: header). Patch by Nicholas Von Hollen @ Mailtrust. [2220b2aa9f7c] * src/lib-storage/index/index-sort-string.c: Sort index optimization: Don't write changes to sort IDs if we're doing it only to give sort ID space to expunged messages. [ea913434d522] * src/lib-storage/index/index-sort-string.c: Sort index: Fix to renumbering sort IDs. [66e6b61680a5] * src/lib-storage/index/index-sort-string.c: Sort index: Handle reset_id growing while adding non-wanted messages to sort list. [9c0d2413735d] * src/lib-storage/index/index-sort-string.c: Fixes to sort indexing. [8ae86f73f80d] * src/util/logview.c: logview: Show ext reset.preserve_data. [6930859e7a5a] * src/lib-storage/index/Makefile.am, src/lib-storage/index/index-sort- private.h, src/lib-storage/index/index-sort-string.c, src/lib- storage/index/index-sort.c: Message sort index handling rewrite to fix several race conditions when multiple processes are sorting at the same time. Also fixes sorting to work correctly with 64bit timestamps and file sizes. [4a9ce9df52c5] * src/lib-index/mail-cache-compress.c, src/lib-index/mail-index-sync- ext.c, src/lib-index/mail-index-sync-update.c, src/lib-index/mail- index-transaction-private.h, src/lib-index/mail-index-transaction.c, src/lib-index/mail-index.h, src/lib-index/mail-transaction-log- append.c, src/lib-index/mail-transaction-log.h, src/lib- storage/index/dbox/dbox-sync-rebuild.c: Added mail_index_ext_reset_inc() to atomically increase extension's reset_id. Added clear_data parameter to mail_index_ext_reset*(). [6de1aed24ce5] 2008-05-28 Timo Sirainen * src/lib/failures.c: Print raw backtrace when dying with out-of-memory (with all log backends). [4c702defc245] 2008-05-27 Timo Sirainen * src/auth/auth-master-listener.c, src/auth/db-passwd-file.c, src/auth /userdb-nss.c, src/deliver/auth-client.c, src/deliver/deliver.c, src/deliver/duplicate.c, src/deliver/duplicate.h, src/imap/imap- fetch-body.c, src/imap/imap-thread.c, src/lib-imap/imap-date.c, src /lib-imap/imap-date.h, src/lib-index/mail-cache-compress.c, src/lib- index/mail-index-map.c, src/lib-mail/mbox-from.c, src/lib-mail/mbox- from.h, src/lib-mail/message-date.c, src/lib-mail/message-date.h, src/lib-storage/index/dbox/dbox-index.c, src/lib-storage/index /index-sync.c, src/lib-storage/index/mbox/mbox-sync.c, src/lib- storage/list/mailbox-list-fs-iter.c, src/lib/module-dir.c, src/lib /restrict-access.c, src/master/dict-process.c, src/master/listener.c, src/master/mail-process.c, src/master/mail- process.h, src/master/master-settings.c, src/plugins/fts-squat /squat-trie.c, src/plugins/quota/quota-fs.c, src/util/idxview.c, src/util/rawlog.c: Avoid using shadow variables. Unfortunately -Wshadow also complains about index variable conflicting with index(), which is used in way too many places to change. [1a58b18652a6] * src/lib-storage/index/mbox/mbox-save.c: mbox: Be sure to flush output when writing to non-seekable "mboxes" (pipes). [fedeb23a3d53] * src/lib-storage/index/mbox/mbox-save.c: mbox: When saving messages buffer the output until it's full, so if we die at the beginning we don't just leave a single From_-line. [dd9d344ba140] 2008-05-26 Timo Sirainen * src/lib-storage/index/maildir/maildir-uidlist.c: Minor cleanup to previous commit. [a1ba58f7d695] * src/lib-storage/index/maildir/maildir-uidlist.c: If dovecot-uidlist contains a filename with '/', log an error and recreate the uidlist instead of assert-crashing. [5532bc0eb7bc] * src/lib-storage/index/maildir/maildir-uidlist.c: Code cleanup [ded075753258] * configure.in: Prefix AC_CACHE_CHECK variables with i_cv_. [47c5e52c1181] * configure.in: Once $KRB5_CFLAGS is set, use it instead of calling krb5-config again. [419b7cfc954c] 2008-05-25 Timo Sirainen * src/lib-storage/mailbox-tree.c: Don't crash if subscribed mailbox begins with hierarchy separator. [0e0054c0da66] * src/imap/cmd-subscribe.c: If SUBSCRIBE or UNSUBSCRIBE fails, we returned "Unknown error". [f0600e9db643] * src/plugins/expire/auth-client.c: expire-tool: Fixed changing uid/gid. [5b27f5cbf016] * src/lib-storage/index/maildir/maildir-mail.c, src/lib- storage/index/maildir/maildir-uidlist.c: Maildir: Moved uidlist refreshing to maildir_uidlist_lookup() where it benefits all callers. [d920ec986c34] * src/lib-index/mail-transaction-log-view.c: Fixed previous transaction log assert-avoidance check. [e54ca78ce35f] * configure.in: Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also. [e6187b556b65] * src/lib-index/mail-index-map.c: If index file's header shows that it's unusable (e.g. major version change or CPU arch change), make sure they're not tried to be used and handle the rebuilding nicely. [baf21d1db4e5] * src/lib-index/mail-transaction-log-file.c: When creating a new transaction log, don't reuse an existing one if its sequence isn't 1. [7940ff8ecd13] * src/lib-index/mail-transaction-log-view.c: Avoid assert-crashing with broken transaction log files. [2c3bb09045be] * src/plugins/fts-squat/squat-trie.c: squat: Flush NFS caches. [7512b6d8afe1] * src/lib-storage/index/dbox/dbox-save.c: dbox: fdatasync() when saving. [8a4ac809d472] * src/lib-storage/index/dbox/dbox-file.c, src/lib-storage/index/dbox /dbox-save.c: dbox: Don't write message UID to u.* files' header, since the filename itself specifies the UID already. When reading u.* files ignore the UID field completely. This would allow hard linking u.* files, but the metadata will then contain only a single mailbox's flags+keywords. [cf924043234d] * src/lib-storage/index/dbox/dbox-mail.c: dbox error handling fix [a2a199667c05] * src/lib-storage/index/dbox/dbox-file.c: dbox: Some mails could have been written using m.* files, even though everything was supposed to be u.* for now. [30a97495c7bf] * dovecot-example.conf, src/lib-storage/index/mbox/mbox-storage.c: mbox: If INBOX creation fails because of EACCES, try with privileged group enabled. [dd378ab0263e] * src/lib-storage/index/maildir/maildir-mail.c, src/lib- storage/index/maildir/maildir-uidlist.c, src/lib- storage/index/maildir/maildir-uidlist.h: Maildir: If dovecot-uidlist has wrong cached virtual size, remove it when we detect it. If maildir filename has wrong W value, log a clear error about it. [abdf9e06a956] * src/lib/ioloop.c: timeout_add(0, ..) was looping in timeout handling code. [d432ef4835e3] * src/lib-index/mail-index-map.c, src/lib-index/mail-index.h: Make sure MAIL_RECENT flag is cleared from index file's flags so it can be used in future for other purposes. Increased minor version number because of this. [b6b3ea77e83e] * src/plugins/zlib/zlib-plugin.c: zlib plugin: Uncompress if the message begins with zlib header instead of looking at the 'Z' flag. This fixes copying with hard links. Based on a patch by Richard Platel. [0b9a5a7a0b3e] * src/imap/cmd-list.c: LIST X-STATUS: Send LIST reply before STATUS reply. [9c781d042afe] 2008-05-24 Timo Sirainen * src/lib-storage/index/cydir/cydir-storage.c, src/lib- storage/index/dbox/dbox-storage.c: dbox & cydir: If mailbox doesn't exist, return it as \nonexistent instead of \noselect. [7690cdabb3f8] * src/lib-storage/list/mailbox-list-fs-iter.c: Mailbox flags could have been wrong with filesystem layout. [bf8227a34937] * src/imap/cmd-list.c: LIST-EXTENDED: CHILDINFO shouldn't be quoted. [0cd3db11a42f] 2008-05-18 Timo Sirainen * src/lib-storage/index/maildir/maildir-uidlist.c: Compile fix [e29dafc501cc] 2008-05-17 Timo Sirainen * src/lib-storage/index/maildir/maildir-uidlist.c: maildir uidlist: Include old and new UID in "Duplicate file entry" warning. [6ab2ccae0868] * src/lib-storage/index/maildir/maildir-uidlist.c: Maildir error handling fixes if appending to uidlist failed. [4a0e2927a232] * src/lib/ioloop-notify-kqueue.c: kqueue: If opening a file fails with ESTALE, don't log an error. It probably just means the file was deleted by another NFS client. [20c6e9545d56] * configure.in, src/lib-storage/index/maildir/maildir-sync.c, src/lib- storage/index/maildir/maildir-uidlist.c, src/lib/compat.h: Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros for getting the nanosecond and ST_NTIMES_EQUAL() macro for comparing them. Added support for BSD st_?timespec fields. [a957567706ec] * src/lib-storage/index/maildir/maildir-uidlist.c: Fixed compiling on systems without nanoseconds in struct stat. [4c70d5f54409] 2008-05-16 Timo Sirainen * src/imap/client.c, src/imap/commands.h: If client tries to change the selected mailbox state while another command is still running, wait until the command is finished. [c4342385d696] * src/lib/var-expand.c: Added %T = trim modifier. [15ddb7513e2d] 2008-05-15 Timo Sirainen * src/tests/test-lib.c: buffer test failed if stack wasn't cleared by OS. [abb4d2011b52] * src/lib-storage/index/maildir/maildir-mail.c: If file isn't found from uidlist, refresh the file and look again in case it was added after the previous mailbox sync (but after the previous view sync that found new messages). [cb1c6c942768] * src/lib/network.c: net_is_in_network(): Fixed to work with big endian machines. [85203e817f90] * src/tests/test-lib.c: net_is_in_network(): Added IPv6 unit tests [4ba3de34eaa4] * src/lib/failures.c: "Can't open log file" error was missing linefeed. [45a4fe590389] * src/auth/auth-request.c, src/lib/network.c, src/lib/network.h, src/tests/test-lib.c: Moved net_is_in_network() to lib/network.c. [e0007da64cdc] * src/util/idxview.c: Show the new uidlist_* fields in maildir header. [7a7cf6662302] * src/lib-storage/index/maildir/maildir-save.c, src/lib- storage/index/maildir/maildir-storage.h, src/lib- storage/index/maildir/maildir-sync-index.c, src/lib- storage/index/maildir/maildir-sync.c, src/lib-storage/index/maildir /maildir-sync.h, src/lib-storage/index/maildir/maildir-uidlist.c, src/lib-storage/index/maildir/maildir-uidlist.h: Keep track of dovecot-uidlist mtime+size in index file. If it's up- to-date (and unless indexes weren't updated at some point, it always is) and we're saving a new message, don't bother reading the uidlist contents. [c14a2b0a3126] * src/lib-storage/index/maildir/maildir-save.c: More maildir saving code cleanups [3b818654abfa] * src/lib-storage/index/maildir/maildir-save.c: Fix to previous cleanup. [b2e844f4214b] * src/lib-storage/index/maildir/maildir-save.c: Code cleanup [534d93ab2fac] 2008-05-13 Timo Sirainen * src/lib-storage/index/maildir/maildir-save.c: W= is now always added to maildir filenames (the code was accidentally commented out). [f96fd5c97375] 2008-05-11 Diego Liziero * src/lib/data-stack.c: make outofmem_area static [553f26afc900] 2008-05-09 Timo Sirainen * src/lib/data-stack.c: Removed unused variable popped_frame_pos. Patch by Diego Liziero. [89a0a4e1f918] 2008-05-07 Timo Sirainen * src/login-common/ssl-proxy-openssl.c: If SSL function fails and there are no errors, return "Unknown error" instead of "Success" as the reason. [bec3cd8e8151] 2008-05-06 Timo Sirainen * src/lib-storage/index/maildir/maildir-mail.c: If we lose a maildir filename, make sure the message gets marked as expunged in index. [b776f2b8d827] * src/lib-storage/index/maildir/maildir-sync.c: Removed a bad assert. [118ae423dbc4] 2008-05-05 Timo Sirainen * src/lib/ioloop-notify-inotify.c: If inotify_add_watch() fails, log an error. [3c0dd5c29aca] * src/lib/ioloop-notify-inotify.c: If inotify instance limit is reached, give a hint about max_user_instances file that can be increased. [31e1382b315f] * .hgtags: Added tag 1.1.rc5 for changeset 3b09af6458e5 [0a80134510b1] * NEWS, TODO, configure.in: Released v1.1.rc5. [3b09af6458e5] [1.1.rc5] * src/lib-dict/dict-db.c, src/lib-sql/driver-mysql.c, src/lib- storage/index/dbox/dbox-sync-rebuild.c: Added ATTR_UNUSED to function parameters that won't be implemented for v1.1. [c6e9fd175bdf] * src/login-common/ssl-proxy-openssl.c: Free OpenSSL memory at deinit. [74e2c7b68c71] * src/lib-storage/index/mbox/istream-raw-mbox.c: Removed accidentally committed debug sleep(). [23651c111fbd] * src/plugins/acl/acl-mailbox.c: ACL: If any of the flag set rights were given, STORE FLAGS allowed replacing all flags (+/-FLAGS worked correctly). [85b48992cc97] * src/plugins/acl/acl-mailbox.c: ACL: If we don't have 'w' access, don't allow creating new keywords. [1c1dc9d1f383] 2008-05-04 Timo Sirainen * src/plugins/acl/acl-mailbox-list.c: ACL plugin was listing mailboxes directly from dovecot-acl-list. It was supposed to be used only as an optimization to avoid looking into all mailboxes to see which ones contained dovecot-acl files. [036d06b57bd1] * src/lib-storage/index/cydir/cydir-storage.c, src/lib- storage/index/dbox/dbox-storage.c, src/lib-storage/index/maildir /maildir-storage.c, src/lib-storage/index/mbox/istream-raw-mbox.c, src/lib-storage/index/mbox/mbox-storage.c, src/lib-storage/index/raw /raw-storage.c, src/lib-storage/list/mailbox-list-fs-iter.c, src /lib-storage/list/mailbox-list-maildir-iter.c, src/lib-storage /mailbox-list-private.h: Added mailbox_name parameter to mailbox_list.iter_is_mailbox(). [7f7003bcf422] * src/lib-storage/list/mailbox-list-subscriptions.c, src/lib-storage /mailbox-list-private.h, src/lib-storage/mailbox-list.c: mailbox_list_iter_update() was always setting subscribed flags to processed nodes. Changed the API so the flags can be specified. [2dd86c2f8efb] * src/lib-storage/list/mailbox-list-maildir-iter.c: maildir++ LIST (subscribed): If listing finds a non-subscribed mailbox under a subscribed one, mark the subscribed one as having children. [3d5379e33664] * src/imap/cmd-list.c: LIST-EXTENDED options were ignored. [ae8a3595d707] * src/lib/mempool-alloconly.c: DEBUG: Fixes to calculating minimum initial pool size in debug mode. [33d6be3b5c01] * src/lib-storage/index/mbox/mbox-save.c: mbox: Always update sync_size when saving mails. We rely on sync_size for getting the last message's physical size. [e935b36b8b65] * src/lib-storage/index/mbox/mbox-mail.c: Getting "next message's offset" was broken if a new message had been added recently. This broke message size calculations. [80d827b411c8] * src/lib-storage/index/mbox/istream-raw-mbox.c: Added assert. [9bef11f4faf6] * src/lib-storage/index/mbox/istream-raw-mbox.c, src/lib- storage/index/mbox/mbox-mail.c: Error message improvements. [6dfa085a49d6] * dovecot-example.conf, src/deliver/auth-client.c, src/master/mail- process.c: If mail_chroot ends with "/.", remove chroot prefix from home directory. [9edaf878bb96] * src/auth/auth-stream.c, src/auth/db-passwd-file.c, src/lib-index /mail-index-map.c, src/lib-mail/istream-header-filter.c, src/lib /env-util.c: Memory pool allocation tweaks. [8bed019c834d] * src/lib/mempool-alloconly.c: Use smaller sentries between allocations. Larger ones make "Growing memory pool" warnings pointless, because most of the space is wasted on sentries. A smaller sentry will still catch most of the buffer overflows. [96f724a4a1a0] * src/lib-storage/index/mbox/mbox-sync-private.h, src/lib- storage/index/mbox/mbox-sync.c: mbox_lazy_writes: If errors are noticed in mbox, write changes to fix them immediately to avoid constant errors in logs. [591145eaaf87] * src/plugins/expire/expire-plugin.c, src/plugins/expire/expire- tool.c: Handle dict_init() and dict_lookup() failures without crashing. [955ae7b7ad1a] * doc/dovecot-db.conf, dovecot-example.conf, src/master/dict- process.c, src/master/master-settings-defs.c, src/master/master- settings.c, src/master/master-settings.h: Added dict_db_config setting to point to a Berkeley DB config file. [768231eb84cf] * src/auth/mech-gssapi.c: Don't use krb5_get_error_message(), it doesn't work with Heimdal Kerberos. [ad0f32abda6d] * src/lib-storage/index/mbox/istream-raw-mbox.c, src/lib- storage/index/mbox/istream-raw-mbox.h, src/lib-storage/index/mbox /mbox-mail.c: mbox: Don't stop at From_-lines in the message bodies. Use Content- Length: header to figure out if it belongs to a message body or not. [7871b6219480] * src/master/login-process.c: The previous gdb check should be done only with --enable-debug. [0eb6a0c01001] * src/auth/mech-gssapi.c: Support cross-realm krb5 authentication. Based on patch by Zachary Kotlarek. [841209428d2d] * src/plugins/quota/quota-maildir.c: When updating maildir quota create also missing maildirsize file and make sure the limits in the header are up-to-date. [2475c57fadb0] * src/master/login-process.c: Don't restrict login process fd limits when running with GDB=1. [4407ef392711] * src/deliver/deliver.c: deliver -e: Write the error string to stderr also with tempfails. [40929ce03622] * src/deliver/auth-client.c: mail_uid and mail_gid settings weren't handled correctly. [1b15881ed93b] * src/lib-storage/index/dbox/dbox-index.c, src/lib-storage/index/mbox /mbox-lock.c, src/lib/file-lock.c: If fcntl() fails with EACCES, give a more understandable error message since it's more similar to EAGAIN than anything to do with permissions. [aa41caaf8e0b] * src/master/auth-process.c: If auth process dies at startup, deinitialize logs properly so that any pending log messages from auth process get logged before we kill ourself. [e7e3d6ffb0c1] * src/plugins/quota/quota-count.c, src/plugins/quota/quota-dict.c, src/plugins/quota/quota-maildir.c, src/plugins/quota/quota- private.h, src/plugins/quota/quota.c: Added "ignore" option to quota rules which causes the mailbox to be ignored when counting quota. [73368107aeda] 2008-04-30 Timo Sirainen * src/plugins/acl/acl-backend-vfile.c, src/plugins/acl/acl-cache.c, src/plugins/acl/acl-mailbox-list.c: Fixed several memory leaks in ACL plugin. [ba634d2c0ab9] * src/lib-storage/index/mbox/mbox-sync.c: Use a larger initial mbox keywords pool size. [080dd4d2fd94] * src/lib-storage/index/mbox/mbox-sync.c: Fixed updating first_recent_uid in index header. [abc88e664e63] * src/lib/mempool-alloconly.c: DEBUG: Make sure mempool's initial size is large enough to account for extra sentries. [f5af6ce6376f] 2008-04-25 Timo Sirainen * src/auth/db-ldap.c: Static attributes were broken in user_attrs. [6c6af734f284] * src/lib-storage/index/index-sync.c, src/lib-storage/index/maildir /maildir-sync-index.c: Fixes to handling recent flags with UIDVALIDITY changing. [4dc5542f58aa] * src/lib-storage/index/dbox/dbox-sync-rebuild.c, src/lib- storage/index/index-storage.h, src/lib-storage/index/index-sync.c, src/lib-storage/index/maildir/maildir-sync-index.c, src/lib- storage/index/mbox/mbox-sync.c: Reset cached \Recent flags if UIDVALIDITY changes, because we were using UIDs in the cache. [d1bd08d468d0] * src/plugins/acl/acl-mailbox-list.c, src/plugins/acl/acl-storage.c, src/plugins/convert/convert-plugin.c, src/plugins/expire/expire- plugin.c, src/plugins/fts/fts-storage.c, src/plugins/lazy-expunge /lazy-expunge-plugin.c, src/plugins/mail-log/mail-log-plugin.c, src/plugins/mbox-snarf/mbox-snarf-plugin.c, src/plugins/quota/quota- storage.c, src/plugins/zlib/zlib-plugin.c: next_hook should be called after our hook is finished with its doings, that way they get executed in the intended order. This should fix some problems when multiple plugins are used. [068f6eefc62b] * src/plugins/acl/acl-cache.h: SIZEOF_ACL_MASK() macro wasn't used as it was intended. Changed so it allocates enough memory for the struct. [bf99bd33d69b] * src/plugins/expire/expire-env.c: Expire plugin wasn't working unless expire_altmove was also defined. [e1fe3d080314] 2008-04-24 Timo Sirainen * src/lib/ioloop-notify-dn.c: Better error handling for dnotify failures. [63cd8ec2007a] * src/lib-storage/index/dbox/dbox-storage.c: If mailbox hasn't been opened when closing it, don't crash when trying to flush dirty flags. [43674a726a92] * src/lib/file-dotlock.c, src/lib/ioloop-notify-dn.c, src/lib/ioloop- notify-inotify.c, src/lib/ioloop-notify-kqueue.c, src/lib/ioloop- notify-none.c, src/lib/ioloop.h: Renamed IO_NOTIFY_DISABLED to IO_NOTIFY_NOSUPPORT. IO_NOTIFY_NOSUPPORT is now also given by dnotify when trying to listen for files. Fixes busy looping with dnotify when waiting for dotlock to get deleted. [940641318f12] * src/lib/file-dotlock.c: Comment updates [8af71985e97b] * src/auth/db-ldap.c: Allow %variables in static LDAP fields. [0dbf10f4493a] * src/imap-login/imap-proxy.c, src/pop3-login/pop3-proxy.c: Send the success reply in one write. Based on patch by Onno Molenkamp. [053ec63146cb] * src/pop3/client.c: If remote disconnects, log "Connection closed: reason" just like IMAP does. [3353ddd8ac9f] 2008-04-18 Timo Sirainen * dovecot-example.conf: Namespace inbox setting defaults to "no", not "yes". [29518d8b5029] 2008-04-02 Timo Sirainen * src/auth/mech-gssapi.c: GSSAPI: Show username in "autn_name and authz_name differ" error. [4a64c2f8e194] 2008-04-01 Timo Sirainen * .hgtags: Added tag 1.1.rc4 for changeset 4607141a6bdc [3f8b51994ebb] * NEWS, TODO, configure.in: Released v1.1.rc4. [4607141a6bdc] [1.1.rc4] * src/lib/mempool-alloconly.c: DEBUG: Added buffer overflow checking to alloconly memory pools. [45884655c0c4] * src/lib-storage/mail-storage.c: mailbox_transaction_commit(): Use separate temporary variables to store uidvalidity, first_uid and last_uid so that plugins can look at them. [70cf4172af74] * src/auth/db-ldap.c: Using templates in pass_attrs or user_attrs was somewhat broken, causing errors for other fields. Fixed by richs at whidbey.net [15fbff736ab9] * src/lib/data-stack.c: t_buffer_get() overflow check worked only with 64bit systems. [3e7592582f93] * src/imap/imap-sync.c: Memory leak fix by Diego Liziero [9d694f41a699] 2008-03-30 Timo Sirainen * src/lib/str-find.c: matches[] wasn't also allocated enough memory. [00d3b46f61e6] * src/imap/cmd-store.c: STORE: Ignore flag changes for read-only (especially EXAMINEd) mailboxes. [eec74a6ad62e] * src/lib/str-find.c: str_find_init() allocated too little memory for temporary suffixes buffer. Found by Diego Liziero. [ffd549b542c5] * src/lib/data-stack.c: DEBUG: Catch if we write past t_buffer_get()ed memory. [213dd8e78ad8] * src/lib-index/mail-transaction-log-file.c: Fix to previous optimization: Don't crash if we want to read older data from transaction log. [dc9c098a7d26] 2008-03-26 Timo Sirainen * src/imap-login/client-authenticate.c, src/imap-login/client.c, src /imap-login/client.h, src/imap-login/imap-proxy.c, src/pop3-login /client-authenticate.c, src/pop3-login/client.c, src/pop3-login/client.h, src/pop3-login/pop3-proxy.c: Log clearly with "auth failed, # attempts" if user gets disconnected before logging in. [65fbb6226141] * src/imap/cmd-idle.c: Workaround to never idle-disconnect IDLEing clients got broken by timeout code changes. [498975950370] 2008-03-23 Timo Sirainen * src/lib/randgen.c: random_fill(): If read(/dev/urandom) returned EINTR, it could have written random data before the given buffer (buffer underflow). Pointed out by Sami Farin. This function is used only by auth and pop3-login (with APOP enabled) processes, so normal users shouldn't be able to send signals to any of them to exploit this. Even then the data would be random, making it quite unlikely to cause anything else than a crash. [cdb007c1923d] 2008-03-21 Timo Sirainen * src/lib-index/mail-transaction-log-file.c: Small optimization: Don't try to pread() log file if we already know we've read everything. [6983dfc231d7] 2008-03-20 Timo Sirainen * src/imap/imap-sync.c: Try to send tagged replies in the same order as the commands were received (fixes Apple Mail bug). [4407b7265afd] * src/lib-storage/index/maildir/maildir-mail.c: "Corrupted physical/virtual size" shows now also the UID of the message. [0ee365c21c16] * src/imap/imap-sync.c: Don't access freed memory. [9b8590b3749b] * src/imap/client.c, src/imap/client.h, src/imap/cmd-append.c, src/imap/cmd-idle.c, src/imap/cmd-search.c, src/imap/cmd-x-cancel.c, src/imap/imap-sync.c: client_command_free()/cancel(): Take pointer-to-pointer parameter and set it to NULL to make sure it's not accessed again. [33d8adcc2d44] * src/plugins/fts-squat/squat-trie.c: If we have both maybe and definite UIDs, remove all definite UIDs from maybe UIDs. [2b89ceb0f6af] * src/plugins/fts-squat/fts-backend-squat.c, src/plugins/fts-squat /squat-trie-private.h, src/plugins/fts-squat/squat-trie.c, src/plugins/fts-squat/squat-trie.h: Added FTS_SQUAT environment with partial=n and full=m settings. [477b619b926b] * src/plugins/acl/acl-backend-vfile-acllist.c: If dovecot-acl-list can't be created because of permission problems, it's probably because the account is read-only, so don't log an error. [d6f1eb00e4d3] * src/lib-storage/index/mbox/mbox-sync.c: If mbox isn't writable, don't try to update its atime with utime(). [264d4f41c627] 2008-03-19 Timo Sirainen * src/lib-storage/index/index-search.c: Ignore \Recent flag in indexes when searching them (leftovers from v1.0). [11e7ec83665d] * src/plugins/quota/quota.c: Quota: backend= didn't work in rules. [1da16dbcacf7] * src/plugins/quota/quota-plugin.c: "Invalid quota rule" didn't specify the error message [a2bc615e026d] 2008-03-16 Timo Sirainen * src/plugins/expire/expire-env.c, src/plugins/expire/expire-env.h, src/plugins/expire/expire-plugin.c: If first message is expunged from expire_altmove mailbox, don't update dict. [bd54359bfb3a] * README: Updated conformed RFCs list [ae746a73e51e] * src/imap/imap-sync.c: If sync queue has commands that don't allow EXPUNGEs and also commands that do allow them, sync first the ones that don't allow EXPUNGEs, otherwise we could send untagged EXPUNGEs before e.g. tagged FETCH reply. [ac984d42917f] 2008-03-15 Timo Sirainen * src/lib-index/mail-index-sync-update.c: DEBUG: Verify that UIDs are ascending after sync. [a4a552321bd3] * src/lib-index/mail-index-map.c: Fixed extension record checking. [fc526477d36b] * src/lib-dict/dict-client.c: Reverted last error handling change, it can't happen after all. [a18f7f0dcff5] * src/lib-dict/dict-client.c: Error handling fix [e8df909de851] * dovecot-example.conf, src/master/mail-process.c: Disable log throttling while mail_debug=yes [4c093cfa8756] 2008-03-14 Timo Sirainen * src/lib-index/mail-index-transaction.c: MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES bugfix [58c0b1f833f3] * src/lib-storage/index/cydir/cydir-mail.c, src/lib-storage/index/dbox /dbox-mail.c, src/lib-storage/index/index-mail.c, src/lib- storage/index/index-mail.h, src/lib-storage/index/index-search.c, src/lib-storage/index/maildir/maildir-mail.c, src/lib- storage/index/mbox/mbox-mail.c, src/lib-storage/index/raw/raw- mail.c, src/lib-storage/mail-storage-private.h: struct mail can't necessarily be casted to struct index_mail. Added a new get_index_mail() method to return it. [45624f5ba358] * src/lib-storage/mail-storage-private.h, src/lib-storage/mail- storage.c: Added transaction flags to struct mailbox_transaction_context. [5d96b15832fc] 2008-03-12 Timo Sirainen * src/lib-index/mail-index-sync-ext.c: Expunge handler crashfix [50ebec7bd4c5] 2008-03-11 Timo Sirainen * src/lib/failures.c: Log raw backtrace when dying with "out of memory" error [ed147ad1e03e] * src/lib-index/mail-index-map.c, src/lib-index/mail-index-sync-ext.c, src/lib/fdpass.c: Apparently "alignmentation" isn't a word. Changed to "alignment". [b3c900eb7e83] * src/imap/cmd-fetch.c: Make UID FETCH return the UID as the first field to fix problems with bad IMAP clients. [5b18c2ff2e2d] * src/lib-storage/index/index-mail.c: BODY/BODYSTRUCTURE may have been returned as NULL in some situations. [7e27d67d3abe] * src/lib-storage/index/dbox/dbox-file.c: dbox metadata writing fixes [81994d76fd24] * src/lib-storage/index/dbox/dbox-file.c: When reading dbox metadata, flush the input stream's cached data first to make sure the latest metadata is used. [8afcffeae291] * src/lib-storage/index/dbox/dbox-sync-rebuild.c: dbox rebuild: If alt directory doesn't exist, don't fail. [0d3ab8eaeedf] * src/plugins/convert/convert-plugin.c: Call the next namespaces hook. [ba8ae35ce462] * src/lib-storage/index/cydir/cydir-storage.c, src/lib- storage/index/dbox/dbox-storage.c: Error message fixes [da3b83d7928f] * src/lib-index/Makefile.am, src/lib-index/mail-hash.c, src/lib-index /mail-hash.h: Removed mail-hash. It's not used anywhere and its API has been redesigned. [ce11885b99a0] * src/lib-storage/index/maildir/maildir-mail.c: Typofix in error message [f5011bb9a633] 2008-03-10 Timo Sirainen * src/lib-storage/index/maildir/maildir-mail.c: If we caught broken cached virtual/physical size, change the value to the one in filename/uidlist. [35150eb346c1] * src/lib-storage/index/maildir/maildir-mail.c: If physical/virtual size is in both cache and in filename/uidlist, mark the cache corrupted if they don't match. [7173d502b4e6] * src/lib-storage/index/maildir/maildir-mail.c: uidlist size caching check was wrong for physical sizes. [705afa37b818] * doc/dovecot-ldap-example.conf, src/auth/db-ldap.c, src/auth/db- ldap.h: Added ldaprc_path setting. [8a4ecf4c2ca1] * doc/dovecot-ldap-example.conf, src/auth/db-ldap.c, src/auth/db- ldap.h: Added debug_level LDAP option to specify OpenLDAP's debug level. [a61102ad418f] * src/imap-login/client-authenticate.c: If we sent client "waiting for auth process" message, we crashed later. [de4881149c0e] * src/auth/auth-request.c: Changing "user" from userdb crashed. [2d3b9a6d23f5] * src/lib-index/mail-transaction-log.c: Memory leak fix (by Diego Liziero) [e569788da4e8] 2008-03-09 Timo Sirainen * .hgtags: Added tag 1.1.rc3 for changeset c73d6224a96b [88f0c016f766] * NEWS, TODO, configure.in: Released v1.1.rc3. [c73d6224a96b] [1.1.rc3] * src/plugins/fts-squat/squat-uidlist.c: Crashfix if file is empty. [04297ce26b78] * src/auth/auth-request.c: If trying to log in with password having illegal characters, make sure we fail early. [1125d2d59e82] * src/auth/auth-client-connection.c, src/auth/auth-master- connection.c, src/auth/auth-master-connection.h, src/auth/auth- request-handler.c, src/auth/auth-request-handler.h, src/auth/auth- request.c, src/auth/auth-request.h, src/auth/auth-stream.c, src/auth /auth-stream.h, src/auth/auth-worker-client.c, src/auth/auth-worker- server.c, src/auth/auth-worker-server.h, src/auth/passdb-blocking.c, src/auth/userdb-blocking.c: Use auth-stream API to build all TAB-delimited strings to make sure strings are escaped properly where necessary. [08d31d752893] * src/lib/restrict-access.c: Make sure the primary GID is in supplementary groups when using mail_privileged_group so when effective GID is switched to the privileged GID we still have primary GID's access as well. [2bef36355718] * src/lib/restrict-access.c: mail_privileged_group didn't work with systems where setresgid() wasn't supported (e.g. OSX, Solaris) [85934050fdbd] * src/lib-index/mail-index-map.c: Valgrind warning fix [8e014fd46e84] * src/auth/auth-request-handler.c, src/plugins/expire/expire-tool.c, src/util/listview.c: Compiler warning fixes [899127b7c7e6] * src/plugins/fts-squat/fts-backend-squat.c: Flags weren't passed correctly to squat. [9d6d555950dd] 2008-03-08 Timo Sirainen * src/deliver/deliver.c: deliver -d parameter was broken by recent changes. [631fd6f25e41] * .hgtags: Added tag 1.1.rc2 for changeset dfd811aa0418 [d06f113871a5] * NEWS, TODO, configure.in: Relased v1.1.rc2. [dfd811aa0418] [1.1.rc2] * src/imap/imap-thread.c: THREAD fixes: If sent date isn't usable, fallback to received date. If thread building would introduce loop, the message should not have a parent then. [dbbb91f70719] * src/deliver/mail-send.c: mail_debug=yes: Log recipient/return-path when sending rejects and forwards. [1570eb502366] * src/plugins/fts/fts-storage.c: If the SEARCH TEXT/BODY command contained more parameters, we could have returned too many/little replies. [f435be3e3def] * src/plugins/fts/fts-search.c: Small optimization. [1307a1702e5e] * src/plugins/fts-squat/squat-trie.c: When searching words with only non-indexed characters, return all messages as "maybe". [92c2ab255c65] * src/login-common/client-common.c, src/login-common/ssl-proxy- openssl.c, src/login-common/ssl-proxy.c, src/login-common/ssl- proxy.h: If TLS connection closes with anything except a clean disconnection, log the reason in the normal disconnected line. [0bb3fc72a74f] 2008-03-07 Timo Sirainen * src/plugins/fts-squat/squat-uidlist.c: When rebuilding uidlist, read the existing one entirely into memory at the beginning. This this is a lot faster than reading it with random access in smaller pieces. [4445415da4ff] * src/plugins/fts-squat/squat-trie.c: Don't crash when expunging (broken by seq_range_array_add_range() change) [2201fd4548e3] * src/plugins/fts-squat/squat-trie-private.h, src/plugins/fts-squat /squat-trie.c, src/plugins/fts-squat/squat-trie.h, src/plugins/fts- squat/squat-uidlist.c: Added support for dotlocks. [55712d36224b] * src/plugins/fts-squat/squat-uidlist.c: Minor optimization and possible compile fix. [d51565e31ceb] * src/plugins/fts-squat/squat-uidlist.c: If uidlist writing fails, don't assert-crash. [fc296dfcfd29] * src/plugins/fts-squat/squat-trie-private.h: squat_unpack_num() returned error for numbers >= 2^28, causing Squat to report index corruption with (very) large files. [750ff2eb83a0] * src/lib-index/mail-index-map.c, src/lib-index/mail-index-private.h: Don't allow too large extension header sizes. They're probably caused by file corruption. [8b0fe9c43c85] * src/lib-index/mail-index-sync-ext.c: Check extension header validity before using it. [f4990a37a8df] * src/lib-storage/index/mbox/mbox-sync.c: Don't crash if trying to open a non-file as mbox. [33b90e21b634] * src/plugins/quota/quota-maildir.c: If both byte and message count limits weren't set, we recalculated maildirsize all the time. [1b160b2cd080] 2008-03-06 Timo Sirainen * src/lib-index/mail-index-sync-ext.c, src/lib-index/mail-index-sync- update.c: Expunge handler calling fixes. [dc24431136b3] * src/lib-index/mail-index-view.c: mail_index_bsearch_uid(): Small optimization. [1bbef480786a] * src/lib-index/mail-index.c: mail_index_ext_register(): Allow registering an extension without record or header. It can still be used to register expunge/sync handlers. [11eb0bd76299] * src/lib-index/mail-cache.c: Catch dotlock creation timeout error. [c4fda7e5d879] * src/lib-index/mail-transaction-log-file.c: Error message fix. [b747eb6e1ca1] * src/lib-storage/mail-storage.c, src/lib-storage/mail-storage.h: Added mailbox_transaction_get_mailbox() [ffb7e8b1c114] * src/lib-imap/imap-quote.c: imap_quote(): Don't crash if allocating from data stack pool. [7d4f7c7095dd] * src/plugins/zlib/zlib-plugin.c: Assert-crashfix when using a specific plugin combination. [25551453b13c] 2008-03-05 Timo Sirainen * src/lib-storage/index/dbox/dbox-storage.c, src/lib-storage/list /mailbox-list-fs.c, src/lib-storage/list/mailbox-list-maildir.c, src /lib-storage/mailbox-list-private.h: dbox: Fixes to creating, deleting and renaming mailboxes when using alt directories. [5193f5c6ab5d] * src/master/mail-process.c: NFS checking checks now mail_nfs_index=yes instead of mmap_disable=yes. [de47a37ca0c1] * src/imap/client.h, src/imap/cmd-expunge.c, src/imap/imap-sync.c, src/imap/imap-sync.h: Syncing supports now calling a callback after sync instead of just sending a tagged reply. Use it with EXPUNGE to retry EXPUNGE in case the syncing had seen new \Deleted flags (Outlook workaround). [33304b5f6070] * src/imap/client.c: uncork stream only after syncing to avoid extra writes. [4f63124e756e] * src/master/main.c: Fatals/panics logged by master weren't logged properly. [6115fe69094c] * src/lib/failures.c: Prefix fatal/panic messages with syslog. [51c72fdaadfd] * src/lib-storage/index/index-mail.c: If mail parsing was aborted (mail saving was aborted), don't even try to generate data to be cached to avoid crashes. [63ef0998cd53] * src/lib/istream.c: If stream is closed without stream_errno set, change it to ECONNRESET so if there are any future reads they'll return it. [32d555a08443] * src/lib/istream-tee.c: If parent stream read() fails, update our stream_errno from the parent. [34cc59e3da17] * src/login-common/ssl-proxy-openssl.c: Call SSL_shutdown() [393abdd250bb] * src/auth/db-ldap.c: Fail with a clear error if both tls=yes and ldaps:// URI is used. [0c7dc0b0bb7b] * src/auth/db-ldap.c: If sasl_bind=yes or tls=yes is used and ldap_version<3, fail with an error. [57ae4181bb32] * src/lib/safe-mkstemp.c: Ignore EACCES errors silently. [034e18a91a6b] 2008-03-04 Timo Sirainen * src/lib/istream-crlf.c: Added support for seeking forwards in the stream. [c1c977afe06c] * dovecot-example.conf, src/lib-storage/index/mbox/mbox-lock.c, src /lib-storage/index/mbox/mbox-lock.h, src/lib-storage/index/mbox /mbox-storage.c, src/lib-storage/index/mbox/mbox-storage.h, src/lib /restrict-access.c, src/lib/restrict-access.h, src/master/auth- process.c, src/master/login-process.c, src/master/mail-process.c, src/master/master-settings-defs.c, src/master/master-settings.c, src/master/master-settings.h: Replaced mail_extra_groups setting with mail_privileged_group and mail_access_groups settings. mail_privileged_group allows temporary access to the group when creating mbox INBOX dotlocks. [af998ae4254b] * src/lib/file-dotlock.c: file_dotlock_create(): Don't log an EACCES failures. [09cdd4330d73] * src/master/master-settings.c: If mail_uid or mail_gid doesn't exist, log an error. [218245e5e4e7] * src/plugins/expire/expire-tool.c: Fail if any parameters other than --test is given. [d0db93a071e3] * src/lib-storage/index/dbox/dbox-mail.c: If save time is missing, use the file's ctime instead of current time. [31c4ab6a9b4e] * src/plugins/expire/expire-env.c: Forgot to change expire time to be calculated as hours after debugging. [c150eceb1f6e] * src/plugins/expire/Makefile.am, src/plugins/expire/expire-env.c, src/plugins/expire/expire-env.h, src/plugins/expire/expire-plugin.c, src/plugins/expire/expire-tool.c: Added wildcard support to expire plugin. Added a new expire_altmove setting which moves mails to alt directory with dbox instead of expunging them. Both settings can be used simultaneously. Added --test parameter to expire-tool. Fixed several bugs and did some optimizations. [969656b58e7f] * src/master/child-process.c, src/master/child-process.h, src/master /mail-process.c, src/master/mail-process.h, src/master/main.c: Allow dovecot --exec-mail ext program arguments. [ae8180a4febd] * src/lib-storage/index/index-mail.c: Make MAIL_INDEX_MAIL_FLAG_BACKEND visible to mail_get_flags() and allow it to be changed. [cd22f3bcd29d] * src/lib-storage/index/dbox/dbox-mail.c: If dbox file doesn't have sent date, return (and cache) current time. [3f9f01913f90] * src/lib-storage/index/dbox/dbox-file.c, src/lib-storage/index/dbox /dbox-file.h, src/lib-storage/index/dbox/dbox-storage.c, src/lib- storage/index/dbox/dbox-storage.h, src/lib-storage/index/dbox/dbox- sync-file.c, src/lib-storage/index/dbox/dbox-sync.c: MAIL_INDEX_MAIL_FLAG_BACKEND specifies if file should be in alt dir or primary dir. If the flag is changed, the file is moved. [9ef06104648a] * src/lib-index/mail-index-view-sync.c, src/lib-index/mail-index.h: Added MAIL_INDEX_MAIL_FLAG_BACKEND flag that can be used for backend-specific uses. [93f67b71476c] * src/lib-storage/index/maildir/maildir-save.c, src/lib/Makefile.am, src/lib/fdatasync-path.c, src/lib/fdatasync-path.h: Moved fdatasync_path() to a global function. [d2b10facb504] 2008-03-03 Timo Sirainen * src/lib-storage/index/index-search.c: SEARCH NOT SUBJECT didn't work correctly. [e0e212e7deeb] * src/lib/mempool-alloconly.c: DEBUG: Use t_buffer_alloc_last_full() before calling i_warning() to make sure we don't trash unallocated data from data stack. [a1b8a12521a0] * src/lib/data-stack.c, src/lib/data-stack.h: Added t_buffer_alloc_last_full(). [5017c74367e3] * src/tests/test-imap.c: Added more tests to imap_match(). [3bece69a5bfc] * src/lib-storage/index/dbox/dbox-storage.c: LIST: Show \NoSelect status correctly. [1d0de3d644e4] * src/lib-storage/index/dbox/dbox-storage.c: Mailbox deletion fixes. [bbafc37e3251] * src/lib-storage/list/mailbox-list-fs-iter.c: Mailbox listing fix. [a8963df83db2] * src/deliver/deliver.c, src/lib-mail/Makefile.am, src/lib-mail/mbox- from.c, src/lib-mail/mbox-from.h, src/lib- storage/index/mbox/Makefile.am, src/lib-storage/index/mbox/mbox- from.c, src/lib-storage/index/mbox/mbox-from.h: Moved mbox From_-line handling to lib-mail, since it's also used by deliver. [06f59be7f508] * src/lib-index/mail-index-sync.c: mail_index_sync_have_any(): Refresh index to see if there are any new unseen changes before returning anything. [fa8e8bcc85a5] * src/imap/cmd-close.c: CLOSE: Synchronize the mailbox after expunging messages to actually get them expunged. [d76c54e092f5] 2008-03-02 Timo Sirainen * src/auth/auth-request.c: Fixed pass=yes with blocking passdbs. Also master_user wasn't exported correctly to blocking passdbs. [be991f857c70] * src/plugins/acl/acl-backend-vfile.c: Ignore spaces and TABs at the end of ACL lines. [92cd0509b2b9] * src/lib-storage/index/mbox/mbox-lock.c: Don't try to flush NFS file handle cache for mbox files. [258477a3f1e7] * src/plugins/mail-log/mail-log-plugin.c: Copies were tracked using the source transaction instead of destination transaction, so rollbacking source transaction logged bogus "transaction rolled back" messages. [3f53f528d338] * src/lib-imap/imap-match.c: imap_match(): "foo/bar/%" pattern matching to "foo/" should return CHILDREN instead of NO. [3765f80f4d29] * .hgignore, src/tests/Makefile.am, src/tests/test-imap.c: Added unit tests for imap_match() [ff7b11c64321] * src/lib-index/mail-cache-lookup.c, src/lib-index/mail-cache- private.h, src/lib-index/mail-cache-transaction.c, src/lib-index /mail-cache.c: Optimized cache record loop tracking. [6f59434cf229] 2008-03-01 Timo Sirainen * src/lib/istream-limit.c: Seek also non-seekable parent streams to current offset as long as we're not seeking backwards. [fce616c59597] 2008-02-29 Timo Sirainen * src/deliver/deliver.c: Trying to user $USER environment didn't work before environment was already cleared. Get it earlier. [18766f26a7ed] * src/deliver/deliver.c: If username lookup fails, return EX_USAGE instead of EX_TEMPFAIL because we haven't yet opened the log file. [553eb182004a] * src/lib/seq-range-array.c: Implemented optimized seq_range_array_add_range(). [e318f3c8a724] * src/tests/test-lib.c: Use smaller test buffer sizes [5c683653d962] * src/tests/test-lib.c: Added randomized unit test for seq_range_array*() [b7d55cccc7f4] * src/lib-storage/index/index-mail-headers.c: array_clear() is now equivalent to buffer_clear(), use it. [3161b8648468] * src/tests/test-lib.c: Added unit testing for buffer_t. [90154a6d225e] * src/lib/buffer.c: buffer_reset(buf) and buffer_set_used_size(buf, 0) now do the same thing. [db4a29902723] * src/lib/priorityq.c: Fixed removing last item from priority queue. [8e65f6755843] 2008-02-28 Timo Sirainen * src/lib/istream-limit.c: If underlying stream doesn't support seeking, don't try to seek to original position. [c75b2e1fa5a2] * src/lib/istream-crlf.c: Added support for seeking forwards in the stream. Also mark the stream as non-seekable since seeking backwards doesn't work. [f0c7e9198313] 2008-02-27 Timo Sirainen * src/lib-storage/index/mbox/mbox-sync-update.c, src/lib- storage/index/mbox/mbox-sync.c: Fixed dirty flag/keyword handling. [4e1161bad6ec] 2008-02-26 Timo Sirainen * configure.in: Base docdir to datadir instead of datarootdir which doesn't exist in old autoconfs either. [86af79a203d7] * configure.in: Added support for autoconf versions older than 2.59c. [2cda05620383] * doc/wiki/Makefile.am.in: wiki docs weren't using docdir. [ecf5a34a4758] * src/plugins/quota/quota-maildir.c, src/plugins/quota/quota- private.h, src/plugins/quota/quota.c: quota_rule=?:.. specifies the default quota limits to use when backend doesn't have any. If backend has limits, this rule is ignored. [a39b16b0a530] * src/plugins/quota/quota-dict.c, src/plugins/quota/quota-dirsize.c, src/plugins/quota/quota-fs.c, src/plugins/quota/quota-maildir.c, src/plugins/quota/quota-private.h, src/plugins/quota/quota.c: Relative (%) limits in quota rules and warnings work now if the backend specifies or changes the limits (e.g. Maildir++ maildirsize file) [9e4c26471b19] * src/auth/db-ldap.c, src/auth/userdb-ldap.c: Don't crash if ldap userdb lookup fails. [f78b83bf16b7] 2008-02-25 Timo Sirainen * src/lib-storage/index/index-mailbox-check.c, src/lib-storage/index /index-sync.c: mailbox_notify_changes(): Don't trigger the timeout once a second to see if the timeout really occurred. [d0520bb9177f] * src/lib-storage/index/cydir/cydir-sync.c, src/lib-storage/index/dbox /dbox-sync.c, src/lib-storage/index/index-storage.h, src/lib- storage/index/index-sync.c, src/lib-storage/index/maildir/maildir- sync.c, src/lib-storage/index/mbox/mbox-sync.c: Check and update sync_last_check in one common function. [db65d921b0e1] * src/lib-storage/index/index-mail-headers.c: And compile fix for last change. [697000a67c42] * src/lib-storage/index/index-mail-headers.c: array_clear() only truncates the array, growing its size later doesn't fill it with zero. Use buffer_reset() instead here which does zeroing. [589663d269de] * src/imap/commands.c: LOGOUT command also closes mailbox, so mark it as such to fix command pipelining problems. [0917df31efec] 2008-02-24 Timo Sirainen * src/plugins/trash/trash-plugin.c: Allow #comments in trash config [75526c605044] 2008-02-21 Timo Sirainen * .hgtags: Added tag 1.1.rc1 for changeset 958e377fc1dc [c47b498a427b] * NEWS, TODO, configure.in: Released v1.1.rc1. [958e377fc1dc] [1.1.rc1] * src/imap/imap-search.c, src/lib-storage/index/index-search.c, src /lib-storage/mail-search.c, src/lib-storage/mail-search.h: SEARCH SUBJECT now changes LWSP to spaces to match ENVELOPE's subject field. [346d4a44c2f4] * src/lib-imap/imap-quote.c: imap_quote*() with LWSP compression: Make sure TABs are always converted to spaces. [f70c4d501251] * src/lib/data-stack.c: DEBUG: Buffer overflow checking caused false errors sometimes. [bbae5b6b6d2b] * src/lib-storage/index/index-search.c: Header searches shouldn't include the header name or ":" in matching. [e5b840b3c5c2] * src/lib-storage/index/index-mail.c: index_mail_get_date() didn't return timezone if date was already parsed. [e5d3e6c598ec] * src/lib-storage/index/index-search.c: More fixes to SEARCH BEFORE/ON/SINCE timezone handling. [ef13dd179331] * src/auth/auth-request.c: Fixed proxy_maybe handling. [27b7b6c34961] * src/auth/passdb-cache.c: auth_debug: Hide passwords from "cache hit" log lines if auth_debug_passwords=no [e0debdcd2e10] * src/auth/auth-worker-client.c: Blocking passdbs that returned some userdb_* fields returned also an extra userdb_ field. [e8b5e5da1c09] * src/auth/passdb-cache.c: auth_debug: Show cache contents in "cache hit" lines. [6127a0501e72] * dovecot-example.conf, src/lib/network.c: [::] listens only for IPv6 addresses now. This gets rid of IPv4-mapped IPv6 addresses. Use "listen = *, [::]" for listening both. [da971cec0395] * src/lib-storage/index/mbox/mbox-sync.c: Fixed "uid_validity updated unexpectedly" errors when mbox file was being recreated and index files still existed. [1d87dc550378] * src/lib-mail/message-parser.c: Assert fix [1e5deb36a79f] * src/lib-storage/index/maildir/maildir-uidlist.c: Make sure we don't use a stale first_unwritten_pos to optimize dovecot-uidlist writing. [4ac4e9ba1124] 2008-02-20 Timo Sirainen * src/deliver/deliver.c: Don't crash if trying to deliver mail to mailbox outside all namespaces. [c6afa177bbf1] * src/lib-storage/index/index-search.c: SEARCH BEFORE/ON/SINCE didn't handling timezones correctly. [af415b88ba1d] 2008-02-17 Timo Sirainen * configure.in: Changed the default ioloop to "best". [80cd999d5623] * src/lib-storage/index/maildir/maildir-save.c: fdatasync() the new/ and/or cur/ directory after mails are renamed. [0444707aa95c] * src/imap/cmd-idle.c: Assert-crashfix if IDLE finishes immediately. [c1e18e979ac3] * src/lib-storage/index/mbox/mbox-mail.c: Fixed "Cached message offset lost" errors when quota plugin was used. [36da161ecc66] * configure.in: Fixed --enable-ipv6 [91cf91f0a0a8] * dovecot-example.conf: Typofixes [b34b2d4aac03] * src/plugins/fts/fts-api.c: Don't crash if FTS backend initialization fails. [41bbf9edf7f8] 2008-02-16 Timo Sirainen * configure.in: If __gss_userok() is found from -lgss, make sure we link with -lgss. [e665ef583668] * .hgtags: Added tag 1.1.beta16 for changeset 2aa39f1e3993 [b1bde5ea779f] * TODO, configure.in: Released v1.1.beta16. [2aa39f1e3993] [1.1.beta16] * src/master/mail-process.c: Last commit broke mail_drop_priv_before_exec/mail_chroot conflict check. [de96d58b6ee2] * dovecot-example.conf, src/master/mail-process.c: mail_chroot no longer needs to be in valid_chroot_dirs. [1f982f1201ef] * dovecot-example.conf: Added a warning comment to mail_extra_groups. [39c2f2adfed1] * src/imap/cmd-list.c: Don't convert real separators to virtual separators. The mailbox listing code already did it for us. [cd7eeb8cc7fc] * .hgignore: Updated [a9ddd7d0e160] * src/imap/imap-fetch-body.c, src/imap/imap-fetch.h: If stream ends unexpectedly, it was most likely because of a broken cached field, so mark the cache corrupted. [6f9786d83007] * src/lib-storage/index/index-mail.c: When setting cache corrupted, make sure we don't write broken values to the new cache file. Also log broken virtual size fetches better and support 0 as a generic "some fields" value. [c96bf18c886b] * src/plugins/fts-squat/squat-trie.c, src/plugins/fts/fts-search.c: Memory leak fixes [c3d829cdbfa5] * src/plugins/fts-squat/squat-trie.c: Expunge fix [44069f98343e] * src/plugins/fts-squat/squat-trie.c: Fixed squat lookup. [eb310b0d0966] * src/plugins/fts-squat/squat-trie.c: Fixed handling expunges. [139f2f03b81b] 2008-02-15 Timo Sirainen * src/master/mail-process.c: Check for "/./" chrooting in home dirs only if valid_chroot_dirs isn't empty. [17c65dfdac2a] * src/plugins/fts-squat/squat-trie.c: squat_trie_lookup() for empty string returns now all UIDs from root node. This is mainly useful for debugging. [599a9c679ee2] * src/lib-mail/message-parser.c, src/lib-storage/mail-storage.c, src /lib-storage/mailbox-list-private.h, src/lib-storage/mailbox-list.c: Memory leak fixes [dbb7f65e6307] * src/lib-index/mail-index-transaction.c: Fixed bad memcpy() usage with memmove(). [673132f88be3] 2008-02-14 Timo Sirainen * src/lib-mail/message-parser.c, src/lib-mail/message-parser.h, src /lib-mail/message-search.c, src/lib-storage/index/index-mail- headers.c, src/lib-storage/index/index-mail.c, src/plugins/fts/fts- storage.c, src/tests/test-mail.c: Changed message_parser_deinit() to return -1 if the parser was using preparsed broken message parts. Callers catch the error and mark the cache file corrupted. [289765861d66] * src/lib-mail/message-search.c, src/lib-mail/message-search.h, src /lib-storage/index/index-search.c: message_search_more*() now returns bool instead of int. They can't fail. [8cfa61f98e32] * src/lib-storage/index/cydir/cydir-mail.c, src/lib-storage/index/dbox /dbox-mail.c, src/lib-storage/index/index-mail.c, src/lib- storage/index/index-mail.h, src/lib-storage/index/index-search.c, src/lib-storage/index/maildir/maildir-mail.c, src/lib- storage/index/mbox/mbox-mail.c, src/lib-storage/index/raw/r