In /config/main.inc.php change:
$rcmail_config['imap_debug'] = false;
To:
$rcmail_config['imap_debug'] = true;
Then load the email that is having the problem in RoundCube, after that post the IMAP log located at /logs/imap. Make sure to remove your mail account password from the log before you post it.