Postfix/Dovecot/ADS Simple Sicherheitsprobleme: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 5: Zeile 5:
 
*Offenes Relay?
 
*Offenes Relay?
 
=SMTP Anbindung verschlüsselt=
 
=SMTP Anbindung verschlüsselt=
=Anpassen der Datei /etc/postfix/main.cf=
+
==Anpassen der Datei /etc/postfix/main.cf==
 
Füge die folgenden Einstellungen hinzu, um das Zertifikat zu nutzen und SMTPS zu aktivieren:
 
Füge die folgenden Einstellungen hinzu, um das Zertifikat zu nutzen und SMTPS zu aktivieren:
 
<pre>
 
<pre>
Zeile 14: Zeile 14:
 
smtpd_tls_security_level = encrypt
 
smtpd_tls_security_level = encrypt
 
</pre>
 
</pre>
=Entferne die Auskommentierung des smtps-Eintrags in /etc/postfix/main.cf=  
+
==Entferne die Auskommentierung des smtps-Eintrags in /etc/postfix/main.cf==  
 
<pre>
 
<pre>
 
smtps inet n - n - - smtpd
 
smtps inet n - n - - smtpd
Zeile 20: Zeile 20:
 
   -o smtpd_sasl_auth_enable=yes
 
   -o smtpd_sasl_auth_enable=yes
 
   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
 
   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
 +
</pre>
 +
==Tests==
 +
;Ist der Port offen
 +
*ss -lntp | grep 465
 +
LISTEN 0      100          0.0.0.0:465      0.0.0.0:*    users:(("master",pid=8980,fd=111))
 +
;Zieht das Zertifikat?
 +
*openssl s_client -port 465 -host mail.lab34.linuggs.de
 +
<pre>
 +
CONNECTED(00000003)
 +
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
 +
verify return:1
 +
depth=1 C = US, O = Let's Encrypt, CN = R11
 +
verify return:1
 +
depth=0 CN = *.lab34.linuggs.de
 +
verify return:1
 
</pre>
 
</pre>

Version vom 6. Oktober 2024, 11:37 Uhr

Sicherheistbedenken

  • SMTP Anbindung unverschlüsselt
  • IMAP Anbindung unverschlüsselt
  • LDAP Anbindung unverschlüsselt
  • Offenes Relay?

SMTP Anbindung verschlüsselt

Anpassen der Datei /etc/postfix/main.cf

Füge die folgenden Einstellungen hinzu, um das Zertifikat zu nutzen und SMTPS zu aktivieren:

smtpd_tls_cert_file = /etc/ssl/certs/star.lab34.linuggs.de.crt
smtpd_tls_key_file = /etc/ssl/private/star.lab34.linuggs.de.key
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_tls_security_level = encrypt

Entferne die Auskommentierung des smtps-Eintrags in /etc/postfix/main.cf

smtps inet n - n - - smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

Tests

Ist der Port offen
  • ss -lntp | grep 465
LISTEN 0      100          0.0.0.0:465       0.0.0.0:*    users:(("master",pid=8980,fd=111))
Zieht das Zertifikat?
  • openssl s_client -port 465 -host mail.lab34.linuggs.de
CONNECTED(00000003)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R11
verify return:1
depth=0 CN = *.lab34.linuggs.de
verify return:1