# Frequently Asked Questions (&FAQ;)

How can I set Firefox as my default browser?

Problem: You want to click on a link in &kmail; and have the link opened in Firefox. At the moment, another browser is used. You want to change this.

Solution: This change will affect all of &kde;, not just &kmail;. Select &systemsettings;Default Applications Web Browser Mozilla Firefox.

If you are an administrator and want to make this setting automatically for your users, do this.

- Run

      # qtpaths --paths ConfigLocation

  in a terminal. This will display the path(s) leading to configuration files for KDE programs in your system. Use the path starting in each user's Home directory, and locate the file named `kdeglobals`, then add this line under category [General]:

  `BrowserApplication[$e]=firefox.desktop`

You can also try the script in Tutorials/ Modify_KDE_Software_Defaults

The actual physical location of configuration variables is distribution dependent. Do not be surprised if some of the instructions about modifying configuration variables documented in the &kde; wiki will not work for you. The public forum (online) for your distro is a good place to seek help.

How do I control my Roaming profile's connection?

Problem: You set up a Roaming profile so you can access your home server while you are on the road, but it keeps trying to connect even when you are at home. Auto-connection is disabled in the setup screens.

Solution: Navigate to Settings Configure KMail Accounts Receiving (tab) (select the account to exclude)Retrieval Options , then uncheck Include in Manual Mail Check. This will exclude that profile when you hit the download icon, but the account will still be available from the drop-down list, making it easy to retrieve your mail when away from home.

How do I store sent messages in a special folder?

Problem: You want to store the messages you have sent in a special folder. Maybe you are using an &IMAP; server and wish to store your sent mail on the server, not in a local folder.

Solution: In &kmail;, navigate to Settings Configure KMail Identities(Choose an identity)Modify Advanced Sent-mail folder and select the folder you want to use.

Alternatively, you can use the Sent-Mail Folder field (accessible via the View menu in the composer window) to override the default sent mail folder for a particular message.

How do I move trash email messages to a special folder?

Problem: You want to store trash in a special folder. Maybe you are using an &IMAP; server and want trashed email messages to be stored on the server, not locally.

Solution: In the settings dialog select an &IMAP; account on the Accounts page. Click on Modify and change the trash folder location via the Advanced tab.

How can I store encrypted messages in unencrypted form?

Problem: You exchange encrypted mail with a friend, but would like to store your own copy unencrypted, once you have opened the message.

Solution: To store emails that have been decrypted once in unencrypted format thereafter, add this item to your `kmail2rc` configuration file, in the [Reader] section:

`store-displayed-messages-unencrypted=true`.

How do I filter spam on an &IMAP; server?

Problem: You intend to read your mail from an &IMAP; server, and wonder how filtering and spam handling will occur.

Solution: The machine that already has your mail can become your &IMAP; server. You will have to configure a server application. Dovecot is one such, and the guidance on the project web pages make it relatively simple to set up. That still leaves you with the problem of filtering, as it makes sense to do that on the server (when you point &kmail; at the server you will see the folders that have been created on that system). There are several options. One of the best known is Procmail. Another one is Imapfilter. There is plenty of information on the internet about setting these up. Further discussion of these OSS packages is beyond the scope of &kmail;'s documentation.

How can I get more screen space in &kmail;?

Problem: You are using &kmail; on a laptop or notebook, and find that the new Aggregation display leaves you too little screen space.

Solution:If you want to change the message list so each message uses a single line instead of two lines, go to View Message List Theme and change the theme to Classic. If you want to disable grouping by date, change the aggregation using View Message List Aggregation to Standard Mailing List. Now your &kmail; will look exactly like it did in early versions of the program.

In Settings Configure &kmail; Appearance Fonts you can select Use custom fonts to change the setting for the message list. You can also set the font size in the Use custom fonts dialog.

How can I turn &kmail; folder tool tips off?

Problem: You are using &kmail; on a laptop or notebook, and find that the tooltips that pop up hide too many folder names

Solution: Right-click on the "Name" header above the Folder List and check Never under Display Tooltips.

How can I hide the message list tool tips?

On &kmail;, Settings Configure KMail Appearance Message List tab, uncheck General Display tooltips for messages and group headers

Alternatively, right-click one of the headers above the message list and clear the check box labeled Display Tooltips.

The headers above the message list do not appear if you have chosen the "Smart" theme.

How do I transfer my mail and settings to another computer (or to another user account on the same machine)?

