2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# General
|
|
|
|
###############
|
2016-01-18 22:43:52 +02:00
|
|
|
|
2016-03-02 22:25:56 +02:00
|
|
|
# Main domain and hostname
|
|
|
|
mydomain = {{ DOMAIN }}
|
2017-09-24 17:49:39 +02:00
|
|
|
myhostname = {{ HOSTNAMES.split(",")[0] }}
|
2016-03-02 22:25:56 +02:00
|
|
|
myorigin = $mydomain
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2017-07-02 16:39:00 +02:00
|
|
|
# Queue location
|
|
|
|
queue_directory = /queue
|
|
|
|
|
2016-09-25 01:46:10 +02:00
|
|
|
# Message size limit
|
|
|
|
message_size_limit = {{ MESSAGE_SIZE_LIMIT }}
|
|
|
|
|
2016-03-02 22:25:56 +02:00
|
|
|
# Relayed networks
|
|
|
|
mynetworks = 127.0.0.1/32 [::1]/128 {{ RELAYNETS }}
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
# Empty alias list to override the configuration variable and disable NIS
|
2016-10-19 15:09:26 +02:00
|
|
|
alias_maps =
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2018-07-26 21:57:21 +02:00
|
|
|
# Podop configuration
|
|
|
|
podop = socketmap:unix:/tmp/podop.socket:
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2016-02-20 21:11:59 +02:00
|
|
|
# Only accept virtual emails
|
|
|
|
mydestination =
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2016-08-18 16:08:36 +02:00
|
|
|
# Relayhost if any is configured
|
|
|
|
relayhost = {{ RELAYHOST }}
|
2016-01-18 22:43:52 +02:00
|
|
|
|
2017-09-03 16:18:08 +02:00
|
|
|
# Recipient delimiter for extended addresses
|
2017-09-10 14:09:16 +02:00
|
|
|
recipient_delimiter = {{ RECIPIENT_DELIMITER }}
|
2017-09-03 16:18:08 +02:00
|
|
|
|
2017-10-22 15:45:32 +02:00
|
|
|
# Only the front server is allowed to perform xclient
|
|
|
|
smtpd_authorized_xclient_hosts={{ FRONT_ADDRESS }}
|
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# TLS
|
|
|
|
###############
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2017-01-23 22:29:02 +02:00
|
|
|
# General TLS configuration
|
|
|
|
tls_high_cipherlist = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA
|
|
|
|
tls_preempt_cipherlist = yes
|
2017-09-24 14:34:46 +02:00
|
|
|
tls_ssl_options = NO_COMPRESSION
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2016-08-19 13:43:01 +02:00
|
|
|
# Outgoing TLS is more flexible because 1. not all receiving servers will
|
|
|
|
# support TLS, 2. not all will have and up-to-date TLS stack.
|
|
|
|
smtp_tls_security_level = may
|
2016-08-19 13:49:58 +02:00
|
|
|
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
|
|
|
|
smtp_tls_protocols =!SSLv2,!SSLv3
|
2016-08-19 13:43:01 +02:00
|
|
|
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
|
2016-01-18 22:43:52 +02:00
|
|
|
|
2016-02-17 23:56:40 +02:00
|
|
|
###############
|
|
|
|
# Virtual
|
|
|
|
###############
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2016-11-01 13:57:22 +02:00
|
|
|
# The alias map actually returns both aliases and local mailboxes, which is
|
|
|
|
# required for reject_unlisted_sender to work properly
|
2018-09-26 00:15:24 +02:00
|
|
|
virtual_alias_domains =
|
|
|
|
virtual_alias_maps = ${podop}alias
|
|
|
|
virtual_mailbox_domains = ${podop}domain
|
|
|
|
virtual_mailbox_maps = ${podop}mailbox
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2017-09-11 08:12:04 +02:00
|
|
|
# Mails are transported if required, then forwarded to Dovecot for delivery
|
2018-09-26 00:15:24 +02:00
|
|
|
# relay_domains = ${podop}transport
|
|
|
|
# transport_maps = ${podop}transport
|
2018-01-31 23:24:54 +02:00
|
|
|
virtual_transport = lmtp:inet:{{ HOST_LMTP }}
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2016-08-19 13:43:01 +02:00
|
|
|
# In order to prevent Postfix from running DNS query, enforce the use of the
|
|
|
|
# native DNS stack, that will check /etc/hosts properly.
|
2016-02-24 08:44:49 +02:00
|
|
|
lmtp_host_lookup = native
|
2016-05-29 15:54:34 +02:00
|
|
|
|
2016-11-01 12:05:47 +02:00
|
|
|
###############
|
|
|
|
# Restrictions
|
|
|
|
###############
|
|
|
|
|
|
|
|
# Delay all rejects until all information can be logged
|
|
|
|
smtpd_delay_reject = yes
|
|
|
|
|
|
|
|
# Allowed senders are: the user or one of the alias destinations
|
|
|
|
smtpd_sender_login_maps = $virtual_alias_maps
|
|
|
|
|
2017-10-22 15:00:16 +02:00
|
|
|
# Restrictions for incoming SMTP, other restrictions are applied in master.cf
|
2016-11-01 12:05:47 +02:00
|
|
|
smtpd_helo_required = yes
|
|
|
|
|
2018-09-26 00:15:24 +02:00
|
|
|
smtpd_client_restrictions =
|
2017-10-22 15:00:16 +02:00
|
|
|
permit_mynetworks,
|
2018-09-26 00:15:24 +02:00
|
|
|
reject_unauth_destination,
|
2017-10-22 15:00:16 +02:00
|
|
|
reject_non_fqdn_sender,
|
|
|
|
reject_unknown_sender_domain,
|
|
|
|
reject_unknown_recipient_domain,
|
2017-12-04 23:02:33 +02:00
|
|
|
reject_unverified_recipient,
|
2017-10-22 15:00:16 +02:00
|
|
|
permit
|
2016-11-01 12:05:47 +02:00
|
|
|
|
2018-09-26 00:15:24 +02:00
|
|
|
smtpd_relay_restrictions =
|
|
|
|
permit_mynetworks,
|
|
|
|
permit_sasl_authenticated,
|
|
|
|
reject
|
|
|
|
|
2017-12-04 23:04:22 +02:00
|
|
|
unverified_recipient_reject_reason = Address lookup failure
|
|
|
|
|
2016-05-29 15:54:34 +02:00
|
|
|
###############
|
|
|
|
# Milter
|
|
|
|
###############
|
2016-08-19 13:49:58 +02:00
|
|
|
|
2018-06-02 10:38:08 +02:00
|
|
|
smtpd_milters = inet:{{ HOST_ANTISPAM }}
|
2016-05-29 15:54:34 +02:00
|
|
|
milter_protocol = 6
|
|
|
|
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
|
2016-08-01 10:29:15 +02:00
|
|
|
milter_default_action = tempfail
|
|
|
|
|
|
|
|
###############
|
|
|
|
# Extra Settings
|
|
|
|
###############
|