1
0
forked from infra/ansible
infra/roles/mail/templates/postfix/main.cf.j2

89 lines
2.9 KiB
Plaintext
Raw Normal View History

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
inet_interfaces = all
message_size_limit = 50000000
recipient_delimiter = +
2016-02-15 21:30:24 +01:00
mydomain = {{ mail_domain }}
myhostname = {{ ansible_fqdn }}
myorigin = {{ ansible_fqdn }}
mydestination = localhost.{{ mail_domain }}, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
relayhost =
# TLS parameters
smtp_use_tls = yes
smtp_tls_loglevel = 2
2016-04-01 08:10:00 +02:00
smtpd_tls_cert_file=/etc/postfix/ssl/{{ mail_server }}.crt
smtpd_tls_key_file=/etc/postfix/ssl/{{ mail_server }}.key
2016-04-06 18:00:23 +02:00
smtpd_tls_CAfile=/etc/acme/lets-encrypt-x3-cross-signed.pem
smtpd_use_tls=yes
smtpd_tls_ciphers = medium
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
2016-02-25 08:01:03 +01:00
smtpd_helo_restrictions = permit_mynetworks
warn_if_reject reject_non_fqdn_hostname
check_helo_access hash:/etc/postfix/helo_access
#check_client_access cidr:/etc/postfix/client_access
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
check_recipient_access hash:/etc/postfix/recipient_access
smtpd_data_restrictions = warn_if_reject reject_unauth_pipelining
smtpd_restriction_classes = rbl, rblgrey
rbl = reject_rbl_client sbl.spamhaus.org
reject_rbl_client cbl.abuseat.org
2016-02-15 21:30:24 +01:00
rblgrey = reject_rbl_client sbl.spamhaus.org
reject_rbl_client cbl.abuseat.org
check_policy_service unix:private/spfpolicy
check_policy_service inet:127.0.0.1:10023
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
2016-02-15 21:30:24 +01:00
virtual_mailbox_domains = {{ mail_domain }}
virtual_mailbox_maps = ldap:/etc/postfix/ldap-virtual-maps.cf
virtual_alias_maps = hash:/etc/postfix/virtual-alias, ldap:/etc/postfix/ldap-aliases.cf
#virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, hash:/etc/postfix/virtual-alias, ldap:/etc/postfix/ldap-aliases.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
2016-02-29 20:50:14 +01:00
# mailman
relay_domains = {{ mailman_domain }}
relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1