main.cf 1.2 KB

1234567891011121314151617181920212223242526272829
  1. # SERVER
  2. inet_interfaces = all
  3. # $myhostname is as prefix is a RFC requirement
  4. smtpd_banner = $myhostname ESMTP $mail_name quid agis?
  5. smtpd_sender_restrictions = reject_non_fqdn_sender
  6. # RCPT TO matches $relay_domains => !reject_unauth_destination
  7. smtpd_relay_restrictions = reject_non_fqdn_recipient, reject_unauth_destination
  8. # include TLS protocol & cipher in 'Received' header
  9. smtpd_tls_received_header = yes
  10. # + sasl username
  11. smtpd_sasl_authenticated_header = yes
  12. # CLIENT
  13. smtp_tls_security_level = secure
  14. smtp_tls_secure_cert_match = nexthop
  15. # exceptions where secure nexthop policy is too strict
  16. smtp_tls_policy_maps = hash:/etc/postfix/smtp-tls-policy-map
  17. # trusted CA for exceptions specified in policy map (lvl verify & secure)
  18. smtp_tls_CAfile = /etc/postfix/smtp-tls-trusted-ca.pem
  19. # docs recommend against whitelist
  20. smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
  21. smtp_tls_session_cache_database = btree:${data_directory}/smtp-tls-session-cache
  22. # DANE TLSA records are validated with DNSSEC
  23. smtp_dns_support_level = dnssec
  24. # DANE validation requires DNS lookups
  25. smtp_host_lookup = dns
  26. # http://www.postfix.org/COMPATIBILITY_README.html
  27. compatibility_level = 2