diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-31 16:43:06 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-31 16:43:06 +0300 |
commit | 1e62769ce08631cb2fe904d3e6e7c0b4f75205d6 (patch) | |
tree | f68fa9452d60e3ea128a28b5ff50de7957170071 /include/tests_mail_messaging | |
parent | d05777caf2c416cf5e4d4a8e95b2ab8c4cdc59ff (diff) |
[MAIL-8818] Style and refactoring
Diffstat (limited to 'include/tests_mail_messaging')
-rw-r--r-- | include/tests_mail_messaging | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/tests_mail_messaging b/include/tests_mail_messaging index 999f5251..1363be9c 100644 --- a/include/tests_mail_messaging +++ b/include/tests_mail_messaging @@ -98,25 +98,25 @@ Register --test-no MAIL-8818 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check Postfix configuration: banner" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Checking Postfix banner" - 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 + 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') + #TODO Check if OS name shows up in banner #FIND4=`${POSTCONFBINARY} 2> /dev/null | grep '^smtpd_banner' | egrep "${OS}|${LINUX_VERSION}` SHOWWARNING=0 if [ ! "${FIND1}" = "" ]; then SHOWWARNING=1 - else + else if [ ! "${FIND2}" = "" -a ! "${FIND3}" = "" ]; then SHOWWARNING=1 - else - Display --indent 4 --text "- Checking Postfix banner" --result "${STATUS_OK}" --color GREEN + else + Display --indent 4 --text "- Postfix banner" --result "${STATUS_OK}" --color GREEN fi fi if [ ${SHOWWARNING} -eq 1 ]; then - Display --indent 4 --text "- Checking Postfix banner" --result "${STATUS_WARNING}" --color RED + Display --indent 4 --text "- Postfix banner" --result "${STATUS_WARNING}" --color RED LogText "Result: found mail_name in SMTP banner, and/or mail_name contains 'Postfix'." - ReportWarning ${TEST_NO} "L" "Found mail_name in SMTP banner, and/or mail_name contains 'Postfix'" + ReportWarning ${TEST_NO} "Found mail_name in SMTP banner, and/or mail_name contains 'Postfix'" ReportSuggestion ${TEST_NO} "You are advised to hide the mail_name (option: smtpd_banner) from your postfix configuration. Use postconf -e or change your main.cf file (${POSTFIX_CONFIGFILE})" fi fi |