| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <document> |
| |
| <properties> |
| <title>Apache James Server 3 - Persistence</title> |
| </properties> |
| |
| <body> |
| |
| <section name="Mailbox and Mail Repository Store for Mail Persistence"> |
| |
| <subsection name="Introduction"> |
| |
| <p>The <b>Mailbox</b> persists users' Inbox, Sent Items, Trash... folders with their mails.</p> |
| |
| <p>The <b>Mail Repository Store</b> persists spam, error,... mails, so nothing to do with users visible mails.</p> |
| |
| <p>In case of database access, both Mailbox and Mail Repository Store use database connection defined via database.properties.</p> |
| |
| </subsection> |
| |
| <subsection name="Mailbox Persistence"> |
| |
| <p>Apache James Server uses the <a href="http://james.apache.org/mailbox">Apache James Mailbox</a> storage system |
| to store the users mailboxes.</p> |
| |
| <p>The mailbox library supports different persistence mecanisms: MailDir, Database (via JPA).</p> |
| |
| <p>Mailbox persistence is configured in spring-beans.xml (by default JPA, |
| you set the database connection properties in database.properties - can also be |
| MailDir).</p> |
| |
| </subsection> |
| |
| <subsection name="Mail Repository Store Persistence"> |
| |
| <p>Mail repository allow the administrator to store mail being processed in the mailet-container. The mails are typically |
| added by the <strong>ToRepository</strong> mailet. Then for Guice wiring <a href="manage-webadmin.html">webAdmin</a> API allows to read, delete and |
| reprocess these mails.</p> |
| |
| <p> |
| Typical use cases might be: |
| <ul> |
| <li>Error management: mails can be stored if an error is encountered during the mail processing, be the error caused by a bug, |
| a configuration mistake, a parsing error, temporary unavailable services. Reprocessing the mails once the problem fixed allows to |
| avoid data loss. Note that you can use mail repositories of different types on the same James server in order to not |
| be dependant from a single data-store.</li> |
| <li>Debugging: MDC context allows to follow mail processing, and isolate logs of a single mail. You can then configure |
| James in order to collect all mails processed in one part of your pipeline, and thus better understand this one.</li> |
| <li>Data collection: Collect spam, suspicious mails and much more. You can then later on analyze them or for instance train |
| your anti-spam system.</li> |
| </ul> |
| </p> |
| |
| <p>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/).</p> |
| |
| <p>More information about the mailstores configuration can be |
| found <a href="config-mailrepositorystore.html">here</a>.</p> |
| |
| <p>Mail Repository Stores are distinguished by how they store data. There are five types of |
| storage: File, Database, DBFile.</p> |
| |
| </subsection> |
| |
| </section> |
| |
| <section name="Domain Persistence"> |
| |
| <p>Read more on how to configure <a href="config-domainlist.html">domain persistence</a>.</p> |
| |
| </section> |
| |
| <section name="User Persistence"> |
| |
| <p>Read more on how to configure <a href="config-users.html">users persistence</a>.</p> |
| |
| </section> |
| |
| </body> |
| |
| </document> |
| |