4.1 KiB
title, description, date, draft, scrolltotop, images, tags
| title | description | date | draft | scrolltotop | images | tags | |||
|---|---|---|---|---|---|---|---|---|---|
| How to import emails from a .pst file into KMail | Using a tool called "readpst" you can transfer emails from an Outlook account into any other email client, for example KMail. | 2026-05-15T17:30:00+02:00 | false | true |
|
Here I describe how I imported an email archive from Outlook to KDE's KMail. This turned out to be harder than expected.
My machine is a Fedora 44 KDE box, but the procedure should be the same or at least very similar on other Linux systems.
Prerequisites
Let's assume the following:
- An Outlook archive file named
archive.pst. - Inside this archive file: An email folder structure with first-level folders
in the style of
MyFolder1,MyFolder2etc. and subfolderMyFolder1/MyFolder1Subfolder1and so on.
I use the venerable readpst tool to extract folders and emails from the
archive file. It's included in common Linux distributions, but at least on
Fedora you don't install it directly, but rather the libpst package:
sudo dnf install libpst
# dnf info libpst
Updating and loading repositories:
Repositories loaded.
Installed packages
Name : libpst
Epoch : 0
Version : 0.6.76
Release : 28.fc44
Architecture : x86_64
Installed size : 192.7 KiB
Source : libpst-0.6.76-28.fc44.src.rpm
From repository : <unknown>
Summary : Utilities to convert Outlook .pst files to other formats
URL : http://www.five-ten-sg.com/libpst/
License : GPL-2.0-or-later
Description : The Libpst utilities include readpst which can convert email messages
: to both mbox and MH mailbox formats, pst2ldif which can convert the
: contacts to .ldif format for import into ldap databases, and pst2dii
: which can convert email messages to the DII load file format used by
: Summation.
Vendor : Fedora Project
Working solution as of 2026
Modern KMail does not store emails in the traditional storage formats such
as Maildir or Mbox. It uses KDE's Akonadi database system. Therefore,
we need to first export all folders and emails from the Outlook data file,
then import these into KMail's database using the File > Import Messages...
command.
At first, I struggled a bit to find the correct output format option to make
it work. readpst offers a number of different formats -- basically various
flavors of the MH/maildir and the mbox structures. It did not work
with the -k option that is meant to produce a dedicated KMail format. I ended
up using the simple -e option that produces a directory structure according
to the folders in the Outlook archive, with one separate file for each email
message.
-
Export folders and emails from the Outlook data file:
readpst -e archive.pstThere is no need to create and specifiy a dedicated directory, because
readpstwill create a directory structure with a generic top-level directory (in German, this directory is called "Outlook-Datendatei", Outlook data file). -
Import the folder structure and emails into KMail:
a. In the
Filemenu, chooseImport Messages....b. In the Import dialog that appears, choose "Import KMail Maildirs and Folder Structure".
{{< figure src="kmail-import-dialog.png" >}}
c. At the bottom of the dialog where it says "Please select the folder to import to", click on the folder icon. Choose the existing "Local Folders". There is no need to create an extra folder for the import because KMail will create a folder "KMail-Import" just for you.
d. Click on "Next" and choose your
.pstfile.e. Start the import process.
-
All imported messages are marked as unread at first, but this will go away after a while.