[comp.unix.wizards] Assistance with Sendmail.cf

ivor@ag1.nlm.nih.gov (Ivor D'Souza) (02/07/91)

Could somebody please direct me towards good reading material that would
shed light on the syntax of the sendmail.cf file.  I have to configure
the sendmail.cf file on Sun OS 4.1.1 so that it will benefit our users
coming in over an X.400 gateway.
advTHANKSance.

  ****************************************************************************
  *                                                                          *
  *   Ivor D'Souza                     \\\\                                  *
  *   8600 Rockville Pike              <o o>             INTERNET:           *
  *   Bldg 38a, Room B1N14H             \~/        ivor@ag1.nlm.nih.gov      *
  *   Nat'l Library of Medicine        ivOR                                  *
  *   Bethesda, MD 20894                                                     *
  *                                                                          *
  ****************************************************************************

glenn@rigel.econ.uga.edu (Glenn F. Leavell) (02/08/91)

In article <25878@adm.brl.mil> ivor@ag1.nlm.nih.gov (Ivor D'Souza) writes:
>Could somebody please direct me towards good reading material that would
>shed light on the syntax of the sendmail.cf file.  I have to configure
>the sendmail.cf file on Sun OS 4.1.1 so that it will benefit our users
>coming in over an X.400 gateway.
>advTHANKSance.


The book _Unix System Administration Handbook_ by Nemeth, Snyder, and Seebass
has a good chapter titled "Mail and Berkeley Sendmail".  The book's ISBN
number is 0-13-933441-6, and it's published by Prentice Hall.

-- 
Glenn F. Leavell  Systems Administrator  glenn@rigel.econ.uga.edu  404-542-3488
 University of Georgia Economics Department. 147 Brooks Hall. Athens, GA 30602

jackv@turnkey.tcc.com (Jack F. Vogel) (02/08/91)

In article <25878@adm.brl.mil> ivor@ag1.nlm.nih.gov (Ivor D'Souza) writes:
>Could somebody please direct me towards good reading material that would
>shed light on the syntax of the sendmail.cf file...
 
Most vendors supply some sendmail documentation with the system. There are
a couple of documents written by Eric Allman that should be helpful:

	"Sendmail - An Internetwork Mail Router"
			and
	"Sendmail Installation and Operation Guide"

that are UCB documents. I don't have Sun documentation but these should be
obtainable. Secondly, even though these documents are of help, nothing is
quite as useful as thoroughly reading and mastering the sendmail source
itself. Good luck.

Disclaimer: I don't speak for the company.

-- 
Jack F. Vogel			jackv@locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv@turnkey.TCC.COM

davison@menudo.uh.edu (Dan Davison) (02/09/91)

Another good source of sendmail configuration is on titan.rice.edu in
/public, as sendmail.dbj.cf.  Very well commented and explained.

I still think the best description of a sendmail.cf file is the one
that goes "It looks like you take the keyboard and pound it against
your forehead while in your favorite editor".  It does!

BTW, anyone know the name of Allman's [sp?] course (& professor) that
did this to us?  It was some language design course with the .cf file
looking like the skeleton of a parser...

dan
--
dr. dan davison/dept. of biochemical and biophysical sciences/univ. of
Houston/4800 Calhoun/Houston,TX 77054-5500/davison@uh.edu/DAVISON@UHOU
Disclaimer: As always, I speak only for myself, and, usually, only to
myself.

bzs@world.std.com (Barry Shein) (02/10/91)

>BTW, anyone know the name of Allman's [sp?] course (& professor) that
>did this to us?  It was some language design course with the .cf file
>looking like the skeleton of a parser...

I've been saying it since the first person complained about sendmail's
config file...

The community has been free to write a replacement, it's not even that
daunting since it's just a user level application (no kernel support
needed that's peculiar to sendmail.) 99% of what it does is match
various address formats and decide which mailer to fork, possibly with
some minor string transformations on the address.

Even just the config file part could have probably been re-worked, the
full source has been available for years to all.

Although there have been a few attempts, sendmail remains predominant
among Unix internet gateway mailers after all these years, by far. So
we have to assume that either it isn't that bad, or no one can think
of a better way to do this.
-- 
        -Barry Shein

Software Tool & Die    | bzs@world.std.com          | uunet!world!bzs
Purveyors to the Trade | Voice: 617-739-0202        | Login: 617-739-WRLD

barnett@grymoire.crd.ge.com (Bruce Barnett) (02/12/91)

Re: sendmail.cf woes

Another solution is to use the EASE high level language for sendmail.
The version after 2.1 fixed about 100 bugs, and allows you to
	Step 1) convert sendmail.cf into ease
	Step 2) edit the ease version
	Step 3) Convert the ease version back to sendmail
	Step 4) Use it as is.

