
Copyright © 1999, 2000, 2001, 2002 David Rugge
Copyright © 2003 Daniel Naber
Copyright © 2004 Daniel Naber, Ingo Klöcker
Copyright © 2013 Laurent Montel
Copyright © 2020 David Bryant
KMail is KDE's powerful and user friendly email client.
Table of Contents
- 1. Introduction
- 2. Getting Started
- 3. Using KMail
- 4. Configure KMail
- 5. Command and Menu Reference
- 6. Frequently Asked Questions (FAQ)
- 7. KMail Troubleshooting
- 8. Credits and License
List of Tables
- 3.1. ACL Rights Summary
List of Examples
- 4.1. Email address
- 4.2. Email aliases
- 4.3. Default domain


KMail Welcome Screen
The KMail Team welcomes you to KMail, a user-friendly email client by KDE. Our goal is to make KMail a program that is both beautiful and intuitive without sacrificing power.
If you have never set up an email client on a UNIX® system before, we suggest that you read through the Getting Started section first.
Here is a brief guide to some of the great features available in KMail
You do not have to use your mouse when working with KMail. Everything can be done with Keyboard Shortcuts.
Although KMail is very reliable, you should keep backups of your messages, i.e., use one of the export/archive options listed in Backup Options to back up your settings and email regularly.
KMail makes it easy to import email from many different email applications. The options are described in Restore and Import in KMail.
You can separate your messages into different categories by using KMail's extensive Folders options. Features include special handling for specified folders: mailing lists, acl (IMAP only), and archiving.
You can complement your folder setup with highly configurable filters.
By default KMail will detect common email scams. You can also fight SPAM and viruses by creating filters that work with external programs to scan email as it comes in. See Anti Spam and Anti Virus for details.
It's easy to manage several email accounts by using different identities.
We hope you will enjoy KMail!
KMail's homepage can be found at https://userbase.kde.org/KMail. There you will find useful links (e.g., to the user and developer mailing lists, and to the community wiki pages.) Please report any bugs in KMail using → .

This is a short introduction to KMail and its usage so you can start working with it right away. For more in-depth information see the Using KMail section.
The first time you run KMail you will be greeted by the Account Wizard.
Note
If at any time you need to run the account wizard again, you can find it under → .
The wizard will lead you through the process of creating an email account. Your screens will vary depending on how much the wizard can determine on its own. Here is an outline of the screens you will encounter while using this wizard.
The first screen of the wizard is Provide personal data. It will prompt you for your basic account information: Full name:, E-mail address, and Password. By default, the Find provider settings on the Internet option is checked, so the wizard will attempt to retrieve the necessary information from the email server. Uncheck this option if you are an expert user and you want to set up an advanced configuration. Click the button when finished.
The "Provide personal data" dialog
Note
GMail accounts must use IMAP. If you have enabled 2-step verification for your GMail account, you will have to get a verification code from Google as part of the initial account setup process. You will not have to perform 2-factor verification after the KMail account has been created, because Google marks your IMAP link as fully trusted.
The next screen helps you set up encryption keys for your mail.
The encryption options dialog
If you want to secure your communications with GnuPG you can generate a new key and publish the key on a public key server, or you can import an existing key. If you decide to generate a new key pair, do not forget the password used to generate it. You will need that password every time you want to use the key.
When sending mail, KMail optionally looks for encryption keys for your recipients, and encrypts the message if a key can be found. KMail can also sign your mail cryptographically, so that each recipient can verify that your message has not been tampered with.
A Setup complete screen will appear if the wizard determined the account type successfully. Click to view the settings KMail has established. Click the button to set up the account, complete the wizard, and close the window.
The account type selection dialog
If the wizard cannot determine your account type, the Select Account Type screen will appear. Select your account type from the list (if you do not know, you will need to contact your email provider). If your account type is not listed, click the button. Once your account type has been selected, click the button, and you will be presented with the Personal Settings screen.
If the wizard could not locate your email server by searching the internet, the screen will appear.
The "Personal Settings" dialog
Be certain to enter all this information correctly. Select Download all messages for offline use if you want your messages to be accessible when you do not have an Internet connection (IMAP only). Click the button when finished. The Setup complete screen will appear.
Your account has now been set up, and you can click the button to complete the wizard and close the window, or click the button to review the account settings.
If you wish to create an account manually, please continue reading this chapter. Otherwise, you may safely skip ahead to Testing your Setup.


KMail's main configuration screen
The → window consists of six sections: Accounts, Appearance, Composer, Security, Misc, and Plugins.
To begin sending and receiving messages you will only have to change some settings on the Accounts page. Here is a brief synopsis of the steps you must take to set up a new mail account. For a more detailed description, please read the Configure KMail chapter.
To create a new identity, click the Add... button on the Identities tab associated with the Accounts page. A small pop-up window will appear.

Adding a new identity
You have some options here. Give the new identity a name, and select one of the available choices ("With empty fields" or "Use System Settings values"). Then click OK. The identity configuration screen will appear.

Configuring the new identity
The settings in the General tab are
fairly straightforward. Fill in the Your
name field with your full name (e.g., John
Doe
) and the Organization field
(optional) with the appropriate information.
Next, fill in the Email address field with
your email address (e.g. john@example.net
).
If you are using PGP or GnuPG you can set your OpenPGP keys and/or S/MIME certificates in the Cryptography tab.
The Advanced and Templates tabs can be used to tailor the way outgoing messages from this identity will be formatted and processed. See Configure KMail for more detailed instructions.
Optionally, go to the Signature tab and enter your signature. This is a short bit of verbiage that will be automatically appended to all your messages. It has nothing to do with digital signatures. You may also wish to insert a small personal avatar in outgoing message headers via the Picture tab.
The Accounts page also contains the settings that tell KMail how to send and receive your email messages. Many of these settings can vary greatly depending on the way your system is set up, and on the kind of network in which your mail server is located. If you do not know what setting to choose or what to put in a field, consult your ISP (Internet Service Provider) or system administrator.
Here's one way to create an outgoing mail account.

Choosing an outgoing email account type
When you click the button on the Sending tab, this screen will appear. If your computer is connected directly to the internet you will most likely want to choose SMTP. If you need to use sendmail® or Microsoft® EWS, please consult the Configuration chapter. Whichever type of outgoing account you select, check the box labeled "Make this the default outgoing account". (You can easily change this later if you have more than one email account.)
When you select the SMTP option and click the button, the following configuration screen will appear.

Configuring an SMTP account
At a minimum, you must supply an email server URI. If your email service requires authentication before sending messages, check the "Server requires authentication" box and supply your email address and password. If you want KMail to remember your password, check the "Store SMTP password" box. If you have not yet created a wallet, you will be asked to provide a password.
Verify that the connection to the SMTP server is working by choosing the Advanced tab and clicking the button. KMail will query your SMTP server for the correct settings (encryption, port number, and authentication method). After the proper settings have been detected, the outgoing account is ready to use. (Please refer to Configuration if the SMTP connection requires additional fine tuning.)
By default the Local Folders (inbox, outbox, sent-mail, trash, drafts, and templates) in the primary KMail folder are predefined on this tab. Using the drop down box you can set the Retrieval Options for these folders. (Note that KMail uses the Maildir format to store messages on your hard disk: each message is stored as a separate file. The exact location of the primary KMail directory depends on the Linux® distribution you have installed, but it is probably in ~/.local/share/ somewhere.)
To set up an account so you can receive mail, press the button on the Receiving tab. Choose "Custom Account..." from the drop down list. You will then be prompted for the account type. Most users will select POP3 E-Mail Server or IMAP E-Mail Server. If you want to use a local mailbox file (Mbox), please see the FAQ about file locking.

Configuring an IMAP account
If you chose POP3 or IMAP, the account settings window will appear. First, fill in the Account Name field to name your account. You can choose any name you like. Username, Password, and Incoming mail server (or IMAP Server) should be filled in with the appropriate information from your ISP or system administrator. If you want KMail to check for new messages automatically, check the Enable interval mail checking box and set the time interval you desire.
Next, click on the Advanced tab and then the button. KMail will query your incoming message server to determine the correct settings for this account (encryption, port number, and authentication method).
If you check Automatically compact folders on the Advanced configuration tab, KMail removes the messages you deleted from the server as soon as you leave that folder. Otherwise, the messages are only marked as deleted and it is up to you to compact the folders manually.
Select Leave fetched messages on the server on the Advanced configuration tab if you want to leave your messages on the server after you have downloaded them. There are seven ways to specify how long old messages will be kept after being downloaded: indefinitely (leave all options unselected), or number of days / number of messages / maximum size of server side inbox (choose one, two, or all three). If this box is not checked, all messages will be immediately deleted from the remote server after downloading is complete.
On the Advanced tab you can also select Use pipelining for faster mail download if this is supported by your server. Test this to make sure it works safely.
The inbox is the default folder for incoming messages. If you want to change that for some reason, you can do so with Destination folder. But what you probably want is a filter.
With Pre-command you can specify a program that KMail should execute before fetching mail. Please specify the full path (do not use “~”) and note that KMail will not continue until the program returns.
On the Receiving tab, under Retrieval Options, select Include in Manual Mail Check if you want to check this account whenever you invoke → . If you do not select this option you can still check for new messages on this account with → .
KMail supports encryption via SSL/TLS and STARTTLS (SSL/TLS should be preferred if it is available).
KMail supports nine authentication methods:
Clear text,
PLAIN,
LOGIN,
CRAM-MD5 (recommended if DIGEST-MD5 is not available),
DIGEST-MD5 (recommended),
NTLM,
GSSAPINTLM,
APOP (aka Anonymous), and
Gmail.
DIGEST-MD5, CRAM-MD5 and APOP are secure on their own. The other options are only secure when used together with SSL or TLS. You should only use Clear text if your server does not support any of the other authentication methods. Anonymous is supported on IMAP, but APOP is not. Gmail authentication is only available for IMAP accounts using Google's GMail service.
Use the button on the Advanced tab to automatically select the most secure settings supported by your server.
You are now ready to receive mail. For IMAP, just open your folders in the folder tree in KMail's main window. KMail then connects to your server and displays the messages it finds. For POP3 use → .
First, you should send yourself a message to test your
configuration. To send a message, either hit Ctrl+N, select the
New button, or select
the → menu item. The
composer window will appear. Fill in the
To: field with your email address and type
something in the Subject field. Send the message by
selecting → .
To check your email, select → . In the lower right corner of the main window, a progress bar will indicate how many messages are being downloaded. If you receive the message you just sent, then congratulations! If, however, you receive any error messages while testing your setup, make sure that your network connection is working and recheck your settings at → .

The main window is the window that appears when KMail is started. It is by default divided into three panes:
- Folder List (on the left)
The Folder List
This pane contains the list of your message folders (other email programs may call them mailboxes). To select a folder, simply click on it. The message header information contained in the folder will then appear in the Message List pane. The folder list can be displayed in both a short view, which takes up only a small portion of the left side of the screen, and a long view, which takes up the entire left side of the screen (and can show more folders). You can toggle between these two views by using the Appearance/Layout tab in the → dialog. The top section of the folder pane provides quick links to your favorite folders. Drag and drop folders here, or add them via the mouse button context menu item . Please see the Folders Section for more details about folders.
- Message List (on the upper right by default)
The Message List (Smart Theme)
This pane lists header information (Subject, Sender, and Date) for the messages in the currently selected folder. Clicking on an item in the Message List will select that message and display it in the Preview pane; you can also select more than one message by holding down the Ctrl key (or the Shift key) when clicking on messages.
Change the appearance of your message list by selecting → → . You have several options here.
Classic A simple, backward compatible single row with clickable sort columns.
Smart A smart multi-line, multi-item list with status icons, and no sort columns.
Smart with Clickable Status A smart multi-line, multi-item list with clickable status icons.
Configure... Allows you to customize your own Message List Theme (e.g. add or remove columns from the clickable sort bar.)
If you have chosen the Classic theme, you may sort the messages by clicking on the column that you wish to sort; if you click on the same column again, the sort order will toggle between ascending/descending. Clicking the Configure Appearance of Message List for details.
mouse button on the list header shows a pop up menu, which allows you to show or hide several columns in the list. You can customize the columns visible on the sort bar; see- Preview Pane (in the lower right by default)
The Preview Pane
This pane displays the currently selected message. Here are some ways to adjust the Preview pane.
The top of the Preview pane displays the message headers. Several display options are available. Go to → and try them out until you find one you like!
Fancy Headers Colorful header with a spam status / attachments notification.
Brief Headers Title, and in parentheses: From, CCs (if any), and the date.
KMail 5.2 An avatar (if available) with Title, From, To, CCs (if any), and spam status / attachments on separate lines.
Download New Themes... Allows you to download custom themes created by other KMail users.
Click on the bar located on the left hand side of the pane to toggle between plain text and HTML (if and only if the message is coded both ways). The text on the bar will inform you which view you are in. The → → dialog allows you to select HTML as the default message display option, if you prefer HTML to plain text.
If you would like to change the way your attachments appear in your messages, go to → . These are your options.
, all attachments appear as icons at the bottom of the message.
will show attachments as icons, unless the message suggests that they should be displayed inline. You can suggest that certain attachments should be shown inline in messages you compose by selecting Suggest automatic display in the composer window via the attachment's properties dialog.
shows the contents of the attachments at the bottom of the message. Attachments that cannot be displayed, e.g. compressed files, will still be shown as an icon.
will not show attachments.
will suppress inline displays, but list the attachments along with the message headers.
The interactions among the header themes, the attachment views, and the plain text versus HTML preferences is rather complex. For example, if you attach an HTML file to a plain text message, KMail will probably interpret your message as being coded in two different formats, even though this is not really the case. Similarly, HTML messages may display embedded images even when you have selected the "Hide" option for attachments.
The structure of each message can be displayed by pressing Ctrl+Alt+D. This will open a message structure viewer below the preview pane. Turn the message structure viewer off by pressing the same three keys.
You can scroll through the message page-by-page using the PgUp and PgDn keys, or line-by-line using the Up and Down keys; you can also use keyboard shortcuts to skip through your messages without having to use the mouse.

The following keyboard shortcuts are supported by default in the main window. Notice that many "universal" shortcuts (e.g. Ctrl+C to copy selected text to the clipboard, or Ctrl+F to open a "Find" dialog) are recognized by KMail, but are not documented here.
Keyboard Shortcut | Action |
---|---|
Space | Scroll down in the current message. |
→ or N | Go to the next message in the current folder and display the message preview. |
← or P | Go to the previous message in the current folder and display the message preview. |
Ctrl+Home | Go to the very first message in the current folder and display the message preview. |
Ctrl+End | Go to the very last message in the current folder and display the message preview. |
+ | Go to the next unread message in the current folder. |
- | Go to the previous unread message in the current folder. |
C | Copy this message to another folder. |
M | Move this message to another folder. |
A | Reply to all recipients of this message (with quote). |
R | Reply to sender with quote. |
Shift+R | Reply to sender without quoting anything. |
S | Launch the message search dialog. |
T | Open this message in the composition window. |
Enter | View selected message in the full-screen message viewer. |
V | View the raw message, headers and all, as a text file. |
Ctrl+L | Check for new messages on the server(s). |
Ctrl+N | Open the composition window to write a new message. |
Ctrl++ | Zoom in on the current message, in increments of 20%. |
Ctrl+- | Zoom out of the current message, in increments of 20%. |
Ctrl+0 | Reset message Zoom factor to 100% (full size). |
Ctrl+Alt+D | Toggle message structure display (below the message preview pane). |
Ctrl+Shift+O | Create the tabbing toolbar (appears above the message list). |
Ctrl+Shift+W | Remove the currently active tab from the tabbing toolbar. |
Alt+↑ | Go to the previous folder in the folder list (if the folder list has focus). |
Alt+↓ | Go to the next folder in the folder list (if the folder list has focus). |
Ctrl+Home | Focus on the very first folder. Use Ctrl+Space to actually enter the folder. |
Ctrl+End | Focus on the very last folder. Use Ctrl+Space to actually enter the folder. |
Ctrl+Space | Enter the folder that has focus, i.e. the folder that you navigated to using Ctrl+Home or Ctrl+End. |
Shift+H | Toggle between plain text and HTML (unless HTML has been preferred via the Settings dialog). |
Shift+← & Shift+→ | Select messages sequentially in the message list, starting with the current message. |
For more keyboard shortcuts, take a look at the → dialog. If you're not happy with the defaults, you can change them!
Two mouse actions deserve mention here. First, you can select multiple noncontiguous messages to be processed all at once (e.g. copied, deleted, or moved) by pressing Ctrl and selecting them with the mouse button. Second, you can open a message in an external window by double-clicking an item in the message list. If the message is in the outbox, drafts, or templates folder, it will be opened in a composition window. Otherwise, it will be opened with the external message viewer, an abbreviated version of KMail's main window without the folder and message lists, and with shorter menus.


The Composer Window in HTML composition mode.
The composer window is used to write new messages, to compose replies, and to forward messages. It can be opened in several ways. Here are the various options for composing messages.
- New Message...
The New Message composer window can be invoked in four different ways:
→ →
→
Via the
New icon on the main toolbar.
Via the keyboard shortcut Ctrl+N.
To write your message, fill in the appropriate fields in the composer window. Use the menu to select which header fields are displayed. Any selection you make will remain as the default when you open a new composer window. These items are available.
The drop down box lets you select an identity to use.
The drop down box lets you choose a dictionary for spell checking.
lets you specify where a local copy of this message will be saved when you send it.
lets you select an outgoing mail server.
The traditional From:, To:, and Subject: fields. (The Reply To: field will appear only if you have specified an alternative Reply To address on the Advanced tab in the → → → dialog.)
toggles fixed width fonts on and off.
displays the snippets window, where you may save frequently used bits of verbiage.
There are a variety of shortcuts to help you select recipients. The button next to the To:, CC:, and BCC: fields opens a list from KAddressBook so you can select one or more people who should receive this message.
Alternatively, when you start typing an address in one of the To:/CC:/BCC: fields, a popup will appear that suggests similar recently used addresses and closely matching addresses from KAddressBook; if you do not like this automatic popup, you can disable it by clicking the mouse button in the field where you're typing, then choosing a different Text Completion > mode. You can also use this context menu to fine-tune the order in which suggested completions appear (via Configure Completion...).
Whenever you want to add more than one recipient in one of the fields, use a comma to separate one address from the next one. You may have to specify fully qualified addresses (i.e.
user@example.com
) even for local users, depending on your system configuration.When you are finished with your message, click the
Send icon to send the message now, or click the
Queue icon to put the message in the outbox. If your message is not finished yet, select → to save it for later editing. If you want to print your message, select → to preview the message, and → to print it.
→ lets you schedule your emails to be sent at a specific date and time. Please see Send Later Agent for details.
- → → →
Composing a new message from a template is useful when you have created a masterpiece that you would like to use as a template for future new messages. Select → ; this will place your new template in the templates folder. You can revise the template at any time by selecting it from this folder. Double click on the template's name (or press the shortcut key, T) to open it in a composition window. You may also select the template via the menu, as shown above.
If you want to send an encrypted
or digitally signed message, select the
Sign and / or
Encrypt icon in the toolbar.
Use the → dropdown list to select the format used to encrypt the
message. (The Options menu also lets you sign / encrypt the message.)
You may choose one of five formatting options.
- Any
KMail will use a format which is understood by all recipients of the message. The preferred format for each recipient can be specified via KAddressBook.
- Inline OpenPGP (deprecated)
This format is deprecated, but is supported for backward compatibility. If you use this format then only the message text will be signed and/or encrypted. Attachments will neither be signed nor encrypted. HTML messages cannot be signed with this format. You should only use this format when necessary, i.e. if you send messages to people who use email clients that cannot handle the more advanced formats.
- OpenPGP/MIME
This format is the successor to the inline OpenPGP format. If you use this format then the message text and all attachments will be signed and/or encrypted (at least by default). This is the recommended format if you use OpenPGP encryption.
- S/MIME
This format is an alternative format to OpenPGP/MIME. If you use this format then the message text and all attachments will be signed and/or encrypted (at least by default). This format is mostly used by corporations. It relies on an x.509 certificate, not a PGP / GPG key.
- S/MIME opaque
This format is a variant of the S/MIME format. Because it rolls the message, any attachments, and the digital signature into a single MIME object, it is cpu-intensive and should only be used if necessary.
Note that HTML messages are often regarded as an annoyance; therefore, you should use HTML messages judiciously. In particular, you should never send HTML messages to mailing list recipients unless HTML messages are explicitly allowed.
To create HTML messages, you must first enable
the markup tools. To do this, enable
in the menu, or click on
the Rich Text icon on the KMail toolbar.
An additional toolbar with several formatting tools will appear. Via the HTML toolbar you can choose
standard text or bulleted / numbered lists. (Use the None
drop-down list at the left edge of the toolbar to control the style of bulleted / numbered lists.)
You can also control the font family, the font size, the font style (bold,
italic, underlined, or strike-through) and the text / background color. And you can specify
the alignment of the text (left aligned, centered, right aligned, or justified) and
insert anchor tags (aka links), horizontal lines, images, tables, and arbitrary HTML code
(although support for some of the more advanced HTML tags is still incomplete).
You can attach files to your message by using any of these methods.
Use the → dropdown list and ensuing dialog to choose a file;
Click the
Attach icon and select the file you wish to attach;
Drag a file from the desktop or another folder into the composer window;
Drag a message from KMail's message list into the composer window – that message will then be attached;
Select one of the additional options in the menu; or
Select → or → .
Once a file is attached to your message, it appears in the attachments pane at the bottom of the composer window. You can use the , , , , , or the attachment. (This context menu varies a little, depending on the file type of the attachment.) Several options (Compress / Encrypt / Sign / Suggest Automatic Display) may be toggled on or off for each file attached to a message.
mouse button on each attachment toUse the item in the context menu to open the Attachment Properties dialog. The first field contains the attachment's MIME type. Just like the Name field, it is automatically filled with an appropriate value. Sometimes the MIME type may be wrong. You can then type in any MIME type or choose from the list of common MIME types. You can also select an encoding method for your file from the list of encoding options (normally, the default value works fine). Check the Suggest automatic display option if you want to suggest to the recipient the automatic (inline) display of this attachment. Whether this works, or not, depends on the recipient's email client, and on his settings.
You can also attach public crypto keys to the message by choosing the appropriate options in the menu. GnuPG keys and x.509 certificates are (usually) handled as file attachments.
KMail can automatically check the spelling of your message and underline unknown words in red. If there are too many unknown words, KMail will disable its checking. To select the language used when checking, select → . You can disable automatic spell checking in the menu.
If you need to write mails in different languages, enable the Dictionary drop down box with → from the menu. Using this drop down box allows you to change the spell checker's language with one mouse click.
To check the spelling of your message via a dialog, select → . KMail uses Sonnet to check spelling; Sonnet is the KDE frontend to the Aspell, Hspell, Enchant, and HUNSPELL spell checking programs. Note that you may need to configure the spell checker using → .
When editing in the composer window you can insert frequently used bits of text as snippets. To configure mail snippets, select → from the menubar. A new panel will appear on the right side of the composer window.
To add a new snippet to the Snippet Panel, right click on the panel, then click in the context menu. A snippet editor dialog will appear, in which new text can be added and the snippet can be given a name. A Shortcut can also be associated with the snippet. Snippets can be grouped together by creating groups and adding snippets to a particular group. Use the mouse button context menu to add, edit, or remove snippets of text from the saved collection.
The Snippets tool enables insertion of variable text in predefined places any time you insert a snippet in a file. To do this, Snippets provides its own variables mechanism. You can insert variables in the snippet text itself by using separators ( $ ) to enclose the variable names. For example: $variablename$, $invoicenumber$, $weekno$.
The variable separator can be changed to another character by changing snippetDelimiter
in the
[SnippetPart] section in the Text Snippet configuration file, which can be found at ~./config/kmailsnippetrc.
snippetDelimiter=$
The KMail 2 composer provides a built-in translator that can be accessed by selecting → from the menu bar. A new panel will appear at the bottom of the composer window.
To translate a section of text, first enter the text you would like translated in the box labeled Drag text that you want to translate.. Select the language in which it is written in the From: drop down box. Select the language you would like to translate to in the To: drop down box, then click the button. After being translated by Google Translate, a free online service, your translated text will appear in the next box. If you need to translate in the other direction you can just click the button. To clear all text, click the button.


