#!/bin/sh # # # Harry Hoffman # # **************************************************************************** # Service definition section. # **************************************************************************** service="root mailforward" servfil="enable-root-mailforward.vfy" SENDMAILCONF="${JASS_ROOT_DIR}/etc/mail/sendmail.cf" ALIASES="${JASS_ROOT_DIR}/etc/mail/aliases" #----------------------------------------------------------------------------- servhdr_txt=" Description of Service or Function: Forward all of root's mail onto the itss-unix-admin list. Check to make sure that the smarthost relay is setup in the sendmail config file. Rationale for Verification Check: This script checks to ensure that root's mail is being forwarded to the itss-unix-admin mailing list. It also ensures that the smarthost entry has been set properly in the sendmail config file. Determination of Compliance: This check will indicate a failure if an alias doe not exist for root in the aliases file. Also, this script will indicate whether or not the proper smarthost has been set in the sendmail config file. " # **************************************************************************** # Check processing section. # **************************************************************************** start_verify "${servfil}" "${service}" "${servhdr_txt}" if check_fileExists ${ALIASES} 1 ; then if check_fileContentsExist "${ALIASES}" "^root: itss-unix-admin@auckland\.ac\.nz" 1 ; then logSuccess "root e-mail alias is defined in ${ALIASES}." else logFailure "root e-mail alias is not defined in ${ALIASES}." fi else logFileNotFound "${ALIASES}" 1 fi if check_fileExists ${SENDMAILCONF} 1 ; then if check_fileContentsExist "${SENDMAILCONF}" "^DSmailhost\.auckland\.ac\.nz" 1 ; then logSuccess "Smart host set in ${SENDMAILCONF}." else logFailure "Smart host not set in ${SENDMAILCONF}." fi else logFileNotFound "${SENDMAILCONF}" 1 fi finish_verify