feat(postfix-pgsql): add Dockerfile with templated config and entrypoint

This commit is contained in:
Damien
2026-06-25 11:12:46 +02:00
parent 1af298f74e
commit 8143fff65f
5 changed files with 166 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# =============================================================================
# Postfix pgsql_table lookup: transport_maps
#
# Returns the internal SMTP relay target that accepted mail gets forwarded
# to once a recipient domain matches relay_domains. The target itself is
# baked into the query from SMTP_RELAY_HOST/SMTP_RELAY_PORT at startup; this
# image has no further knowledge of what consumes the mail downstream.
# Rendered at container startup from environment variables.
# =============================================================================
user = ${POSTGRES_USER}
password = ${POSTGRES_PASSWORD}
hosts = ${POSTGRES_HOST}:${POSTGRES_PORT}
dbname = ${POSTGRES_DB}
query = SELECT 'smtp:[${SMTP_RELAY_HOST}]:${SMTP_RELAY_PORT}' FROM relay_domain WHERE domain='%s'