#==================================================================== # # # Install sendmail-8.12.3 # ----------------------- # # #==================================================================== # # Backup first # ------------- # tar -zcvf /tmp/sendmail_backup.tgz /etc/sendmail* /usr/sbin/*mail* /usr/bin/*mail* /etc/mail* # # # # -------------------------- # Install Sendmail # -------------------------- # # # Get the latest version # ---------------------- # ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.3.tar.gz # # cd /usr/local/src # tar zxvfp sendmail.8.12.3.tar.gz # # cd sendmail.8.12.3 sh Build # # make clean -- or make fresh # make # # # groupadd -g 25 smmsp useradd -u 25 -g 25 -s /bin/false smmsp # # # not a typo cd sendmail.8.12.3/sendmail sh Build install # # # not a typo cd sendmail.8.12.3 sh Build install # # # cd /etc/mail ln -s ../sendmail.cf . ln -s ../sendmail.c2 . ln -s ../aliases . ln -s ../aliases.db . make clean make # # # # # # # For mailing list and trusted users # ----------------------------------- # # mkdir /usr/adm/sm.bin # ln -s /usr/sbin/smrsh /usr/adm/sm.bin # cd /etc/smrsh ln -s /usr/sbin/smrsh . # # cd /usr/local/src/sendmail-8.12.3 # vi smrsh/smrsh.c # - /etc/smrsh # make install # # # #==================================================================== # # For a reference/starting config.mc file # ---------------------------------------- # #==================================================================== # # http://www.Linux-Sec.net/Mail/etc.mail/sendmail-8.12.3.config.mc --> config.mc # cd sendmail.8.12.3/cf/cf cp generic-linux.mc config.mc vi config.mc (add the appropriate FEATUREs in) sh Build config.cf # # test the new config file # cd /usr/local/src/sendmail-8.12.3 ./obj.Linux.2.2.14.i586/sendmail/sendmail -d72 -bt -Ccf/cf/config.cf # # # ps axuw | grep send kill -HUP "pid" # # # Save your current mail config before upgrading # mv /etc/sendmail.cf /etc/sendmail.till_may08.cf mv /etc/sendmail.mc /etc/sendmail.till_may08.mc cp cf/cf/config.cf /etc/sendmail.cf cp cf/cf/config.mc /etc/sendmail.mc # # # Stop and start sendmail # # # done for the above # ----------------------------------------------------------------------- # # Check_local # ============ # http://www.Linux-Sec.net/Mail/etc.mail/check_local.txt # # cd /usr/local/src # # # Make sure sendmail is compiled with regex support # ------------------------------------------------- # # # check-local-3.15 and check-local-5 requires MAP_REGEX # check-local-5 does NOT need any patches to sendmail-8.12.3 # vi sendmail-8.12.3/devtools/bin/configure.sh # # add MAP_REGEX DNSMAP into # -DNEWDB -DMAP_REGEX -DDNSMAP -DSM_CONF_SHM=0 # # # http://www.stud.uni-hannover.de/~jk/map-regex/check_header.html # # OBJADD=map_storage.o, DBMDEF= -DMAP_STORAGE ... # cd sendmail-8.12.3 sh Build # # -------------------------------------------------------------------------- # cp check_local-3.15/map_storage/map_storage.c sendmail-8.13.2/sendmail/ # vi sendmail-8.12.3/devtools/Site/site.config.m4 APPENDDEF(`confMAPDEF', `-DMAP_STORAGE')dnl APPENDDEF(`confSMOBJADD', `map_storage.o')dnl # # # --------------------------------------------------------------- # # # make sure oyu see the MAP_REGEX option defined during compile time # cd sendmail-8.12.3 make fresh # # # # Copy the check-local-5 stuff into sendmail-8.12.3 # ------------------------------------------------- # # wget http://www.digitalanswers.org/check_local/check_local.5.0.tar.gz # tar zxvfp check_local-5.tar.gz cd check_local-5 cp -p hack/* ../sendmail-8.12.3/cf/hack # ln -s cf/hack-local-5 cf/hack # # cd ../sendmail-8.12.3/cf/cf # vi config.mc HACK(`check_local') # # # use an Example config.mc # wget http://www.Linux-Sec.net/Mail/etc.mail/sendmail-8.12.3.config.local-5.mc config.mc # # sh Build config.cf # cp config.cf /etc/mail/sendmai.cf cp config.mc /etc/mail/sendmai.mc # # stop - start sendmail # # # map hc_switch: class storage not available # solution ==>> ?? # # # # ------------------------------------------------------------------ # Manually test the config file with check-local-5 and regex suppert # ------------------------------------------------------------------ # cd sendmail-8.12.3 # ./obj.Linux.2.2.14.i586/sendmail/sendmail -d72 -bt -Ccf/cf/config.cf # # # # end of file