Add mail from override configuration

This commit is contained in:
decentral1se 2021-05-23 23:12:42 +02:00
parent 1f7e2f52e6
commit 4a8f312a2b
No known key found for this signature in database
GPG Key ID: 92DAD76BD9567B8A
4 changed files with 29 additions and 0 deletions

View File

@ -153,3 +153,11 @@ DB_FLAVOR=sqlite
# COMPOSE_FILE="compose.yml:compose.mailman.yml"
# MAILMAN_CORE_VOLUME=lists_example_com_mailman-core
# MAILMAN_CORE_NETWORK=lists_example_com_internal
###################################
# SASL account -> MAIL FROM mappings for more liberal MAIL FROM relaying
# return-path: https://www.rubydoc.info/gems/actionmailer-rack-upgrade-2/2.3.15/ActionMailer/Base
# logins and MAIL FROM ownership: http://www.postfix.com/postconf.5.html#smtpd_relay_restrictions
# there is an open ticket with a further discussion also https://github.com/Mailu/Mailu/issues/1096
###################################
# COMPOSE_FILE="compose.yml:compose.mailfrom.yml"

View File

@ -1,2 +1,3 @@
export CERTDUMPER_POST_VERSION=v1
export POSTFIX_OVERRIDE_VERSION=v10
export SENDER_LOGIN_VERSIONS=v1

17
compose.mailfrom.yml Normal file
View File

@ -0,0 +1,17 @@
version: "3.6"
services:
smtp:
configs:
- source: mailfrom_overrides
target: /overrides/postfix.cf
- source: sender_logins
target: /overrides/sender_logins
configs:
mailfrom_overrides:
name: ${STACK_NAME}_mailfrom_overrides_${POSTFIX_OVERRIDE_VERSION}
file: postfix.mailfrom.cf
sender_logins:
name: ${STACK_NAME}_sender_logins_${SENDER_LOGIN_VERSIONS}
file: sender_logins

3
postfix.mailfrom.cf Normal file
View File

@ -0,0 +1,3 @@
# https://github.com/Mailu/Mailu/issues/1096
smtpd_sender_login_maps = unionmap:{${podop}senderlogin, pcre:/overrides/sender_logins}