home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magic 1995 #1 / CDM_5.ISO / shell / utils / imail / imdev160.arj / IM_STRUC.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1994-12-15  |  35.5 KB  |  652 lines

  1.  
  2. {* *
  3.  * *
  4.  * *   I M A I L   D E F I N I T I O N S   A N D   S T R U C T U R E S
  5.  * *
  6.  * *}
  7.  
  8. {*
  9.  *  Definitions and structures for IMAIL 1.60
  10.  *
  11.  *  Copyright (C) 1992-1994 by Andreas Klein. All rights reserved.
  12.  *
  13.  *  The contents of this file are subject to change without notice!
  14.  *  Fields marked reserved may NOT be used.
  15.  *
  16.  *  It is an ERROR to write to any of the configuration files
  17.  *  while IMAIL (or any of its companion programs) is running.
  18.  * 
  19.  *}
  20.  
  21.  
  22. {=========================================================================}
  23. {  CONSTANT DEFINITIONS                                                   }
  24. {=========================================================================}
  25.  
  26. const IM_MAJ_VERSION     = 1;
  27.       IM_MIN_VERSION     = 60;
  28.       IM_PRD_CODE        = $4B;
  29.       STR_MAJ_VERSION    = 4;
  30.       STR_MIN_VERSION    = 01;
  31.  
  32. {-------------------------------------------------------------------------}
  33. {  Internal limits                                                        }
  34. {-------------------------------------------------------------------------}
  35.  
  36. const  MAXAKAS     = 16;                   { Max # of addresses           }
  37.        MAXPACKERS  = 11;                   { Max # of packer def          }
  38.        MAXEXPORT   = 200;                  { Max export defs              }
  39.        MAXVIA      = 40;                   { max nodes packed via         }
  40.        MAXPACK     = 32;                   { max default pack cmd         }
  41.        MAXEXCEPT   = 10;                   { max EXCEPT nodes             }
  42.        MAXFWDLINK  = 15;                   { max fwd link structs         }
  43.        MAXNOIMPT   = 20;                   { max # of names               }
  44.        ZONESDOM    = 10;                   { zones per domain entry       }
  45.        MAXTAG      = 51;                   { Max length of an areatag     }
  46.        MAXNAME     = 37;                   { Max length of a namefield    }
  47.        MAXPACKNAME = 50;                   { Max length of a packer entry }
  48.        MAXORIGIN   = 64;                   { Max length of an origin      }
  49.  
  50.        MAXPATH     = 80;                   { Max length of path           }
  51.        MAXFILE     = 11;                   { Max length of file           }
  52.        MAXEXT      = 3;                    { Max length of extension      }
  53.        MAXFNAME    = MAXFILE+MAXEXT;       { Max length of a filename     }
  54.        MAXDOMAIN   = 21;                   { Max length of a domainname   }
  55.        MAXPWD      = 21;                   { Max length of a password     }
  56.  
  57. {-------------------------------------------------------------------------}
  58. {  Log Style Definitions                                                  }
  59. {-------------------------------------------------------------------------}
  60.  
  61. const  LOG_NORMAL  = 0;                    { normal log level             }
  62.        LOG_VERBOSE = 1;                    { verbose log level            }
  63.  
  64. {-------------------------------------------------------------------------}
  65. {  Environment Type                                                       }
  66. {-------------------------------------------------------------------------}
  67.  
  68. const  ENV_FRODO   = 0;                    { FrontDoor/D'Bridge           }
  69.        ENV_BINK    = 1;                    { Binkley                      }
  70.        ENV_IM      = 2;                    { Intermail                    }
  71.        ENV_DB      = 3;                    { D'Bridge                     }
  72.        ENV_POP     = 4;                    { Portal of Power              }
  73.  
  74. {-------------------------------------------------------------------------}
  75. {  BBS Environment Type                                                   }
  76. {-------------------------------------------------------------------------}
  77.  
  78. const  BBS_RA2     = 0;                    { Remote Access 2.0            }
  79.        BBS_OTHER   = 1;                    { Other                        }
  80.  
  81. {-------------------------------------------------------------------------}
  82. {  File Attach Message Status (used in IMAIL.ND)                          }
  83. {-------------------------------------------------------------------------}
  84.  
  85. const  S_NORMAL            = 0;
  86.        S_HOLD              = 1;
  87.        S_CRASH             = 2;
  88.        S_IMMEDIATE         = 3;
  89.        S_DIRECT            = 4;
  90.        S_NORMAL_DIR        = 4;
  91.        S_HOLD_DIR          = 5;
  92.        S_CRASH_DIR         = 6;
  93.        S_IMMEDIATE_DIR     = 7;
  94.  
  95. {-------------------------------------------------------------------------}
  96. {  Message Base Types                                                     }
  97. {-------------------------------------------------------------------------}
  98.  
  99. const  MSGTYPE_SDM    = $01;
  100.        MSGTYPE_SQUISH = $02;
  101.        MSGTYPE_HUDSON = $03;
  102.        MSGTYPE_QBBS   = $03;
  103.        MSGTYPE_JAM    = $04;
  104.        MSGTYPE_PASSTH = $0F;
  105.        MSGTYPE_ECHO   = $80;
  106.        MSGTYPE_LOCAL  = $90;
  107.        MSGTYPE_NET    = $A0;
  108.  
  109. {-------------------------------------------------------------------------}
  110. {  Via Line Switches                                                      }
  111. {-------------------------------------------------------------------------}
  112.  
  113. const VIA_NONE        =   1;
  114.       VIA_EXP         =   2;
  115.       VIA_IMP         =   3;
  116.       VIA_BOTH        =   4;
  117.  
  118. {-------------------------------------------------------------------------}
  119. {  Dupe ring check switches                                               }
  120. {-------------------------------------------------------------------------}
  121.  
  122. const DUPE_NONE       =   0;
  123.       DUPE_WARN       =   1;
  124.       DUPE_ZONE       =   2;
  125.       DUPE_KILL       =   3;
  126.  
  127. {-------------------------------------------------------------------------}
  128. { Circular path detection switches                                        }
  129. {-------------------------------------------------------------------------}
  130.  
  131. const CPD_NONE        =   0;
  132.       CPD_WARN        =   1;
  133.       CPD_KILL        =   2;
  134.  
  135. {-------------------------------------------------------------------------}
  136. {  Unlink Switches                                                        }
  137. {-------------------------------------------------------------------------}
  138.  
  139. const ULNK_NONE       =   0;
  140.       ULNK_PASSTH     =   1;
  141.       ULNK_ALL        =   2;
  142.  
  143. {-------------------------------------------------------------------------}
  144. {  Personal Mail handling                                                 }
  145. {-------------------------------------------------------------------------}
  146.  
  147. const PERSM_NONE      =   0;
  148.       PERSM_LOG       =   1;
  149.       PERSM_MSG       =   2;
  150.       PERSM_COPY      =   3;
  151.  
  152. {-------------------------------------------------------------------------}
  153. {  AreaLink Request Handling                                              }
  154. {-------------------------------------------------------------------------}
  155.  
  156. const KEEP_NONE       =   0;
  157.       KEEP_MSG        =   1;
  158.       KEEP_ALL        =   2;
  159.  
  160. {-------------------------------------------------------------------------}
  161. {  Macros to make life easier                                             }
  162. {-------------------------------------------------------------------------}
  163.  
  164. const BASEMASK          = $0F;
  165.       TYPEMASK          = $F0;
  166.  
  167. {-------------------------------------------------------------------------}
  168. {  Exit Errorlevels & Error Messages                                      }
  169. {-------------------------------------------------------------------------}
  170.  
  171. const  E_NOERR        =   0;               { no error                     }
  172.        E_CRDIR        = 238;               { Error creating directory     }
  173.        E_ELOCK        = 239;               { File locking error           }
  174.        E_AOPEN        = 240;               { Error opening IMAIL.AX       }
  175.        E_BOPEN        = 241;               { Error opening IMAIL.BX       }
  176.        E_NOIDX        = 242;               { Index file missing/corrupt   }
  177.        E_NOCFG        = 243;               { IMAIL.CF not found           }
  178.        E_NOARE        = 244;               { IMAIL.AR not found           }
  179.        E_NONOD        = 245;               { IMAIL.ND not found           }
  180.        E_BADCF        = 246;               { Error in IMAIL.CF            }
  181.        E_BADVR        = 247;               { Bad version of IMAIL.CF      }
  182.        E_EOPEN        = 248;               { Error opening file           }
  183.        E_EREAD        = 249;               { Error reading file           }
  184.        E_EWRIT        = 250;               { Error writing file           }
  185.        E_CMDPR        = 251;               { Command Line Parameter error }
  186.        E_FILNF        = 252;               { File not found               }
  187.        E_MEMRY        = 253;               { Memory Allocation error      }
  188.        E_DISKF        = 254;               { Insufficient disk space      }
  189.        E_UNKWN        = 255;               { Unknown error                }
  190.  
  191.        { === ERRORLEVELs returned by TOSS and/or SCAN === }
  192.  
  193.        T_NOMAIL       = $00;               { no mail processed            }
  194.        T_NET          = $01;               { Net mail                     }
  195.        T_ECHO         = $02;               { Echo mail                    }
  196.        T_BAD          = $04;               { Bad and/or dupe mail         }
  197.        T_QBBS         = $08;               { Qbbs message base changed    }
  198.        T_MSG          = $10;               {.MSG message base changed     }
  199.        T_SQUISH       = $20;               { Squish message base changed  }
  200.        T_PERS         = $40;               { Mail to Sysop received       }
  201.  
  202. {-------------------------------------------------------------------------}
  203. {  Special values for 'ALL'                                               }
  204. {-------------------------------------------------------------------------}
  205.  
  206. const  ZONE_ALL       = 56685;             { Pack for all zones           }
  207.        NET_ALL        = 56685;             { Pack for all nets            }
  208.        NODE_ALL       = 56685;             { Pack for all nodes           }
  209.        POINT_ALL      = 56685;             { Pack for all points          }
  210.  
  211. {-------------------------------------------------------------------------}
  212. {  Capability defintions                                                  }
  213. {-------------------------------------------------------------------------}
  214.  
  215. const  CAP_TYPE2      = $01;               { Can make Type 2 bundles      }
  216.        CAP_STONAGE    = $00;               { No capabalities              }
  217.  
  218.  
  219. {=========================================================================}
  220. {  STRUCTURE DEFINITIONS                                                  }
  221. {=========================================================================}
  222.  
  223. {-------------------------------------------------------------------------}
  224. {  Structs used in IMAIL Configuration files                              }
  225. {-------------------------------------------------------------------------}
  226.  
  227. TYPE
  228.  
  229.    areatag    = array [1..MAXTAG] of char;
  230.  
  231.    origin_typ = array [1..MAXORIGIN] of char;
  232.  
  233.    path_typ   = array [1..MAXPATH] of char;
  234.  
  235.    packer_typ = array [1..MAXPACKNAME] of char;
  236.  
  237.    naddress = record                       { std node number ...          }
  238.      zone  : word;                         { Zone Number                  }
  239.      net   : word;                         { Net Number                   }
  240.      node  : word;                         { Node Number                  }
  241.      point : word;                         { Point Number                 }
  242.    end;
  243.  
  244.    expt = record
  245.      dest   : naddress;
  246.      doexpt : boolean;
  247.    end;
  248.  
  249.    pack_struct = record                       { used in pack routing      }
  250.      dst    : naddress;                       { pack via this node        }
  251.      nodes  : array [1..MAXVIA] of naddress;  { nodes to pack             }
  252.      except : array[1..MAXEXCEPT] of naddress;{ exceptions                }
  253.    end;
  254.  
  255.    eaddress = record
  256.      dstn      : naddress;                 { destination-address          }
  257.      bitfield1 : byte;
  258.    { exp_only  : bit_0;                      export only to this address  }
  259.    { imp_only  : bit_1;                      import only from this address}
  260.    { paused    : bit_2;                      echomail paused              }
  261.    { reserved  : bit_3-7;                    reserved                     }
  262.    end;
  263.  
  264.    fwd_link = record                          { used for forward requests }
  265.      areasfile : array [1..MAXFNAME] of char; { name of areas file        }
  266.      toprogram : array [1..10] of char;       { name of area manager      }
  267.      password  : array [1..MAXPWD] of char;   { area manager password     }
  268.      uplink    : naddress;                    { address of uplink         }
  269.      accessgrp : char;                        { grp to access this list   }
  270.      creategrp : char;                        { grp to create echos       }
  271.      filler    : array[1..10] of char;        { reserved                  }
  272.    end;
  273.  
  274.    dom      = record
  275.      domain    : array [1..MAXDOMAIN] of char;{ name of domain            }
  276.      outbound  : array [1..MAXPATH] of char;  { root outbound path        }
  277.      zones     : array [1..ZONESDOM] of word; { zones in this domain      }
  278.      akas      : array [1..MAXAKAS] of byte;  { =my= akas in this domain  }
  279.    end;
  280.  
  281.    im_stats = record                          { flow statistics           }
  282.      th_day_nr     : longint;                 { this day                  }
  283.      la_day_nr     : longint;                 { last day                  }
  284.      th_week_nr    : longint;                 { this week                 }
  285.      la_week_nr    : longint;                 { last week                 }
  286.      th_month_nr   : longint;                 { this month                }
  287.      la_month_nr   : longint;                 { last month                }
  288.      th_year_nr    : longint;                 { this year                 }
  289.      la_year_nr    : longint;                 { last year                 }
  290.      th_day_size   : longint;                 { this day                  }
  291.      la_day_size   : longint;                 { last day                  }
  292.      th_week_size  : longint;                 { this week                 }
  293.      la_week_size  : longint;                 { last week                 }
  294.      th_month_size : longint;                 { this month                }
  295.      la_month_size : longint;                 { last month                }
  296.      th_year_size  : longint;                 { this year                 }
  297.      la_year_size  : longint;                 { last year                 }
  298.    end;
  299.  
  300. {-------------------------------------------------------------------------}
  301. {  IMAIL.CF Structure                                                     }
  302. {-------------------------------------------------------------------------}
  303.  
  304. TYPE
  305.  
  306. im_config_type = record
  307.   im_ver_maj   : byte;                        { Major Version             }
  308.   im_ver_min   : byte;                        { Minor Version             }
  309.   struct_maj   : byte;                        { Major struct version      }
  310.   struct_min   : byte;                        { Minor struct version      }
  311.   sysop        : array [1..MAXNAME] of char;  { name of sysop             }
  312.   aka          : array [1..MAXAKAS] of naddress; { the AKAs               }
  313.   domains      : array [1..MAXAKAS] of dom;   { domain names & zones      }
  314.   rsvd1        : array [1..10] of char;       { reserved                  }
  315.   netmail      : path_typ;                    { net mail subdirectory     }
  316.   netfile      : path_typ;                    { inbound files directory   }
  317.   in_pkt       : path_typ;                    { Dir for inbound PKTs      }
  318.   out_pkt      : path_typ;                    { Dir for outbound PKTs     }
  319.   outbound     : path_typ;                    { outbound directory        }
  320.   quickbbs     : path_typ;                    { QuickBBS system directory }
  321.   uns_netfile  : path_typ;                    { unsecured inbound files   }
  322.   echotoss     : path_typ;                    { name of echotoss.log      }
  323.   dupebase     : path_typ;                    { directory for dupe base   }
  324.   semaphor     : path_typ;                    { Semaphor directory        }
  325.   logfilename  : path_typ;                    { Log file name             }
  326.   before_toss  : path_typ;                    { call before proc. PKTs    }
  327.   semaphor_net : array [1..MAXFNAME] of char; { Netmail rescan semaphor file}
  328.   alnk_help    : array [1..MAXFNAME] of char; { AreaLink help text        }
  329.   maint_help   : array [1..MAXFNAME] of char; { Alnk Remote Maint. Helpfile}
  330.   rsvd2        : array [1..MAXFNAME] of char; { reserved                  }
  331.   dflt_origin  : origin_typ;                  { default origin line       }
  332.   bitfield1    : byte;                        { has been changed from 1.10}
  333. {  rtnrecpt     : bit_0;                        True if to send rtn recpt }
  334. {  del_empty_msg: bit_1;                        delete empty netmails     }
  335. {  ARCmail06    : bit_2;                        ARCmail 0.6 compatibility }
  336. {  use_crc_names: bit_3;                        use crc-names for auto-areas}
  337. {  rsvd3        : bit_4;                        reserved                  }
  338. {  multi_task   : bit_5;                        TRUE if multi-tasking     }
  339. {  ignore_unkw  : bit_6;                        ALNK ignores unkwn systems}
  340. {  singleextract: bit_7;                        extract 1 bundle at a time}
  341.   bitfield2    : byte;
  342. {  trunc_sent   : bit_0;                        1 = Trunc 0 = Delete      }
  343. {  keep_alnk_ans: bit_1;                        keep areafix message      }
  344. {  prod_names   : bit_2;                        use product names         }
  345. {  swap_ems     : bit_3;                        swap to EMS               }
  346. {  swap_ext     : bit_4;                        swap to extended memory   }
  347. {  forward_every: bit_5;                        forward req. not in lists }
  348. {  direct_video : bit_6;                        use direct screen i/o     }
  349. {  rsvd4        : bit_7;                        reserved                  }
  350.   bitfield3    : byte;
  351. {  compr_after  : bit_0;                        compress after each PKT   }
  352. {  delete_bases : bit_1;                        when removing an area     }
  353. {                                               delete squish/msg-base    }
  354. {  rsvd5        : bit_2;                        reserved                  }
  355. {  use_imcomp   : bit_3;                        call IMCOMP in case of tight}
  356. {                                                diskspace or abort at once}
  357.   last_run     : longint;                     { last maintenance update   }
  358.   rsvd6        : byte;                        { reserved                  }
  359.   rsvd7        : byte;                        { reserved                  }
  360.   rsvd8        : word;                        { reserved                  }
  361.   max_arcmail_size : word;                    { max size of arcmail bundles}
  362.   pwd_exp_days : word;                        { days before pwd expired   }
  363.   max_pkt_size : word;                        { max size of pkt to create }
  364.   max_add_pkt  : byte;                        { PKTs to compress in one run}
  365.   pkt_not_forus: byte;                        { how handle PKTs not for us}
  366.   environment  : byte;                        { FroDo, Binkley or Intermail}
  367.   max_msg_size : byte;                        { max size of netmail (split)}
  368.   via_line     : byte;                        { add Via Line to netmails  }
  369.   dupe_ring    : byte;                        { Check for possible d-rings}
  370.   cpd_check    : byte;                        { Check for circular paths  }
  371.   pers_mail    : byte;                        { use personal mail feature }
  372.   unlink_req   : byte;                        { Unlink areas without dlink}
  373.   keep_alnk_req: byte;                        { keep arealink request     }
  374.   rsvd9        : byte;                        { reserved                  }
  375.   max_dupes    : longint;                     { max dupes kept in database}
  376.   max_files_per_dir : word;                   { max. nr files when autocreate}
  377.   deadlink_days: byte;                        { nr of days for a dealink req}
  378.   rsvd10       : byte;                        { reserved                  }
  379.   bbs_system   : char;                        { BBS software used         }
  380.   new_areas    : path_typ;                    { name of file for new areas}
  381.   sp_before_unpack   : word;                  { min. diskspace required   }
  382.   sp_before_toss     : word;                  { before decompress, toss   }
  383.   sp_before_compress : word;                  { and compress (in MB).     }
  384.   kill_dead    : byte;                        { Kill Dead Selection       }
  385.   prod         : array [1..20] of word;       { Type 2+ product codes     }
  386.   rsvd11       : array [1..720] of char;      { reserved                  }
  387.   fwd          : array [1..MAXFWDLINK] of fwd_link;
  388.                                               { forward link requests     }
  389.   echojam      : path_typ;                    { path to ECHOMAIL.JAM      }
  390.   before_toss_ii: path_typ;                   { call before proc. PKTs    }
  391.   userbase     : path_typ;                    { path to USERS.BBS         }
  392.   stoptossmsgs : longint;                     { stop tossing after xxxxx msgs}
  393.   stoptossnetmsgs: longint;                   { stop tossing after xxxxx net}
  394.                                               { msgs within a PKT or at all}
  395.   ignorelist   : path_typ;                    { list of areas to suppress }
  396.   db_queue     : path_typ;                    { D'Bridge queue directory  }
  397.   log_level    : longint;                     { logging level             }
  398.   att_status   : char;                        { Def. status of attach msg }
  399.   msg_status   : char;                        { Def. status of Alnk msgs  }
  400.   filler       : array [1..278] of char;      { reserved                  }
  401. end;
  402.  
  403.  
  404. {-------------------------------------------------------------------------}
  405. {  IMAIL.AR Structure                                                     }
  406. {-------------------------------------------------------------------------}
  407.  
  408. TYPE
  409.  
  410. areas_record_type = record
  411.   aname         : areatag;                      { area name               }
  412.   comment       : array [1..61] of char;        { area comment            }
  413.   origin        : origin_typ;                   { origin line to use      }
  414.   group         : char;                         { area group              }
  415.   o_addr        : byte;                         { address for origin      }
  416.   use_akas      : array [1..MAXAKAS] of char;   { addresses for seen-bys  }
  417.   msg_base_type : byte;                         { message base type       }
  418.   brd           : byte;                         { board number            }
  419.   msg_path      : path_typ;                     { MSG directory           }
  420.   bitfield1     : byte;
  421. {  active        : bit_0;                         flag area active        }
  422. {  zone_gate     : bit_1;                         Zone-gate stripping     }
  423. {  tiny_seen     : bit_2;                         tiny seen-by flag       }
  424. {  secure        : bit_3;                         secure flag             }
  425. {  keep_seen     : bit_4;                         keep seen-by flag       }
  426. {  deleted       : bit_5;                         flag deleted area       }
  427. {  auto_added    : bit_6;                         flag auto-added record  }
  428. {  mandatory     : bit_7;                         area is mandatory       }
  429.   bitfield2     : byte;                         {                         }
  430. {  read_only     : bit_0;                         area is read only       }
  431. {  unlinked      : bit_1;                         area has been unlinked  }
  432. {  ulnk_req      : bit_2;                         perform unlinked requests?}
  433. {  hidden        : bit_3;                         area ist hidden         }
  434. {  to_link       : bit_4;                         should by processed by LINK}
  435. {  check_dup     : bit_5;                         check dupes in this area}
  436. {  no_pause      : bit_6;                         %PAUSE not allowed here }
  437. {  hide_seen     : bit_7;                         Hide seens when importing}
  438.   bitfield3     : byte;                         {                         }
  439. {  manual        : bit_0;                         No changes via Arealink }
  440. {  fwdreq_pending: bit_1;                         Fwd-Request pending     }
  441. {  sqkillfly     : bit_2;                         Squish 'Kill on the fly'}
  442. {  dupe_msgid    : bit_3;                         Dupecheck on MSGID only?}
  443.   user_bits     : byte;                         { 8-bit useravailable bits}
  444.   days          : byte;                         { days to keep messages   }
  445.   msgs          : word;                         { num messages to keep    }
  446.   stats         : im_stats;                     { flow statistics         }
  447.   creation      : longint;                      { date/time of creation   }
  448.   update        : longint;                      { last update by STAT     }
  449.   marked        : longint;                      { used by kill dead       }
  450.   kill_dead     : byte;                         { kill echos w/o traffic  }
  451.    read_sec     : word;                     { read access sec level       }
  452.    write_sec    : word;                     { write access sec level      }
  453.   filler        : array [1..30] of char;
  454.   export        : array [1..MAXEXPORT] of eaddress; { export list             }
  455. end;
  456.  
  457.     { --- Notes ---------------------------------------------------
  458.  
  459.     1) The entries in 'o_addr' and 'use_akas' are indexes into the
  460.        list of AKAs in IMAIL.CF, minus 1. eg:
  461.             im_config.aka[o_addr-1]
  462.        A value of 0 means 'no address'.
  463.  
  464.     2) the 'user_bits' entry allows third-part software to store
  465.        extra information in IMAIL.AR. Their meaning is program-
  466.        specific, so be careful when making use of them!
  467.  
  468.     3) IMAIL.AR knows three predefined areatags:
  469.  
  470.          BADMAIL       for the IMAIL badmail area,
  471.          DUPES         for the IMAIL dupe area and
  472.          PERSMAIL      for the IMAIL personal mail area.
  473.  
  474.        All three boards are treated as local areas and
  475.        the BADMAIL area must be present and non-passthru
  476.        otherwise IMAIL will not run.
  477.     --------------------------------------------------------------- }
  478.  
  479. {-----------------------------------------------------------------------}
  480. {  IMAIL.AX & IMAIL.BX Structures                                       }
  481. {-----------------------------------------------------------------------}
  482.  
  483.     { --- Notes ---------------------------------------------------
  484.  
  485.     1) These are "true" index files, created by BTree routines;
  486.        they cannot be used unless you have the BTree source
  487.        code as implemented in IMAIL.
  488.  
  489.     --------------------------------------------------------------- }
  490.  
  491. {-----------------------------------------------------------------------}
  492. {  IMAIL.ND Structure                                                   }
  493. {-----------------------------------------------------------------------}
  494.  
  495. TYPE
  496.  
  497. node_record_type = record
  498.   dstn          : naddress;                 { Node to pack for            }
  499.   sysop         : array [1..MAXNAME] of char;{ name of sysop               }
  500.   domain        : char;                     { index to domain             }
  501.   pwd           : array [1..MAXPWD] of char;{ AreaFix/Bndl password       }
  502.   att_status    : char;                     { Status of file attach msg   }
  503. { Packprogram was originally named "program" ! }
  504.   Packprogram   : char;                     { packer to use ("packers")   }
  505.   groups        : array [1..27] of char;    { groups node can request     }
  506.   capability    : word;                     { capability word for node    }
  507.   bitfield1     : byte;
  508. {  allow_remote  : bit_0;                     allow remote maint.         }
  509. {  rsvd1         : bit_1;                     reserved                    }
  510. {  auto_cap      : bit_2;                     auto-detect capability      }
  511. {  auto_added    : bit_3;                     record added by IMAIL       }
  512. {  newarea_add   : bit_4;                     auto add to new areas       }
  513. {  newarea_create: bit_5;                     create new areas            }
  514. {  Rescan_ok     : bit_6;                     allow node to rescan        }
  515. {  Notify        : bit_7;                     send notify messages        }
  516.   bitfield2     : byte;
  517. {  rsvd2         : bit_0;                                                 }
  518. {  rsvd3         : bit_1;                                                 }
  519. {  forward_req   : bit_2;                     send forward requests?      }
  520. {  uplink        : bit_3;                     Is this system an uplink?   }
  521. {  fsc_comp      : bit_4;                     Is a FSC-0057 arealink used?}
  522. {  change_packer : bit_5;                     system may change packer    }
  523. {  check_alnk    : bit_6;                     check for Arealink-Msgs     }
  524.   user_bits     : word;                     { 16 user-available bits      }
  525.   newarea_group : char;                     { group for autoadded area    }
  526.   pkt_password  : array [1..9] of char;     { password to include in PKTs }
  527.   last_pwd_change: longint;                 { time ALNK pwd last changed  }
  528.   toprogram     : array [1..11] of char;    { name of area manager        }
  529.   msg_status    : char;                     { Status of Alnk messages     }
  530.   pkt_o_addr    : char;                     { origaddress used for PKTs   }
  531.   msgs_in       : longint;                  { nr of msgs received         }
  532.   bytes_in      : longint;                  { amount of msgs received     }
  533.   msgs_out      : longint;                  { nr of msgs sent             }
  534.   bytes_out     : longint;                  { amount of msgs sent         }
  535.   lrdate        : longint;                  { date/time of statistic start}
  536.   pack_priority : byte;                     { priority (9-0) when compressing}
  537.   security      : word;                     { sec level for area access   }
  538.   max_arcmail_size: word;                   { max size of arcmail bundles }
  539.   max_pkt_size  : word;                     { max size of pkt to create   }
  540.   max_add_pkt   : byte;                     { PKTs to compress in one run }
  541.   filler        : array [1..38] of char;
  542. end;
  543.  
  544.     { --- Notes ---------------------------------------------------
  545.  
  546.     1) the 'user_bits' entry allows third-part software to store
  547.        extra information in IMAIL.ND. Their meaning is program-
  548.        specific, so be careful when making use of them!
  549.  
  550.     --------------------------------------------------------------- }
  551.  
  552. {-----------------------------------------------------------------------}
  553. {  IMAIL.GR Structure                                                   }
  554. {-----------------------------------------------------------------------}
  555.  
  556. TYPE
  557.  
  558. group_record_type  = record
  559.   grp_desc      : array[1..27] of char;     { Group description           }
  560.   msg_base_type : byte;                     { message base type           }
  561.   msg_path      : path_typ;                 { MSG/Squish path             }
  562.   bitfield1     : byte;
  563. {  active       : bit_0;                      flag area active            }
  564. {  zone_gate    : bit_1;                      Zone-gate stripping         }
  565. {  tiny_seen    : bit_2;                      tiny seen-by flag           }
  566. {  secure       : bit_3;                      secure flag                 }
  567. {  keep_seen    : bit_4;                      keep seen-by flag           }
  568. {  mandatory    : bit_5;                      area is mandatory           }
  569. {  read_only    : bit_6;                      area is read only           }
  570. {  ulnk_req     : bit_7;                      perform unlinked requests?  }
  571.   bitfield2     : byte;
  572. {  hidden       : bit_0;                      area is hidden              }
  573. {  check_dup    : bit_1;                      check for dupes             }
  574. {  no_pause     : bit_2;                      %PAUSE not allowed          }
  575. {  hide_seen    : bit_3;                      Hide seens when importing   }
  576. {  sqkillfly    : bit_4;                      Squish 'Kill on the fly'    }
  577. {  dupe_msgid   : bit_5;                      Dupecheck on MSGID only?    }
  578.    days         : byte;                     { days to keep messages       }
  579.    msgs         : word;                     { num messages to keep        }
  580.    o_addr       : char;                     { address for origin          }
  581.    use_akas     : array[1..MAXAKAS] of char;{ addresses for seen-bys      }
  582.    kill_dead    : byte;                     { kill echos without traffic  }
  583.    low_board    : byte;                     { Hudson boards for autocreate}
  584.    high_board   : byte;                     { lowest and highest          }
  585.    read_sec     : word;                     { read access sec level       }
  586.    write_sec    : word;                     { write access sec level      }
  587.    filler       : array[1..44] of char;     { reserved                    }
  588. end;
  589.  
  590. {-----------------------------------------------------------------------}
  591. {  IMAIL.PR Structure                                                   }
  592. {-----------------------------------------------------------------------}
  593.  
  594. pack_routing_type = record                  { used in pack routing        }
  595.   dst    : naddress;                        { pack via this node          }
  596.   nodes  : array[1..MAXVIA] of naddress;    { nodes to pack               }
  597.   except : array[1..MAXEXCEPT] of naddress; { exceptions                  }
  598. end;
  599.  
  600.   { Note: In the current implementation, the pack routing has
  601.           as much records as defined in MAXPACK.              }
  602.  
  603. {-----------------------------------------------------------------------}
  604. {  IMAIL.PP Structure                                                   }
  605. {-----------------------------------------------------------------------}
  606.  
  607. TYPE
  608.  
  609. packers = record
  610.   packname   : array[1..5] of char;
  611.   packer     : array[1..MAXPACKNAME] of char;
  612. end;
  613.  
  614. compression_type = record
  615.   prg        : array[1..MAXPACKERS] of packers;{ Packer defintions        }
  616.   arcunpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc .ARC files }
  617.   arjunpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc .ARJ files }
  618.   pkpakunpak : array[1..MAXPACKNAME] of char;  { cmd to de-arc .PKA files }
  619.   pkzipunpak : array[1..MAXPACKNAME] of char;  { cmd to de-arc .ZIP files }
  620.   lharcunpak : array[1..MAXPACKNAME] of char;  { cmd to de-arc .LZH files }
  621.   zoounpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc .ZOO files }
  622.   pakunpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc .PAK files }
  623.   sqzunpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc .SQZ files }
  624.   uc2unpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc .UC2 files }
  625.   rarunpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc .RAR files }
  626.   unkunpak   : array[1..MAXPACKNAME] of char;  { cmd to de-arc unknown files}
  627. end;
  628.  
  629.  
  630. {-----------------------------------------------------------------------}
  631. {  IMAIL.DP/IMAIL.DPI Structure                                         }
  632. {-----------------------------------------------------------------------}
  633.  
  634.     { --- Notes ---------------------------------------------------------
  635.  
  636.        The dupe database consists simply of a series of long-sized
  637.        values, which are a two 32-bit CRC of (in order) the following
  638.        data:
  639.  
  640.        CRC 1: Addressee's name
  641.               Sender's name
  642.               Date
  643.               Subject
  644.  
  645.        CRC 2: Address and MSGID (if any otherwise 0L)
  646.  
  647.     --------------------------------------------------------------------- }
  648.  
  649. { end of IMAIL-structures }
  650. {-----------------------------------------------------------------------}
  651.  
  652.