diff --git a/build-scripts/postfix-install.sh b/build-scripts/postfix-install.sh index 034cb77..2182031 100644 --- a/build-scripts/postfix-install.sh +++ b/build-scripts/postfix-install.sh @@ -7,7 +7,7 @@ fi do_alpine() { apk update - apk add --upgrade cyrus-sasl cyrus-sasl-static cyrus-sasl-digestmd5 cyrus-sasl-crammd5 cyrus-sasl-login cyrus-sasl-ntlm + apk add --upgrade cyrus-sasl cyrus-sasl-static cyrus-sasl-digestmd5 cyrus-sasl-crammd5 cyrus-sasl-login cyrus-sasl-ntlm libsasl apk add postfix apk add opendkim apk add --upgrade ca-certificates tzdata supervisor rsyslog musl musl-utils bash opendkim-utils libcurl jsoncpp lmdb logrotate netcat-openbsd @@ -21,7 +21,7 @@ do_ubuntu() { export DEBIAN_FRONTEND=noninteractive echo "Europe/Berlin" > /etc/timezone apt-get update -y -q - apt-get install -y libsasl2-modules + apt-get install -y libsasl2-modules sasl2-bin apt-get install -y postfix apt-get install -y opendkim apt-get install -y ca-certificates tzdata supervisor rsyslog bash opendkim-tools curl libcurl4 libjsoncpp25 sasl2-bin postfix-lmdb logrotate cron net-tools ${RELEASE_SPECIFIC_PACKAGES} diff --git a/integration-tests/external-tools-test/tests/test.sh b/integration-tests/external-tools-test/tests/test.sh index 3703a7f..391136f 100755 --- a/integration-tests/external-tools-test/tests/test.sh +++ b/integration-tests/external-tools-test/tests/test.sh @@ -10,4 +10,9 @@ fi if ! hash nc; then echo "netcat not found!" >2 exit 1 +fi + +if ! hash pluginviewer && ! hash saslpluginviewer; then + echo "pluginviewer not found!" >2 + exit 1 fi \ No newline at end of file diff --git a/scripts/common-run.sh b/scripts/common-run.sh index 3c8255e..f1a658c 100755 --- a/scripts/common-run.sh +++ b/scripts/common-run.sh @@ -325,6 +325,7 @@ EOF postfix_setup_xoauth2_post_setup() { local other_plugins + local plugin_viewer="pluginviewer" if [ -n "$XOAUTH2_CLIENT_ID" ] || [ -n "$XOAUTH2_SECRET" ]; then do_postconf -e 'smtp_sasl_security_options=' do_postconf -e 'smtp_sasl_mechanism_filter=xoauth2' @@ -338,7 +339,12 @@ postfix_setup_xoauth2_post_setup() { # # The fix is therefore simple: If we're not using OAuth2, we remove the plugin from the list and # keep all the plugins installed. - other_plugins="$(pluginviewer -c | grep Plugin | cut -d\ -f2 | cut -c2- | rev | cut -c2- | rev | grep -v EXTERNAL | grep -v sasl-xoauth2 | tr '\n' ',' | rev | cut -c2- | rev)" + + if hash saslpluginviewer > /dev/null 2>&1; then + # Ubuntu/Debian have renamed pluginviewer to saslpluginviewer so this fails with those distros. + plugin_viewer="saslpluginviewer" + fi + other_plugins="$(${plugin_viewer} -c | grep Plugin | cut -d\ -f2 | cut -c2- | rev | cut -c2- | rev | grep -v EXTERNAL | grep -v sasl-xoauth2 | tr '\n' ',' | rev | cut -c2- | rev)" do_postconf -e "smtp_sasl_mechanism_filter=${other_plugins}" fi }