From 7741803f71a2c47640f9a719846ad66fe4142a93 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 13 Feb 2026 23:46:22 +0100 Subject: [PATCH] install_amavis.sh: fix some error writing file '50-user'. --- install_amavis.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/install_amavis.sh b/install_amavis.sh index d3a3533..01bbd54 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -4431,14 +4431,13 @@ EOF if [[ "$?" -ne 0 ]] ; then installation_failed=true - error "$(cat $tmp_err_msg)" fi if [[ "${DB_TYPE}" = "PostgreSQL" ]] || [[ "${DB_TYPE}" = "MySQL" ]]; then if [[ "$DB_TYPE" = "PostgreSQL" ]]; then - _db="psql" + _db="pgsql" else _db="mysql" fi @@ -4450,7 +4449,6 @@ EOF if [[ "$?" -ne 0 ]] ; then installation_failed=true - error "$(cat $tmp_err_msg)" fi @@ -4464,39 +4462,38 @@ EOF if [[ "$?" -ne 0 ]] ; then installation_failed=true - error "$(cat $tmp_err_msg)" fi fi + if [[ -f "/etc/postfix/${_db}_relay-domain-maps.cf" ]]; then cat >> /etc/amavis/conf.d/50-user < /dev/null 2>&1 ; then + + if grep -iq -E "^\s*btree:/etc/postfix/relay_domains" "/etc/postfix/main.cf" > /dev/null 2>&1 ; then cat >> /etc/amavis/conf.d/50-user <> /etc/amavis/conf.d/50-user <<'EOF' @local_domains_maps = ( ["."] );