cvs commit: hints sendmail.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Thu Jul 4 15:52:57 PDT 2002


timothy     02/07/04 15:52:57

  Modified:    .        sendmail.txt
  Log:
  Updates by author.
  
  Revision  Changes    Path
  1.16      +52 -18    hints/sendmail.txt
  
  Index: sendmail.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/sendmail.txt,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- sendmail.txt	29 Jun 2002 21:20:50 -0000	1.15
  +++ sendmail.txt	4 Jul 2002 22:52:57 -0000	1.16
  @@ -3,7 +3,7 @@
   
   TITLE:		Sendmail
   LFS VERSION:	3.0+
  -AUTHOR:		Sam Halliday <plendily at hotmail.com>
  +AUTHOR:		Sam Halliday <sam at neutrino.phy.uct.ac.za>
   
   SYNOPSIS:
   	This hint covers the building and configuring of a Sendmail/Procmail
  @@ -13,6 +13,11 @@
   ACKNOWLEDGEMENTS:
   Based on the hint by J. Jones <wwbarf at qnexfvqr.qlahc.arg>
   
  +CHANGELOG:
  +0.1	first release with a changelog, added spam support and better 'cf'
  +	support
  +0.1.1	fixed typo in the 'mc' file
  +
   HINT:
   
   Software you need
  @@ -36,10 +41,10 @@
   Mail Clients
   
   Pine:  http://www.washington.edu/pine/
  -	Console based mail client
  +	Console based mail client (for for ssh'ing in and reading mail)
   
   Sylpheed Claws:  http://sourceforge.net/projects/sylpheed-claws
  -	GTK+ based email client
  +	GTK+ based email client (when you are at your machine with X running)
   
   Building the required packages
   ==============================
  @@ -56,13 +61,14 @@
   cd build_unix
   ../dist/configure --prefix=/usr --enable-compat185
   make
  -make docdir=/usr/doc/Berkeley-DB install
  +make docdir=/usr/doc/berkeleydb install
   ldconfig
   
   Procmail:
   Procmail requires a Sendmail file to exist in order to compile, so we trick it
   into believing that we have Sendmail installed already by touching the future
  -location
  +location. Again takes the standard GNUmake environment variables for
  +optimisations.
   
   unpack Procmail tarball
   touch /usr/sbin/sendmail
  @@ -96,11 +102,13 @@
   configuration, Sendmail uses a preprocessed .cf text file for its configuration.
   You create an 'mc' file which is then processed by the m4 macro processor to
   create your 'cf' config file. Editing the 'cf' file  directly is NOT recommended
  +'sendmail.cf' is used for incoming mail, 'submit.cf' for outgoing.
   
   unpack Sendmail
   go to the file "devtools/OS/Linux"
  -at the end, add the following lines. You may also specify your optimisations in
  -this file:
  +at the end, add the following lines to avoid the user.group setup that sendmail
  +would otherwise require you to employ just for the install. You may also specify
  +your optimisations in this file:
   
           define(`confMANGRP',`root')
           define(`confMANOWN',`root')
  @@ -112,15 +120,26 @@
   
   cd sendmail/ && sh Build && cd ../
   
  -Now create our config file 'config.mc' with the following lines. Read cf/README
  -for all the options you can use if you ever wish to modify your setup. You can
  -add preliminary spam blocking support here, I have omitted that here:
  +Now create our config file 'sendmail.mc'. Read cf/README for all the options
  +you can use if you ever wish to modify your setup. We may need to update
  +this configuration in the future, so it is a good idea to copy over all
  +necessary files into /etc/mail. The sendmail startup script will regenerate
  +the config files on startup so unless you want to edit the script, place them
  +as shown;
  +
  +mkdir -p /etc/mail
  +cp cf/README /etc/mail
  +cp -r cf/m4 /etc/mail
  +cp -r cf/ostype /etc/mail
  +cp -r cf/domain /etc/mail
  +cp -r cf/feature /etc/mail
  +cp -r cf/mailer /etc/mail
   
   cd cf/cf
  -create file config.mc containing (remove spaces before the lines):
  +create file sendmail.mc containing (remove spaces before the lines):
   
           divert(0)dnl
  -        VERSIONID(`$Id: sendmail.txt,v 1.15 2002/06/29 21:20:50 timothy Exp $')
  +        VERSIONID(`$Id: sendmail.txt,v 1.16 2002/07/04 22:52:57 timothy Exp $')
           OSTYPE(linux)dnl
           DOMAIN(generic)dnl
           FEATURE(smrsh)dnl
  @@ -128,6 +147,8 @@
           FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable')dnl
           FEATURE(`access_db',`hash -T<TMPF> /etc/mail/access')dnl
           FEATURE(`no_default_msa')
  +	FEATURE(`dnsbl', `sbl.spamhaus.org', `"Listed on SBL -
  +see <http://spamhaus.org/SBL/>"')dnl
           MODIFY_MAILER_FLAGS(`LOCAL', `-S')
           define(`confTRUSTED_USER', `smmsp')dnl
           define(`confRUN_AS_USER', `smmsp:smmsp')
  @@ -135,14 +156,20 @@
           MAILER(local)dnl
           MAILER(smtp)dnl
   
  -sh Build config.cf
  +also make sure the "spamhaus" feature is all on one line.
  +
  +A brief description is that we are fork()'ing the listening sendmail daemon
  +to use user smmsp. We are also consulting an online database of known spamming
  +IP addresses. Berkeley DB support has also been enabled here. For a fuller
  +explaination, read your locally stored /etc/mail/README
   
  -Now create some system directories that Sendmail will use and install the
  -config files:
  +sh Build sendmail.cf
   
  -mkdir -p /etc/mail /var/spool/mqueue /var/lib/smrsh
  -cp config.cf /etc/mail/sendmail.cf
  -cp config.mc /etc/mail/
  +Install the setup files and create some needed system directories
  +
  +mkdir -p /var/spool/mqueue /var/lib/smrsh
  +cp sendmail.cf /etc/mail
  +cp sendmail.mc /etc/mail
   
   Build it and install!
   cd ../../
  @@ -168,7 +195,7 @@
   
   add the following to new file /etc/mail/access. This file only has to exist
   and null content is OK.  This file is quite powerful.. you should read the
  -cf/README section about it to fully understand it.
  +/etc/mail/README section about it to fully understand it.
   
           localhost.localdomain           RELAY
           localhost                       RELAY
  @@ -223,6 +250,12 @@
   case "$1" in
     start)
           echo -n "Starting Sendmail... "
  +	/usr/bin/m4 /etc/mail/m4/cf.m4 /etc/mail/sendmail.mc \
  +		> /etc/mail/sendmail.cf
  +	chmod 444 /etc/mail/sendmail.cf
  +	/usr/bin/m4 /etc/mail/m4/cf.m4 /etc/mail/submit.mc \
  +		> /etc/mail/submit.cf
  +	chmod 444 /etc/mail/submit.cf
           makemap hash /etc/mail/access < /etc/mail/access
           /usr/bin/newaliases > /dev/null 2>&1
           /usr/sbin/sendmail -bs -bd -q1m &&
  @@ -282,3 +315,4 @@
   make install    
   
   Happy emailing!
  +
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list