# The Kmail Handbook

David
Rugge

This documentation was last updated for Kmail version 1.0.24. Please make any comments and additions to the authors.

KMail

July 10, 1999
KDE
Mail
Client

## Introduction

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.

Bug reports and suggestions should go to one of the developers.

We hope you will enjoy Kmail!

## Getting Started

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.

Invoking Kmail for the first time creates a Mail directory containing the initial files (inbox, outbox, sent-mail, and trash) in your home directory. Kmail then pops up the Settings window where you must enter some initial information so Kmail will be able to properly retrieve and send your messages.

The Settings window consists of six tabs: Identity, Network, Appearance, Composer, Misc, and PGP. To begin sending and receiving email you will only have to change the settings in the Identity and Network tabs.

### Setting your Identity

The settings in the Identity tab are fairly straightforward. Fill in the Name and Organization fields with the appropriate information if you want this information to be automatically included in the headers of any message that you send. Next, fill in the Email Address and the Reply-to Address field with your email address. Finally, set the location of your signature file in the Signature File field. You can skip setting the signature file if you do not have one, but every time you compose a new message, Kmail will ask you for your signature file.

### Setting up your Account

The Network tab contains the settings that tell Kmail how to send and receive your email. 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 pick or what to put in a field, consult your Internet Service Provider (ISP) or System Administrator.

#### Sending Mail

The Sending Mail section provides two options for sending mail: sendmail and SMTP. Sendmail 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 Server field with the name and domain of your mail server. You will probably not need to change the Port setting.

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 Questions and Answers section.

#### Receiving Mail

To set up an account so you can receive mail, press the Add... button in the Incoming Mail section. You will then be prompted for the type of account. Most users should select POP3. (IMAP accounts are not supported) After pressing OK you will be presented with the Configure Account window. First, fill in the Name field to name your account. Login, Password, and Host should be filled in with the appropriate information from your ISP or System Administrator. Again, you should not need to change the Port setting. Finally, select Delete mail from server if you don't want to leave your mail on the server. Leave the account's mailbox set to inbox for now, although you may want to change it if you add more accounts later.

You are now ready to send and receive mail!

### Testing Your Setup

First, we will send an email to test our configuration. To send an email, hit Control-N, or select the File &verbar; New Composer 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 mail by selecting File &verbar; Send.

To check your email, select File &verbar; Check Mail... A window will pop up and indicate how much mail is 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 File &verbar; Settings...

## Using Kmail

### The Mail Reader Window

The Mail Reader window is the window that appears when Kmail is started. The Mail Reader window is divided into three panes:

Folders Pane (upper left pane)

  This pane contains a list of your message folders. (other email programs call them mailboxes) 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 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. See the Folders Section for more information about how to use folders.

Headers Pane (upper right pane)

  This pane lists header information (message Status Flags, Sender, Subject, and the Date the message was sent) 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. You may sort the messages by clicking on the column that you wish to sort.

Message Pane (lower pane)

  Displays the header and body of the currently selected message. Attachments appear at the bottom of the message as icons based on the MIME type of the attachment. You can scroll through the message page by page using the PAGE UP and PAGE DOWN keys, or line by line using the up and down arrow keys. You can also use the following key shortcuts to skip through your messages without having to use the mouse:

  - N or the left arrow key - Next message

  - P or the right arrow key - Previous message

  - + - Next unread message

  - - - Previous unread message

Messages can have several status flags, which can be changed from the Message &verbar; Set Status submenu. The status flags are described below:

- New:(red dot, message colored red) The message has been received for the first time and is unread.

- Unread: (green dot, message colored blue) The message has already been retrieved off the server at least once, but has not been read yet.

- Read: (dash) The message has been read.

- Replied: (blue u-turn arrow) A reply has been composed to this message.

- Queued: (envelope) The message has been queued in the outbox to be sent later.

- Sent: (angled envelope) The message has been sent.

### The Composer Window

