After the emails to be imported have been copied to the Benno MailArchiv inbox as here , they are read by the Benno Archive Daemon. This involves analyzing the headers and calculating the email's checksum. The checksum is then used to determine the filename under which the email is saved.
The email is now stored in the repository directory under /srv/benno/archive/boxname . In the default installation, the box name is always the current year.
Once the email has been successfully saved to the repository, it will be deleted from the Inbox directory.
Falls es bei der Verarbeitung einer E-Mail zu einem Fehler kommt, wird dieser intern abgefangen und im Log vermerkt. Die zu importierende E-Mail in der Inbox wird unbenannnt und bekommt die Endung .err. Eine zu importierende E-Mail wird direkt nach dem Einlesen im Repository gespeichert. Daher ist eine fehlerhafte E-Mail in der Regel schon im Repository gespeichert, wenn der Fehler festgestellt wird. Aus Sicherheitsgründen kann Benno MailArchiv keine E-Mail aus dem Repository löschen, so dass die E-Mail im Fehlerfall in der Regel zweifach vorhanden ist.
Nachdem die E-Mail im Repository abgelegt wurde, wird der durchsuchbare Text aus der E-Mail und den Anhängen extrahiert. Diese Analyse wird mit Hilfe der Apache Bibliothek Tika durchgeführt. Tika bietet ausschließlich eine high-Level Schnittstelle zur Analyse von E-Mail an. Die gesamte E-Mail wird über die Schnittstelle an Tika übergeben. Tika liefert dann einen Token-Strom, der in Apache Lucene indexiert wird. Im Falle von fehlerhaften Anhängen in der E-Mail bricht Apache Tika die Text-Extraktion insgesamt ab und gibt einen Fehler zurück. Benno MailArchiv erkennt das Problem und benennt die E-Mail in der Inbox nach .err um, so dass die E-Mail auf keinen Fall verloren geht und das Problem auffällig dokumentiert ist.
Starting with version 2.1.0 of Benno MailArchiv, the integration with Apache Tika has been made more robust. Now, before Apache Tika analyzes the email, it is split into its components (mail body and individual attachments). These parts are then analyzed individually by Apache Tika. If a faulty attachment is detected, this is recorded in the log file, and the next attachment is indexed. This ensures that the largest possible portion of the email is indexed and therefore searchable.
Starting with Benno MailArchiv version 2.1.6, faulty emails can be directly re-imported by simply moving them back into the inbox directory. During the import process, the archiver checks whether the checksum already exists in the repository. If so, the corresponding entry in the index is replaced with the newly imported data.
If the file extension is renamed to .eml, the emails will be imported again.
For testing or other special cases, the import behavior can be adjusted so that the email files are not deleted, or only deleted after successful archiving from the Inbox directory.
Dieser Modus wird mit Hilfe des Kommandozeilenschalters -d bzw. --delete des Benno Archive Daemons aktiviert.
| mode | Description | Behavior upon success | Behavior in case of errors |
|---|---|---|---|
| ALL | Standard mode. Deletes everything that has been successfully "completed". | File will be deleted. | The file remains as .prc (it will no longer be processed). |
| ASSIGNED | Deletes only emails that have actually been archived. | File will be deleted. | The file will be renamed to .kep. |
| NEVER | No files are ever deleted. | The file will be renamed to .kep. | The file will be renamed to .kep. |
Note regarding errors: Regardless of the selected mode, files that encounter a technical error during parsing or archiving will always be renamed to .err to allow for later analysis.
The basic startup configuration of the Benno Archive Daemon is controlled via the file /etc/default/benno-archive . The parameter DAEMON_ARGS extended accordingly.
START_ARCHIVE=yes JAVA_OPTIONS=' -server ' DAEMON_ADDRESS='127.0.0.1' DAEMON_PORT='2555' #DAEMON_ARGS='-c /etc/benno/benno.xml' DAEMON_ARGS='-c /etc/benno/benno.xml --delete NEVER' USER=benno