Main module rename and one additional warning in case acls for mailbox were not found
[imap-restore-mail] / src / mail_iterator.py
index 74a9f81..e7c7f8f 100644 (file)
@@ -114,8 +114,12 @@ class MailIterator:
             mbox_acls = mailbox_list[mailbox]
         except KeyError:
             # no rights for the mailbox were found
+            logging.warning("Could not find the acls for mailbox %s for user %s.", mailbox, original_user)
             return
         for acl_user in mbox_acls:
+            # (in case target user != original user):
+            # - don't overwrite acls eventually set for the current targetuser
+            # - don't set the default owner acls for the new folder
             if acl_user != target_user and acl_user != original_user:
                 try:
                     self.mail_con.setacl(mailbox, acl_user, mbox_acls[acl_user])