refactor(mail): one definition of the standard folders, and reconcile the drift
The console created Reports, the CLI that makes the first administrator did not, so that account had no folder for DMARC and TLS-RPT reports. The list now lives in one SQL function, provision_default_folders (migration 0014), which both call. The same migration reconciles what the two paths had left wrong in existing mailboxes: folder counters and the mailbox's used bytes are recomputed from the rows (only where they differ, so it is safe to run again). create-admin can now be tested: fail() throws instead of exiting, and the command runs only when invoked as one. The new test fails on the old code (no Reports).
This commit is contained in:
1 parent
caf52c0225
commit
a8941a6191
6 files changed
+310
-37
No files matched your search
@@ -0,0 +1,4 @@
|
||||
-- The reconciliation corrected cached numbers and cannot be undone (and has no
|
||||
-- reason to be); only the function is removed. Folders it added stay: they are
|
||||
-- ordinary folders by now and may hold mail.
|
||||
DROP FUNCTION IF EXISTS provision_default_folders(UUID);
|
||||
Reference in new issue
Block a user