Bug 2435 - Infinite loop+crash when refreshing folders from dovecot mbox based mailbox
Summary: Infinite loop+crash when refreshing folders from dovecot mbox based mailbox
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Folders/IMAP (show other bugs)
Version: 3.7.9
Hardware: PC Linux
: P3 critical
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2011-05-21 22:38 UTC by Bruno
Modified: 2015-07-16 16:03 UTC (History)
0 users

See Also:


Attachments
fixes the bug. yay! (725 bytes, patch)
2015-07-15 14:48 UTC, ker--
no flags Details | Diff

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

Note You need to log in before you can comment on or make changes to this bug.