The fix that worked for me for IMAP related problems:
Backup your profile folder using something like MozBackup.
Move all of the messages in the Inbox to other folders/child folders. You can select all of the messages using Control-A. If you have problems moving all of the messages, do it in multiple steps, where you select only a few messages each time.
Verify that all of the messages have been moved.
Exit Thunderbird and Go to your 'Home' folder hit ctrl+H to un-hide the hidden files, go to path '/home/user_name/.thunderbird/4kh5v6hf.default/ImapMail'.
Now,delete BOTH the "inbox." and "inbox.msf" files for that account. Leave "Inbox.sbd" alone. You can find where the Inbox folder is stored by looking at Tools -> Account Settings -> Server Settings -> Local Directory, or Tools -> Account Settings -> Local Folders -> Local Directory if you are using a Global Inbox. Its at the bottom of that pane, next to a Browse button.
Start Thunderbird. It will automatically create a new Inbox folder.
While it's possible to move the messages back to the (new) Inbox, it's recommended you don't do that.