The differences between two versions are shown here.
| Both sides of the previous revisionPrevious revisionNext revision | Previous revision | ||
| benno-pop3 [2017/01/04 14:59] – [Installation] lwsystems | 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 benno-pop3 |
| + | ==== Konfiguration ==== | ||
| + | |||
| + | In der Datei '' | ||
| <code bash> | <code bash> | ||
| - | cp benno-pop3 | + | # |
| - | chmod 0755 /usr/ | + | # benno-pop3.conf |
| + | # | ||
| + | # user = | ||
| + | # pass = | ||
| + | # host = localhost | ||
| + | # port = 110 | 995 | ||
| + | # runuser | ||
| + | # numfetch | ||
| + | # inbox | ||
| + | # | ||
| + | # extraheader_name | ||
| + | # extraheader_value = | ||
| + | |||
| + | host = pop3.lw-systems.net | ||
| + | user = mailimport | ||
| + | pass = secret | ||
| </ | </ | ||
| - | ==== Installation ==== | + | Danach wird der Cron-Job in der Datei ''/ |
| - | + | ||
| - | + | ||
| - | 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 in der Datei ''/ | + | |
| < | < | ||
| Zeile 28: | Zeile 36: | ||
| # | # | ||
| # | # | ||
| - | */15 * * * * benno [ -x /usr/local/ | + | */15 * * * * benno [ -x / |
| </ | </ | ||
| - | <code bash> | ||
| - | # | ||
| - | # benno-pop3.conf | ||
| - | # | ||
| - | host = mailgw.lw-systems.net | ||
| - | |||
| - | user = mailimport | ||
| - | pass = secret | ||
| - | </ | ||
| ==== 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: | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||