KMail 1.9 (from KDE 3.5.0) can not create new IMAP folders on a Dovecot IMAP server. This is a known bug (http://bugs.kde.org/show_bug.cgi?id=115254), which is fixed in 3.5.1. I backported the fix to 3.5.0, so I could enjoy creating folders in kde-base/kmail-3.5.0-r3 and thought I would share this with the community in case anyone else wants to use kmail for imap without upgrading kde.
Created attachment 80734 [details, diff] Patch to fix IMAP folder creation problems
There's no point to backport to 3.5.0 fixes already applied in 3.5.1.. both are not stable enough, so there's no point in having to move fixes from one to the other.
I understand this is not going to be fixed in portage, but in the interest of completeness (and just in case anyone is searching for a solution to the same problem) I will add that I missed http://bugs.kde.org/show_bug.cgi?id=121843 and post a second patch. Note to KDE maintainers: Although the original bug is fixed in 3.5.1, this issue is not yet resolved. I'm also attaching a corresponding patch for 3.5.1.
Created attachment 80890 [details, diff] Patch for upstream bug 121843 (to 3.5.0-r3)
Created attachment 80891 [details, diff] Patch for upstream bug 121843 (to 3.5.1)