Use Tools Import/Export &kmail; Data... to import and export settings and data. Please see PIM Setting Exporter for details.

Why can't I copy my email folders to a USB stick?

Problem: You are setting up a new computer and want to transfer all your mail. You decide to copy everything to a USB stick. The job starts, then you get a failure message:

    Unable to copy ............ Invalid argument

Solution: Your usb stick is VFAT formatted, and therefore it can't handle maildir folder names (nor can it handle permissions, which can cause many other problems). You have two choices. Either format your USB stick as ext2 (or ext3 / 4 -- in which case you should be aware it can't be read by &Windows; without installing additional software) or create a .tar or .zip file of your mail, then copy that to the stick and extract the archive on the new host.

Why are my filters not applied to incoming messages from &IMAP; accounts?

Normal &IMAP; mode does not support filtering, but the new disconnected &IMAP; account type does. You could try to use server-side filtering (ask your admin how to install filters on the server, and in which format), since &IMAP; is all about managing your email on the server. See Settings Configure &kmail;...Receiving(some &IMAP; account), then click Modify... and the Filtering tab to configure server side filtering using the Sieve programming language (if your &IMAP; server supports it).

What should I know if I want to use PGP/GnuPG with &kmail;?

&kmail; provides a simple and easy-to-use interface for the basic functions of these programs; still, you should understand how these programs work, and what might make their use insecure. Some important issues:

- You really should test if encryption works before you use it. &kmail; partly relies on PGP/GnuPG's error strings, which often change between different versions.

- &kmail; will not encrypt messages with an untrusted (unsigned) public key. If you want to encrypt to such a key you should check the identity of the key owner and only then sign the key with your secret key. If you do not want to or cannot check the identity of the key owner, but nevertheless want to encrypt the message, then please sign the key locally with ``gpg` `--lsign` `keyID``.

- Trusting a foreign public key without checking it is not a good idea.

- Starting with GnuPG 1.0.7 you have to set your own key to ultimate owner trust: it is no longer implicitly done for you.

Where does &kmail; save my settings and my mail?

Most &kmail; settings are stored in `~/.config/kmail2rc` .

The Akonadi-controlled entries are stored in these folders:

- `~/.local/share/`.

- `~/.config/akonadi/`.

Note that some of the files are hidden: remember to also copy those if you want to backup or archive your mails. To be safe, use PIM Data Exporter to back up your mail and your settings.

Why did &kmail; regenerate the index of a folder?

&kmail; regenerates the index of a folder whenever the index appears to be out of date, &ie; whenever the contents of a folder are newer than the index. &kmail; regenerates the index in this case in order to prevent the loss or corruption of messages.

An outdated index can have several causes; these are the most common.

- Some other program modified the contents of the folder. If you want to use &kmail; together with procmail then please read this &FAQ;. If you want to use &kmail; together with another email client then please read this &FAQ;.

- If your mail folder is on a volume which is mounted via NFS, and if the clock in the NFS server is behind the clock in your computer, then the NFS server sometimes reports the wrong file date for the index file. In this case &kmail; concludes that the index is outdated, although in reality it is not. To fix this problem you (or your system administrator) have to make sure that the clock in the NFS server and the clock in your computer are always in sync. One way to achieve this is to use the ntp daemon.

Why doesn't &kmail; start up?

Problem: You want to start &kmail; from a minimal desktop environment like fvwm2. It does not start.

Solution: This happens because you are missing dbus functionality. Start &kmail; from a terminal window using dbus-launch, like this:

    # dbus-launch kmail

Can I use &kmail; together with a different email client, ⪚, mutt?

If you're using the mbox format for your folders it is not possible to use a different email client while &kmail; is running. With mutt, there may also be problems even if both programs are not running at the same time. We recommend you use the maildir format if you want to use mutt with &kmail;.

How can I convert my mailboxes from mbox to maildir?

There is no automated way to do that. You must create a new folder in maildir format, then copy the messages from the mbox folder into this new folder. Remember to adapt any filter rules connected with the old folder before you delete it.

How can I remove attachments from a message without removing the message itself?

Open the context menu with a &RMB; click on an attachment and select Delete Attachment.

How can I make &kmail; check for new messages at startup?

If &kmail; should always check for new messages at startup then enable Check mail on startup on the Accounts configuration page. Alternatively, start &kmail; with `kmail `--check``.

Where can I find a list of changes between one version of &kmail; and the next one?

