Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-12063

IMAP client failing to retrieve all folders if no access to mount point

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.2.1, 4.2.2
    • Fix Version/s: 4.2.4
    • Component/s: IMAP
    • Labels:
      None
    • Environment:
      Centos 6.2, Alfresco OOTB, Microsoft Outlook 2010

      Description

      Description

      • 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).

      Supporting evidence

      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:

      #email:
      email.server.enabled=true
      email.server.port=25
      email.server.domain=alf421
      
      #IMAP
      imap.server.enabled=true
      imap.server.host=10.0.0.3
      
      imap.config.server.mountPoints=site1,site2,site3
      imap.config.server.mountPoints.default.store=${spaces.store}
      imap.config.server.mountPoints.default.modeName=MIXED
      
      # mount point name for sites is just a value
      imap.config.server.mountPoints.value.site1.mountPointName=site1
      imap.config.server.mountPoints.value.site1.folderPath=st:sites/cm:site1
      
      imap.config.server.mountPoints.value.site2.mountPointName=site2
      imap.config.server.mountPoints.value.site2.folderPath=st:sites/cm:site2
      
      imap.config.server.mountPoints.value.site3.mountPointName=site3
      imap.config.server.mountPoints.value.site3.folderPath=st:sites/cm:site3
      

      5. Add new account for user2 in IMAP client (in this case, Outlook was used). "host" is the hostname of the Alfresco server:

      Name: user2
      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.

      Expected Behaviour

      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.

      Observed Behaviour

      Step 6. After creating the user2 account, Outlook will throw a synchronization error, and no sites will be listed:

      Task 'Synchronizing subscribed folders for user2@alf422.' reported error (0x800CCCD2) : 'Outlook cannot synchronize subscribed folders for user2@alf422. Error: The server responded: 'LSUB failed. 06310034 Folder not found: Folder Path: workspace://SpacesStore/app:company_home/st:sites/cm:site2'. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).'

      The following error will be thrown at the log :

      2014-07-31 03:46:19,067  DEBUG [repo.imap.ImapServiceImpl] [Thread-78] 
      [listMailboxes] user:user2, mailboxPattern:*, listSubscribed:true
       2014-07-31 03:46:19,422  DEBUG [repo.imap.AlfrescoImapHostManager] [Thread-78] 
      06310024 Folder not found: Folder Path: workspace://SpacesStore/app:company_home/st:sites/cm:site1 
      
      org.alfresco.error.AlfrescoRuntimeException: 06310024 Folder not found: Folder Path: workspace://SpacesStore/app:company_home/st:sites/cm:site1
      

      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:

       2014-07-31 03:54:57,192  DEBUG [repo.imap.AlfrescoImapHostManager] [Thread-83] 
      06310028 Folder not found: Folder Path: workspace://SpacesStore/app:company_home/st:sites/cm:site2
       
      org.alfresco.error.AlfrescoRuntimeException: 06310028 Folder not found: Folder Path: workspace://SpacesStore/app:company_home/st:sites/cm:site2
      

      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.

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                lcolorado Luis Colorado [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: