main.cf 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. biff = no
  2. append_dot_mydomain = no
  3. smtpd_tls_cert_file = /etc/ssl/mail/cert.pem
  4. smtpd_tls_key_file = /etc/ssl/mail/key.pem
  5. smtpd_use_tls=yes
  6. smtpd_tls_received_header = yes
  7. smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  8. smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  9. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
  10. alias_maps = hash:/etc/aliases
  11. alias_database = hash:/etc/aliases
  12. relayhost =
  13. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 [fe80::]/10 [fc00::]/7
  14. mailbox_size_limit = 0
  15. recipient_delimiter = +
  16. inet_interfaces = all
  17. inet_protocols = all
  18. bounce_queue_lifetime = 1d
  19. broken_sasl_auth_clients = yes
  20. disable_vrfy_command = yes
  21. maximal_backoff_time = 1800s
  22. maximal_queue_lifetime = 1d
  23. message_size_limit = 104857600
  24. milter_default_action = accept
  25. milter_protocol = 6
  26. minimal_backoff_time = 300s
  27. plaintext_reject_code = 550
  28. postscreen_access_list = permit_mynetworks, cidr:/opt/postfix/conf/postscreen_access.cidr, tcp:127.0.0.1:10027
  29. postscreen_bare_newline_enable = no
  30. postscreen_blacklist_action = drop
  31. postscreen_cache_cleanup_interval = 24h
  32. postscreen_cache_map = proxy:btree:$data_directory/postscreen_cache
  33. postscreen_dnsbl_action = enforce
  34. postscreen_dnsbl_sites = b.barracudacentral.org=127.0.0.2*7 dnsbl.inps.de=127.0.0.2*7 bl.mailspike.net=127.0.0.2*5 bl.mailspike.net=127.0.0.[10;11;12]*4 dnsbl.sorbs.net=127.0.0.10*8 dnsbl.sorbs.net=127.0.0.5*6 dnsbl.sorbs.net=127.0.0.7*3 dnsbl.sorbs.net=127.0.0.8*2 dnsbl.sorbs.net=127.0.0.6*2 dnsbl.sorbs.net=127.0.0.9*2 zen.spamhaus.org=127.0.0.[10;11]*8 zen.spamhaus.org=127.0.0.[4..7]*6 zen.spamhaus.org=127.0.0.3*4 zen.spamhaus.org=127.0.0.2*3 hostkarma.junkemailfilter.com=127.0.0.2*3 hostkarma.junkemailfilter.com=127.0.0.4*1 hostkarma.junkemailfilter.com=127.0.1.2*1 wl.mailspike.net=127.0.0.[18;19;20]*-2 hostkarma.junkemailfilter.com=127.0.0.1*-2
  35. postscreen_dnsbl_threshold = 8
  36. postscreen_dnsbl_ttl = 5m
  37. postscreen_greet_action = enforce
  38. postscreen_greet_banner = $smtpd_banner
  39. postscreen_greet_ttl = 2d
  40. postscreen_greet_wait = 3s
  41. postscreen_non_smtp_command_enable = no
  42. postscreen_pipelining_enable = no
  43. proxy_read_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_sender_acl.cf,
  44. proxy:mysql:/opt/postfix/conf/sql/mysql_tls_policy_override_maps.cf,
  45. proxy:mysql:/opt/postfix/conf/sql/mysql_sender_dependent_default_transport_maps.cf,
  46. proxy:mysql:/opt/postfix/conf/sql/mysql_transport_maps.cf,
  47. proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_sender_dependent.cf,
  48. proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_transport_maps.cf,
  49. proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf,
  50. proxy:mysql:/opt/postfix/conf/sql/mysql_sender_bcc_maps.cf,
  51. proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_bcc_maps.cf,
  52. proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_canonical_maps.cf,
  53. $local_recipient_maps,
  54. $mydestination,
  55. $virtual_alias_maps,
  56. $virtual_alias_domains,
  57. $virtual_mailbox_maps,
  58. $virtual_mailbox_domains,
  59. $relay_recipient_maps,
  60. $relay_domains,
  61. $canonical_maps,
  62. $sender_canonical_maps,
  63. $recipient_canonical_maps,
  64. $relocated_maps,
  65. $transport_maps,
  66. $mynetworks,
  67. $smtpd_sender_login_maps
  68. queue_run_delay = 300s
  69. relay_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf
  70. relay_recipient_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_relay_recipient_maps.cf
  71. sender_dependent_default_transport_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sender_dependent_default_transport_maps.cf
  72. smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
  73. smtp_tls_cert_file = /etc/ssl/mail/cert.pem
  74. smtp_tls_key_file = /etc/ssl/mail/key.pem
  75. smtp_tls_loglevel = 1
  76. smtp_dns_support_level = dnssec
  77. smtp_tls_security_level = dane
  78. smtpd_data_restrictions = reject_unauth_pipelining, permit
  79. smtpd_delay_reject = yes
  80. smtpd_error_sleep_time = 10s
  81. smtpd_hard_error_limit = ${stress?1}${stress:5}
  82. smtpd_helo_required = yes
  83. smtpd_proxy_timeout = 600s
  84. smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_recipient_access proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf, reject_invalid_helo_hostname, reject_unknown_reverse_client_hostname, reject_unauth_destination
  85. smtpd_sasl_auth_enable = yes
  86. smtpd_sasl_authenticated_header = yes
  87. smtpd_sasl_path = inet:dovecot:10001
  88. smtpd_sasl_type = dovecot
  89. smtpd_sender_login_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_sender_acl.cf
  90. smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch, permit_mynetworks, permit_sasl_authenticated, reject_unlisted_sender, reject_unknown_sender_domain
  91. smtpd_soft_error_limit = 3
  92. smtpd_tls_auth_only = yes
  93. smtpd_tls_dh1024_param_file = /etc/ssl/mail/dhparams.pem
  94. smtpd_tls_eecdh_grade = auto
  95. smtpd_tls_exclude_ciphers = ECDHE-RSA-RC4-SHA, RC4, aNULL, DES-CBC3-SHA, ECDHE-RSA-DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA
  96. smtpd_tls_loglevel = 1
  97. smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
  98. smtp_tls_protocols = !SSLv2, !SSLv3
  99. lmtp_tls_mandatory_protocols = !SSLv2, !SSLv3
  100. lmtp_tls_protocols = !SSLv2, !SSLv2, !SSLv3
  101. smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
  102. smtpd_tls_protocols = !SSLv2, !SSLv3
  103. smtpd_tls_security_level = may
  104. tls_preempt_cipherlist = yes
  105. tls_ssl_options = NO_COMPRESSION
  106. smtpd_tls_mandatory_ciphers = high
  107. virtual_alias_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_maps.cf,
  108. proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_spamalias_maps.cf,
  109. proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_domain_maps.cf,
  110. proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_domain_catchall_maps.cf
  111. virtual_gid_maps = static:5000
  112. virtual_mailbox_base = /var/vmail/
  113. virtual_mailbox_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_domains_maps.cf
  114. recipient_bcc_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_bcc_maps.cf
  115. sender_bcc_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sender_bcc_maps.cf
  116. recipient_canonical_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_canonical_maps.cf
  117. recipient_canonical_classes = envelope_recipient
  118. virtual_mailbox_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf
  119. virtual_minimum_uid = 104
  120. virtual_transport = lmtp:inet:dovecot:24
  121. virtual_uid_maps = static:5000
  122. smtpd_milters = inet:rspamd:9900
  123. non_smtpd_milters = inet:rspamd:9900
  124. milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
  125. mydestination = localhost.localdomain, localhost
  126. #content_filter=zeyple
  127. # Prefere IPv4, useful for v4-only envs
  128. smtp_address_preference = ipv4
  129. smtp_sender_dependent_authentication = yes
  130. smtp_sasl_auth_enable = yes
  131. smtp_sasl_password_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_sender_dependent.cf
  132. smtp_sasl_security_options =
  133. smtp_sasl_mechanism_filter = plain, login
  134. smtp_tls_policy_maps=proxy:mysql:/opt/postfix/conf/sql/mysql_tls_policy_override_maps.cf
  135. smtp_header_checks = pcre:/opt/postfix/conf/anonymize_headers.pcre
  136. mail_name = Postcow
  137. transport_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_transport_maps.cf
  138. smtp_sasl_auth_soft_bounce = no