chore: Remove legacy ENV SASL_PASSWD (#2946)

As per deprecation notice from v11.3 release notes, and a related prior PR; this ENV is to be removed.

It's no longer considered useful, and none of the tests that configured it were actually using it for relaying anything.
This commit is contained in:
Brennan Kinney 2022-12-23 15:30:40 +13:00 committed by GitHub
parent edaeb89c9b
commit fe21fe78e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 31 deletions

View file

@ -685,11 +685,6 @@ Specify what password attribute to use for password verification.
- **empty** => Nothing is added to the configuration but the documentation says it is `userPassword` by default. - **empty** => Nothing is added to the configuration but the documentation says it is `userPassword` by default.
- Any value => Fills the `ldap_password_attr` option - Any value => Fills the `ldap_password_attr` option
##### SASL_PASSWD
- **empty** => No sasl_passwd will be created
- string => `/etc/postfix/sasl_passwd` will be created with the string as password
##### SASLAUTHD_LDAP_AUTH_METHOD ##### SASLAUTHD_LDAP_AUTH_METHOD
- **empty** => `bind` will be used as a default value - **empty** => `bind` will be used as a default value

View file

@ -474,10 +474,6 @@ SASLAUTHD_LDAP_TLS_CACERT_DIR=
# Any value => Fills the `ldap_password_attr` option # Any value => Fills the `ldap_password_attr` option
SASLAUTHD_LDAP_PASSWORD_ATTR= SASLAUTHD_LDAP_PASSWORD_ATTR=
# empty => No sasl_passwd will be created
# string => `/etc/postfix/sasl_passwd` will be created with the string as password
SASL_PASSWD=
# empty => `bind` will be used as a default value # empty => `bind` will be used as a default value
# `fastbind` => The fastbind method is used # `fastbind` => The fastbind method is used
# `custom` => The custom method uses userPassword attribute to verify the password # `custom` => The custom method uses userPassword attribute to verify the password

View file

@ -47,9 +47,7 @@
# NOTE: Present support has enforced wrapping the relay host with `[]` (prevents DNS MX record lookup), # NOTE: Present support has enforced wrapping the relay host with `[]` (prevents DNS MX record lookup),
# which restricts what is supported by RELAY_HOST, although you usually do want to provide MX host directly. # which restricts what is supported by RELAY_HOST, although you usually do want to provide MX host directly.
# NOTE: Present support expects to always append a port with an implicit default of `25`. # NOTE: Present support expects to always append a port with an implicit default of `25`.
# NOTE: DEFAULT_RELAY_HOST imposes neither restriction, but would only be compatible with SASL_PASSWD then when # NOTE: DEFAULT_RELAY_HOST imposes neither restriction.
# auth is needed. However that seems tied to RELAY_HOST to enable the /etc/postfix/sasl_passwd table lookup,
# which introduces issues if you would want DEFAULT_RELAY_HOST to use credentials..
# #
# TODO: RELAY_PORT should be optional, it will use the transport default port (`postconf smtp_tcp_port`), # TODO: RELAY_PORT should be optional, it will use the transport default port (`postconf smtp_tcp_port`),
# That shouldn't be a breaking change, as long as the mapping is maintained correctly. # That shouldn't be a breaking change, as long as the mapping is maintained correctly.
@ -65,8 +63,7 @@ function _env_relay_host
function _relayhost_sasl function _relayhost_sasl
{ {
if [[ ! -f /tmp/docker-mailserver/postfix-sasl-password.cf ]] \ if [[ ! -f /tmp/docker-mailserver/postfix-sasl-password.cf ]] \
&& [[ -z ${RELAY_USER} || -z ${RELAY_PASSWORD} ]] \ && [[ -z ${RELAY_USER} ]] || [[ -z ${RELAY_PASSWORD} ]]
&& [[ -z ${SASL_PASSWD} ]]
then then
_log 'warn' "Missing relay-host mapped credentials provided via ENV, or from postfix-sasl-password.cf" _log 'warn' "Missing relay-host mapped credentials provided via ENV, or from postfix-sasl-password.cf"
return 1 return 1
@ -79,19 +76,6 @@ function _relayhost_sasl
chown root:root /etc/postfix/sasl_passwd chown root:root /etc/postfix/sasl_passwd
chmod 0600 /etc/postfix/sasl_passwd chmod 0600 /etc/postfix/sasl_passwd
# SASL_PASSWD is a legacy ENV, not likely in use by any users.
#
# Single ENV for specifying `<DEFAULT_RELAY_HOST> <RELAY_USER>:<RELAY_PASSWORD>`,
# Where `<DEFAULT_RELAY_HOST>` must match the equivalent ENV,
# while the other two have no dependency to their equivalent ENV.
# SASL_PASSWD requires `smtp_sasl_password_maps` to be enabled - but that has only
# ever been via this function which relies upon RELAY_HOST. Hence redundant.
# TODO: Deprecate. Remove on next major version?
if [[ -n ${SASL_PASSWD} ]]
then
echo "${SASL_PASSWD}" >> /etc/postfix/sasl_passwd
fi
local DATABASE_SASL_PASSWD='/tmp/docker-mailserver/postfix-sasl-password.cf' local DATABASE_SASL_PASSWD='/tmp/docker-mailserver/postfix-sasl-password.cf'
if [[ -f ${DATABASE_SASL_PASSWD} ]] if [[ -f ${DATABASE_SASL_PASSWD} ]]
then then

View file

@ -7,7 +7,6 @@ setup_file() {
docker run -d --name mail_special_use_folders \ docker run -d --name mail_special_use_folders \
-v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \ -v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \ -v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
-e SASL_PASSWD="external-domain.com username:password" \
-e ENABLE_CLAMAV=0 \ -e ENABLE_CLAMAV=0 \
-e ENABLE_SPAMASSASSIN=0 \ -e ENABLE_SPAMASSASSIN=0 \
-e PERMIT_DOCKER=host \ -e PERMIT_DOCKER=host \

View file

@ -30,7 +30,6 @@ function setup() {
-e SA_SPAM_SUBJECT="SPAM: " \ -e SA_SPAM_SUBJECT="SPAM: " \
-e VIRUSMAILS_DELETE_DELAY=7 \ -e VIRUSMAILS_DELETE_DELAY=7 \
-e ENABLE_SRS=1 \ -e ENABLE_SRS=1 \
-e SASL_PASSWD="external-domain.com username:password" \
-e ENABLE_MANAGESIEVE=1 \ -e ENABLE_MANAGESIEVE=1 \
-e PERMIT_DOCKER=host \ -e PERMIT_DOCKER=host \
--name "${CONTAINER}" \ --name "${CONTAINER}" \

View file

@ -7,7 +7,6 @@ setup_file() {
docker run -d --name mail_with_mdbox_format \ docker run -d --name mail_with_mdbox_format \
-v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \ -v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \ -v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
-e SASL_PASSWD="external-domain.com username:password" \
-e ENABLE_CLAMAV=0 \ -e ENABLE_CLAMAV=0 \
-e ENABLE_SPAMASSASSIN=0 \ -e ENABLE_SPAMASSASSIN=0 \
-e DOVECOT_MAILBOX_FORMAT=mdbox \ -e DOVECOT_MAILBOX_FORMAT=mdbox \

View file

@ -7,7 +7,6 @@ setup_file() {
docker run -d --name mail_with_sdbox_format \ docker run -d --name mail_with_sdbox_format \
-v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \ -v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \ -v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
-e SASL_PASSWD="external-domain.com username:password" \
-e ENABLE_CLAMAV=0 \ -e ENABLE_CLAMAV=0 \
-e ENABLE_SPAMASSASSIN=0 \ -e ENABLE_SPAMASSASSIN=0 \
-e DOVECOT_MAILBOX_FORMAT=sdbox \ -e DOVECOT_MAILBOX_FORMAT=sdbox \