Today I set up my first server with Dovecot and Postfix.
These are excerpts from the configuration files:
Dovecot:
disable_plaintext_auth = yes
ssl = required
ssl_prefer_server_ciphers = yes
ssl_cipher_list = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
ssl_protocols = !SSLv2 !SSLv3
ssl_cert = /etc/dovecot/private/4096-rsa-public.crt
ssl_key = /etc/dovecot/private/4096-rsa-private.key
login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k"
protocols = imap sieve
Postfix:
tls_ssl_options = NO_COMPRESSION
tls_high_cipherlist = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
tls_preempt_cipherlist = yes
; Outgoing connections
smtp_use_tls = yes
smtp_tls_security_level = may
smtp_tls_protocols = !SSLv2, !SSLv3
; smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
; smtp_tls_mandatory_ciphers = high
smtp_tls_cert_file = /etc/postfix/private/4096-rsa-public.crt
smtp_tls_key_file = /etc/postfix/private/4096-rsa-private.key
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_loglevel = 1
; Incoming connections
smtpd_use_tls = yes
smtpd_tls_security_level = may
smtpd_tls_protocols = !SSLv2, !SSLv3
; smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
; smtpd_tls_mandatory_ciphers = high
smtpd_tls_dh512_param_file = /etc/postfix/dh_512.pem
smtpd_tls_dh1024_param_file = /etc/postfix/dh_2048.pem
smtpd_tls_eecdh_grade = strong
smtpd_tls_cert_file = /etc/postfix/private/4096-rsa-public.crt
smtpd_tls_key_file = /etc/postfix/private/4096-rsa-private.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_received_header = yes
smtpd_tls_loglevel = 1
Can you spot any missing settings mandatory for security ?
IMAP connections should be as secure as possible, SMTP connections should also be as secure as possible but I don't want to reject mails from senders who don't support TLS.