feat(postfix-pgsql): add Dockerfile with templated config and entrypoint
This commit is contained in:
39
images/postfix-pgsql/templates/main.cf.template
Normal file
39
images/postfix-pgsql/templates/main.cf.template
Normal file
@@ -0,0 +1,39 @@
|
||||
# =============================================================================
|
||||
# Postfix main.cf template
|
||||
#
|
||||
# Rendered at container startup by docker-entrypoint.sh, with values
|
||||
# substituted from environment variables. See README.md for the full list
|
||||
# of supported variables.
|
||||
# =============================================================================
|
||||
|
||||
myhostname = ${MYHOSTNAME}
|
||||
mydomain = ${MAIL_DOMAIN}
|
||||
myorigin = $mydomain
|
||||
mydestination =
|
||||
inet_interfaces = all
|
||||
inet_protocols = ipv4
|
||||
|
||||
# Dynamic relay/transport decisions backed by PostgreSQL lookup maps.
|
||||
relay_domains = pgsql:/etc/postfix/pgsql-relay-domains.cf
|
||||
transport_maps = pgsql:/etc/postfix/pgsql-transport-maps.cf
|
||||
|
||||
# This instance only relays mail for the domains returned by relay_domains;
|
||||
# it does not accept mail for arbitrary destinations.
|
||||
smtpd_relay_restrictions = permit_mynetworks, reject_unauth_destination
|
||||
mynetworks = 127.0.0.0/8, [::1]/128
|
||||
|
||||
# TLS
|
||||
smtpd_tls_cert_file = ${SMTPD_TLS_CERT_FILE}
|
||||
smtpd_tls_key_file = ${SMTPD_TLS_KEY_FILE}
|
||||
smtpd_use_tls = yes
|
||||
smtpd_tls_security_level = may
|
||||
smtp_tls_security_level = may
|
||||
|
||||
# Log to stdout/stderr so `docker logs` captures Postfix activity directly,
|
||||
# without needing a syslog daemon inside the container.
|
||||
maillog_file = /dev/stdout
|
||||
|
||||
biff = no
|
||||
append_dot_mydomain = no
|
||||
readme_directory = no
|
||||
compatibility_level = 3.6
|
||||
Reference in New Issue
Block a user