The Composer window is used to write new messages. It can be invoked from the File Menu or from the document icon on the Mail Reader window button bar. If you have not set the location of your signature file and you have Automatically Append Signature checked in the Composer tab of the Settings dialog, you will be prompted for the location of your signature file before the Composer window opens.

#### Composing a Message

To write your message, fill in the appropriate fields in the Composer window. There are a variety of shortcuts to help you with writing you messages. The ellipses buttons next to the To:, cc:, and Bcc: fields will call up the addressbook so that you can select addresses from there instead of trying to remember them. When you are finished with your message, hit the Send button (the envelope) to queue or send the message.

#### Attachments

You can attach files to you message by using one of the methods below:

- Push 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.

- Selecting one of the options in the Attach menu.

The Message Part Properties dialog will appear to prompt you for information about your attachment. The mime-type and file name fields are automatically filled in with the appropriate values. You should then select an encoding method for your file from the list of encoding options.

Once a file is attached to your message, it appears in the Attachments pane at the bottom of the Composer window. You may remove, save, or get information about an attachment by selecting its line in the Attachments pane and selecting Remove, Save, or Properties from the Attach menu.

PGP keys may also be attached to your message by using the appropriate options in the Attach menu. PGP key attachments are handled like file attachements.

#### Checking the Spelling of you Message

To check the spelling of your message, press the ABC checkmark button in the button bar or select Edit &verbar; Spellcheck... Kmail uses KSpell to check spelling, which is the KDE frontend to the the ispell spelling checker.

### Message Folders

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, and trash folders are created. These folders each have special functions:

- inbox: where Kmail puts your new messages when you ask it to check your mail.

- outbox: where messages are put while they are waiting to be delivered.

- sent-mail: contains copies of all messages that you have sent.

- trash: contains all messages that you have deleted.

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 &verbar; Create... A window will then prompt you for the name of the folder and allow you to associate or disassociate the folder with certain accounts. 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 &verbar; Modify... Kmail will then prompt you for the changes you wish to make to the selected folder.

To move messages from one folder into another, select the message(s) you want to move and press the M key or select Message &verbar; Move... A list of folders will appear. Select the folder from the list that you want to move the messages to and hit OK. Messages can also be moved by dragging a message from the Headers pane into the Folders pane.

You may find that your folders are taking up a lot of disk space after they have been used for a while even though they may not have very many messages in them. To fix this problem, select the folder and choose Folder &verbar; Compact.

If you want to clear all of the messages out of a folder choose Folder &verbar; Empty. All the messages in the selected folder will be moved to the trash folder. If the selected folder is the trash folder, all of the messages will be permanently deleted.

Kmail does not currently support hierarchical folders.

### The Addressbook

The addressbook is a place to store your commonly used email addresses. You can call up the addressbook from the File menu, the addressbook button on the Main window, or the addressbook button in the Composer window.

To add addresses to the addressbook, type an email address into the lower section of the window and hit the Add button. The address will then appear in the list. To remove an address, select it from the list and hit the Remove button.

Addresses can also be added to the addressbook from the Mail Reader window by right-clicking on an email address in the To: or From: fields and selecting Add to Addressbook.

### Filters

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.

The actions section of the Filter Rules window lets you perform up to eight actions in one filter. You can you the "Skip Rest" option to skip the rest of the actions in the list. Only the transfer action and the skip rest action are supported at this time, but expect to see more action options available in future releases of Kmail.

Usually, filters are used on incoming messages, but they can also be applied to a message or group of messages. To selectively filter messages in a message folder, select the messages you want to filter and type CONTROL-J or select Message &verbar; Apply Filters. Note that this will apply all of your filters to that message; there is no way to apply only certain filters to a message.

If you ever need to remove a filter, select it from the Filter Rules window and press the Delete button.

#### Filter Examples

