- Technical Description: IMAP client will be unable to list all the folders for a user if the user doesn't have access to every mounted point.
- Customers Description: No description from customer. Issue was discovered when trying to provide a workaround for them. They have 3,000 sites, and IMAP was extremely slow to load, so they wanted to mount the IMAP sites through configuration (ie, using alfresco-global.properties).
Steps to reproduce
1. user1 creates private sites site1 and site2
2. user2 creates private site site3
3. Set IMAP logging to debug: org.alfresco.repo.imap=debug
4. Set alfresco-globlal.properties as shown below:
5. Add new account for user2 in IMAP client (in this case, Outlook was used). "host" is the hostname of the Alfresco server:
E-mail address: user2@host
Account type: IMAP
Incoming mail server: host
Outgoing mail server (SMTP): host
6. Review the list of folders for user2 after Outlook has completed the initial synchronization.
7. Give user2 access to site1 (eg, log in as user1, go to site1, invite user2, etc.)
8. Go to Outlook and perform a "Send/Receive All Folders" to refresh all the accounts.
9. Grant user2 access to site2
10. Go to Outlook and perform a "Send/Receive All Folders" to refresh all the accounts.
Step 6. Outlook will show site3 under the list of folders for user2. At this point user2 has access only to site3.
Step 8. Outlook will show site1 and site3 under the list of folders for user2. At this point user2 has access only to those sites.
Step 6. After creating the user2 account, Outlook will throw a synchronization error, and no sites will be listed:
The following error will be thrown at the log :
Step 8. Outlook will produce a similar error, but this time making reference to 'LSUB failed. 06310038 Folder not found: Folder Path: workspace://SpacesStore/app:company_home/st:sites/cm:site2'
The log will show a similar error:
What is actually happening
When the IMAP client tries to retrieve the list of folders, Alfresco scans the mounted IMAP sites (e.g., site1, site2, site3), but it stops when it cannot find the folderPath for a given site. For instance, if user doesn't have access to site2, the process will get an exception, it will stop scanning the rest of the sites, and it will return to the client an empty list of folders.
The folder listing process should not break if the user doesn't have access to any of the folders.