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

  1.     Testing Sendmail Configuration files
  2.  
  3. I have written some shell scripts called "showhow" and "showwhere"
  4. that can be used to test your sendmail configuration file.
  5.  
  6. You create an input file with a set of addresses to test.  You run the
  7. script and it generates an output file, showing the results of each
  8. address. When I make a major change to a sendmail file, I run the test
  9. suite on it, comparing the results with the last time I tested the
  10. address. I can use this to see in any of the 400 addresses in my test
  11. suite will behave differently with the new configuration file. My
  12. addresses won't help you, so you have to be creative and add your own.
  13. Here are some guidelines.
  14.  
  15. The format or the input file debug.in is:
  16.         rulesets    address
  17.     or
  18.         rulesets        address comment
  19.  
  20. Use the second if ruleset does not start with a '0'. I'll explain this later.
  21.  
  22.     Example:
  23.  
  24.         0    user@some.do.main
  25.         0    site!user%site2@site3.com
  26.         22,4    user@localsite    Sender_via_UUCP
  27.  
  28. where 22 is a mailer rewrite ruleset for a mailer (i.e. UUCP).
  29.  
  30. Ruleset 0 must be avoided when testing the re-write rules for
  31. mailers because ruleset 0 outputs a triple (user, host, mailer), 
  32. and only one part (user) passed to the mailers.
  33.  
  34. The makefile generates a file in tbl(1) format that 
  35. lists the following:
  36.  
  37.     ruleset        address      mailer hostname user
  38.  
  39. Showing the resolved triplet for each address
  40.  
  41. I think the scripts I have will work on IDA, SunOS 4.0, and Ultrix 3.0
  42. sendmail executables. The problem is that older sendmails output debug
  43. info using ^V, etc. instead of $#.  The script is set up to work with
  44. Ultrix 3.0.  The sendmail with SunOS used a different set of
  45. characters to indicate the results of a rule (^W instead of ^V).
  46.  
  47. I have set up a makefile in the debug directory that you can use
  48.     
  49.     make     - tests your sendmail file against a known good file
  50.         good.out. Once you have a working set of rules, copy
  51.         debug.out to good.out
  52.  
  53.     make report     will print a table of all of the addresses                resolved to the address, mailer, and hostname
  54.  
  55.