KMail's default folders.
Message Folders are used to organize your email messages. When you first start KMail the “Local Folders” containing inbox, outbox, sent-mail, trash, drafts and templates folders are created. Each of these folders has a special function.
- inbox:
Where KMail by default puts your new messages when you tell it to check your mail.
Note
IMAP accounts will not use this inbox. The IMAP inbox is located on the IMAP server.
- outbox:
Where messages are put while they are waiting to be delivered. You must not just drag and drop messages here to send them; use the
Send icon in the composer window instead.
- sent-mail:
By default, a copy of every message you send is saved in this folder.
- trash:
By default, all messages that you have designated as trash are moved into this folder.
- drafts:
Contains messages you started to write but then saved to this folder with → .
- templates:
This folder holds your templates created via → from the composer window. Please see New Composer Templates for details.
Organize your emails (e.g. mailing lists, bills and receipts, etc.) by creating new folders. To create a new folder, select → , or from the mouse button context menu. A dialog will pop up. Enter the name of the new folder in the text box. You can fully customize each folder (i.e. views, replies, etc.) by selecting the folder you wish to modify in the folders pane and then choosing from the mouse button context menu. See Properties of Folders for details.
To move messages from one folder into another, select the message(s) you want to move and press the M key or select → . A list of folders will appear; select the folder into which you wish to move the message from that list. Messages can also be moved by dragging them from the Message list to a folder in the Folder list, or by using a context menu invoked with the mouse button.
If you have folders that are frequently accessed, you can add them to your favorite folders pane (above the list of folders). Add them with the .
mouse button context menu optionYou can create a virtual folder with search parameters by going to → , or by using keyboard shortcut S. Enter your search parameters into the dialog. Name
your search with the Search folder name: textbox, e.g. emails with the word Blog
. Click the button. Now select
the button. A results folder will open, positioned at the bottom of the Folder pane.
(By default, each new search is named "Last Search". You can save particular search parameters by assigning a special name as described above.)
Creating filters to automatically move messages to specified folders is a great way to organize messages by mailing list, sender, subject etc. Please see Filters for details.
If you receive emails from a trusted source (e.g. a Blog you signed up for) that is formatted in HTML and you would like to enable HTML view for those emails only, you can create a new folder, set up a filter to place all email from the Blog in the new folder, select the folder, and then choose → → .
Some common folder actions are
- →
Move all the messages in the selected folder to the trash folder.
- →
Create an archive of the folder. See Archive Folder for details.
- →
Remove a folder with all its messages and sub-folders.
- →
Search the currently selected folder for duplicates and delete them.

The Folder Properties Dialog
The Properties of Folder dialog lets you specify its properties. Note that some properties are only available for the folders you create and not for default folders like inbox etc. The six default folders cannot be renamed.
If you want to rename a folder, change the entry in the Name: field.
Act on new/unread mail in this folder is enabled by default on new folders. It enables notifications about new mail that arrives in the folder. Uncheck this option on folders like SPAM and trash for which you do not desire notifications.
Check Keep replies in this folder if you want replies to these messages to be stored in this folder rather than in the default configured sent-mail folder.
Check Hide this folder in the folder selection dialog if you do not want this folder to be shown in folder selection dialogs, such as the and dialogs.
New folders use the default identity. If you wish to associate a folder with a different identity, uncheck Use default identity and select a different one from the Sender identity drop down menu. See Identities configuration for information on Identities. Replies to messages that were sent directly to you will still default to the message's “To” address if a matching identity is found.
The Use custom icons option lets you choose icons that are different from the defaults in the folder list.
With the Show column drop down list you can set the visible columns in the header pane to Default, Sender, or Receiver. This may be useful if you use a custom folder to save some of your own sent messages.
In the Message List section you can select and configure an Aggregation and Theme for this folder that differs from the default configured in KMails settings. For more details see the Message List tab on the Appearance page.
The Message Default Format section lets you choose between plain and HTML displays for messages in this folder.
If you have an account that does not receive much mail and you don't want KMail to query the server too often, you can uncheck Use options from parent folder or account to set a longer interval in the Automatically synchronize after: spin box.
In Retrieval Options you can change the Always retrieve full messages option to Retrieve message bodies on demand if you have a slow connection. You can also set how long the message will be retained locally via the spin box.
On this tab you can define folder-specific templates for your custom folders. For more details see the Standard Templates tab on the Composer page.
You can set up automatic cleanup or deletion of emails. Check the box if you would like to automatically expire read or unread messages respectively. Set the number of days in the spin box. If you do not want to delete the messages permanently, you can assign a folder to keep them in via the Move expired messages to: text box / folder selection dialog. Once you have reviewed the messages and want to delete them permanently, you can go to the folder expiry options of the folder you chose to move them to and set the option Delete expired messages permanently, then click the button.
Warning
Messages that are deleted cannot be restored, so be careful with this setting.
If you are going to use the folder for a mailing list open the Mailing List Folder Properties dialog with → from the menu. Then you should check Folder holds a mailing list to associate this folder with the mailing list. Next you should click on Detect Automatically. KMail will then try to guess some information about the mailing list from the currently selected message. If KMail could not determine some addresses then you can add the missing information manually. To do this first select the Address type for which you want to add an address. You can choose among five options.
- Post to List
This address is used for sending messages to the mailing list. This is usually an email address.
- Subscribe to List
This address is used for subscribing to the mailing list. This can be an email address or the address of a web page.
- Unsubscribe From List
This address is used for unsubscribing from the mailing list. This can be an email address or the address of a web page.
- List Archives
This is the address of the archive of the mailing list. This is usually the address of a web page.
- List Help
This address is used for requesting help for this mailing list. This is usually an email address.
After selecting the appropriate Address type, enter the email address or the address of the web page and then click on Add. With Remove you can remove addresses.
When all the addresses have been added, you can execute an action, e.g. go to the list archives, by selecting the appropriate Address type and then clicking on Invoke Handler. If there is an email address and an address of a web page for the desired action, you will have to select the Preferred handler prior to clicking on Invoke Handler. Select KMail if you want to send a message to the email address and select Browser if you want to go to the web page.
You can also send a new message to the mailing list via → (instead of Invoke Handler).
This tab shows an overview about the folder type and its size, the number of read and unread messages in the folder and allows you to enable text indexing.
This tab will show you how much space has been allocated to your IMAP account by the server, and also how much of the allocated space you are currently using.
Here you can manage the access control lists (ACLs) of IMAP folders.
Note
The IMAP server must have user level ACL configured and enabled for this tab to be visible.
The currently active ACL is shown in the list. It consists of pairs of User Ids and the Permissions granted to users identified by that User Id. [1] ACLs are settable per-folder.
Note
As with everything else when using disconnected IMAP, you need to sync with the server for the changes to be transferred to the server.
IMAP ACLs define a lot of fine-grained permissions that you can grant or deny other users. For the sake of clarity, KMail will present them as the following five categories that you can choose from (see Table 3.1, “ACL Rights Summary” for the details if you already know IMAP ACLs).
- None
Grants the users identified by User Id no rights at all. This is also the default for users not explicitly (or implicitly, as a group) listed in the ACL. These users will not see this folder in the list of IMAP folders presented to them by their mail clients.
- Read
Grants the users identified by User Id reading rights for this folder. This also includes the ability for their mail clients to mark mails as read and store this information on the server. [2]
These users will see this folder in the list of IMAP folders presented to them by their mail clients.
Use this to create a shared folder that others can read, but not modify.
If you were the editor of a company's news letter, you could create a folder for the purpose of distributing the news letter, grant everyone reading rights, and save the letter to this folder instead of sending it out by email to a catch-all address.
- Append
(also known as Post)
Grants the users identified by User Id reading (see above) and posting rights for this folder.
Use this to create a shared folder that others can read and post messages to, but cannot otherwise modify.
If you wanted to create a company-wide discussion forum, instead of using a web-based form or a separate company-private usenet server, you could create a bunch of folders (one per topic), and grant everyone reading and posting rights. Instead of posting to an NNTP server or writing their messages into a web form, people would just write emails and store them in the folder suiting the topic of the message.
- Write
Grants the users identified by User Id reading, posting (see above), and writing rights for this folder.
The right to write to a folder includes deleting of messages, creating subfolders, and storing other attributes than read/unread on the server (e.g. answered).
Use this to create a shared folder that everyone has (almost, see All) the same rights for.
In the Append example, you could assign write rights to a group of people acting as moderators, who would then be able to remove off-topic posts, and create sub-topic folders for high-traffic folders.
- All
Grants the users identified by User Id reading, posting, writing (see above), as well as administration rights, i.e. the right to modify the ACL of this folder.
This is the default set of rights for the owner of a folder.
Table 3.1, “ACL Rights Summary” summarizes the IMAP ACL rights associated with each permission level.
[1] Note that a single User Id might refer to more than one user. Depending on the IMAP server and its configuration, there may be User Ids that correspond to groups of users, anonymous users, or any user. Consult the manual of your specific IMAP server implementation for more information.
[2] Every user has their own list of read mail, so none of your unread mails will suddenly be marked as read just because someone else has already read them.


