diff --git a/plugins/postfix/postfix_stats b/plugins/postfix/postfix_stats index 7f9eb007..b5509f4e 100755 --- a/plugins/postfix/postfix_stats +++ b/plugins/postfix/postfix_stats @@ -66,7 +66,7 @@ GPLv2 #set -xv MAIL_LOG="${logfiles:-/var/log/mail.log /var/log/mail.log.1}" -GREP_HOSTNAME=$(echo $0 | sed -r 's/^.+postfix_stats_?//') +GREP_HOSTNAME=$(basename "$0" | sed -r 's/postfix_stats_?//') # shellcheck disable=SC2154 PFLOGSUMM="${pflogsum}"