Brak opisu

main.cf 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {% import 'globals.jinja' as globals -%}
  2. # See /usr/share/postfix/main.cf.dist for a commented, more complete version
  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 (Ubuntu)
  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. # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
  15. # fresh installs.
  16. compatibility_level = 2
  17. # TLS parameters
  18. smtpd_tls_cert_file=/etc/dovecot/private/fullchain.pem
  19. smtpd_tls_key_file=/etc/dovecot/private/privkey.pem
  20. smtpd_tls_auth_only = yes
  21. smtpd_tls_security_level = may
  22. smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  23. smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  24. # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
  25. # information on enabling SSL in the smtp client.
  26. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
  27. myhostname = {{ globals.public_fqdn }}
  28. alias_maps = hash:/etc/aliases
  29. alias_database = hash:/etc/aliases
  30. myorigin = /etc/mailname
  31. mydestination = $myhostname, {{ grains['id'] }}, localhost.localdomain, localhost
  32. relayhost =
  33. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 {{ globals.all_private_ip_addresses|join(" ") }}{% if 'postfix' in globals.config and 'extra_relay_networks' in globals.config.postfix %} {{ globals.config.postfix.extra_relay_networks }}{% endif %}
  34. mailbox_size_limit = 0
  35. recipient_delimiter = +
  36. inet_interfaces = all
  37. inet_protocols = ipv4
  38. ## Tells Postfix to use Dovecot's LMTP instead of its own LDA to save emails to the local mailboxes.
  39. virtual_transport = lmtp:unix:private/dovecot-lmtp
  40. ## Tells Postfix you're using MySQL to store virtual domains, and gives the paths to the database connections.
  41. virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
  42. virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
  43. virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
  44. smtpd_sasl_type = dovecot
  45. smtpd_sasl_path = private/auth
  46. smtpd_sasl_auth_enable = yes