It is possible for IMAP protocol to forward messages to different folders (after they have been fetched) depending on their final status. You should provide a correct path to the folder:
- IMAP folder - the default path
- move on success - path to the folder where you want to move successfully fetched messages (if there were no errors if contact was created/found and new issue/comment from the message is added to Redmine - message will be moved to success folder)
- move on failure - path to the folder where you want to move failed messages
In order to set it, go to project settings, Helpdesk tab. You will find Mail server settings on the right.
- Google account: to find the correct path, just hover the cursor over folder name and copy the last words, e.g. "/inbox"
- Yandex account: e.g. INBOX|Helpdesk_error, INBOX|Helpdesk_succes