The Filter Creation Dialog
After using KMail for a while, you may find that you have trouble sorting out the new messages in your inbox when they arrive. Filters allow you to automatically perform certain actions on incoming messages and to manually perform actions on selected messages in a folder.
Filters consist of filter criteria, whose rules are used to determine whether this filter should be applied to a given message, and a list of filter actions, which describe what is to be done with, or to, the message if the search pattern matches.
Note
Filters are considered one after the other, starting with the first filter in the list. The first one whose pattern matches the given message is applied; you can request that the remaining filters also be processed, but the default is to stop processing at the first matching filter.
Usually, filters are used on incoming messages, but they can also be applied to sent messages or to an arbitrary message or group of messages. To selectively filter messages, select the messages you want to filter in the message list and either type Ctrl+J or select → . This will apply the filters (the ones that have been marked for manual filtering in the advanced filter dialog) to those messages.
There are two methods for creating a filter; the quick method is to use → and select a criterion from the submenu. This will open the filter dialog and present you with a new filter which has the first rule of the search pattern and the first action (as Move into Folder) preset. In most cases, all you have to do is select the folder where the message should be moved, but you can, of course, edit the filter as you like.
When creating a filter on mailing list messages, this method will try to find a criterion that uniquely identifies messages from the list. If it succeeds, the guessed name of the list is presented in the → → menu entry.
The second method is to manually construct a filter from scratch by calling the filter dialog through → . The filter dialog is described in detail in the following subsection.
This dialog allows you to manage and edit your list of filters.
You can reach it either via → or → .
The dialog is divided into three main sections on the General and Advanced tabs.
- Available Filters
This group contains the list of filters and some action buttons to modify the filters, namely: create new filters; move them up or down the list; copy one of them; delete them; or rename them. If you select a filter from the list, its properties are shown in the right-hand half of the dialog.
- Filter Criteria
In this group you can edit the pattern that messages must match before the filter is applied to them. You can select whether all of the defined rules must match, or whether a single match is enough. See Search Patterns below for a detailed description of each search rule type.
You can click on to get an additional (initially empty) rule if you want to define more complex patterns, and on to remove the selected rule. clears the pattern, i.e., it removes all but one rule from the screen and resets it.
- Filter Actions
In this group you can edit the list of actions that are applied to all messages that match the defined filter criteria. See Filter Actions below for a detailed description of each action type.
You can click on to get a new, empty action (if you want to define more than one action), and on to remove the selected action. clears the list, i.e. it removes all but one action and resets that one.
- Advanced Options
In this group you can define a few advanced options that allow you to fine tune your filtering.
Using the first row of check boxes, you can toggle when the filter is applied: the Apply this filter to incoming messages option means that the filter is applied to messages when you receive them (i.e. on
Check Mail). The filter can be applied to all messages, to all but online IMAP accounts, or to particular incoming email accounts.
The Apply this filter to sent messages option means that the filter is applied to messages when you send them, and the Apply this filter on manual filtering option controls whether to apply this filter when filtering is specifically selected (i.e. via → .)
If Apply this filter to sent messages is checked the filter will be triggered after the message is sent and it will only affect the local copy of the message. If the recipient's copy also needs to be modified, please use Apply this filter before sending messages.
The If this filter matches, stop processing here check box controls whether or not the filters after the current filter will be processed when the current filter matches.
If the Add this filter to the Apply Filter menu check box is selected, this filter will be inserted in the → submenu. You can then apply this single filter to a message or a set of messages. If you select this option, you may optionally select a keyboard shortcut and insert a special icon to invoke this filter from the toolbar.
Another way of applying filters is to use the → menu option, which applies all the filters – one after another – until they are all used or one of the filters that matches specifies the If this filter matches, stop processing here option.
Note
Filters are automatically named unless you explicitly rename them using the button. The dialog assumes that it should continue auto-naming the filter as long as the filter name starts with “<”.
If you apply filter changes, via or , only the valid filters are actually copied to the internal filter manager.
Similarly, empty rules and actions are removed from the pattern and action lists, respectively, before the filter is saved.
The most common use of filters is to filter on the sender of messages. This can be done by choosing From. A good bet for a mailing list would be All Recipients, but there are other criteria a filter can search for (note that all patterns are interpreted case-insensitively).
- Complete Message
Searches the whole message (i.e. headers, body and attachments, if any).
- Body of Message
Searches the body of the message (i.e. the whole message except the headers).
- Anywhere in Headers
Searches all the headers in the message.
- All Recipients
Searches the “To” and “CC” header fields of the message.
- Size in Bytes
Sets upper or lower bounds on the message's size.
- Age in Days
Sets upper or lower bounds on the message's age.
- Message Status
Sets restrictions on the status of the message (Important / Read / Unread / etc. see → ).
- Message Tag
Checks for tagged messages. See → .
- Encrypted
Checks for encrypted messages.
- Any other value (From, To, Date, etc.)
Searches the header field with that name.
The list of possible rules depends on what you selected in the first drop down box. The available rules are:
Rule | Available for | Description |
---|---|---|
contains/does not contain | all textual search items | Matches if the searched item contains (or does not contain) the given text. |
equals/does not equal | most textual search items | Matches if the searched item is equal to (or not equal to) the given text. |
starts with/does not start with | most textual search items | Matches if the searched item begins with (or does not begin with) the given text. |
ends with/does not end with | most textual search items | Matches if the searched item ends with (or does not end with) the given text. |
matches regular expr./does not match reg. expr. | all textual search items | Matches if a part of the searched item matches the given regular expression (or does not match it). If the regular expression editor is installed then you can edit the regular expression by clicking on the Edit... button. |
has an attachment/has no attachment | Complete Message | Matches if the message has an attachment (or does not have an attachment). |
is equal to/is not equal to | numerical search items | Matches if the value of the search item is equal to (or not equal to) the specified value. |
is less than | numerical search items | Matches if the value of the search item is less than the specified value. |
is greater than | numerical search items | Matches if the value of the search item is greater than the specified value. |
is less than or equal to | numerical search items | Matches if the value of the search item is less than or equal to the specified value. |
is greater than or equal to | numerical search items | Matches if the value of the search item is greater than or equal to the specified value. |
is/is not | Message Status | Matches if the message has (or does not have) the specified status. |
is after/is before or equal to | Date header | Matches if the message was sent after (not after) the specified date. |
is before/is after or equal to | Date header | Matches if the message was sent before (not before) the specified date. |
The most common use of filters is to divert some incoming messages to particular folders; this can be done by choosing Move into Folder. Here is a list of all possible actions.
- Move Into Folder
This will move the message into another folder, and remove it from its current folder.
- Copy Into Folder
This will copy the message to another folder, and leave the message in the current folder.
- Set Identity To
This will set the identity that will be used when you reply to this message.
- Mark As
This allows you to mark the message as read or important (flagged), but also as forwarded, replied, etc.
- Add Tag
This will add a tag to the message. You may choose from a list of all the tags that have been defined.
- Send Fake MDN
This will send a faked message disposition notification (i.e. a read receipt) to the sender of the message.
- Set Transport To
This will set the method of transport (e.g. SMTP) that will be used when you reply to the message. You may choose from a list of all your outgoing email accounts.
- Set Reply-To To
This will modify the Reply-To field of this message. This can be useful for mailing lists that automatically set a Reply-To address you do not wish to use.
- Forward To
This will forward the message inline (i.e. as if you selected → → ) to another email address. You may select a custom forwarding template if such a template has been defined. If KAddressBook is installed, you may choose the “Forward To” address from a pop-up window.
- Redirect To
This will redirect the message as-is to another email address. If KAddressBook is installed, you may choose the “Redirect To” address from a pop-up window.
- Confirm Delivery
Will return a message to the sender that verifies successful delivery of their message, if the sender requested that.
This action allows you to select who will get delivery receipts from you. Though you can globally enable the sending of delivery confirmations in the Configure KMail... dialog (Security page) we do not recommend that you send them to everyone, since this makes tracking of spam messages very easy for the spammers.
- Execute Command (for advanced users only)
This will execute a program, but will not modify the message. Specify the full path to the program you want to execute; KMail will then wait until the program returns. If you do not want KMail to wait, append '&' to the command. You can feed the segments of the message into the program one by one: %0, %1, etc. stand for files representing the message segments. For common messages, %0 is the plain text message, %1 the first attachment and so on. Additionally, the whole message is fed into the program's stdin; and every occurrence of %{foo} is replaced by the content of the foo header. If you need to identify the message via its storage location in the Akonadi database, you can use the %{itemid} or %{itemurl} placeholders to achieve that.
Warning
This currently only works if the message has at least one attachment. No, not even %0 will work in the general case!
Tip
You can enter arbitrarily-complex shell commands here, since KMail uses a sub shell to execute the command line; therefore, even this command will work (within its limits):
uudecode
-o
$(mktemp kmail-uudecoded.XXXXXX)
&& echo$'\a'
- Pipe Through
This will feed the message to a program: if the program returns output, the entire message (including the headers) will be replaced with this output; if the program does not return output or exits with a return code other than 0 (indicating an error occurred), the message will not change. Specify the full path to the program. The same substitutions (%n, %{foo} as with Execute Command may be performed on the command line.
Both the Anti-Spam Wizard and the Anti-Virus Wizard use the “Pipe Through” action to check for spam / malware. The commonly available anti-spam and anti-virus programs return the message, and insert an extra header record, if spam (or a virus) is detected.
Warning
Be cautious with this action, as it can damage your messages if the filter program returns garbage or extra lines.
- Remove Header
Will remove all header fields with the given name from the message. This is useful mainly for removing bogus “Reply-To:” headers.
- Add Header
If no such field is already present this will add a new header field with the given name and value to the message; if there already is a header field with that name, it is overwritten with the given value; if there are already multiple headers with the given name (e.g. “Received:” headers), an arbitrary one of them is overwritten and the others are left unchanged -- this is a known limitation. You may want to combine this filter with the Remove Header filter above to make sure that there are no other headers with that name in the message.
- Rewrite Header
Will scan the given header field, modify its contents and write it back. The search string is always interpreted as a case-sensitive regular expression. The replacement string is inserted literally except for occurrences of
\n
,$n
and${nn}
, wheren
is a positive (single-digit, except for the third form) number or0
. These constructs are interpreted as back references to substrings captured with parentheses in the search string.Analogous restrictions as in the Add Header action apply here, too.
- Play Sound
Will play the specified sound. A browse button lets you choose a pre-recorded sound (e.g. .wav) file.
- Add to Address Book
If KAddressBook is installed, this action will let you specify which header to scan (From, To, CC, or BCC), what tag to assign, if any, and which named address book to store the addresses in.
- Delete Message
Deletes the selected message(s). Use this option cautiously. Deleted messages cannot be recovered.
- Unset Status
This is the inverse of Mark As, above. Instead of marking the selected message as important, read, etc., this action will clear the specified flag.
- Encrypt
Will encrypt the selected message(s) with the specified public key. You may choose from any public / private key pairs saved on your key ring.
- Decrypt
Will decrypt the selected message(s). Use this action with caution. KMail will decrypt messages automatically when you open them for viewing, so you probably don't really need to use this action.
As of yet KMail does not highlight or mark mails that
have an extra Priority:
header.
If you want to flag all “urgent” messages as being
important, you can use a filter:
Procedure 3.1. Tagging urgent messages as important
Open up the → dialog and click the
New icon below the Available Filters list.
In the Filter Criteria area, select Anywhere in Headers and contains from the drop down boxes and type
Priority
in the text field. Select the same criterion in the next line and typeurgent
in the text field of the second drop down box.So your filter will match all messages containing a “Priority: urgent” header field.
Skip down to the Filter Actions area. Select Mark As from the first drop down box. A new drop down box containing a list of marker flags is shown to the right. Select Important from the drop down box.
Since you want this filter to not prevent other filters' message rules from being applied, carefully uncheck the If this filter matches, stop processing here option on the “Advanced” tab.
Click on , and you are done.
Just remember to move the “Priority: urgent” filter entry to the top of the Available Filters list each time you add a new filter, so that your flow-through filter is always applied first.
If you are subscribed to the (general) KDE List, you could create a
folder for the list (let's call it
KDE-General
) and use a filter to
automatically transfer new messages from your inbox to your
KDE-General
folder if they came from the
KDE List. Here is how to create this filter:
Procedure 3.2. Filtering a mailing list
Check if → → can identify the mailing list (the name of the list should then appear in the menu item); in this case, this works and you are presented with a filter that has “List-Id contains <kde.kde.org>” preset. Then select the desired destination folder from the folder pull-down menu in the Filter Action group and that is it.
If that does not work, think of a unique way of identifying the messages you want to filter. The (almost) unique property of KDE List messages is that they always contain “kde@kde.org” in the To: or CC: field. It is not quite perfect, because this fails for cross-posted messages.
Select → .
Press the button to create an empty filter. It will appear as <unknown>.
In the Filter Criteria area, select All Recipients from the first drop down box, contains from the second drop down box, and type
kde@kde.org
in the text field.Skip down to the Filter Actions section. Select Move Into Folder from the first drop down box. Click on the folder icon and a window containing a list of folders will appear. Select the folder that you want the filtered messages to be transferred to. For this example, you would select KDE-General.
You may find that you need to use more powerful criteria to
properly filter your messages; for example, you may only want to
filter the KDE List messages that are written by your friend Fred
Johnson <fj@anywhere.com>
. This is where the rest of the
matching criteria section comes into play:
Procedure 3.3. Extending the filter
Open up the Configure Filters... window and select the filter you just created.
Since you want to filter all messages that have
kde@kde.org
in the To: or CC: field and that are from Fred, check the radio button.Now, go to the second search rule and select the following from the pull-down menus: From, contains. Now, type
fj@anywhere.com
in the text field.
You now have a filter that identifies all KDE List messages
that are from fj@anywhere.com
.
It is important to realize that the order of the filters has an impact on the speed of the filtering process. Here are some ideas which can help you to improve filter performance.
- Stop filter processing as soon as possible:
If you know that a filter finally processes a certain class of messages, please make sure to check the option If this filter matches, stop processing here for the filter. This will avoid the evaluation of the filter rules of all subsequent filters. (See the advanced options in the Filter Dialog).
An example is filtering messages from mailing lists via List-Id header into separate folders. Having found out that a message came from list A means that you can avoid checking the next filter for messages from list B.
- Consider the costs of the evaluation of filter rules:
The time required to evaluate a filter rule depends on the way the rule is constructed. In particular, scanning for a substring using the contains operation is faster than a pattern matching using the matches regular expr. operation.
Another dependency is on the amount of data which is used for the evaluation of a filter rule. If the rule is based on a message header, its evaluation should normally be much faster than the evaluation of a rule based on the complete message.
Try to keep the filter rules as simple as possible.
- Check the order of your filters:
The various filter actions have different degrees of complexity. The most expensive filter actions are Pipe Through and Execute Command, because both need external programs to be run. Placing filters containing these filter actions behind other filters that can reduce the number of times these complex actions are required is useful, if the filter logic allows this.
An example is filtering messages from a mailing list and detecting spam messages. For the spam detection you will usually use an external tool via a Pipe Through action. Filtering the messages for the mailing list is done via the List-Id header. If you do not want to check the messages from the mailing list for spam too, it is better to use the filter for the mailing list messages before the filter for the spam detection. This way you avoid the expensive and slow spam check for all messages which were identified as mailing list messages.
If you want to verify that your filters work as intended, you can open a viewer for the filter log via → .
In the viewer you can configure logging of the filter process. You can control the level of detail recorded, clear the log, limit the size of the log, and save the log as a file. The log can provide valuable information when you want to improve your filter rules.

This section describes various backup solutions within KMail.
- →
This feature is also available through the context menu launched with a . This will open a dialog that allows you to create a single archive of the currently selected folder.
mouse button, then selectThe Folder: shows the currently selected folder, if you wish to change the folder to be archived click the folder icon. The Format: drop down menu allows you to choose a format (choices are: zip, tar, tar.bz2, and tar.gz). If you would like to change the default name or location, click the folder button to the right of Archive File.
Check the Delete folder and subfolders after completion button if you would like everything you archived deleted from the KMail database after the external archive has been saved. By default all subfolders will be archived. Uncheck Archive all subfolders if you only want to archive the parent folder.
- →
This is a powerful tool that can be used to assist in backing up your email. Please see Automatic Archiving for details.
- →
This feature exports settings and local mail to a compressed file. Please see pim data exporter for details.

This section describes restoring backups and importing data into KMail.
- →
If you used PIM Data Exporter to backup local email and / or settings, please use it again to restore data into KMail. See PIM Data Exporter for details.
KMail has an import wizard to make the transition from another email application easier.
Please read the Import Wizard documentation for details.

Multiple accounts are used to check for messages from more than one email address and/or mail server. Select → and click on the Accounts page to add or change your account settings. See the Getting started section for more information on the settings in the Accounts page.
To check for messages from a particular account, use the
→ submenu to select the account to check
for mail. You can also press and hold the mouse button on the Check
Mail icon (on the toolbar) for a few seconds to get a list of accounts.

This is a short introduction on how to set up KMail's GnuPG (GNU Privacy Guard) support; it gives some hints on the use of GnuPG too. It is written for people who are beginners in this area; if you are familiar with the use of GnuPG, you can skip most of the steps.
Please also check out the FAQ item about GnuPG.
Warning
Attachments will not be signed/encrypted if you are using inline OpenPGP. To sign/encrypt attachments, you have to install GnuPG and some necessary libraries. Then, you can decide for each attachment whether it should be signed/encrypted or not.
To set up and use GnuPG support in KMail it is necessary to have GnuPG installed and configured properly. Of course, we cannot give you a full introduction to GnuPG here. We will only mention the steps you must perform to get GnuPG going. For details you should look at The GNU Privacy Handbook.
It is certainly a good idea to study the GnuPG documentation as well as an introduction to public key cryptography. That way you can learn a lot about the basic concepts, which will help you understand what is going on. Also, many security related issues you should know about are discussed there.
KMail expects that your GnuPG binary is called gpg. If this is not the case for you, just make a symlink.
If you have not yet done so, you must generate a key pair (secret and public
keys) for your identity. You may do this using KGpg or Kleopatra or at the command line:
gpg
. Or you
can ask KMail to create a new key pair when you create
a new email account. The identity (normally your name followed by your email address
within brackets, such as --gen-key
John Doe
<john@example.com>
) and your passphrase are important for the
co-operation between KMail and GnuPG.
Select the Composing tab on the Security settings page. There you will find the following options:
- When encrypting emails, always also encrypt to the certificate of my own identity
If this option is off and you want to send an encrypted message to somebody, then you cannot read this message any longer after you have composed and encrypted it. Turn this option on to keep the encrypted messages you send readable for you, too.
- Store sent messages encrypted
When this box is checked, sent messages are stored encrypted, as they were sent. This is not recommended, as you will not be able to read the messages any longer if a necessary certificate expires. (Notice that GPG keys do not expire, as a general rule; this caution is primarily relevant for x.509 certificate users.)
- Always show the encryption keys for approval
This will always open a dialog that lets you choose the keys used for each recipient when you are sending an encrypted message. If this option is off, KMail will show the dialog only when it cannot find a key for a recipient or when there are conflicting or unset encryption preferences.
- When saving as draft, always sign/encrypt as indicated
If this option is on, KMail will automatically encrypt (and / or sign) messages that you save in the drafts folder (when you specify signing / encryption).
- Show sign/encrypt indicator in editor
If this option is on, KMail will display an indicator in the composition window to inform you that this message will be signed / encrypted whenever that is the case.
Now that you have set up the encryption tool, you must tell KMail which OpenPGP key you want to use for signing and encrypting messages. To do this go to the Identities configuration and set the key that should be used via the Cryptography tab in the identity configuration dialog.
Now you can sign outgoing messages. To let people send you encrypted messages, and to let them verify your signature, you must send them your public key, or upload your public key to a public GnuPG key server (so people can fetch your key from the server). To send encrypted messages to other people, or to verify their signed messages, you will need their public keys. You can search for public keys on a public GnuPG key server. Or you can ask your friends to send you one or more of their public keys.
Compose your message as usual in the composer window. Before you send the message, check the icon on the toolbar of the composer window, or select → . Then, you can send the message. The identity you are using to write the current message needs to be connected to an OpenPGP Key in the Identity section of the Configure dialog. To sign the message, KMail needs to know your GnuPG passphrase. You may be asked to supply it, or, if you have previously given the phrase to KMail, the message will be signed automatically.
To send an encrypted message to somebody whose public key is on your gpg key ring, simply create the message in the composer window. Before you send the message, check the button in the toolbar of the composer window (or select → ). Then send the message.
If you checked the button and KMail cannot find a matching key for a recipient, it will allow you to modify your key ring before trying again. If KMail finds more than one trusted key for a recipient, it will display a list containing all matching keys for this recipient. In either case you can select the key(s) which should be used for encrypting this message for the recipient in question.
If you are using a key for the first time, if there are conflicting Encryption Preferences, or if Always show the encryption keys for approval is selected in the Security section of KMail's configuration dialog, the Encryption Key Approval dialog will appear. You can select different keys for the recipients and can set the Encryption Preference for each recipient. The option, Encrypt whenever encryption is possible (on the Cryptography tab of the → dialog), will automatically encrypt your message if there is a trusted key for each recipient.
As mentioned above, you will not be able to read your own encrypted sent messages if you do not check When encrypting emails, always also encrypt to the certificate of my own identity in the settings' Security page.
Prepare a message to the person to whom you want to send your public key. Then choose, in the composer window's menu, → . This will attach your public key – the one you are currently using – to the message.
Remember that it is not perfectly safe to just sign the message to ensure that the receiver gets the correct key. There can (possibly) be a "man-in-the-middle" attack: somebody could intercept your message, change the attached key, and then sign the message with that other key. The recipient should verify the attached key by checking the key's fingerprint against the one he received in a secure way from you. Alternatively, just ask him to use the key he received to compose and send an encrypted message back to you. If your secret key decrypts that message, he has a copy of your public key. See the GnuPG documentation for further details.
All you have to do is to select the message in KMail. You may be prompted for your passphrase. Then, KMail will decrypt the message and show you the plain text if the message was encrypted with your public key. If not, you will not be able to read it. By default, KMail stores messages encrypted, so nobody can read these messages without knowing your passphrase, or, at a minimum, your login password.
You can receive a public key as an attachment, or via http, ftp, or a floppy.
Before you use this key to encrypt a message to the owner of the
key, you should verify the key (check its fingerprint or look for
trusted signatures); then, you can add this key to your public keyring
by typing gpg
at the command line.
If the key is not certified with another signature that you have already trusted,
you cannot use it to encrypt messages unless you sign (certify) the key with your own key.
--import
filename

KMail does not have a built-in spam detection solution: the developers believe using external, but specialized, tools is the better approach. KMail uses these tools through its flexible filter architecture. The Anti-Spam Wizard helps you with the initial filter setup.
- What can the wizard do to help you?
It will give you some choices about how you want the spam filtering to be set up. Afterwards it will automatically create the appropriate filter rules.
- What are the limitations of the wizard?
All it can do is set up the filters for you; it will provide a standard setup. Manual modifications that have been applied to existing anti-spam filters are not recognized. Instead, such filters are overwritten by the wizard.
You can activate the wizard via → . If this choice is not available, click → → and check the box next to Antispam. You will be prompted to restart KMail; when you do, the wizard will appear on the Tools menu.
The wizard scans for known anti-spam tools on your computer. It is also possible to use the results of spam checks made by your service provider, by evaluating header information which has been added to the messages. You can let the wizard prepare KMail to use one or more of these in parallel. However, note that anti-spam tool operations are unusually time consuming. KMail can appear to be frozen during the scan of messages for spam, so you may encounter problems with the responsiveness of KMail. Please consider deleting the filter rules created by the wizard if the filtering becomes too slow for you. (This has been a problem with older hardware. It probably won't afflict more modern machines.)
Here are some observations about a few anti-spam tools.
- Bogofilter
Bogofilter is a Bayesian filter. Its spam detection ability relies on an initial training phase. On the other hand, it's a pretty fast tool. That's why it is recommended for people who want fast spam detection, and who aren't worried about putting some effort into the initial training, before the detection rate increases significantly.
- SpamAssassin
SpamAssassin is a fairly complex tool to use against spam. Although its behavior depends heavily on its configuration, it can detect spam quite well without any training. However, scanning a message takes a little longer compared to pure Bayesian filters. Let's say it's not the tool of choice for people without some background information about SpamAssassin's capabilities.
- Annoyance Filter
Perhaps not so often used until more distributions pick it up. It's clearly a tool for specialists.
- GMX Spam Filter
If you get your mail via the GMX freemail provider, your messages have already been scanned for spam. The result of that process is documented in a special header field in each message. It's possible to use the content of this header field to filter out spam. There is very little slowdown in the filtering when this tool is used, as the messages have already been processed by the external email server.
KMail can use several external tools to detect spam messages; it will try to automatically find out which tools are installed on your system, and will display all of these in a list. The list is ordered by the average speed of the filtering process of the tools. You can mark the tools which you want KMail to utilize to detect spam. If you want more choices, you can simply close the wizard, install a new tool, then restart the wizard.
If you have marked at least one tool, KMail is able to provide filters which allow the classification of the messages as spam or not spam. It will also provide actions to let you manually classify messages. These actions will be available in the → menu item, and also via a pair of icons on the toolbar. If any of the tools you selected support Bayesian filtering (i.e. a method to detect spam based on statistical analysis of the messages) then these messages are not only marked but additionally piped through the tools to help them learn, thereby improving their detection rate.
On the second page, you will be able to select some additional actions to be performed in KMail with regard to spam messages: if you want messages detected as spam to be moved into a certain folder, select the appropriate folder and mark the Move known spam to: option; if messages detected as spam should additionally be marked as read, then mark the Mark detected spam messages as read option.
Selecting at least one of the available tools will allow the wizard to finish the filter setup. The wizard will not take any modifications in existing filters, formerly created by it, into consideration, but will either append new filters or replace existing filters. In any case you may want to inspect the result of this process in the Filter Dialog. The wizard will also create toolbar buttons for marking messages as spam or as ham. Keep in mind that classifying messages as spam will also move those messages to the folder you have specified for spam messages, when you select the “spam” option.
The wizard uses information stored in a special configuration file named
kmail.antispamrc
(stored in the global or local KDE
config directory). It will first check the global config file and then the local
config file. If the local config file contains an entry with a higher (newer)
version number, the configuration data from the local file (for that
tool) is used, so both administrators and users can update the
wizard's configuration.
The local detection of spam messages is achieved by creating pipe through actions per-tool within a special filter. Another filter contains rules to check for detected spam messages and actions to mark them and (optionally, depending on the choice in the wizard) to move them into a folder. Both filters are configured to be applied to incoming messages and for manual filtering.
Two filters are needed for the classification of ham and spam. They contain actions to mark the messages appropriately. As mentioned above, the filter for classification as spam can have another supplementary action to move the messages into a predefined folder. If the selected tools support Bayesian filtering, the wizard will create additional filter actions to pass the messages to the tools (via Execute Command actions) in the appropriate learning mode.
If you want to fine-tune the filtering process, you might be interested in the chapter about Filter Optimization.

KMail does not have a built-in virus detection solution: the developers believe using external, but specialized, tools is the better approach. KMail uses these tools through its flexible filter architecture. The Anti-Virus Wizard helps you with the initial filter setup.
- What can the wizard do to help you?
It will give you some choices about how you want virus filtering to be set up. Afterwards it will automatically create the appropriate filter rules.
- What are the limitations of the wizard?
All it can do is set up the filters for you; it will provide a standard setup. Manual modifications that have been applied to existing anti-virus filters are not recognized. Instead, such filters are overwritten by the wizard.
You can activate the wizard via → . If this choice is not available, click → → and check the box next to Antivirus. You will be prompted to restart KMail; when you do, the wizard will appear on the Tools menu.
The Anti-Virus Wizard basically works the same way as the Anti-Spam Wizard does. KMail can use several external tools to detect messages containing viruses. It will determine which of these tools are installed on your system, and will show you the results from the search. You can mark the tools which you want KMail to use for virus detection. If you want more choices, you can simply close the wizard, install a new tool, then restart the wizard.
If you have chosen at least one tool you will be able to select actions for KMail to perform on messages containing viruses. To let KMail detect messages containing viruses, you should mark the Check messages using the anti-virus tools option. If you want messages infected by a virus to be moved into a certain folder, select the appropriate folder and mark the Move detected viral messages to the selected folder option. If such messages should also be marked as read, select the Additionally, mark detected viral messages as read option.
Selecting at least one of these options will allow the wizard to finish the filter setup. The wizard will not take any existing filter rules into account, but will append new rules. In any case you may want to inspect the result of this process in the Filter Dialog.
The wizard uses information stored in a special configuration file named
kmail.antivirusrc
(stored in the global or local KDE
config directory). If the local config file contains an entry with a higher (newer)
version number, the configuration data from the local file (for that
tool) is used, so both administrators and users can update the
wizard's configuration.
The detection of messages containing viruses is achieved by creating pipe through actions per-tool within a special filter. Another filter contains rules to check for infected messages, and actions to mark them and (optionally, depending on the choice in the wizard) to move them into a folder. Both filters are configured to be applied to incoming messages and for manual filtering.


The Configure KMail Dialog
KMail's configuration window lets you configure KMail. You can reach it via →
The dialog has several buttons across the bottom.
This will open The KMail Handbook (this manual) at the appropriate page.
This resets all the changes you have made since you last saved the settings.
This will reset the configuration options on the current page to the default values.
This saves the settings and closes the configuration dialog.
This saves the settings without closing the configuration dialog.
This closes the configuration dialog without saving the changes you have made.
The configuration dialog is divided into six subsets, each of them represented by one of the icons in the list on the left. These subsets are described in detail below.

The Accounts page is automatically presented when → is selected. There are four tabs: Identities, Receiving, Sending, and LDAP server. (The Identities tab is illustrated in the Configure KMail section above.)
You can find a quick introduction to the Identities tab in the Getting Started section.
This page allows you to create one or more Identities, i.e., combinations of a name, an email address, and some other settings. For example, you can create one identity for business communication and another for personal use. If you have more than one email address, you can create one identity for each address. You will then be able to select a suitable identity whenever you compose a new message.
This dialog consists of a list of identities, plus buttons to manage them. After initial setup, the list will always show at least one identity, which is then the Default identity. To add a new identity to the identity list, click on the button.

The New Identity Dialog
Enter a name for the new identity in the New Identity edit field. This name will be shown in the identity list.
You can choose how the new identity is initialized by checking one of three radio buttons.
- With empty fields
All fields of the new identity will be cleared, or preset with standard values.
- Use System Settings values
Uses the values from your default identity.
- Duplicate existing identity
Copies all fields from an existing identity. You may choose which identity to copy from by selecting the corresponding entry in the Existing identities drop down box.

Identity General
The General tab allows you to specify some basic settings for the currently selected identity.
- Your name
Enter your full name here (sometimes also called display name). Although this field is not mandatory, you should enter your name here.
- Organization
Enter your organization here. This field is optional.
- Email address
Enter your email address here, i.e., something like
joe@example.com
.Example 4.1. Email address
So if your address is
Joe User <joe@example.com>
, you should enterJoe User
into the Your name field andjoe@example.com
into the Email address field.- Email aliases
This field contains alias addresses that also belong to this identity (as opposed to representing a different identity). You may define multiple aliases. To add another alias. enter an email address in the Email aliases: field, then click the button
Example 4.2. Email aliases
Primary address: first.last@example.org
Aliases: first@example.org and last@example.org

Identity Cryptography
The Cryptography tab allows you to specify the OpenPGP and/or S/MIME keys associated with this identity, and to choose the preferred (cryptographic) message format to use.
- OpenPGP signing key:
Here you may select an OpenPGP key for signing messages written with this identity in effect. For brevity, only the short key id of selected keys is shown. Hovering over the item will display more information in a tooltip. To select an existing key, use the drop down list. If you wish to create a new public / private key pair, select Generate a new key pair.
- OpenPGP encryption key:
Here you may select an OpenPGP key for encrypting messages when this identity and When encrypting emails, always also encrypt to the certificate of my own identity are in effect. This key is also used for the → function.
- S/MIME signing certificate:
Here you may select an x.509 certificate used to sign messages written with this identity in effect. KMail cannot generate x.509 certificates. They are issued by certificate authorities. If you have added such a certificate to your key ring, KMail can import and use it.
- S/MIME encryption certificate:
Here you may select an x.509 certificate for encrypting messages when this identity and When encrypting emails, always also encrypt to the certificate of my own identity are in effect.
- Preferred format:
Here you can choose the default cryptographic message format to use with this identity. You may either select one of the four formats supported by KMail, or leave the option at the recommended default setting of Any; this will choose the right format for each recipient you specify, and may create multiple copies of the message, some signed and/or encrypted with an x.509 certificate, and the others signed and/or encrypted with an OpenPGP key.
- Automatically sign messages:
Checking this box causes KMail to affix your digital signature to messages composed by this identity unless this option is manually overridden in the Composer window.
- Automatically encrypt messages:
Checking this box causes KMail to encrypt messages composed by this identity whenever such encryption is possible (unless overridden in the Composer window).

Identity Advanced
The Advanced tab allows you to specify some infrequently used settings for the identity you're currently editing.
- Reply-To address:
Enter the address to which replies to your messages should be sent. You need this field only if it is different from your normal address (specified using the Name and Email Address fields on the General tab), since replies default to the sender's address anyway.
This field is useful if you want replies to your mail to go somewhere else than your regular email address, e.g., if you are using this identity to send messages from an email address that cannot receive replies.
Note
Some mailing lists overwrite this header field with their post address (to ensure that replies go to the list instead of to individuals). So the reliability of this field is limited, and it should be used with caution.
- CC addresses:
Optionally enter one or more addresses, separated by commas, to which carbon copies of your messages should be sent. When you compose a message with this identity, the CC field will be filled with these addresses.
- BCC addresses:
Optionally enter addresses, separated by commas, to which blind copies of your messages should be sent. When you compose a message with this identity, the BCC field will be filled with these addresses. If you want to send a BCC to the same address for every identity you define, see the Headers tab of the Composer subset (create a custom BCC header).
- Dictionary:
Select the default dictionary for the current identity.
- Sent-mail folder:
Select the folder in which messages should be saved after sending them from this identity. IMAP users should consider changing this to an IMAP folder, so their sent-mail is stored on a server instead of being stored in a local folder. Then they can access sent messages from a different location.
Tip
You can exercise more fine-grained control over where to file sent messages by creating a corresponding message filter that is applied to outgoing messages.
- Drafts folder:
Select the folder in which drafts should be saved when using this identity. IMAP users should consider changing this to an IMAP folder, so their drafts are stored on a server instead of being stored in a local folder. That way they can easily continue to work on their drafts from a different location.
- Templates folder:
Select the folder in which templates should be saved when using this identity. Please see Compose from templates for more information about templates.
- Outgoing Account:
Specify an alternative SMTP / sendmail® / Microsoft® Exchange server to be used when sending messages from this identity.
Note
You need to configure outgoing mail servers first, before you can choose them from the list. You can do this on the Sending tab of the Accounts page.
- Attach my vCard to message
Choose this option if you want to attach a vCard file to each message sent from this identity. A short dialog will ensue.
- With empty fields
This option opens a dialog just like the KAddressBook Adding Contact Data dialog. Enter your name, email address, etc., then click OK to create a new vCard.
- From existing vCard
This option opens a browse directories dialog which allows you to to select a .vcf file. (Hint: Use KAddressBook to export a vCard file that can be used here.)
- Duplicate existing vCard
This option opens a drop down list of all the other identities already defined, so you may select the vCard associated with one of them.
- Autocorrection language:
Use the drop down list to select the language associated with the optional autocorrection tool when using this identity.
- Default domain:
This field is filled with the value from the
hostnames
file (in /etc) by default. The Composer will append this domain name to any purely local email address you specify. This feature is primarily useful in a sendmail® environment.Example 4.3. Default domain
Default domain set to
kde.org
; "To:" address set tofoo
.Composer sends the message to foo@kde.org.

Identity Templates
Here you may create and manage custom templates for this identity to use when composing new messages, replying to someone, or forwarding messages inline. The message templates support substitution commands. You may simply type them in, or select them from the menu. Three kinds of commands are provided.
- Original Message > / Current Message >
These commands extract information from the message you're replying to, or forwarding, and insert that information into the composition window.
- Process with External Programs >
These commands will pipe the message to which you are responding through an external program, then insert the output into KMail's composition window.
- Miscellaneous >
These commands perform functions like choosing the dictionary the spell checker should use, or inserting the contents of a text file into the composition window.
The Quote indicator: field allows you to override the default quotation indicator character ">". The button will reset all the custom templates defined here to KMail's defaults. (You can achieve the same end result by unselecting the Use custom message templates for this identity check box at the top left of this dialog box.)
Templates specified here are identity-specific. They override global templates, but can be overridden by folder-specific templates if those are specified.

Identity Signature
This tab allows you to specify a signature (sometimes called “footer” or “disclaimer”) to be appended to each message sent from this identity.
Note
This type of signature has nothing to do with the (digital) signatures discussed in the Cryptography section. It is a bit confusing to call this a signature, but since the term is already used everywhere else, we keep this nomenclature. Just remember that these "signatures" and digital signatures are two completely different things.
Check the Enable signature option if you want KMail to append a signature when using this identity. To automatically append it to every new message you must also select Automatically insert signature option on the Composer configuration page.
KMail can obtain the signature text from various sources. The default is Input Field Below. Just enter your signature in the textbox. If you want to use rich text, select the Use HTML checkbox at the lower left. A formatting toolbar will then appear.
The traditional procedure in Unix is to read the text from a file called .signature
in your home folder.
This file may be shared among several programs, so the same signature appears in every email program you use.
To do this, select File from the Obtain Signature text from: drop down menu.
If you want to edit the file, click the Edit File button.
KMail can also read the signature text from the output of a command. You can use programs such as fortune to create a randomly selected signature for each new message. Everything the program prints onto stdout is caught and used as the signature text. To read the text from the output of a command, select the Output of Command option. Enter the command (with full path) in the Specify command: edit field.
Note
On the Internet, signatures are by convention separated from the body of the message by a line containing only the three characters “-- ” (dash, dash, space). If the Prepend separator to signature option has been set in the Composer configuration, KMail will automatically prepend this line to the signature text (unless it is already present).

Identity Picture
KMail can send a small (48x48 pixels), low-quality, monochrome picture with every message. For example, this could be a picture of you, or a glyph. It is shown in the recipient's mail client (if supported).
- Send picture with every message
Check this box if you want KMail to add a so-called X-Face header to messages written with this identity. An X-Face is a small (48x48 pixels) black and white image that some mail clients are able to display.
- Obtain picture from:
This drop down list gives you two ways to select an image.
- External Source
(the default)
Use this button to select an image file from which to create the picture. Use a high-contrast image that is square, or nearly square. A light background helps improve the result.
You may use this button to create a scaled-down version of the picture you have set in your own address book entry.
- Input Field Below
Use this option to enter an arbitrary X-Face string. Examples are available at https://ace.home.xs4all.nl/X-Faces/

You can find a quick introduction to both sending and receiving accounts in the Setting up your Account section.
This page allows you to create one or more (incoming and outgoing) accounts, i.e., combinations of mail servers, login information, and other settings. Typically, you will create one outgoing (used for sending messages) and one incoming (used to retrieve messages) account. You may create as many accounts as you want, though, and assign each one to a different identity. Or you may set up just one identity, and decide which account to use each time you compose a message. This page also lets you set up one or more LDAP (Lightweight Directory Access Protocol) servers.

The Receiving Account Tab
For basic information, see Setting up your Account: Receiving.
The column of buttons on the right let you a new account, and or Remove an existing account. You ought not modify or remove the Local Folders entry, which is present by default. The Restart button will simulate a program restart.
The button opens a dialog that lets you move any IMAP accounts you have created, and the group of accounts associated with Local Folders, higher or lower in the list.
The Retrieval Options popup menu for each account lets you specify whether KMail should check for new mail immediately after it has been started. You may also select Include in Manual Mail Check and Switch offline on KMail Shutdown.
If Detailed new mail notification is enabled then KMail will show the number of new messages for each folder provided you have chosen to be notified with a dialog. More advanced notification options, like playing a sound or synthesizing speech, are available via the button.

The Sending Account Tab
The Sending tab lets you define new outgoing mail servers, and also set some options that affect all the messages you send.
For basic information, see Setting up your Account: Sending.
When you click or the Create Outgoing Account or Configure account dialogs will open respectively. For sending via sendmail® or similar programs you may specify a name and the location of the sendmail® program. For SMTP you must specify the Name, Outgoing mail server, and Port of the server. Server requires authentication will enable the Login and Password fields. If you are not sure about the security settings, you should make KMail test for the best settings by using on the Advanced tab.
Confirm before send will pop up a confirmation box every time you send a message. Check spelling before sending will invoke the spell checker before a message is sent.
Send messages in outbox folder lets you specify when queued messages, i.e., messages in the outbox folder waiting to be sent, should be dispatched. You may choose among three options.
- Never Automatically
Queued messages will only be sent if you select → .
- On Manual Mail Checks
Queued messages will be sent after you have manually checked for new mail, e.g. with → . Of course, you may also send the queued messages manually via → .
- On All Mail Checks
Queued messages will be sent after every check for new mail, i.e., after automatic mail checks, and also after manual mail checks. Of course, you may also send the queued messages manually via → .
Default send method: lets you define what happens when a message is sent. If Send now is selected, the message is sent to the mail server immediately. If Send later is selected, the message is queued in the outbox to be sent later with the → command, or automatically when you check your mail, depending on the setting chosen for Send messages in outbox folder, above.
The Enable Undo Send: checkbox lets you specify an interval of time (from 10 to 50 seconds) during which you may abort mail transport. Your message will be queued, and a small button will appear in the notification area. Click the button (in time) to stop the message from being sent.

The LDAP Servers Tab
Use this dialog to configure any LDAP servers you wish to access. Please consult the KAddressBook Appendix for more details.

The Appearance page lets you adjust many aspects of KMail's graphical user interface, including color schemes, font selection, and even the physical arrangement of the message list in the main window.

The Appearance (General) Tab
If the Close message window after replying or forwarding option is activated, KMail will close the separate message window when a composer window (for a reply, or to forward the message) is opened. Enable access key is selected by default. Access keys allow you to use the keyboard for functions normally done with the mouse, such as following links. For more information see Access keys.
Enable Reduce font size for quoted text to show quoted text (in a reply) with a smaller type face. Show expand/collapse quote marks displays little widgets along with each bit of quoted text. These allow you to show (+) or hide (-) nested quotes beyond a certain level. This is useful in protracted email conversations where nobody deletes what has gone before.
Changing Override character encoding: from its default value Auto will force the use of the specified encoding for all messages, no matter what the MIME headers say. Minimum font size: lets you control the smallest font KMail will use. Set this higher if you have trouble reading really small fonts.
System Tray provides three ways to control KMail's interaction
with the KDE task bar / panel. If Enable system tray icon is
selected, a small icon () will be displayed in the system tray
area. If Start minimized to tray is activated, only this icon will
appear when KMail is launched. Selecting Show unread email in taskbar
causes the number of currently unread messages to appear on KMail's taskbar button.
When the icon is visible, you may hide KMail's main window either by clicking on the icon or by clicking on the window's close button. Clicking on the icon will make KMail's main window visible again. If you click on the icon with the mouse button, a context menu will appear. You can check for new mail, create a new message, or quit KMail. If there are any unread messages, the entry New Messages In > will appear, along with a list of the folders containing unread messages. Select one of these folders, and it will be opened in KMail's main window.

The Appearance (Fonts) Tab
This section lets you tailor the fonts KMail uses. Select Use custom fonts to activate the dialog. Apply to: Message Body sets the font for the reader pane. The Composer option sets the font in which new plain text messages are shown while they are being written. Message List changes the font used to display the message list. You can also choose special fonts for Unread, Important, and Action Item message list entries. Printing Output alters the font used when printing. Fixed Width Font affects the display of some HTML messages.
Show only monospaced fonts restricts the number of fonts available. Only the names of fixed-width fonts will be displayed when this option is in effect.

The Appearance (Colors) Tab
This section allows you to change the color of a few things by double clicking on an entry in the list box. Select Use custom colors to activate this feature. Select Do not change color from original HTML mail to preserve the color scheme selected by the sender of any HTML message.
Recycle colors on deep quoting will restart the quote coloring at the first level after the third level of quoting has been reached. Note that the Quoted text colors only work in the message reader, not in the composer. If you want folders which are getting close to their quota (space allotment, used on IMAP servers) to be displayed in a different color, you may specify a percentage value as a threshold.

The Appearance (Layout) Tab
This tab lets you configure the layout of KMail's main window.
In the Folder List section you may choose between the Long folder list (default option), which uses the full height of the window, and the Short folder list. With the Short option, if you have selected Show the message preview pane below the message list, the message list and the folder list will occupy a horizontal strip, with the message preview pane using the entire bottom portion of the window. If you have selected Show the message preview pane next to the message list, the folder list and the message list will occupy a vertical strip, with the message preview pane on the right.
Select Show folder quick search field to create a small text box at the top of the folder list. When you type something in that box, only the folders whose names match the characters you entered will appear. Clear the box to display all your folders.
The Show Favorite Folders View section allows you to change how your favorite folders are displayed. As Icons uses a lot of space, so if you have several favorite folders you might try As List. If you do not care about favorite folders you can disable this feature altogether by selecting Never.
On by default, Folder Tooltips display additional information (total number of messages, unread messages, and storage size) when hovering over a folder with the mouse pointer. Select Never to disable this feature.
In the Message Preview Pane section you can choose where in relation to the message list you want the message preview pane to appear. Or you can remove it entirely, and use only the full screen reader to view selected messages (press Enter).

The Appearance (Message List) Tab
Use this dialog to alter the appearance of the Message List pane.
If you select Display tooltips for messages and group headers, you will see a brief summary of each message (or group -- depends on the view mode) when the mouse cursor hovers over a message list item.
Default Aggregation and Default Theme may be overridden using the Folder Properties dialog for each folder individually. Clicking the button opens a window to customize the pre-configured aggregations / themes; you can create your own schemes that way.
Eight aggregation modes and three themes have been pre-configured.
- Default aggregation: (drop down list)
- Activity by Date, Flat
This view uses day-by-day groups. Messages are not threaded. So for example, in “Today” you will simply find all the messages that arrived today. The groups are displayed by default in reverse chronological order, and labeled "Today", "Yesterday", then the preceding five days of the week, followed by mm/dd/yy.
- Activity by Date, Threaded
This view uses day-by-day groups. Messages are threaded. So for example, in “Today” you will find all the messages that arrived today and all the threads that have been active today. Uses the same grouping as Activity by Date, Flat.
- Current Activity, Flat
This view uses smart date range groups. Messages are not threaded. So for example, in “Today” you will simply find all the messages that arrived today. The groups are displayed by default in reverse chronological order: "Today", "Yesterday", the five preceding days of the week, "Last Week", "Two Weeks Ago", and then month by month.
- Current Activity, Threaded
This view uses smart date range groups. Messages are threaded. So for example, in “Today” you will find all the messages that arrived today and all the threads that have been active today. Otherwise the same as Current Activity, Flat.
- Flat Date View
This is a plain, old-fashioned list of messages sorted by date. No groups and no threading.
- Senders/Receivers, Flat
This view groups the messages by senders or receivers (depending on the folder type). You may specify senders (or receivers) in the → dialog ("View" tab, Show Column:). Messages are not threaded.
- Standard Mailing List
This is a plain, old-fashioned mailing list view: no groups and heavy threading, ordered by the date each thread began.
- Thread Starters
This view arranges the messages in threads and then groups the threads by the starting user.
- button
To create a custom aggregation theme, click the button. Select an existing aggregation similar to the one you want to create, then click . If none are similar, click the button. The General tab allows you to change the Name: and Description:. The Groups & Threading tab lets you configure several elements to customize your aggregation.
Grouping: lets you select from dates, sender/receiver or none. With the smart options KMail will group related emails together.
Group expand policy: lets you set whether KMail will automatically expand grouped emails, or not.
Threading: allows you to decide if KMail will include references and subject to determine perfect threading. You may also turn off threading altogether.
Thread leader: lets you change the leader of the thread: most recent message, or the first one.
Thread expand policy: allows you to change how KMail determines whether a thread should be expanded.
The Advanced tab lets you change the Fill view strategy: Choose "Favor speed" if you have a slow connection. "Interactivity" will show all of your current conversations first. "Batch" mode will not do any sorting.
- Default Theme: (drop down list)
- Classic
A simple, backward compatible, single row theme
- Smart
A smart multi-line and multi-item theme
- Smart with Clickable Status
A smart multi-line and multi-item theme with a clickable status column
- button
To create a custom message list theme, click the button. Select an existing theme similar to the one you want to create, then click . If none are similar, click the button. The General tab allows you to change the Name: and Description:.
The Appearance tab lets you configure visible columns and status items. To add a column, right click the column bar and select Add Column. Name the column, then select what the column will represent from the Header click sorts messages: drop down list. Visible by default is automatically checked. Uncheck it if you only want the column to be available on the context menu for the clickable sort bar. Drag the appropriate label from the Content Items to the column view box under the column bar, e.g., if you chose to add a size column you would drag the Size label underneath the Size column. Continue to do this until you have all the columns you desire. You can change the font and color of column items through the view area mouse button menu. Move, delete and resize columns via the mouse button menu on the column bar.
The Advanced tab lets you show headers. You may also change the size of status icons.
In the Date Display section you may choose one of three date formats (or create your own). The Standard Format shows the day of the week and the date. The Localized Format is shorter, omitting the day of the week. The Smart format will show today, yesterday, etc. If you want to create a Custom date format, just click on Custom format information and follow the directions.

The Appearance (Tags) Tab
KMail by default gives you several ways to mark messages (Important / Action Item / Birthday), accessible via the → sub-menu. You may also define additional tags to help you categorize messages.
Use the Available Tags input field to name your special tag. Use the button to add this name to the list. Use the button to remove a tag. (The "Birthday" tag is built-in, and cannot be removed.) Use the up and down arrow buttons to sort the items in the list.
Highlight an item in the list to activate the Tag Settings dialog. You may choose any or all of six options.
- Change text color:
Select this option to display tagged message list entries in a different color. A color palette will be presented when you choose this option. Select a preset color, or choose "Custom..." for more flexibility.
- Change background color:
Choose this option to alter the background color of tagged message list entries.
- Change font:
You may select either a bold or italic type face.
- Message tag icon:
Click this button to open an icon selection dialog. The icon will be displayed on tagged message list entries.
- Shortcut:
Use this button to create a keyboard shortcut for associating this tag with selected messages.
- Enable toolbar button:
Select this option to add a new button to the KMail toolbar. Clicking the button will tag the currently selected message.
All the tags defined here will automatically appear as new options in the → sub-menu.

For a description of how to use the Composer, read this page. To learn more about fine-tuning the Composer's behavior, press on.

The Composer (General) Tab
This dialog lets you adjust the way KMail handles signatures. It also permits you to control some formatting features, to adjust some autocompletion options, and to tweak KMail's autosave feature.
- Automatically insert signature
If checked, your signature as defined on the identity page is automatically included at the end of every message you create (i.e., new messages, replies, etc.).
- Insert signature above quoted text
If checked, KMail will insert your signature at the top of the composer window, and not at the bottom.
- Prepend separator to signature
If checked, KMail will insert "-- " (dash dash space) before your signature if your signature does not begin that way. (This separator line is a de facto internet standard.)
- Remove the signature when replying
If checked, KMail will remove the signature from the original message when you compose a reply. Of course, if you have not selected the signature and the Only quote selected text ... option has been checked, KMail will omit the signature without referring to this setting.
- Only quote selected text when replying
If checked, KMail will quote only the selected text in the message window, instead of the complete message, when replying. With this, it is possible to quickly generate replies that quote only the relevant paragraph(s) to which you are actually replying. If this option is checked and you select nothing, KMail will quote the entire message.
- Use smart quoting
If checked, KMail will break long lines but will try to keep the correct quoting (i.e., the “>” will always be at the start of the line).
- Word wrap at column:
If checked, the word wrap option ( → in the composer window) will be selected automatically. Use the spin box to set the maximum line length.
- Reply or forward using the same visual format as the original message (plain text or HTML)
If checked, KMail will always enable the rich text editing toolbar if the message to which you are responding contains an HTML MIME header. If this option is not selected, the composer retains the toolbar state from the previous session.
- Improve plain text version of HTML message
If checked, KMail will append footnotes to the plain text version of every message composed in HTML. These plain text footnotes will be clickable links pointing to any resources coded as anchor tags (aka links) in the HTML version of the message.
- Automatically request message disposition notifications
If checked, → will default to on. Check this option only if you know what you are doing. MDNs are considered a nuisance (or are simply ignored) by a lot of people. It is better to request them only when necessary.
- Use addresses indexed from emails for autocompletion
If checked, KMail will include the addresses from all your saved messages in the list of autocompletion targets (e.g., when you start typing in the To: input field). These will appear as "Contacts found in your data". If you switch this off, only the matching KAddressBook entries and "Recent Addresses" will appear in the list. Use the spin box to limit the number of items displayed in the list.
- Use recent addresses for autocompletion
If checked, KMail will include the addresses that have been used recently in the list of autocompletion targets (e.g., when you start typing in the CC: input field). These will appear as "Recent Addresses". If you switch this off, only the matching KAddressBook entries and "Contacts found in your data" will appear in the list. Use the spin box to limit the number of items considered "Recent".
- button
Click on this button to open the autocompletion configuration dialog. You may adjust the order in which items appear, add or remove "Recent" addresses, and create a blacklist of addresses that should never appear as autocompletion targets. Notice that this dialog may also be invoked from a context menu by clicking the
mouse button in, say, the "To:" field of the composer.- Autosave interval
A backup copy of the text in the composer window is by default created regularly. This option lets you specify how often a backup copy is created. You can disable autosaving by selecting "No autosave".

The Composer (Standard Templates) Tab
Here you can edit the default message templates used when you compose a new message, write a reply, or forward a message. Message templates support substitution commands, by simply typing them or selecting them from the menu. These are global (default) templates. They may be overridden by per-identity templates or per-folder templates if any such are specified. Most people are happy with the standard default templates. But if you wish to tweak the defaults, this is the place to do it.
For a more detailed explanation of template configuration, please refer to the Identities chapter.

The Composer (Custom Templates) Tab
Here you can add, edit, and delete custom message templates to use when you compose a reply or forward a message. Create the custom template by typing the name into the input box and press the + button. You can bind a keyboard combination to the template for faster operations.
Message templates support substitution commands, by simply typing them or selecting them from the menu.
There are four types of custom templates: used to Reply, Reply to All, Forward, and Universal which can be used for all kinds of operations. You cannot bind a keyboard shortcut to Universal templates.

The Composer (Subject) Tab
This section contains a list of prefixes for “Reply” and “Forward”. If you receive messages that use prefixes differing from the standard prefixes, you may add them to this list so KMail will recognize them. KMail will then ignore the odd-ball prefixes when sorting messages (and when setting the subject of a reply or a forwarded message), and optionally replace them with “Re:” or “Fwd:”, respectively.

The Composer (Character Set) Tab
Here you can manage the default character sets used for your own messages. Every message you send will be checked to see if it is written with one of the listed character sets, starting at the top of the list. If it is, that character set will be used. If it is not, a dialog will appear and tell you that you must choose a character set via → .
If you select Keep original charset when replying or forwarding (if possible), the original message's character set will be kept, unless there are now characters that cannot be represented using that set of characters.

The Composer (Headers) Tab
Check the Use custom message-id suffix checkbox if you want KMail to generate Message-Id's with a custom suffix. Enter the desired suffix in the Custom message-id suffix field. Please make sure that the suffix you specify is unique (within the webiverse). The simplest way to ensure uniqueness is to use the name of your own domain, if you have one. If you do not check Use custom Message-Id suffix, KMail will automatically generate the complete Message-Id. If you do not know what this is all about, do not choose this option.
The Define custom mime header fields list sets the headers that KMail will use for its outgoing messages. You may both invent new fields and overwrite existing ones. This feature is only useful for experts.

The Composer (Attachments) Tab
If you have to send attachments with filenames containing non-English characters to users of Microsoft® Outlook or Microsoft® Outlook Express, you might want to check the Outlook-compatible attachment naming option. KMail will then encode the attachment names in a non-standard way that is understood by Microsoft® Outlook.
When you select this option, KMail will create messages that do not comply with email standards, and consequently it is possible that your messages will not be understood by standards-compliant mail clients. So you should not enable this option unless you must.
Check the Enable detection of missing attachments checkbox if you want KMail to warn you whenever you are about to send a message without attachments even though the message text contains certain words which may indicate that you want to include an attachment. The list of key words can be modified.
Use the Maximum Attachment Size: spin box to limit the size of any attachments you send. If you try to attach a file larger than the specified limit, KMail will issue an error message and refuse to attach the file. Note that this is an individual limit, and not an aggregate limit. Also, the file size is checked before the file is converted to base 64 encoding, if that is necessary.

The Composer (Autocorrection) Tab
To enable automatic correction of common typing errors, select the Enable autocorrection option. Use the drop down list to choose your language. You may import settings, either from LibreOffice or another KMail / Calligra installation, via the button. If you need to save your settings for another installation or application, use the button.
Autocorrect Options
- Simple Autocorrection
This allows you to configure KMail to automatically correct various common typographical errors. Check the boxes next to the autocorrection features you want.
- Custom Quotes
You can replace double or single quotes with “smart” quotes by checking the appropriate box. You can also add a non-breaking space before specific punctuation marks in French text by selecting that option.
- Advanced Autocorrection
You can customize automatic word replacement by selecting this option. To enter a custom string that will be replaced automatically, enter the word to be replaced in the Find box and enter the replacement word in the Replace box, then click the button. To remove a custom word from the list, highlight that entry and click .
- Exceptions
This dialog lets you create exceptions where you can tell KMail to ignore some periods (end of sentence) and two uppercase letters (e.g., KMail). Enter the exception and click the button. To remove the exception, highlight the string and click .
Once you have made all of your autocorrect selections, click , or .

The Composer (Auto Resize Image) Tab
In some circumstances you may want to have KMail automatically resize image attachments in outgoing emails (e.g., because of server limits). To do so, select Automatically resize images. There are several options that accompany this feature.
- General
There are three options under "General". If you want to preserve the aspect ratio of all images, select Keep ratio. KMail by default asks you if you want to resize before resizing. If you want the program to resize images without asking, unselect Ask before resizing. KMail will by default send the resized image in JPG format. If you would rather have such images sent in PNG format, select that from the Fallback to format: drop down box.
- Image
Suppose you have a relative who can only receive image files of a certain size because of their email provider's limits. You can use the Reduce image to maximum dimension: option to select a size to shrink the image to, and enter their email into the filters on the Recipients tab. (The Recipients tab is discussed in further detail below.) If you need a custom size, choose the last option Custom from the width and height drop down boxes, and enter a number of pixels in the text box. You may also enlarge images by selecting Enlarge image to minimum dimension. The last option allows you to skip resizing images that are smaller than the specified file size.
- Filename
- Source filter
If you would like the resizing to be done based on the name of the file, select the appropriate filter here. Suppose you need to send your boss multiple images daily, and your boss requires all of them to be the same size. You could name your work images work1, work2 etc., then select Include all files whose names contains one of the patterns and enter work into the Pattern: text box. You can also exclude files in the same way by selecting Exclude all files whose names contains one of the patterns. The default behavior is no filtering.
- Image Format
Select Resize all images with one of these formats to set a specific format to resize the image to.
When this option is enabled, you must click the button, then select a format from the dialog.
- Resize filename
Select Rename resized images with the following pattern: if you would like your resized images to be renamed with a specific pattern. Enter the pattern into the text box. You may use:
%t set current time %d set current date %n original filename %e original extension %x new extension
- Recipients
This tab is where you specify recipients who need to receive resized images. You must decide if you need multiple entries or only one, and enter the email(s) into the text box using the “;” as a separator when there are multiple items. You may also specify certain recipients for whom images ought not be resized. The default is no filtering.

The Security configuration dialog lets you fine-tune certain rich text (HTML) options. It also allows you to control encryption and decryption features, to adjust some built-in anti-phishing logic, and to specify how message disposition notification requests (aka return receipts) are handled. Notice that this dialog does not have anything to do with anti-virus security measures. See the Using KMail: The Anti-Virus Wizard chapter if you want anti-virus security.

The Security (Reading) Tab
On this tab you can configure security options that affect the way you read messages.
- Prefer HTML to plain text
By default KMail will show HTML messages in plain text. If you prefer to view messages with HTML formatting and layout automatically, select this option. However, we recommend leaving this option off, as security problems with HTML might show up.
You can still easily view messages in HTML format by clicking the plain message/HTML message toggle bar on the left hand side of the preview pane.
- Allow messages to load external references from the Internet
If checked, KMail can load external images, style sheets, etc. from the Internet when you view an HTML message. We strongly recommend that you leave this option off (although it has no effect until you enable HTML).
By adding external references to their messages, people sending spam can detect when you have looked at their message, your location, and a lot of other information that may get logged on web servers. Note that this option has no effect on Java™ or JavaScript, as these are not supported in KMail at all.
- Informs if message reading is a suspected email scam
As email has become more popular, email scams have proliferated. Email scams may include emails made to appear as if they come from legitimate companies, even though they really link to malicious web sites requesting your personal information. This may lead to identity theft, and worse. By default KMail analyzes messages for common scams, and will inform you if a message is a suspected scam. We recommend that you keep this feature enabled. If you wish to disable these warnings, uncheck Informs if message reading is a suspected email scam.
If legitimate emails are being flagged, (e.g., from trusted friends), you can add their email addresses to the Whitelist: by clicking the button and entering an address into the dialog that pops up. Please note that at this time, only complete email addresses can be whitelisted.
- Check URL with Phishing Google System
Select this option to force KMail to consult Google's database of suspected phishing web sites when URLs are embedded in a message, and to warn you whenever a match is found.
- Scan emails for tracking URLs
By default, KMail will automatically check URLs embedded in HTML messages, and warn you if any of them appear to be trying to track you.
- Attempt decryption of encrypted messages when viewing
By default, KMail will automatically attempt to decrypt encrypted messages when you view them. If you prefer to do this manually, unselect this option.
- Automatically import keys and certificate
If checked, KMail automatically imports any attachments containing OpenPGP keys into your local keyring, and any attachments containing S/MIME keys into your local key box.
Note
Verifying S/MIME signatures always involves importing the contained certificates. This option does not affect that. It is also unrelated to GPG's
auto-key-retrieve
feature, where GPG will try to import unknown keys from a key server.

The Security (Message Disposition Notifications) Tab
- Message Disposition Notifications
MDNs are a generalization of what is commonly called a “read receipt”. The message author requests a disposition notification to be sent, and the receiver's email program generates a reply from which the author can learn what happened to his message. Common disposition types include “displayed” (i.e., read), “deleted”, and “dispatched” (i.e., forwarded).
The following options (listed as Send policy) are available to control when KMail sends MDNs.
- Ignore (recommended)
Ignores any request for disposition notifications. No MDNs will ever be sent automatically.
- Ask
Answers requests only after asking the user for permission. This way, you can send MDNs for selected messages while denying or ignoring them for others.
- Deny
Always sends a “denied” notification. This is only slightly better than always sending MDNs. The author will still know that the message has been acted upon; he just cannot tell whether it was deleted or read, etc.
- Always send
Always sends the requested disposition notification. This means that the author of the message gets to know when the message was acted upon and, in addition, what happened to it (displayed, deleted, etc.). This option is strongly discouraged, but since it makes sense where privacy is not a concern, e.g., in customer relationship management, it has been made available.
If you are unsure, experiment a while with Ask. Then, if you find KMail's questions annoying, switch to Ignore.
The following options (listed as Quote original message) are available to control how much of the original message KMail sends back with MDNs.
- Nothing
No parts of the message other than the mandatory message-id and the original recipient are included in the MDN reply. This preserves enough information for the sender to uniquely identify the message for which this MDN was generated.
- Full message
Attaches the complete message to the disposition notification. Usually, this is overkill. It does not add any valuable information that cannot be deduced from the message headers alone, but people sometimes insist on this, since it is much easier for humans to correlate the content of the message (and not just the headers) with what they sent earlier.
- Only headers
Attaches only the headers to the disposition notification. This is usually enough to enable both humans (by subject) and computers (by message-id) to easily correlate MDN and original message.
If unsure, leave this option set to the default value (nothing).
- Do not send MDNs in response to encrypted messages
This option suppresses the sending of MDNs if the message is encrypted (partially or in whole). This thwarts attempts to use KMail's MDN feature as an oracle to deduce whether you were able to decrypt the message or not.
Strictly speaking, this option is not needed, since KMail sends MDNs whether the message could be successfully decrypted, or not (the disposition notification request resides in the unencrypted part of the message); but it gives the security-conscious user a choice: either to send them when requested (option unchecked), or never (option checked).
If unsure, leave this option checked (the default value).

The Security (Composing) Tab
On this tab you can configure security-relevant options for composing messages.
- Automatically sign messages
If checked, the → option in the composer will default to on.
However, you can still switch it on and off on a per-message basis.
- When encrypting emails, always also encrypt to the certificate of my own identity
If checked, any message that is encrypted to the recipients will additionally be encrypted to yourself.
Warning
If you uncheck this option, you may not be able to decrypt the messages written by yourself and encrypted to other people any more.
- Store sent messages encrypted [3]
If checked, messages are stored in your sent-mail folder just as you sent them (i.e. if they were encrypted, they are also stored that way).
If unchecked, messages will always be stored unencrypted in your sent-mail folder, even if they are sent encrypted.
- Always show the encryption keys for approval
If checked, every time you encrypt a message, a dialog will appear that presents you with the encryption keys that will be used for each recipient. You may then review the choice of keys, change them, and approve or cancel the encryption operation. We recommend to keep this option checked, since it makes the encryption process more transparent.
- Automatically encrypt messages whenever possible
Also called “opportunistic encryption”. If checked, KMail will try to match recipients to (OpenPGP or S/MIME) keys even when you did not specifically request encryption. If usable keys are found for all recipients, KMail will ask whether or not you want to encrypt the message.
It is highly recommended to turn this on, as it makes encryption really easy to use.
- Never sign/encrypt when saving as draft
If checked, KMail will not attempt to sign and/or encrypt messages that are merely saved to the drafts folder. This is more convenient, and does not result in a gross loss of security, provided the drafts folder is safe. IMAP users might want this option turned off, if their drafts folder is on the server.

The Security (Miscellaneous) Tab
On this tab you can switch security-relevant warnings on and off.
- Warn when trying to send unsigned messages
If checked, KMail will show a warning if for whatever reason a message would be sent without being digitally signed.
- Warn when trying to send unencrypted messages
If checked, KMail will show a warning if for whatever reason a message would be sent without being encrypted.
Note
While it is common to sign all outgoing messages, encrypting them is not. So unless your company has a policy of never sending any unencrypted messages, it might be a good idea to keep this option switched off and rely on opportunistic encryption to alert you if you could send encrypted messages, but did not request it.
- Warn if certificates/keys expire soon
If checked, KMail will warn when an S/MIME certificate or OpenPGP key is used which will expire soon.
The period in which to warn before key/certificate expiration can then be configured separately for signing and encryption keys, as well as (in the case of S/MIME), for end-user certificates, intermediate CA certificates and root certificates.
Click on this button to open an extensive dialog which configures the interactions between KMail and GPG, the Gnu Privacy Guard program. GPG is too complex to document here. For details you should refer to The GNU Privacy Handbook. Unless you're an encryption expert, you probably ought to accept the default settings here.
- Re-Enable All "Don't Ask Again" Warnings
Apart from the main warnings described above, there are many warning and informational messages, each containing an option not to show them again. If you would like to re-enable these messages after suppressing them, you can achieve that by pressing this button. [4]

The Security (S/MIME Validation) Tab
This tab contains selected entries from GpgSM's dynamic back end configuration dialog. Please refer to the GpgSM manual for a more detailed description of these options.
- Validate certificates using CRLs
If checked, S/MIME certificates are validated using Certificate Revocation Lists (CRLs). This is the default configuration option.
- Validate certificates online (OCSP)
If this option is selected, S/MIME certificates are validated using the Online Certificates Status Protocol (OCSP).
- OCSP responder URL:
Enter the address of the server for online validation of certificates. This URL usually starts with https://.
- OCSP responder signature
Select or change and enter the S/MIME key to use.
- Ignore service URL of certificates
Check this option to skip online validation using the OCSP. This option requires dirmngr >= 0.9.0.
- Do not check certificate policies
By default, GnuPG uses the file
~/.gnupg/policies.txt
to check if a certificate policy is allowed. If this option is selected, such policies are not checked.- Never consult a CRLs
If this option is checked, Certificate Revocation Lists are never used to validate S/MIME certificates.
- Fetch missing issuer certificates
Check this option if you want the missing issuer certificates to be fetched when necessary. This applies to both validation methods, CRLs and OCSP.
- Do not perform any HTTP requests
Entirely disables the use of HTTP for S/MIME.
- Ignore HTTP CRL Distribution Point of certificates
When looking for the location of a CRL, the “to-be-tested” certificate usually contains what are known as CRL Distribution Point (DP) entries, which are URLs describing the way to access the URL. The first found DP entry is used. With this option all entries using the HTTP scheme are ignored when looking for a suitable DP.
- Use system HTTP proxy
If this option is selected, the value of the HTTP proxy shown on the right (which comes from the environment variable
http_proxy
) will be used for any HTTP request.- Use this proxy for HTTP requests
Enter the location of your HTTP Proxy here, which will be used for all HTTP requests relating to S/MIME. The syntax is “host:port”, for example, myproxy.nowhere.com:3128.
- Do not perform any LDAP requests
Entirely disables the use of LDAP for S/MIME.
- Ignore LDAP CRL Distribution Point of certificates
When looking for the location of a CRL, the “to-be-tested” certificate usually contains what are known as CRL Distribution Point (DP) entries, which are URLs describing the way to access the URL. The first found DP entry is used. With this option all entries using the LDAP scheme are ignored when looking for a suitable DP.
- Primary host for LDAP requests
Entering a LDAP server here will make all LDAP requests go to that server first. More precisely, this setting overrides any specified host and port part in a LDAP URL and will also be used if host and port have been omitted from the URL. Other LDAP servers will be used only if the connection to the proxy failed. The syntax is HOST or HOST:PORT. If PORT is omitted, “port 389” (standard LDAP port) is used.
[3] This option enables a mode of using mail encryption that is sometimes (misleadingly) called “transport-only” encryption. In this mode of operation, the message encryption is stripped off as soon as the message has reached its destination. The encryption lasts only while the message is on its way.
KMail supports this mode half-heartedly, since such functionality should be placed at the mail server (MTA) and not at the mail client (MUA) level. Thus, future versions of KMail may drop support for this option.
[4] This will re-enable all such warnings for KMail. It does not make much sense to allow more fine-grained selection of which warnings to show since you can just check the option to suppress them again the next time they appear.


The Miscellaneous (Folders) Tab
- Exclude important messages from expiry
Enable this option if important messages should never be deleted automatically.
- When trying to find unread messages
This option controls what happens if you press one of the shortcuts to go to the next or previous unread message (e.g. Space). If you ask KMail to go to the next unread message although there is no unread message below the currently selected message then the following happens.
If Do not Loop is selected then nothing will happen.
If Loop in Current Folder is selected then KMail will search from the beginning of the current folder for an unread message. If none is found then nothing happens.
If Loop in All Folders is selected then KMail will first search in the current folder for another unread message. If none is found then KMail will search the next folder containing unread messages.
- When entering a folder
This option controls what happens when you open a folder.
If Jump to First Unread Message is selected, KMail will select the first message it finds that is marked as unread.
If Jump to Last Selected Message is selected, KMail will select the message that had been selected when the folder was most recently open.
If Jump to Newest Message is selected, KMail will select the newest message.
If Jump to Oldest Message is selected, KMail will select the oldest message.
- Mark selected message as read after...
When you select a new or unread message, KMail will change the message's status to read after this many seconds. If you disable this option, messages will retain their new or unread status until you adjust it manually (via the Folder menu).
- Ask for action after dragging messages to another folder
When you drag a message to a different folder, a small popup will ask you if you want to move or copy the message. If you disable this option, the message will be moved immediately, without a popup.
- Open this folder on startup
Here you can set the folder that should be selected when you start KMail. If you use only IMAP folders then you might want to set this to your IMAP inbox folder. If you do that, you can collapse the local folders in the folder list, and they will stay collapsed when KMail starts.
- Empty the local trash folder on program exit
The trash folder is cleared of messages when you quit KMail if this option is selected.
- Allow deleting messages without confirmation
KMail's default behavior is to ask for confirmation when deleting a message. Select this option if you wish to skip that verification step. (Note that the Delete function is not accessible from KMail's menus. But you can add a button to the toolbar via the → dialog.)

The Miscellaneous (Invitation) Tab
- Mangle From:/To: headers in replies to invitations
Enable this option to make Microsoft® Outlook understand your reply to an invitation.
- Send invitations in the mail body
Invitations are usually sent as attachments to a message. When this option is enabled, invitations are sent in the body of the message. This is necessary when sending invitations and replies to Microsoft® Outlook.
- Exchange compatible invitations naming
Microsoft® Outlook, when used in combination with a Microsoft® Exchange server, has a problem understanding standards-compliant groupware e-mail. Enable this option to send groupware invitations in a format that Microsoft® Exchange can decipher. The invitation will be sent as an attachment named
ical.ics
.- Delete invitation emails after the reply to them has been sent
When this option is checked, invitations that have been replied to will be moved to the Trash folder as soon as the reply has been sent.

The Miscellaneous (Printing) Tab
This dialog helps you fine tune the way the → function operates.
- Print only selected text
Enable this option to allow printing of only the selected portion of a message. The default value disables this feature, so the entire message is printed by default.
- Respect expand/collapse quote marks settings
This option is intended to interact with the Show expand/collapse quote marks feature of the Appearance/General tab, but it is not currently functioning correctly. In other words, there's a bug.
- Print background color and images
Like the preceding option, there is a bug here, so KMail always prints images, no matter how this option flag is set.
- Always show encryption/signature details
Enable this option to make KMail print encryption details for encrypted and/or digitally signed messages.

KMail contains a large number of special functions that may or may not be useful for particular users. You may select one or more of these special functions by choosing it / them on the "plugins" configuration page. Or, if you don't want or need a particular function, you can conserve time and storage space by deselecting the associated plugin module.
On many Linux distributions, most of these plugins are not included in the basic KMail package. To get full plugin functionality, be sure to install the package named "kdepim-addons" (or something similar).
You can get a rough idea of what a particular plugin does by simply highlighting the name of the plugin on the KMail configuration page. A brief description of that plugin's function will then appear on the right hand side of the dialog.
The various plugins currently available in KMail (2021) are listed below. Note that the set of "default" plugins is based on the openSUSE version of KMail (5.14.2) used as a reference for this edition of the documentation. The actual defaults on your system may be different; they're distro dependent.
Because new functionality is added from time to time, this list may grow longer as time passes. There are two general rules governing plugin structure you can count on even if the particular plugin you are confronting is not listed below.
1. If the plugin has configurable variables, you can open the configuration dialog for that plugin by clicking the button appearing next to the plugin's name.
2. Whenever a plugin is selected or deselected, KMail must be restarted before the desired change(s) can take effect.

Plugins: Akonadi & Check Before Send
- Archive Mail Agent
Select this option to enable automatic archiving. See the Archive Mail Agent documentation for detailed information. You may also wish to read the Archiving section of this handbook. This plugin is enabled by default.
- Followup Reminder Agent
Select this option to enable followup reminders. See the Followup Reminder Agent documentation for additional information. This plugin is enabled by default.
- New Email Notifier
Select this option to enable new email notifications. You may tailor the fields to be displayed in the "standard" notification message. You may also select audio signals (spoken text, pre-recorded sounds), create log file entries, etc. This plugin is enabled by default.
- Send Later Agent
Select this option to enable delayed dispatching. See the Send Later Agent documentation for additional information. This plugin is enabled by default.
- Unified Mailbox Agent
Select this option to create a set of "unified" mailboxes. KMail will automatically create three of these, labeled Inbox, Drafts, and Sent. If you have defined both a Local Folders inbox and one or more IMAP inbox destinations, KMail will display all the various inbox files as one consolidated virtual Inbox folder. You may use the configuration dialog to create additional virtual mailboxes, tailoring each one as you see fit. This plugin is disabled by default.
- Automatic Add Contacts
Select this option to add new addresses to one of your address books whenever you send email to a new contact. Use the configuration dialog to associate address books with identities. This plugin is disabled by default.
- Check Before Send
Select this option to apply a few rules before actually sending a message. This plugin is enabled by default, and will automatically notify you when you are trying to send more than one copy of the message to the same person.
- Confirm Address
Select this option to enable address screening on outgoing messages. Use the configuration dialog to define a white list and/or a black list for each defined identity. This plugin is disabled by default.

Composer & Editor
- Open External Composer
Select this option to force the composer to open an external text editor when it starts up. Use the configuration dialog for this plugin to specify the editor that will be called. This plugin is disabled by default.
- Autocorrection
Select this option to add the → function to the composer. This plugin is disabled by default, and is apparently still under construction.
- Change Case
Select this option to add the → function to the composer. This plugin is disabled by default.
- Insert Email
Select this option to add the → function to the composer. This lets you insert a selected email address from an address book into the body of your message with a simple point and click of the mouse button. This plugin is disabled by default.
- Insert Non Breaking Space
Select this option to add the → function to the composer. This plugin is disabled by default.
- Insert Short URL
Select this option to add a tiny bit of not quite functional code. This plugin is still under construction, and is also disabled by default.
- Insert Special Character
Select this option to add the → function to the composer. This plugin is enabled by default.
- Quick Text
Select this option to add the → feature to the composer. This plugin is enabled by default.
- Share Text
Select this option to add the → function to the composer. Four options are offered: Nextcloud, Pastebin, Bluetooth, and Email (opens a second composer window). This plugin is disabled by default.
- Zoom Text
Select this option to add the → function to the composer. This plugin is disabled by default.

Grammar Checkers & Header Styles
- French Grammar Checker
Select this option to add the → option to the Composer window. This option is special, for the French language only.
- Grammar Checker (Language Tool)
Select this option to add the → option to the Composer window. This is a multi-purpose tool, with support for checking grammar in many different languages.
The following six plugins permit you to decide which header styles can be selected from the menu. See the description of various header views in the "Using KMail" chapter for more information.
- Brief Header Style
Select this option to enable the display of "Brief" headers. This plugin is enabled by default.
- Default Grantlee Header Style
Select this option to enable the display of "KMail 5.2" headers. This plugin is enabled by default.
- Fancy Header Style
Select this option to enable the display of "Fancy" headers. This plugin is enabled by default.
- Grantlee Header Style
Select this option to enable the display of "Cute" headers. This plugin is enabled by default.
- Long Header Style
Select this option to enable the display of "Long" headers. This plugin is disabled by default. (Long headers are similar to standard headers, but will display some less common header information, like "Reply-to", when such headers are present.)
- Standards Header Style
Select this option to enable the display of "Standard" headers. This plugin is disabled by default. (Standard headers are the same as Fancy headers, but without the shaded background.)

Message Viewer & Miscellaneous
The next six plugins all provide special functions that can only be invoked with a toolbar button. Use the → dialog to add or remove the toolbar buttons associated with these functions after you select or disable one of these plugins.
- Create Event
Select this option to permit the creation of a calendar event while viewing a KMail message. This plugin is disabled by default.
- Create Note
Select this option to permit the creation of a Kontact note while viewing a KMail message. This plugin is disabled by default.
- Create Todo
Select this option to permit the creation of a todo item in KOrganizer while viewing a KMail message. This plugin is disabled by default.
- Expand URL
Select this option to enable the "Expand URL" function. This plugin is enabled by default.
- External Script
Select this option to permit the invocation of an executable command from the toolbar. Use the associated configuration dialog to select the executable, and to give it a name. The name you choose can later be added to the toolbar as a button, so you may invoke the script at will. This plugin is disabled by default.
- Translator
The translator function is available in the composer by default. Use this plugin (via the toolbar) to make the translator available in the message preview window. This plugin is enabled by default.
The next four items are not really plugins; they are built-in KMail functions. Each one of these can be configured separately, by using the button appearing next to the function's name. No restart is needed to make these configuration variables take effect.
- DKIM Checker
This dialog allows you to control DomainKeys Identified Mail (DKIM) processing. DKIM is a cryptographic protocol that can assure you a particular message originated from the internet domain it claims to be from. If the sender has set up DKIM properly and DKIM is enabled here, you will see a message "DKIM valid", and sometimes the name of the entity that signed the message, in the status bar at the bottom of the message preview window.
Note
If you enable this option, be sure to change the default value ("Nothing") in the spin box labeled "Save Record Key" to some other value. The DKIM Checker does not work correctly if that variable is set to "Nothing".
- Expire Trash Folder
Use this configuration dialog to set expiry criteria for your trash folder(s). See "Folder Properties" documentation for more information.
- Folder Settings
Use this configuration dialog to set custom folder properties for several different folders at once. You can select the folders to be modified from a tree view of all your folders on the left, and select properties to be set from the General, View, Templates, and Expiry tabs of the "Folder Properties" dialog.
- Gravatar
Use this configuration dialog to enable / disable Gravatar (Globally Recognized Avatar) support.

Tools & Webengine
- Antispam
Select this option to add the Anti-Spam Wizard to the menu. This plugin is disabled by default. Note that once you have installed anti-spam software, this plugin may be safely disabled; the plugin is only needed for installing anti-spam software, not for running it.
- Antivirus
Select this option to add the Anti-Virus Wizard to the menu. This plugin is disabled by default. Note that once you have installed anti-virus software, this plugin may be safely disabled; the plugin is only needed for installing anti-virus software, not for running it.
- Expert Plugin
Select this option to add the → function in the message preview window. This plugin is enabled by default.
- Log Activities
Select this option to enable the Activity Log function, which is disabled by default. This plugin adds a new entry Log Activities to the Tools menu. Primarily for use by program developers -- the default log function does not provide much information (just a time stamp and "Ready", for most "events").
- Adblock
Select this option to add the Adblock Plus filters to KMail. If you choose to activate this plugin, be prepared to spend a good deal of time tweaking the configuration file to get the filters you really want. This plugin is disabled by default.
- Do Not Track
Select this option to force KMail to send a "Do Not Track" request to a remote server when an HTML message asks to download remote content. The effect of a "Do Not Track" request depends on the policy adopted by the web server receiving the request. Some sites honor it. Others don't.
Advertisers have their eyes everywhere. HTML-encoded messages often include a 0x0- or 1x1-pixel "image" (aka a "tracking pixel") that is actually a tracking URL in disguise. When KMail fetches image data from a web server, it must utilize the URLs embedded in the message; the server can use information embedded in the URL to infer that you have opened the message, etc.
Sending a "Do Not Track" request may enhance your privacy slightly. But the only certain way to avoid tracking pixels is never to download remote images encoded in HTML messages. This plugin is enabled by default.

Apart from the options presented in the configuration dialog, some options can only be set directly in the KMail configuration
file or through KIOSK (e.g. Input into Konsole). These so called “hidden” configuration options cannot be changed via the
normal KMail Settings dialog; they must be made by modifying the configuration file using a text editor or the kwriteconfig
program. The configuration file is to be written in the format of [Section Name] and the following lines are the variables and their
settings. If you are manually editing the configuration file you will need to add the [Section Name] before adding variables.
The kwriteconfig will add the section for you as long as you use the --group
switch.
The KMail configuration file is called kmail2rc
and can be found in your home directory. The location may vary according
to your operating system or distribution, but can always be found by running
the command kf5-config --path config --locate kmail2rc
.
For the remainder of this section, assume that the configuration file is
located in /path/to/kmail2rc
.
Warning
Whenever changing these options, make sure to quit KMail first before editing the configuration file. Only restart KMail after you have made and saved the changes to the configuration file.
- SendMDNsWithEmptySender
Send Message Disposition Notifications with an empty sender string. Some servers might be configured to reject such messages, so if you are experiencing problems sending MDNs, make sure this option is set to false. To enable this feature, add to the “[MDN]” section:
Configuration file:
SendMDNsWithEmptySender=true
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group MDN --key SendMDNsWithEmptySender true
Note
The default setting of “false” strictly speaking violates Internet standards, but is set that way for practical reasons, to avoid servers rejecting MDNs that KMail generates because they think they are SPAM.
- CloseDespiteSystemTray
This option allows you to configure the application to close fully, even if there is a system tray icon configured, which would normally keep the application running. To enable the feature, add to the “[General]” section:
Configuration file:
CloseDespiteSystemTray=true
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group General --key CloseDespiteSystemTray true
- disregardUmask
In versions prior to 1.9, KMail saved all attachments to disk with permissions set to 600 — only readable or writable by the owner of the file. In response to user feedback, this was made configurable in KMail version 1.9, with the defaults changed to honor the umask set on the user account while saving files to disk. To enable this feature, add to the “[General]” section:
Configuration file:
disregardUmask=true
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group General --key disregardUmask true
- CheckOutOfOfficeOnStartup
With this option enabled, KMail will check on every startup if there is an active out-of-office reply configured, and show a warning if this is the case. To disable the feature, add to the “[OutOfOffice]” section:
Configuration file:
CheckOutOfOfficeOnStartup=false
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group OutOfOffice --key CheckOutOfOfficeOnStartup false
- AllowOutOfOfficeSettings
In case you don't want users to be able to upload their own out-of-office scripts to the server you may add to the “[OutOfOffice]” section:
Configuration file:
AllowOutOfOfficeSettings=false
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group OutOfOffice --key AllowOutOfOfficeSettings false
- AllowOutOfOfficeUploadButNoSettings
If you want to allow your users to upload their own out-of-office scripts but you do not want them to be able to change the domain to react to and the react-to-spam setting, you may add to the “[OutOfOffice]” section:
Configuration file:
AllowOutOfOfficeUploadButNoSettings=true
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group OutOfOffice --key AllowOutOfOfficeUploadButNoSettings true
- OutOfOfficeDomain
When editing vacation (out-of-office) scripts, the user may specify a domain to limit the sending of such replies to. Applying defaults to the out-of-office configuration dialog via the corresponding button will restore this domain, in case the user has changed it. To pre-load this setting with a default value, add to the “[OutOfOffice]” section:
Configuration file:
OutOfOfficeDomain=myMailDomain.test
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group OutOfOffice --key OutOfOfficeDomain myMailDomain.test
- OutOfOfficeReactToSpam
By default, out-of-office replies are not sent to messages marked as SPAM. To override this behavior, add to the [OutOfOffice] section:
Configuration file:
OutOfOfficeReactToSpam=true
kwriteconfig
%
kwriteconfig
--file
/path/to/kmail2rc
--group OutOfOffice --key OutOfOfficeReactToSpam true

Each KMail specific menu item is discussed below. When there is a keyboard shortcut that performs a menu item function, the default shortcut is listed with the menu item.

The File Menu
- →
Here you can choose to create one of four new items, as follows:
- → → (Ctrl+N)
Compose a new message. This will open a Composer window, where you can write a new message.
- → →
Creates a new message from a selected template. Please see Compose From Templates for additional information on creating templates. If you do not have any templates saved, you will see → → .
- → →
Creates a new folder. The ensuing dialog will ask you to give the new folder a name. The new folder will be created as a subfolder of the currently selected folder.
- → →
Launches the New Contact dialog, permitting you to add a new entry in KAddressBook.
- → (Ctrl+O)
Opens saved email messages (.mbox files).
- →
Displays a list of recently opened messages. Only those messages that have been saved as .mbox files and subsequently opened will appear on this list. If no such files exist, this menu item will be grayed out.
- → (Ctrl+S)
Saves the currently displayed message to a
.mbox
file. This file includes all the headers and attachments, in MIME format. If you want to save it as a different format (e.g., as a.txt
file), uncheck the Automatically select filename extension (.mbox) box, and add the filename extension before saving the file.- →
Exports the currently displayed message as a .pdf file.
- →
Starts up the KMailCVT program (aka the Email Import Wizard). This application lets you import messages from several email clients into KMail.
- →
Shows how your email will appear when printed.
Note
This will only be enabled if a printer has been configured, is online, and is available for use.
- → (Ctrl+P)
Displays a dialog that lets you print the currently displayed message.
- →
Deletes old messages from all folders. Deletion will occur according to the rules in each folder's Properties dialog (the default is not to delete old messages at all).
- →
Use this item to empty all trash folders, i.e., the local trash folder and all trash folders that may exist on IMAP servers. Messages in Trash will be permanently deleted, and cannot be retrieved.
- →
Sets KMail to offline mode. This turns off all network jobs. This is useful when working without a network connection. When selected, this item will become → , which must be selected to go back online (required to send and receive email).
- → (Ctrl+L)
Checks for new messages in all your accounts.
- →
Checks for new messages from a particular account; your accounts will be listed in a submenu.
- →
Sends the messages that are in your outbox. Messages can end up in your outbox because of transmission errors, or because you composed and attempted to send a message while offline. If there are no messages in your outbox, this menu item will be grayed out.
- →
Sends the messages that are in your outbox via a specific outgoing account. This allows you to choose which server to use to send your queued messages. Servers must be configured in the Configure KMail dialog, under the Accounts+Sending tab, to be listed here. If there are no messages in the outbox folder, this menu item will be grayed out.
- →
Starts the Akonadi Send Later Agent dialog. Any messages queued for later delivery by the composer's → option will appear in this dialog box. You can modify and / or delete them. Note that delayed messages are stored in the drafts folder, not in the outbox folder.
- →
Starts the Akonadi Followup Reminder Agent dialog. Any followup reminder messages ("todos") created via the composer's → function will appear in this dialog box. You can delete those messages with the mouse button context menu.
- → (Ctrl+Q)
Exits KMail.

The Edit Menu
If the menu item you are looking for is missing, please see Edit Menu in KDE Fundamentals. The items listed here are KMail specific.
- → (Ctrl+Shift+C)
Creates an "Akonadi" pointer to the entire contents of the currently selected folder, and copies that pointer to the clipboard. A subsequent paste operation in a text editor will simply paste the pointer text. A subsequent paste operation in a KMail folder (or in the Dolphin file manager) will create a second copy of the folder and its contents.
- → (Ctrl+X)
Creates an "Akonadi" pointer to the currently selected folder, and copies that pointer to the clipboard. A subsequent "paste" operation in a text editor or in Dolphin will behave exactly like the preceding operation. A subsequent paste operation in KMail will move the folder and its contents to a different location (if pasted in some folder other than the originating folder).
- → (Ctrl+Alt+C)
Creates an "Akonadi" pointer to the currently selected message(s), and copies that pointer to the clipboard. A subsequent paste operation in a text editor will simply paste the pointer text. A subsequent paste operation in a KMail folder (or in the Dolphin file manager) will create a copy of the message(s), headers and all.
- → (Ctrl+Alt+X)
Creates an "Akonadi" pointer to the currently selected message(s), and copies that pointer to the clipboard. A subsequent "paste" operation in a text editor or in Dolphin will behave exactly like the preceding operation. A subsequent paste operation in KMail will either create a second copy of the message(s) (if pasted in the originating folder) or move the message(s) to a different folder (if pasted in some folder other than the originating folder).
- → (CtrlV)
Pastes either the entire contents of a folder, or the contents of selected messages, depending on the operation that preceded the "paste". This operation cannot be used to paste selected text inside the reader window. If no copy / cut operation is pending, this option will be grayed out.
- → (Del)
Moves the selected messages to the trash folder. If the selected messages are already in the trash folder, they will be permanently deleted.
- → (Ctrl+Del)
Moves the selected thread to the trash folder, e.g., a conversation in a mailing list.
- → (Ctrl+F)
Searches the current message text for a string entered in the Find: textbox.
- → (Ctrl+A)
Selects all messages in the current folder.
- → (Ctrl+T)
Selects the text of the currently displayed message.

The View Menu
- →
This submenu has the following options to change the appearance of the message list.
Contains options to customize your sort order as follows:
Message Sort Order has several options, most of which are self-explanatory. The following options may not be immediately obvious, and deserve an explanation.
By Smart Sender/Receiver will display the receiver when you are viewing the sent-mail folder, and will display the sender when you are viewing the inbox.
By Action Item Status and By Important Status. These flags need to be set before they can be sorted. Please see Mark Messages for more information on marking your messages.
Message Sort Direction and Group Sort Direction allow you to change the direction in which your messages/groups will be sorted, respectively. Note that the "Group" options are only available when messages are aggregated into groups.
Folder always Uses this Sort Order allows you to specify different sort settings for each folder.
Lets you select an aggregation option. Please see the Message List Appearance tab (under → ) for more information on aggregation.
Lets you select a theme. Please see the Message List Appearance tab (under → ) for more information on themes.
- (Ctrl+Shift+O)
Creates a new tab on the tabbing toolbar. This tab will point to the folder you are viewing when the option is selected. If the tabbing toolbar is not yet visible, selecting this option will create it. The tabbing toolbar can be handy if you have many folders, but only a few of them are regularly accessed.
- (Ctrl+PgDn)
Opens the folder associated with the next tab on the tabbing toolbar.
- (Ctrl+PgUp)
Opens the folder associated with the previous tab on the tabbing toolbar.
Reorders the tabs on the tabbing toolbar by shifting the active tab to the left. If that tab is already at the extreme left end, it will be moved to the right hand end position.
Reorders the tabs on the tabbing toolbar by shifting the active tab to the right. If that tab is already at the extreme right end, it will be moved to the left hand end position.
- (Ctrl+Shift+W)
Closes the currently selected tab.
- →
Selects your headers view. Please see Header Options for details on the available header views.
- →
Changes the way attachments appear in the Message Preview Pane (independent of the MIME Tree). Please see Attachment Options for details on viewing attachments.
- → (.)
This will display the thread of the current message, i.e., all messages that are replies to the current message.
- → (,)
This will hide the thread of the current message, i.e., it will hide all messages that are replies to the current message.
- → (Ctrl+.)
Expands all threads in the current folder.
- → (Ctrl+,)
Collapses all threads in the current folder.
- →
This option is apparently supposed to save something somewhere, but it's not yet working correctly.
- →
This option is apparently supposed to restore whatever the preceding "Save" option is supposed to save, but it's not yet working correctly, either.
- →
Select this option to stop KMail from transforming
:-)
into.
- → (X)
Uses a fixed width (Monospace) font to display the messages in the current folder. The font to be used can be configured in the Fonts tab on the Appearance page of the KMail configuration dialog.
- →
Lets you choose the character encoding to be used in the Message Pane. The default, Auto, should work in almost every case.
- →
This option lets you zoom in or out on every message displayed in the preview pane.

