8828d7a1e76b7d301bcd7385aa27c52512e855ce |
|
13-Feb-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Replace mail_transaction_commit_changes.changed with changes_mask
This allows better finding out what changed in the transaction. |
43ce61b1d755832186f12b9739d18212b4744d14 |
|
24-Jan-2018 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-storage: Add and use INDEX_LIST_CONTEXT_REQUIRE
Satisfies static analyzers |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
f5447068410d91377dad69e5393553015032ef6f |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
LAYOUT=index: Fix updating STATUS changes in mailbox list index
Mailbox list index backend code was overriding sync_init and sync_deinit
methods, which STATUS handling had already already overridden. They both
used the same super struct, so STATUS's sync_* were never called. |
19557f192d37cd54a1a090a8a26d9d47265e4413 |
|
01-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Fix spelling mistakes in comments
Original work by @andreasschulze and @jsoref |
0dab9cb35a976c49b28a11e28d5570f5191f1a7a |
|
22-Sep-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-storage: Add reason to mailbox_transaction_begin()
Remove mailbox_transaction_set_reason(). |
e0a33290266232d75d861f19523ec238c5d93797 |
|
13-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix updating mailbox GUID in mailbox list index when it's empty
Normally the GUID shouldn't be empty at this point. Updating mailbox GUID is
also very rare. So this was unlikely to cause any problems in practise. |
e4122867044b44e9715c85ac373dbb1c03e0963d |
|
24-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add mailbox_list_index_include_inbox setting
This controls whether to update INBOX's STATUS information in the mailbox
list index. It can be useful especially if LISTINDEX points to a tmpfs,
but perhaps also in other situations.
I considered adding a more generic setting to exclude other mailboxes, but
the namespace prefixes and hierarchy separators get a bit complicated with
shared mailboxes. It's probably also not very useful to change this for
anything but the INBOX. |
ec1cfee0802d129e3c0aa4445923bbfbcb5783cb |
|
20-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Don't update INBOX's sync status to mailbox list index
It's not actually used so there's no need to update it either.
Broken by 70092709cdc803c87b8f4ef1b0548eb45515bdae |
d167a7d64f64eb98414bdb8c6b65bb75bee2d718 |
|
10-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix mailbox_update() to always update mailbox list index.
It previously was updating it only if the list index for the mailbox was
already fully up-to-date. But that doesn't really matter, because
mailbox_update() is supposed to be changing the values regardless.
This fixes mailbox_update() to always work with LAYOUT=index. It also
fixes mailbox_update() for INBOX to update UIDVALIDITY/GUID. |
15086e056e0ecb99ffcefab7295812e21edb6f37 |
|
10-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Don't use mailbox list index if it has refresh_flag set
For example if INBOX is deleted, looking up its GUID shouldn't be returned
from the list index since it contains the old GUID. |
70092709cdc803c87b8f4ef1b0548eb45515bdae |
|
10-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Track INBOX UIDVALIDITY and GUID in mailbox list index
This allows existence checks and GUID lookups for INBOX to be done from the
index. |
c29df09edced96e7cbea19a8e8afef74eec16006 |
|
10-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Try to avoid opening mailbox list index on mailbox access
Perform the STATUS (and other relevant) updates only if syncing or
transaction commits changed anything. This could be optimized further to
check even more strongly whether the seen changes could cause changes to
the list index, but it's probably not worth the effort. |
3b86acdd4194c5bb44d73244435d19d8b5665c8d |
|
19-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Always update highestmodseq in mailbox list index
This is required for mailbox-list-notify API to work correctly. For
example IMAP NOTIFY session with CONDSTORE enabled could be listening for
FlagChanges, but another session without CONDSTORE enabled could be updating
flags in a mailbox that has never been opened with CONDSTORE enabled.
NOTIFY wouldn't see this change, unless it was always written to
dovecot.list.index. |
58289301ce9f6aa7121891e33ef7e0a1b4559e8d |
|
14-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix mailbox list index hook usage
The previous method appeared to work, but not if the internal hooks were
used more than once. |
90f9822ad5f30dcdcabf959090f8a0b63fe5d38a |
|
20-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix mailbox's vsize header check for mailboxes not in dovecot.list.index
If mailbox wasn't yet in the dovecot.list.index, mailbox_list_index_status()
for it returns FALSE and doesn't initialize the status. In some situations this
may have caused a non-empty mailbox's vsize to be returned as 0. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
44e07ea4de493626c862e98516decb8dfa22ab1d |
|
02-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Return vsize=0 from mailbox list index for empty mailboxes.
If it's known that the mailbox has no mails, there's no reason to open the
mailbox to see that its size is 0. |
215fecae37b6e6c8512e20a3830fbeef0e7a9b91 |
|
23-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix rotation of dovecot.list.index.log
After b9da8540e665138b3cad0b637c08c0ab7d7a7eeb the tail offsets weren't
being updated anymore when mail_index_sync_next() wasn't used to skip
over all the data. Mailbox list index wasn't doing this, and so the log
was never rotated since tail_offset was never equal to head_offset. |
5f1b68c3aaf336d20ac6e45d66bdd905ced8f538 |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
LAYOUT=index: Existence or GUID lookups don't need to refresh mailboxes. |
aa47c9bd1d1fc70cd699c49fd1ca92dbc7615953 |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Added quick parameter to list_index_has_changed() |
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1b |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Use only explicit int -> bool conversions
These were checked with a patched clang. |
8c68d9320a15bca0c3eace61605c9f9d4156b502 |
|
20-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fixed looking up MAILBOX_METADATA_FIRST_SAVE_DATE from mailbox list index.
If the mailbox was cached as empty, we didn't check if it had since received
new messages. This caused the first-save-date to be returned as nonexistent,
which caused autoexpunging to not always work. |
ebeb528dfc186053f6a06d7a154b791ba5bbdec8 |
|
20-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fixed updating first-saved-uid to mailbox list index when first mails were just expunged. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
a9934b12e2f00b8606e2c99827fa6bdc7ab12aba |
|
27-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
Compiler warning fix for 32bit systems |
4e3bcf7fdaeef92dd07a2acb1ded58422a907e87 |
|
27-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Don't add first_saved to mailbox list index unless autoexpunge is set. |
1ae5d61ec366fdb2f3c5b150ca378d6141b0f4bd |
|
27-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
Added mailbox { autoexpunge } setting.
This can be used to automatically expunge mails from specified mailboxes
after they're old enough. The expunges are done when the user is being
deinitialized. mailbox_list_index=yes should be enabled to have the best
performance with this setting.
Example:
namespace inbox {
mailbox Spam {
auto = create
special_use = \Junk
autoexpunge = 30d
}
} |
648a6034e304c1ffa7fa8c291e03a0bca3c20288 |
|
27-Sep-2015 |
Timo Sirainen <tss@iki.fi> |
Make static analyzer happier. |
e048e63fec8d21d4af0fd9d27dd3fe5dcedf18e6 |
|
10-Jul-2015 |
Timo Sirainen <tss@iki.fi> |
lib-storage: If mailboxes' vsizes are used, keep them updated also in mailbox list index.
This allows looking them up quickly without opening the actual mailbox
indexes. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
7f0ad4a2ba6ba133fe3522145387bde21dfcf36f |
|
25-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Don't update mailbox list index status fields when deleting a mailbox. |
139e39b12e4aa41838af1a7efe9b1083d16aac2f |
|
12-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index=yes: Make sure storage error doesn't change when updating STATUS info. |
22228926a78fa7f813f27d9ea2efca576da067cc |
|
11-Jul-2014 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index=yes: Don't update INBOX's STATUS information to index.
This should reduce disk I/O |
b09c165ba23e432685cee196b42873af26f1785f |
|
05-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Mailbox list index updating didn't check properly if modseq tracking is enabled.
mail_index_modseq_enable() can be enabled (e.g. by virtual plugin) without
enabling MAILBOX_FEATURE_CONDSTORE.
(Actually the MAILBOX_FEATURE_* probably should be removed from lib-storage
entirely. They're too much of an IMAP feature.) |
64c615dc2a8186b45d0a5188235049f7a0a9e507 |
|
26-May-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Optimize mailbox_exists() with mailbox_list_index=yes
We can return the existence from the index itself to avoid stat()s. |
faad8eaec70636c88886a9a524da958a19cd558b |
|
15-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Avoid rebuilding the whole mailbox list index when one mailbox changes. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
7ee45b03d66c09e3a2f99e559c22171aad6b43fe |
|
09-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed crash with mailbox_list_index=yes and out-of-date index. |
f6e11660a066713579b713dc6aa2004a3a803fab |
|
20-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index: Delay allocating the index so mbox can override the index path. |
9edd88a9da2c5a44f15a0925a1bbcfc0b8dcdad0 |
|
20-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index: Removed race conditions from index updates. |
3a2f2adf5679aa383a2cab09f739d59233cada95 |
|
19-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed mailbox_update() when using mailbox_list_index=yes |
f0efc5a8ea24b1899b8faefb637cb10bf8b9a1a6 |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Don't unnecessarily clear mailbox_status multiple times. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
5376aea86a5d636ded2d71163589babefa5c89e4 |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Mailbox list indexes are now enabled also for shared/public mailboxes. |
88cc3155c01bf5384685a475fc14f406da1bd619 |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Avoid assert-crashing when updating mailbox list index. |
e0aff4c7e3336ec4b5edbcfc3a72e1e118603ee2 |
|
27-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added initial implementation for layout=index.
The idea is that all of the mailbox names only exist in the mailbox list
index. Storage directories use mailbox GUIDs. This avoids all kinds of
race conditions with mailbox renames. mailbox_list_index=yes is required for
this layout to work.
There are probably still some race conditions within the indexing code
itself. Also error recovery is missing. |
8854395cdd21ca521b37ce669f3acb8445792b20 |
|
13-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added mailbox-list-notify API for tracking changes in all mailboxes.
Requires mailbox_list_index=yes to work. |
03275b07f85a381c87a85a9cb52b68a2c161cb2c |
|
24-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index=yes: Fixed a potential crash. |
e364d03f22ac1abedb364f29c297efee3588a5e0 |
|
24-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index=yes: Fixed a potential crash. |
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4 |
|
23-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
The non-obvious APIs where NULL parameter was changed to "" are
master_service_init() and auth_master_user_list_init().
These checks can currently be enabled only on a patched clang:
http://llvm.org/bugs/show_bug.cgi?id=6786 |
9ea0fe2e0c3e7b83c982634bb26a721049ef9a10 |
|
28-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Avoid unnecessary refresh flag writes. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
8746285eba5e9916777c3d746566e45e5cbce74e |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Get mailbox_get_metadata(guid) from index if possible. |
3a78410fa59109e276ec3ea964b42fec778437b1 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Error handling fixes. |
9afe1b3ac43a1f0b4ed8c6b2c369e76957228867 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
Renamed index-mailbox-list* to mailbox-list-index* |