Managing Emails and K-9 Configuration
This chapter deals with some of the more advanced use of K-9 mail including managing your emails, dealing with folders and other aspects of configuring K-9.
In this section we look at a few ways to manage your emails.
When you are looking at a long list of emails you have the choice to order or sort them in different ways. Depending on how big your screen is you can do this by either clicking on the Sort By... in the More Actions menu or the the sort by Icon.
The options available to you are to sort by:
Date, Arrival, Subject, Sender, Star, Read/unread, Attachments.
Working with Folders
Working with folders is a good way to deal with a lot of email. In another chapter we looked at how to move your emails to the trash folder or archive folder. If you want to refile your emails into other folders, this can be done in a couple of different ways.
If you are reading a single email, click on the More Actions icon and then on Refile.
You can then choose to Move or Copy the email to one of your accounts folders.
You will be asked to Choose a Folder to move / copy your email into.
To create new folders for and email account first go your Accounts page. Then click on the icon of the folder next to the account you want to work with.
This will show you a list if the different folders in the account.
There isn't currently an option to add folders in K-9 mail. You would need to do that in your Webmail settings.
Folders settings and classes
If you use email a lot and access it in different ways then you may only want to only check, view or download email from certain folders in your account. K-9 gives you flexible ways of doing this.
As an example, you may be subscribed to many email lists but you don't want to view those messages onto your Android device. Using your web mail options, you could set up your web mail to automatically filter these emails into an Email Lists folder which you would exclude from checking in K-9.
To full explain the process fully, is beyond what we have space for in this manual. In short however, the process involves setting your folders to be "1st or 2nd class". In the example above you would set the Email Lists folder to be a 2nd class folder.
To access these settings navigate to a folder list. Click on the More Actions icon. Click on Settings and then Folder Settings.
You will see a list of different options for folder options. This is where you can change the display or sync class.
For a more in depth look at Folders and classes have a look at the following page (in English) on the K-9 resource pages. https://github.com/k9mail/k-9/wiki/WorkingWithClasses
There are three level of settings that you are able to change in K-9 Mail, Folder settings, Account Settings and Global Settings. This section aims to give a quick overview of some of the most vital settings you can change. We encourage you to investigate the other settings.
To access account settings navigate to a folder list inside the account you want to configure, click on the More Actions icon. Click on Settings and then Account Settings.
The key sections to investigate here are the Fetching mail and Sending mail options as they contain the settings you are most likely to want to alter. A summary of what can be found in some of these different sections follows.
General Settings: Account name, is this default account, account color.
Fetching Mail: what classes of folders to check, how often to check messages, configuring incoming email server.
Sending Mail: set your display name, email address, where to bcc all emails to, configuring your email signature, message format (plain or html), always show cc and bcc fields, configuring outgoing (smtp) settings.
Folders: what classes of folders to show and search, which folders to use as your draft, sent, spam and trash folder.
Storage: use internal or external storage.
Notifications: show status bar notifications when mail arrives, vibrate, new mail ringtone.
Search: enable and configure searching on mail server.
Configuring how emails to view
One of the key things you may want to change is how many messages you want to keep on your phone in each folder. By default this is set at 25 which is quite low.
To do this you should change the Local folder size in your Account settings.
In this chapter we will look at installing an additional app called APG to allow us to use K-9 to send and receive encrypted emails.
About email encryption
Before explaining the process for setting up APG and K-9 it is useful to know a little about email encryption using the PGP technology.
The process of PGP requires you to use two sets of keys to read and send emails. Both the sender and receiver of email need a private (secret) key and a public key to be able to correspond.
You can see that in order to sent an encrypted mail you will need the public key of the person you are sending to and vice versa.
It is really easy to fake who is sending emails. To counter this, PGP is also used to sign emails. Signing emails is a good way to check that email is really sent by the person you receive it from. There is more background information about the process here.
OpenPGP is an open source approach to encryption via PGP method. In these days after the release of information on the PRISM surveillance programme, it has become accepted that open source solutions offer the best chance of privacy. APG and K-9 are also open source applications.
Open source solutions are much less likely to have any 'backdoors' which allow access by security contractors. Their source code is available for their users to check. We may not be able to understand the code, but other users do. This community review process makes software much more unlikely to contain anything harmful or risky to use.
Installing and using APG to encrypt your email in K-9
Follow a similar procedure to installing K-9 to install the APG app from the Play store or F-droid.
After you have checked that the App Permissions are ok, click Accept.
If you want to find out more about Android apps and security there are many resources available on the Internet. As a basic rule, apps should not ask for more permissions than they need to do their job.
Creating your PGP key pair
Start the APG app. You will see a welcome message that suggests that you install K-9 Mail, if you haven't already and some other tips, click OK.
To get started click on the More Actions menu key or the Menu button if your phone has one.
To get started we need to set up a key pair. You may have one already if you use PGP in another way. In any case, select Manage Secret Keys.
Select the More Actions menu again. If you already have a key pair you can click on Import Keys. If not, then select the Create Key option.
You should normally add a pass phrase, a password that gives additional protection to the process.
Click on Set Pass Phrase and enter a chosen password twice.
Add a User ID by clicking on the + next to User Id and entering a name and email.
You can now create a key by clicking on the + next to Keys.
It is suggested that you keep the default setting of RSA but double the suggested 1024 to 2048.
You now get the option to set an expiry date for your key and to choose how you will use they key.
Under Usage choose Sign and Encrypt.
Now click on Save. This completes the process of creating your key pair (public and secret keys).
You should see your new key in the list of secret keys.
If you browse to manage your public keys then you will see your new public key is listed. This is very useful as you will need to send this key to people you want to receive encrypted emails from.
Importing Keys from other Applications
You may already have a key pair that you want to import from another email applications (like Thunderbird). If so you can import them into AGP. To proceed you will need to export your keys into an asc or gpg file and transfer them onto the storage space of your phone via USB or Bluetooth.
In the Manage Private Keys menu, select the Import Keys option.
Now browse to where you have copied your keypair to and select it.
You have the option to delete the key after importing it.
This should import your own key to your Private Key menu ready to be used for encryption.
If you start with Private key you will need to repeat the process with any public keys you want to inport.
Exchanging Public Keys
To send and receive encrypted mail you need to exchange public keys with another email user.
First export your key by selecting Export keys from your options in Manage Public Keys.
Choose a place to save the exported key which is a text file.
Send this public key to one of your contacts that uses PGP and ask them to send you an encrypted email.
If you want to try but don't know anyone who used encryption, you can send an email with your public key to email@example.com.
Sending Encrypted Email
Keeping a track of all these keys can be hard. To make it easier there are key servers where you can upload your and download other people's keys.
From the options menu of main screen of AGP select Key Server.
Enter the email of the contact you want to send an email to and select Search.
If the key is on the key server it will return a result.
The number to the right of the result is called your Key ID. This key ID is a quick way of checking you are using the right key as sometimes there may be more than one key associated with an email address.
Once you have downloaded or imported the key of your contact, you will be able to send them an email in K-9 easily.
When you compose a new message simply put a tick in the Encrypt box which is now viisible after installing APG.
Remember you can only encrypt email to people for who you have the public PGP key.
To sign your email select the Sign box and then choose the key you want to use to sign this email.
Current limitations of encryption in K-9
As you can see K-9 uses the external tool APG to do the encryption of emails. There are some current limitations of this process.
No encryption of attachments or email mime
The encryption process currently only works with the text inside your email message. This is called 'inline' encryption. Some email clients also allow you to encrypt attachments to your email but this is not possible currently with K-9 / APG.
This process of encrypting attachments is also used to send encrypted email and attachments together as gpg/mime type. Without going into the technical details, this is now the preferred way to encrypt your mail if your client supports it.
Because this is a frequently requested feature, it is very likely that this will be possible soon. Certainly the Guardian project are working in this area to create a GnuPG client for Android and are likely to make their project compatible with K-9.
This section covers reading, writing and deleting emails.
To read emails you should turn start K-9 and click on the mail folder which contains messages that you want to read. If you want to read all new messages you can select the Unified Inbox.
We can see that a choice of different folders. The numbers shown indicate how may unread messages are in each folder.
When we select any one of the folders we see a list of different email messages it contains. There is a solid circle next to message that are unread and the text of the email subject is bolder.
To read one of the messages select the main part of the message.
K-9 Mail will then display the message. K-9 should be able to deal with most kinds of email including those that contain HTML formatting and images.
In your header bar you can see several options.
Selecting the arrow keys allow you to move on to the next message or previous message shown in your folder list. Selecting the picture of the trash can / bin moves the message to the Trash folder and then proceeds to the next message in your list.
If you want to return to the folder list of messages you can touch the K-9 icon of the robot dog and the arrow next to it.
Selecting the robot dog icon is also the way to return to the list of accounts from your Inbox.
If you want to refresh your accounts to check to see if new emails have arrived you can click on the refresh icon in the Inbox message view.
In your accounts window the Refresh icon will check all accounts.
Another way to refresh your emails in your inbox is to select any message and drag it towards the bottom of your screen. You will see the message Release to refresh.
If you release your selection then K-9 will load any new messages you have.
Reading email attachments
To read or view email attachments select the Show attachments box.
You should then see more information about the attachment. If the attachment is an image you may see a preview of it.
You have the option to either Open or Save your attachment/s.
There are several ways to write an email message depending on where you are in the K-9 app.
Replying to an email
Depending on the size of your screen some options may be different. If you want to reply to an email that you are reading then you should either click on the the Reply icon.
If the Reply icon is not visible then select the More Actions icon in the top left of your screen and select Send.
Selecting Send gives you several options.
The options are Reply - Reply all - Forward and Share.
The Share option will give you different options to share the email text on different apps on your Android device.
Reply will reply only to the sender or email list that you have been sent from. Reply all replies to all recipients of the email and Forward allows you to send the contents of the email to another person.
The process for sending email for all three options is similar to writing new emails.
Writing new emails
To write a new email you can click on the compose message icon in the folder window.
In your Inbox view, to send a new message touch the More Actions icon and then select Compose.
The next screen you see will be the Compose window.
The options here include the To box where you should enter emails you want to send your emails to, a Subject box for the title of your email, in your Message text enter the the text of your email.
To send a simple email to one person fill out these options and select on the send mail icon which is a right facing triangle / arrow head at the top of the screen.
Along the top line of the Compose window there are other icons which help us. Touch the icon with two heads and you will see more options appear to allow us to send mail more flexibly.
The CC and BCC fields appear and we can enter emails here. CC is a field that indicates that the person whose email is in CC is not the main recipient and may not be expected to reply but they are included in the mail as they will find the information useful.
BCC is similar but the B here stands for 'blind' as other recipients do not see the identity of people in the BCC fields.
To the right of the email fields you will see another icon of a head with a + sign. This is a way of adding the emails of people in your contacts.
After clicking on the icon you can select contacts from your contact list by touching them. They will then appear in the relevant box of your email.
One of the great things about using email is that you can send just about any kind of file to someone else as an attachment to your message. To do this click on the icon of the paper clip.
Depending on how your Android device is configured you may see different options to allow you to select a file from your phone or tablet.
Use your File Manager or similar application to choose the file you want to attach.
Your file will normally be on your internal SD card or your external SD card. If you want to attach a photo you have taken may be in your DCIM folder. A file you downloaded may well be in the Download folder. You may have to investigate a bit if you are unfamiliar with the files on your phone.
Select the file you want to attach. You should now see it attached to your message.
When you send your email you should see a notification.
To delete an email you are reading you can touch the icon of the Trash bin.
To delete more than one email at a time you can do this when you have a list of messages in any of your folders.
To select your first email touch the area to the very left of the summary of one message that you want to delete. This can be a bit tricky so aim well.
You should see a tick appear in the box and a message appear in the header saying 1 Selected.
Continue to select other messages you want to delete.
Now that one message is selected, you can touch any part of the message summary to select it.
To delete all selected messages you can touch the delete / trash bin icon. This moves the messages to the Trash folder of your account.
You will also see other icons which give us options to help us manage our mail. The icon of the envelope gives the option to set the main selected to be marked as read or unread.
The icon of three messages together in a pile moves selected messages to your Archive folder.
The More Actions icon of three squares gives you more options which will be covered in another section.
When you first get started with K9 you will need to do two main things. First you will want to install K9 on your phone or tablet. Then, you will need to configure K9 to use one or more email accounts.
Installing K-9 Mail
Most Apps on Android phones and tablets are installed through the Google Play app store. However, you may want to be able to install K9 without leaving your details with google. This is also possible using F-droid project
You will need to be connected to the internet with wifi or your phone's data connection to complete these steps. Some of the steps may look different depending on your version of Android and the size of your device.
Installing K-9 Mail from Google Play
Start Google Play by clicking on the Play Store icon or the Shop icon on your android device.
In the top bar, you should then be able to see a search icon that looks like a magnifying glass.
In the top left corner of the screen you should see a flashing cursor allowing you to type a search term to search the Google Play store.
Type in "K9".
To search click on the search icon.
The application you want is called "K-9 Mail". Click on the panel to see information on the application. You will also see the option to INSTALL.
Click on the INSTALL option and follow the instructions. You will need to agree to allow K9 access to your messages, personal information (in order to add contacts), network communications etc. This is normal and you should accept to be able to use the application.
When you start K-9 you will be shown a summary of its features. You should click Next to continue. You can skip forward to the section on setting up your email accounts.
Installing K-9 Mail from F-Droid
Some Android apps can be downloaded and installed without having to give your details to Google Play store. You can find a recent version of K9 on a website called F-Droid. Installing through the F-Droid repository also allows you to get K9 updates automatically. F-Droid is an alternative to the Google Play market. If you like what you see then you can install the F-Droid repository app which allows you to easily browse and install other FOSS applications.
Before you can install an app in the following way you will need to adjust the security settings on your device to Allow installation of apps from unknown sources.
While it is great to have an alternative to Google Play and to be able to install apps directly to our devices, it is important to know that there are risks to installing apps from untrusted sources. Make sure you either use Google Play, a trusted source like f-droid OR the website of the developers. Don't download apps (apk files) from just anywhere on the web.
On your android device, point your web browser to http://f-droid.org. Select the Search navigation link. Search for K9 and then touch the K-9 email client from the results.
Scroll down the page and select the the link which says download apk to download a file of the latest version of K9 listed. At the time of writing this is Version 4.409 as shown in the screenshot.
When you have selected the the link you should get a notification on your navigation bar that you are downloading a file.
When this disappears your download should have completed and you can touch this area of the screen to see your downloaded file.
If the above technique doesn't work for you then you should be able to find the file in your Download file by using the file manager on your Android device.
Using either of the ways above, select the name of the downloaded .apk file - in this case com.fsck.k9_17046.apk - to start the installation process. You will be given a choice on how to install the application. Select Package installer and click on Just once.
The installation process asks you to confirm how much control of your device you want to give over to the K-9 application.
Once you have installed your K-9 application you are ready to add one or more email account to it.
Setting up your email accounts
On setting up a new account you are presented with a screen asking you to enter the Email address and password.
We will guide you through the process of setting up an email with both a major email provider and an independent email provider. In both cases you will already need to have signed up for an email account and have your email address and password ready.
Setting up a Google mail account
Enter your email and password in the box provided.
Click on the Next option.
K-9 will now search its resources to see if there are details of the configuration of gmail.
Because it is a well known resource, the settings are found and you should then see screens which say Checking incoming server settings... and Checking outgoing server settings...
If there are no problems with your password then K-9 should connect to google mail and start to download any existing email you have.
The following screen tells us that we are almost done and asks for two more pieces of information, account name and display name.
Giving the account a name is helpful when organising your email if you add more that one account. Make sure to enter a name to show on your outgoing emails so people know who you are when you send them a message.
The next window you see is a Change log message. Click OK.
When this is done you should be shown the Accounts window. You are ready to skip forward to learn about everyday use of K-9 or learn how to set up an account manually.
Setting up an email account manually
It may be that your email server account isn't recognised by K-9. If this is true then the process above will not work and you will have to set up your email account manually.
If you have already installed an account and want to install another then click on the More Actions icon or the menu key on your device.
Now select the Add account option.
Enter your email and password in the dialogue boxes shown.
Select the option Manual Setup.
This gives you three options IMAP, POP3, or Exchange (WebDAV).
At this stage what you choose depends on the options offered by your email provider. If they offer both IMAP and POP3. Some advantages of IMAP are that it normally takes up less storage space on your device and allows easier syncing of email if you check from more thane one device.
We will document how to set up your email with IMAP as this is now the most common method of checking email. If you want to choose POP3 the following instructions should be understandable.
If you want help on setting up K-9 with Exchange(WebDAV) there is help here on the K-9 support pages. https://github.com/k9mail/k-9/wiki/K9MailAndExchange
Configuring your email with IMAP
Choose IMAP after Fill in the server settings that your email provider sent you or those listed on their help page. An example of some incoming email settings follow.
For security select either SSL/ TLS(always) or STARTTLS(always) don't select None.
Click on Next when you have filled out the settings. If there is an error go back to the details given to you by your email provider and check them.
If these setting don't work some experimenting with different settings is sometimes helpful. Their documentation could possibly be out of date.
If you get the option to accept a certificate click Accept Key. You can normally check that the detail of this key are correct on the website of your email provider.
Outgoing mail is called SMTP, you need to fill in different set of settings for this which you should have been sent by your email provider.
Fill in your Outgoing server settings and click Next.
This should return you to the Accounts window where you should see your new account listed.
You are now ready to move on to learn about the every day use of K-9 to read, write and manage your emails.