#!/path/to/bash ########################################################## # Defense in Depth - Anti-SPAM for sendmail environments # # by David Bank --> http://www.hiredavidbank.com # ########################################################## # # /path/to/mimedefang/conf/sanity.sh # # Sanity-check for mimedefang-filter file # # Returns 0 if filter is broken, 1 if filter is OK echo echo " Sanity-checking /path/to/mimedefang/conf/mimedefang-filter..." test123=$( /path/to/perl /path/to/mimedefang/bin/mimedefang.pl -test` ) echo " ..${test123}" chk=$( echo ${test123} | grep -c 'syntactically correct' ) echo exit ${chk} # End of script