Sometimes it takes very long to open or send mails. It can take up to several minutes, in rare cases it doesn't send at all. Restarting kmail (or kontact, no difference) sometimes fixes it, sometimes I have to manually terminate kmail in system monitor, sometimes I have to restart akonadi to make it work, sometimes I have to log out. No cpu spikes. Akonadiconsole is responsive, toggling/syncing/browsing the corresponding resources work fine. Not only Imap folders are affected, as sending is delayed either, which runs over the local mail folders. But the problem seems to be starting in imap folders and then spreading to other resources as well (maybe because it waits for the imap resource to respond?)
Works now. Mark as fixed.