Fix to allow for non forced "enforce" MTA_STS_MODE (#1970)
This commit is contained in:
parent
b7b67e31b7
commit
16e81e1439
|
@ -94,7 +94,7 @@ PUBLIC_IP=$PUBLIC_IP
|
||||||
PUBLIC_IPV6=$PUBLIC_IPV6
|
PUBLIC_IPV6=$PUBLIC_IPV6
|
||||||
PRIVATE_IP=$PRIVATE_IP
|
PRIVATE_IP=$PRIVATE_IP
|
||||||
PRIVATE_IPV6=$PRIVATE_IPV6
|
PRIVATE_IPV6=$PRIVATE_IPV6
|
||||||
MTA_STS_MODE=${MTA_STS_MODE-}
|
MTA_STS_MODE=${DEFAULT_MTA_STS_MODE:-enforce}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Start service configuration.
|
# Start service configuration.
|
||||||
|
|
10
setup/web.sh
10
setup/web.sh
|
@ -126,13 +126,13 @@ chmod a+r /var/lib/mailinabox/mozilla-autoconfig.xml
|
||||||
# nginx configuration at /.well-known/mta-sts.txt
|
# nginx configuration at /.well-known/mta-sts.txt
|
||||||
# more documentation is available on:
|
# more documentation is available on:
|
||||||
# https://www.uriports.com/blog/mta-sts-explained/
|
# https://www.uriports.com/blog/mta-sts-explained/
|
||||||
# default mode is "enforce". Change to "testing" which means
|
# default mode is "enforce". In /etc/mailinabox.conf change
|
||||||
# "Messages will be delivered as though there was no failure
|
# "MTA_STS_MODE=testing" which means "Messages will be delivered
|
||||||
# but a report will be sent if TLS-RPT is configured" if you
|
# as though there was no failure but a report will be sent if
|
||||||
# are not sure you want this yet. Or "none".
|
# TLS-RPT is configured" if you are not sure you want this yet. Or "none".
|
||||||
PUNY_PRIMARY_HOSTNAME=$(echo "$PRIMARY_HOSTNAME" | idn2)
|
PUNY_PRIMARY_HOSTNAME=$(echo "$PRIMARY_HOSTNAME" | idn2)
|
||||||
cat conf/mta-sts.txt \
|
cat conf/mta-sts.txt \
|
||||||
| sed "s/MODE/${MTA_STS_MODE:-enforce}/" \
|
| sed "s/MODE/${MTA_STS_MODE}/" \
|
||||||
| sed "s/PRIMARY_HOSTNAME/$PUNY_PRIMARY_HOSTNAME/" \
|
| sed "s/PRIMARY_HOSTNAME/$PUNY_PRIMARY_HOSTNAME/" \
|
||||||
> /var/lib/mailinabox/mta-sts.txt
|
> /var/lib/mailinabox/mta-sts.txt
|
||||||
chmod a+r /var/lib/mailinabox/mta-sts.txt
|
chmod a+r /var/lib/mailinabox/mta-sts.txt
|
||||||
|
|
Loading…
Reference in New Issue