Linux

Where Does KMail Store Mail and Settings?

KMail local-mail storage plus kmail2rc config on Linux with Akonadi data nearby.

Last updated

KMail stores local folders as maildir under the KDE data tree while account settings live in kmail2rc in the config tree. IMAP mail itself stays on servers; only local folders and cache need backups.

Akonadi agents cache bodies and indexes in their own directories. Back up local-mail plus kmail2rc and the account setup plus kept mail survives a move.

Where KMail stores this, by platform

Linux
~/.local/share/local-mail

Local folders in maildir format, one directory per folder. Account settings live at ~/.config/kmail2rc and cached mail under ~/.local/share/akonadi. Copy local-mail plus kmail2rc with Kontact closed to migrate kept mail and accounts.

Frequently asked questions

How do I back up KMail local folders?

Copy ~/.local/share/local-mail with Kontact closed. Add ~/.config/kmail2rc so accounts and filters travel too.

Where are KMail account passwords?

In KDE Wallet, not the mail folders. Migrate the wallet alongside or re-enter passwords on first connect.

Notice an outdated path? Let us know.