procmail
[Top] [All Lists]

Re: Reverse engineering sendmail.cf (was Re: Using alternative passwd files?)

2002-07-10 07:01:03
On Tue, 09 Jul 2002 19:03:31 -0500, Aaron Schrab wrote:

At 23:27 +0000 09 Jul 2002, Lyn St George <lyn(_at_)zolotek(_dot_)net> wrote:
PS. does anyone know how to generate a sendmail.mc file 
from a sendmail.cf (ie "reverse engineeer")?

There isn't a way to do it automatically, but if the .cf file hasn't
been modified much beyond what was generated via m4 it's not too bad.

First, start with the same version of sendmail as was originally used to
build the original .cf file (I'll refer to this as old.cf from here),
even if that version has horrible security holes that make it totally
unuseable.  You don't actually need to run the sendmail from this
version, or even build it.  All that we're interested in here is the cf
directory from the distribution.  If you don't know what version was
used, look for a line in old.cf that starts with "DZ".

Next, look for lines in old.cf that contain "$Id:".  These identify
files that were used when building old.cf, mostly by being referred to
by OSTYPE, MAILER, or FEATURE macros in the old.mc file.  Use these to
build a basic new.mc file.  For instance if old .cf contains the line:

#####  $Id: use_cw_file.m4,v 8.9 1999/02/07 07:26:13 gshapiro Exp $  #####

you should add FEATURE(use_cw_file) to new.mc.  You can ignore lines
that refer to files in the cf/m4 directory, they're included
automatically.

FTR, my sendmail.cf was built by RedHat and used @(#) instead 
of $Id:.

Now comes the fun part.  Build new.cf and compare it to old.cf with
diff.  Make changes to new.mc based on the differences; this will
consist of mostly adding define(...) statements and additional
parameters for the FEATURE statements, the cf/README file is essential
here.  Repeat this paragraph until you're satisfied that the resulting
new.cf is close enough to old.cf.

Thanks very much for all that - I've now got it done well
enough to see what the input was.

Sorry that this is OT, but could you please correct me on
this macro in sendmail.mc:
MODIFY_MAILER_LOCAL(`LOCAL', `-w')dnl

I was under the impression that this should turn off etc/passwd
lookups for Sendmail, but it doesn't ... (v 8.12.5)


-- 
Aaron Schrab     aaron(_at_)schrab(_dot_)com      http://www.schrab.com/aaron/
As I look across the web, what I find is this vast wasteland that
makes television almost attractive.  -- Clifford Stoll

-
Cheers
Lyn St George
+---------------------------------------------------------------------------------
+ http://www.zolotek.net .. eCommerce hosting, consulting
+ http://www.os2docs.org .. some 'How To' stuff ...
+----------------------------------------------------------------------------------

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Reverse engineering sendmail.cf (was Re: Using alternative passwd files?), Lyn St George <=