This is a redo of 194365b9, that uses LIST (not LIST-STATUS) to properly
discover the list of mailboxes. The goal was to properly get the role of
each mailbox, and fully support the `restrict-deletes` functionality
(incidentally it also fixes mailbox listing for Strato); it was lost via
8a151bac.
This patch reinstates this and then uses LIST-STATUS (if it's supported)
to get each mailbox's UIDVALIDITY.
Fixes: 8a151bac ("models: add validity identifier to Directory structs")
Reported-by: post <post@sonnenkinder.org>
Signed-off-by: Simon Martin <simon@nasilyan.com>
Acked-by: Robin Jarry <robin@jarry.cc>