#!/bin/ksh -x # # Find the file and untar if [ -f mail.tar ]; then tar -xf./mail.tar # Replace Hostname variables in sendmail.cf # Domain name has already been replaced sed "s/#DwYourHostName/Dw`uname -n`/" sendmail.cf > sendmail.tmp sed "s/#CwYourHostName/Cw`uname -n`/" sendmail.tmp > sendmail.cf # Copy the new configuration files to /usr/lib cp sendmail.cf /usr/lib/sendmail.cf cp aliases /usr/lib/aliases # Stop the sendmail program in order to rebuild the database stopsrc -s sendmail sleep 5 /usr/lib/sendmail -bz /usr/lib/newaliases # Cleanup startsrc -s sendmail -a "-bd -q30m" if [ $? != 0 ]; then /usr/lib/sendmail -bd -q30m fi rm sendmail.tmp rm sendmail.cf rm aliases else echo You need the mail.tar file from Journey fi