ogg feed

thebadapples



Kmail is the default, and very good, email client for the K Desktop Environment (KDE) for Linux and BSD and other forms of unixy systems. I got out of the habit of using email clients for a while, but recently I realized that I was spending waaay too much time going to a dozen sites checking my two-dozen email accounts, and that combining them all into kmail would be a lot easier. And...it is. So here's how to set it up, both with just a single account as well as multiple accounts.

Kmail is part of a larger "personal information management" application called Kontact. This application has many features, including Kmail, an address book, a calendar, task list and scheduler, a journal, and an rss feed reader for any blogs you follow.

This is Kontact's interface:

Notice that the Mail icon on the far left is selected. The interface is similar to Thunderbird or Eudora or Outlook or Apple Mail or any of the other applications. Now let's set up the account(s) we want to use.

To set up Kmail, go to the Settings menu at the top of Kontact and select Configure Kmail.

This is the default Kmail configuration window. Notice the icons on the far left...in fact, notice how much of KDE uses many of the same concepts across all of its applications. Once you start getting used to one application in KDE, like Kontact, and you will start to feel quite at home with the rest of KDE. So if you're new to Linux entirely, you might want to just start using simple applications like Kontact to check your email, and gradually you'll find yourself branching out to other applications and feeling more comfortable with Linux+KDE at large.

Click on the "Identities" icon on the left. You should see one default identity, so you can choose to Modify this identity with button you'll see on the right.

Now you can fill out the Identities window with your name, organization, and email address; the next tap ("Cryptography") allows you to both sign and encrypt messages using openPGP (yes, no Thunderbird Add-ons required; it's just built right in); and then in the "Advanced" tab you'll find the really good stuff -- you can actually put in a different Reply-To address so that no matter what email account you send the mail FROM, you'll always get it the answer back to the Reply-To Address.

To illustrate: let's say I had a @gmail.com and @yahoo.com address, but wanted to phase them both out. Instead of emailing everyone that I'd changed my address, I just made sure that no matter what address I sent them email from, they ALWAYS responded to my @opensource.com address. So I made the Reply-to my @opensource.com address and eventually it got into everyone's system (both their own brain and their computer's) that in fact my address was @opensource.com and not either my gmail or yahoo addresses.

There are a few other options, in other tabs, most notably the signature tab; here you can set a signature so that every time you send an email from a certain identity, a matching signature is automatically appended (or prepended, if you prefer) to the message. I find this particularly helpful in preventing myself from sending an email from the wrong identity.

After you have completed creating an Identity, you need to add an Account. What's the difference between an Identity and an Account? Well, if you are Klaatu to one group of people and Gort to another group of people, then you may have a few email addresses owned by Klaatu and a few other email addresses owned by Gort. Klaatu and Gort are your identities, while the email addresses each of these versions of you own are the Accounts.

So you'll want to select the Account icon on the left of the Kmail configuration window, and click "Add". Notice that you are in the "Receiving" tab, meaning that you are creating accounts that receive messages. Sending is another beast (or, to be more precise, another protocol) entirely and I'll step you through the way I handle this in a moment.

The account setup begins with the decision of what kind of protocol you wish to use to receive your messages. There aren't that many choices, and the two most common are POP3 and IMAP. You'll want to find out which protocol your email provider lets you use, and if they allow both then you'll want to figure out which one is best for your purposes. I'll give an example of each.

For POP3: fill in all the blanks, where "Account name" is just something for you to name the account so you know which email address it is fetching mail from. The "Host" is very specific to your email provider and you'll need to find out from them what their hostname is; typically the best way to get this info is to Internet Search how to setup your foobar account and you'll often come across that email provider's tutorial on what to put into either Thunderbird or Outlook; just take the relevant information from those tutorials and plug them into the right places here. The "Login" name is also a little tricky; sometimes an email provider just wants you to login with a username, like "klaatu". Other times they want your entire address, like "klaatu@foobar.com"...again, the online tutorials you find from your email provider will most likely give you this information. There are a few checkboxes at the bottom that are fairly self-explanatory (and if not, just leave them as is). The most important one, I find, is the selection to include that account in the "Check Mail" action; that is, when you click "Check Mail" in Kmail, does that account get checked along with all your other accounts? or do you need to go through and check each account individually? The latter defeats the purpose of having an email client, for me, so I always include all accounts in the "Check Mail" action.

The next tab over in this window is the "Advanced" tab, which contains preferences about how you want to grab your mail from the server. These options are up to you, and have to do whether you want to move them off the server once and for all, or whether you'd like to copy the messages on the server down to your machine so that you now have two copies (one on the server, one on your computer), how many days or weeks to keep a copy on the server before deleting it, and so on. It's all entirely up to you.

