diff options
author | mboelen <michael@cisofy.com> | 2014-09-15 14:01:09 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-15 14:01:09 +0400 |
commit | c9fde8c2d11744cc0875bc3e5dd0abf096211755 (patch) | |
tree | 0997d08919db7ec4e2aa9065c3e9aaf1671c4d6f /include/tests_mail_messaging | |
parent | 35d32fb5e40b86632677fd2256aebeddf926394a (diff) |
Code cleanup and small enhancements
Diffstat (limited to 'include/tests_mail_messaging')
-rw-r--r-- | include/tests_mail_messaging | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/include/tests_mail_messaging b/include/tests_mail_messaging index 9dc588a6..c2d22f5e 100644 --- a/include/tests_mail_messaging +++ b/include/tests_mail_messaging @@ -40,12 +40,12 @@ IsRunning exim if [ ${RUNNING} -eq 1 ]; then logtext "Result: found running Exim process" - Display --indent 2 --text "- Checking Exim status..." --result RUNNING --color GREEN + Display --indent 2 --text "- Checking Exim status" --result RUNNING --color GREEN EXIM_RUNNING=1 SMTP_DAEMON="exim" else logtext "Result: no running Exim processes found" - Display --indent 2 --text "- Checking Exim status..." --result "NOT FOUND" --color WHITE + Display --indent 2 --text "- Checking Exim status" --result "NOT FOUND" --color WHITE fi fi # @@ -57,15 +57,15 @@ #Register --test-no MAIL-8804 --weight L --network NO --description "Check Exim configuration" #if [ ${SKIPTEST} -eq 0 ]; then # if [ ! "${EXIMBINARY}" = "" ]; then - # logtext "Test: Searching Exim configuration file..." + # logtext "Test: Searching Exim configuration file" # FIND=`${EXIMBINARY} -d | grep "configuration file is" | sed 's/configuration file is//'` # if [ ! "${FIND}" = "" ]; then - # Display --indent 2 --text "- Checking Exim configuration..." --result FOUND --color GREEN + # Display --indent 2 --text "- Checking Exim configuration" --result FOUND --color GREEN # Display --indent 4 --text "Result: configuration file is ${FIND}" # logtext "Result: found Exim" # logtext "Result: configuration file is ${FIND}" # else - # Display --indent 2 --text "- Checking Exim configuration..." --result WARNING --color RED + # Display --indent 2 --text "- Checking Exim configuration" --result WARNING --color RED # logtext "Couldn't find the Exim configuration file, however Exim seems to be installed." # fi # else @@ -86,12 +86,12 @@ #FIND3=`${PSBINARY} ax | grep "pickup" | grep "postfix" | grep -v "grep"` if [ ! "${FIND1}" = "" ]; then logtext "Result: found running Postfix process" - Display --indent 2 --text "- Checking Postfix status..." --result RUNNING --color GREEN + Display --indent 2 --text "- Checking Postfix status" --result RUNNING --color GREEN POSTFIX_RUNNING=1 SMTP_DAEMON="postfix" else logtext "Result: no running Postfix processes found" - Display --indent 2 --text "- Checking Postfix status..." --result "NOT FOUND" --color WHITE + Display --indent 2 --text "- Checking Postfix status" --result "NOT FOUND" --color WHITE fi fi # @@ -102,11 +102,11 @@ if [ ${POSTFIX_RUNNING} -eq 1 -a ! "${POSTFIXBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi 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 + Display --indent 2 --text "- Checking Postfix configuration" --result FOUND --color GREEN POSTFIX_CONFIGDIR=`${POSTCONFBINARY} | grep '^config_directory' | awk '{ print $3 }'` POSTFIX_CONFIGFILE="${POSTFIX_CONFIGDIR}/main.cf" logtext "Postfix configuration directory: ${POSTFIX_CONFIGDIR}" - logtext "Postfix configuration file: ${POSTFIX_CONFIGFILE}" + logtext "Postfix configuration file: ${POSTFIX_CONFIGFILE}" fi # ################################################################################# @@ -129,11 +129,11 @@ if [ ! "${FIND2}" = "" -a ! "${FIND3}" = "" ]; then SHOWWARNING=1 else - Display --indent 4 --text "- Checking Postfix banner..." --result OK --color GREEN + Display --indent 4 --text "- Checking Postfix banner" --result OK --color GREEN fi fi if [ ${SHOWWARNING} -eq 1 ]; then - Display --indent 4 --text "- Checking Postfix banner..." --result WARNING --color RED + Display --indent 4 --text "- Checking Postfix banner" --result 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'" ReportSuggestion ${TEST_NO} "You are adviced to hide the mail_name (option: smtpd_banner) from your postfix configuration. Use postconf -e or change your main.cf file (${POSTFIX_CONFIGFILE})" @@ -150,13 +150,13 @@ IsRunning dovecot if [ ${RUNNING} -eq 1 ]; then logtext "Result: found running dovecot process" - Display --indent 2 --text "- Checking Dovecot status..." --result RUNNING --color GREEN + Display --indent 2 --text "- Checking Dovecot status" --result RUNNING --color GREEN DOVECOT_RUNNING=1 IMAP_DAEMON="dovecot" POP3_DAEMON="dovecot" else logtext "Result: dovecot not found" - Display --indent 2 --text "- Checking Dovecot status..." --result "NOT FOUND" --color WHITE + Display --indent 2 --text "- Checking Dovecot status" --result "NOT FOUND" --color WHITE fi fi # @@ -190,12 +190,12 @@ IsRunning qmail-smtpd if [ ${RUNNING} -eq 1 ]; then logtext "Result: found running Qmail process" - Display --indent 2 --text "- Checking Qmail status..." --result RUNNING --color GREEN + Display --indent 2 --text "- Checking Qmail status" --result RUNNING --color GREEN QMAIL_RUNNING=1 SMTP_DAEMON="qmail" else logtext "Result: no running Qmail processes found" - Display --indent 2 --text "- Checking Qmail status..." --result "NOT FOUND" --color WHITE + Display --indent 2 --text "- Checking Qmail status" --result "NOT FOUND" --color WHITE fi fi # @@ -209,12 +209,12 @@ IsRunning sendmail if [ ${RUNNING} -eq 1 ]; then logtext "Result: found running Sendmail process" - Display --indent 2 --text "- Checking Sendmail status..." --result RUNNING --color GREEN + Display --indent 2 --text "- Checking Sendmail status" --result RUNNING --color GREEN SENDMAIL_RUNNING=1 SMTP_DAEMON="sendmail" else logtext "Result: no running Sendmail processes found" - Display --indent 2 --text "- Checking Sendmail status..." --result "NOT FOUND" --color WHITE + Display --indent 2 --text "- Checking Sendmail status" --result "NOT FOUND" --color WHITE fi fi # @@ -228,12 +228,12 @@ FIND=`${PSBINARY} ax | grep "/smtpd" | grep -v "grep"` if [ ! "${FIND}" = "" ]; then logtext "Result: found running smtpd process" - Display --indent 2 --text "- Checking OpenBSD smtpd status..." --result RUNNING --color GREEN + Display --indent 2 --text "- Checking OpenBSD smtpd status" --result RUNNING --color GREEN SMTPD_RUNNING=1 SMTP_DAEMON="smtpd" else logtext "Result: smtpd not found" - Display --indent 2 --text "- Checking OpenBSD smtpd status..." --result "NOT FOUND" --color WHITE + Display --indent 2 --text "- Checking OpenBSD smtpd status" --result "NOT FOUND" --color WHITE fi fi # |