summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2020-10-10 22:35:11 +0200
committerJonas Smedegaard <dr@jones.dk>2020-10-10 22:35:11 +0200
commita949a96e5e7c6f2c84cb34f8c5d3469bf05d8c6c (patch)
treea1de7785439a43334e9064b8938e64514929463f
parentee37f6d9ab6eaf4108b9f0a31850262878186ce3 (diff)
tidy: avoid deprecated backtick subshell
-rwxr-xr-xpostfix/postfix.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh
index 75ca1a6..5255959 100755
--- a/postfix/postfix.sh
+++ b/postfix/postfix.sh
@@ -161,14 +161,14 @@ getlinesfromfile() {
for subparam in $@; do
case "$subparam" in
*=)
- oldparam="`echo $subparam | awk -F= '{print $1}'`"
+ oldparam="$(echo $subparam | awk -F= '{print $1}')"
replacements="$replacements;s/,*[^,]*$oldparam[^,]*,*/,/"
continue
;;
*=*=*)
- oldparam="`echo $subparam | awk -F= '{print $1}'`"
- newparam="`echo $subparam | awk -F= '{print $2}'`"
- newparamfile="`echo $subparam | awk -F= '{print $3}'`"
+ oldparam="$(echo $subparam | awk -F= '{print $1}')"
+ newparam="$(echo $subparam | awk -F= '{print $2}')"
+ newparamfile="$(echo $subparam | awk -F= '{print $3}')"
;;
*)
oldparam=$subparam
@@ -176,7 +176,7 @@ getlinesfromfile() {
newparamfile=$subparam
;;
esac
- newparamvalues="`getlinesfromfile $newparamfile | sed -e 's/.*=[ ]*//' -e 's/,/ /g'`"
+ newparamvalues="$(getlinesfromfile $newparamfile | sed -e 's/.*=[ ]*//' -e 's/,/ /g')"
newstring=
for newparamvalue in $newparamvalues; do
newstring="${newstring}$newparam $newparamvalue,"
@@ -205,13 +205,13 @@ _postconf -e 'smtpd_banner = $myhostname NO UCE ESMTP $mail_name (Debian/GNU)'
# _postconf -e 'smtpd_helo_required = yes'
#fi
_postconf -e 'smtpd_helo_required = no'
-_postconf -e "`getlinesfromfile permit_mx_backup_networks`"
+_postconf -e "$(getlinesfromfile permit_mx_backup_networks)"
_postconf -e "maps_rbl_domains ="
-_postconf -e "`getlinesfromfile smtpd_client_restrictions reject_rhsbl_client`"
-_postconf -e "`getlinesfromfile smtpd_helo_restrictions`"
-_postconf -e "`getlinesfromfile smtpd_sender_restrictions reject_rhsbl_sender ${dkimproxy:-sender_access_regex=}`"
-_postconf -e "`getlinesfromfile smtpd_recipient_restrictions reject_maps_rbl=reject_rbl_client=maps_rbl_domains`"
-_postconf -e "`getlinesfromfile smtpd_data_restrictions`"
+_postconf -e "$(getlinesfromfile smtpd_client_restrictions reject_rhsbl_client)"
+_postconf -e "$(getlinesfromfile smtpd_helo_restrictions)"
+_postconf -e "$(getlinesfromfile smtpd_sender_restrictions reject_rhsbl_sender ${dkimproxy:-sender_access_regex=})"
+_postconf -e "$(getlinesfromfile smtpd_recipient_restrictions reject_maps_rbl=reject_rbl_client=maps_rbl_domains)"
+_postconf -e "$(getlinesfromfile smtpd_data_restrictions)"
# FIXME: clear only specific line (not whole file) when dkimproxy unused
if [ -f "$tempdir/sender_access_regex" ]; then