home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / ease-3.5 / CONVERTING next >
Encoding:
Text File  |  1991-10-15  |  5.0 KB  |  191 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.     A/UX
  38.         => cfc -i -CUNI
  39.  
  40.     CGI IRIS
  41.         => cfc -i -C FKSVN  
  42.  
  43.     smail
  44.  
  45.         => cfc -C DUET
  46.  
  47. Step 2.  Convert the ease file to cf: 
  48.  
  49.     % et <sendmail.ease >sendmail.cf
  50.  
  51.     Look at the errors and warnings.
  52.  
  53.     Most of these errors can be eliminated by using the right
  54.     flags on cfc. Make sure that you specify all of the
  55.     classes (using the -C flag ) that you need, which generate
  56.     the matching field definitions for any_in_? fields.
  57.     Then repeat the cf-> ease translation with the necessary
  58.     -C XYZ flags.
  59.  
  60.     The remaining errors are either warnings or mistakes
  61.     in the translation. 
  62.     Let's look at some examples:
  63.  
  64.         line 1598: Warning: Ruleset not defined: RULESET_12
  65.  
  66.     This says there is a line that has
  67.         RULESET_12 = ruleset 12;
  68.  
  69.     Comment it out if you wish.
  70.  
  71.  
  72.     case 2)
  73.  
  74.         line 1598: Warning: Macro not defined: Y
  75.     or
  76.         line 1598: Warning: Class not defined: Y
  77.  
  78.     This is just a warning and is probably okay. There may be a rule that 
  79.     does different actions if the macro is set or not. Example:
  80.  
  81.     if ( one_or_more )    /* add local domain */
  82.         next (concat ("$1<@",ifset (Y, "${Y}", "${m_sitename}"))>);
  83.  
  84.     If this bothers you, rewrite to rule to not need the Y macro:
  85.  
  86.     if ( one_or_more )    /* add local domain */
  87.         next ("$1<@${m_sitename}"))>);
  88.  
  89.     Do not define them, even to define them to be nothing!
  90.     An empty string is still defined, and may break your sendmail rules.
  91.  
  92.     case 3)
  93.  
  94.         line 88 near ";": Warning: Appending to previously defined class T.
  95.     This is okay. Sendmail allows you to define a class over several lines.
  96.     combine them into one line if you wish.
  97.  
  98.     case 4)
  99.  
  100.     line 1485: Warning: Mailer not defined: ERROR
  101.  
  102.     Ease treats upper and lower case letters as different.
  103.     Sendmail does not. Change the case to be consistent
  104.  
  105.     case 5)
  106.  
  107.     warning: Unknown option 'M' on line 387
  108.     
  109.     cfc found an unusual option. It tries to convert it into
  110.         an asm("...') string.
  111.  
  112.  
  113.     .....
  114.     So look at the warnings and errors, and repeat step 1 until you 
  115.     feel comfortable with the change.
  116.  
  117.     If you can't get cfc/ease to accept the new syntax, use the
  118.     asm(" ") construct to work around it and report the bugs.
  119.  
  120. Step 3. Verify the ease output matches the original sendmail
  121.  
  122.     You can use  "make test_conversion" it you wish
  123.  
  124.     At this point, you should verify that the ease output is identical to
  125.     the original sendmail.cf file. Use the script cfdiff to
  126.     compare the original sendmail.cf file with the ease output file.
  127.  
  128.     That is, if your original sendmail file is /etc/sendmail.cf,
  129.     and the new one is ./sendmail.cf, do a
  130.  
  131.      set path = ( $cwd/bin $path );rehash;cfdiff /etc/sendmail.cf ./sendmail.cf
  132.  
  133.     You may see some differences. Examples:
  134.  
  135.     < Odbackground
  136.     ---
  137.     > Odb
  138.  
  139.     Okay: ease outputs the full name instead of the abbreviation
  140.  
  141.     < Muucp,    P=/usr/bin/uux, F=sDFhuU, S=13, R=23, M=100000,
  142.     <     A=uux - $h!rmail ($u)
  143.     ---
  144.     > Muucp, P=/usr/bin/uux, F=sDFhuU, S=13, R=23, M=100000, A=uux - $h!rmail ($u)
  145.  
  146.     Okay: this is on two lines instead of one.
  147.  
  148.     < CTuucp UUCP arpa ARPA bitnet BITNET csnet CSNET mailnet MAILNET decnet DECNET rscs RSCS
  149.     ---
  150.     > CTuucp UUCP arpa ARPA bitnet BITNET csnet CSNET mailnet
  151.     > CTMAILNET decnet DECNET rscs RSCS
  152.     
  153.     OKAY: this is just a different number of lines.
  154.  
  155.  
  156.     Differences in the spaces in the rules)
  157.     The syntax of sendmail specifies that there are tabs between the 
  158.     left hand side and the right hand side, and a tab between the right 
  159.     hand side and the comments.
  160.  
  161.     Any spaces in the middle of the rules are cosmetic. Ignore differences.
  162.  
  163.     If there is any other difference, 
  164.     please send me a bug report, and see if you can make changes to your
  165.     ease input file to match the original file. You may need the asm("")
  166.     command.
  167.  
  168.     If your diff program has the -w option, you can ignore spaces in the
  169.     cf files. Occasionally ease inserts some extra spaces. Or the
  170.     original sendmail file has extra spaces. (e.g. SunOS).
  171.     See the script cfdiff.
  172.  
  173. Step 4. Once you have the ease file in good form, put it under sccs
  174.     control, and put the version number (%W% in the V macro
  175.     definition, so the "Received-by" header line reflects the revision.)
  176.  
  177. You are now ready to debug your sendmail file.
  178. See the file TESTING
  179. ============================================================================
  180.  
  181. If you find these programs useful, or if you have suggestions or changes,
  182. please drop me a line.
  183.  
  184.     Bruce Barnett
  185.     General Electric
  186.     Corporate Research and Development
  187.     P. O. Box 8, 1 River Road
  188.     Schenectady, NY 12302
  189.  
  190.     barnett@crdgw1.ge.com
  191.