User tools

Website tools


benno pop3

Differences

The differences between two versions are shown here.

Link to this comparison view

Both sides of the previous revisionPrevious revision
Next revision
Previous revision
benno-pop3 [2019/05/23 13:09] – [Aufrufparameter] lwsystemsbenno-pop3 [2024/12/17 11:57] (current) – [Konfiguration] lwsystems
Zeile 3: Zeile 3:
 ==== Beschreibung  ==== ==== Beschreibung  ====
  
-benno-pop3 ist ein POP3 Konnektor für Benno MailArchiv. Die E-Mails werden aus einem Postfach eines POP3-Servers abgeholt und atomar in das INBOX-Verzeichnis von Benno geschrieben. Das Programm kann wird über das Paket //benno-pop3// installiert.+benno-pop3 ist ein POP3 Konnektor für Benno MailArchiv. Die E-Mails werden aus einem Postfach eines POP3-Servers abgeholt und atomar in das INBOX-Verzeichnis von Benno geschrieben. Das Programm kann wird über das Paket //benno-pop3// mittels //apt// installiert:
  
 +  apt install benno-pop3
 ==== Konfiguration ==== ==== Konfiguration ====
  
Zeile 13: Line 14:
 # benno-pop3.conf # benno-pop3.conf
 # #
 +# user =
 +# pass =
 +# host = localhost
 +# port = 110 | 995
 +# runuser           = benno
 +# numfetch          = 200
 +# inbox = /srv/benno/inbox
 +#
 +# extraheader_name  = X-BENNO-GW
 +# extraheader_value =
 +
 host = pop3.lw-systems.net host = pop3.lw-systems.net
 user = mailimport user = mailimport
Zeile 18: Zeile 30:
 </code> </code>
  
-Danach wird der Cron-Job in der Datei ''/etc/cron.d/benno-pop3'' aktiviert. Hierfür wird das //#// Zeichen vor der Zeile mit dem Programmaufruf entfernt.+Danach wird der Cron-Job in der Datei ''/etc/cron.d/benno-pop3'' aktiviert. Hierfür wird das //#// Zeichen vor der Zeile mit dem Programmaufruf entfernt.\\ **Achtung!** Die E-Mails werden nach dem Import vom POP3 Server gelöscht!
  
 <code> <code>
Zeile 24: Zeile 36:
 # #
 # #
-*/15 * * * * benno [ -x /usr/sbin/benno-pop3 ] && /usr/sbin/benno-pop3 -c /etc/benno/benno-pop3.conf -d -s -S+*/15 * * * * benno [ -x /usr/sbin/benno-pop3 ] && /usr/sbin/benno-pop3 -c /etc/benno-pop3/benno-pop3.conf -d -s -S
 </code> </code>
 +
  
 ==== Aufrufparameter ==== ==== Aufrufparameter ====
- 
-Falls mehrere Mailboxen importiert werden sollen, kann der Connector auch mit den entsprechenden Kommanozeilenparametern gestartet werden. 
  
 <code> <code>
Zeile 52: Zeile 63:
   -v verbose   -v verbose
 </code> </code>
 +
 +==== Abruf mehrerer Mailboxen ====
 +
 +When retrieving large mailboxes, a problem can occur where the import job is not yet finished when the next run starts. Depending on the POP3 server configuration, the emails may not yet be deleted, so the next run attempts to load the entire mailbox again. This can overload the POP3 server.
 +
 +For this reason, the program is designed so that only one job can run at a time.
 +
 +Für den Abruf mehrerer Mailboxen bietet sich ein serieller Abruf an. Hierfür wird ein kleines Script ''/etc/benno-pop3/fetch-serial'' erstellt, das die möglichen Konfigurationen der Reihe nach abarbeitet:
 +
 +
 +<file bash>
 +#!/bin/bash
 +#
 +# /etc/benno-pop3/fetch-serial
 +
 +CONFDIR=/etc/benno-pop3/
 +
 +ENABLED=''
 +for CONFFILE in $(ls -1 ${CONFDIR}/*.conf); do
 +    /usr/sbin/benno-pop3 -c "${CONFFILE}" -s -S -d
 +    ENABLED=OK
 +done
 +
 +[ ${ENABLED}x = x ] && echo "BENNO POP3 ERROR - No configuration enabled" && exit 1
 +</file>
 +
 +This script calls all configuration files with the extension .conf from the directory one after the other.
 +
 +Then activate the x-flag:
 +
 +  chmod +x /etc/benno-pop3/fetch-serial
 +
 +and adjust the cron call:
 +
 +''*/15 * * * * benno [ -x /etc/benno-pop3/fetch-serial ] && /etc/benno-pop3/fetch-serial''
 +
 +
benno-pop3.1558616992.txt.gz · Zuletzt geändert: 2019/05/23 13:09 von lwsystems