With KMail settings / Accounts / Receiving / Customize accounts order Changing the IMAP accounts position works but the local folders position can't be customized. It always remain at the bottom in KMail.