The Go Menu
- → (J)
Shows a dialog box with a list of all your folders. Click on the folder you wish to view, and that folder will be opened for display in the message preview pane.
- → (N)
Selects the next message in the message list. The keyboard shortcut Right also performs this function.
- → (+)
Selects the next unread message in the message list. If there are no unread messages below the currently selected message, the behavior depends on the value of the When trying to find unread messages option.
- → (P)
Selects the previous message in the message list.
- → (−)
Selects the previous unread message in the message list. If there is no unread message above the currently selected message, then the behavior depends on the value of the When trying to find unread messages option.
- → (Alt++)
Jumps to the next folder with unread messages.
- → (Alt+−)
Jumps to the previous folder with unread messages.
- → (Space)
Scrolls down if you are not yet at the bottom of a message, otherwise jumps to the next unread message.

The Folder Menu
Opens the Folder Properties dialog that lets you modify the properties of the current folder.
- →
Prompts you for a name, then creates a new folder as a subfolder of the current folder. This is exactly like → → .
- →
Sets the status of all unread messages in the current folder to "read".
- →
Sets the status of all unread messages in the current folder (and all its subfolders) to "read".
- → (F5)
Checks whether new mail has arrived in the currently selected folder.
Note
This option only works in IMAP folders.
- → (Ctrl+F5)
Checks whether new mail has arrived in the currently selected folder, or in any of its subfolders.
Note
This option only works in IMAP folders.
- →
Moves all of the messages in the selected folder into the trash folder.
Note
This is only available if the currently selected folder is not a trash folder. If the currently selected folder is a trash folder, you will see Empty Trash, instead. Selecting that option will empty the trash by permanently deleting the messages in the trash folder.
- →
Deletes the selected folder and all its contents. A warning message will be displayed. If the current folder is one of KMail's pre-defined folders (inbox, etc.), this menu item will be grayed out.
- →
Brings up a dialog so you can create an archive of the currently selected folder. Please see the → section of "Using KMail" for details.
- → (Ctrl+*)
Searches the folder for duplicate messages and deletes them.
- →
Searches the folder, and its subfolders, for duplicate messages, then deletes the duplicates.
- →
Applies selected filters (All, Spam, or Not Spam) to the currently selected folder. Please see the Filter dialog for more information on filters.
- →
Applies selected filters (All, Spam, or Not Spam) to the currently selected folder, and to its subfolders. Please see the Filter dialog for more information on filters.
- →
Here you may select one of three options: Prefer HTML to Plain Text, Prefer Plain Text to HTML, or Use Global Setting.
Warning
For security reasons, we recommend you only select Prefer HTML to Plain Text in folders which can never contain untrusted messages.
- →
If you have HTML messages enabled (see above), then you will also have the option to have images and other resources linked from the web downloaded automatically.
Warning
This option is only available if Prefer HTML to Plain Text has been selected. If you turn this option on, and later decide to change , be sure to clear this checkbox before making the switch. There is a bug in KMail -- if the checkbox on this item has not been cleared, and this option has been grayed out, results are unpredictable.
- →
This opens the mailing list management dialog. This option is only available if the current folder contains messages from a mailing list. Please see the Mailing List dialog for more information on mailing lists.
- →
This lets you assign a keyboard shortcut to the currently selected folder.