The final screen, the "Security" tab is sometimes the most confusing, and again most of the information about this will come from your email provider or via trial and error on your part. There are two categories here: how your information is transferred from the server to your computer (encryption) and how the login information you enter is sent to the server. Find out from your server what they support, or go through every option and try to check your mail after each change. Obviously the former is preferred.

For the simplest of setups, you're done...or keep adding accounts and THEN you're done. You'll exit the configuration window, click on the "Check Mail" icon in the top icon toolbar, and you can kiss webmail good-bye.

For more advanced setups, read on.

Let's create a second Identity and demonstrate how we can have multiple personalities with multiple email accounts all in the same client. So we go to Settings in Kmail (be sure you're in Kmail and not just out in Kontact...meaning, your Kmail icon on the left is selected), and we click Configure Kmail, and then we click on the Identities icon on the left, and click "Add" to create a new identity.

So the setup is the same as before, only this time I'm entering Gort's information. Why would I want two identities? Well, imagine that I use Klaatu for all of my friends and family, but I am known at work as Gort. I don't want Klaatu's whacky and unprofessional signatures to be sent at the bottom of all my work emails, nor do I really care to receive work email in my personal accounts, so I keep the two worlds separate by giving myself two Identities, each with their own set of signatures and accounts.

Note that in the "Advanced" tab, I'm using Gort's gmail account to aggregate all of his email (OK, it being Gmail, I'd never really do this...but let's say Gort works for Google and has to use gmail). This means that even though someone might have an old email from Gort, after a few back-and-forth's with Gort, they'll start noticing that Gort's "real" address is Gort@gmail.com and hopefully eventually Gort will be able to deprecate those old addresses.

It also means that Gort will be using IMAP because Gmail does in fact allow IMAP access. So in the Gort@gmail account configuration, we should enter IMAP as the protocol, imap.gmail.com as the server to access, the login name and password. And in the security tab of this account, we'll enter SSL for encryption and Clear Text for login.

Notice, too, that Gort can have his own unique signature.

Back in the Identities configuration, we see that we have two identities. One will be set as the Default, and the other will have a button giving you the option to set it as the new default. I use Klaatu as my default because I use Kmail for personal emails more often than for Gort/professional ones.

In the "Accounts" configuration, I add Gort's account. I could add a lot more, but for the sake of brevity I will refrain.

NOW you really are done. Almost. As long as you've added all the accounts you want to check, and you have set up some Identities for yourself as needed, you are ready to receive email in Kmail. So go back out to the main window and click "Check Mail" and watch all your messages arrive. You'll notice on the left column of Kmail, a list of all your accounts and the mailboxes within.

But for now just click the "New Message" icon at the top left of Kmail, to compose a new message. Since this is the first time using the New Message window, you'll need to set it so that it shows which Identity you can send your message as. To do this, go to the View menu and select to view "Identity".

Now you can write your message and select specifically who you want to write it as.

Click the send button after you're finished, and your message will be sent with the proper Reply-To address listed, the proper signature, openGPG signature or encryption, and so on.

You will notice that I haven't done anything with SMTP, the protocol usually used to send email. Many tutorials online will show you how to configure Thunderbird or Outlook with SMTP set to use the servers of your email provider. This is fine (although possibly unnecessary) with web-based providers like yahoo or gmail, but some providers restrict you from accessing their servers from anywhere but the IP address at which you have their service (which is why you may have been out at a cafe trying unsuccessfully to send mail, but just got a bunch of errors; you were attempting to send email through their servers from an unknown location, which looks to a lot of places like you're someone trying to bounce spam off of them).

On many Linux and other unix systems, the user's computer is already set up to send electronic mail, by using a wee little program called Sendmail. So you can literally just send email straight from your computer, as is, no special smtp configuration required.

There are a few other features to mention briefly.

You can set Kmail to remain in your system tray by selecting it in the "System Tray" tab of the Kmail Configuraion screen.

There's a neat feature that notices if you mention the word "attach" or attached" in the body of your email but are not attaching anything to that message; Kmail will prompt you and make sure you actually want to send a message without an attachment even though you apparently speak of attachments in the body. This is a life saver, and I have expanded the keywords to include things like "included" and "attaching" and "screenshot". You can customize the list or disable this feature, or whatever you want, in the "Attachments" tab of the Kmail configuration.

The last but not least of features is the excellent support for encryption that Kmail has built in. If you use openGPG keys for privacy and identity verification, you can use your keys in Identities, in your Kmail Configuration window. Simply go to the "Cryptography" tab and point Kmail to the key you want to use for signing and encrypting. If you need more information on this, please check out my The Bad Apples Linux Oggcast episodes on the subject.

You can also set how automated you want the use of these keys to be. Do this in your Kmail Configuration screen; just click on the "Security" category on the left and you'll see all the options you need. I typically leave the "Automatically Signed" activated, and I believe all the other defaults met my needs and never required changing.

...And that's about all I've got on the subject of Kmail and Kontact. Happy emailing.