Clear inbox acls and other fixes based on autotest validation
[imap-restore-mail] / src / file_iterator.py
index c506e83..843396c 100644 (file)
@@ -59,7 +59,7 @@ class FileIterator:
         Should be used for access of mailbox acls instead of attribute"""
 
         # translate the mailbox to internal stored format
-        internal_mailbox = mailbox.replace("INBOX/", "user/" + original_user + "/")
+        internal_mailbox = mailbox.replace("INBOX", "user/" + original_user)
         internal_mailbox = internal_mailbox.replace(".", "^")
         internal_mailbox = internal_mailbox.replace("/", ".")
         logging.debug("Get acls for mailbox %s translated as %s", mailbox, internal_mailbox)
@@ -70,7 +70,7 @@ class FileIterator:
         except KeyError:
             # no rights for the mailbox were found and warn if acl file loaded
             if len(self._file_acls) > 0:
-                logging.warning("Could not find the acls for mailbox %s %s", mailbox, self._file_acls.keys())
+                logging.warning("Could not find the acls for mailbox %s", mailbox)
             mb_acls = {}
 
         return mb_acls