ansible-infra/roles/common/templates/postfix/main.cf.j2

40 lines
1.1 KiB
Django/Jinja

{{ ansible_managed | comment }}
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
biff = no
recipient_delimiter = +
readme_directory = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# rewrite sender address
sender_canonical_maps = hash:{{ postfix_senders_map_path }}
alias_maps = hash:{{ smtp_aliases_path }}
alias_database = hash:{{ smtp_aliases_path }}
myhostname = {{ ansible_hostname }}
myorigin = $myhostname
mydestination = $myhostname, localhost.localdomain, localhost
mynetworks_style = host
inet_interfaces = all
inet_protocols = all
relayhost = [{{ smtp_accounts[smtp_default_account].host }}]
relay_domains =
# enable SASL authentication
smtp_sasl_auth_enable = yes
# disallow methods that allow anonymous authentication.
smtp_sasl_security_options = noanonymous
# where to find sasl_passwd
smtp_sasl_password_maps = hash:{{ postfix_sasl_secrets_path }}
# Enable STARTTLS encryption
smtp_use_tls = yes
# where to find CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt