Skip to content

Commit b67ece3

Browse files
authored
Update hardening for Postfix (#957)
* Update hardening for Postfix * Fix typo in extra.cf description * Update Postfix TLS configuration to remove old protocols Removed deprecated TLS protocols from configuration since already disabled by default since 2024-06. * Update Postfix TLS configuration for security Removed deprecated TLS protocols from configuration since already disabled by default since 2024-06.
1 parent ffef4ba commit b67ece3

2 files changed

Lines changed: 118 additions & 2 deletions

File tree

‎docs/manual-guides/Postfix/u_e-postfix-harden_ciphers.de.md‎

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,62 @@ smtpd_tls_mandatory_ciphers = high
1515

1616
Eine solche Konfiguration wird die aktuellen (2024-10-21) Konfigurationsprüfungen bei Diensten wie Internet.nl bestehen.
1717

18-
Falls Sie auch die Cipher für Dovecot anpassen wollen finden Sie [hier](../Dovecot/u_e-dovecot-harden_ciphers.de.md) eine entsprechende Anleitung.
18+
Falls Sie auch die Cipher für Dovecot anpassen wollen finden Sie [hier](../Dovecot/u_e-dovecot-harden_ciphers.de.md) eine entsprechende Anleitung.
19+
20+
!!! warning "Wichtiges Update Q2 2026"
21+
Seit v1.11.0 vom 2026-04-21 von Internet.nl können Sie mit diesem Verfahren keine 100 % mehr erreichen, da diese Version die Fassung 2025-05 der NCSC-TLS-Richtlinien enthält. Bitte beachten Sie die unten beschriebene zusätzliche Konfiguration. Ohne dieses Update werden Sie für _unzureichend_ sichere Hash-Funktionen beim Schlüsselaustausch (SHA1) abgestraft.
22+
23+
Erstellen Sie eine Datei `data/conf/postfix/openssl.cnf` mit folgendem Inhalt:
24+
25+
```
26+
postfix = postfix_settings
27+
28+
[postfix_settings]
29+
ssl_conf = postfix_ssl_settings
30+
31+
[postfix_ssl_settings]
32+
system_default = baseline_postfix_settings
33+
34+
[baseline_postfix_settings]
35+
SignatureAlgorithms = ECDSA+SHA256:ECDSA+SHA384:ECDSA+SHA512:RSA-PSS+SHA256:RSA-PSS+SHA384:RSA-PSS+SHA512:RSA+SHA512:RSA+SHA256:RSA+SHA384
36+
```
37+
38+
Fügen Sie Ihrer aktuellen `data/conf/postfix/extra.cf` Folgendes hinzu:
39+
40+
```
41+
tls_config_file = /opt/postfix/conf/openssl.cnf
42+
tls_config_name = postfix
43+
```
44+
45+
Die vollständige `extra.cf` kann nun also wie folgt aussehen:
46+
47+
```
48+
tls_config_file = /opt/postfix/conf/openssl.cnf
49+
tls_config_name = postfix
50+
51+
tls_high_cipherlist = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256
52+
tls_preempt_cipherlist = yes
53+
54+
smtp_tls_ciphers = high
55+
smtp_tls_mandatory_ciphers = high
56+
57+
smtpd_tls_ciphers = high
58+
smtpd_tls_mandatory_ciphers = high
59+
```
60+
61+
für eine ordnungsgemäß gehärtete Konfiguration. Achten Sie darauf, keine bereits vorhandenen Einstellungen zu überschreiben, die möglicherweise noch benötigt werden.
62+
63+
Starten Sie `postfix-mailcow` neu, um Ihre Änderungen zu übernehmen:
64+
65+
=== "docker compose (Plugin)"
66+
67+
``` bash
68+
docker compose restart postfix-mailcow
69+
```
70+
71+
=== "docker-compose (Standalone)"
72+
73+
``` bash
74+
docker-compose restart postfix-mailcow
75+
```
76+

‎docs/manual-guides/Postfix/u_e-postfix-harden_ciphers.en.md‎

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,62 @@ smtpd_tls_mandatory_ciphers = high
1515

1616
Such a configuration will pass current (2024-10-21) configuration checks against services like Internet.nl.
1717

18-
If you want to adjust the ciphers for Dovecot as well you can find the corresponding tutorial [here](../Dovecot/u_e-dovecot-harden_ciphers.en.md).
18+
If you want to adjust the ciphers for Dovecot as well you can find the corresponding tutorial [here](../Dovecot/u_e-dovecot-harden_ciphers.en.md).
19+
20+
!!! warning "Important update Q2 2026"
21+
Since v1.11.0 from 2026-04-21 of Internet.nl, you will not be able to score 100% anymore with this procedure since this version includes the 2025-05 version of the NCSC TLS guidelines. Please see below the extra configuration needed. Without this updated, you will be sanctioned for _insufficiently_ secure hash functions for key exchange (SHA1)
22+
23+
Create a file `data/conf/postfix/openssl.cnf` with the following content:
24+
25+
```
26+
postfix = postfix_settings
27+
28+
[postfix_settings]
29+
ssl_conf = postfix_ssl_settings
30+
31+
[postfix_ssl_settings]
32+
system_default = baseline_postfix_settings
33+
34+
[baseline_postfix_settings]
35+
SignatureAlgorithms = ECDSA+SHA256:ECDSA+SHA384:ECDSA+SHA512:RSA-PSS+SHA256:RSA-PSS+SHA384:RSA-PSS+SHA512:RSA+SHA512:RSA+SHA256:RSA+SHA384
36+
```
37+
38+
Add to your current `data/conf/postfix/extra.cf` the following:
39+
40+
```
41+
tls_config_file = /opt/postfix/conf/openssl.cnf
42+
tls_config_name = postfix
43+
```
44+
45+
So the complete `extra.cf` now may read:
46+
47+
```
48+
tls_config_file = /opt/postfix/conf/openssl.cnf
49+
tls_config_name = postfix
50+
51+
tls_high_cipherlist = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256
52+
tls_preempt_cipherlist = yes
53+
54+
smtp_tls_ciphers = high
55+
smtp_tls_mandatory_ciphers = high
56+
57+
smtpd_tls_ciphers = high
58+
smtpd_tls_mandatory_ciphers = high
59+
```
60+
61+
for a properly hardened configuration. Beware not to override any existing settings you might had there if they are still needed.
62+
63+
Restart `postfix-mailcow` to apply your changes:
64+
65+
=== "docker compose (Plugin)"
66+
67+
``` bash
68+
docker compose restart postfix-mailcow
69+
```
70+
71+
=== "docker-compose (Standalone)"
72+
73+
``` bash
74+
docker-compose restart postfix-mailcow
75+
```
76+

0 commit comments

Comments
 (0)