Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

176 Zeilen
4.6KB

  1. {{ansible_managed|comment}}
  2. ### common settings
  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. smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
  7. biff = no
  8. # appending .domain is the MUA's job.
  9. append_dot_mydomain = no
  10. readme_directory = no
  11. # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
  12. # fresh installs.
  13. compatibility_level = 2
  14. ### general settings
  15. myhostname = {{mailname}}
  16. alias_maps = hash:/etc/aliases
  17. alias_database = hash:/etc/aliases
  18. mydestination = $myhostname, {{inventory_hostname}}, localhost.localdomain, localhost
  19. relayhost =
  20. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
  21. mailbox_size_limit = 0
  22. recipient_delimiter = +
  23. inet_interfaces = all
  24. inet_protocols = all
  25. ### TLS parameters
  26. smtpd_tls_cert_file={{postfix_certificate_fullchain_file}}
  27. smtpd_tls_key_file={{postfix_certificate_private_key_file}}
  28. smtpd_use_tls=yes
  29. smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  30. smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  31. smtp_tls_security_level = may
  32. ### transport configuration
  33. relay_domains = hash:/etc/postfix/transport_maps
  34. transport_maps =
  35. hash:/etc/postfix/transport_maps,
  36. {% if postfix_with_sympa %}
  37. hash:/etc/postfix/transport.sympa,
  38. hash:/var/lib/sympa/transport,
  39. hash:/etc/postfix/virtual.sympa,
  40. {% endif %}
  41. ### rules and restricitons
  42. message_size_limit = 52428800
  43. # some rules from http://www.postfix.org/SMTPD_ACCESS_README.html
  44. # Allow connections from trusted networks only.
  45. #smtpd_client_restrictions = permit_mynetworks, reject
  46. # Require that a remote SMTP client introduces itself
  47. #smtpd_helo_required = yes
  48. # Don't talk to mail systems that don't know their own hostname.
  49. #smtpd_helo_restrictions = reject_unknown_helo_hostname
  50. # Don't accept mail from domains that don't exist.
  51. #smtpd_sender_restrictions = reject_unknown_sender_domain
  52. # Spam control: exclude local clients and authenticated clients
  53. # from DNSBL and SPF lookups.
  54. smtpd_recipient_restrictions =
  55. permit_mynetworks,
  56. permit_sasl_authenticated,
  57. {% if postfix_check_spf %}
  58. check_policy_service unix:private/policyd-spf,
  59. {% endif %}
  60. {% if postfix_check_spamhaus %}
  61. reject_rbl_client zen.spamhaus.org,
  62. reject_rhsbl_reverse_client dbl.spamhaus.org,
  63. reject_rhsbl_helo dbl.spamhaus.org,
  64. reject_rhsbl_sender dbl.spamhaus.org
  65. {% endif %}
  66. # Relay control: local clients and authenticated clients
  67. # may specify any destination domain.
  68. smtpd_relay_restrictions =
  69. permit_mynetworks,
  70. reject_unauth_destination
  71. # Block clients that speak too early.
  72. smtpd_data_restrictions = reject_unauth_pipelining
  73. {% if postfix_check_spf %}
  74. policy-spf_time_limit = 3600
  75. {% endif %}
  76. {#
  77. # Enforce mail volume quota via policy service callouts.
  78. smtpd_end_of_data_restrictions = check_policy_service unix:private/policy
  79. #}
  80. ### DKIM and DMARC
  81. non_smtpd_milters =
  82. {% if postfix_with_opendkim %}
  83. unix:/run/opendkim/opendkim.sock,
  84. {% endif %}
  85. {% if postfix_with_opendmarc %}
  86. unix:/run/opendmarc/opendmarc.sock
  87. {% endif %}
  88. smtpd_milters =
  89. {% if postfix_with_opendkim %}
  90. unix:/run/opendkim/opendkim.sock,
  91. {% endif %}
  92. {% if postfix_with_opendmarc %}
  93. unix:/run/opendmarc/opendmarc.sock
  94. {% endif %}
  95. ### Virtual Domain Hosting
  96. virtual_alias_domains =
  97. hash:/etc/postfix/virtual_alias_domains,
  98. virtual_alias_maps =
  99. hash:/etc/postfix/virtual_alias_maps,
  100. {% if postfix_with_postfixadmin %}
  101. proxy:mysql:/etc/postfix/postfixadmin-sql/mysql_virtual_alias_maps.cf,
  102. proxy:mysql:/etc/postfix/postfixadmin-sql/mysql_virtual_alias_domain_maps.cf,
  103. proxy:mysql:/etc/postfix/postfixadmin-sql/mysql_virtual_alias_domain_catchall_maps.cf,
  104. {% endif %}
  105. {% if postfix_with_sympa %}
  106. hash:/etc/postfix/virtual.sympa,
  107. {% endif %}
  108. virtual_mailbox_domains =
  109. hash:/etc/postfix/virtual_mailbox_domains,
  110. {% if postfix_with_postfixadmin %}
  111. proxy:mysql:/etc/postfix/postfixadmin-sql/mysql_virtual_domains_maps.cf,
  112. {% endif %}
  113. {% if postfix_with_sympa %}
  114. hash:/etc/postfix/domains.sympa,
  115. {% endif %}
  116. virtual_mailbox_maps =
  117. hash:/etc/postfix/virtual_mailbox_maps,
  118. {% if postfix_with_postfixadmin %}
  119. proxy:mysql:/etc/postfix/postfixadmin-sql/mysql_virtual_mailbox_maps.cf,
  120. proxy:mysql:/etc/postfix/postfixadmin-sql/mysql_virtual_alias_domain_mailbox_maps.cf,
  121. {% endif %}
  122. {% if postfix_with_sympa %}
  123. hash:/etc/postfix/transport.sympa,
  124. hash:/var/lib/sympa/transport,
  125. hash:/etc/postfix/virtual.sympa,
  126. {% endif %}
  127. virtual_transport =
  128. {% if postfix_with_sympa %}
  129. hash:/etc/postfix/transport.sympa,
  130. hash:/var/lib/sympa/transport,
  131. {% endif %}
  132. {% if postfix_with_dovecot_lmtp %}
  133. lmtp:unix:private/dovecot-lmtp,
  134. {% endif %}