procmail
[Top] [All Lists]

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

2002-07-09 17:14:55
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.


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.

-- 
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
_______________________________________________
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>