lpi2:postfix-tls
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Vorherige Überarbeitung | |||
| — | lpi2:postfix-tls [2024/08/10 10:48] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | Todo: | ||
| + | * Wie aktualisiert man ''/ | ||
| + | * DH-Parameter einbinden (('' | ||
| + | |||
| + | ====== Vorraussetzungen ====== | ||
| + | * Einfache [[postfix]] Installation | ||
| + | * [[ssl]] Zertifikat erzeugt | ||
| + | * Korrektes [[bind|DNS]] | ||
| + | * Korrekte [[lpi1: | ||
| + | |||
| + | ====== SSL / TLS für Postfix ====== | ||
| + | ===== Server-Zertifikat für verschlüsselte Verbindungen ===== | ||
| + | Wie in [[lpi2: | ||
| + | |||
| + | cd /etc/ssl | ||
| + | cp / | ||
| + | cp / | ||
| + | cp / | ||
| + | |||
| + | chmod 640 private/ | ||
| + | chgrp ssl private/ | ||
| + | |||
| + | === openSuSE 12.1 === | ||
| + | == postfix Benutzer Zugriff auf ssl-Verzeichnis erlauben == | ||
| + | gpasswd -a postfix ssl | ||
| + | ==== Postfix konfigurieren ==== | ||
| + | postconf -e " | ||
| + | postconf -e " | ||
| + | postconf -e " | ||
| + | postconf -e " | ||
| + | |||
| + | oder besser wie von [[https:// | ||
| + | <file txt main.cf> | ||
| + | # generated 2022-09-23, Mozilla Guideline v5.6, Postfix 3.5.13, OpenSSL 1.1.1n, intermediate configuration | ||
| + | # https:// | ||
| + | smtpd_tls_security_level = may | ||
| + | smtpd_tls_auth_only = yes | ||
| + | smtpd_tls_cert_file = / | ||
| + | smtpd_tls_key_file = / | ||
| + | smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 | ||
| + | smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 | ||
| + | smtpd_tls_mandatory_ciphers = medium | ||
| + | |||
| + | # curl https:// | ||
| + | # not actually 1024 bits, this applies to all DHE >= 1024 bits | ||
| + | smtpd_tls_dh1024_param_file = / | ||
| + | |||
| + | tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256: | ||
| + | tls_preempt_cipherlist = no | ||
| + | </ | ||
| + | )) | ||
| + | |||
| + | ==== testen === | ||
| + | === netcat === | ||
| + | netcat localhost smtp | ||
| + | EHLO asdf | ||
| + | .. | ||
| + | < | ||
| + | 250-STARTTLS | ||
| + | </ | ||
| + | === openssl === | ||
| + | openssl s_client -starttls smtp -CApath / | ||
| + | |||
| + | === swaks === | ||
| + | swaks -f me.example.com -t you.example.com -tls -s 127.0.0.1 | ||
| + | |||
| + | ===== DANE ===== | ||
| + | DNS Resource Record erzeugen: | ||
| + | |||
| + | postfix tls output-server-tlsa | ||
| + | oder | ||
| + | postfix tls output-server-tlsa / | ||
| + | |||
| + | Den TLSA Resource Record muss man immer neu erzeugen, wenn der öffentliche Schlüssel des Zertifikats sich ändert. TODO: certbot oder dehydrated so aufrufen, dass der bisherige Schlüssel wieder verwendet wird. | ||
| + | |||
| + | ... und im DNS hinterlegen. | ||
| + | ====== Dokus & Links ====== | ||
| + | * http:// | ||
| + | * http:// | ||
| + | * http:// | ||
| + | * https:// | ||
