After creating a new IMAP account I wanted to change the default trash folder of that account, which points to the trash folder in the local mailbox, to the trash folder of the IMAP aacount. After having done that and restarting kontact/kmail There is an error messages about a trash folder, can't remember the exact message, and the kontact/kmail crashes. Removing the trash folder of the local mailbox, using "rm -rf .local/share/akonadi_maildir_resource_0/trash/", kontact/kmail start up without any problem; the folder gets recreated.
*** Bug 395726 has been marked as a duplicate of this bug. ***
Same solution fixed kmail for me
Apparently solved