# Archiving Emails from Kerio Connect

<table border="1" id="bkmrk-this-tutorial-only-c" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">This tutorial only covers the specifics of archiving a Kerio Connect server (former Kerio MailServer). It is assumed that you already have a MailStore Server installation or Test installation and are familiar with the fundamentals of MailStore Server. Please refer to the [Manual](http://support.quikbox.com/article.php?id=527) or the [Quick Start Guide](http://support.quikbox.com/article.php?id=267) for more information.</td></tr></tbody></table>

MailStore Server offers several ways to archive emails from a Kerio Connect server which are described below. If you are not sure which archiving method best suits your company, please refer to the chapter [Choosing the Right Archiving Strategy](http://support.quikbox.com/article.php?id=296).

# **<span style="color: #0000ff;">Synchronizing Users</span>** 

MailStore Server offers special support for synchronizing users with an Kerio Connect server. Information about setup is available in chapter [Kerio Connect Integration](http://support.quikbox.com/article.php?id=529) of the manual.

# **<span style="color: #0000ff;">Archiving Individual Mailboxes</span>** 

Using the procedure described below you can archive an individual Kerio Connect mailbox for a specific MailStore user. The archiving process can be executed manually or according to a schedule.

## **Setup of the Archiving Process** 

For each mailbox please proceed as follows::

- Unless you want to archive your own mailbox into your personal user archive, please log on as MailStore administrator. Only a MailStore administrator can archive emails for other users.
- Click on *Archive Email*.
- From the list *Email Server* under *Create Profile* select *Kerio Connect* to create a new archiving profile.
- A wizard opens to help specify the archiving settings.
- Select *Single Mailbox*.
- Fill out the fields *Email Address*, *Host*, *Access via*, *User Name* and *Password*. Click on *Test* to verify the data entered.

**For the IMAP-TLS and IMAP-SSL protocols only:** You have the option to ignore SSL security warnings. Generally, these warnings appear if an unofficial certificate is used on the server.

- Click on *Next*.
- If needed, adjust the list of folders to be archived (only available with IMAP), the deletion rules (only available with IMAP), the filter (also only available with IMAP) and the timeout value in seconds. The timeout value only has to be adjusted in specific cases (e.g. with very slow servers).
- Click on *Next*.
- If logged on to MailStore Server as administrator, the target archive can be specified at the next step. Select the archive of the user for whom the mailbox is to be archived.
- At the last step, a name for the new archiving profile can be specified. After clicking on *Finish*, the archiving profile will be listed under *Saved Profiles* and can be run immediately, if desired.

**Hint:** If MailStore Server is configured to automatically delete successfully archived emails from the mailboxes and you do not want these emails moved to the "Deleted Items" folder by Kerio Connect, follow the instructions under [Permanently Deleting Successfully Archived Emails](#pds) in the [Archiving Incoming and Outgoing Emails Directly](#aio) section of this document.

# **<span style="color: #0000ff;">Archiving Multiple Mailboxes in One Step</span>** 

Kerio Connect allows to access the mailboxes of other users via IMAP by using a master password.

## **Step 1: Defining a Master Password** 

- Log on to Kerio Connect Administration with an administrative user.
- Click on *Configuration* &gt; *Advanced Options* and open the *Master Authentication* tab.
- Set the *Enable master authentication on this server* option.
- Adjust the *Allow master authentication only from IP address group* to your needs.
- Enter a complex password in the field *Master password* and confirm the password by entering it again in the *Confirm password* field.
- Click on *Apply* to save changes.

## **Step 2: Configuration of MailStore Server** 

- Log on to MailStore Client as MailStore administrator.
- Click on *Archive Email*.
- From the list *E-Mail-Server* under *Create Profile* select *Kerio Connect* to create a new archiving profile.
- A wizard opens to help specify the archiving settings.
- Select *Multiple Mailboxes*.
- To be able to archive multiple mailboxes, MailStore users along with their email addresses have to be set up in the MailStore user management.
- Under *Server Name* enter the name of your Kerio Connect server.
- Under *Access via* select the protocol to be used to access the Kerio Connect server. Wherever possible, you should always choose *IMAP-TLS* or *IMAP-SSL*.

<table border="1" id="bkmrk-if-you-would-like-to" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">If you would like to automate the archiving process and access the Kerio Connect server using *IMAP-TLS* or *IMAP-SSL*, you should enable the option *Ignore SSL Security Warnings*. Otherwise, if an unofficial or self-signed certificate is used on the Kerio Connect server, the automatic execution of the archiving process will fail.</td></tr></tbody></table>

- Under *Password* enter the master password defined in step one.
- Click on *Next* to continue.
- Customize the [List of Folders to be Archived](http://support.quikbox.com/article.php?id=304), the filter and the [Deletion Rules](http://support.quikbox.com/article.php?id=306) as needed. By default, no emails will be deleted from the mailbox. The timeout value only has to be adjusted if necessary (e.g. with very slow servers). Please keep in mind that these settings apply to all mailboxes to be archived.
- Click on *Next* to continue.
- Select the users whose mailboxes you would like to archive. The following options are available:

**All users with a configured email address**

Choose this option to archive the mailboxes of all users who are set up in the MailStore user management along with their email addresses.

**All users except the following**

Using the list below, this feature allows you to exclude individual users (and thereby their Kerio Connect mailboxes) from the archiving process.

**Only the following users**

Using the list below, this feature allows you to include individual users (and thereby their Kerio Connect mailboxes) in in the archiving process. Only the mailboxes of users who were explicitly specified will be archived.

**Synchronize with a directory service before archiving**

If this option is enabled, the MailStore user list is synchronized with the configured directory service before every archiving process. This has the advantage that new employees, for example, will be set up as MailStore users automatically before archiving allowing MailStore to archive their Kerio Connect mailboxes automatically as well. This feature is especially recommended for archiving mailboxes according to a schedule.

- Finally, you can choose a name for the new archiving profile. Once you click on *Finish*, the archiving profile will be listed under *Saved Profiles* and can be executed right away.

Additional information about executing archiving profiles is available in chapter [Email Archiving with MailStore Basics](http://support.quikbox.com/article.php?id=303).

**Hint:** If MailStore Server is configured to automatically delete successfully archived emails from the mailboxes and you do not want these emails moved to the "Deleted Items" folder by Kerio Connect, follow the instructions under [Permanently Deleting Successfully Archived](#pds) Emails in the [Archiving Incoming and Outgoing Emails Directly](#aio) section of this document.

# **<span style="color: #0000ff;"><a name="aio"></a>Archiving Incoming and Outgoing Emails Directly</span>** 

The Kerio Connect server offers an easy way to deliver all emails to a Kerio Connect specific archiving mailbox. MailStore Server archives this mailbox by means of an archiving task of type [Archiving IMAP and POP3 Multidrop Mailboxes](http://support.quikbox.com/article.php?id=526).

## **Step 1: Setting up a Kerio Connect Archiving Mailbox** 

- Click on *Configuration* and then on *Archiving and Backup*.
- Open the *Archiving* tab.
- Select the checkbox *Enable email archiving*.
- Select the checkbox *Archive to the remote email address* and enter the email address of the archive mailbox (e.g. *journal@mydomain.tld*) into the text field. Please note, that this email address must not be assigned to any MailStore user.
- Select all four options under *Archive*:
- *Local messages*
- *Incoming messages*
- *Outgoing messages*
- *Relayed messages*


## **<a name="pds"></a>Step 2: Permanently Deleting Successfully Archived Emails** 

To enable the automatic expunge feature, you need to manually edit the *mailserver.cfg* file by following these steps:

- Navigate to the install directory and locate the *mailserver.cfg* file
- Open the file in a text editor and search for the string *AutoExpungeOnDelete*
- Change the value from *1* to 0
- Stop the Kerio Connect Service
- Once Kerio Connect is completely stopped, save your changes to the file
- Start the Kerio Connect Service

## **Step 3: Configuration of MailStore Server** 

- Start MailStore Client on the computer from which the archiving task is to be initiated according to a schedule. This can be the MailStore Server computer or any other machine. Log on as MailStore administrator using MailStore Client.
- Click on *Archive Email*.
- From the *Email Server* list under *Create Profile* select *Kerio Connect* to create a new archiving profile.
- A wizard opens to help specify the archiving settings.
- Select *Multidrop Mailbox* and click *OK*.
- Fill out the fields *Access via*, *Host*, *Username* and *Password*. Click on *Test* to verify the data entered.

*For the TLS and SSL protocols only:* You have the option to *ignore SSL warnings*. Generally, these warnings appear if an unofficial certificate is used on the server.

- Adjust any further settings such as how to handle emails with unknown addresses or asking MailStore to delete emails after they have been archived. The latter option is especially sensible when dealing with mailboxes that are exclusively used for archiving.
- Click on *Next*.
- The timeout value only has to be adjusted on a case-by-case basis (e.g. with very slow servers).
- Click on *Next*.
- At the last step, select a name for the new archiving profile. After clicking on *Finish*, the archiving profile will be listed under *Saved Profiles* and can be run immediately, if desired.