After adding a new email account (imap), no folders where displayed. After some debugging I found that the IMAP connection opened in the top of folders.inc (before the switch) never was closed before a second open in the function synchronize_folders.
in modules/email/folders.inc (arround line 73):
$edit_name = isset($_REQUEST['edit_name']) ? smart_stripslashes($_REQUEST['edit_name']) : '';
//synchronise Group-Office with the IMAP server
//get all the Group-Office folders as an array