From 22bac611fed33f048c975e5ec94e113da1207d83 Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:44:53 +1300 Subject: [PATCH] chore: `postfix.sh` - `FIRST_FIELD` => More descriptive field name --- target/scripts/helpers/postfix.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/scripts/helpers/postfix.sh b/target/scripts/helpers/postfix.sh index 19b80cbd..0bb1c158 100644 --- a/target/scripts/helpers/postfix.sh +++ b/target/scripts/helpers/postfix.sh @@ -45,9 +45,9 @@ function _vhost_collect_postfix_domains() { # Extract domains from mail accounts: if [[ -f ${DATABASE_ACCOUNTS} ]]; then - while IFS=$'|' read -r FIRST_FIELD _; do + while IFS=$'|' read -r MAIL_ACCOUNT _; do # It is expected valid lines have the format local-part@domain-part: - DOMAIN=$(cut -d '@' -f 2 <<< "${FIRST_FIELD}") + DOMAIN=$(cut -d '@' -f 2 <<< "${MAIL_ACCOUNT}") echo "${DOMAIN}" >>"${TMP_VHOST}" done < <(_get_valid_lines_from_file "${DATABASE_ACCOUNTS}") @@ -58,9 +58,9 @@ function _vhost_collect_postfix_domains() { # Extract domains from virtual alias config: # Aliases may have the forms: 'local-part@domain-part', only 'local-part', or '@domain-part' (wildcard catch-all) if [[ -f ${DATABASE_VIRTUAL} ]]; then - while read -r FIRST_FIELD _; do - UNAME=$(cut -d '@' -f 1 <<< "${FIRST_FIELD}") - DOMAIN=$(cut -d '@' -f 2 <<< "${FIRST_FIELD}") + while read -r ALIAS_FIELD _; do + UNAME=$(cut -d '@' -f 1 <<< "${ALIAS_FIELD}") + DOMAIN=$(cut -d '@' -f 2 <<< "${ALIAS_FIELD}") # Only add valid domain-parts found: # The '@' is optional for an alias key (eg: "user1 other@domain.tld"),