2016-02-15 21:04:01 +01:00
|
|
|
# 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
|
2016-04-06 22:40:38 +02:00
|
|
|
inet_protocols = ipv4
|
2016-02-15 21:04:01 +01:00
|
|
|
|
|
|
|
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
|
2016-02-15 21:04:01 +01:00
|
|
|
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
|
2016-04-07 00:01:54 +02:00
|
|
|
smtp_tls_security_level = may
|
|
|
|
smtp_tls_loglevel = 1
|
2016-02-15 21:04:01 +01:00
|
|
|
|
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
|
2016-04-06 22:40:38 +02:00
|
|
|
smtpd_tls_security_level = may
|
|
|
|
smtpd_tls_auth_only = yes
|
2016-02-23 21:03:12 +01:00
|
|
|
smtpd_tls_ciphers = medium
|
2016-04-07 00:01:54 +02:00
|
|
|
smtpd_tls_received_header = yes
|
2016-02-23 21:03:12 +01:00
|
|
|
|
2016-02-15 21:04:01 +01:00
|
|
|
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
|
2016-04-07 00:01:54 +02:00
|
|
|
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
|
2016-02-15 21:04:01 +01:00
|
|
|
|
|
|
|
# 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
|
2016-02-15 21:04:01 +01:00
|
|
|
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
|
2016-04-08 07:42:21 +02:00
|
|
|
reject_rbl_client sbl.spamhaus.org
|
|
|
|
reject_rbl_client cbl.abuseat.org
|
2016-02-15 21:04:01 +01:00
|
|
|
check_recipient_access hash:/etc/postfix/recipient_access
|
|
|
|
|
|
|
|
smtpd_data_restrictions = warn_if_reject reject_unauth_pipelining
|
|
|
|
|
2016-04-08 07:42:21 +02:00
|
|
|
smtpd_restriction_classes = greylisting
|
2016-02-15 21:04:01 +01:00
|
|
|
|
2016-04-08 07:42:21 +02:00
|
|
|
greylisting = check_policy_service unix:private/spfpolicy
|
|
|
|
check_policy_service inet:127.0.0.1:10023
|
2016-02-15 21:04:01 +01:00
|
|
|
|
|
|
|
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 }}
|
2016-04-06 21:38:54 +02:00
|
|
|
{%- for domain in mail_domains %}
|
|
|
|
{{ domain }}
|
|
|
|
{%- endfor %}
|
|
|
|
|
2016-02-22 18:07:24 +01:00
|
|
|
virtual_mailbox_maps = ldap:/etc/postfix/ldap-virtual-maps.cf
|
|
|
|
virtual_alias_maps = hash:/etc/postfix/virtual-alias, ldap:/etc/postfix/ldap-aliases.cf
|
2016-02-15 21:04:01 +01:00
|
|
|
|
|
|
|
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
|