Copyright © 1999, 2000, 2001, 2002 David Rugge
KMail is KDE's powerful and user friendly email client.
Table of Contents
The KMail Team welcomes you to KMail, a user-friendly mailer for the K Desktop Environment. Our goal is to make a mailer that is 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 so that your setup goes smoothly.
Since most people don't read documentation anyway, here is a collection of the most helpful tips:
You don't have to use your mouse to use KMail. Everything can be done by using Keyboard Shortcuts.
Although KMail can be considered reliable you should keep backups of your messages, i.e. just copy the files in ~/Mail (including the hidden ones that start with a dot) to a safe place.
KMail's homepage is at http://kmail.kde.org, an archive of the developer's mailing list is at lists.kde.org.
Please report bugs in KMail using Help->Report Bug....
We hope you will enjoy KMail!
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. Note that KMail's installation is described in the appendix.
Invoking KMail for the first time creates a directory called Mail containing the initial files (inbox, outbox, sent-mail, trash and drafts) in your home directory. Use Settings->Configure KMail... to enter some initial information so KMail will be able to properly retrieve and send your messages.
The Configure window consists of six sections: Identity, Network, Appearance, Composer, Security, and Miscellaneous.
To begin sending and receiving messages you will only have to change the settings in the Identity and Network pages.
The settings in the Identity page are fairly straightforward. Fill in the 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@somewhere.org). If you are using PGP or GnuPG you need to set your key in the OpenPGP Key field in the Advanced tab. Optionally, go to the Signature tab and enter your signature.
The Network page contains the settings that tell KMail how to send and receive your email messages. Many of these settings can vary greatly depending on the setup of your system and on the kind of network that your mail server is located. If you do not know what setting to choose or what to put in a field, consult your Internet Service Provider (ISP) or system administrator.
The Sending tab provides a list of ways to send messages. The first item in the list is the default way to send messages. Using the Add... button you can choose between two different ways of sending messages: sendmail and SMTP. sendmail® here means a local software installation - this has a reputation of being difficult to set up, so if you do not already have a working sendmail® configuration, choose SMTP and fill in the Name field with a descriptive name (e.g. My Mail Account) and the Host field with the name and domain of your mail server (e.g. smtp.provider.com). You will probably not need to change the Port setting (the default is 25).
If you do want to use sendmail® and you are using a dial-up connection, follow the instructions for setting up sendmail for a dial-up connection in the FAQ section.
The way of sending messages configured here will be used for your default identity and for all other identities that have no own way of sending messages. You can use different ways of sending messages for different identities by selecting the Special transport checkbox in the Advanced tab of the Identity section.
A description of the other options can be found in the Configuration chapter.
To set up an account so you can receive mail, press the Add... button in the Receiving tab. You will then be prompted for the type of account. Most users should select Pop3 or IMAP. If you want to use a local mailbox file, please see the FAQ about file locking.
You will then be presented with the Add Account window. First, fill in the Name field to name your account. You can choose any name you like. Login, Password, and Host should be filled in with the appropriate information from your ISP or system administrator. You should not need to change the Port setting (the default for POP3 is 110, the default for IMAP is 143).
If you are using IMAP, you can optionally specify a path in the Prefix to folders field. This tells KMail where it can find your folders on the server. If you also have a shell account on the server and the messages are stored in your home directory it might be useful to store the messages in a subdirectory /Mail/. Use this as a value in the Prefix to folders field so that KMail does not mix up mailbox files and other files. If you are not interested in this feature, simple leave the field blank.
If you check Automatically compact folders KMail removes the messages you deleted from the server as soon as you leave a folder. Otherwise the messages are only marked as deleted and it is up to you to compact the folders manually by using the menu item Compact All Folders.
If you check Show hidden folders, folders whose name starts with a dot are also displayed.
Select Delete mail from server if you don't want to leave your messages on the server after you downloaded it.
Select Exclude from "Check Mail" if you don't want to check this account whenever you use Check Mail. You can still check for new messages on this account with File->Check Mail In.
Select Enable interval mail checking if you want KMail to check for new messages automatically. The interval can be specified below under Check interval (minutes).
inbox is the default folder for incoming mail. If you want to change that for some reason, you can do so with Destination folder. But what you probably want is a filter, which has nothing to do with this option.
With Precommand you can specify any program that KMail will execute just before fetching mail. Please specify the full path (don't use “~”) and note that KMail will not continue until the program returns.
On the Extras tab you can select Use pipelining for faster mail download if this is supported by your server. You should carefully test this to make sure it works safely.
If you select Store POP password in configuration file resp. Store IMAP password in configuration file KMail will remember your password so you won't have to type it every time you start KMail and fetch new mail.
Be warned that KMail cannot really encrypt your password, so people who can access your configuration files (e.g. system administrators) can easily get your password if you select this option.
KMail supports encryption via SSL and TLS (TLS should be preferred if it is available).
For POP3 KMail supports:
Clear text,
PLAIN,
LOGIN,
CRAM-MD5 (recommended if DIGEST-MD5 is not available),
DIGEST-MD5 (recommended) and
APOP authentication.
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 doesn't support any of the other authentication methods. Additionally, for IMAP Anonymous is supported, but APOP is not. Use the Check what the server supports button on the Extras resp. Security tab to automatically select the most secure settings supported by your server.
You are now ready to send and receive mail. For IMAP, click on the + sign in the folder tree in KMail's main window. KMail then connects to your server and displays the folders it finds. For POP3 use File->Check Mail.
First, you should send yourself a message to test your configuration. To send a message, hit Ctrl+N, select the New Message icon (the empty sheet of paper) or select the Message->New Message... 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 Message->Send.
To check your email, select File->Check Mail. 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 by selecting Settings->Configure KMail....
The main window is the window that appears when KMail is started. It is divided into three panes:
This pane contains a list of your message folders (other email programs may call them mailboxes). If there is a number after the folder name this indicates that this folder contains unread messages, except for the outbox which shows the number of total messages. To select a folder, simply click on it. The messages contained in the folder will now appear in the Headers pane. The number of unread messages and the total number of messages in the selected folder is now displayed in the status bar. The folders 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 but is able to show more mailboxes. You can toggle between these two views under Appearance/Layout in the Configure KMail... dialog. Also see the Folders Section for more information about how to use folders.
This pane lists header information (message Status Flags, Sender, Subject, Date, optionally Size) for the messages in the currently selected folder. Clicking on a header will select that message and display it in the Message pane. You can also select a series of messages by clicking on one message, holding down the Shift key, and clicking on another message. The two messages you just clicked on will be selected, along with all the messages in between. By holding down the Ctrl key you can select any number of messages without those in between. You may sort the messages by clicking on the column that you wish to sort. If you click on the same column more then once, sort order will toggle between ascending/descending. If you click on the Subject column, you can toggle sorting between Subject ascending/descending and Status ascending/descending. Similarly, if you click on the Date column, you can toggle sorting between Date ascending/descending and Date (Order of Arrival) ascending/descending.
This pane displays the currently selected message. Attachments appear at the bottom of the message. You can scroll through the message page by page using the Page Up and Page down keys, or line by line using the up arrow and down arrow keys. You can also use key shortcuts to skip through your messages without having to use the mouse.
The following keyboard shortcuts are supported in the main window:
Keyboard Shortcut | Action |
---|---|
Space | Scroll down in the current message or go to the next unread message if you are already at the bottom. |
Right Arrow or N | Go to the next message in the current folder. |
Left Arrow key or P | Go to the previous message in the current folder. |
+ | Go to the next unread message in the current folder. |
- | Go to the previous unread message in the current folder. |
Ctrl++ | Go to the next folder with unread messages. |
Ctrl+- | Go to the previous folder with unread messages. |
Ctrl+Left Arrow | Walk upwards in the list of folders. Use Ctrl+Space to actually enter the folder. |
Ctrl+Right Arrow | Walk downwards in the list of folders. 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+Left Arrow or Ctrl+Right Arrow. |
Shift+Left Arrow and Shift+Right Arrow | Select messages in the header pane, starting with the current message. |
The composer window is used to write new messages. It can be invoked from the Message menu or from the New Message icon on the Mail Reader window button bar.
To write your message, fill in the appropriate fields in the composer window. Use the View menu to select which header fields are displayed. The Identity field offers a Sticky option. If it is checked, the current identity will become the default identity when you open a new composer next time.
There are a variety of shortcuts to help you with writing your messages. The ellipsis buttons next to the To:, Cc:, and Bcc: fields will call up the address book so that you can select addresses from there.
When you start typing an address in the To:/Cc:/Bcc: fields, a popup will appear that offers matching addresses that have been used recently and matching addresses from your address book. If you don't like the automatic popup you can disable it by clicking with the right mouse button on the field and choosing a different completion mode.
Whenever you want to add more than one recipient in one of the fields, use a comma to separate each address from the next one. You may need to specify fully qualified addresses (i.e. user@domain.com) even for local users, depending on your system configuration.
When you are finished with your message, click the Send icon (the envelope) to send the message now, or click the Queue icon to put the message in the outbox. If your message isn't finished yet, select Message->Save in drafts folder. If you want to send an encrypted or digitally signed message, select the Sign Message resp. Encrypt Message icons in the toolbar.
You can attach files to your message by using one of the methods below:
Click the paper clip button and select the file you wish to attach.
Drag a file from the desktop or another directory into the composer window.
Select one of the options in the Attach menu.
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 right mouse button on each attachment to View, Save or Remove the attachment.
Use the Properties... item to open the Message Part Properties dialog. The first field contains the attachment's MIME-type. Just like the Name field, it should be automatically filled with an appropriate value. Sometimes the MIME-type value 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 part in the message preview, instead of the default icon view.
PGP/GnuPG keys may also be attached to your message by using the appropriate options in the Attach menu. PGP key attachments are handled like file attachments.
You can encrypt your messages sent with KMail, but this does not mean that the attachments are encrypted. You have to encrypt your attachments manually, using a shell command or some other tool before you attach them.
Message Folders are used to organize your email messages. By default, all message folders are stored in the directory Mail, which is created in your home directory. When you first start KMail the inbox, outbox, sent-mail, trash and drafts folders are created. These folders each have special functions:
Where KMail by default puts your new messages when you ask it to check your mail.
Where messages are put while they are waiting to be delivered.
Contains copies of all messages that you have sent.
Contains all messages that you have deleted.
Contains messages you started to edit but then saved to this folder instead of sending them.
You may find that the standard folders are fine for your needs. Eventually, though, you will probably need folders to help you organize your messages. To create a new folder, select Folder->Create... A window will then prompt you for the name of the folder. If you don't want it to be a top level folder, you may choose the folder under which it will appear. If you ever need to change the settings for a folder, select the folder you wish to modify in the Folders pane and select Folder->Properties....
To move messages from one folder into another, select the message(s) you want to move and press the M key or select Message->Move to. A list of folders will appear. Select the folder from the list that you want to move the messages to. Messages can also be moved by dragging them from the Headers pane into the Folders pane.
If you want to clear all of the messages out of a folder choose Folder->Empty. All the messages in the selected folder will then be moved to the trash folder. If the selected folder is the trash folder, all of the messages will be permanently deleted.
You can use Folder->Remove to remove a folder and all its messages if you choose Remove from the appearing confirmation dialog, but unlike with Folder->Empty there's no way to get the contents of the folder back.
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.
Please note that the filters described in this section are applied after the messages have been downloaded from your account. If you want to filter messages on the server, see Download Filters.
Filters consist of a search pattern, whose rules are used as criteria to determine whether this filter should be applied to a given message, and a list of filter actions, which describe what is being done with or to the message if the search pattern matches. Read more about search patterns and filter actions in the following subsections.
Filters are considered one after the other, starting with the first filter in the list. The first one whose pattern matches the given message gets executed. You can request that the remaining filters also be applied, 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 type Ctrl+J or select Message->Apply Filters. This will apply all filters that have been marked for manual filtering in the filter dialog to those messages.
There are two methods for creating a filter: The quick method is to use Message->Create Filter. This will call 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 to folder) preset. In most cases, all you have to do is select the folder where the message should be moved to. But you can, of course, edit the filter as you like.
The interesting thing about this method is that creating a filter on mailing lists will try really hard to find a criterion that uniquely identifies messages from that list. If it succeeds, the guessed name of the list is presented in the Message->Create Filter->Filter on Mailing-List... menu entry.
The second method is to manually construct a filter from scratch by calling the filter dialog through Settings->Configure Filters.... The filter dialog is described in detail in the following subsection.
This dialog allows you to manage and edit your list of filters.
You reach it either via Message->Create Filter or Settings->Configure Filters....
The dialog is divided into four main sections:
This group contains the list of filters and some action buttons to modify the filters, namely to create new filters, to move them up or down the list, or to delete or rename them. If you select a filter from the list, its properties are shown in the right-hand half of the dialog.
In this group you can edit the pattern that messages must match for the filter to be applied to them. You can select here whether all of the defined rules must match or whether it suffices that any one of them matches. See Search Patterns below for a detailed description of each search rule type.
You can click on More to get an additional (initially empty) rule if you want to define more complex patterns and on Fewer to remove the last rule. Clear clears the pattern, i.e. it removes all but two rules from screen and resets those two.
Invalid or empty rules are not evaluated.
In this group you can edit the list of actions that is applied to all messages that match the defined search pattern. See Filter Actions below for a detailed description of each action type.
You can click on More to get a new, empty action if you want to define more than one action and on Fewer to remove the last action. Clear clears the list, i.e. it removes all but one action and resets that one.
Invalid or empty actions are not executed.
In this group you can define a few advanced options for filters that allow you to refine your filtering.
Using the first row of check boxes, you can toggle the applicability of the corresponding filter: The incoming messages check shows whether it may be considered for incoming messages (i.e. on Check Mail). The sent messages check shows the same for sent messages (i.e. after Send) and the manual filtering check controls whether to apply this filter when filtering manually (i.e. via Message->Apply filters).
Filters are automatically named unless you explicitely rename them using the Rename... 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 OK or Apply, only valid filters are actually copied to the internal filter manager.
A filter is considered invalid if
the search pattern contains only empty rules or
the action list is empty.
Similarly, empty rules and actions are removed from the pattern and action list 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 <recipients>. But there are other criteria a filter can search for:
Searches the whole message (i.e. headers, body and attachments, if any).
Searches the body of the message.
Searches the headers of the message.
Searches the “To” and “Cc” header fields of the message.
Sets upper or lower bounds on the message size.
Sets upper or lower bounds on the message age.
Searches the header field that is given by that name.
The most common use of filters is to sort incoming messages to certain folders. This can be done by choosing move to folder. Here's a list of all possible actions:
This will move the message to another folder. You currently cannot use IMAP folders as a target.
This will set your identity if you reply to this message.
This allows you to mark the message as read or important (flagged), but also as forwarded, replied, etc.
This will set the method of transport (e.g. SMTP) if you reply to the message.
Will modify the Reply-To field of this message. This can be useful for mailing lists that automatically set a Reply-To which you don't like.
Will forward the message to another email address.
Will redirect the message to another email address.
Will try to return the message to the sender as undeliverable.
This will only work if the senders email address is valid. That's not the case for most spam.
Will try to return a message to the sender that indicates successful delivery of his or her message.
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 recommended to not send them to everyone, since this makes tracking of such things as spam very easy for the sender.
This will execute a program, but will not modify the message. Specify the full path to the program you want to execute. KMail will block until the program returns. You can feed the program with the parts of the mail: %0, %1, etc. will stand for files representing the message parts. For common messages %0 is the text, %1 the first attachment and so on. Additionally, the whole message is fed into the program's stdin.
This currently only works if the message has at least one attachment. No, not even %0 will work in the general case!
You can enter arbitrarily complex shell commands here, since KMail uses a subshell to execute the command line. Therefore, even this command will work (within its limits): uudecode -o $(mktemp kmail-uudecoded.XXXXXX) && echo $'\a'
This will feed the message to a program. If that program returns output, the entire message (including the headers) will be replaced with this output. If the program doesn't return output, the message won't change. Specify the full path to the program.
Be cautious with this action, as it will easily mess up your messages if the filter program does return garbage or extra lines.
Will remove all header fields with the given name from the message. This is useful mainly for removing bogus “Reply-To:” headers.
If no such field is already present, will add a new header field with the given name and value to the message. If there is already a header field with that name, it is overwritten with the new (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.
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}, where n is a positive (single-digit, except for the third form) number or 0. These constructs are interpreted as backreferences to substrings captured with parentheses in the search string.
Analogous restrictions as in the add header action apply here, too.
If I am subscribed to the (general) KDE List, I could create a folder for the list (I'll call it KDE-General) and use a filter to automatically transfer new messages from my inbox to my KDE-General folder if they are from the KDE List. Here is how to create this filter:
Procedure 3.1. Filtering a mailing list
Try if Message->Create filter->Filter on Mailing-List... can identify the mailing list (the name of the list should then appear in the menu item). In this case, this works and I am presented a filter that has ‘X-Mailing-List equals <kde@lists.netcentral.net>’ preset. You select the desired destination folder from the folder pull-down menu in the Filter Action group and that's it!
If that does not work, think of a unique way of identifying the messages you want to filter. The (almost) unique property of my KDE List messages is that they always contain ‘kde@lists.netcentral.net’ in the To: or Cc: field. It's only almost unique, because this fails for cross-posted messages.
Select Settings->Configure Filters....
Press the New button to create an empty filter. It will appear as <unnamed>.
In the Filter Criteria area, select <recipients> from the first pull-down menu, contains from the second pull-down menu, and type kde@lists.netcentral.net in the text field.
Skip down to the actions section. Select move to folder from the first pull-down menu. A new pull-down menu containing a list of folders will appear. Select the folder that you want the filtered messages to be transferred to if they match the criteria you selected. For this example, you would select KDE-General from the pull-down menu.
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.2. 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@lists.netcentral.net’ in the To: or Cc: field and that are from Fred, check the Match all of the following 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 transfers all KDE List messages that are from fj@anywhere.com.
Download Filters can be used to filter mails from a POP server, before they are completely downloaded. You can use it to prevent KMail from downloading huge mails and save time this way.
In the configuration dialog of the POP account you can enable download filtering by checking the Filter mail on server box. Once you did that, you can specify a size which is used as a threshold. Messages exceeding this size will be checked against the filter rules you defined. If no filter rule matches, they will be shown in a confirmation dialog and you can decide what to do with them. The default size for filtering is 50000 Bytes. This is a good value as the overhead is kept to a minimum. Every message that is looked at by the filter causes additional traffic because the header of the mail is downloaded twice. The default action is Download mail to prevent the loss of messages.
Be careful with the Delete mail from server option since once a mail is deleted on the server there is no way to get it back.
With a really good set of filter rules, it is possible that all messages that exceeds the threshold size are automatically tagged (i.e. downloaded, kept on the server or deleted) and you would never be bugged by the confirmation dialog. Be careful though, since once a message is matched by a filter rule, you have no guarantee that you can change the action before it is executed. Only if there is a message left that was not matched by a filter rule the confirmation dialog will show up.
Adding filter rules work similar as for message filters. On the left hand side you can manage the existing filters. Use the New button to add a filter. On the right hand side you can configure under which conditions the current filter should match. Using Filter Action you specify what will happen to a message that is matched by this rule. The available options are:
Will download the messages matched by the filter, just as any other message that does not exceed the threshold size.
Will tag the messages for later download. This means the messages matched will stay on the POP server until you choose to download them by changing the action manually.
Will delete the message from the server and does not download it. Once you deleted a message from the server, there is no way you can undo this. Be careful, as rules could match messages you actually want, too.
The option Always show matched 'Download Later' messages in confirmation dialog will cause the confirmation dialog to show up during mailbox check if at least one message was tagged for Download Later - even if all messages exceeding the threshold size were matched by a rule. This option is useful in the case you have messages matched by a rule and tagged for Download Later, but you don't get any message exceeding the size limit for a very long time. Without this option, the confirmation dialog would never show up and you would never have a chance to get the queued message by changing the action manually.
This dialog shows up whenever you have POP filtering switched on and messages were found on the server that exceed the threshold size you defined for the POP account. Now you have the chance to decide what you want to do with that message. The options are download (green), download later (yellow with eggwatch) and delete from server (red ‘x’). Be cautious with the delete option, since once you deleted a mail from the server, there is no way to undelete it again.
In the Filtered Messages section you can check the box if you got messages that were automatically tagged for a certain action (download, download later, delete) by a filter rule. The checkbox is only enabled if you got some messages that were matched by a filter rule. Once you check it, a list similar to the one for the not automatically tagged messages will show up and you can change the action for every single message.
Please note that if there is a message exceeding the size limit, but all messages are matched by a filter rule the dialog will not show up. One exception occurs if you have checked Always show matched 'Download Later' messages in the Global Options section of the POP filter configuration dialog. Then the dialog will also show up if you only have matched messages, but at least one got tagged for download later.
Multiple accounts are used to check for messages from more than one email address and/or mail server. Select Settings->Configure KMail... and click on the Network page to add or change your account settings. See the Getting started section for more information on the settings in the Network page.
To check for messages from a particular account, use the File->Check Mail in... submenu to select the account to check for mail. You can also press the mouse button on the Check Mail icon for some time to get a list of accounts.
This is a short introduction on how to setup KMail's PGP (Pretty Good Privacy) support. It will give some hints on the use of PGP too. It's written for people who are beginners in this area. If you are familiar with the use of PGP, you can skip most of the steps. This documentation (and the KMail user interface) generally talks only about “PGP”, but it applies to both PGP and GnuPG (GNU Privacy Guard), although some GnuPG command line parameters may be different.
Please also check out the FAQ item about PGP.
You can encrypt your messages sent with KMail, but this does not mean that the attachments are encrypted. You have to encrypt your attachments manually, using a shell command or some other tool before you attach them.
KMail has to rely on PGP's output. This output is often different between different versions of PGP, so it's important that you test if encryption really works with your setup before you start using it seriously. KMail might not warn you if something fails. You better enable Show ciphered/signed text after composing.
To setup and use PGP support in KMail it is necessary to have PGP installed and set up properly. Of course we cannot give you a full introduction of PGP here. We will only mention the steps you have to do to get PGP going. For details you should have a look at the excellent PGP documentation or The GNU Privacy Handbook.
It is certainly a good idea to study this documentation as well as an introduction into public key cryptography (e.g. out of the PGP 6.5.x package). There you can learn a lot about the basic concepts, which will help you to understand what is going on. As well, many security related issues you should know about are discussed there.
Now let's start.
KMail expects that your PGP binary is called pgp. In case of GnuPG, it expects the binary to be called gpg. If that's not the case for you, just make a symlink.
If you haven't done so, you have to generate a key pair (secret and public key) for your identity. You must do this at the command line: use pgp -kg resp. gpg --gen-key. KMail has no internal support for pgp's key generation at this time. The identity (normally your name followed by your email address within brackets, such as John Doe <john@example.com>) and your passphrase are important for the co-operation between KMail and pgp.
Enter your PGP user identity in the corresponding field of the Identity settings. Then select the OpenPGP tab on the Security settings page. There you'll find the following options:
Here you can choose if you want to use PGP, GnuPG or no encryption software at all. Of course the program you select has to be installed on your system. It is also important to select the correct version.
When this option is off, KMail will ask for your passphrase each time you sign a message (before sending) or select an encrypted message. If you turn this option on, KMail will remember your passphrase from after your first successful input until you finish your KMail session. The passphrase is stored in memory and not written to the hard disk.
If this option is off and you want to send an encrypted message to somebody, then you can't read this message any longer after you have composed and encrypted it. Turn this option on to keep sent encrypted messages readable for you too.
This will show you the result of encrypting and signing before the message gets sent. This way you can still cancel sending if encrypting failed. It is strongly recommended to use this option.
This will always open a dialog that lets you choose the key used for each recipient when you are sending an encrypted message. If this option is off, KMail will show this dialog only when it cannot find a key for a recipient.
In the Composer section you can also check the Automatically sign messages using OpenPGP option. This means that all your messages will be signed before being sent. (So you don't have to set the signing option for each message manually.)
Now you are able to 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 PGP key server so that they can fetch your key from there. To send encrypted messages to other people or to verify their signed messages you will need their public keys. You can store your public key(s) on a public PGP key server such as http://www.cam.ac.uk.pgp.net/pgpnet/.
You compose your message as usual in the composer window of KMail. Before you send the message, check the Sign Message icon the toolbar of the composer window. Then, you can send the message. The identity you are using the 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 PGP passphrase. If you didn't select Keep passphrase in memory in the Security section, KMail will ask you for it. On the other hand, if you have already given the phrase to KMail, it will sign the message without any further prompt.
To send an encrypted message to somebody of whom you have a public key, you simply create the message in the composer window. Before you send the message, check the Encrypt Message button in the toolbar of the composer window. Note that you don't have to check the button if Automatically encrypt messages whenever possible is selected in KMail's configuration. Then send the message.
If KMail can't find a matching key for a recipient or if it finds more than one key for a recipient, it will display a list containing all available trusted keys in the Encryption Key Selection dialog. Using the Remember choice checkbox you can save your selection for future messages.
If you are using a key for the first time 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. Here you can select a different key for the recipients and you can also set the Encryption Preference for each recipient. The default option, Encrypt whenever encryption is possible, will automatically encrypt your message if there's a trusted key for each recipient.
As mentioned above, you won't be able to read your own encrypted sent messages if you don't check Always encrypt to self in the setting's Security page. However, note that your own key is not listed in the Encryption Key Approval dialog even if that option is set.
Prepare a message to the person you want to send your public key to. Then choose in the composer window's menu Attach->Attach My Public Key. This will attach the public key you defined for the current identity to the message. Now you can send the message.
Remember that it's not safe at all if you sign the message to make sure that the receiver will get the correct key. There can be a man-in-the-middle attack, as somebody can change the key and sign the message with that other key. That's why the recipient should verify the attached key by checking the key's fingerprint against the one he got in a secure way from you. Have a look at the PGP documentation for further details.
All you have to do is to select the message in KMail. You will be prompted for your passphrase. Then KMail will try to decrypt the message and show you the plain text if the message had been encrypted with your public key. (If not, then you won't be able to read it.) KMail stores the messages encrypted, so nobody can read these messages without knowing your passphrase.
You can receive a public key as an attachment or via http, ftp or a floppy. Before you can 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 pgp -ka filename at the command line if you are using PGP or by typing gpg --import filename at the command line if you are using GnuPG. If the key is not certified with a trusted signature you can't use it to encrypt messages unless you have signed the key with your key (use pgp -ks identity of the key resp. gpg --sign-key identity of the key).
KMail's configuration window enables you to configure KMail in many ways. You can reach it via Settings->Configure KMail....
It is divided into six pages, each of them represented by one of the icons in the list on the left hand side of the dialog. This chapter will describe each page in detail.
You can find a quick introduction to the Identity page in the Getting Started section.
This page allows you to create one or more Identities, i.e. combinations of name, email address and other settings. For example, you can create one identity for business communication and one for personal communication. If you have more than one email address, you can create one identity per address. You will then be able to select an address on a per-message basis.
The page consists of a popup menu named Identity, three buttons to perform some general identity list management and three tabs holding each identity's settings.
The Identity popup will always show at least one identity: the Default identity. You cannot delete and you cannot rename the Default identity.
To rename the currently selected identity, click on the Rename... button. A small dialog will come up asking for the new name of the identity.
To delete the currently selected identity, click on the Remove button and confirm the action in the dialog that pops up.
Please note that the Default identity cannot be renamed and removed.
To add a new identity to the identity list, click on the New... button. A dialog will come up that allows you to select certain defaults for your new identity.
You can reach this dialog via KMail's configure dialog.
You can enter the name of the new identity into the New Identity edit field. This will be the name shown in the identity list.
You can choose how the new identity should be initialized by checking one of the three radio buttons in the middle of the dialog:
All fields of the new identity are cleared or preset with standard values.
Uses the settings of the Control Center's default email profile (you can edit that one under Personalization->Email in the Control Center).
Copies all fields from an already existent identity. You can choose which identity to copy from by selecting the corresponding entry in the Existing identities popup.
The General tab allows you to specify some basic settings for the currently selected identity.
Enter your full name here (sometimes also called display name). Although this field isn't strictly mandatory, it is recommended to enter the correct value here.
Enter your organization here. This field is optional. Most programs will show this information in a separate header field Organization. KMail, however, puts it between parentheses and displays is together with the email address in the From header field.
Enter your email address here (without the display name).
So if your email address is Joe User <joe@example.com>, you should enter Joe User into the Name field and joe@example.com into the Email Address field.
The Advanced tab allows you to specify some rarely used or otherwise specialized settings for the currently selected identity.
Enter the address to which replies to your messages should be sent. Only fill out this field if it is different from your normal address (specified using the Name and Email Address on the General tab), since replies default to the sender's address anyway.
This field is only 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 messages. Note that this field will possibly be deprecated by newer versions of the Internet email standard. Furthermore, some mailing lists overwrite this header field with their post address to make sure that replies go to the list instead of individuals. So the usefulness of this field is very limited and it should only be used in rare cases.
Select here the OpenPGP key key that should be used to (digitally) sign messages when this identity is used. When you click on the Change... button, a key selection dialog comes up where you can select the key to use from the list of secret keys found. If you don't have an OpenPGP key or don't know what that is, you don't need to worry about this setting.
The selected key will also be used as the recipient when you check Always encrypt to self on the OpenPGP tab of the Security page.
You might need to configure your OpenPGP environment first, to make the key selection dialog work. You can do this on the Security page.
Select the folder into which messages should be filed after sending when using this identity.
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.
Select the folder into which drafts should be filed when using this identity.
Select or enter an alternative SMTP server to be used when sending messages using this identity.
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 Network page.
This tab allows you to specify a signature (footer/disclaimer) to be appended to each message sent using this identity.
This type of signature has nothing to do with the (digital) signatures for which you can select the to-be-used key on the Advanced tab. It's just bad wording to call this a signature, but since the term is already used everywhere else, we keep this notation. Just keep in mind that these signatures and digital signatures are two completely different things.
Check the Enable Signature option if you want to be able to append the signature when using this identity. To automatically append it to every new message you also have to select Automatically append signature in the Composer configuration page.
KMail can obtain the signature text from various sources. The traditional way on Unix is to read the text from a file called .signature in your home directory. This file can be shared between several programs, so you get the same signature in each mail program you use.
To read the text from a flat text file you select Obtain signature text from file. Enter the filename in the Specify file edit field or hit the button to the right of it to browse your filesystem. If you want to edit the file, hit the Edit file button.
KMail can also read the signature text from the output of a command. Thus, you can use programs such as fortune to create a new signature text for every message. Everything the program prints onto stdout is catched and used as the signature text.
To read the text from the output of a command you select Obtain signature text from output of command. Enter the command (preferably with full path) in the Specify command edit field or hit the button to the right of it to browse your filesystem.
As a third option, you can enter the signature text directly in KMail's configuration dialog. To do this, select Obtain signature text from input field below and enter the text into the appearing text box.
On the Internet, signatures are by convention separated from the body of the message by a line containing only the three character “-- ” (dash, dash, space). KMail will automatically prepend the signature text with this line if it is not already present in the signature text.
If - for whatever reasons - you do not wish the separator to be included automatically by KMail, simply add it to the signature text yourself.
You can find a quick introduction to the Network page 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 can create as many accounts as you want, though, and assign each one to different identities or decide on a per-message basis.
The Sending tab allows you to define new outgoing mail servers and set some common options.
For basic information, see Setting up your Account: Sending.
When you click Add... or Modify... the Add transport resp. Modify transport dialog will open. For sending via sendmail you can specify a name and the location of the sendmail program. For SMTP you can specify Name, Host, and Port of the server. Server requires authentication will enable the Login and Password fields and the Authentication method buttons on the Security tab. If you are not sure about the security settings you can make KMail test for the best settings by using Check what the server supports.
Confirm before send will pop up a confirmation box every time you send a message.
Send mail in Outbox on check will send all messages from the outbox when you check for new messages.
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, while if Send later is selected, the message is queued in the outbox to be sent later with the File->Send Queued command or automatically when you check your mail, depending on the setting of Send mail in Outbox on check above.
Message property lets you select how your message will be encoded when it is sent. Allow 8-bit means that KMail will send your message in 8 bit ASCII, which means that all special characters such as accented letters will be sent as-is. If MIME Compliant (Quoted Printable) is selected, special characters will be encoded using standard MIME encodings, which may be more portable to other mailing systems than 8-bit ASCII. You normally do not need to change the default.
For basic information, see Setting up your Account: Receiving.
With New Mail notification you can set how KMail will notify you if new messages have arrived. Of course this only makes sense if Enable interval mail checking is activated for at least one account:
Will play a beep sound.
Will show a message box and make KMail the active window.
Will execute the command you enter in the line edit below.
This section allows you to change the type, size and character set of the display fonts. Message body sets the font for the reader pane, Composer sets the font for writing messages in the composer window. There's a separate entry for Message List - Date Field so you can choose a monospaced font for the date field for better readability.
This section allows you to change the color of the text. Recycle colors on deep quoting means that even text that's quoted more than three times will appear in color. Note that the Quoted text colors only work in the message reader, not in the composer.
Show long folder list lets you toggle the long folder list on and off. The long folder list shows folders all the way down the left side of the KMail main window, which lets you see more folders than in the short view, but it takes away some space for viewing the text of the messages. Show color bar activates a bar at the left side of the reader pane that gives you information about the encryption and digital signature about the message. With Display message sizes selected there will be another column in the header pane that shows the messages' size. Thread list of message headers will put all the messages in the header pane in a kind of tree list, so that the replies to a message are directly below that message.
With Message header threading options you can select under which conditions threads should appear open by default (i.e. not collapsed). You can still open/close threads using the +/- buttons if you don't disable that here.
With Display of Date you can choose between several date formats. The Localized Format is the one you can specify in KControl.
Automatically append signature lets you toggle whether to automatically include your signature as defined in the identity page.
Use smart quoting will break long lines but will try to keep the correct quoting (e.g. the ‘> ’ will always be at the start of the line).
Automatically sign messages using OpenPGP lets you toggle whether to automatically sign your messages by default. Of course you can still deselect the icon in the composer window for each message if necessary.
Automatically encrypt messages whenever possible will encrypt every message you send, unless there's no trusted key for the recipient or you turned off using the recipient's key in the Encryption Preference setting of the Encryption Key Approval dialog.
Word wrap at column lets you turn word wrapping on and off in the composer window and lets you set the column at which words will be wrapped (you probably should not need to change the default value, which is 78).
If you don't like the Composer you can use a different editor. Note that the composer window will still open and the external editor will open as soon as you type just one character in the body of the message. If you're done, save the text and exit the editor. The text will now appear in the composer window, where you can send it. Note that your editor may not return immediately, e.g. you have to use gvim -f %f for gvim.
The Phrases tab lets you define the automatically generated lines that are added to message replies, forwarded messages, and the character that's added in front of quoted text. There are special %-denoted characters that will insert certain values. These are also shown at the top of the Phrases section: %D to insert the date, %S to insert the subject, %F to insert the sender, %% to insert a percent sign, %_ to insert a space, and %L to insert a line break. You can add reply phrases in languages other than your default KDE language using the Language button. This will only work for languages whose i18n package you have installed.
This section contains a list of prefixes for ‘Reply’ and ‘Forward’. If you receive messages that use prefixes different to the standard ones, you can add them here so KMail will recognize them. This way KMail can ignore them for sorting messages and when setting the subject of a reply, and optionally replace them with ‘Re:’.
Here you can manage the default charsets used for your own messages. Every message you send will be checked if it's written in one of the listed charsets, starting at the top of the list. If it is, this charset will be used. If it isn't, a dialog will show up and tell you that you manually have to choose a charset using Options->Set Encoding.
If you select Keep original charset when replying or forwarding, the original message's charset will be kept, unless there are now characters that cannot be represented using that charset.
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 that you specify is world-wide unique. The best thing is to use the name of a domain which you are the owner of. If you don't check Use custom Message-Id suffix then KMail will automatically generate the complete Message-Id. If you don't know what this is all about don't check this option.
The Define custom mime header fields list sets the headers that KMail will use for its outgoing messages. You can both invent new fields and overwrite existing ones. This feature is only useful for advanced users.
Prefer HTML to plain text will show HTML messages with their HTML formatting and layout. We strongly recommend to leave this option off, as security problems with HTML might show up. When this option is off, you can still read HTML messages, but only as plain text.
With Allow mails to load external references from the net turned on, KMail can load external images, style sheets etc. from the Internet when you look at an HTML message. We strongly recommend to leave this option off (although it has no effect if you only view plain text messages). By adding external references to their messages, people sending spam can detect that and when you have looked at their message. Note that this option has no effect on Java™, JavaScript and Plugins - these are disabled anyway and cannot be enabled at all.
Automatically send receive and read confirmations will automatically send a confirmation (in form of a new message) to the sender of a message if he requested that. If you leave this option off, no confirmation will be sent. We recommend to leave this option off. If you want to send confirmations to certain people you can do so by using the confirm delivery filter action.
For the OpenPGP tab please see the OpenPGP section.
To empty a folder means that its messages get transferred to the trash folder (and only get deleted if they are already in the trash folder). So although you normally won't lose any mail, you can still activate a confirmation dialog that will ask you if you really want to empty the folder.
This will pop up a confirmation dialog before messages are expired (e.g. on exit).
When you press one of the shortcuts to find new messages (e.g. Space) and this option is activated, KMail will not jump to the next folder, but instead try to find new messages at the top of the current folder.
Here you can set the default format for new folders. You can still change it for each new folder in the Create Folder dialog.
On program exit, perform the following tasks:
This will compact all folders every time you exit KMail. Compacting folders means that the messages you deleted will really be removed.
The trash folder is cleared of messages when you quit KMail if this option is selected. The following two options are disabled, if this one is enabled.
Delete old messages from all folders, according to the rules in each folder's Properties dialog (the default is not to delete old messages at all).
Each 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.
Creates a new main window.
Saves the currently displayed message to a text file, including all the headers and attachments.
Prints the currently displayed message.
Will compact all folders, i.e. it will really move and delete the messages on disk according to how you have moved and deleted them in KMail.
Delete old messages from all folders, according to the rules in each folder's Properties dialog (the default is not to delete old messages at all).
Checks for new messages in all your accounts, except those that have Exclude from "Check Mail" enabled.
Submenu that lets you check for new messages from a particular account.
Sends the messages that are in your outbox.
Starts up kmailcvt (which is part of kdenetwork). This application lets you import messages from several proprietary mail clients to KMail.
Closes the current main window or exits KMail if there's only this one window.
Revoke you last move or delete action. Note that you cannot undo a deletion in the trash.
Copies selected text to the clipboard.
Moves the selected messages in the trash folder. If the selected messages are already in the trash folder, they will really be deleted.
Opens up a search window that lets you search for messages with certain characteristics, e.g. a certain subject. Start the search by entering some values and press Search. Click on one of the resulting messages and it will appear in the Message pane.
Lets you search for a string in the current message.
Selects all messages in the current folder.
Selects the text of the currently displayed message.
Changes the number of headers that are displayed and the format of the headers in the Message pane.
Changes the way that attachments appear in the Message pane. With Iconic Attachments all attachments appear as icons at the bottom of the message. Inlined Attachments shows the attachments at the bottom of the message. Attachments that cannot be displayed, e.g. compressed files, will still be shown as an icon. Smart Attachments will show attachments as icons, unless they are so-called inline attachments.
Uses a fixed width (monospace) font to display the messages in the current folder. The font to be used can be configured in the Appearance section of KMail's configuration dialog.
Opens the Create Folder dialog which lets you create a new folder. You can make this new folder a sub folder if you choose a parent folder using the Belongs to selection. The folder can be either in mbox or in maildir format. mbox saves all messages of one folder to one file, whereas maildir saves each message to its own file. maildir can be considered more robust, but it can be slower on some file systems. Note that there's currently no feature in KMail that allows to convert between both formats automatically (but you can just move all messages from an old mbox folder to a new maildir folder).
If you're going to use the folder for a mailing list you may want to add the mailing list address in the Associated Mailing List section. You will then be able to use the Message->Reply list... menu item. It will open a reply with the mailing list address in the To: field (i.e. it will ignore the Reply-To of the message). You can also click the middle mousebutton in the Folders pane to post to a mailing list that is associated with that folder.
The Old Message Expiry section lets you automatically delete old messages when you exit KMail (depending on your settings in KMail's Miscellaneous configuration page) or via File->Expire All Folders.
With the Identity section you can set your default identity for new messages. Replies to messages that where sent directly to you will still default to the message's “To” address if an according identity is found.
With Show Sender/Receiver you can set the visible columns in the header pane. This is useful if you use the current folder for your own sent messages.
Opens up the Modify Folder dialog which lets you change the settings for the selected folder.
Sets the status of all new and unread messages in the current folder to read.
Compacts the folder file to reduce its disk space usage. Use this command if your mailboxes seem to be much larger than they ought to be.
Delete old messages from the current folder, according to the rules in the folder's Properties dialog (the default is not to delete old messages at all).
Moves all of the messages in the selected folder into the trash folder. If the selected folder is the trash folder, the messages are permanently deleted.
Removes the selected folder and all its contents.
Note that there's no way to access the contents of a folder after it has been removed.
This will show HTML messages using HTML rendering. For security reasons, we recommend to only activate this for trusted messages.
Shows the messages in the Header pane in a tree-like list, with replies showing up directly under the message they reply to.
Opens the composer window so you can write a new mail. If the current folder holds a mailing list and has a Post Address defined, this address will be default To: address.
Selects the next message in the Headers pane. The keyboard shortcut Right Arrow also performs this action.
Selects the next unread message in the Headers pane.
Selects the previous message in the Headers pane.
Selects the previous unread message in the Headers pane.
Opens up the composer window with the contents of the selected message's Reply-To field in the To: field. By default this will automatically set your identity to the one which this message was sent to.
Opens up the composer window and copies the contents of the selected message's Reply-To: and To: fields into the To: field, and the Cc: field into the Cc: field of the composer window.
Opens up the composer with the To: field set to the mailing list address. Of course this will only work if you configured the current folder to be associated with a mailing list. Otherwise the To: field will be empty.
Opens up the composer to reply but does not quote the text of the original message.
Forwards the message to a new recipient. The message's text and some important header fields will be copied to the body of the new message with a text marking the forwarded part. Attachments will be forwarded, too.
Forwards the message to a new recipient as an attachment. The original message headers will be included in the forwarded message, too. Attachments in the original message will also be in the forwarded message's attachment.
Works like forward, except that the message stays the same (even the From field). The user who redirected the message is added in special header fields (Redirect-From, Redirect-Date, Redirect-To, etc.).
Sends the message back to the sender with a notice that it cannot be delivered. This is nearly exactly the message you get from a mail relay if the user does not exist. Some people use this option to “reply” to spam.
Opens a composer window with this message so it can be sent again.
Lets you choose the character encoding to be used in the Message Pane. The default, Auto, should work in almost all cases.
Edits the selected message if it is editable. Only messages in the outbox and drafts folder can be edited.
Opens up the Filter dialog with a new filter added. This new filter is based on fields of the current mail, depending on which sub menu you select.
Allows you to change the status of the selected message to one of the following states (more than one status per message is currently not supported):
Status | Symbol | Meaning |
---|---|---|
New | Red dot | The message has been received for the first time, and is unread. |
Unread | Green dot | The message has already been retrieved off the server at least once, but has not yet been read. |
Read | Dash | The message has been read. |
Replied | Blue u-turn arrow | A reply to this message has been sent. |
Queued | Envelope | The message has been queued in the outbox to be sent later. |
Sent | Angled envelope | The message has been sent. |
Important | Flag | 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. |
Allows you to change the status of all messages in a thread. The possible states are the same as for Message->Mark Message.
Moves all of the selected messages to a certain folder.
Copies all of the the selected messages to a certain folder.
Applies your filters to the selected messages.
Shows the message and its complete headers in plain text format in a new window. This can be useful to find out the origin of a mail. You should know that it's easy to fake the From: header of a mail, but one can still find out which mail servers have been used by looking at the Received: lines in the header.
If enabled, the Toolbar is visible (the Toolbar is the one with the icon to compose a new message etc.).
If enabled, the Statusbar is visible (the Statusbar is the small one on the bottom which shows useful short messages and link targets).
Opens a window that lets you configure the keyboard shortcuts for many menu commands.
Opens a window that lets you choose which icons are visible in the toolbar.
Opens the Configure window.
Opens the Message Filters window.
Opens the Configure Pop Filters window.
Invokes the KDE Help system starting at the KMail help pages. (this document).
Changes the mouse cursor to a combination arrow and question mark. Clicking on items within KMail will open a help window (if one exists for the particular item) explaining the item's function.
Opens the Bug report dialog where you can report a bug or request a “wishlist” feature.
This will display version and author information.
This displays the KDE version and other basic information.
Sends the message immediately. If you use SMTP to send your messages and the SMTP server is not reachable, the message will be put into the outbox and you will get an error message. You can then later send the messages in the outbox using File->Send Queued.
Queues the message in the outbox for sending it later using File->Send Queued.
Save the message in the drafts folder so you can edit and send it later.
Inserts a text file into the message, starting at the cursor position.
Prints the current text.
Opens up the address book.
Opens up a new composer window.
Closes this composer window.
Undo your steps in editing the current mail.
Redo your steps in editing the current mail.
Cutting text works as with most editors. You can also select text and drag it to a new position.
Copying text works as with most editors. You can also select text while holding the Ctrl key, and drag it to a new position, to have it copied and not cut.
Pasting works the same as for most editors.
Selects all of the text in your message.
Finds strings in the message.
Lets you replace strings in your message with other strings.
This replaces multiple line breaks resp. spaces with single line breaks resp. spaces. It works on the current selection or on the complete message if there is no selection.
Uses KSpell to check the spelling in the body of your message. Note that you have to configure KSpell with Settings->Spellchecker... if you use it for the first time.
This menu lets you toggle the display of the header fields and other options in this composer window.
Options available are:
All Fields
Identity
Sent-Mail folder
Mail Transport
From
Reply To
To
Cc
Bcc
Subject
Currently visible items have a checkmark shown next to their name in the menu.
Uses a fixed width (monospace) font to display the messages in the current folder. The font to be used can be configured in the Appearance section of KMail's configuration dialog.
Sets the priority of the message to Urgent. The receiver's mail client has to support this or it will have no effect. KMail itself does not support priorities for incoming messages.
If you choose this option, you request a confirmation email once your message is successfully delivered to its destination mail server. This has to be also supported from the receiver's side in order to work.
If you choose this option, you request a confirmation email once your message is downloaded and read by its recipient. This has to be supported and enabled by the receiver's mail client in order to work.
Digitally sign the message using OpenPGP. You can learn more about this in the chapter on OpenPGP.
Encrypt the message using OpenPGP. You can learn more about this in the chapter on OpenPGP.
Set the charset encoding of this message. The chosen encoding will appear in the header of the outgoing mail. You can use Auto for almost all cases, KMail will tell you if you need to select a different encoding manually.
Toggle the automatic wordwrap. It may be useful to turn it off if you want to paste long lines that shouldn't wrap.
This menu lets you select attachment options.
Appends your signature (“footer”) to the end of the message.
Attaches the corresponding PGP/GnuPG key to your message using the default encoding.
Attaches your PGP/GnuPG public key to your message using the default encoding.
Attaches a file to the message using the encoding you select in the dialog. The dialog allows to select more than one file using the Ctrl key.
Removes the attachment that is selected in the attachment window.
Saves the attachment that is selected in the attachment window to a file.
Displays the properties of the attachment that is selected in the attachment window.
If enabled, the Toolbar is visible (the Toolbar is the one with the icon to send the message etc.).
If enabled, the Statusbar is visible (the Statusbar is the small one at the bottom which shows useful short messages).
Opens a window that lets you configure the keyboard shortcuts for many menu command.
Opens a window that allows you to decide which icons appear in the toolbar.
Allows you to configure KSpell, KDE's spellchecker.
The entries in this menu have the same meaning as the entries in the Mailreader's help menu.
6.1. | Why aren't my filters applied to incoming messages of IMAP accounts? |
Because KMail currently doesn't support this. You should use server-side filtering (ask your admin for how to install filters on the server and in which format), since IMAP is all about managing your emails on the server. Unfortunately, although there exists a mail filter language (Sieve, defined in RFC3028), there is no standardized access protocol for installing or editing server-side Sieve scripts. If such a protocol becomes available in the future, KMail will most probaly include support for it. | |
6.2. | I cannot add addresses to my address book after upgrading to KDE 3.0. |
You probably copied your old kmailrc file manually. That's not necessary, there's a script that will do such things when you run KDE 3.0 for the first time. To fix the problem, remove the complete “[AddressBook]” group and the addressbook option in group “[General]” in your kmailrc file. However, chances are you'll also encounter other problems that the config update script was to solve. | |
6.3. | Can I use KMail together with a different mail client, e.g. mutt? |
If you're using the mbox format for your folders it's not possible to use a different mail 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 to use the maildir format in this case, this should solve all problems. | |
6.4. | How can I convert my mailboxes from mbox to maildir? |
There's no automatic way to do that. You'll have to create a new folder in maildir format and 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.5. | How can I use a different browser than Konqueror to open links in messages? |
Change the File Associations for HTML files using KControl. | |
6.6. | How can I remove attachments from messages without removing the message itself? |
This is currently not supported. As a workaround, move the message to the drafts folder, double click on it in order to open it in the composer, remove the attachments, save the message again to the drafts folder, move it back to its folder. The disadvantage of this workaround is that the date will be changed to the current date. Some other headers might also be changed. | |
6.7. | How can I make KMail to check for new messages at startup? |
Start KMail with kmail --check. | |
6.8. | Why does KMail get slow / stop working when I try to send big attachments? |
KMail is known to have problems with large attachments. We are working on a solution for this problem for KDE 3.1 but currently it temporarily consumes virtual memory of about 10-15 times the size of the attachment. That means that if you attach a 2MB file KMail might temporarily need about 20-30 MB of virtual memory (= RAM + swap space). If you don't have enough virtual memory this will lead to problems. | |
6.9. | Where does KMail save my settings? |
All KMail settings are stored in $KDEHOME/share/config/kmailrc, where $KDEHOME is typically ~/.kde. | |
6.10. | Where can I get a list of changes between the versions of KMail? |
The welcome screen lists all important changes for your version. It is displayed when you start a new version of KMail the first time. You can always look at it again by selecting the root element of the folder list, i.e. Mail. | |
6.11. | Can I configure the location of my mail directory? |
Exit KMail, make a backup of ~/.kde/share/config/kmailrc, then open it with an editor and add e.g. folders=/home/username/.mail to the “[General]” section. Then move all your existing folders (including the hidden index files) to the new location. The next time you start KMail it will use /home/username/.mail instead of /home/username/Mail. Note that KMail will lose its filters if you change the mail directory's location but forget to move your existing folders. | |
6.12. | How can I use mail folders that are not in ~/Mail/? |
Simply create a symlink in your ~/Mail directory using ln -s /somewhere/Mail/mymailboxfile ~/Mail/remote. When you start KMail you will see a new folder with the name remote that contains the messages in your remote folder. If you want to add a whole remote mail directory use ln -s /somewhere/Mail/.remotedir.directory ~/Mail/.mymailboxfile.directory. | |
6.13. | The button to sign messages is not enabled anymore, it was enabled some time ago. |
Select your OpenPGP Key in the Identity section of KMail's configuration dialog. Otherwise KMail can't know which key should be used to sign your messages. | |
6.14. | I'm one of those people whose mails consist of 100 quoted lines and one line written by myself. For some reason this annoys other people. Can KMail help me and make everyone's life better? |
Sure. Just select a short relevant part of the original mail with the mouse before you reply. Only this part will then be quoted in your reply. | |
6.15. | For some messages the value in the Date field is unknown or it's not correct. |
Probably the “Date:” header of these messages is broken, maybe it lacks the time zone information. For this case we've added a workaround to mimelib. Mimelib is part of the kdenetwork package, you should make sure that KDE's mimelib is used and not a different one on your system. If that doesn't help, the “Date:” field is really broken and KMail cannot interpret it. That's not a bug in KMail but in the software that sent the mail. | |
6.16. | 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 a common standard. If your signature does not already have this separator, KMail will automatically add it. | |
6.17. | KMail fetches the same messages over and over again. |
This happens if you have Delete mail from server deselected and your POP3 server doesn't support the UIDL command. There's currently no workaround besides selecting Delete mail from server. A more detailed explanation can be found in this mailing list post. | |
6.18. | Are there any known bugs in KMail? |
You can find a list of submitted bugs at bugs.kde.org. Note that not all these bugs are valid. All in all we think that KMail is now a very robust piece of software. WarningHowever, you should not run KMail while another mail client is already accessing the files in ~/Mail. If you try to do so, you might lose messages. Note that you should make backups of your messages anyway. | |
6.19. | My folders keep growing even when I delete messages. |
To really remove deleted messages from disk, you have to compact your folders using File->Compact all folders (by default this will also happen every time you exit KMail - note that it does not work when leaving KMail via KDE's session management). | |
6.20. | KMail doesn't display HTML mail as HTML, I can only see plain text. |
Select Folder->Prefer HTML to plain text. For security reasons you should only do so for trusted messages. Note that plugins (like Macromedia® Flash), Java™ and JavaScript will not be displayed in KMail for security reasons and there's no way to activate them. | |
6.21. | 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 can only run one instance of KMail at once. We also recommend to stick to a certain version and not switch back and forth between different versions. Downgrading to an older version will probably cause problems, e.g. because the index file formats might have changed. Upgrading should never be a problem. | |
6.22. | Does KMail support uuencoded files? |
No. However, you can handle them using a filter, which is described in this posting to the mailing list. | |
6.23. | KMail crashed while I was writing a mail. So this mail is lost now? |
KMail tries to save your mail to ~/dead.letter in case of a crash. The next time you start KMail the mail composer should appear with your mail again. If it doesn't, try to open ~/dead.letter with an editor. If it doesn't exist, the crash was so bad that KMail couldn't save your mail. | |
6.24. | When I try to set a folder to be mailing list-aware, it does not do anything when receiving an email from the list. |
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 associated a folder with a mailing list you can use Message->Reply List... or Message->New Message... and the mailing list address will be set in the To: field. | |
6.25. | My SMTP server requires authentication. Does KMail support it? |
There are two common techniques used for SMTP authentication: “SMTP after POP3” and “SMTP Auth”. “SMTP Auth” can be set in the General tab of the SMTP configuration dialog. To use “SMTP after POP3” you have to collect all your messages in the outbox and send them just after you have fetched new mail. | |
6.26. | Can I use KMail and procmail? |
Yes, but it's important to do it the right way or you might lose mail. In order to use procmail and KMail you need to set up KMail so that it will fetch new mail from the spoolfiles in which procmail drops your mail. Do not set up procmail to deliver mail in a KMail folder, this cannot work. For each procmail spoolfile, you then need to create an account from which KMail will fetch new mail. You also need to make sure you specify the right lockfile name for this account. When setting up an account, KMail will do some minimal parsing on your .procmail file, and will try to list every spoolfile it has found, and also the lockfiles next to the procmail lockfile item. procmail lets the user specify lockfiles in three different ways, so there's no way to establish a correspondence between the spoolfiles and lockfiles. So it's really up to you to make sure you specify the right lockfile for each spoolfile. | |
6.27. | What should I know if I want to use PGP/GnuPG with KMail? |
KMail provides a simple and easy to use interface for basic functions of these programs. Still you should understand how these programs work and what might make their use insecure. Some important issues:
| |
6.28. | Spellchecking doesn't recognize non-English characters. |
Before you can use spellchecking the first time, you have to configure it. You can do so in the composer window's menu under Settings->Spellchecker.... You can set the dictionary and the encoding there. | |
6.29. | How do I use my Eudora/Netscape®/Outlook/... mail folders in KMail? |
See the section Using other Mailbox files With KMail. | |
6.30. | 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: ssh -L 11000:127.0.0.1:110 user@host Modify your KMail configuration to fetch the mail via POP3 from localhost and ssh will tunnel the connection for you. NoteIf non-encrypted messages have already been sent via Internet, the only advantage of using ssh is that your password will be sent encrypted to the POP3 server. | |
6.31. | Does KMail lock the folders it uses? |
KMail does not lock the files in ~/Mail. To avoid the risk of losing mail if using a local account it is necessary to ensure that KMail uses the same type of locking as your mail delivery agent. There are five different locking options you can use:
Procmail lockfile will use a small utility that comes with procmail called lockfile. You can use this if your mail folder is in a directory where you have write permission. This will not work on your /var/spool/mail/user file in most cases. It will create .lock files on your account when KMail is checking for new mail. Please note that this will only work if procmail is installed on your system. Mutt dotlock and Mutt dotlock privileged will 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 regards to the /var/spool/mail/ folders. However, the Mutt dotlock privileged option can create lock files in the /var/spool/mail directory. mutt_dotlock is a setgid program and this option will run it in setgid mode. Please note that these options will only work if mutt is installed on your system. FCNTL will use the fcntl() system call. If you don't want to use any locking, the none option is what you want. However, there are risks of losing mail when no locking is used. | |
6.32. | How do I leave messages on the server? |
See the Download filters chapter. If you want to leave all messages on the server: open up the Settings->Configure KMail... window. Click on the Network page. Select your account from the account list and click the Modify... button. This dialog contains the Delete mail from server setting which you must not select. | |
6.33. | How do I automatically insert a text footer within my messages? |
The text footer is called a signature file. Select Settings->Configure KMail... Look in the Identity page for the Signature tab and add your signature there. | |
6.34. | Why does KMail keep asking me for the location of my signature file? |
KMail will ask you for the location of your signature file if you have checked the option Automatically append signature in the Composer page of the Configure KMail... dialog, but you have not specified a valid signature file in the Identity page. You should either specify a signature file that really exists or deselect Automatically append signature. | |
6.35. | How do I set up sendmail® to work with KMail if I have a dial-up connection? |
First you should check if your Linux®/BSD/whatever distribution can do this for you. It probably has already been set up during installation. If that's not the case, you may want to have a look at the Mail Queue HOWTO or at UCT Linux User's group page on configuring sendmail for Dial-up connections. | |
6.36. | 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: dcop kmail KMailIface. Some documentation is also available in kdenetwork/kmail/kmailIface.h and kdenetwork/kmail/mailcomposerIface.h. |
KMail offers an import tool for the messages and address books of some other mail clients. You can access it using File->Import.... Please make sure that you compact your folders in the other mail client, no matter if you are going to use the import utility or if you are going to copy files manually. You only need to read this chapter if this tool does not work for you.
This section is for all of the users who need to move email messages from their previous email client over to KMail. KMail can store its mail using the mbox format, one of the most widely used mailbox formats on UNIX® systems. Mbox mailboxes store messages in one file, identifying where messages start and end with a From line (do not mix this up with the From: header that contains the message's sender). For many UNIX® mail programs, all you must do is move your mailboxes to ~/Mail (or make Mail a symbolic link to the folder containing your mailboxes), make sure they are writable by your user, and launch KMail. The mailboxes should now show up correctly in KMail.
Please have a look at the Download section of KMail's homepage first, to see if there's a tool that imports your mailbox and maybe even address book.
Do not use a second mail client that accesses the files in ~/Mail while KMail is running or you might lose messages. This section only explains how to import mailboxes to KMail once, it's not useful to you if you're planning to use several mail clients for your mailboxes in the future.
Eudora uses the mbox format in its mail files. To use them with KMail, make sure that your Eudora mailboxes have been compacted, then copy the .mbx files (Windows® Eudora) or Eudora mailbox files (Mac® Eudora) to your ~/Mail directory. You don't need to copy the index files. Once you start KMail, the mailboxes should appear in the Folders pane and the messages should be accessible in the Headers pane.
If messages do not appear in the Headers pane, your mailbox files may still contain Windows® or Mac® line feed characters. Use your favorite text editor, the recode command or a scripting language to change the Windows® or Mac® line feeds to UNIX® line feeds.
This format is close enough to the mailbox format that KMail should be able to use these mailboxes if you just copy them to your ~/Mail directory. However, MMDF mailboxes have not been tested with KMail, so your results may vary. If you can get this format to work with KMail, please let us know so we can include more specific directions in the next documentation release.
MH mailboxes are directories containing files that correspond to each message in that mailbox. A shell script to convert MH mailboxes to mbox mailboxes, mh2kmail, is included at least in the source releases of KMail, but maybe not in the packaged releases. Running this script on a MH folder will convert it to an mbox file. We strongly suggest that you back up your MH mail folders before you use this script.
In Agent:
Procedure 7.1.
Select the messages to export
Select FILE->SAVE MESSAGES AS
Mark the UNIX FORMAT and SAVE RAW boxes
Give File a .txt extension and save.
In KDE:
Procedure 7.2.
Move previously saves file to correct ~/Mail folder
Rename file without .txt extension
When you open KMail the new folder with appropriate messages will be there.
If you are using Netscape® 4.x, the mail files should be found in ~/nsmail. If you are using Netscape® 6.x, they're buried in a directory deep in the ~/.mozilla subdirectory, something like: /home/user_name/.mozilla/user_name/2ts1ixha.slt/Mail/Mail/server_name (The 2ts1ixha.slt string will probably vary, so check it on your own system.) The [...]/Mail/Mail directory contains one subdirectory for each account from which you receive mail through Netscape (e.g. [...]/Mail/Mail/math.university.edu); you'll need to copy files from each of them if you want everything to be accessible under KMail.
If you have no subfolders, just copy all of the Netscape® files to ~/Mail, make sure that they are writable (only by your user, of course), and restart KMail: all of the messages will now appear in KMail folders. (Note that if you use a command like cp * ~/Mail, you should follow it with rm -f ~/Mail/*.msf; every Netscape® 6 folder has a corresponding .msf file, and if you don't get rid of them you'll have a bunch of spurious empty folders.)
If you were using subfolders under Netscape® (e.g. a main folder called Work with subfolders called Jim and Nancy), there are additional steps required. First, create the main folder (Work) in KMail and create a temporary child folder under it (by right-clicking on the folder name and selecting Create child folder); it doesn't matter what you call this folder -- dummy or the default unnamed, for example. Once a child folder has been requested, KMail creates a hidden directory in ~/Mail called (in this example) .Work.directory. You can then copy your Netscape® subfolder files (Jim and Nancy) into ~/Mail/.Work.directory, and restart KMail; the child folders will appear under the main folder Work. Of course, this procedure may be extended for sub-subfolders, to any depth. (You can remove the temporary child folders afterwards, unless it amuses you to have a Work subfolder called dummy.)
Pegasus for win32 uses single files for Mail folders similar to KMail. Pegasus mail folder files have the extension .pmm but they are the same format as mbox except the messages do not start with the From header, but with a control character. To work around this, replace each instance of the control character with From aaa@aaa Mon Jan 01 00:00:00 1997. This From line should be the first line of every message, before the Received: and other headers. Make sure to use a text editor that lets you save the files in UNIX® format or create new folders in Pegasus that are in UNIX® format and copy your messages there.
Tools to convert these formats are available at the Download section of KMail's homepage.
First you should have a look at Download section of KMail's homepage if there are tools to convert your messages.
Mail programs not listed here or on the homepage probably do not work with KMail as they use proprietary mail formats that KMail cannot understand. However, there is no harm in trying! If the mailbox file looks similar to the mbox format, try copying the mailbox file (remember, the index file is not needed) to your ~/Mail directory and see what happens if you start KMail. If you get mailboxes from your favorite mail client to work in KMail, please tell us how you did it so that we can include directions in a future revision of this documentation.
KMail: Copyright the KMail developers, 1997-2002
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.
Michael Häckel <haeckel@kde.org> (current maintainer)
Don Sanders <sanders@kde.org>
Stefan Taferner <taferner@kde.org>
Ingo Klöcker <ingo.kloecker@epost.de>
Marc Mutz <mutz@kde.org>
Daniel Naber <daniel.naber@t-online.de>
Andreas Gungl <a.gungl@gmx.de>
Toyohiro Asukai <toyohiro@ksmplus.com>
Waldo Bastian <bastian@kde.org>
Carsten Burghardt <carsten.burghardt@web.de>
Steven Brown <swbrown@ucsd.edu>
Cristi Dumitrescu <cristid@chip.ro>
Philippe Fremy <pfremy@chez.com>
Kurt Granroth <granroth@kde.org>
Heiko Hund <heiko@ist.eigentlich.net>
Igor Janssen <rm@linux.ru.net>
Matt Johnston <matt@caifex.org>
Christer Kaivo-oja <whizkid@telia.com>
Lars Knoll <knoll@kde.org>
J. Nick Koston <bdraco@darkorb.net>
Stephan Kulow <coolo@kde.org>
Guillaume Laurent <glaurent@telegraph-road.org>
Sam Magnuson <sam@trolltech.com>
Laurent Montel <lmontel@mandrakesoft.com>
Matt Newell <newellm@proaxis.com>
Denis Perchine <dyp@perchine.com>
Samuel Penn <sam@bifrost.demon.co.uk>
Carsten Pfeiffer <pfeiffer@kde.org>
Sven Radej <radej@kde.org>
Mark Roberts <mark@taurine.demon.co.uk>
Wolfgang Rohdewald <wrohdewald@dplanet.ch>
Espen Sand <espen@kde.org>
George Staikos <staikos@kde.org>
Jason Stephenson <panda@mis.net>
Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
Roberto S. Teixeira <maragato@kde.org>
Ronen Tzur <rtzur@shani.net>
Mario Weilguni <mweilguni@sime.com>
Wynn Wilkes <wynnw@calderasystems.com>
Robert D. Williams <rwilliams@kde.org>
Markus Wuebben <markus.wuebben@kde.org>
Thorsten Zachmann <t.zachmann@zagge.de>
Karl-Heinz Zimmer <khz@kde.org>
Update for KMail 1.2 to 1.4 by Daniel Naber <daniel.naber@t-online.de>, OpenPGP chapter by Andreas Gungl <a.gungl@gmx.de>, message filter chapter by Marc Mutz <mutz@kde.org>, download filter chapter by Thorsten Zachmann <T.Zachmann@zagge.de>. Other parts have been contributed by various KMail developers.
KMail 1.0 documentation by David Rugge <davidrugge@mediaone.net>. Original documentation by Markus Wuebben <markus.wuebben@kde.org>, Robert Williams <rwilliams@kde.org> (Editor).
Thanks to Michael Elkins <me@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 mail client mailboxes with KMail:
David McMillen <mcmillen@math.bu.edu> and Mendel Mobach <mendel@mobach.nl> (Netscape® mail)
Ed Shapard <shapard@bigfoot.com> (Pegasus Mail)
Ray Muir <rjmuir@ibm.net> (Forte Agent)
KMail is part of the KDE project http://www.kde.org/.
KMail can be found in the kdenetwork package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.
In order to compile and install KMail on your system, type the following in the base directory of the KMail distribution:
% ./configure % make % make install
Since KMail uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.