From fdcb6ec02ed974922241bf945173819fa2d4074b Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 25 Apr 2021 17:12:47 +0200 Subject: [PATCH] dovecot_convert_to_lmtp.sh,install_update_dovecot.sh: fix error in changing to lmtp service.. --- dovecot_convert_to_lmtp.sh | 16 ++++++++-------- install_update_dovecot.sh | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dovecot_convert_to_lmtp.sh b/dovecot_convert_to_lmtp.sh index db7e729..b312ba3 100755 --- a/dovecot_convert_to_lmtp.sh +++ b/dovecot_convert_to_lmtp.sh @@ -143,9 +143,9 @@ blank_line # - virtual_transport = lmtp:unix:private/dovecot-lmtp var="smtpd_sasl_auth_enable" val="yes" -echononl " ${postfix_main_cf}: adjust '${val}'.." +echononl " ${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok @@ -160,9 +160,9 @@ fi var="smtpd_sasl_type" val="dovecot" -echononl " ${postfix_main_cf}: adjust '${val}'.." +echononl " ${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok @@ -177,9 +177,9 @@ fi var="smtpd_sasl_path" val="private/dovecot-auth" -echononl " ${postfix_main_cf}: adjust '${val}'.." +echononl " ${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok @@ -194,9 +194,9 @@ fi var="virtual_transport" val="lmtp:unix:private/dovecot-lmtp" -echononl " ${postfix_main_cf}: adjust '${val}'.." +echononl " ${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok diff --git a/install_update_dovecot.sh b/install_update_dovecot.sh index 471698f..2773649 100755 --- a/install_update_dovecot.sh +++ b/install_update_dovecot.sh @@ -2810,9 +2810,9 @@ fi # - virtual_transport = lmtp:unix:private/dovecot-lmtp var="smtpd_sasl_auth_enable" val="yes" -echononl "\t${postfix_main_cf}: adjust '${val}'.." +echononl "\t${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok @@ -2827,9 +2827,9 @@ fi var="smtpd_sasl_type" val="dovecot" -echononl "\t${postfix_main_cf}: adjust '${val}'.." +echononl "\t${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok @@ -2844,9 +2844,9 @@ fi var="smtpd_sasl_path" val="private/dovecot-auth" -echononl "\t${postfix_main_cf}: adjust '${val}'.." +echononl "\t${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok @@ -2861,9 +2861,9 @@ fi var="virtual_transport" val="lmtp:unix:private/dovecot-lmtp" -echononl "\t${postfix_main_cf}: adjust '${val}'.." +echononl "\t${postfix_main_cf}: adjust '${var}'.." if ! $(grep -E -q "^\s*${var}\s*=\s*${val}" ${postfix_main_cf} 2> /dev/null) ; then - perl -i -n -p -e "s#^(\s*)(smtpd_sasl_type\ *=.*)#smtpd_sasl_type = dovecot#" \ + perl -i -n -p -e "s#^(\s*)(${var}\ *=.*)#${var} = ${val}#" \ /etc/postfix/main.cf > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok