Selecting "Repair Folder" on an INBOX when dup_action is set to 2 deletes unread email. If dup_action is reset to 0 the problem can't be reproduced.
(In reply to Peter Harvey from comment #0) According to: http://en.kioskea.net/faq/5479-thunderbird-managing-duplicate-mails the mails are duplicated in the trash with option 2.
Correct, duplicate emails are sent to trash. The unread emails are *not* duplicates. I can reproduce this by having read email (Repair Folder is fine), mark one email as unread and then Repair Folder appears to move that unread email to Trash. I've tried reproducing this on a different IMAP server (same client) but couldn't reproduce it so I suspect it's down to the client/server combination.