# # Original Version # ---------------- # http://www.Linux-Sec.net/Mail/Sendmail-Install-HOWTO/Install-HOWTO.txt # # # ====================== # Sendmail-Install-HOWTO # ====================== # # http://www.Sendmail.org # http://www.digitalanswers.org/check_local # # # #==================================================================== # # # 04-Jun-02 amo Download and install sendmail-8.12.4 # 27-Jun-02 amo Download and install sendmail-8.12.5 # 30-Aug-02 amo Download and install sendmail-8.12.6 + check_local-5.4 # 15-Nov-02 amo Separate and Clean Up Documents # 31-Dec-02 amo Cleanup documents with sendmail-8.12.7 upgrades # 27-Jan-03 amo Clean more docs # 04-Mar-03 amo Download and install sendmail-8.12.8 # 30-Mar-03 amo Download and install sendmail-8.12.9 and "Testing" # 01-Apr-03 amo Added more Testing section # 29-Nov-03 amo Clean docs for Sendmail-8.12.10 # 22-Feb-04 amo Clean docs for Sendmail-8.12.11 # 10-Aug-04 amo Download and install Sendmail-8.13.1 # # #==================================================================== # # ** ------------- ** # ** Backup first ** # ** ------------- ** # cd /usr/local/src # tar zcvf sendmail_backup.previous.tgz /etc/sendmail* /usr/sbin/*mail* /usr/bin/*mail* /etc/mail* /etc/aliases* # # # # # Download the Latest Sendmail Sources # ====================================== # cd /usr/local/src # wget http://sendmail.org/pub/sendmail/sendmail.8.12.xx.tar.gz # # tar zxvfp sendmail.8.12.xx.tar.gz # # cd sendmail.8.12.xx # # # Build the sendmail binaries # ---------------------------- sh Build # # # # Build a generic/default sendmail.cf file ( for testing compiling/linking ) # ======================================== # cd cf/cf cp generic-linux.mc config.mc # sh Build config.cf # # # --------------------------- # To enable AntiSpam Features # --------------------------- # http://www.Linux-Sec.net/Mail/Sendmail-Install-HOWTO/AntiSpam/antispam.rbl.uhowto.txt # http://www.Linux-Sec.net/Mail/Sendmail-Install-HOWTO/AntiSpam/antispam.check_local.uhowto.txt # # # ----------------------------------------------- # Test the new sendmail Locally BEFORE installing # ----------------------------------------------- # http://www.linux-sec.net/Mail/Sendmail/#Testing # # cd /usr/local/src/sendmail-8.12.xx/cf/cf # # ( depends on your kernel ) # ../../obj.Linux.2.4.20.i586/sendmail/sendmail -d72 -bt -Cconfig.cf # # # ========================================================== # == # == IMPORTANT: Backup your current sendmail configs first # == # ========================================================== # cd /usr/local/src # tar zcvf sendmail_backup.previous.tgz /etc/sendmail* /usr/sbin/*mail* /usr/bin/*mail* /etc/mail* /etc/aliases* # mv /etc/mail/sendmail.mc /etc/mail/sendmail.previous.mc mv /etc/mail/sendmail.cf /etc/mail/sendmail.previous.cf # # # ----------------------------------------- # Now Install latest sendmail files version # ----------------------------------------- # # Install the Binaries # ---------------------- cd /usr/local/src/sendmail-8.12.x # # # RH-9 seems to be missing /usr/man mkdir -p /usr/man/man1 /usr/man/man8 # # sh Build Install ( make install ) # sh Build install # # # Install the config file # ------------------------ cd /usr/local/src/sendmail-8.12.x/cf/cf # cp config.mc /etc/mail/sendmail.mc cp config.cf /etc/mail/sendmail.cf # # vi /etc/mail/sendmail.cf # Dj=Mail.foo.com # # vi /etc/mail/alises # # # Rebuild the aliases db # ----------------------- # sendmail -v -bi # - or -- newaliases # # # Sendmail Version # ---------------- sendmail -d0.1 # # # ============================================= # Check permissions After Sendmail is Installed ( sendmail-8.12.6 ) # ============================================= # http://www.Linux-Sec.net/Mail/Sendmail-Install-HOWTO/permissions.txt # # # ============================================= # Check Sendmail Restricted Shell ( smrsh ) is Installed ( sendmail-8.12.6 ) # ============================================= # http://www.Linux-Sec.net/Mail/Sendmail-Install-HOWTO/smrsh.links.txt # # # ======================================== # Check the sendmail ( MTA ) config files ( /etc/mail ) # ======================================== # http://www.Linux-Sec.net/Mail/etc.mail # # vi /etc/mail/access # - list of domains and ip# you allow to send outgoing emails # vi /etc/mail/local-host-names ( sendmail.cw ) # - list of domains you will receive incoming emails # vi /etc/mail/virtusertable # - list of users you accept emails for # # # Create the new database w/ make or explicitly with makedb # cd /etc/mail # make # # # Restart sendmail # ----------------- /etc/rc.d/init.d/sendmail stop ; sleep 5 ; /etc/rc.d/init.d/sendmail start # -- or -- /etc/rc.d/rc.smtp stop ; sleep 5 ; /etc/rc.d/rc.smtp start # # # Throroughly Test your Sendmail # ------------------------------ http://www.linux-sec.net/Mail/Sendmail/#Testing # # # Try to send mail # ---------------- # send mail from root to a normal user # send mail from normal user to another # send mail to your outside yahoo/hotmail accounts # send mail FROM the outside to yourself # mail -v -s "testing local email" root < /dev/null # mail -v -s "testing outgoing email" you@hotmail.com < /dev/null # # # Congratulations -- you're sorta done # ------------------------------------ # - enable your RBL antispam features # - enable your header and subject checking antispam features # # # Check your mail log files regularly # ------------------------------------ # tail -f /var/log/maillog # # # end of file