[comp.mail.sendmail] How do you maintain your .cf?

karl_kleinpaste@cis.ohio-state.edu (07/20/90)

For the sake of my curiosity, mostly, I'd be interested in hearing how
others maintain sendmail.cf.

[a] m4
[b] ease
[c] editing
[d] ???

I don't care much for m4 (it has its purposes, yes, but I don't think
this is one of them), and I never learned ease.  So I edit .cf
directly.  Mine is heavily commented on what it's doing where and for
what reason; and it includes hordes of "CONFIG HERE" comments for the
sake of others who have picked it up, to give them readily
identifiable spots where they need to change things.

Others?

--karl

Makey@Logicon.COM (Jeff Makey) (07/21/90)

I edit my .cf file directly with my favorite text editor.

I provide sendmail support to only one host other than my own, but if
my responsibilities (real or imagined) in this area were to increase,
I would adapt Larry Wall's "Configure" script (it comes with the "rn"
distribution) to the job.

                           :: Jeff Makey

Department of Tautological Pleonasms and Superfluous Redundancies Department
    Disclaimer: All opinions are strictly those of the author.
    Internet: Makey@Logicon.COM    UUCP: {nosc,ucsd}!logicon.com!Makey

bin@primate.wisc.edu (Brain in Neutral) (07/21/90)

I edit mine directly.  But then, I only have to maintain three of them
(at the moment), so it's not too onerous a task.

Paul DuBois
dubois@primate.wisc.edu

Guy Middleton <gamiddleton@watmath.waterloo.edu> (07/21/90)

> For the sake of my curiosity, mostly, I'd be interested in hearing how
> others maintain sendmail.cf.

I use m4.  I run about 100 machines from the same .cf source; m4 conditionals
are set for each machine automatically, as part of our distribution
mechanism.  It works, no problem.

 -Guy

ANKGC@CUNYVM (Anil Khullar) (07/21/90)

Till last week, I used emacs and globally changed hostname on the
boilerplate that I have. This week (moving to 5.64) I am having
second thoughts.

As we started mixing services (i.e  decnet hosts, internet hosts,
uucp host and a mix of workstations) I am having second thoughts.

