mirror of https://github.com/CISOfy/lynis.git
Redirect errors from postconf output
This commit is contained in:
parent
8fcca37187
commit
6815c9a915
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue