Zum Inhalt springen

Postfix/Sicherheit: Unterschied zwischen den Versionen

Aus Foxwiki
K Textersetzung - „[[Postfix:“ durch „[[Postfix/“
K Textersetzung - „ “ durch „ “
Zeile 16: Zeile 16:


; Einstellungen für relaying
; Einstellungen für relaying
  smtp_sasl_auth_enable = yes
smtp_sasl_auth_enable = yes
  smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  smtp_sasl_security_options = noanonymous
smtp_sasl_security_options = noanonymous


; Verify wird nicht benötigt
; Verify wird nicht benötigt
  disable_vrfy_command=yes
disable_vrfy_command=yes


; Interface auf lokal schalten
; Interface auf lokal schalten
  inet_interfaces=127.0.0.1
inet_interfaces=127.0.0.1


; Ipv6 abschalten wenn nicht benötigt
; Ipv6 abschalten wenn nicht benötigt
  inet_protocols = ipv4
inet_protocols = ipv4


; Serverbegrüßung einschalten
; Serverbegrüßung einschalten
  smtpd_helo_required=yes
smtpd_helo_required=yes


== Logjam in Postfix verhindern ==
== Logjam in Postfix verhindern ==

Version vom 14. Juni 2026, 00:48 Uhr

Sicherheit und Härtung der Postfix Einstellungen

Sinnvoller Einträge für die main.cf.

SMTP daemon absichern - Mailempfang
smtpd_tls_security_level = may
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2 !SSLv3
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, KRB5-DES, CBC3-SHA
SMTP absichern - Mailsender
smtp_tls_protocols = !SSLv2, !SSLv3
smtp_tls_security_level = may
smtp_tls_mandatory_ciphers = high
smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
Einstellungen für relaying
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
Verify wird nicht benötigt
disable_vrfy_command=yes
Interface auf lokal schalten
inet_interfaces=127.0.0.1
Ipv6 abschalten wenn nicht benötigt
inet_protocols = ipv4
Serverbegrüßung einschalten
smtpd_helo_required=yes

Logjam in Postfix verhindern

Um die Logjam Lücke zu schließen, muss der Diffie Hellmann Key Exchange neu konfiguriert werden.

Dazu wird Folgendes generiert.

# openssl dhparam -out /etc/postfix/dhparams.pem 2048

Danach muss der Parameter nur noch in die main.cf eingetragen werden.

smtpd_tls_dh1024_param_file = /etc/postfix/dhparams.pem

Verschlüsselte Verbindung eines Postfix Servers testen

Um eine Verbindung zu überprüfen, bietet sich das Tool posttls-finger an, damit erspart sich ein Admin eventuell das Anpassen von Logeinstellungen oder die Verwendung von Telnet.

# posttls-finger smtp.testserver.de