It seems to me that In our case (a CUNY College) easiest was to
use DRcunyvm.cuny.edu, but unfortunately if the CUNYVM is down, then
some of our hosts pile up many messages. Hence I have to look more
carefully at the M4 method 8-(

I am waiting to see what other people are using.

-anil

pst@ack.Stanford.EDU (Paul Traina) (07/21/90)

M4 works just fine for me.  I took the plunge and switched over to the
new files distributed with 5.61,  made some additions to the prototype
file, and now generate .cf files for a number of different machines
ranging from uucp gateways, MX translators, and internet gateways
(for a net without IP fowarding) all with those little .mc files.

One thing I will note is that it's just about impossible to get
sendmail (as configured this way) to work on a uucp only machine.
But then again, I've got a .cf script I edit directly for that.  Foo.

Paul
--
Buenas noches Sen~ores y Sen~oras.  Bienvenidos.  La prima preguntas es:
?Qu'e es m'as macho, pineapple o knife?  Si!  Correcto!  Pineapple es m'as
macho que knife.  La segunda pregunta: ?Qu'e es m'as macho, lightbulb o
schoolbus?  No! Lo siento.  Schoolbus es m'as macho que lightbulb.

dwatts@ki.UUCP (Dan Watts) (07/22/90)

In article <PST.90Jul20165609@ack.Stanford.EDU> pst@ack.Stanford.EDU (Paul Traina) writes:
>M4 works just fine for me. 

What is this 'M4' that people have been talking about?  I'm rather new
to managing our Unix systems and I've been using vi on all our cf's.
Our setup is strictly UUCP at the moment running on SGI, Sun 4, and
IBM RS/6000's.
-- 
#####################################################################
# CompuServe: >INTERNET:uunet.UU.NET!ki!dwatts    Dan Watts         #
# UUCP      : ...!uunet!ki!dwatts                 Ki Research, Inc. #
############### New Dimensions In Network Connectivity ##############

mdb@ESD.3Com.COM (Mark D. Baushke) (07/23/90)

I use m4 for all machines which are running 5.64+IDA-1.3.2. I use
uxc.cso.uiuc.edu:/mail/sendmail/ida/cf/Sendmail.mc as my template.
(However, the mailertable, domaintable, and uucpxtable are edited and
the pathtable generated.)

I also use an edited boiler-plate .cf file which for hosts running
with the SunOS sendmail (these are being replaced by 5.64+IDA-1.3.2
as I have the time).
-- 
Mark D. Baushke
mdb@ESD.3Com.COM

scs@iti.org (Steve Simmons) (07/23/90)

karl_kleinpaste@cis.ohio-state.edu writes:

>I'd be interested in hearing how others maintain sendmail.cf.

>[a] m4
>[b] ease
>[c] editing
>[d] ???

I suppose I've have to answer [a], but the real answer is IDA.  It
happens to use m4, but provides reasonable docs and prebuilt macros
to build the durned file for you.  I built some subsidiary files
call master.cf and slave.cf; our slave systems consist of only
their name definitions and an include of the slave.cf.

For the curious, IDA is available at most major archive sites
including uunet.uu.net in the mail subdir.

Craig_Everhart@TRANSARC.COM (07/24/90)

Back when I was mail admin for andrew.cmu.edu with 8000 users, we had
600 workstations all enqueueing mail for four PO machines.  They
enqueued using shared files&directories in AFS.  The PO machines were
the only ones that ran sendmail.  The .cf files were identical, and in
fact were generated from a configure-mail-system process that compiled
and installed dozens and dozens of scripts and things.  The
configuration process was driven from a program that you told about your
installation, what features you wanted or didn't want, how many PO
servers you had, how many AFS mail queues you had and what their names
were, and the like.  One of the fanciest features was doing load
balancing on the PO machines, crudely compensating for different speeds
of different PO machines by assigning different total amounts of work to
the different machines.

So, the short answer is that the sendmail.cf files were generated not by
hand, but by yet another configuration process other than m4 or ease or
IDA.  Not that it works that well for non-Internet sites, though.

		Craig

towfiq@interlan.Interlan.COM (Mark Towfigh) (07/24/90)

In article <KARL.90Jul20104100@giza.cis.ohio-state.edu>
karl_kleinpaste@cis.ohio-state.edu writes:

   For the sake of my curiosity, mostly, I'd be interested in hearing how
   others maintain sendmail.cf.

   [a] m4
   [b] ease
   [c] editing
   [d] ???

(Warning: my responses may be specific to OS/2, but I don't think they
are in this case.  I have ported SENDMAIL 5.61 to this beast, and have
hacked CF files there, too.)

I used to think I could use option [c] exclusively.  This was when our
SENDMAIL was only going to have one CF file, that each administrator
would edit for the site in question.  Then we got a way that the CF
file could remain untouched, by moving variables to a TCP/IP
configuration file (but that's not really important).  At the same
time, we realized that we needed two flavors of CF, one for a
well-connected Internet host, and one that would relay unresolvable
mail to a well-connected host.  And then we needed two more CF files,
for hosts which had a Netware-specific delivery agent.  That's four
files altogether, with lots of similarities between them, and I was
quickly going crazy trying to edit them.

So I took a look back at the CF/CF and CF/M4 directories on the 5.61
distribution, and I read this in the README:

Note:

	IT IS STRONGLY SUGGESTED THAT YOU, THE SYSTEM MANAGER,
	CONTINUE TO MAINTAIN CONFIGURATION FILES BY USING THIS
	m4(1) METHOD.  TRYING TO MAINTAIN MULTIPLE .CF FILES
	ON SEPARATE MACHINES WILL LEAD TO INSANITY.

I realized I was becoming insane, as a change in one file often
necessitated a change in all of them, but I didn't always remember
that.  Also, I had no overview of how the CF file was layed out, or
what parts could be omitted.

What did I do?  I ported m4 to OS/2 (took about 20 minutes), and
started using it to build CF files.  Now I am happy.

   I don't care much for m4 (it has its purposes, yes, but I don't think
   this is one of them), and I never learned ease.  So I edit .cf
   directly.  Mine is heavily commented on what it's doing where and for
   what reason; and it includes hordes of "CONFIG HERE" comments for the
   sake of others who have picked it up, to give them readily
   identifiable spots where they need to change things.

I agree that m4 (a macro pre-processor, for those who don't know) may
not be the best, but it sure beats editing.  And that "CONFIG HERE"
convention you use, which I used extensively as well, does not give
one as much of a top-down view of what the CF file looks like as a
simple m4 command.  You see, what you could do is take your CF file,
m4-ize it, and generate a CF file for each configuration you want,
including the vanilla "CONFIG HERE" one.  Once you move beyond
maintaining one CF file (and I think even multiple versions of a CF
file constitute more than one CF file), it is not worth the hassle to
just edit.

That's my $0.023 Canadian.
--
Mark Towfigh, Racal InterLan, Inc.                 towfiq@interlan.Interlan.COM
W: (508) 263-9929 H: (617) 488-2818                       uunet!interlan!towfiq

  "The Earth is but One Country, and Mankind its Citizens" -- Baha'u'llah

Anselmo-Ed@cs.yale.edu (Ed Anselmo) (07/24/90)

The local sendmail folks at Yale have moved much of configuration
stuff out of the sendmail.cf file and into files, e.g.:

# All nicknames for this host
Fw/usr/local/lib/net_database/this_host %s

# Login names on this machine
FL/usr/local/lib/net_database/login_names %s

# Top domains in the TCP world
FD/usr/local/lib/net_database/tcp_domains %s

# Local TCP hosts
FT/usr/local/lib/net_database/yale_tcp_hosts %s

# Database person and mailing list names
FP/usr/local/lib/net_database/dbnames %s

# Ambiguous Database person and mailing list names
FI/usr/local/lib/net_database/ambignames %s

and the files in this net_database directory are hooked into update
scripts which are run out of cron.  And all this stuff is tied into
"udb", the User DataBase, which keeps track of users, uids, accounts,
mailboxes, and mailing lists (/usr/lib/aliases is never edited
directly).

CS runs with 3 versions of sendmail.cf, one for a BITNET machine, one
for a UUCP machine, and one for "all the rest" (generic sendmail.cf
for hosts with resolver capability).
--
Ed Anselmo   anselmo-ed@cs.yale.edu   {harvard,decvax}!yale!anselmo-ed

dwatts@ki.UUCP (Dan Watts) (07/24/90)

Would someone be willing to post an example m4 file that they really
use to show how m4 can be used?  My system here doesn't have the
sendmail source, just binaries, so I don't have any documentation
on sendmail other than the man page.  No pointers on how to use m4.
The m4 man page does tell you how to use it, but a complete working
program (script?) would be much more usefull.
-- 
#####################################################################
# CompuServe: >INTERNET:uunet.UU.NET!ki!dwatts    Dan Watts         #
# UUCP      : ...!uunet!ki!dwatts                 Ki Research, Inc. #
############### New Dimensions In Network Connectivity ##############

wicinski@sgi.com (wicinski ) (07/25/90)

>karl_kleinpaste@cis.ohio-state.edu writes:
>
>>I'd be interested in hearing how others maintain sendmail.cf.

root# rm /usr/lib/sendmail*

-tim

esj@wasp.eng.ufl.edu (Eric S. Johnson) (07/25/90)

In article <KARL.90Jul20104100@giza.cis.ohio-state.edu> karl_kleinpaste@cis.ohio-state.edu writes:
>For the sake of my curiosity, mostly, I'd be interested in hearing how
>others maintain sendmail.cf.
>

I maintain sendmail.cf's on a large number of various machines/os's. 
What do is use a shell script which I put together which has as flags
a bunch of options. Key options are the domain under ufl.edu, the 
hostname, if the host is the "domain head" I.E. should accept and send 
mail for domain.ufl.edu as well as hostname.domainname.ufl.edu., if the 
host runs a MX sendmail version (ill get em all running 5.6X later ;-),
if the host is a ultrix decnet gateway, etc.

This shell script simply runs a bunch of sed's on a generic.cf which 
has various options commented out untill the sed removes the comment
headers on the lines. Example: The no-nameserver hosts hosts forward 
their mail to be final delivered by a host which digs nameservers.


#NONSR$*<@$+>$*		$#tcp$@$I$:$1<@$2>$3		user@host
#NSR$*<@$+>$*		$#tcp$@$2$:$1<@$2>$3		user@host

$I is a nameserver groking host and one of these two lines gets 
un-commented in ruleset 0.

This works with 90% of the machines. Real strangeness (and UUCP stuff ;-( )
gets hand edited.

Ej