Bug 2435

Summary: Infinite loop+crash when refreshing folders from dovecot mbox based mailbox
Product: Claws Mail (GTK 2) Reporter: Bruno <bonbons67>
Component: Folders/IMAPAssignee: users
Status: RESOLVED FIXED    
Severity: critical    
Priority: P3    
Version: 3.7.9   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
fixes the bug. yay! none

Description Bruno 2011-05-21 22:38:12 UTC
When refreshing folder list (or adding new account)  for a mail account run by dovecot IMAP server that is using mbox storage engine claws-mail ends up in an infinite loop.

Assume I have the following folder hierarchy:
  $namespace
  $namespace folder
  $namespace folder folder1a
  $namespace folder folder1b
  $namespace folder folder1c
and namespace is #mbox. with "." as separator.


The resulting IMAPv4 session is:
  mb1 LIST "" "#mbox.%"
  * LIST (\Noselect \HasChildren) "." "#mbox.folder"
  mb1 OK List completed.
  mb2 LIST "" "#mbox.folder.%"
  * LIST (\Noselect \HasChildren) "." "#mbox.folder."
  * LIST (\NoInferiors \UnMarked) "." "#mbox.folder.folder1a"
  * LIST (\NoInferiors \UnMarked) "." "#mbox.folder.folder1b"
  * LIST (\NoInferiors \UnMarked) "." "#mbox.folder.folder1c"
  mb2 OK List completed.
  mb3 LIST "" "#mbox.folder.%"
  * LIST (\Noselect \HasChildren) "." "#mbox.folder."
  * LIST (\NoInferiors \UnMarked) "." "#mbox.folder.folder1a"
  * LIST (\NoInferiors \UnMarked) "." "#mbox.folder.folder1b"
  * LIST (\NoInferiors \UnMarked) "." "#mbox.folder.folder1c"
  mb2 OK List completed.
  ... (repeating the same list until claws-mail crashes)

A maildir based mailbox does not show the same affect as the listed folder
does not appear in listing with trailing separator.


Apparently UW-IMAP does the same of listing listed folder with trailing separator.
Comment 1 Bruno 2011-05-22 00:13:34 UTC
Important note for hunting the bug, this infinite looping does not happen if the IMAP server is configured to use a '/' as separator (looping reproduced with '.' and '|' separator characters).
Comment 2 ker-- 2015-07-15 14:48:36 UTC
Created attachment 1540 [details]
fixes the bug. yay!
Comment 3 users 2015-07-15 20:24:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2015-07-15 20:24:02.957898402 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=7f5adb6afe761e5b891b6a63eba5d7806e61467e
Merge: ae01a13 eee39d7
Author: Colin Leroy <colin@colino.net>
Date:   Wed Jul 15 20:24:02 2015 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=eee39d758fa409d1c5ebce06228184023f0b86b5
Author: Paul <paul@claws-mail.org>
Date:   Wed Jul 15 19:23:05 2015 +0100

    fix bug 2435, ' Infinite loop+crash when refreshing folders from dovecot mbox based mailbox'
    
    Patch by Oliver Schneider