---
# System prepended metadata

title: Archiving a Microsoft Exchange Email Account

---

# Archiving a Microsoft Exchange Email Account

This guides helps you download a copy of all the emails in a Microsoft Exchange account for archiving using a local service.

If you are familiar with Docker deployments, you can use a dedicated open-source email archiving solution. Popular choices include:
- [Mail-Archiver](https://github.com/s1t5/mail-archiver)
- [Bichon](https://github.com/rustmailer/bichon) (recommended)


Otherwise, you can opt for keeping your emails archived in free email viewing/archiving apps, such as:

- [MailStore Home](https://www.mailstore.com/en/products/mailstore-home/) (Windows-only)
- [Thunderbird](https://www.thunderbird.net/en-US/)

<br>

## 1. Download a copy of all your emails

### Step 1: Connect to your Exchange email using Thunderbird
- Download and install the free [Thunderbird email client](https://www.thunderbird.net/en-US/) (from Mozilla, the parent company of Firefox).
- When prompted, enter your Microsoft Exchange email address (or go to **File** > **New** > **Email Account**).
- Select the `IMAP` configuration and log into your account (a browser window should open to complete the OAUTH2 sign-in).
*The account should now appear in the left sidebar of the app.*

<br>

### Step 2: Install the email export add-on for Thunderbird
- Navigate to **Tools** > **Add-ons and Themes**.
- Install the **ImportExportTools NG** tool. It will enable batch exporting in the EML file format.

<br>

### Step 3: Download all the emails from the server
*Make sure that you have sufficient free space on your device (about 10GB should be enough).*

- Right-click on your email address in the left sidebar and select **Subscribe…**, then select all the folders to retrieve from the server (e.g. Sent Items, Archive).
- Go to **File** > **Offline** > **Download/Sync Now…**
- Press **Select...** and check all the folders to download from the server.
- Check the 'Mail messages' and 'Work offline' boxes, then confirm.


*Follow the download progress in the bottom sidebar. Wait for the network icon in the bottom-left corner of the app to be crossed out in red (offline mode).*

<br>

### Step 4: Export all the emails as EML files
- In the left sidebar, select all the folders which you want to export.
(use `ctrl`/`cmd` + `click` for multi-select)
- Right-click on any of the selected items, then choose **ImportExportTools NG** > **Export All Messages In Folder** > **EML Message Format** > **Messages And HTML Index**
- Choose the folder where Thunderbird will dump your email subfolders, then confirm.

*Follow the extraction progress in the bottom sidebar.*


<br>

**That's it, you have now exported all your emails as EML files!**

<br><br>

# Using Thunderbird as an email archive

*This is the most straightforward way to get your email archive up and running.*

To use Thunderbird as a local email archive, follow the steps above and select **Folder Export (mbox)** when prompted with the email export format in the **ImportExportTools NG** options (instead of EML).

- Right-click on **Local Folders** in the left sidebar of the app, then choose **ImportExportTools NG** > **Import mbox Files** > **All mbox Files from directory**.
- Select the path of the folder containing your exported mbox files, then let Thunderbird load them.
- Wait for the process to finish.


That's it! All your emails are now stored locally inside of Thunderbird. You can now **delete your Exchange email account** inside of Thunderbird.


<br><br>

# Using Bichon as an email archive

First, clone and deploy [Bichon](https://github.com/rustmailer/bichon) using Docker.


### Bichon quick-start

Here is a sample `docker-compose.yml`, feel free to adapt it to suit your needs.

```yaml
services:
  bichon:
    image: rustmailer/bichon:latest
    container_name: bichon
    restart: unless-stopped
    env_file: .env
    ports:
      - "${BICHON_HTTP_PORT}:15630"
    volumes:
      # SSD: Settings & Accounts (Volume 2)
      - /volume2/docker/bichon/root:/data/root
      # SSD: Search Indices (Volume 2)
      - /volume2/docker/bichon/indices:/data/indices 
      # HDD: Raw Emails & Attachments (Volume 1)
      - /volume1/System/Docker Data/Bichon/eml:/data/eml
    user: "1000:10"
```

Along with this sample `.env` file.
```text
# --- NETWORK ---
BICHON_HTTP_ADDR=0.0.0.0
BICHON_HTTP_PORT=15630
BICHON_CORS_ORIGINS=your-cors-urls

# --- SECURITY ---
BICHON_ENCRYPT_PASSWORD=your-encryption-password

# --- PATHS (local to the container) ---
BICHON_ROOT_DIR=/data/root  # Main config (on SSD)
BICHON_INDEX_DIR=/data/indices  # Index (on SSD)
BICHON_DATA_DIR=/data/eml  # Bulk data (on HDD)
BICHON_LOG_LEVEL=info
```

<br>

> See [this section](https://github.com/rustmailer/bichon?tab=readme-ov-file#-new-behavior-in-v014) for CORS configuration details.

<br>

> The default admin account credentials are:
> - Username: `admin`
> - Password: `admin@bichon`
>
> **Don't forget to change them!**

<br>

### Setting up Bichon for email import

*Unfortunately, generating an OAuth2 token for linking Bichon to an Exchange account is only available to Azure account admins. Instead, here is the procedure to import EML files directly into the archive.*

- Create a new NoSync account in the Bichon web UI (e.g. on http://localhost:15630)
- Generate an API key inside of the Bichon web UI, and keep it for later

<br>

### Using Bichon's CLI helper to import EML files
Here is the official documentation for this procedure: https://github.com/rustmailer/bichon/wiki/Using-Bichonctl-For-Email-Import

- Download bichonctl from Bichon's [releases page](https://github.com/rustmailer/bichon/releases)
- Run the executable and follow the CLI instructions
    - This will ask for the API key you just generated, as well as the Bichon service's local URL
    - When importing multiple EML subdirectories, select the main folder containing these subdirectories to batch the import


<br>

**That's it! All your emails are now safely stored inside of the Bichon archive.**