If I am subscribed to the KDE User List, I could create a folder for the list (I'll call it KDE-User) and use a filter to automatically transfer new messages from my inbox to my KDE-User folder if they are from the KDE User List. Here is how to create this filter:

1. Think of a unique way of identifying the messages you want to filter. The unique property of my KDE User List messages is that they always contain the phrase "KDE User List" in the To: field. If I wanted to be even more specific, I could use the email address of the KDE User List.

2. Select Filter... from the File menu.

3. Press the New button to create an empty filter.

4. Select the empty filter from the list. (It will appear as a pair of angled brackets: <>).

5. The right side of the Filter window contains two sections: matching criteria and actions. In the matching criteria area, select "To:" from the first pull-down menu, "Contains" from the second pull-down menu, and type "KDE User List" in the text field.

6. Skip down to the actions section. Select "Transfer" 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-User" from the pull-down menu.

7. Select "Skip Rest" from the next pull-down menu.

8. To save and try out your new filter, hit the OK button. This will also dismiss the window.

You may find that you need to use more complicated criteria to properly filter your messages. For example, you may only want to save the KDE User 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:

1. Open up the Filter Rules window and select the filter you just created.

2. Since you want to filter all messages that have "KDE User List" in the To: field AND that are from Fred, select the AND option from the pull down menu between the two criteria sections.

3. Now, go to the bottom criteria section and select the following from the pull-down menus: "From:", "Contains." Now, type "fj@anywhere.com" in the text field.

4. Select "Skip Rest" from the next pull-down menu.

You now have a filter that transfers all KDE User List messages that are from Fred Johnson.

### Multiple Accounts

Multiple accounts are used to check mail from more than one email address and/or mail server. Select File &verbar; Settings... and click on the Network tab to add or change your account settings. See the Customizing Kmail section for more information on the settings in the Network tab.

To check mail from a particular account, use the Check Mail in... submenu to select the account to use to check your mail. It is not currently possible to tell which account is active, so if you have created multiple accounts, use the Check Mail in... submenu instead of the Check Mail menu item.

### Pretty good privacy

To use the PGP features of Kmail, you will need to have public-key encryption software such as GNU Privacy Guard or PGP installed and have your keys created. To configure PGP, select File &verbar; Settings... and click on the PGP tab. Type in your PGP user identity in the space provided and select any other options that you want before pressing the OK button to save your settings.

Once PGP is configured, you can use it to sign and encrypt messages. To sign an email message, toggle the quill button on the button bar. When you send your message, you will be prompted for your PGP password. The message will then be signed with your PGP signature and sent.

Encrypting a message is also easy. You must have the public key(s) of the recipient(s) of your message in order for encryption to work. Toggle the key button in the button bar to enable encryption. The message will be encrypted once you send it.

## Customizing Kmail

Kmail's settings window gives you a number of ways to customize Kmail to your needs.

### Identity Tab

The settings in the Identity tab are fairly straightforward. The Name and Organization fields should contain the appropriate information if you want this information to be automatically included in the headers of any message that you send. The Email Address and the Reply-to Address field should contain your email address. The Signature File field contains the location of your signature file. You can skip setting the signature file if you do not have one. If you do this, make sure that you also uncheck Automatically Append Signature in the Composer tab.

### Network Tab

The Network tab contains the settings that tell Kmail how to send and receive your email. 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 pick or what to put in a field, consult your Internet Service Provider (ISP) or System Administrator.

The Sending Mail section provides two options for sending mail: sendmail and SMTP. Sendmail 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 Server field with the name and domain of your mail server. You will probably not need to change the Port setting.

To set up an account so you can receive mail, press the Add... button in the Incoming Mail section. You will then be prompted for the type of account. Most users should select POP3 unless you have a setup where some other program is already retrieving your mail into a mail file. After pressing OK you will be presented with the Configure Account window. First, fill in the Name field to name your account. Login, Password, and Host should be filled in with the appropriate information from your ISP or System Administrator. Again, you should not need to change the Port setting. Select Delete mail from server if you don't want to leave your mail on the server. Finally, you can set the default box to received your new messages.

### Appearance Tab

The Fonts section allows you to change the type and size of the display fonts in the Main and Composer windows.

The Layout section lets you toggle the long folder list on and off. The long folder list lists folders all the way down the left side of the screen, which lets you see many more folders than in the default view, but it takes away some space for viewing the text of your message.

### Composer Tab

The Phrases section lets you define the automatically generated lines added to message replies, forwarded messages, and quoted text. There are special &percnt;-denoted characters that will insert certain values. These are shown at the top of the Phrases section: &percnt;D to insert the date, &percnt;S to insert the subject, &percnt;F to insert the sender, and &percnt;&percnt; to insert a percent sign. The Indentation field contains the character that will denote quoted text.

The Appearance section lets you control various options for your messages. Automatically Append Signature and Automatically Sign Messages let you toggle whether to automatically include your signature and PGP signature in all of your messages by default. 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.

The When Sending Mail section lets you customize how and when messages are sent.

The Default Sending options 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 &verbar; Send Queued command or automatically when you check your mail, depending on the settings in the Misc tab.

The Send messages options let you select how your message will be encoded when it is sent. Allow 8 bits 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, then special characters will be encoded using standard MIME encodings, which may be more portable to other mailing systems than 8-bit ASCII.

### Misc Tab

Empty Trash On Exit

  The trash folder is cleared of messages when you quit Kmail if this option is selected.

Send Mail in outbox folder on Check

  All messages queued in the outbox folder will be sent whenever you check your mail.

### PGP Tab

This tab controls the PGP features. At a minimum, you must fill in the PGP identity field so that Kmail can properly interface with PGP or GNU Privacy Guard.

## Using other Mailbox files With Kmail

This section is for all of the users that need to move email messages from their previous email client over to Kmail. Kmail stores 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 the FROM: header. For many Unix mailers, all you must do is move your mailboxes to `˜/Mail` (or make Mail a symbolic link to the folder containing you mailboxes) and launch Kmail. The mailboxes should now show up correctly in Kmail.

If your old mailboxes are not in mbox format, see below for instructions on importing some other common formats.

Eudora Lite/Eudora Pro

  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 Macintosh line feed characters. Use your favorite text editor or scripting language to change the Windows or Macintosh line feeds to Unix line feeds.

MMDF

  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

  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 in the source releases of Kmail, but not currently in the packaged releases. (This may change in the future.) 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.

Maildir

  Maildir mailboxes, used by the Qmail mail-transfer agent, are not supported by Kmail at this time.

Forte Agent

  In Agent:

  1. Select the messages to export

  2. Select FILE &verbar; SAVE MESSAGES AS

  3. Mark the UNIX FORMAT and SAVE RAW boxes

  4. Give File a .txt extension and save.

  In Linux/KDE:

  1. Move previously saves file to correct `˜/Mail` folder

  2. Rename file without .txt extension

  When you open Kmail the new folder with appropriate messages will be there.

Netscape Mail

  Copy your Netscape Mailfiles from `˜/nsmail/` to `˜/Mail` folder. The mailboxes will show up in Kmail the next time you restart it.

Pegasus Mail

  Pegasus for win32 uses single files for Mail folders simmilar 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.

Microsoft Outlook, Lotus Notes, BeOS Mail files, cc: Mail, etc...

  Other mail programs probably do not work with Kmail as they use specialized 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 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.

## Menus and Keyboard Shortcuts

Each menu item is discussed below. When there is a keyboard shorcut that performs a menu item function, it is listed after the menu item.

### The Main Mail Reader window

#### File menu

New Composer (Ctrl+N)

  Creates a new Composer window.

New Mail Reader

  Creates a new Mail Reader window.

Save As... (Ctrl+S)

  Saves the currently displayed message.

Print... (Ctrl+P)

  Prints the currently displayed message.

Check Mail (Ctrl+L)

  Checks mail in the active account.

Check Mail in... submenu

  Submenu that lets you check mail from a particular account.

Settings...

  Opens the Settings window. You can configure the settings for your identity, accounts, network, PGP, the appearance of the Composer and Mail Reader windows, and various other settings here.

Addressbook...

  Opens up the Addressbook.

Filters...

  Opens the Filters window.

Close (Ctrl+W)

  Closes the current Mail Reader window.

Quit (Ctrl+Q)

  Exits Kmail.

#### Edit menu

Copy (Ctrl+C)

  Copies selected text to the clipboard.

#### Folder menu

Create...

  Opens the New Folder dialog which lets you create new folders

Modify...

  Opens up the Modify Folder dialog which lets you change the settings for the selected folder.

Compact

  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.

Empty

  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.

Remove

  Removes the selected folder.

#### Message menu

Next (N or the right arrow key

  Selects the next message in the Headers pane.

Next Unread (+)

  Selects the next unread message in the Headers pane.

Previous (P or the left arrow key)

  Selects the previous message in the Headers pane.

Previous Unread (-)

  Selects the previous unread message in the Headers pane.

Reply... (R)

  Opens up the Composer window with the contents of the selected message's Reply-To field in the To: field.

Reply All... (A)

  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: and bcc: fields into the cc: and bcc: fields of the Composer window.

Forward (F)

  Forwards the message to a new recipient.

Edit (T)

  Edits the selected message if it is editable.

Set Status submenu

  Allows you to change the status of the selected message to one of the below:

  - New

  - Unread

  - Read

  - Replied

  - Queued

  - Sent

Mark All (K)

  Selects all of the messages in the current folder.

Move (M)

  Moves all of the selected messages to a new folder.

Copy (S)

  Copies the selected messages into a new folder.

Delete (D)

  Moves the selected messages into the trash folder.

Send Again...

  Sends the message again

Apply Filters (Ctrl+J)

  Applies your filters to the selected messages

View Source...

  Views the message and its complete headers in plain text format in a new window.

#### View menu

Brief, Fancy, Standard, Long, and All Headers

  Changes the number of headers that are displayed and the formatting of the headers in the Message pane.

Iconic, Smart, and Inlined Attachments

  Changes the way that attachments appear in the Message pane.

#### Help menu

Contents (F1)

  Invokes the KDE help system with the Kmail help pages displayed.

About Kmail...

  Displays essential information about Kmail.

About KDE...

  Displays information about KDE.

### The Composer window

#### File menu

Send (Ctrl+Enter)

  Queues the message in the outbox for sending it later.

Send Now

  Sends the message immediately.

Insert File...

  Inserts the selected text file into the message, starting at the cursor.

Address Book

  Opens up the address book.

Print

  Prints the message.

New Composer (Ctrl+N)

  Opens up a new Composer window.

New Mail Reader

  Opens up a new Mail Reader window.

Close (Ctrl+W)

  Closes the Composer window.

#### Edit menu

Cut (Ctrl+X), Copy (Ctrl+C>, Paste (Ctrl+V)

  These items are for cutting, copying, and pasting text. They work like in most editors.

Mark all

  Selects all of the text in your message.

Find (Ctrl+F)

  Finds words, phrases, or expressions in the message.

Replace (Ctrl+R)

  Lets you replace words, phrases, or expressions in your message with other words or phrases.

Spellcheck...

  Uses KSpell to check the spelling in the body of your message.

#### Options menu

Urgent

  Sets the priority of the message to Urgent.

Confirm Delivery

  If you choose this option, you will receive a confirmation email once your message is successfully delivered to its destination mail server.

Confirm Read

  If you choose this option, you will receive a confirmation email once your message is downloaded and read by its recipient.

Spellchecker...

  Allows you to configure Kspell, KDE's spellchecker.

#### View menu

This menu lets you toggle the display of the header fields in the Composer window.

#### Attach menu

This menu lets you select attachment options.

Append Signature

  Appends the contents of your signature file to the end of the message.

Insert File...

  Inserts the contents of the selected file into the message starting at the cursor.

Attach...

  Attaches the selected file to the message using the encoding you select in the dialog.

Attach Public Key... and Attach My Public Key

  Attaches the corresponding PGP key to your message using the default encoding.

Remove

  Removes the attachment that is selected in the attachment window.

Save...

  Saves the attachment that is selected in the attachment window to a file.

Properties...

  Displays the properties of the attachment that is selected in the attachment window.

#### Help menu

Contents (F1)

  Invokes the KDE help system with the Kmail help pages displayed.

About Kmail...

  Displays essential information about Kmail.

About KDE...

  Displays information about KDE.

## Questions and answers

### How do I use my (Eudora, XFmail, other random mail client) mailboxes in Kmail?

See the section Using other Mailbox files With Kmail.

### How do I leave mail on the server? (from the KDE FAQ)

Open up the Settings window from the file menu. Click on the Network tab. 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.

### How do I automatically insert a text footer within the mail? (from the KDE FAQ)

The text footer is called a signature file. What you need to do is open up a text editor (like kedit) and type in what you want to appear in the footer. Save the file under a name like signature or footer. Go into Kmail and select File &verbar; Settings... Look in the "Identity" tab for the "signature file" field. Click on the ellipses button and select the file you just created. Now Kmail will automatically insert that file in any message you write.

### Why does Kmail keep asking me for the location of my signature file?

Kmail will ask you the location of your signature file if you have checked the option Automatically Append Signature in the Composer tab of the Settings dialog, but have not specified a signature file in the Identity tab. You should either specify a signature file or uncheck Automatically Append Signature.

### Why doesn't word wrap work in the Composer window?

The word wrap setting is probably turned off. Word wrap can be toggled on and off in the Composer tab of the Settings dialog box.

### How can I find out how many unread messages I have in a mail folder?

When you click on a mail folder in the Folders Pane, the total number of messages and the number of unread messages is displayed in the status bar at the bottom of the main window.

In previous versions of Kmail, this was the only way to find out how many unread messages were in a folder. Now, the number of unread messages is conveniently displayed in the Folders Pane after the folder name.

### How do I set up sendmail to work with Kmail if I have a dial-up connection?

These instructions were taken almost verbatim from the UCT Linux User's group page on configuring Sendmail for Dial-up connections.

#### Step 1: Masquerade host

You now need to edit `/etc/sendmail.cf` to tell it which host to masquerade as. Look for a line which says something like:

    # who I masquerade as (null for no masquerading) (see also $=M)
    DM

and add your address to the end of the line beginning "DM". Our user changed it to the following

    DMhendrix.org

When our user sends mail, the `Return-Path` and `From:` fields will now say that the mail comes from hendrix.org. This prevents "cannot route to sender" messages which certain hosts you send mail to may generate because your machine does not have a DNS entry. We must still change the user portion of the email address, because if our user sends mail now, the `From:` field will read `mj@hendrix.org`, which is not correct. If you login to your home machine with the same username as the username portion of your email address, you can skip ahead to restarting sendmail. If you have different usernames (as our example does), you need to add a user database.

#### Step 2: Create a user database

Create a file modelled on the following:

    loginname:mailname      First_Last
    First_Last:maildrop     loginname

"loginname" is the name you login is on your machine at home (in this case mj), "First&lowbar;Last" is the name portion of your email address (in this case mjturner). In this case our user created a file called `/etc/userdb` containing the following:

    mj:mailname     mjturner@hendrix.org
    mjturner:maildrop       mj

Once you have done this, you need to convert the text file `/etc/userdb` into a Berkeley "db" database file which sendmail can understand. To do this, you need to run makemap as follows:

    # makemap btree /etc/userdb.db < /etc/userdb

This creates the database file `/etc/userdb.db` from the text file `/etc/userdb`. You must remember do this every time you change `/etc/userdb` otherwise sendmail will not be using your latest user database when sending mail.

#### Step 3: Add user database to sendmail.cf

You must also tell sendmail to use your user database (`/etc/userdb.db`) when sending mail. The syntax differs slightly depending on whether you are using an 8.7.x/8.8.x or 8.6.x config file. You can tell which version yours is by searching for the string "DZ" (`grep ˆDZ /etc/sendmail.cf`). For example, an 8.8.0 config file would say `DZ8.8.0`.

##### 8.6.x config file

If you are using an 8.6.x config file, look for a line beginning

        # list of locations of user database file (null means no lookup)
        OU

and add the location of your user database. Our user changed the above line to:

        OU/etc/userdb.db

##### 8.7.x or 8.8.x config file

If you are using an 8.7.x or 8.8.x config file look for a line beginning

        # list of locations of user database file (null means no lookup)
        O UserDatabaseSpec=

and add the location of your user database to it. Our user changed it to the following:

        O UserDatabaseSpec=/etc/userdb.db

#### Step 4: Restart sendmail

After making these changes, as root you need to restart sendmail:

    # ps aux | grep sendmail | grep -v grep
    root        64  0.0  0.0  1208     0  ?  SW  11:45   0:00 (sendmail)

    # kill -HUP 64

(use `ps -ef` instead of `ps aux` if you're using SysV).

Sendmail will now re-read its config file (`/etc/sendmail.cf`) and everything should be working. When you send mail, the from header field will be a valid email address and not the address you have on your machine. For example, when our user sends mail, it will read `From: mjturner@hendrix.org` in the headers. This works with all mail user agents (Mutt, Elm, Pine, mh, etc) because the address translation is done at the mail transport agent level. Basically, you can use any program to send mail and your address will be correct.

#### Step 5: Configure a "smart" relay

It can take quite a while for mail to get delivered to its final destination, as sendmail has to connect to the mail servers of the recipients of your mail. This time would have to be spent online, something which can prove to be costly. If, however, you configure sendmail to use a "smart" relay, it will deliver all mail to that relay and the relay will then deliver it to its destination. Your ISP's mail server makes an ideal "smart" relay.

Change

    # "Smart" relay host (may be null)
    DS

to

    # "Smart" relay host (may be null)
    DSmail.hendrix.org

Don't forget to restart sendmail after doing this (see restarting sendmail). All non-local mail will now be sent to `mail.hendrix.org` which will then deliver it to its final destination.

## Epilogue

### Developers

Stefan Taferner <taferner@alpin.or.at>

Sven Radej <radej@kde.org>

Markus Wuebben <markus.wuebben@kde.org>

#### Contributors

- Juraj Bednar <bednar@isternet.sk>

- Lars Knoll <knoll@mpi-hd.mpg.de>

- Harri Porten <porten@kde.org>

- Mario Weilguni <mweilguni@kde.org>

#### Based on the work of

Lynx <lynx@topaz.hknet.com>

Stephen Meyer <Stephan.Meyer@pobox.com>

### Documentation

David Rugge <davidrugge@mindspring.com>

Original documemtation by Markus Wuebben <markus.wuebben@kde.org>

Robert Williams - Editor <rwilliams@kde.org>

Some of the Kmail Questions and Answers were taken from the Kmail section of the KDE FAQ.

The section on Sendmail configuration for dial-up connections was copied almost verbatim from UCT Linux User's group page on configuring Sendmail for Dial-up connections

Thanks to Michael Elkins <me@cs.hmc.edu> for his excellent description of the different Unix mail formats in the Mutt documentation.

Thanks to

- Mendel Mobach <mendel@mobach.nl> (Netscape mail)

- Ed Shapard <mailto:shapard@bigfoot.com> (Pegasus Mail)

- Ray Muir <rjmuir@ibm.net> (Forte Agent)

for providing directions on using other mail clients' mailboxes with Kmail.

### Copyright

Kmail is copyright 1998-1999 Stefan Taferner.

The Kmail documentation is copyright 1999 David Rugge.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.