User tools

Website tools


benno archive tool

This is an old version of the document!


benno archive tool

Das Programmpaket benno-archive-tool stellt Werkzeuge zum direkten Bearbeiten des Indexes oder Repositories zur Verfügung. Mit dem Kommando

apt install benno-archive-tool

The program will be installed.

The index is locked by the Benno Archive Daemon and must be stopped before working with this tool. We recommend creating a current backup or snapshot of the system before working on the index or the repository.

Procedure

  • Determine Benno's ID of the email(s)
  • Stop Benno Archive Daemon: systemctl stop benno-archive
  • Call benno-archive-tool with the ID list and corresponding parameters
  • Start Benno Archive Daemon: systemctl start benno-archive

Determine the ID of the emails

single email

Die ID einer einzelnen E-Mail kann ein Benutzer mit der Rolle ADMIN per Web-Interface ermitteln. Hierfür suchen Sie die E-Mail im Archiv und zeigen per Menüpunkt „Original“ den Quelltext der E-Mail an. Im Kopf des Popup-Fensters wird die Benno-Id angezeigt (hier: 2017:01A44237B194DB22106EE00BF2E8B25C001B793E85AD1CCB27CB59D70209A29E00)

Email list

Eine größere Liste von E-Mails kann über das Logfile oder per Konsole mit dem Kommando benno-client mittels Suchanfrage erstellt werden. Die Liste aller E-Mails aus dem Jahr 2011 erstellen Sie wie folgt:

benno-client --limit 10000000 -q '(Date:[20110010000 TO 201131122359])' > /tmp/2011.list

Achtung: Der Parameter –limit gibt an, wieviele E-Mail IDs maximal ausgegeben werden sollen. Daher muss er größer als die Anzahl der E-Mails im fraglichen Zeitraum.

Falls die E-Mails eines anderen Containers als dem Standard-Container BennoContainer ermittelt werden sollen, wird dieser mittels -C $CONTAINERNAME übergeben.

Functional description

The Benno archive tool allows you to perform operations on Benno's index. These operations primarily include deleting entries from the index, duplicate searches, and adding tags

  • The user must be root.
  • Das Löschen der Mails muss interaktiv mit der Eingabe von delete bestätigt werden

functions

  • Delete emails from the index using the MailID
  • Delete emails from the index using a list
  • Delete duplicate emails from the index
  • Mail will be deleted from the REPO folder
  • Empty folders above the mail path will also be deleted

Examples

Mit dem Parameter -m wird die BennoID der zu löschenden E-Mail übergeben.

Mail löschen

Delete email when the retention period has expired (10 years).

  benno-archive-tool -D -m 2020:12345678...

The retention period is calculated based on the difference between the email's index timestamp and the current time. The index timestamp is reset when the email is archived or re-indexed.

Mit dem Schalter -md, bzw. –maildate wird der Zeitraum anhand des Date-Headers der E-Mail berechnet.

  benno-archive-tool -md -D -m 2020:12345678...

Delete email without checking the retention period

  benno-archive-tool -D -f -m 2020:12345678...

Deleting a list of emails

  benno-archive-tool -D --maillist mails.txt benno-archive-tool -D -f --maillist mails.txt

The current journal file is located in a different folder (this is a rare case; the default is the current year from the server)

benno-archive-tool -md -D -m 2020:12345678 -jy 2021

Mail Duplikate löschen

Löschen von Mailduplikaten nach der Aufbewahrungsfrist

  benno-archive-tool -DD

Command line parameters

    -D,--delete Delete mails from index -DD,--deleteduplicate Delete duplicate mails from index -f,--force Delete mails without checking retention period -fe,--fileextension <FILEEXTENSION> File extension of the mail -h,--help print this description -i,--indexpath <INDEXPATH> Path of Index directory (default: /srv/benno/archive/index) -j,--journalpath <JOURNALPATH> Path of Journal directory (default: /srv/benno/archive/repo) -jy,--journalyear <JOURNALYEAR> Current year to determine the current.journal -m,--mailid <MAIL> Select mailid --maillist <MAILLIST> Select maillist file with mailids -md,--maildate Take as retention period parameter the mail date header (instead of IndexTS from index) -r,--repopath <REPOPATH> Path of Repo directory (default: /srv/benno/archive/repo) -s,--subdirs <SUBDIRS> Set the total amount of Subdirectories -sl,--subdirlen <SUBDIRLEN> Subdirlength -tk,--tagkey <TAGKEY> Set Tagkey name here (Currently only invisible possible) -tv,--tagvalue <TAGVALUE> Set Tagvalue name here (Currently only 1 or 0 possible)
benno-archive-tool.1733404584.txt.gz · Zuletzt geändert: 2024/12/05 13:16 von lwsystems