The differences between two versions are shown here.
| Next revision | Previous revision | ||
| benno-pop3 [2016/11/08 06:47] – Externe Bearbeitung 127.0.0.1 | benno-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 über den URL [[http:// | + | 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 // |
| - | Das Programm wird unter /// | + | apt install |
| + | ==== Konfiguration ==== | ||
| - | <code bash> | + | In der Datei '' |
| - | cp benno-pop3 / | + | |
| - | chmod 0755 / | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Installation ==== | + | |
| - | + | ||
| - | + | ||
| - | Vor der Installation müssen die Abhängigkeiten erfüllt sein. Benno-pop3 benötigt die folgenden Perl-Module | + | |
| - | + | ||
| - | *File::Temp | + | |
| - | *Mail:: | + | |
| - | + | ||
| - | Auf einem Debian System muss hierfür noch das Modul // | + | |
| - | + | ||
| - | Dann kann benno-pop3 als Cron-Job konfiguriert werden. | + | |
| - | + | ||
| - | < | + | |
| - | # /etc/cron.d/benno-pop3:& | + | |
| - | # | + | |
| - | # | + | |
| - | */15 * * * * benno [ -x / | + | |
| - | </ | + | |
| <code bash> | <code bash> | ||
| Zeile 35: | Line 14: | ||
| # benno-pop3.conf | # benno-pop3.conf | ||
| # | # | ||
| - | host = mailgw.lw-systems.net | + | # user = |
| + | # pass = | ||
| + | # host = localhost | ||
| + | # port = 110 | 995 | ||
| + | # runuser | ||
| + | # numfetch | ||
| + | # inbox = / | ||
| + | # | ||
| + | # extraheader_name | ||
| + | # extraheader_value = | ||
| + | host = pop3.lw-systems.net | ||
| user = mailimport | user = mailimport | ||
| pass = secret | pass = secret | ||
| </ | </ | ||
| + | |||
| + | Danach wird der Cron-Job in der Datei ''/ | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | # | ||
| + | # | ||
| + | */15 * * * * benno [ -x / | ||
| + | </ | ||
| + | |||
| ==== Aufrufparameter ==== | ==== Aufrufparameter ==== | ||
| < | < | ||
| - | Aufruf: benno-pop3 [-D] [-c < | + | Aufruf: benno-pop3 [-D] [-c >] [-A >] [-u < |
| - | -D | + | -D print debug messages |
| - | -c < | + | -c < |
| - | -u < | + | -u < |
| - | -p < | + | -p < |
| - | -i < | + | -i < |
| - | -H < | + | -H < |
| - | -P < | + | -M < |
| - | -n < | + | -P < |
| - | -d | + | -R < |
| - | -s | + | -n < |
| - | -v | + | -d delete mails on pop3 server |
| + | -r < | ||
| + | -s ssl connect to pop3s (default port 995) | ||
| + | -S suppress ssl certificate verification | ||
| + | -A < | ||
| + | -X extra header name written to each mail (default: X-BENNO-GW) | ||
| + | -x extra header value written to each mail (setting enables) | ||
| + | -v verbose | ||
| </ | </ | ||
| + | |||
| + | ==== 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 ''/ | ||
| + | |||
| + | |||
| + | <file bash> | ||
| + | #!/bin/bash | ||
| + | # | ||
| + | # / | ||
| + | |||
| + | CONFDIR=/ | ||
| + | |||
| + | ENABLED='' | ||
| + | for CONFFILE in $(ls -1 ${CONFDIR}/ | ||
| + | / | ||
| + | ENABLED=OK | ||
| + | done | ||
| + | |||
| + | [ ${ENABLED}x = x ] && echo "BENNO POP3 ERROR - No configuration enabled" | ||
| + | </ | ||
| + | |||
| + | This script calls all configuration files with the extension .conf from the directory one after the other. | ||
| + | |||
| + | Then activate the x-flag: | ||
| + | |||
| + | chmod +x / | ||
| + | |||
| + | and adjust the cron call: | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||