43ce61b1d755832186f12b9739d18212b4744d14 |
|
24-Jan-2018 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-storage: Add and use INDEX_LIST_CONTEXT_REQUIRE
Satisfies static analyzers |
65492363f4a0114c0706ee3fd212e429515f5a73 |
|
14-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: mailbox_list_index - List prefix/INBOX if it necessary |
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. |
b42817ce16a8660cbcc4adfc8bccc3db1c6d00c7 |
|
05-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Rebuild list index when doing doveadm force-resync |
8049d5792631981b50b0ad226a03298445e305c7 |
|
05-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
LAYOUT=index: Rebuild list index if INBOX is missing on inbox=yes namespace
This avoids having to manually rebuild the list index afterwards if it
becomes lost. |
8528048c7b82c745bcfa5a6b1394251b3aaeb129 |
|
15-Nov-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: Fix MAILBOX_LIST_INDEX_HIERARHCY_SEP spelling
Original work by @jsoref |
f8a67af9b7bde79c186e6b82ea200d7fcf85571b |
|
30-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix mailbox_list_index=yes + ACLs + auto=subscribe mailboxes
If the auto=subscribe mailbox didn't have a lookup ACL, it shouldn't have
been listed. This didn't work properly, because ACL plugin initialized the
autocreate_ctx only for the index iterator, while the autoboxes were
listed using the backend iterator. Fixed by not creating index iterator at
all when doing a passthrough iteration. |
58a89627905e3590381cdd5eb931b9537c4b4ea6 |
|
19-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Implement mailbox_list_notify_flush()
This flushes any pending notifications. For now it only checks if there's
a pending notification waiting for a timeout. It could also stat() the
files to make sure, but that's probably unnecessary. |
a18b40c2ce1cb4f2b087a9ee54af188a25431dba |
|
19-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix mailbox list index records without guid having invalid flags
With LAYOUT=index the mailbox is found with its GUID. If it doesn't exist,
the mailbox has to be either \NonExistent or \NoSelect. It probably doesn't
make much difference which one, so we'll fix them by adding \NoSelect.
With other layouts the GUID is allowed to be empty, because it can be looked
up from the actual mailbox. |
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. |
0e9dc599a312e1bd55ce2cb256535914a8295344 |
|
13-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
LAYOUT=index: Rename mailbox_list_index_node.corrupted_parent to corrupted_ext
The code will be useful for other purposes also besides updating corrupted
parents. |
2ac5f36aa7c2e7a07ba8815d43a6d7483f62e74c |
|
16-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Change string position/length from unsigned int to size_t
Mainly to avoid truncating >4GB strings, which might potentially cause
some security holes. Normally there are other limits, which prevent such
excessive strings from being created in the first place.
I'm sure this didn't find everything. Maybe everything could be found with
compiler warnings. -Wconversion kind of does it, but it gives way too many
unnecessary warnings.
These were mainly found with:
grep " = strlen"
egrep "unsigned int.*(size|len)" |
fa780a18c41881036af582f7a3473d6399e9d34d |
|
16-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Make dovecot.list.index's filename configurable.
This is useful when there are multiple namespaces pointing to the same mail
root directory. For example mdbox with lazy-expunge:
namespace {
prefix = Expunged/
location = mdbox:~/mdbox:MAILBOXDIR=expunged:LISTINDEX=expunged.list.index
..
} |
22436f3cbb7a2c666519a7448cf2d4d20e48f352 |
|
25-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storge: Call mail_storage.list_index_corrupted() when needed
The callback is called whenever mailbox list index appears to be corrupted
with LAYOUT=index. The storage is responsible for adding to the index any
mailboxes that are missing. |
de258127e1fbd581329f09382e8e7eb9c9da58c5 |
|
25-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Rename mailbox_list_index.corrupted to corrupted_names_or_parents
Makes it clearer what exactly the flag means. |
85cbe5d66e22bc1290a33902fa2638245450a2df |
|
16-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
LAYOUT=index: Don't write corrupted mailbox names to box-name header.
This way when opening a mailbox the box-name header isn't overwritten by
a corrupted name.
Keep track of the corrupted names with MAILBOX_LIST_INDEX_FLAG_CORRUPTED_NAME
flag in list index records. The flag isn't removed until the mailbox is
renamed. |
9130eda2eb97055030fd5bccebe43d8585d2bf0c |
|
16-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix invalid parents in LAYOUT=index
Previously it just kept complaining without fixing the errors. |
b94bcc82e68712aadd0aa980acf486bfaf0e9cad |
|
16-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: If LAYOUT=index loses mailbox names, write the generated ones to index.
Previously it just kept complaining and regenerating new names, without
actually fixing up the situation. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
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
}
} |
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. |
3cd3140707526e005053547f356421b2d9a5e673 |
|
14-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
Compiling fix for some systems. |
f663bdd9d345a86e6a7924d83319bd04b2fcb600 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed some race condition crashes with LAYOUT=index |
5b59856b8eb89a8450fe9c48c6e6e359fdd254d2 |
|
26-May-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Avoid refreshing mailbox list index too often. |
faad8eaec70636c88886a9a524da958a19cd558b |
|
15-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Avoid rebuilding the whole mailbox list index when one mailbox changes. |
28099d04bbb9e668c84e24f4abe258facdc030ac |
|
04-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed assert-crash in mailbox rename with layout=index |
ca31fc1a8e48281c6882796fa7d4372acc2f97e5 |
|
11-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
LAYOUT=index: Fixed race condition during mailbox creation. |
cf05592015b99607095f970bf914f5d069bf0666 |
|
13-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index=yes: Fixed list iteration when namespace and backend separators differed. |
1da5113b93f5dd0543a155040daa7ae3f3718b8b |
|
30-May-2013 |
Timo Sirainen <tss@iki.fi> |
layout=index: Allow mailbox create/delete/rename during mailbox list iteration. |
f6e11660a066713579b713dc6aa2004a3a803fab |
|
20-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index: Delay allocating the index so mbox can override the index path. |
3a2f2adf5679aa383a2cab09f739d59233cada95 |
|
19-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed mailbox_update() when using mailbox_list_index=yes |
29543188462c9348f365ec29115d777ffe4769d3 |
|
26-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixes to LAYOUT=index backend. |
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. |
a8fe899601735459641edae975c0fa08be8482e2 |
|
16-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
Removed all the "enum foo;" declarations.
They didn't seem to be very standard. Old gcc versions warn about them and
C++ code doesn't like them. |
24acd68c82dc137b88bb3ba3258b9d1f7ebcb44d |
|
04-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
NOTIFY: Implemented SubscriptionChange |
a75d470c9223a75801418fcdda258885c36317e0 |
|
20-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Reverted "support for non-pointers" part of the hash table API changes.
Originally I wrote it using clang, which didn't give as many warnings as gcc
did. I guess this way is safer anyway.. |
678d0463849ba777106eb7875f27db07a5d8e3df |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Hash table API is now (mostly) type safe. |
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. |
40471588fa7873a231f568a2ffe6fb9acbc76a6d |
|
14-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index=yes: Delay opening/creating the index until it's needed.
This also fixes an error when trying to create the index before the parent
director is created. |
0f97c2b6ec76e7f600e983cb952cf265a6189114 |
|
13-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
mailbox_list_index=yes iteration: Don't allocate returned mailbox names from data stack.
This breaks dsync. |
9ea0fe2e0c3e7b83c982634bb26a721049ef9a10 |
|
28-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Avoid unnecessary refresh flag writes. |
0daea62c195bd4d7b2bdf5f911e9299d160e2be7 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Added comment. |
7887dbfe633d42e38e834f6cb0362695dcf6dc52 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Code cleanups. |
3a78410fa59109e276ec3ea964b42fec778437b1 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Error handling fixes. |
39140d628bde0e7e35be48739ac3678f1ecf0a9a |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Moved syncing code to separate file. |
66e1cf5014bec1cf1a8339be6fccc9be5ad3c793 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
mailbox list indexes: Moved iteration code to separate file. |
9afe1b3ac43a1f0b4ed8c6b2c369e76957228867 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
Renamed index-mailbox-list* to mailbox-list-index* |