smtpd_tls_dh1024_param_file = ${config_directory}/dhparams.pem
in /etc/postfix/main.cfTodo:
/var/spool/postfix/etc/ssl/certs/ca-certificates.crt
? Wird das bei Debian genutzt?Wie in ssl beschrieben Server-Zertifikat bauen
cd /etc/ssl cp /root/server-ssl/servercert.pem certs/ cp /root/server-ssl/serverkey.pem private/ cp /home/ca/ca.*/cacert.pem certs/
chmod 640 private/serverkey.pem chgrp ssl private/serverkey.pem
gpasswd -a postfix ssl
postconf -e "smtpd_tls_cert_file = /etc/ssl/certs/servercert.pem" postconf -e "smtpd_tls_key_file = /etc/ssl/private/serverkey.pem" postconf -e "smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem" postconf -e "smtpd_use_tls = yes"
netcat localhost smtp EHLO asdf
..
250-STARTTLS
openssl s_client -starttls smtp -CApath /etc/ssl/certs -connect localhost:25
swaks -f me.example.com -t you.example.com -tls -s 127.0.0.1
DNS Resource Record erzeugen:
postfix tls output-server-tlsa
oder
postfix tls output-server-tlsa /var/lib/dehydrated/certs/example.com/privkey.pem
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.
smtpd_tls_dh1024_param_file = ${config_directory}/dhparams.pem
in /etc/postfix/main.cf# generated 2022-09-23, Mozilla Guideline v5.6, Postfix 3.5.13, OpenSSL 1.1.1n, intermediate configuration # https://ssl-config.mozilla.org/#server=postfix&version=3.5.13&config=intermediate&openssl=1.1.1n&guideline=5.6 smtpd_tls_security_level = may smtpd_tls_auth_only = yes smtpd_tls_cert_file = /path/to/signed_cert_plus_intermediates smtpd_tls_key_file = /path/to/private_key smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 smtpd_tls_mandatory_ciphers = medium # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam # not actually 1024 bits, this applies to all DHE >= 1024 bits smtpd_tls_dh1024_param_file = /path/to/dhparam tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 tls_preempt_cipherlist = no