Merge postfix configurations and use conditionals
This commit is contained in:
@ -151,6 +151,7 @@ DB_FLAVOR=sqlite
|
|||||||
# Mailman settings
|
# Mailman settings
|
||||||
###################################
|
###################################
|
||||||
# COMPOSE_FILE="compose.yml:compose.mailman.yml"
|
# COMPOSE_FILE="compose.yml:compose.mailman.yml"
|
||||||
|
# MAILMAN_POSTFIX_OVERRIDES=1
|
||||||
# MAILMAN_CORE_VOLUME=lists_example_com_mailman-core
|
# MAILMAN_CORE_VOLUME=lists_example_com_mailman-core
|
||||||
# MAILMAN_CORE_NETWORK=lists_example_com_internal
|
# MAILMAN_CORE_NETWORK=lists_example_com_internal
|
||||||
|
|
||||||
@ -161,3 +162,4 @@ DB_FLAVOR=sqlite
|
|||||||
# there is an open ticket with a further discussion also https://github.com/Mailu/Mailu/issues/1096
|
# there is an open ticket with a further discussion also https://github.com/Mailu/Mailu/issues/1096
|
||||||
###################################
|
###################################
|
||||||
# COMPOSE_FILE="compose.yml:compose.mailfrom.yml"
|
# COMPOSE_FILE="compose.yml:compose.mailfrom.yml"
|
||||||
|
# SENDER_LOGINS_POSTFIX_OVERRIDES=1
|
||||||
|
|||||||
@ -3,15 +3,10 @@ version: "3.6"
|
|||||||
services:
|
services:
|
||||||
smtp:
|
smtp:
|
||||||
configs:
|
configs:
|
||||||
- source: mailfrom_overrides
|
|
||||||
target: /overrides/postfix.cf
|
|
||||||
- source: sender_logins
|
- source: sender_logins
|
||||||
target: /overrides/sender_logins
|
target: /overrides/sender_logins
|
||||||
|
|
||||||
configs:
|
configs:
|
||||||
mailfrom_overrides:
|
|
||||||
name: ${STACK_NAME}_mailfrom_overrides_${POSTFIX_OVERRIDE_VERSION}
|
|
||||||
file: postfix.mailfrom.cf
|
|
||||||
sender_logins:
|
sender_logins:
|
||||||
name: ${STACK_NAME}_sender_logins_${SENDER_LOGIN_VERSIONS}
|
name: ${STACK_NAME}_sender_logins_${SENDER_LOGIN_VERSIONS}
|
||||||
file: sender_logins
|
file: sender_logins
|
||||||
@ -2,6 +2,7 @@
|
|||||||
# https://mailu.io/1.7/faq.html?highlight=override#how-can-i-override-settings
|
# https://mailu.io/1.7/faq.html?highlight=override#how-can-i-override-settings
|
||||||
# https://github.com/Mailu/Mailu/blob/master/core/postfix/conf/main.cf
|
# https://github.com/Mailu/Mailu/blob/master/core/postfix/conf/main.cf
|
||||||
|
|
||||||
|
{{ if eq (env "MAILMAN_POSTFIX_OVERRIDES") "1" }}
|
||||||
# Please note, this config assumes "recipient_delimiter = +" in the main.cf
|
# Please note, this config assumes "recipient_delimiter = +" in the main.cf
|
||||||
# and transport_maps/relay_domains preserve the overriden postfix.cf config values
|
# and transport_maps/relay_domains preserve the overriden postfix.cf config values
|
||||||
# and finally, we use single lines configuration definitions because:
|
# and finally, we use single lines configuration definitions because:
|
||||||
@ -12,3 +13,10 @@ owner_request_special = no
|
|||||||
transport_maps = regexp:/opt/mailman/var/data/postfix_lmtp \${podop}transport
|
transport_maps = regexp:/opt/mailman/var/data/postfix_lmtp \${podop}transport
|
||||||
local_recipient_maps = regexp:/opt/mailman/var/data/postfix_lmtp
|
local_recipient_maps = regexp:/opt/mailman/var/data/postfix_lmtp
|
||||||
relay_domains = regexp:/opt/mailman/var/data/postfix_domains \${podop}transport
|
relay_domains = regexp:/opt/mailman/var/data/postfix_domains \${podop}transport
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if eq (env "SENDER_LOGINS_POSTFIX_OVERRIDES") "1" }}
|
||||||
|
# https://github.com/Mailu/Mailu/issues/1096
|
||||||
|
|
||||||
|
smtpd_sender_login_maps = unionmap:{${podop}senderlogin, pcre:/overrides/sender_logins}
|
||||||
|
{{ end }}
|
||||||
@ -1,3 +0,0 @@
|
|||||||
# https://github.com/Mailu/Mailu/issues/1096
|
|
||||||
|
|
||||||
smtpd_sender_login_maps = unionmap:{${podop}senderlogin, pcre:/overrides/sender_logins}
|
|
||||||
Reference in New Issue
Block a user