It's already checked in places where it could cause actual harm
(accidentally deleting other mailboxes) and where it's not allowed (IMAP).
This allows dsync backup to delete unwanted INBOX if the mail location
settings allow it.
"Storage root can't be deleted");
return -1;
}
- if (box->inbox_any) {
- mail_storage_set_error(box->storage, MAIL_ERROR_NOTPOSSIBLE,
- "INBOX can't be deleted.");
- return -1;
- }
box->deleting = TRUE;
if (mailbox_open(box) < 0) {