The story began in bug 297564: I accidentially put a wrong IP address for my IMAP server in /etc/hosts. While the configuration itself was correct otherwise I would not receive any new mails and the IMAP resources would always show up as offline. There was abolutely no feedback of what went wrong, neither in KMail nor in Akonadiconsole. I only found out what was going on if I tried to send a mail and the SMTP transfer failed with "connection refused" and told me so. The IMAP resource needs to give any useful feedback if the remote server rejects the connection instead of silently going to offline.
The IMAP resource has a new maintainer, reassigning to him.
Git commit 6571fc1924d3ee7984d5d233d2a2cb626f5ca53b by Christian Mollekopf. Committed on 25/03/2014 at 08:08. Pushed by cmollekopf into branch 'KDE/4.13'. IMAP-Resource: cancelTask on error and deferTask on connection error. This way the resource retries if there was a temporary connection problem and reports the problem instead of silently going offline. M +4 -3 resources/imap/imapresource.cpp http://commits.kde.org/kdepim-runtime/6571fc1924d3ee7984d5d233d2a2cb626f5ca53b