The Message Menu
- → (Ctrl+N)
Opens the composer window so you can write a new message.
- → (Ctrl+Shift+N)
Opens the composer window so you can write a new message. If the current folder holds a mailing list and has a posting address defined, that posting address will automatically be entered as the To: address when the composer window is opened. If the current folder does not contain a mailing list, this item will be grayed out.
- → (R)
Opens the composer window, inserts quoted text from the currently selected message, and sets the To: field to either the mailing-list address (if you reply to a mailing-list message), or to the preferred reply-to address of the sender. If you want to control which address is set in the To: field, you should use Reply Special. The sending identity will automatically be set to the identity to which this message was addressed.
- → (A)
Opens the composer window, inserts the quoted text of the currently selected message, and sets the To: field to either the mailing-list address (when replying to a mailing-list message), or to the preferred reply-to address of the sender. The Copy to (CC): field is filled with the addresses of all the other recipients of the currently selected message, excluding your own address. The sending identity will automatically be set to the identity to which this message was addressed.
- → → (Shift+A)
Opens the composer window, inserts the quoted text from the currently selected message, and sets the To: field to the preferred reply-to address of the sender. The sending identity will automatically be set to the identity to which this message was addressed.
- → → (L)
Opens the composer window, inserts the quoted text of the currently selected message, and sets the To: field to the mailing-list address. If you did not specify a mailing-list address for the currently selected folder and KMail cannot determine the posting address from the currently selected message, the To: field will be empty. The sending identity will automatically be set to the identity to which this message was addressed.
- → → (Shift+R)
Works just like , except that the text of the currently selected message is not quoted.
- → →
Works just like with an added option: you may select a custom template configured via Custom Templates.
- → →
Works just like with an added option: you may select a custom template configured via Custom Templates.
- → → (Shift+F)
Forwards the message to a new recipient. The message and its attachments will be attached to the new message. The original message headers will be included in the forwarded message.
- → → (F)
The message's text and some important header fields will be copied to the body of the new message, with text marking where the forwarded part begins. Attachments will be attached to the new message.
- → → (E)
This works like "Forward", except that the message stays the same (even the From: field). The user who redirected the message is identified by special header fields (
Redirect-From
,Redirect-Date
,Redirect-To
, etc.).- → →
Works just like "Forward", but gives you the option to select a custom template configured via the composer custom templates tab in Custom Templates.
- →
Opens a composer window with the currently selected message so it can be sent again.
Note
This menu item is only available for messages which you have sent or, more precisely, for messages which have the sent status. If you wish to resend some other message, double-click its entry in the message list. Or view the message and use the T shortcut. You may also do this by adding an button to the toolbar.
- →
Offers several options for mailing list messages.
Note
The current working folder must be configured as a mailing list for this option to be available. Please see Folder Properties Mailing List to learn about setting up mailing lists.
The following options are available in mailing list folders:
will set the To: address to the address configured as "Post to List".
will set the To: address to the address configured in "Post to List" and will place the word
help
in the Subject: field.will point your default web browser to the "subscribe" web site of the configured mailing list.
will set the To: address to the mailing list subscription address, and place the word
subscribe
in the Subject: field.will point your default web browser to the "unsubscribe" web site of the configured mailing list.
will set the To: address to the mailing list subscription address, and place the word
unsubscribe
in the Subject: field.
- →
Copies the selected message(s) to a specified folder. You may choose from recent folders, local folders, or a specific IMAP account folder.
- →
The same as "Copy Message To", above, except this option will permanently move the selected message(s) to the chosen folder.
- →
Lets you change the status of the selected message to one of the following values:
Status Symbol Meaning (Ctrl+R) The message has been read. (Ctrl+U) The message has not been read yet. This status will not automatically be set by KMail. You can use it freely to mark messages that are in some way important to you. Removes a previously set important flag from the message. This status will not automatically be set by KMail. Use this to mark messages that are action items; e.g., a to-do list. Removes a previously set action item mark from the message. - →
Lets you change the status of all messages in a thread as follows:
Status Symbol Meaning The entire thread has been read. The thread has not been read yet. This status will not automatically be set by KMail. You can use it freely to mark threads that are in some way important to you. Removes a previously set "important" flag from the thread. This status will not automatically be set by KMail. Use this to mark threads that are action items (e.g., a to-do list). Removes a previously set action item mark from the thread. Sets the watched thread status, which lets you easily view threads you're interested in by selecting the status in the drop down box found in the Quick Search Bar. (Click on the icon to display the filterable categories.)
Allows you to ignore entire threads. - →
Opens the Filter dialog with a new filter added. This new filter is based on fields in the current message, depending on the submenu item you select:
Filter on Subject... Filter on From... Filter on To... Filter on Mailing-List...(currently selected message must be a mailing list for this to be available). - →
Lets you . If you have spam filtering set up via the Anti-Spam Wizard, the options and will also be available here.
- → (V)
Shows the message and its complete headers in plain text format in a new window. This can help you figure out where a message really came from.
Note
You should be aware that it is easy to fake, or spoof, the
From:
header in a message. You can always find out which mail servers were used to send the message by examining theReceived:
lines in the message headers.- → (Ctrl+Alt+D)
Displays the structure viewer, an area below the preview pane that lets you view each MIME component of a message separately. This item will only be present if the Expert Plugin has been activated.

