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 = ( ["."] );