dovecot_convert_to_lmtp.sh,install_update_dovecot.sh: fix error in changing to lmtp service..
This commit is contained in:
parent
973c78ebc6
commit
fdcb6ec02e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user