From d40ae81d09e03ffc23fef7a1c476e127dad8f6f6 Mon Sep 17 00:00:00 2001 From: Kai Ren Date: Wed, 25 Jan 2017 15:10:40 +0200 Subject: [PATCH] Hardening TLS ciphers (#492) * Hardening Dovecot TLS ciphers * Mitigate Logjam vulnerability on Dovecot * Mitigate Logjam vulnerability on Postfix * Add Nmap tests of PCI compliance for Postfix and Dovecot * Increase sleep duration on Makefile steps to avoid races --- Dockerfile | 1 + Makefile | 4 ++-- target/dovecot/10-ssl.conf | 6 +++--- target/postfix/main.cf | 7 ++++--- test/tests.bats | 40 ++++++++++++++++++++++++++++++++++++-- 5 files changed, 48 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 91483e6f..5743d79e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -103,6 +103,7 @@ RUN sed -i 's/START_DAEMON=no/START_DAEMON=yes/g' /etc/default/fetchmail # Configures Postfix COPY target/postfix/main.cf target/postfix/master.cf /etc/postfix/ RUN echo "" > /etc/aliases +RUN openssl dhparam -out /etc/postfix/dhparams.pem 2048 # Configuring Logs RUN sed -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf && \ diff --git a/Makefile b/Makefile index ee5342f2..a80509f5 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ run: -e ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1 \ -e POSTFIX_DAGENT=lmtp:127.0.0.1:24 \ -h mail.my-domain.com -t $(NAME) - sleep 15 + sleep 30 fixtures: cp config/postfix-accounts.cf config/postfix-accounts.cf.bak @@ -142,7 +142,7 @@ fixtures: # postfix virtual transport lmtp docker exec mail_lmtp_ip /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-user.txt" # Wait for mails to be analyzed - sleep 10 + sleep 20 tests: # Start tests diff --git a/target/dovecot/10-ssl.conf b/target/dovecot/10-ssl.conf index 77f60c5c..232fa58b 100644 --- a/target/dovecot/10-ssl.conf +++ b/target/dovecot/10-ssl.conf @@ -21,7 +21,7 @@ ssl_key =