home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2843 / CONVERTING next >
Text File  |  1991-02-23  |  3KB  |  110 lines

  1. =====================================================================
  2.     Converting a sendmail file into ease
  3.  
  4.  
  5. Step 1.  Use cfc to convert the sendmail file into ease.
  6.     You may want to use "make convert" in the top Makefile
  7.  
  8.     As a start, use the following arguments to cfc 
  9.  
  10.     SunOS 4.0, /usr/lib/sendmail.subsidiary.cf
  11.         => cfc -s -C V < /usr/lib/sendmail.subsidiary.cf>sendmail.ease
  12.  
  13.     SunOS 4.0, /usr/lib/sendmail.main.cf
  14.  
  15.         => cfc -s < /usr/lib/sendmail.main.cf>sendmail.ease
  16.  
  17.  
  18.     Ultrix 3.0: 
  19.  
  20.         => cfc -d -C SDIZFN </etc/sendmail.cf >sendmail.ease
  21.  
  22.     IDA sendmail
  23.  
  24.         => cfc -i
  25.  
  26.     4.2 sendmail
  27.  
  28.         => cfc -c
  29.  
  30.     4.3 sendmail
  31.  
  32.         => cdc -u
  33.  
  34.     HP/UX
  35.         => cfc -i -CGUS
  36.  
  37.  
  38. Step 2.  Convert the ease file to cf: 
  39.  
  40.     % et <sendmail.ease >sendmail.cf
  41.  
  42.     Look at the errors and warnings.
  43.  
  44.     Most of these errors can be eliminated by using the right
  45.     flags on cfc. Make sure that you specify all of the
  46.     classes (using the -C flag ) that you need, which generate
  47.     the matching field definitions for any_in_? fields.
  48.     Then repeat the cf-> ease translation with the necessary
  49.     -C XYZ flags.
  50.  
  51.     The remaining errors are either warnings or mistakes
  52.     in the translation. NOTE: - some configuration files use macros 
  53.     that are not defined. For instance, Sun's sendmail.main.cf has 
  54.     an undefined D macro. Ultrix has several undefined macros, that if
  55.     you define them, cause your sendmail to exhibit change behavior.
  56.     These are warnings, and are perfectly fine. If you want to
  57.     you can define the missing rulesets. Don't define the missing
  58.     macros unless you examine the sendmail rules and see what happens with
  59.     the change.
  60.  
  61.     So look at the warnings and errors, and repeat step 1 until you 
  62.     feel comfortable with the change.
  63.  
  64.     If you can't get cfc/ease to accept the new syntax, use the
  65.     asm(" ") construct to work around it and report the bugs.
  66.  
  67. Step 3. Verify the ease output matches the original sendmail
  68.  
  69.     You can use  "make test_conversion" it you wish
  70.  
  71.     At this point, you should verify that the ease output is identical to
  72.     the original sendmail.cf file. Use the script cfdiff to
  73.     compare the original sendmail.cf file with the ease output file.
  74.  
  75.     That is, if your original sendmail file is /etc/sendmail.cf,
  76.     and the new one is ./sendmail.cf, do a
  77.  
  78.      set path = ( $cwd/bin $path );rehash;cfdiff /etc/sendmail.cf ./sendmail.cf
  79.  
  80.     You will see some differences in lines that have been split into
  81.     two lines, and the "Ob" option is converted into the more
  82.     verbose "Obackground" option. If there is any other difference, 
  83.     please send me a bug report, and see if you can make changes to your
  84.     ease input file to match the original file. You may need the asm("")
  85.     command.
  86.  
  87.     If your diff program has the -w option, you can ignore spaces in the
  88.     cf files. Occasionally ease inserts some extra spaces. Or the
  89.     original sendmail file has extra spaces. (e.g. SunOS).
  90.     See the script cfdiff.
  91.  
  92. Step 4. Once you have the ease file in good form, put it under sccs
  93.     control, and put the version number (%W% in the V macro
  94.     definition, so the "Received-by" header line reflects the revision.)
  95.  
  96. You are now ready to debug your sendmail file.
  97. See the file TESTING
  98. ============================================================================
  99.  
  100. If you find these programs useful, or if you have suggestions or changes,
  101. please drop me a line.
  102.  
  103.     Bruce Barnett
  104.     General Electric
  105.     Corporate Research and Development
  106.     P. O. Box 8, 1 River Road
  107.     Schenectady, NY 12302
  108.  
  109.     barnett@crdgw1.ge.com
  110.