-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cf.tmpl
39 lines (30 loc) · 1.18 KB
/
main.cf.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Basic Postfix Configuration
compatibility_level = 3.6
# Set the hostname and domain
myhostname = $POSTFIX_MYHOSTNAME
mydomain = $POSTFIX_MYDOMAIN
# No local delivery
mydestination = $mydomain
# Define trusted networks
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 $POSTFIX_MYNETWORKS
# Allow all clients
# Restrict to mynetworks and Atlassian's smtps from
# https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/
smtpd_client_restrictions = permit_mynetworks,
check_client_access cidr:/etc/postfix/clients.cidr,
reject
# Allow relay from mynetworks only
smtpd_relay_restrictions = permit_mynetworks,
check_client_access cidr:/etc/postfix/clients.cidr,
defer_unauth_destination
maillog_file=/dev/stdout
alias_maps = ldap:/etc/postfix/ldap-aliases.cf
#relayhost = [$SMTP_SERVER]:$SMTP_PORT
#smtp_use_tls = yes
#smtp_sasl_auth_enable = yes
#smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
#smtp_sasl_security_options = noanonymous
# Enable SMTP over TLS encryption
smtp_tls_security_level = may
smtp_tls_loglevel = 1
smtp_tls_session_cache_database = lmdb:${data_directory}/smtp_scache