I had that before ..
either change the default root folder in settings to "." or "INBOX" or "INBOX." or "mail." (depends on your config). Try setting up IMAP with thunderbird for exmaple and see how this "detects" the root folder
or wrong settings on server