From cc7270a22bf84025e70eb3607c1beda4b492885f Mon Sep 17 00:00:00 2001 From: bilak Date: Tue, 26 Jan 2016 19:03:12 +0100 Subject: [PATCH] - improved searching strings inside file (seraching for whole words) --- start-mailserver.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start-mailserver.sh b/start-mailserver.sh index d35f712d..e5f25489 100644 --- a/start-mailserver.sh +++ b/start-mailserver.sh @@ -99,10 +99,10 @@ chmod -R 0700 /etc/opendkim/keys/ # DMARC # if ther is no AuthservID create it -if [ `cat /etc/opendmarc.conf | grep AuthservID | wc -l` -eq 0 ]; then +if [ `cat /etc/opendmarc.conf | grep -w AuthservID | wc -l` -eq 0 ]; then echo "AuthservID $hostname" >> /etc/opendmarc.conf fi -if [ `cat /etc/opendmarc.conf | grep TrustedAuthservIDs | wc -l` -eq 0 ]; then +if [ `cat /etc/opendmarc.conf | grep -w TrustedAuthservIDs | wc -l` -eq 0 ]; then echo "TrustedAuthservIDs $hostname" >> /etc/opendmarc.conf fi if [ ! -f "/etc/opendmarc/ignore.hosts" ]; then