home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / conf / test / chan.c next >
Encoding:
C/C++ Source or Header  |  1986-02-01  |  3.0 KB  |  90 lines

  1. #include "util.h"
  2. #include "mmdf.h"
  3. #include "ch.h"
  4. #include "dm.h"
  5.  
  6. char    *ch_dflnam = "local";
  7.  
  8. Alias    *al_list = (Alias *)0;
  9.  
  10. /*******************  MAIL IDENTIFIER  SELECTION  ***********************/
  11.  
  12. /*
  13.  *    The global mid_enable controls the use of an alternate
  14.  *    mail name system refered to as Mail-Ids.  When mail-ids are
  15.  *    in use, login-ids and mail-ids are nolong bound to one another
  16.  *    by the system account database, and are bound only by mapping
  17.  *    tables.  The tables "mailids" and "users" will always be present
  18.  *    though they may not be used.  "mailids" maps a mailid to a
  19.  *    system account.  The table "users" maps a username to a mailid.
  20.  */
  21.  
  22. int    mid_enable = 0;
  23.  
  24. Table
  25.     tb_mailids =        /* Used in getpwmid() */
  26. {
  27.     "mailids", "Mail-ID to Username Mappings", "mailids", 0, 0l
  28. },
  29.     tb_users =        /* Used in getmailid() */
  30. {
  31.     "users", "Username to Mail-ID Mappings", "users", 0, 0l
  32. };
  33.  
  34.  
  35. /*
  36.  *  The following set of structures provides a complete list of channels
  37.  *  known to MMDF.
  38.  *
  39.  *  It is followed by two arrays that list the channels in useful orders.
  40.  *
  41.  *  ch_tbsrch[] is a full list, of all known channels, and is primarily
  42.  *  used to guide the ch_table routines when treating the hostname space as
  43.  *  flat (linear).  It also is used by lnk_submit, for sorting the address
  44.  *  linked-list.
  45.  *
  46.  *  THE ORDER IS CRITICAL.  A hostname may appear in several tables, but
  47.  *  the first table checked will cause the hit.
  48.  *
  49.  *  One nice aspect of this is that, for example, you can have a standard
  50.  *  arpanet host table, but have some of its hosts actually get mail on a
  51.  *  different channel.  Simply place that table's entry earlier in the
  52.  *  ch_tbsrch[] list.
  53.  *
  54.  *  ch_exsrch[] is a list of channels that are processed by Deliver
  55.  *  (usually just when it does standard, default daemon processing).
  56.  *  Therefore, it need contain only those channels that are active and are
  57.  *  to be processed by the daemon.  Again, order is important.  Channels
  58.  *  are processed in the order listed.  This means that, typically, you
  59.  *  want ch_sloc to be first, unless you have the strange view that foreign
  60.  *  mail is more important than local...
  61.  */
  62.  
  63. LOCVAR Chan *chsrch[NUMCHANS+1] = {    /* Order chan tables searched */
  64.     (Chan *) 0
  65. };
  66. Chan **ch_tbsrch = chsrch;
  67.  
  68. LOCVAR Chan *exsrch[NUMCHANS+1] = {    /* Order of active chan execution */
  69.     (Chan *) 0
  70. };
  71. Chan **ch_exsrch = exsrch;
  72. Chan * ch_ptrlist[NUMCHANS + 1];  /* can hold pointers to chans */
  73.  
  74. LOCVAR Table *tblist[NUMTABLES+1] = {    /* All known tables */
  75.     (Table *) 0
  76. };
  77. Table **tb_list = tblist;
  78.  
  79. LOCVAR Domain *dmlist[NUMDOMAINS+1];
  80. Domain **dm_list = dmlist;         /* all known domains */
  81.  
  82. int     tb_maxtables = NUMTABLES; /* max number of slots */
  83. int     ch_maxchans = NUMCHANS;   /* max number of slots */
  84. int     dm_maxtables = NUMDOMAINS; /* max number of slots */
  85.  
  86. /* These next entries should reflect the ACTUAL number of slots in use  */
  87. int     tb_numtables = 0;         /* actual number of tables */
  88. int     ch_numchans = 0;          /* actual number of channels */
  89. int     dm_numtables = 0;         /* actual number of domains */
  90.