The Tools Menu
- → (S)
Opens a search window that lets you search for messages with certain characteristics, e.g., a certain subject. Please see Filter Criteria for details on search options.
Your search results will be displayed in the text area; you may either to see a folder containing the messages that were located, or highlight the desired message and select . Additional actions are available via a context menu, which can be activated by clicking the mouse button.
- →
Starts KAddressBook, the KDE email address / personal contact information management program.
- →
Starts Kleopatra, the KDE certificate manager.
- →
Launches the Configure "Out of Office" Replies dialog, which allows you to set up vacation notifications.
Note
Out of Office reply functionality relies on server-side filtering. To use it you must configure the Filtering tab (see options relevant to a Kolab server) of your IMAP account set-up.
- →
Opens the viewer window for the filter log; there you will find some options to control the logging of the filtering process. In the log you will find valuable information about the filter rules used, the result of evaluating those rules, and which filter actions were applied to a particular message.
- →
Launches the Akonadi Import Wizard dialog, which assists in importing settings and email from a wide variety of email clients. Please see the Import Wizard documentation for details.
Note
Close KMail before importing data. The wizard may modify KMail's configuration file, and can cause unpredictable results if you attempt to import data while KMail is running.
- →
Launches the PIM Data Exporter dialog, which assists in exporting your settings and email, or restoring them from a back up copy. Please see Pim Data Exporter for details.
- →
Starts the Activity Logger, which logs certain activities. This option is only available when the Log Activities plugin has been loaded. Primarily for developers.
- →
Launches the Anti-Spam Wizard, which can help you set up spam filtering. Please see Anti-Spam Wizard for details. This option is only available when the Antispam plugin has been loaded.
- →
Launches the Anti-Virus Wizard, which can help you set up anti-virus scanning. Please see Anti-Virus Wizard for details. This option is only available when the Antivirus plugin has been loaded.

The Settings Menu
If the menu item you are looking for is missing, please see Settings Menu in KDE Fundamentals. The items listed here are KMail specific.
- → (Ctrl+H)
Enables the Quick Search bar, which lets you quickly search for messages matching your criteria.
- →
Opens the Message Filters dialog.
- →
If your mail server supports sieves (server side filtering), you may configure those scripts here.
- →
Starts the Account Wizard dialog, which assists in setting up new or additional accounts. Please see Account Wizard for details.
- →
Initiates a dialog to set up automatic archiving. See Automatic Archiving for details.
- →
Opens the Configure KMail dialog. There are hundreds of variables to play with. Have fun!

The Help Menu
This is the Help Menu of the KDE Fundamentals, with one additional item.
- →
Opens the Introduction welcome screen.


The Message Menu
- → (Ctrl+N)
Opens a new composer window so you can create a message.
- → (Ctrl+Return)
Sends the message immediately. If you use SMTP to send your messages and the SMTP server is not reachable, the message will remain in the outbox and you will get an error message. After the connection issues have been resolved, you can send the messages in the outbox using → (in the reader window).
- →
Allows you to specify which outgoing mail server will be used to send the message.
- →
Launches the send later dialog. Please see the Send Later documentation for details.
- →
Allows you to specify which outgoing mail server will be used to send the delayed message.
- →
Saves the message as a file. Three formats are supported: Rich Text (.html), plain text (.txt), and Open Document Format (.odt).
- → (Ctrl+S)
Saves the message in the drafts folder so you can finish it later.
- →
Lets you save your message as a template. Please see Compose from templates for more information.
- →
Inserts a text file into the message text, starting at the cursor position.
- →
Lets you choose from a list of recently inserted text files, and inserts that file into your message. Select to clear the list.
- →
Opens a print preview window and displays your message, formatted for printing.
- → (Ctrl+P)
Formats and prints the message you have composed.
- →
Lets you make a second copy of your message somewhere else. Four options are provided: Nextcloud (an OSS file-sharing app), Pastebin (a freely available web site), Bluetooth, and Email (opens another composer window, and adds the current message to that new message, as an attachment). This option is not available unless the Share Text plugin is active.
- → (Ctrl+W)
Closes this composer window.

