diff options
author | mboelen <michael@cisofy.com> | 2015-12-21 23:17:15 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2015-12-21 23:17:15 +0300 |
commit | d16b38eff83a8dca405e21e1c34205289f3d0832 (patch) | |
tree | d9db1eac3d4ead003f0e1b4fbfbabf0ddeb66c1e /include/tests_mail_messaging | |
parent | 83a44827e03543146e39c37c33f14ebca6f40a29 (diff) |
Rename of logtext and report functions, upcoming year change
Diffstat (limited to 'include/tests_mail_messaging')
-rw-r--r-- | include/tests_mail_messaging | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/include/tests_mail_messaging b/include/tests_mail_messaging index 3d33129e..5da30e47 100644 --- a/include/tests_mail_messaging +++ b/include/tests_mail_messaging @@ -5,7 +5,7 @@ # Lynis # ------------------ # -# Copyright 2007-2015, Michael Boelen (michael.boelen@cisofy.com) +# Copyright 2007-2016, Michael Boelen (michael.boelen@cisofy.com) # Web site: https://cisofy.com # # Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are @@ -36,15 +36,15 @@ # Description : Check Exim process status Register --test-no MAIL-8802 --weight L --network NO --description "Check Exim status" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: check Exim status" + LogText "Test: check Exim status" IsRunning exim if [ ${RUNNING} -eq 1 ]; then - logtext "Result: found running Exim process" + LogText "Result: found running Exim process" 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" + LogText "Result: no running Exim processes found" Display --indent 2 --text "- Checking Exim status" --result "NOT FOUND" --color WHITE fi fi @@ -56,18 +56,18 @@ # Notes : qmgr and pickup run under postfix uid, without full path to binary Register --test-no MAIL-8814 --weight L --network NO --description "Check postfix process status" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: check Postfix status" + LogText "Test: check Postfix status" # Some other processes also use master, therefore it should include both master and postfix FIND1=`${PSBINARY} ax | grep "master" | grep "postfix" | grep -v "grep"` #FIND2=`${PSBINARY} ax | grep "qmgr" | grep "postfix" | grep -v "grep"` #FIND3=`${PSBINARY} ax | grep "pickup" | grep "postfix" | grep -v "grep"` if [ ! "${FIND1}" = "" ]; then - logtext "Result: found running Postfix process" + LogText "Result: found running Postfix process" 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" + LogText "Result: no running Postfix processes found" Display --indent 2 --text "- Checking Postfix status" --result "NOT FOUND" --color WHITE fi fi @@ -82,8 +82,8 @@ Display --indent 2 --text "- Checking Postfix configuration" --result FOUND --color GREEN 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}" + LogText "Postfix configuration directory: ${POSTFIX_CONFIGDIR}" + LogText "Postfix configuration file: ${POSTFIX_CONFIGFILE}" fi # ################################################################################# @@ -93,7 +93,7 @@ if [ ${POSTFIX_RUNNING} -eq 1 -a ! "${POSTFIXBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi 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" + 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'` @@ -111,7 +111,7 @@ fi if [ ${SHOWWARNING} -eq 1 ]; then 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'." + 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})" fi @@ -123,16 +123,16 @@ # Description : Check Dovecot process Register --test-no MAIL-8838 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check dovecot process" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: check dovecot status" + LogText "Test: check dovecot status" IsRunning dovecot if [ ${RUNNING} -eq 1 ]; then - logtext "Result: found running dovecot process" + LogText "Result: found running dovecot process" 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" + LogText "Result: dovecot not found" Display --indent 2 --text "- Checking Dovecot status" --result "NOT FOUND" --color WHITE fi fi @@ -143,15 +143,15 @@ # Description : Check Qmail process status Register --test-no MAIL-8860 --weight L --network NO --description "Check Qmail status" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: check Qmail status" + LogText "Test: check Qmail status" IsRunning qmail-smtpd if [ ${RUNNING} -eq 1 ]; then - logtext "Result: found running Qmail process" + LogText "Result: found running Qmail process" 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" + LogText "Result: no running Qmail processes found" Display --indent 2 --text "- Checking Qmail status" --result "NOT FOUND" --color WHITE fi fi @@ -162,15 +162,15 @@ # Description : Check Sendmail process status Register --test-no MAIL-8880 --weight L --network NO --description "Check Sendmail status" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: check sendmail status" + LogText "Test: check sendmail status" IsRunning sendmail if [ ${RUNNING} -eq 1 ]; then - logtext "Result: found running Sendmail process" + LogText "Result: found running Sendmail process" 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" + LogText "Result: no running Sendmail processes found" Display --indent 2 --text "- Checking Sendmail status" --result "NOT FOUND" --color WHITE fi fi @@ -182,15 +182,15 @@ if [ ! "${SMTPCTLBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no MAIL-8920 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check OpenSMTPD status" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: check smtpd status" + LogText "Test: check smtpd status" FIND=`${PSBINARY} ax | egrep "(/smtpd|smtpd: \[priv\]|smtpd: smtp)" | grep -v "grep"` if [ ! "${FIND}" = "" ]; then - logtext "Result: found running smtpd process" + LogText "Result: found running smtpd process" Display --indent 2 --text "- Checking OpenSMTPD status" --result RUNNING --color GREEN OPENSMTPD_RUNNING=1 SMTP_DAEMON="opensmtpd" else - logtext "Result: smtpd not found" + LogText "Result: smtpd not found" Display --indent 2 --text "- Checking OpenSMTPD status" --result "NOT FOUND" --color WHITE fi fi @@ -198,13 +198,13 @@ ################################################################################# # -report "imap_daemon=${IMAP_DAEMON}" -report "pop3_daemon=${POP3_DAEMON}" -report "smtp_daemon=${SMTP_DAEMON}" +Report "imap_daemon=${IMAP_DAEMON}" +Report "pop3_daemon=${POP3_DAEMON}" +Report "smtp_daemon=${SMTP_DAEMON}" wait_for_keypress # #================================================================================ -# Lynis - Copyright 2007-2015, Michael Boelen, CISOfy - https://cisofy.com +# Lynis - Copyright 2007-2016, Michael Boelen, CISOfy - https://cisofy.com |