diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -858,33 +858,25 @@
             if len([_ns for _ns in ns_shared if folder.startswith(_ns)]) > 0:
                 continue
 
-        key = ('/shared' + FOLDER_TYPE_ANNOTATION).encode('utf-8')
-        if key in metadata:
-            if metadata[key].startswith(_type):
-                result.append(folder)
-
         key = ('/private' + FOLDER_TYPE_ANNOTATION).encode('utf-8')
-        if key in metadata:
-            if metadata[key].startswith(_type):
-                result.append(folder)
-
-            # store default folder in user record
+        if key in metadata and metadata[key].startswith(_type):
+            # store default,private and confidential folders in user record
             if metadata[key].endswith(b'.default'):
-                user_rec['_default_folder'] = folder
-                continue
-
-            # store private and confidential folders in user record
-            if metadata[key].endswith(b'.confidential'):
+                if '_default_folder' not in user_rec:
+                    user_rec['_default_folder'] = folder
+            elif metadata[key].endswith(b'.confidential'):
                 if '_confidential_folder' not in user_rec:
                     user_rec['_confidential_folder'] = folder
-
-                continue
-
-            if metadata[key].endswith(b'.private'):
+            elif metadata[key].endswith(b'.private'):
                 if '_private_folder' not in user_rec:
                     user_rec['_private_folder'] = folder
 
-                continue
+            result.append(folder)
+            continue
+
+        key = ('/shared' + FOLDER_TYPE_ANNOTATION).encode('utf-8')
+        if key in metadata and metadata[key].startswith(_type):
+            result.append(folder)
 
     # cache with user record
     user_rec['_imap_folders'] = result