The Edit Menu
If the menu item you are looking for is missing, please see the Edit Menu section of the KDE Fundamentals Handbook. The items listed here are KMail specific.
- → (Ctrl+Shift+O)
Pastes the text from the clipboard and marks it as a quotation (i.e., each line preceded by ">" and a space).
- →
Pastes a file that has been copied to the clipboard (e.g., by using the Dolphin file manager) as an attachment.
- → (Ctrl+Shift+V)
Pastes data from the clipboard as plain text, with no HTML formatting.
- →
This option supposedly replaces multiple adjacent newline characters or spaces with single line breaks / spaces, but in testing, it apparently does absolutely nothing.
- →
Prepends each line of the selected text with the quotation indicator (> and a space, by default). If no selection is made, adds the indicator to every line in the message.
- →
Removes the left-most quotation indicator from the selected text.
- →
Displays a list of all the names in your address book, then inserts the chosen email address at the cursor position (after you make a selection and click the button). This option is only available when the plugin has been loaded.
- → (Ctrl+Space)
Inserts a non breaking space at the cursor position. This option is only available when the plugin has been loaded.
- →
Lets you insert a special character at the cursor position. A large number of Unicode characters are made available. This option is only provided if the plugin has been activated.
This menu item was moved to the menu in release 5.17. If you have activated the plugin, and this entry does not appear when KMail is restarted, check the menu.
- →
Helps you modify the capitalization of the selected text. There are four options: Uppercase (capitalizes the selected characters), Lowercase (forces selected text to all lower case), Sentence case (capitalizes the first letter of the selection and makes the rest lower case), and Reverse Case (converts capital letters to lower case, and vice versa). This option is only provided if the plugin has been activated. This menu item remains grayed out until some snippet of text has been selected for modification.
- →
Lets you zoom in or zoom out on the message you are composing. This is the same function appearing as → in the message preview window. This option is not available unless the plugin has been loaded.
- →
Lets you insert the contents of a named field at the cursor position. You may choose among To >, From >, CC >, Attachment >, Date/Time >, and Misc > (which has just one associated submenu item, "Subject"). There is one notable quirk: the date/time displayed in the submenu selections is fixed at the time the Composer window was opened, but the value actually inserted in a message is taken from the system clock.

The View Menu
This menu lets you toggle the display of the header fields and a few other items in the composer window. Selected items will be marked (check box colored in) in the menu.
Several options are available:
. Displays all six of the following fields.
. If you have defined more than one identity, this will be a drop down box.
used for spell checking. If multiple dictionaries are installed, this will be a drop down box.
. The
button appearing on the right when this option is checked opens a folder selection dialog.
. If you have created more than one outgoing account, this will be a drop down box.
. The contents of this field may vary, depending on the Identity you use.
. Use this field to describe your message, briefly.
The To drop down box is always present at the top of the composer window. Use
it to select CC, BCC, and Reply-To
addresses, as needed. Please see Composer Headers for
further details on message headers.
- →
Uses a fixed width (monospaced) font to display the currently edited message. The particular font to be used can be configured in the Appearance section of KMail's configuration dialog.
- →
Displays a column on the right hand side of the composer window that allows you to use and create snippets. Please see Snippets for more information.

The Options Menu
This menu lets you toggle various options for the current message. Selected items will be marked (check box colored in) in the menu.
- →
Sets the priority of the message to Urgent by inserting two header lines: "X-PRIORITY: 2 (High)" and "Priority: urgent". The receiver's email client must provide support for these headers; otherwise they will have no effect. KMail itself does not support priorities for incoming messages (although you can mark messages as Important).
- →
If you choose this option, KMail will insert a Disposition-Notification-To: header line in the message, which is a request to receive an email notification once your message has been downloaded and read by the recipient. This function must be supported, and enabled by the receiver's email client; otherwise, it will not work.
See Message Disposition Notifications for background information and several ways to customize the read receipts that KMail itself sends in response to a received Disposition-Notification-To: header line.
- →
If you choose this option, KMail will insert a Return-Receipt-To: header line in the message, which is a request to receive an email notification once your message has been uploaded by your email server and delivered to the recipient. This function must be supported by your outgoing email server; otherwise, it will not work.
- →
Digitally signs the message using OpenPGP or an X.509 certificate. You can learn more about this option in the chapter on OpenPGP.
- →
Encrypts the message using OpenPGP or an X.509 certificate. You can learn more about encryption in the chapter on OpenPGP.
- →
Lets you choose the cryptographic message format to use when digitally signing and/or encrypting this message. Please see Cryptographic Message Formats for more information.
- →
Enables Rich Text (i.e., HTML) editing.
- →
Sets the charset encoding of this message. The chosen encoding will be identified by a header line in the outgoing message. You can use Auto in almost every case; KMail will notify you if you must select a different encoding manually.
- →
Toggles the automatic wordwrap feature. You may wish to turn this off when pasting long lines (e.g., URLs) that should not be wrapped.
- →
Toggles automatic spellchecking on or off.
- →
Initiates a dialog allowing you to add a "To Do" item to your calendar. This item is grayed out if the Followup Reminder Agent plugin has not been activated.

The Attach Menu
This menu lets you select attachment options.
- →
Appends your signature (“footer”) to the end of the message. Please see Configure Identity Signature for details on configuring your signature.
- →
Prepends your signature (“header”) at the beginning of the message.
- →
Inserts your signature at the current cursor location.
- →
Opens the Attach Public OpenPGP Key dialog. Please see Configure Identity Cryptography OpenPGP Signing for details.
- →
Attaches your GnuPG public key, or your X.509 certificate, (i.e., the public key associated with your current identity) to your message.
- → →
Attaches one or more files to the current message. Attachments are encrypted by default (if the message is encrypted). Please see Cryptographic Message Formats for more information on encryption and attachments.
- → →
Creates a ZIP archive containing the selected Directory, and attaches the archive to this message.
- → →
Attaches your vCard to the current message.
- → →
Opens a dialog with KAddressBook that lets you select one or more people (Ctrl and left-click), and then attaches vCards for all those selected.
- → →
If the topmost item saved on the clipboard contains at least two bytes, a file name dialog will open. KMail will create an attachment containing the text from the clipboard, and give the attachment the name you have chosen.
- →
Removes the selected attachment (selected via the attachment area beneath the main composer window).
Note
This menu item, and the next two, will be grayed out until an attachment is selected.
- →
Saves the attachment selected in the attachment window as a file.
- →
Displays the properties of the attachment that has been selected via the attachment window. It also lets you sign/encrypt the attachment, and alter some of its other properties (name, description, MIME type, etc.).

The Tools Menu
If the menu item you are looking for is missing, please see Tools Menu of the KDE Fundamentals. The items listed here are KMail specific.
- →
Opens a Select Recipient dialog, with the contents of all your address books to select from.
- →
Launches the KAddressBook program.
- →
Opens a dialog that lets you save groups of contacts as a single named item. Very handy if you frequently send the same message to all the members of a club, for instance.
- →
Performs autocorrection. You have two options: scan and autocorrect the selected text, or apply autocorrection to the whole message. This menu item will not be present unless the Autocorrection plugin has been loaded, and it won't work unless the Autocorrection function has been enabled on the Composer configuration page.
- → (Ctrl+Alt+T)
Opens the translator window.
- →
Opens the grammar check window and examines your message, highlighting any errors that are found. This feature does not continuously update the scanned text as you type; you should first compose your message, then invoke grammar check. This tool is not available unless the Grammar Check plugin has been activated. Like the Translator function, Grammar Check passes your message through a server (default server: https://languagetool.org/api/v2) on the internet.

The Settings Menu
If the menu item you seek is missing, please see Settings Menu of the KDE Fundamentals. The items listed here are KMail specific.
- →
Lets you control which toolbars are displayed. You may choose any combination of three options: Main Toolbar (Send, Queue, Rich Text, etc.), HTML Toolbar (Style, Font / Size, etc.), and Text Direction (in case you write in Hebrew, I guess). Note that the HTML Toolbar is easily toggled on and off via the button on the Main Toolbar.
- →
Allows you to configure Sonnet, KDE's spell checker.

- 6.1. How can I set Firefox as my default browser?
- 6.2. How do I control my Roaming profile's connection?
- 6.3. How do I store sent messages in a special folder?
- 6.4. How do I move trash email messages to a special folder?
- 6.5. How can I store encrypted messages in unencrypted form?
- 6.6. How do I filter spam on an IMAP server?
- 6.7. How can I get more screen space in KMail?
- 6.8. How can I turn KMail folder tool tips off?
- 6.9. How can I hide the message list tool tips?
- 6.10. How do I transfer my mail and settings to another computer (or to another user account on the same machine)?
- 6.11. Why can't I copy my email folders to a USB stick?
- 6.12. Why are my filters not applied to incoming messages from IMAP accounts?
- 6.13. What should I know if I want to use PGP/GnuPG with KMail?
- 6.14. Where does KMail save my settings and my mail?
- 6.15. Why did KMail regenerate the index of a folder?
- 6.16. Why doesn't KMail start up?
- 6.17. Can I use KMail together with a different email client, e.g., mutt?
- 6.18. How can I convert my mailboxes from mbox to maildir?
- 6.19. How can I remove attachments from a message without removing the message itself?
- 6.20. How can I make KMail check for new messages at startup?
- 6.21. Where can I find a list of changes between one version of KMail and the next one?
- 6.22. I'm one of those people whose messages consist of 100 quoted lines and one line written by myself. For some odd reason, this annoys other people. Can KMail help me and make everyone's life better?
- 6.23. Why do some messages exhibit a value of "unknown" in the Date field? Why is the date sometimes incorrect?
- 6.24. My signature has two dashes above it. What's up?
- 6.25. Are there any known bugs in KMail?
- 6.26. Why doesn't KMail display HTML mail properly?
- 6.27. Can I use two different versions of KMail at the same time? Can I go back from a current version of KMail to an older one?
- 6.28. Does KMail support uuencoded files?
- 6.29. KMail crashed while I was composing a message. Is that message lost now?
- 6.30. I set up a folder to be mailing list aware, but messages from the list aren't being saved in that folder. What's wrong?
- 6.31. My SMTP server requires authentication. Does KMail support this?
- 6.32. Can I use KMail and procmail?
- 6.33. Spellchecking does not recognize non-English characters. Why?
- 6.34. How do I use my Eudora/Netscape®/Outlook/... mail folders in KMail?
- 6.35. Can I use encryption with my normal (non-SSL) POP3 account?
- 6.36. Does KMail lock the folders it uses?
- 6.37. How do I leave messages on the POP3 server?
- 6.38. How do I automatically insert a text footer within my messages?
- 6.39. How do I set up sendmail® to work with KMail if I have a dial-up connection?
- 6.40. I've seen demonstrations of remote control behavior with KMail. Is there any documentation on the available interfaces?
- 6.41. When I reply to a message, only a part of the message is quoted. How come?
- 6.42. I am only using IMAP. Can I get rid of those Local Folders in the folder list, or at least keep them collapsed all the time?
- 6.43. How can I watch a particular thread?
- 6.44. How can I watch my own threads?
- 6.45. How can I use E-Mail Translation?
6.1. | How can I set Firefox as my default browser? |
Problem: You want to click on a link in KMail and have the link opened in Firefox. At the moment, another browser is used. You want to change this. Solution: This change will affect all of KDE, not just KMail. Select → → → . If you are an administrator and want to make this setting automatically for your users, do this.
You can also try the script in Tutorials/ Modify_KDE_Software_Defaults NoteThe actual physical location of configuration variables is distribution dependent. Do not be surprised if some of the instructions about modifying configuration variables documented in the KDE wiki will not work for you. The public forum (online) for your distro is a good place to seek help.
| |
6.2. | How do I control my Roaming profile's connection? |
Problem: You set up a Roaming profile so you can access your home server while you are on the road, but it keeps trying to connect even when you are at home. Auto-connection is disabled in the setup screens. Solution: Navigate to → → → → → , then uncheck Include in Manual Mail Check. This will exclude that profile when you hit the download icon, but the account will still be available from the drop-down list, making it easy to retrieve your mail when away from home.
| |
6.3. | How do I store sent messages in a special folder? |
Problem: You want to store the messages you have sent in a special folder. Maybe you are using an IMAP server and wish to store your sent mail on the server, not in a local folder. Solution: In KMail, navigate to → → → → → → and select the folder you want to use. Alternatively, you can use the Sent-Mail Folder field (accessible via the menu in the composer window) to override the default sent mail folder for a particular message.
| |
6.4. | How do I move trash email messages to a special folder? |
Problem: You want to store trash in a special folder. Maybe you are using an IMAP server and want trashed email messages to be stored on the server, not locally. Solution: In the settings dialog select an IMAP account on the Accounts page. Click on and change the trash folder location via the Advanced tab.
| |
6.5. | How can I store encrypted messages in unencrypted form? |
Problem: You exchange encrypted mail with a friend, but would like to store your own copy unencrypted, once you have opened the message. Solution: To store emails that have been decrypted once in unencrypted format
thereafter, add this item to your
| |
6.6. | How do I filter spam on an IMAP server? |
Problem: You intend to read your mail from an IMAP server, and wonder how filtering and spam handling will occur. Solution: The machine that already has your mail can become your IMAP server. You will have to configure a server application. Dovecot is one such, and the guidance on the project web pages make it relatively simple to set up. That still leaves you with the problem of filtering, as it makes sense to do that on the server (when you point KMail at the server you will see the folders that have been created on that system). There are several options. One of the best known is Procmail. Another one is Imapfilter. There is plenty of information on the internet about setting these up. Further discussion of these OSS packages is beyond the scope of KMail's documentation.
| |
6.7. | How can I get more screen space in KMail? |
Problem: You are using KMail on a laptop or notebook, and find that the new Aggregation display leaves you too little screen space. Solution:If you want to change the message list so each message uses a single line instead of two lines, go to → → and change the theme to Classic. If you want to disable grouping by date, change the aggregation using → → to Standard Mailing List. Now your KMail will look exactly like it did in early versions of the program. In → → → you can select Use custom fonts to change the setting for the message list. You can also set the font size in the Use custom fonts dialog.
| |
6.8. | How can I turn KMail folder tool tips off? |
Problem: You are using KMail on a laptop or notebook, and find that the tooltips that pop up hide too many folder names Solution: Right-click on the "Name" header above the Folder List and check Never under Display Tooltips.
| |
6.9. | How can I hide the message list tool tips? |
On KMail, → → → tab, uncheck → Alternatively, right-click one of the headers above the message list and clear the check box labeled Display Tooltips. NoteThe headers above the message list do not appear if you have chosen the "Smart" theme.
| |
6.10. | How do I transfer my mail and settings to another computer (or to another user account on the same machine)? |
Use → to import and export settings and data. Please see PIM Setting Exporter for details.
| |
6.11. | Why can't I copy my email folders to a USB stick? |
Problem: You are setting up a new computer and want to transfer all your mail. You decide to copy everything to a USB stick. The job starts, then you get a failure message: Unable to copy ............ Invalid argument Solution: Your usb stick is VFAT formatted, and therefore it can't handle maildir folder names (nor can it handle permissions, which can cause many other problems). You have two choices. Either format your USB stick as ext2 (or ext3 / 4 -- in which case you should be aware it can't be read by Windows® without installing additional software) or create a .tar or .zip file of your mail, then copy that to the stick and extract the archive on the new host.
| |
6.12. | Why are my filters not applied to incoming messages from IMAP accounts? |
Normal IMAP mode does not support filtering, but the new disconnected IMAP account type does. You could try to use server-side filtering (ask your admin how to install filters on the server, and in which format), since IMAP is all about managing your email on the server. See → → → , then click Modify... and the Filtering tab to configure server side filtering using the Sieve programming language (if your IMAP server supports it).
| |
6.13. | What should I know if I want to use PGP/GnuPG with KMail? |
KMail provides a simple and easy-to-use interface for the basic functions of these programs; still, you should understand how these programs work, and what might make their use insecure. Some important issues:
| |
6.14. | Where does KMail save my settings and my mail? |
Most KMail settings are stored in The Akonadi-controlled entries are stored in these folders:
Note that some of the files are hidden: remember to also copy those if you want to backup or archive your mails. To be safe, use PIM Data Exporter to back up your mail and your settings.
| |
6.15. | Why did KMail regenerate the index of a folder? |
KMail regenerates the index of a folder whenever the index appears to be out of date, i.e. whenever the contents of a folder are newer than the index. KMail regenerates the index in this case in order to prevent the loss or corruption of messages. An outdated index can have several causes; these are the most common.
| |
6.16. | Why doesn't KMail start up? |
Problem: You want to start KMail from a minimal desktop environment like fvwm2. It does not start. Solution: This happens because you are missing dbus functionality. Start KMail from a terminal window using dbus-launch, like this: # dbus-launch kmail
| |
6.17. | Can I use KMail together with a different email client, e.g., mutt? |
If you're using the mbox format for your folders it is not possible to use a different email client while KMail is running. With mutt, there may also be problems even if both programs are not running at the same time. We recommend you use the maildir format if you want to use mutt with KMail.
| |
6.18. | How can I convert my mailboxes from mbox to maildir? |
There is no automated way to do that. You must create a new folder in maildir format, then copy the messages from the mbox folder into this new folder. Remember to adapt any filter rules connected with the old folder before you delete it.
| |
6.19. | How can I remove attachments from a message without removing the message itself? |
Open the context menu with a . mouse button click on an attachment and select
| |
6.20. | How can I make KMail check for new messages at startup? |
If KMail should always check for new messages at startup then
enable Check mail on startup on the
Accounts configuration page.
Alternatively, start KMail with kmail
| |
6.21. | Where can I find a list of changes between one version of KMail and the next one? |
The welcome screen lists all important changes for your version. It is displayed when you select → .
| |
6.22. | I'm one of those people whose messages consist of 100 quoted lines and one line written by myself. For some odd reason, this annoys other people. Can KMail help me and make everyone's life better? |
Sure. Just select a short, relevant piece of the original message with the mouse before you click "reply". Only this part of the original message will be quoted by the composer.
| |
6.23. | Why do some messages exhibit a value of "unknown" in the Date field? Why is the date sometimes incorrect? |
Most likely, the "Date:" header of these messages is broken and KMail cannot interpret it. That is not a bug in KMail, but in the software that sent the mail.
| |
6.24. | My signature has two dashes above it. What's up? |
Separating the signature from the message body with two dashes and a space on a single line is common usage. These symbols permit mail clients that recognize them to trim the signature from a reply. If your signature does not include this separator, KMail will automatically add it.
| |
6.25. | Are there any known bugs in KMail? |
There are quite a few, as you can see by querying the KMail Bugzilla page. As of this writing (April, 2021) roughly 70% of the reported bugs are unconfirmed, or irreproducible. All in all we think KMail is a robust piece of software. WarningYou should not run KMail while another email client is already accessing the files in the mail directory; if you do, you may lose messages. Note that you should make backups of your messages -- and all your important data -- regularly. That's just good digital hygiene.
| |
6.26. | Why doesn't KMail display HTML mail properly? |
References to external content, like images, are disabled by default, as spammers can use them to track whether and when you read a message. Loading external references can be activated in the Security tab in KMail's configuration dialog. Plugins (like Adobe® Flash), Java™ and JavaScript will not be displayed in KMail for security reasons, and there is no way to activate them.
| |
6.27. | Can I use two different versions of KMail at the same time? Can I go back from a current version of KMail to an older one? |
You should only run one instance of KMail at a time. We also recommend that you stick to a certain version and not switch back and forth between different versions. Downgrading to an older version may work, but will probably cause problems because, for instance, the index file formats have been changed. Upgrading should never be a problem.
| |
6.28. | Does KMail support uuencoded files? |
Uuencoded attachments are not supported. Save mail with uuencoded attachments, then use uudecode to decode the attachments.
| |
6.29. | KMail crashed while I was composing a message. Is that message lost now? |
KMail tries to save your mail to
| |
6.30. | I set up a folder to be mailing list aware, but messages from the list aren't being saved in that folder. What's wrong? |
Associating a folder with a mailing list has nothing to do with filtering the mailing list messages — you have to add a new filter rule manually. However, once you have associated a folder with a mailing list you can use → or → and the mailing list address will be set in the To: field.
| |
6.31. | My SMTP server requires authentication. Does KMail support this? |
Authentication can be set in the Advanced tab of the SMTP configuration dialog.
| |
6.32. | Can I use KMail and procmail? |
Yes, but it is important to do it the right way or you might lose mail. To use procmail and KMail you must set up KMail to fetch new mail from the spoolfiles in which procmail drops your mail. Do not set up procmail to deliver mail to a KMail folder. This cannot work. For each procmail spoolfile you must then create an account
from which KMail will fetch new mail. You also need to specify
the right lockfile name for this account. When setting up an
account, KMail will do some minimal parsing on your
| |
6.33. | Spellchecking does not recognize non-English characters. Why? |
Before you can use spellchecking, you must configure it. You can do so in the composer window, under → . You can choose a dictionary there.
| |
6.34. | How do I use my Eudora/Netscape®/Outlook/... mail folders in KMail? |
See the section Restore and Import in KMail.
| |
6.35. | Can I use encryption with my normal (non-SSL) POP3 account? |
If your POP3 server runs an ssh daemon, you can use ssh to tunnel your POP3 connection using the following command:
Modify your KMail configuration to fetch the mail via POP3 from
NoteIf non-encrypted messages have already been sent via the Internet, the only advantage of using ssh is that your password will be sent encrypted to the POP3 server. For more details on setting up ssh, see this web page.
| |
6.36. | Does KMail lock the folders it uses? |
KMail does not lock the files in To avoid the risk of losing mail when using a local account, it is necessary to ensure that KMail uses the same locking mechanism as your mail delivery agent. There are five different locking options you can use:
Procmail lockfile uses a small utility that comes
with procmail called lockfile. You
can use this if your mail folder is in a folder where you have write
permission. This will not work on your Mutt dotlock and Mutt dotlock
privileged both use a small utility that comes with
mutt called mutt_dotlock.
Mutt dotlock can be used in the same way as the
Procmail lockfile option, with the same limitation
with respect to the FCNTL uses the
WarningUsing FCNTL locking might cause system lockups when the mail spool file is on an NFS mounted device. If you do not want to use any locking, the none option is available. However, there are risks of losing mail when no locking is used.
| |
6.37. | How do I leave messages on the POP3 server? |
If you want to leave all messages on the server, open the → window. Click on the Accounts page. Select your account from the account list and click the button. This dialog contains the Leave fetched messages on the server setting (Advanced tab) which you can enable.
| |
6.38. | How do I automatically insert a text footer within my messages? |
The text footer is also called a signature (not to be confused with a cryptographic signature). Select → . Look in the Identity page for the Signature tab and add your signature there. Then go to the General tab on the Composer page and enable Automatically insert signature .
| |
6.39. | How do I set up sendmail® to work with KMail if I have a dial-up connection? |
First you should check to see if your distribution can do this for you. It probably has already been set up during installation. If that is not the case, you may want to have a look at the Mail Queue HOWTO.
| |
6.40. | I've seen demonstrations of remote control behavior with KMail. Is there any documentation on the available interfaces? |
You can get a list of functions by using this command in a shell:
| |
6.41. | When I reply to a message, only a part of the message is quoted. How come? |
This can happen when the message contains two dashes and a space on a single line. This is seen as the start of a signature. The remainder of the message will not be quoted, because when you reply to a message, KMail strips the signature.
| |
6.42. | I am only using IMAP. Can I get rid of those Local Folders in the folder list, or at least keep them collapsed all the time? |
No, you cannot get rid of them. The local folders function as a fallback when the IMAP server is unreachable. Although you only use IMAP, KMail uses the outbox for sending the messages. If we hide all local folders you will not be able to fix messages in the outbox which cannot be send for some reason. But it is possible to keep the local folders collapsed. What you have to do is go to → and go to the section Misc. There you can set up the folder on startup. If you change that to a folder on the IMAP account, the Local Folders will stay collapsed when KMail starts.
| |
6.43. | How can I watch a particular thread? |
If you want to follow a thread, right click and choose → . From this point on all messages on the thread that starts in this message will be marked as Watched.
| |
6.44. | How can I watch my own threads? |
This is useful in case you are registered to a mailing list such as kdepim-users@kde.org and want to filter out the threads you participate in.
| |
6.45. | How can I use E-Mail Translation? |
To translate text in the composer window read the section Using the Built-in Translator In the message preview pane highlight the text you would like to translate and select (Ctrl+Alt+T) from the mouse button context menu.
|