The translation is 99% perfect, and supports SunOS, Ultrix, and some,
but not all, of the IDA enhancements.

Unfortunately, this version was never posted to the net.
(I send the changes to the authors, but they never posted it for
various reasons.)

I will be putting the finishing touches on it Real Soon Now.

--
Bruce G. Barnett	barnett@crd.ge.com	uunet!crdgw1!barnett

steve@nuchat.sccsi.com (Steve Nuchia) (02/12/91)

In <BZS.91Feb10001054@world.std.com> bzs@world.std.com (Barry Shein) writes:
>among Unix internet gateway mailers after all these years, by far. So
>we have to assume that either it isn't that bad, or no one can think
>of a better way to do this.

Or those of us who have thought of a better way (it isn't hard!) look at
sendmail.cf like a "weeder" CS class:  it keeps those who don't need to
be there from mucking about with the mail system.

:-)   <------ translation for the humor impaired.

Actually what happens is that by the time you understand enough to
be making non-trivial changes to sendmail configurations you realize that
the syntax is nowhere near the hardest part.  It would be really nice
to have a more expressive language, and it would be even nicer to
have an MTA with a data flow graph that can be embedded -- accurately --
in a space having less than four dimensions.

I've only had my head completely wrapped around sendmail once, and
my client at the time had a taboo against rewriting system code, so
I just made it do what I needed it to do.  If somebody wants a better
MTA and doesn't like smail3 or MMDF, and is willing to pay to have
it built, drop me a line.  Otherwise you'll have to wait until the
next time I want sendmail to do something it doesn't want to do.

The fact that that condition doesn't arise very often is why nobody
has bothered to write the replacement.  A textbook application of
``If it ain't broke, don't fix it.''

Go ahead, call me an elitist.  It makes my head swell, and I
just love that.  But I would rather have sendmail.cf change
requests get routed to my desk than have to write, debug, and
support a new mailer PLUS unfuck all the configuration files that
all the users have scrambled because they are no longer intimidated
by them.

Yes, I know the vendors send out paleolithic default configuration
files and there are people out there who just need their stupid
machine to work.  The vendors should hire somebody who understands
sendmail, and the users would probably be happier with a simpler MTA.
Does smail3 solve the problem for most of those users?  I honestly
don't know; I don't currently have any clients in that situation.

Just so that this little exercise in catharsis hits the streets
with some redeeming social value, here are some of my rewrite ideas:

1) the rewrite rule syntax should be based on ed(1) level or
	better regular expressions, enhanced with appropriate
	lexical concepts and state vector access.

2) great care should be exercised in the architectural specification
	to ensure that processing steps are well defined, happen in
	a well-defined sequence, and are either necessarily idempotent
	or happen exactly once.

3) message routing, and hence rewriting, decisions must be made as
	the message is drawn from the queue, rather than when it is
	inserted.  Otherwise changes to topolgy or policy will cause
	garbling or stranding of messages.

3a) the message must be stored in its original form in the queue,
	and any auxilliary data structures (e.g. recipient lists) must
	be carefully designed to allow proper control of rewriting.

4) routing policy should be expressed in a well-thought-out language
	with provisions for fallback, prioritization, and other goodies.

5) the rewrite rules should be organized around the processing phases and
	must clearly distinguish the various contexts (sender, recipient,
	from, to, etc) in which an address string might appear.

6) all of the implicit lexical and specialized syntactic processing
	hidden inside sendmail must be moved out to the configuration scripts.

7) the new program must subsume all known functions of sendmail, unless
	some are determined to be inappropriate for an MTA.

Just figuring out what sendmail really does with a message is a big job.
-- 
Steve Nuchia	      South Coast Computing Services      (713) 964-2462
	"Innocence is a splendid thing, only it has the misfortune
	 not to keep very well and to be easily misled."
	    --- Immanuel Kant,  Groundwork of the Metaphysic of Morals

amoss@SHUM.HUJI.AC.IL (Amos Shapira) (02/18/91)

Hello,
	Hope I didn't miss anything important in this discussion. But what
	about the language of ease (and its translator, et)? Invented
	and writen by the author of sendmail. What Steve Nuchia described is
	exectly the function of this language.

Cheers,
Amos Shapira
Hebrew University
Jerusalem, Israel
amoss@shuldig.huji.ac.il