Skip to content
xaweho

Knowledge base · intermediate

Setting up KMail on Linux (KDE)

KMail is the mail component of KDE PIM — the natural choice on KDE Plasma. How to connect it to Mailcow via IMAP, plus calendar and contacts through KOrganizer and KAddressBook.

intermediate ·

KMail is the mail component of the KDE PIM suite — often the default on KDE Plasma desktops. Together with KOrganizer (calendar) and KAddressBook (contacts) it forms the KDE take on an Outlook-style suite. All three together are called Kontact.

From our experience: stable with IMAP, good with CalDAV/CardDAV. That’s all you need with us — we don’t offer Exchange protocols, IMAP plus CalDAV/CardDAV covers everything.

Requirements

  • KMail / Kontact installed
    • Debian/Ubuntu: sudo apt install kmail kontact
    • Fedora: sudo dnf install kmail kontact
    • Usually preinstalled on KDE Plasma
  • Mailbox exists
  • App password if 2FA is enabled

Setting up the account

  1. Start KMail (or Kontact, then switch to the Mail tab).

  2. First launch: the account setup wizard appears. Otherwise: Settings → Configure KMail → Accounts → Add.

  3. Select IMAP E-Mail ServerAdd.

  4. General tab:

FieldValue
Account nameyour choice
Usernamefull email address
Passwordmailbox / app password
Incoming servermail.xaweho.de
  1. Advanced tab (or “Filtering”, depending on the version):
FieldValue
SecuritySSL/TLS
Port993
Authenticationplain text
  1. OK → the account is created.

SMTP / outgoing server

KMail uses a separate SMTP setup:

  1. Settings → Configure Accounts → Sending → Add.
  2. Select SMTP.
  3. Fields:
FieldValue
Nameyour choice
Servermail.xaweho.de
Port587
EncryptionTLS / STARTTLS
Authentication methodPlain
Usernamefull email address
Passwordmailbox / app password
  1. Enable Server requires authentication.

  2. OK.

Linking an identity

KMail separates identity (who you are when sending) from account (which server). In Settings → Identities → Add or Modify:

  • Name: display name
  • Email address: full email address
  • Signature: optional
  • Advanced: the associated outgoing server (the SMTP account you just created)

KOrganizer — calendar via CalDAV

  1. Open KOrganizer (or Kontact → Calendar tab).
  2. Settings → Configure → General → Calendars → Add.
  3. Select DAV groupware resource.
  4. Fields:
FieldValue
Display name”Mailcow calendar”
Usernamefull email address
Passwordmailbox / app password
DAV server URLhttps://mail.xaweho.de/SOGo/dav/<deine-mailadresse>/
  1. Connect → KOrganizer fetches the calendar list.

KAddressBook — contacts via CardDAV

Same pattern:

  1. Open KAddressBook.
  2. Settings → Add file → DAV groupware resource.
  3. Same connection data as for CalDAV.

CalDAV and CardDAV share the same DAV account in KDE PIM — so you don’t have to set it up twice.

Quirks of KMail / Kontact

Akonadi cache: KDE PIM uses Akonadi as the backend database for all data — mail, calendar, contacts. Powerful, but occasionally moody. For sync problems:

akonadictl stop
akonadictl restart

For very stubborn problems you can reset the Akonadi cache completely:

rm -rf ~/.local/share/akonadi

On the next start, KMail/Akonadi rebuilds the cache — mails are fetched again from the server.

Local filters: KMail has very powerful local filters — complex rules are possible. But: local filters only run while KMail is open. For server-side filtering: Sieve in webmail.

KMail’s Sieve editor: KMail even has a built-in Sieve editor under Settings → KMail → Filters → Manage Sieve scripts. That lets you edit server-side Sieve filters straight from KMail — nice feature.

HTML mail rendering: KMail doesn’t render HTML by default (security). You can enable HTML display per mail or globally in the settings.

Known problems

Akonadi freezes on startup: common after distro updates. Fix: akonadictl restart or rebuild the whole cache.

Sync progress display: KMail can feel slow during large sync operations — Akonadi indexes the data locally, which takes time. It keeps running in the background.

HTML layout broken in some newsletters: KDE’s QtWebKit renderer isn’t on par with Chromium-based renderers. If a newsletter really doesn’t fit: view it in an external browser.

Frequently asked questions

KMail or Thunderbird on KDE? KMail integrates better with KDE Plasma (notifications, KAddressBook, KOrganizer). Thunderbird is a standalone app, but more stable in cross-distro day-to-day use. KDE fan: KMail. Cross-platform consistency: Thunderbird.

Akonadi annoys me — is there a KMail without it? Akonadi is deeply integrated into modern KMail. There is no current KMail without Akonadi. If you absolutely want to avoid Akonadi: Thunderbird or Evolution.

Encryption with OpenPGP / S/MIME? Fully supported. Settings → Identities → Cryptography — store your PGP keys or S/MIME certificates there.

Memory usage? Akonadi caches everything locally. With large mailboxes that can grow to several GB. Cache directory: ~/.local/share/akonadi/db_data.

Backing up KMail? Back up the ~/.local/share/akonadi/ directory and ~/.config/kmail* for the configuration. Restore on the new machine, restart Akonadi — accounts and mails are back.

Can KMail be themed? Yes, via KDE System Settings → Appearance → Global Theme. KMail follows the Plasma look. Custom KMail themes are possible too.

Kontact vs KMail — what’s the difference? Kontact is the integrating shell (tabs for mail, calendar, contacts, tasks, notes). KMail is just the mail component. You can open KMail standalone or as a tab inside Kontact.

What’s next

Related products
Tags
mailcow kmail linux kde kontact

Did this article help?

If not, open a ticket. If it did, we're happy about a referral — both sides get €25 credit on their customer account.