#!/bin/bash -x # # Original Version # ---------------- # http://www.Linux-Sec.net/Mail/etc.mail/sendmail.update.sh.txt # # # # 04-Jun-02 amo Compile and Test the new Sendmail.cf file # # Ver="Jun04" # # SMTP="/etc/rc.d/init.d/sendmail" #SMTP="/etc/rc.d/rc.smtp" # # cd /usr/local/src/sendmail-8.12.4/cf/cf # # # Build the new cf file to test # ----------------------------- # rm config.cf ; sh Build config.cf # # # Install the new cf file to test # ------------------------------- # if [ "$1" = "test" ]; then cp config.cf /etc/mail/sendmail.cf cp config.mc /etc/mail/sendmail.mc # pushd /etc/mail rm access.db ; make ; /etc/rc.d/rc.smtp stop ; sleep 1 ; /etc/rc.d/rc.smtp start popd # fi # # # Compare the differences to previous version # ------------------------------------------- # cmd=diff if [ "$1" = "cp1" -o "$2" = "cp1" ]; then cmd=cp fi # echo "" $cmd config.mc config.$Ver.mc $cmd config.cf config.$Ver.cf echo "" # # # Save a copy of it # ----------------- # if [ "$1" = "cp2" -o "$2" = "cp2" -o "$3" = "cp2" ]; then # echo "" cp config.mc /etc/mail/sendmail.$Ver.mc cp config.cf /etc/mail/sendmail.$Ver.cf # fi # # echo "" # # # end of file