KMail has been under active development since 1997. A lot of bugs have cropped up over the years. Many of these have been resolved. If you are curious about any of those old bugs, please see the KMail/FAQs Hints and Tips in the KDE UserBase Wiki. Or visit KDE's main bug tracking page to learn about bugs of a more recent vintage.
At the present time (2021), many of the problems people are experiencing with KMail involve the Akonadi server. Akonadi is an auxiliary program that functions as an intermediary between KMail (plus all the other PIM applications) and a general purpose database daemon (most commonly "mysqld"). It also facilitates inter-process communications among the various pieces of the PIM applications. Depending on the way your system is configured, Akonadi may be started during the bootup / login process. Or it may not start until you invoke a PIM application program (like KMail, or KAddressBook, or Kontact).
There are two application programs that permit one to interact with the Akonadi server directly: akonadictl
(a terminal-oriented control program), and akonadiconsole
(a GUI application). Here is a little information about
those two programs.

Akonadictl Status Report, 32 Agents Running
The preceding screenshot illustrates one of the commands one may use with the akonadictl
program. Here
are all the commands akonadictl
recognizes.
~$ akonadictl start
Starts the Akonadi server.
~$ akonadictl stop
Stops the Akonadi server.
~$ akonadictl restart
Stops the Akonadi server, then launches it anew.
~$ akonadictl status
Produces the status report illustrated in the preceding screenshot.
~$ akonadictl instances
Lists the Akonadi server instances (more than one can be running at the same time).
~$ akonadictl vacuum
Cleans up Akonadi's storage, or at least tries to do that.
~$ akonadictl fsck
Performs a file consistency check. The output from this command can be quite voluminous, especially if you have added your own folders to KMail. Use this version of the command (piping the output through grep) to verify that your Akonadi database is healthy, without producing a lot of extraneous output.
~ $ akonadictl fsck 2>&1 | grep ^Found Found 0 external files. Found 0 external parts. Found no unreferenced external files. Found 0 parts to be moved to external files Found 0 parts to be moved to database Found 6 collections without RID. Found 0 items without RID. Found 0 dirty items.
RID stands for RemoteId, a named field in the mysql database tables. If there are more than 0 items without RID, you have a minor problem that should be corrected. If there are more than 0 dirty items you may have a major problem that must be corrected. See "Unable to Fetch Item ..." and also Correcting KMail's "Dirty" Items, below.

Akonadiconsole in action
The akonadiconsole
program provides twelve different "windows" into the inner
workings of the PIM applications. Here is a brief summary of the available views.
- Agents tab.
Here you can see a list of the user agents (processors).
- Browse tab.
This tab provides an overview of the various collections of data Akonadi is maintaining, organized as a hierarchical tree that shows how many items reside in each collection.
- Debugger tab.
Here you can turn debugging on and off, and view the debug message log.
- Logging tab.
This tab lets you view messages emitted by various Akonadi components.
- DB Browser tab.
Use this tab to peek inside the mysql database. There are many different tables.
- DB Console tab.
Here you can query the mysql database.
- Query Debugger tab.
Use this tab to turn database query debugging on and off. KMail queries the mysql database many times in just a few seconds; output can be voluminous.
- Job Tracker tab.
The PIM applications perform various functions by initiating "jobs". Use this tab to toggle job tracking on and off.
- Resources Schedulers tab.
Here you can see which resources are needed when a particular PIM function is invoked. You can see a list of all the Akonadi resources in your system in the
~/.config/akonadi/
directory.- Notification Monitor tab.
Use this tab to monitor notifications sent by various Akonadi resources.
- Item Search tab.
This tab provides a generic search function. Searches can be restricted to Calendar, Contact, Email, or Note.
- Monitors tab.
Here you can see a list of all the monitors running under Akonadi, and also view their properties. Agents, resources, and even some application programs are monitored.

There are at least two possible reasons for this. Here are some workarounds.
- Workaround 1
edit
~/.local/share/akonadi/mysql.conf
Under the [mysql] section, add:
binlog_format=row
If this does not work, try workaround 2 (below).
- Workaround 2
This one is a matter of restarting so KMail can fetch those pesky items. Some possible steps include:
Use Alt+F2 (KRunner) or Konsole to type
kquitapp kmail
, then wait a minute, thenakonadictl stop
. Wait a minute, typeakonadictl start
, wait a minute, then typekmail
. This stops KMail (closing all windows), stops the KMail backend, restarts the KMail backend, and restarts KMail. Having a working internet connection increases the chances of success. Sometimes, you can also just dokquitapp kmail
, wait a minute, and then start KMail again. Often, a few restarts seem to be needed. It is unclear what causes this error, but on bad network connections it is more likely to happen.
See also the next topic to learn how akonadiconsole can be helpful.

If KMail does not send mail without saying anything, the “agent” responsible for dispatching messages may be stuck. Of course, you should first verify you have proper network connectivity so mail can be sent!
To remedy this, it might help to abort the current action and restart it. First, quit KMail by using KRunner
(Alt+F2) or Konsole and typing: kquitapp kmail
.
Note that a normal Alt+F4 or → does not do the trick! Wait a minute, then start KMail again. Now start
akonadiconsole using KRunner (Alt+F2) or Konsole. Go to the
Mail Dispatcher Agent (under the Agents tab), do a right-click, and abort the current action.
You will most likely get some error messages popping up. Now go back to KMail and choose → . Now it might work. If not, instead of aborting the current action,
try toggling the offline/online status of the Mail Dispatcher Agent (same context menu) or restarting things
as mentioned in workaround 2 of the previous topic.
Note
akonadiconsole can be quite helpful for a number of situations because it shows all the “agents”, the separate components of the KMail backend. You can stop and start them, put them in offline mode, abort ongoing actions etc.. It can be very helpful when KMail is acting cranky.
Sometimes the Mail Dispatcher Agent fails to function because the dbus daemon (a system-level facility for inter-process communications) is not functioning correctly. Your best bet in this circumstance is simply to reboot the system. The dbus daemon is one of the first processes started when you log in to the KDE desktop, so it cannot be easily stopped and restarted. The whole Plasma environment depends on it.

This problem is directly related to Akonadi bug #283682, which has been a thorn in the side of KMail since October, 2011. There is a timing / co-ordination problem with asynchronous processing of message filters. Once in a while, a filter rule that moves messages to a different folder "hiccups", and produces more than one database entry for a message that has been moved. When you try to open the second copy of such a message, the error message "Unable to fetch item from backend ...[LRCONFLICT]" appears. Such phantom messages cannot be deleted or moved to trash using KMail's built-in functions. But you can get rid of them. Here's how you do it.
First, exit the KMail program. This may not be necessary, but better safe than sorry.
You can learn how many corrupted messages are present by using
akonadictl
.~ $ akonadictl fsck 2>&1 | grep ^Found Found 6 external files. Found 6 external parts. Found no unreferenced external files. Found 0 parts to be moved to external files Found 0 parts to be moved to database Found 6 collections without RID. Found 9 items without RID. Found 0 dirty items.
In this instance, there are nine duplicated messages (without RID).
You need to know how to connect directly to the mysql server. Use the
ps
andgrep
commands to do this.~ $ ps ux | grep mysql david 8788 0.2 0.9 3736292 153936 ? Sl 06:45 0:16 /usr/sbin/mysqld --defaults-file=/home/david/.local/share/akonadi/mysql.conf --datadir=/home/david/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid david 24275 0.0 0.0 8056 2144 pts/1 S+ 08:24 0:00 grep --colour=auto mysql
Invoke the mysql server program using the socket information from step 3 and issue three mysql commands, as illustrated below.
~ $ mysql --socket=/run/user/1000/akonadi/mysql.socket <== Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 114 Server version: 10.5.10-MariaDB Source distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> use akonadi; <== Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [akonadi]> delete from pimitemtable where remoteid is NULL; <== Query OK, 9 rows affected (0.003 sec) MariaDB [akonadi]> \q <== Bye
The three mysql commands are "use akonadi;", "delete from pimitemtable where remoteid is NULL;", and "\q". After you say "mysql --socket= ..." you will be in a dialog with the mysql server (aka "MariaDB"), which provides a > prompt. The entire dialog is presented here, for clarity. User input lines are marked with <== in the preceding illustration.
When you restart KMail, those pesky duplicate messages will be gone. They were merely phantoms caused by the NULL pointers in the mysql database tables.

KMail stores data in several different places on your machine. Most of these places are inside the
~/.local/share/
directory somewhere. For instance, on most Linux distros, your
Local Folders are in ~/.local/share/local-mail/
. Akonadi stores
most of its data in ~/.local/share/akonadi/
.
~ $ cd .local/share/akonadi ~/.local/share/akonadi $ ls Akonadi.error db_data file_db_data mysql.conf socket-localhost-default Akonadi.error.old db_misc file_lost+found search_db
Akonadi.error
and Akonadi.error.old
are log files that are created
whenever Akonadi stops and restarts. Text file mysql.conf
is a configuration file for
the mysqld daemon that serves as Akonadi's backend. The two directories db_data
and
search_db
contain the actual mysql database tables. There are also a couple of mysql
log files in db_data
that might be helpful if and when Akonadi acts up.
The two directories file_db_data
and file_lost+found
contain auxiliary
data associated with asynchronous processing. Akonadi does not automatically clean out the
file_lost+found
directory, so you may wish to clean those files up manually from time to time
(e.g., with Dolphin). Akonadi does try to clean the file_db_data
directory out after it has merged
everything into the main database files, but sometimes junk piles up in there. Use this command
find .local/share/akonadi/file_db_data/ -type f | xargs rm
to fix this when it happens. (If the directory
file_db_data
is already clean, the "find" command shown above will return an error.)

This problem is directly related to Akonadi bug #436550,
which was reported in April, 2021. It results from the "dirty" items occasionally found by akonadictl fsck
.
~ $ akonadictl fsck 2>&1 | grep ^Found Found 5 external files. Found 5 external parts. Found no unreferenced external files. Found 0 parts to be moved to external files Found 0 parts to be moved to database Found 6 collections without RID. Found 0 items without RID. Found 750 dirty items.
The "dirty" flag on an item in pimitemtable (one of the tables in the Akonadi database) is used to control certain aspects of asynchronous processing. It is set true when there are operations pending for a particular email message. Most of the time, the "dirty" flag is cleared one or two seconds later, when the once pending operation finishes up.
Occasionally, for reasons that are not entirely clear, the "dirty" flag can get set on dozens or even hundreds of messages all at once, as illustrated above. When this happens, the automatic clearing mechanism gets stuck, and is unable to repair itself automatically. The primary reason for a "dirty" item in this circumstance is that the field "remoteid" is not set correctly, making retrieval of a "dirty" message impossible in KMail. The message still exists on the disk. But KMail can't find it.
There ought to be a better way to correct this problem. If you think of a better way, please let the authors know about it, so this documentation can be improved. The following procedure will at least correct the database errors. But it does entail a lot of work.
Exit KMail and stop the Akonadi server with a terminal command:
akonadictl stop
.Make a backup copy of all your email messages. You may be able to use PIM Data Exporter for this purpose. Or you may use Ark to make an archive, or Dolphin to make a second copy of
~/.local/share/local-mail/
somewhere else on your hard disk. If you're adventurous, you might just rename your local folders directory to something likelocal-mail-save
. But it's safer to be sure you have a backup copy of your messages before you proceed.You should also make a backup copy of any filters you have created, and make sure you know how to restore any custom Sent mail folder, Drafts folder, or Templates folder entries associated with your KMail identities. The next step will remove all your personally customized mail folders, and you will need to patch some stuff up after Akonadi rebuilds its database tables.
Now delete all the folders inside of the directory
local-mail
, or rename that directory to something likelocal-mail-save
. Then start the KMail program. This will force Akonadi to erase all the database table entries associated with email messages. You will see your old folder names, briefly, but these will disappear when Akonadi finishes deleting all the "dirty" items (and all the clean ones, too).Exit KMail and stop the Akonadi server as explained in step 1, then restore the backup copy of your messages (created in step 2) to the
~/.local/share/local-mail/
directory.Start KMail up again, and force Akonadi to re-sync the database. The easiest way to do this is to → (Ctrl+L); Akonadi automatically re-syncs all the folders when it fetches mail. This will take several minutes to complete, depending on how many messages you have saved in your KMail folders. But when the process is complete all the "dirty" items will be gone.
Finally, you will want to restore your mail filter rules backed up in step 3, and check that all the custom folder items (Sent mail folder, etc.) for your identities are set the way you want them. You will also need to reset any custom folder properties you had set up, and you will probably have a bunch of spurious "Unread Message" notifications to deal with. But your Akonadi database tables will be all clean and shiny once again!

KMail: Copyright the KMail developers, 1997-2021
This program is licensed under the terms of the GNU General Public License.
This documentation is licensed under the terms of the GNU Free Documentation License.
These are the people who deserve the most credit for initially creating KMail and raising it from its birth in 1997 through its early childhood ca. 2005. They may be regarded as the parents of KMail. A handful of them are still contributing code and bug fixes to the project today.
Laurent Montel (montel at kde org): Maintainer
Ingo Klöcker (kloecker at kde org): Former maintainer, still active
Thomas McGuire (mcguire at kde org): Former maintainer
Don Sanders (sanders at kde org): Former co-maintainer
Stefan Taferner (taferner at kde org): Original author
Michael Häckel (haeckel at kde org): Former maintainer
Till Adam (till at adam-lilienthal de): Former core developer
Volker Krause (vkrause at adam-lilienthal de): Core developer
Carsten Burghardt (burghardt at kde org): Former core developer
Marc Mutz (mutz at kde org): Former core developer
Daniel Naber (daniel naber at t-online de): Documentation
Zack Rusin (zack at kde org): Former core developer
Toyohiro Asukai (toyohiro at ksmplus com): Support for the Japanese language
Waldo Bastian (bastian at kde org): Numerous technical corrections
Ryan Breen (ryan at ryanbreen com): System tray notification
Steven Brown (swbrown at ucsd edu): Patch for PGP
Matthias Kalle Dalheimer (kalle at kde org): Crypto support
Matt Douhan (matt at fruitsalad org): Improved internal program documentation
Cristi Dumitrescu (cristid at chip ro)
David Faure (faure at kde org): Major contributor, still active
Philippe Fremy (pfremy at chez com)
Kurt Granroth (granroth at kde org): Added maildir support
Andreas Gungl (a gungl at gmx de): PGP 6 support and further enhancements of the encryption support
Steffen Hansen (hansen at kde org)
Igor Janssen (rm at linux ru net)
Matt Johnston (matt at caifex org)
Christer Kaivo-oja (whizkid at telia com)
Lars Knoll (knoll at kde org): Original encryption support, PGP 2 and PGP 5 support
J. Nick Koston (bdraco at darkorb net): GnuPG support
Stephan Kulow (coolo at kde org): Major contributor
Guillaume Laurent (glaurent at telegraph-road org)
Sam Magnuson (sam at trolltech com)
Matt Newell (newellm at proaxis com)
Denis Perchine (dyp at perchine com)
Samuel Penn (sam at bifrost demon co uk)
Carsten Pfeiffer (pfeiffer at kde org): Various and sundry bug fixes
Sven Radej (radej at kde org): Improved asynchronous processes
Mark Roberts (mark at taurine demon co uk)
Wolfgang Rohdewald (wrohdewald at dplanet ch)
Espen Sand (espen at kde org): Enhanced configuration dialogs
Aaron J. Seigo (aseigo at olympusproject org): Technical fixes; notes/calendar integration
George Staikos (staikos at kde org): Improve efficiency and consistency of code
Szymon Stefanek (pragma at kvirc net): New message list and new folder tree
Jason Stephenson (panda at mis net)
Jacek Stolarczyk (jacek at mer chemia polsl gliwice pl)
Roberto S. Teixeira (maragato at kde org)
Bo Thorsen (bo at sonofthor dk): Many valuable contributions
Ronen Tzur (rtzur at shani net)
Mario Weilguni (mweilguni at sime com)
Wynn Wilkes (wynnw at calderasystems com)
Robert D. Williams (rwilliams at kde org)
Markus Wübben (markus wuebben at kde org): Killed lots of bugs
Karl-Heinz Zimmer (khz at kde org): Major contributor

These are the people who helped build the program when it was still quite young. Think of them as the friendly next door neighbors who taught KMail important lessons about life, and cared for the child when he wandered away from his parents' house.
Sam Abed (earlgreykde at pop netspace net au): Smiley ==> emoticon processing
Joern Ahrens (joern ahrens at kdemail net): Improve 'Mark Message as' popup menu
Tom Albers (toma at kde org): Bugzilla maintenance
Jaime Torres Amate (jtamate at gmail com): Execution speed improvements
Albert Cervera Areny (albertca at hotpop com): Optionally compress attachments
Jonathan Armond (jon armond at gmail com)
Patrick Audley (unknown): Added spam status to fancy headers
Benjamin Azan (b azan at free fr): Implemented todo status handling
Davide Bettio (davide bettio at kdemail net): Bug fixes, code cleanup
Pradeepto Bhattacharya (pradeepto at kde org): LDAP support, maintenance
Bruno Bigras (bigras bruno at gmail com)
Bertjan Broeksema (broeksema at kde org): Major contributor to Akonadi
David Bryant (davidbryant at gvtc com): Documentation, still active
Albert Astals Cid (aacid at kde org): Substantial contributor, still active
Frederick Emmott (fred87 at users sf net): Antivirus support
Christophe Giboudeaux (christophe at krop fr): Major contributor, still active
Sandro Giessl (sgiessl at gmail com): Fixed widget styles
Olivier Goffart (ogoffart at kde org): Bug fixes
Severin Greimel (greimel-kde at fs-pw uni-muenchen de): Several patches
Shaheed Haque (shaheedhaque at gmail com): Bug fixes
Ingo Heeskens (ingo at fivemile org): Enable external reference loading for a whole folder
Kurt Hindenburg (kurt hindenburg at gmail com): Delete an entire thread
Heiko Hund (heiko at ist eigentlich net): POP filters
Torsten Kasch (tk at genetik uni-bielefeld de): Patch Solaris crash
Jason 'vanRijn' Kasper (vr at movingparts net): Choice of fonts for new/unread/important messages
Martijn Klingens (klingens at kde org): Fix Quick Search keyboard navigation
Christoph Klünter (chris at inferno nadir org): Fix drag and drop from address book to composer
Martin Koller (kollix at aon at): Substantial contributor
Tobias König (tokoe at kde org): Major contributor
Nikolai Kosjar (nikolai kosjar at qt io)
Francois Kritzinger (unknown): Improve configuration dialog
Danny Kukawka (danny kukawka at bisect de): Improved message importing
Roger Larsson (roger larsson at norran net): Add details to status bar message
Michael Leupold (lemma at confuego org)
Thiago Macieira (thiago at kde org)
Andras Mantia (amantia at kde org)
Jonathan Marten (jjm at keelhaul me uk)
Sergio Luis Martins (iamsergio at gmail com)
Jeffrey McGee (jeffreym at cs tamu edu): Patch for window resizing problem
Thomas Moenicke (tm at php-qt org)
Dirk Müller (mueller at kde org): Optimize qt-cast; fix QUrl()
Torgny Nyblom (nyblom at kde org): Substantial contributor
OpenUsability (contact at openusability org): Usability tests and improvements
Mario Teijeiro Otero (emeteo at escomposlinux org)
Kevin Ottens (ervin at kde org)
Simon Perreault (nomis80 at nomis80 org): Patch composer configuration
Jakob Petsovits (jpetso at gmx at)
Romain Pokrzywka (romain at kdab net)
Bernhard Reiter (bernhard at intevation de): Ägypten and Kroupware project management
Darío Andrés Rodríguez (andresbajotierra at gmail com)
Edwin Schepers (yez at familieschepers nl): Improved HTML support
Jakob Schröter (cvsci at camaya net): X-Face support
Cornelius Schumacher (schumacher at kde org): Major contributor
Jan Simonson (jan at simonson pp se): Beta testing of PGP 6 support
Paul Sprakes (kdecvs at sprakes co uk): Bug fixes, cleaned up context menus
Jarosław Staniek (staniek at kde org): Port to MS Windows®
Will Stephenson (wstephenson at kde org): IM status indicator
Hasso Tepper (hasso at kde org): Improve layout of recipients editor
Frank Thieme (frank at fthieme net): Bug fixes
Patrick S. Vogt (patrick vogt at unibas ch): Timestamp for 'Transmission completed' status messages
Jan-Oliver Wagner (jan at intevation de): Ägypten and Kroupware project management
Wolfgang Westphal (wolfgang westphal at gmx de): Multiple encryption keys per address
Allen Winter (winter at kde org): Major contributor, still active
Urs Wolfer (uwolfer at kde org): Improved icon/image processing
Thorsten Zachmann (t zachmann at zagge de): POP filters
Thomas Zander (zander at kde org): Fixed many IMAP bugs

Update for KMail 5.14.2 by
David Bryant (davidbryant AT gvtc.com)
.
Update for KMail 4.11 by
Laurent Montel (montel AT kde.org)
and
Scarlett Clark (scarlett AT scarlettgatelyclark.com)
.
Update for KMail 1.7 by
Ingo Klöcker (kloecker AT kde.de)
and
Marc Mutz (mutz AT kde.org)
.
Anti-Spam Wizard chapter by Andreas Gungl (a.gungl AT gmx.de)
.
Section about filter log by Andreas Gungl (a.gungl AT gmx.de)
and
Brad Hards (bradh AT frogmouth.net)
.
Additional changes by Daniel Naber (daniel.naber AT t-online.de)
.
Update for KMail 1.2 to 1.5 by Daniel Naber (daniel.naber AT t-online.de)
,
OpenPGP chapter by Andreas Gungl
(a.gungl AT gmx.de)
and Ingo Klöcker (kloecker AT kde.de)
,
message filter chapter by Marc Mutz
(mutz AT kde.org)
, and download filter chapter by Thorsten Zachmann
(T.Zachmann AT zagge.de)
. Other parts have been
contributed by various KMail developers.
KMail 1.0
documentation by David Rugge (davidrugge AT mediaone.net)
.
Original documentation by Bernd Johannes Wuebben
(wuebben AT kde.org)
, Robert Williams
(rwilliams AT kde.org)
(Editor).
Thanks to Michael Elkins (me AT cs.hmc.edu)
for his excellent
description of the different UNIX® mail formats in the Mutt
documentation.
Thanks to the following people for providing directions on using other email client mailboxes with KMail:
Nik Gaffney
(nik AT f0.am)
(Mailsmith)David McMillen
(mcmillen AT math.bu.edu)
and Mendel Mobach(mendel AT mobach.nl)
(Netscape® mail)Ed Shapard
(shapard AT bigfoot.com)
(Pegasus Mail)Ray Muir
(rjmuir AT ibm.net)
(Forte Agent)