Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!interlan.InterLan.COM!interlan.interlan.com!towfiq From: towfiq@interlan.Interlan.COM (Mark Towfigh) Newsgroups: comp.mail.sendmail Subject: Re: How do you maintain your .cf? Message-ID: Date: 23 Jul 90 21:26:30 GMT References: Organization: Racal InterLan, Inc., Boxborough, MA (1-800-LAN-TALK) Lines: 69 In-reply-to: karl_kleinpaste@cis.ohio-state.edu's message of 20 Jul 90 14:41:00 GMT In article 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