Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| — |
lpi2:cyrus-imapd-ssl [2015/05/21 09:41] (aktuell) |
||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | Todo: DH-Parameter einbinden | ||
| + | |||
| + | ====== Installation cyrus-imapd mit SSL/TLS Unterstützung ====== | ||
| + | Vorraussetzung: [[cyrus-imapd]], [[ssl]] | ||
| + | |||
| + | ===== Konfiguration Cyrus-IMAP ===== | ||
| + | ==== cyrus Benutzer Zugriff auf ssl-Verzeichnis erlauben ==== | ||
| + | gpasswd -a cyrus ssl-cert | ||
| + | |||
| + | ==== SASL Einstellungen ==== | ||
| + | ''/etc/imapd.conf'': | ||
| + | <file> | ||
| + | allowplaintext: no | ||
| + | sasl_minimum_layer: 128 | ||
| + | tls_cert_file: /etc/ssl/certs/servercert.pem | ||
| + | tls_key_file: /etc/ssl/private/serverkey.pem | ||
| + | tls_ca_file: /etc/ssl/certs/cacert.pem | ||
| + | </file> | ||
| + | |||
| + | /etc/init.d/cyrus2.2 restart | ||
| + | |||
| + | ===== testen ===== | ||
| + | ==== IMAP/TLS mit openssl s_client ==== | ||
| + | openssl s_client -starttls imap -connect localhost:143 | ||
| + | . capability | ||
| + | . login nutzer15 villa | ||
| + | . list "" "*" | ||
| + | . logout | ||
| + | |||
| + | ==== IMAP/TLS mit imtest ==== | ||
| + | imtest -t '' -a nutzer15 -w villa localhost | ||
| + | . capability | ||
| + | . list "" "*" | ||
| + | . logout | ||
| + | |||
| + | ===== Plaintext verbieten ===== | ||
| + | ''/etc/imapd.conf'': | ||
| + | <file> | ||
| + | allowplaintext: no | ||
| + | </file> | ||
| + | |||
| + | Problem: cyradm kann kein SSL/TLS | ||
| + | |||
| + | Lösungsmöglichkeiten: | ||
| + | * SSL-Tunnel bauen | ||
| + | * 2. imapd starten, der nur auf loopback lauscht und klartext erlaubt: | ||
| + | |||
| + | sed -r 's/^(allowplaintext:[[:space:]]*)no/\1yes/' /etc/imapd.conf > /etc/imapd.conf.localhost | ||
| + | |||
| + | ''/etc/cyrus.conf'': | ||
| + | <file> | ||
| + | imaplocal cmd="imapd -U 30 -C /etc/imapd.conf.localhost" listen="localhost:1430" prefork=0 maxchild=100 | ||
| + | </file> | ||
| + | |||