diff options
author | mboelen <michael@cisofy.com> | 2015-12-21 19:07:31 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2015-12-21 19:07:31 +0300 |
commit | 6815c9a9151f7816c9b16c8b136030fd50fad684 (patch) | |
tree | aafbf36428ca027d81ea074049e260a8b1e03c6a /include/tests_mail_messaging | |
parent | 8fcca37187f9dfc6dff63f407590d6c87f4ee7e9 (diff) |
Redirect errors from postconf output
Diffstat (limited to 'include/tests_mail_messaging')
-rw-r--r-- | include/tests_mail_messaging | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/tests_mail_messaging b/include/tests_mail_messaging index b936dbb8..3d33129e 100644 --- a/include/tests_mail_messaging +++ b/include/tests_mail_messaging @@ -80,7 +80,7 @@ Register --test-no MAIL-8816 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check Postfix configuration" if [ ${SKIPTEST} -eq 0 ]; then Display --indent 2 --text "- Checking Postfix configuration" --result FOUND --color GREEN - POSTFIX_CONFIGDIR=`${POSTCONFBINARY} | grep '^config_directory' | awk '{ print $3 }'` + POSTFIX_CONFIGDIR=`${POSTCONFBINARY} 2> /dev/null | grep '^config_directory' | awk '{ print $3 }'` POSTFIX_CONFIGFILE="${POSTFIX_CONFIGDIR}/main.cf" logtext "Postfix configuration directory: ${POSTFIX_CONFIGDIR}" logtext "Postfix configuration file: ${POSTFIX_CONFIGFILE}" @@ -94,11 +94,11 @@ Register --test-no MAIL-8818 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check Postfix configuration: banner" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: Checking Postfix banner" - FIND1=`${POSTCONFBINARY} | grep '^smtpd_banner' | grep 'postfix'` - FIND2=`${POSTCONFBINARY} | grep '^smtpd_banner' | grep '$mail_name'` - FIND3=`${POSTCONFBINARY} | grep '^mail_name' | grep -i 'postfix'` + FIND1=`${POSTCONFBINARY} 2> /dev/null | grep '^smtpd_banner' | grep 'postfix'` + FIND2=`${POSTCONFBINARY} 2> /dev/null | grep '^smtpd_banner' | grep '$mail_name'` + FIND3=`${POSTCONFBINARY} 2> /dev/null | grep '^mail_name' | grep -i 'postfix'` #YYY Check if OS name shows up in banner - #FIND4=`${POSTCONFBINARY} | grep '^smtpd_banner' | egrep "${OS}|${LINUX_VERSION}` + #FIND4=`${POSTCONFBINARY} 2> /dev/null | grep '^smtpd_banner' | egrep "${OS}|${LINUX_VERSION}` SHOWWARNING=0 if [ ! "${FIND1}" = "" ]; then SHOWWARNING=1 |