From e5aa1aa3232ca7a872b45b31bfe14f1682efd676 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Tue, 14 Feb 2023 17:31:30 +0100 Subject: [PATCH] IS_LOCALHOST_IN_POSTFIX_MYDESTINATION: set grep quiet --- linux/CHANGELOG | 2 ++ linux/evocheck.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/linux/CHANGELOG b/linux/CHANGELOG index a057f33..7131170 100644 --- a/linux/CHANGELOG +++ b/linux/CHANGELOG @@ -12,6 +12,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp ### Removed ### Fixed +* IS_LOCALHOST_IN_POSTFIX_MYDESTINATION: set grep quiet. + ### Security diff --git a/linux/evocheck.sh b/linux/evocheck.sh index 32cf009..da749c4 100755 --- a/linux/evocheck.sh +++ b/linux/evocheck.sh @@ -134,7 +134,7 @@ check_dpkgwarning() { # Check if localhost, localhost.localdomain and localhost.$mydomain are set in Postfix mydestination option. check_localhost_in_postfix_mydestination() { # shellcheck disable=SC2016 - if ! grep mydestination /etc/postfix/main.cf | grep --extended-regexp 'localhost[^\\.]' | grep 'localhost.localdomain' | grep 'localhost.$mydomain'; then + if ! grep mydestination /etc/postfix/main.cf | grep --quiet --extended-regexp '(localhost[^\\.]|localhost.localdomain|localhost.$mydomain)'; then failed "IS_LOCALHOST_IN_POSTFIX_MYDESTINATION" "'localhost' and/or 'localhost.localdomain' and/or 'localhost.\$mydomain' are missing in Postfix mydestination option. Consider adding then." fi }