Mailbox and Mail Repository Store for Mail Persistence

Introduction

The Mailbox persists users' Inbox, Sent Items, Trash... folders with their mails.

The Mail Repository Store persists spam, error,... mails, so nothing to do with users visible mails.

In case of database access, both Mailbox and Mail Repository Store use database connection defined via database.properties.

Mailbox Persistence

Apache James Server uses the Apache James Mailbox storage system to store the users mailboxes.

The mailbox library supports different persistence mecanisms: MailDir, Database (via JPA) and JCR.

Mailbox persistence is configured in spring-beans.xml (by default JPA, you set the database connection properties in database.properties - can also be MailDir, JCR).

Mail Repository Store Persistence

Available Mail Repository Store are defined in mailrepositorystore.xml. Each has an URL prefix (file, db, dbfile,...) that can be used in mailetcontainer.xml to define where to store spam,... mails (example: file://var/mail/error/).

More information about the mailstores configuration can be found here.

Mail Repository Stores are distinguished by how they store data. There are five types of storage: File, Database, DBFile, MBox and JCR.

Domain Persistence

Read more on how to configure domain persistence.

User Persistence

Read more on how to configure users persistence.