home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / autoalias.shar / README < prev   
Text File  |  1993-09-20  |  2KB  |  47 lines

  1. This archive contains stuff related to sendmail aliases.
  2.  
  3. The nameptx program, used by the addaliases script, is based on
  4. nptx.c from the smail 2.5 source distribution.  The script generates
  5. the /etc/aliases file and automatically makes full name aliases
  6. from the names in the YP passwd file.  It's smart enough to prevent
  7. someone's last name from overriding someone else's user ID, but it
  8. will still allow some ambiguous aliases through.
  9.  
  10. E.g. If smi01 is Tim Smith and smith is Tom Smith, it won't alias
  11. smith to smi01, but it will alias t.smith to smi01 (even though it
  12. could just as well apply to smith, i.e. Tom Smith.)  If there is
  13. no user ID smith, then smith will be aliased to the first user ID
  14. alphabetically (actually by ASCII sort), whose owner's last name
  15. is Smith.
  16.  
  17. Files included are:
  18.  
  19. README          - You're looking at it
  20. addaliases      - script to generate new /etc/aliases
  21. aliases.sample  - sample /etc/aliases file, if you have none
  22. nameptx.c       - source code for /usr/local/bin/nameptx
  23.  
  24. The addaliases script will have to be customized for your site.
  25. Edit the definitions at the start of the script, as appropriate.
  26.  
  27. The nameptx program should compile in a straightforward manner on
  28. most systems.  (Usually, "cc -O -o nameptx nameptx.c" will do it.)
  29. Read the comments for more details.
  30.  
  31. Use the sample aliases file for ideas on how to set up your own
  32. file.
  33.  
  34. To get addaliases to delete ambiguous records altogether, replace
  35. the lines:
  36.  
  37. sort | sort -mu +0 -1        |    # sort 1st by whole record,
  38.                     # so priority code recognized
  39.  
  40. with:
  41.  
  42. # Remove all ambiguous/duplicate name permutations
  43. sort -u | awk  '$1 != key && rec != "" { print rec }
  44.         $1 == key { rec = "" }
  45.         $1 != key { key = $1; rec = $0 }
  46.         END { if (rec != "") print rec }'    |
  47.