The welcome screen lists all important changes for your version. It is displayed when you select Help&kmail; Introduction.

I'm one of those people whose messages consist of 100 quoted lines and one line written by myself. For some odd reason, this annoys other people. Can &kmail; help me and make everyone's life better?

Sure. Just select a short, relevant piece of the original message with the mouse before you click "reply". Only this part of the original message will be quoted by the composer.

Why do some messages exhibit a value of "unknown" in the Date field? Why is the date sometimes incorrect?

Most likely, the "Date:" header of these messages is broken and &kmail; cannot interpret it. That is not a bug in &kmail;, but in the software that sent the mail.

My signature has two dashes above it. What's up?

Separating the signature from the message body with two dashes and a space on a single line is common usage. These symbols permit mail clients that recognize them to trim the signature from a reply. If your signature does not include this separator, &kmail; will automatically add it.

Are there any known bugs in &kmail;?

There are quite a few, as you can see by querying the &kmail; Bugzilla page. As of this writing (April, 2021) roughly 70% of the reported bugs are unconfirmed, or irreproducible. All in all we think &kmail; is a robust piece of software.

You should not run &kmail; while another email client is already accessing the files in the mail directory; if you do, you may lose messages. Note that you should make backups of your messages -- and all your important data -- regularly. That's just good digital hygiene.

Why doesn't &kmail; display &HTML; mail properly?

References to external content, like images, are disabled by default, as spammers can use them to track whether and when you read a message. Loading external references can be activated in the Security tab in &kmail;'s configuration dialog. Plugins (like Adobe Flash), &Java; and JavaScript will not be displayed in &kmail; for security reasons, and there is no way to activate them.

Can I use two different versions of &kmail; at the same time? Can I go back from a current version of &kmail; to an older one?

You should only run one instance of &kmail; at a time. We also recommend that you stick to a certain version and not switch back and forth between different versions. Downgrading to an older version may work, but will probably cause problems because, for instance, the index file formats have been changed. Upgrading should never be a problem.

Does &kmail; support uuencoded files?

Uuencoded attachments are not supported. Save mail with uuencoded attachments, then use `uudecode` to decode the attachments.

&kmail; crashed while I was composing a message. Is that message lost now?

&kmail; tries to save your mail to `~/.local/share/kmail2/autosave/` in case of a crash. The next time you start &kmail; the mail composer should appear with your message again; If it does not, try to open the files in `~/.local/share/kmail2/autosave/` with an editor. If there are no files in that folder then the crash was so bad that &kmail; could not save your message.

I set up a folder to be mailing list aware, but messages from the list aren't being saved in that folder. What's wrong?

Associating a folder with a mailing list has nothing to do with filtering the mailing list messages — you have to add a new filter rule manually. However, once you have associated a folder with a mailing list you can use Message Reply to Mailing-List... or Message New Message to Mailing-List... and the mailing list address will be set in the To: field.

My SMTP server requires authentication. Does &kmail; support this?

Authentication can be set in the Advanced tab of the SMTP configuration dialog.

Can I use &kmail; and procmail?

Yes, but it is important to do it the right way or you might lose mail. To use procmail and &kmail; you must set up &kmail; to fetch new mail from the spoolfiles in which procmail drops your mail. Do not set up procmail to deliver mail to a &kmail; folder. This cannot work.

