No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

etc_postfix_main.cf.j2 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # See /usr/share/postfix/main.cf.dist for a commented, more complete version
  2. # Modified as per http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/
  3. # Debian specific: Specifying a file name will cause the first
  4. # line of that file to be used as the name. The Debian default
  5. # is /etc/mailname.
  6. #myorigin = /etc/mailname
  7. smtpd_banner = $myhostname ESMTP $mail_name
  8. biff = no
  9. # appending .domain is the MUA's job.
  10. append_dot_mydomain = no
  11. # Uncomment the next line to generate "delayed mail" warnings
  12. #delay_warning_time = 4h
  13. readme_directory = no
  14. # antispam
  15. smtpd_helo_required = yes
  16. smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname
  17. smtpd_sender_restrictions = reject_unknown_address
  18. disable_vrfy_command = yes
  19. strict_rfc821_envelopes = yes
  20. invalid_hostname_reject_code = 554
  21. multi_recipient_bounce_reject_code = 554
  22. non_fqdn_reject_code = 554
  23. relay_domains_reject_code = 554
  24. unknown_address_reject_code = 554
  25. unknown_client_reject_code = 554
  26. unknown_hostname_reject_code = 554
  27. unknown_local_recipient_reject_code = 554
  28. unknown_relay_recipient_reject_code = 554
  29. unknown_virtual_alias_reject_code = 554
  30. unknown_virtual_mailbox_reject_code = 554
  31. unverified_recipient_reject_code = 554
  32. unverified_sender_reject_code = 554
  33. # TLS parameters
  34. smtpd_tls_cert_file=/etc/ssl/certs/wildcard_public_cert.crt
  35. smtpd_tls_key_file=/etc/ssl/private/wildcard_private.key
  36. smtpd_use_tls=yes
  37. #smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  38. #smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  39. smtpd_tls_auth_only = yes
  40. smtp_tls_security_level = may
  41. smtp_tls_loglevel = 2
  42. smtpd_tls_received_header = yes
  43. smtp_tls_note_starttls_offer = yes
  44. smtpd_sasl_type = dovecot
  45. smtpd_sasl_path = private/auth
  46. smtpd_sasl_auth_enable = yes
  47. broken_sasl_auth_clients = yes
  48. smtpd_sasl_security_options = noanonymous
  49. smtpd_recipient_restrictions =
  50. permit_sasl_authenticated,
  51. permit_mynetworks,
  52. reject_unauth_pipelining,
  53. reject_unauth_destination,
  54. reject_invalid_hostname,
  55. reject_non_fqdn_hostname,
  56. reject_non_fqdn_recipient,
  57. reject_unknown_recipient_domain,
  58. reject_rbl_client multihop.dsbl.org,
  59. reject_rbl_client zen.spamhaus.org,
  60. reject_rbl_client cbl.abuseat.org,
  61. reject_rbl_client bl.spamcop.net,
  62. reject_rbl_client dnsbl.sorbs.net,
  63. reject_rbl_client all.spamrats.com=127.0.0.36,
  64. reject_rbl_client all.spamrats.com=127.0.0.38,
  65. reject_rbl_client dnsbl.ahbl.org,
  66. check_policy_service inet:127.0.0.1:10023,
  67. permit
  68. # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
  69. # information on enabling SSL in the smtp client.
  70. myhostname = {{ mail_server_hostname }}
  71. alias_maps = hash:/etc/aliases
  72. alias_database = hash:/etc/aliases
  73. mydestination = localhost
  74. relayhost =
  75. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
  76. #mailbox_command = procmail -a "$EXTENSION"
  77. mailbox_size_limit = 0
  78. recipient_delimiter = +
  79. inet_interfaces = all
  80. # dovecot mysql
  81. virtual_transport = lmtp:unix:private/dovecot-lmtp
  82. virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
  83. virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
  84. virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
  85. local_recipient_maps = $virtual_mailbox_maps
  86. # OpenDKIM
  87. smtpd_milters = inet:127.0.0.1:8891
  88. non_smtpd_milters = $smtpd_milters
  89. milter_default_action = accept
  90. # new settings for dspam: only scan one mail at a time, localhost doesn't get scanned, everything else does
  91. dspam_destination_recipient_limit = 1
  92. smtpd_client_restrictions =
  93. permit_sasl_authenticated
  94. check_client_access pcre:/etc/postfix/dspam_filter_access