It was from an upgrade as Jonathan suggested. Not QUITE bug 272378 but evidently related. It was actually because ~/.kde/share/config/kmailrc had a line in it saying:
folders[$e]=$HOME/.kde4/share/apps/kmail/mail
Correcting that line solved the problem. Looks like another migration problem then.
It was from an upgrade as Jonathan suggested. Not QUITE bug 272378 but evidently related. It was actually because ~/.kde/ share/config/ kmailrc had a line in it saying:
folders[ $e]=$HOME/ .kde4/share/ apps/kmail/ mail
Correcting that line solved the problem. Looks like another migration problem then.