For each procmail spoolfile you must then create an account from which &kmail; will fetch new mail. You also need to specify the right lockfile name for this account. When setting up an account, &kmail; will do some minimal parsing on your `.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 is no way to establish a correspondence between the spoolfiles and lockfiles; it's really up to you to make sure the right lockfile for each spoolfile has been specified.

Spellchecking does not recognize non-English characters. Why?

Before you can use spellchecking, you must configure it. You can do so in the composer window, under Settings Spellchecker... . You can choose a dictionary there.

How do I use my Eudora/&Netscape;/Outlook/... mail folders in &kmail;?

See the section Restore and Import in &kmail;.

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.

If non-encrypted messages have already been sent via the Internet, the only advantage of using ssh is that your password will be sent encrypted to the POP3 server.

For more details on setting up ssh, see this web page.

Does &kmail; lock the folders it uses?

&kmail; does not lock the files in `~.local/share`.

To avoid the risk of losing mail when using a local account, it is necessary to ensure that &kmail; uses the same locking mechanism as your mail delivery agent.

There are five different locking options you can use:

- Procmail lockfile

- Mutt dotlock

- Mutt dotlock privileged

- FCNTL (default)

- none (use with care)

Procmail lockfile uses a small utility that comes with procmail called `lockfile`. You can use this if your mail folder is in a folder where you have write permission. This will not work on your `/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 both use a small utility that comes with mutt called `mutt_dotlock`. Mutt dotlock can be used in the same way as the Procmail lockfile option, with the same limitation with respect to the `/var/spool/mail/` folders. The Mutt dotlock privileged option can create lock files in the `/var/spool/mail` folder. `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 uses the `fcntl()` system call.

Using FCNTL locking might cause system lockups when the mail spool file is on an NFS mounted device.

If you do not want to use any locking, the none option is available. However, there are risks of losing mail when no locking is used.

How do I leave messages on the POP3 server?

If you want to leave all messages on the server, open the Settings Configure &kmail;... window. Click on the Accounts page. Select your account from the account list and click the Modify... button. This dialog contains the Leave fetched messages on the server setting (Advanced tab) which you can enable.

How do I automatically insert a text footer within my messages?

The text footer is also called a signature (not to be confused with a cryptographic signature). Select Settings Configure &kmail;.... Look in the Identity page for the Signature tab and add your signature there. Then go to the General tab on the Composer page and enable configure-composer-general-append-signature.

How do I set up &Sendmail; to work with &kmail; if I have a dial-up connection?

First you should check to see if your distribution can do this for you. It probably has already been set up during installation.

If that is not the case, you may want to have a look at the Mail Queue HOWTO.

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: ``qdbus``org.kde.kmail /KMail``. Then you can control &kmail; like this: ``qdbus` `org.kde.kmail /KMail org.kde.kmail.kmail.folderList``. You can also use qdbusviewer to browse available methods in a graphical interface.

When I reply to a message, only a part of the message is quoted. How come?

This can happen when the message contains two dashes and a space on a single line. This is seen as the start of a signature. The remainder of the message will not be quoted, because when you reply to a message, &kmail; strips the signature.

I am only using &IMAP;. Can I get rid of those Local Folders in the folder list, or at least keep them collapsed all the time?

No, you cannot get rid of them. The local folders function as a fallback when the &IMAP; server is unreachable. Although you only use &IMAP;, &kmail; uses the outbox for sending the messages. If we hide all local folders you will not be able to fix messages in the outbox which cannot be send for some reason. But it is possible to keep the local folders collapsed. What you have to do is go to Settings Configure &kmail;... and go to the section Misc. There you can set up the folder on startup. If you change that to a folder on the &IMAP; account, the Local Folders will stay collapsed when &kmail; starts.

How can I watch a particular thread?

If you want to follow a thread, right click and choose Mark Thread Watch Thread.

From this point on all messages on the thread that starts in this message will be marked as Watched.

How can I watch my own threads?

This is useful in case you are registered to a mailing list such as kdepim-users@kde.org and want to filter out the threads you participate in.

- Create a filter to mark all your incoming messages to a mailing list as Watched

  To create a filter go to:

  Settings Configure Filters

  - select Match all of the following

  - Add the conditions:

    - From Contains `yourmail@maildomain`

      replace `yourmail@maildomain` with your outgoing mail address

    - List-Id Contains `listID`

      replace `listID` with a specific mailing list id (⪚, <kdepim-users.kde.org>) or just a . to include outgoing mail to all mailing lists with . in their id (basically all of them).

  - Under Filter Actions choose Mark As Watched.

- In the Advanced tab.

  - Uncheck if this filter matches, stop processing here, so that other filters such as sorting the incoming messages from the mailing list to sub-folders will execute.

  - Place that filter before other filters that may stop the filtering process, or simply put it first. (Changing the filters' order is done using the two arrows up and down, under the Available filters list.)

- Create a search on mailing list messages

  Go to the folder where your mailing list messages are stored (⪚, Local Folders/KDE-PIM-USERS) and hit S key or in the menu Edit Find Messages:

  - Select Match all of the following

    Pay attention to the Include sub-folders.

  - Add the condition: Message Status is Watched

  - Give the search an informative name (Search folder name) like `KDE-PIM-USERS-Watched`

  - Make the search. After it is done you can close the search window.

  Now whenever you start a thread or participate in one, it is Watched.

How can I use E-Mail Translation?

To translate text in the composer window read the section Using the Built-in Translator

In the message preview pane highlight the text you would like to translate and select Translate (&Ctrl;&Alt;T) from the &RMB; context menu.