*BSD News Article 21065


Return to BSD News archive

Xref: sserve comp.mail.sendmail:8599 comp.sys.sun.admin:18527 comp.unix.bsd:12655
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!sol.ctr.columbia.edu!destroyer!news.itd.umich.edu!hellcow.css.itd.umich.edu!pauls
From: pauls@css.itd.umich.edu (Paul Southworth)
Newsgroups: comp.mail.sendmail,comp.sys.sun.admin,comp.unix.bsd
Subject: Sendmail 8.x with user databases for the complete idiot
Followup-To: comp.mail.sendmail
Date: 18 Sep 1993 02:37:02 GMT
Organization: University of Michigan ITD Consulting and Support Services
Lines: 112
Distribution: world
Message-ID: <27ds8e$s9i@terminator.rs.itd.umich.edu>
NNTP-Posting-Host: hellcow.css.itd.umich.edu
Summary: Now, even a monkey could do it.
Keywords: sendmail sun sunos make BSD

For the last two weeks I struggled to make sendmail 8.5 and then 8.6b11
work under SunOS 4.1.3.  These are the things I had to do to get,
specifically, the user database features to work.  If you follow these
instructions properly, sendmail will work for you.  None of this is difficult.
If you don't follow these procedures, sendmail will probably work fine
and the user database lookups will probably be hopelessly broken.

1. I built the Net2 pmake.  Although there is a makefile in the
   sendmail source tree for the SunOS make, there are all sorts of
   other little and not-so-little things that you really need the BSD
   make for.  The biggest one of these is the BSD4.4 libdb package.
   Other less-important examples are "makemap" and the cf stuff.

   I posted the diffs to alt.sources that you can use to modify
   the Net2 distribution's make sources found on ftp.uu.net, 
   wuarchive.wustl.edu, etc.  Ask me for them and I will mail them
   to you.  Otherwise get them from an alt.sources archive.
   If you get them from an archive, you will need strerror.c out
   of lib/libc/stdio in the Net2 source distribution *unless* you
   have a shared library installed on your system with a recent
   version of BIND, in which case it's irrelevant (that little
   fact was not in my alt.sources posting).  Put strerror.c in
   make/lst.lib and modify Makefile appropriately.

2. I used GCC 2.3.3.  I could never get the sources to compile out
   of the box without using GCC.  Sun's stock cc wouldn't do it
   for me.  You will get strange link errors if you don't use it.
   I am not a programmer so I can't tell you if this is easily
   fixed.  With GCC 2.3.3, no modifications to the sources were
   necessary.

3. I used the BSD4.4 libdb package version 1.71.  You really can't
   use the earlier versions.  Keith Bostic has made several changes
   in the last few days that were very important and I am grateful
   for his speedy and accurate fixes -- with database lookups remained
   totally broken with the 1.6 and 1.7 releases.  Get 1.71.  You'll
   want the new BSD "make" to build this.

4. I built the BSD4.4 libdb package without ndbm.o and ndbm.h.  If you
   read the READ_ME in the sendmail src directory Eric explains why
   you should do this.  Just edit the libdb Makefile and rename or
   remove the ndbm.h that's in the libdb distribution.  ndbm.h also
   exists in /usr/include under SunOS 4.1.3 and you can leave that
   one alone.

5. I used the -DNEWDB and -DNDBM CFLAGS in the sendmail Makefile.
   I did not use the -DNIS flag because I don't use NIS.  I have no
   idea if that would change functionality and I don't know if any
   of this would work under NIS or not.

6. Be sure to edit the sendmail Makefile to point to the libdb
   include directory relevant to your OS under the PORT directory
   of the libdb source tree.  Be sure ndbm.h isn't there when you
   do this.  Either put cdefs.h into db/PORT/sunos.4.1.3/include/sys
   or edit sendmail/src/conf.h's #include for that file so it can
   find it.

7. Build the sendmail binary.  My GCC didn't like -Bstatic but wanted
   -static instead.  Do whatever works.

8. Install sendmail according to the instructions.  Read all docs or
   you will be sorry.  Print them.  Sleep with them.  Read them.  Be sure
   you read the docs in the sendmail/cf directory too or you will go
   crazy.

9. If you want to use the user database functions:

   a. Be sure you followed the previous instructions exactly.
   b. Be sure your sendmail.cf is pointing to the database file properly.
   c. Invoke sendmail as "sendmail -bd -d28.99 -q1h" (or whatever you
      want your queue interval to be.  "-d28.99" is the debug level
      relevant to the database lookups.  When you telnet to the sendmail
      port and do VRFY's and EXPN's, that flag will tell you what the
      hell is going on.
   d. IMPORTANT TIP FOR EDITING USER DATABASE!  Do NOT use any capital
      letters in the first part of each line (before the first ":").
      While the lookups are not case sensitive, the database will break
      if you use capital letters in the first part of the entry line.

      Example:

      Joe.User:maildrop	joe@host.domain   #  This is WRONG
      joe.user:maildrop	joe@host.domain   #  This is RIGHT

      joe:mailname	Joe.User@host.domain   #  This is OK

      Mail sent to Joe.User@host.domain is OK when "joe.user" has
      a maildrop, but will be broken if the maildrop is "Joe.User".

      I didn't see this in the docs and may be a bug but if you are
      careful it won't make a difference.

10.   Where I got my sources (you should use the archive server
      nearest you - many archives contain the Net2 and alt.sources
      files):

      a. sendmail -   ftp.cs.berkeley.edu: /ucb/sendmail (get all)
      b. libdb -      ftp.cs.berkeley.edu: /ucb/4bsd/db.tar.Z
      c. BSD make -   ftp.uu.net: /systems/unix/bsd-sources/usr.bin/make
                                  /systems/unix/bsd-sources/share/mk
      d. make diffs - wuarchive.wustl.edu: /usenet/alt.sources/articles/8767
      e. GCC -        prep.ai.mit.edu: /pub/gnu
         You should visit a mirror site to be kind to GNU.  Use archie.
         GCC 2.4.5 is current and also appeared to work fine with sendmail.

11.   Who you should thank for their great support and help (Thanks!!)

      Eric Allman <eric@cs.berkeley.edu>            Primary sendmail author
      Keith Bostic <bostic@cs.berkeley.edu>         Primary libdb author
      Mark Thomas <Mark_Thomas@jane.sas.upenn.edu>  Sendmail help
      Chuck Seeger <cseeger@nielsen.com>            BSD make help      
      Alan Clegg <abc@banjo.concert.net>            BSD make help