3.2. Mail

Kontact uses KMail as its e-mail component. To configure it, open the mail component then select Settings+Configure KMail. KMail is a fully-featured e-mail client that supports a number of protocols. Tools contains several useful tools for managing unwanted e-mails. Use Find to perform a detailed search for messages. Anti-Spam Wizard can help manage tools for filtering unwanted commercial e-mails. Anti-Virus Wizard helps manage e-mail virus scanners. These two wizards work with external spam and virus software. If the options are disabled, install additional packages for protection against spam and viruses.

Figure 3.2. The Kontact Mail Component

The Kontact Mail Component

3.2.1. Configuring Identities and Accounts

Kontact can manage multiple e-mail accounts, such as your private e-mail address and your business address. When writing an e-mail, select one of the identities previously defined by clicking View+Identity. To create a new identity profile, select Settings+Configure KMail then Identities+Add. In the dialog that opens, give the new identity a name, such as “private” or “office.” Click OK to open a dialog in which to enter additional information. You can also assign an identity to a folder so that, when replying to a message in that folder, the assigned identity is selected.

Under the General tab, enter your name, organization, and e-mail address. Under Cryptography, select your keys to send digitally signed or encrypted messages. For the encryption features to work, first create a key with KGpg, described in Chapter 13, Encryption with KGpg (↑Applications).

Under Advanced, you can enter a default reply-to and a default blind carbon-copy address, choose a dictionary, select the folders for drafts and sent messages, and define how messages should be sent. Under Signature, decide if and how each of your messages should be signed with an extra block of text at the end. For example, you might sign each e-mail with your contact information. To activate this option, select Enable Signature and decide whether to obtain the signature from a file, an input field, or the output of a command. With Picture, you can specify the path to a small (48x48 pixel) monochrome icon to display in all your mails if the recipient's software supports this feature. When you are finished with all your identity settings, confirm with OK.

The settings under Accounts decide how Kontact receives and sends e-mail. There are two tabs, one each for sending and for receiving mail. Many of these settings vary depending on the system and network in which your mail server is located. If you are not sure about the settings or items to select, consult your ISP or system administrator.

To create outgoing mail boxes under the Sending tab, click Add. Choose between the SMTP and sendmail transport types. SMTP is the correct choice in most cases. After making this selection, a window appears in which to enter SMTP server data. Provide a name and enter the server address (as given to you by your ISP). If the server wants you to authenticate yourself, enable Server requires authentication. Security settings are under the Security tab. Specify your preferred encryption method here.

Make settings for receiving e-mail under the Receiving tab. Use Add to create a new account. Choose between different methods for retrieving mail, such as local (stored in Mbox or Maildir format), POP3, or IMAP. Make the settings appropriate for your server.

3.2.2. Importing E-Mail from Other Mail Programs

To import e-mail from other applications, select Tools+Import Messages from the mail view in Kontact. It currently features import filters for Outlook Express, the mbox format, e-mail text format, Pegasus Mail, Opera, Evolution, and more. The import utility can also be started separately with the command kmailcvt.

Select the corresponding application and confirm with Continue. A file or a folder must be provided, depending on the selected type. Kontact then completes the process.

3.2.3. Creating Messages

To compose new messages, select Message+New Message or click the corresponding icon in the toolbar. To send messages from different e-mail accounts, select one of the identities as described in Section 3.2.1, “Configuring Identities and Accounts” (↑Applications). In To, enter an e-mail address or part of a name or address in your address book. If Kontact can match what you enter to something in the address book, a selection list opens. Click the desired contact or complete your input if none matches. To select directly from the address book, click the ... button next to the Address field.

To attach files to your message, click the paperclip icon and select the file to attach. Alternatively, drag a file from the desktop or another folder to the New Message window or select one of the options in the Attach menu. Normally, the format of a file is recognized correctly. If the format is not recognized, right-click the icon. From the menu that appears, select Properties. Set the format and filename in the next dialog and add a description. In addition, decide whether the attached file should be signed or encrypted.

When you are finished composing your message, send it immediately with Message+Send or move it to the outbox with Message+Queue. If you send the e-mail, the message is copied to sent-mail after having been sent successfully. Messages moved to the outbox can be edited or deleted.

3.2.4. Encrypted E-Mail and Signatures

To encrypt your e-mail, first generate a key pair as described in Chapter 13, Encryption with KGpg (↑Applications). To configure the details of the encryption procedure, select Settings+Configure KMail+Identities to specify the identity under which to send encrypted and signed messages. Then press Modify. After confirming with OK, the key should be displayed in the corresponding field. Close the configuration dialog with OK.

3.2.5. Folders

Message folders help organize your messages. By default, they are located in the directory ~/.kde/share/apps/kmail/mail. When starting KMail for the first time, the program creates several folders. inbox is where new messages fetched from a server are initially placed. outbox is used for temporary storage of messages queued for sending. sent-mail is for copies of messages sent. trash contains copies of all e-mails deleted with Del or Edit+Delete. drafts is where you can save unfinished messages. If you are using IMAP, the IMAP folders are listed below the local folders. Each incoming mail server has its folders in the Folder list.

If you want to organize your messages in additional folders, create new folders by selecting Folder+New Folder. This opens a window in which to specify the name and format of the new folder.

Right-click the folder for a context menu offering several folder operations. Click Expire to specify the expiration date for read and unread messages, what should happen with them after expiration, and whether expired messages should be deleted or moved to a folder. If you intend to use the folder to store messages from a mailing list, set the necessary options under Folder+Mailing List Management.

To move one or several messages from one folder to another, drag them from the upper window and drop them into the appropriate folder in the left window. Messages can also be moved by highlighting the messages then pressing M or selecting Message+Move to. In the list of folders that appears, select the folder to which to move your messages.

3.2.6. Filters

Filters are a convenient method of automatically processing incoming mail. They use aspects of the mail, such as sender or size, to move mail to certain folders, delete unwanted mails, bounce mails back to the sender, or perform a number of other actions.

3.2.6.1. Setting Up a Filter

To create a filter from scratch, select Settings+Configure Filters. To create a filter based on an existing message, right-click the desired message then select Create Filter and the desired filter criteria.

Select the match method for filter criteria (all or any). Then select criteria that applies only to the desired messages. In Filter Actions, set what the filter should do to the messages that meet the criteria. Advanced Options provides control over when the filter is applied and whether additional filters should be considered for these messages.

3.2.6.2. Applying Filters

Filters are applied in the order listed in the dialog accessed with Settings+Configure Filters. Change the order by selecting a filter and clicking the arrow buttons. Filters are only applied to new incoming messages or sent messages as specified in the filter's advanced options. To apply filters to existing messages, right-click the desired messages and choose Apply Filter and the desired filter.

If your filters do not act as expected, monitor them with Tools+Filter Log Viewer. When logging is enabled in this dialog, it shows how messages are processed by your filters and can help locate the problem.