home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
i
/
imail135.zip
/
IM_DEV.ZIP
/
IM_STRUC.H
next >
Wrap
C/C++ Source or Header
|
1992-12-20
|
42KB
|
873 lines
/* ============================================================== */
/* */
/* IMAIL DEFINITIONS AND STRUCTURES */
/* */
/* ============================================================== */
/*
* The contents of this file are subject to change without notice!
* Fields marked reserved should NOT be used.
* It is an ERROR to write to any of the configuration files
* while IMAIL (or any of its companion programs) is running.
* Test the semaphore file IMBUSY.NOW (in the IMAIL system directory)
* before writing to any of the config files.
*
* Copyright (C) 1992 by IMAIL INC. All rights reserved.
*/
#include <dir.h>
#include <io.h>
#include <time.h>
#define IMAIL_MAJ_VERSION 1
#define IMAIL_MIN_VERSION 35
#define STRUCT_MAJ_VERSION 1
#define STRUCT_MIN_VERSION 00
#define IM_PRD_CODE 0x4B
/* -------------------------------------------------------------------- */
/* Data type definitions */
/* -------------------------------------------------------------------- */
#define word unsigned
#define byte unsigned char
#define boolean int
#define integer int
typedef unsigned bit;
/* -------------------------------------------------------------------- */
/* Internal limits */
/* -------------------------------------------------------------------- */
#define MAXAKAS 16 /* Max # of addresses */
#define MAXPACKERS 11 /* Max # of packer def */
#define MAXEXPORT 60 /* Max export defs */
#define MAXVIA 40 /* max nodes packed via*/
#define MAXGROUPS 26 /* max nodes packed via*/
#define MAXEXCEPT 10 /* max EXCEPT nodes */
#define MAXPACK 32 /* max default pack cmd*/
#define MAXFWDLINK 10 /* max fwd link structs*/
#define MAXNOIMPT 20 /* max # names for IMPORT */
#define ZONESDOM 10 /* zones per domain entry */
#define MAXTAG 51 /* max areatag length */
#define MAXNAME 37 /* max namefield lenght */
#define MAXPACKNAME 50 /* max packer length */
#define MAXORIGIN 64 /* max origin length */
/* -------------------------------------------------------------------- */
/* Log Style Definitions */
/* -------------------------------------------------------------------- */
#define LOG_NORMAL 0 /* normal log level */
#define LOG_VERBOSE 1 /* verbose log level */
#define LOG_LOG 252 /* Always, but to file */
#define LOG_SCREEN 253 /* Always, but to scrn */
#define LOG_ALL 254 /* Always log this */
#define LOG_ERROR 255 /* Force error logging */
/* -------------------------------------------------------------------- */
/* Environment Type (FroDo or Bink) */
/* -------------------------------------------------------------------- */
#define ENV_FRODO 0 /* FrontDoor/D'Bridge */
#define ENV_BINK 1 /* Binkley */
/* -------------------------------------------------------------------- */
/* File Attach Message Status (used in IMAIL.ND) */
/* -------------------------------------------------------------------- */
#define S_NORMAL 0 /* used in IMAIL.ND */
#define S_HOLD 1
#define S_CRASH 2
/* -------------------------------------------------------------------- */
/* Message Base Types */
/* -------------------------------------------------------------------- */
#ifndef MSGTYPE_SDM
#define MSGTYPE_SDM 0x01
#endif
#ifndef MSGTYPE_SQUISH
#define MSGTYPE_SQUISH 0x02
#endif
#ifndef MSGTYPE_HUDSON
#define MSGTYPE_HUDSON 0x03
#endif
#ifndef MSGTYPE_QBBS
#define MSGTYPE_QBBS 0x03
#endif
#ifndef MSGTYPE_PASSTH
#define MSGTYPE_PASSTH 0x0F
#endif
#ifndef MSGTYPE_ECHO
#define MSGTYPE_ECHO 0x80
#endif
#ifndef MSGTYPE_LOCAL
#define MSGTYPE_LOCAL 0x90
#endif
#ifndef MSGTYPE_NET
#define MSGTYPE_NET 0xA0
#endif
/* -------------------------------------------------------------------- */
/* Via Line Switches */
/* -------------------------------------------------------------------- */
#ifndef VIA_NONE
#define VIA_NONE 0x01
#endif
#ifndef VIA_EXP
#define VIA_EXP 0x02
#endif
#ifndef VIA_IMP
#define VIA_IMP 0x03
#endif
#ifndef VIA_BOTH
#define VIA_BOTH 0x04
#endif
/* -------------------------------------------------------------------- */
/* Dupe ring check switches */
/* -------------------------------------------------------------------- */
#ifndef DUPE_NONE
#define DUPE_NONE 0x00
#endif
#ifndef DUPE_WARN
#define DUPE_WARN 0x01
#endif
#ifndef DUPE_ZONE
#define DUPE_ZONE 0x02
#endif
#ifndef DUPE_KILL
#define DUPE_KILL 0x03
#endif
/* -------------------------------------------------------------------- */
/* Unlink handling */
/* -------------------------------------------------------------------- */
#ifndef ULNK_NONE
#define ULNK_NONE 0x00
#endif
#ifndef ULNK_PASSTH
#define ULNK_PASSTH 0x01
#endif
#ifndef ULNK_ALL
#define ULNK_ALL 0x02
#endif
/* -------------------------------------------------------------------- */
/* Personal Mail handling */
/* -------------------------------------------------------------------- */
#ifndef PERSM_NONE
#define PERSM_NONE 0x00
#endif
#ifndef PERSM_LOG
#define PERSM_LOG 0x01
#endif
#ifndef PERSM_MSG
#define PERSM_MSG 0x02
#endif
#ifndef PERSM_COPY
#define PERSM_COPY 0x03
#endif
/* -------------------------------------------------------------------- */
/* AreaLink Request Handling */
/* -------------------------------------------------------------------- */
#ifndef KEEP_NONE
#define KEEP_NONE 0x00
#endif
#ifndef KEEP_MSG
#define KEEP_MSG 0x01
#endif
#ifndef KEEP_ALL
#define KEEP_ALL 0x02
#endif
/* -------------------------------------------------------------------- */
/* Macros to make life easier */
/* -------------------------------------------------------------------- */
#define BASEMASK 0x0F
#define TYPEMASK 0xF0
#define IsSdm(Type) ((Type & BASEMASK) == MSGTYPE_SDM)
#define IsMsg(Type) ((Type & BASEMASK) == MSGTYPE_SDM)
#define IsSquish(Type) ((Type & BASEMASK) == MSGTYPE_SQUISH)
#define IsHudson(Type) ((Type & BASEMASK) == MSGTYPE_HUDSON)
#define IsQbbs(Type) ((Type & BASEMASK) == MSGTYPE_QBBS)
#define IsPassth(Type) ((Type & BASEMASK) == MSGTYPE_PASSTH)
#define IsEcho(Type) ((Type & TYPEMASK) == MSGTYPE_ECHO)
#define IsLocal(Type) ((Type & TYPEMASK) == MSGTYPE_LOCAL)
#define IsNet(Type) ((Type & TYPEMASK) == MSGTYPE_NET)
/* -------------------------------------------------------------------- */
/* Exit Errorlevels & Error Messages */
/* -------------------------------------------------------------------- */
#define E_NOERR 0 /* no error */
#define E_CRDIR 238 /* Error creating directory */
#define E_ELOCK 239 /* File locking error */
#define E_AOPEN 240 /* Error opening IMAIL.AX */
#define E_BOPEN 241 /* Error opening IMAIL.BX */
#define E_NOIDX 242 /* Index file missing/corrupt */
#define E_NOCFG 243 /* IMAIL.CF not found */
#define E_NOARE 244 /* IMAIL.AR not found */
#define E_NONOD 245 /* IMAIL.ND not found */
#define E_BADCF 246 /* Error in IMAIL.CF */
#define E_BADVR 247 /* Bad version of IMAIL.CF */
#define E_EOPEN 248 /* Error opening file */
#define E_EREAD 249 /* Error reading file */
#define E_EWRIT 250 /* Error writing file */
#define E_CMDPR 251 /* Command Line Parameter error */
#define E_FILNF 252 /* File not found */
#define E_MEMRY 253 /* Memory Allocation error */
#define E_DISKF 254 /* Insufficient disk space */
#define E_UNKWN 255 /* Unknown error */
/* === ERRORLEVELs returned by TOSS and/or SCAN === */
#define T_NOMAIL 0x00 /* no mail processed */
#define T_NET 0x01 /* Net mail */
#define T_ECHO 0x02 /* Echo mail */
#define T_BAD 0x04 /* Bad and/or dupe mail */
#define T_QBBS 0x08 /* Qbbs message base changed */
#define T_MSG 0x10 /* *.MSG message base changed */
#define T_SQUISH 0x20 /* Squish message base changed */
#define T_PERS 0x40 /* Mail to Sysop received */
/* -------------------------------------------------------------------- */
/* Time-out for semaphore "wait" (in seconds) */
/* -------------------------------------------------------------------- */
#define IM_SEM_WAIT 120
/* -------------------------------------------------------------------- */
/* Special values for 'ALL' */
/* -------------------------------------------------------------------- */
#define ZONE_ALL 56685u
#define NET_ALL 56685u
#define NODE_ALL 56685u
#define POINT_ALL 56685u
/* -------------------------------------------------------------------- */
/* Misc other definitions required */
/* -------------------------------------------------------------------- */
#define FA_ANYFILE FA_RDONLY+FA_HIDDEN+FA_SYSTEM+FA_ARCH
#define TRUE 1
#define FALSE 0
#define BLANK ' '
typedef char str255[256];
typedef char str35[36];
typedef char str16[16];
typedef char pktdate[20];
typedef struct array512 {
word len;
char longstring[512];
} array512;
/* define some simple keyword replacements */
#define strdelete(s,p,num) strcpy(s+p-1,s+p+num)
#define STRSIZ 255 /* default string length */
/* -------------------------------------------------------------------- */
/* In case your compiler doesn't have these ... */
/* -------------------------------------------------------------------- */
#ifndef MAXPATH
#define MAXPATH 80
#endif
#ifndef MAXDRIVE
#define MAXDRIVE 3
#endif
#ifndef MAXDIR
#define MAXDIR 66
#endif
#ifndef MAXFILE
#define MAXFILE 9
#endif
#ifndef MAXEXT
#define MAXEXT 5
#endif
/* -------------------------------------------------------------------- */
/* */
/* QuickBBS Structures */
/* */
/* -------------------------------------------------------------------- */
typedef byte flagtype[4];
typedef struct userrecord { /* Used in the USERS.BBS File */
char name[36];
char city[26];
char pwd[16];
char dataphone[13];
char homephone[13];
char lasttime[6];
char lastdate[9];
byte attrib;
flagtype flags;
integer credit;
integer pending;
integer timesposted;
integer highmsgread;
integer seclvl;
integer times;
integer ups;
integer downs;
integer upk;
integer downk;
integer todayk;
integer elapsed;
integer len;
byte extraspace[8];
} userrecord;
/* --- Attrib: -----------------------------------------------------
Bit 0: Deleted
Bit 1: Screen Clear Codes
Bit 2: More Prompt
Bit 3: ANSI
Bit 4: No-Kill
Bit 5: Ignore Download Hours
Bit 6: ANSI Full Screen Editor
Bit 7: [ Reserved ]
------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* Message Records */
/* -------------------------------------------------------------------- */
typedef struct inforecord { /* Used in the MSGINFO.BBS file */
word lowmsg; /* Lowest Message in File */
word highmsg; /* Highest Message in File */
word totalactive; /* Total Active Messages */
word activemsgs[200];
} inforecord;
typedef struct idxrecord { /* Used in the MSGIDX.BBS file */
word msgnum;
byte board;
} idxrecord;
typedef struct hdrrecord { /* Used in the MSGHDR.BBS file */
word msgnum, replyto, seealsonum, tread;
word startrec;
word numrecs, destnet, destnode, orignet, orignode;
byte destzone, origzone;
word cost;
byte msgattr, netattr, board;
char posttime[6];
char postdate[9];
char whoto[36], whofrom[36];
char subj[73];
} hdrrecord;
/* --- Msg Attributes: --------------------------------------------- */
#define QMSGDELTD 0x01 /* deleted message, 0000 0001 */
#define QMSGOUTN 0x02 /* outgoing net message 0000 0010 */
#define QMSGISNET 0x04 /* Is a net message 0000 0100 */
#define QMSGPRIVATE 0x08 /* Private 0000 1000 */
#define QMSGREAD 0x10 /* Received 0001 0000 */
#define QMSGOUTE 0x20 /* Outgoing echo message 0010 0000 */
#define QMSGLOCAL 0x40 /* Local 0100 0000 */
#define QMSGXX1 0x80 /* [reserved] 1000 0000 */
/* --- Net Attributes: --------------------------------------------- */
#define QNETKILL 0x01 /* Kill when sent 0000 0001 */
#define QNETSENT 0x02 /* Sent 0000 0010 */
#define QNETFILE 0x04 /* File attach 0000 0100 */
#define QNETCRASH 0x08 /* Crash Priority 0000 1000 */
#define QNETRRQ 0x10 /* Request Receipt 0001 0000 */
#define QNETARQ 0x20 /* Audit request 0010 0000 */
#define QNETCPT 0x40 /* Is a return receipt 0100 0000 */
#define QNETXX1 0x80 /* [reserved] 1000 0000 */
/* --------------------------------------------------------------------
Each record in the MSGTOIDX.BBS file is of type String[35], each
entry is simply the name of the person the corresponding message
in MSGHDR.BBS is addressed to.
Each record in the MSGTXT.BBS file is of type String[255], each
entry is used to store blocks of message text. The variable
"StartRec" in the MSGHDR.BBS file contains the starting record
position for the text, the variable "NumRecs" indicates how many
consecutive blocks of text there are in the MSGTXT.BBS file.
----------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* */
/* Fido Packet Structures */
/* */
/* -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* Normal Message Header (*.MSG) */
/* -------------------------------------------------------------------- */
typedef struct f2normsghdr {
char fromwho[36]; /* From username */
char towho[36]; /* To username */
char subj[72]; /* Subject */
char date[20]; /* date string */
word times; /* times read */
word destnode; /* destination node */
word orignode; /* origin node */
word cost; /* cost */
word orignet; /* origin net */
word destnet; /* destination net */
word destzone; /* destination zone */
word origzone; /* origin zone */
word destpoint; /* destination point */
word origpoint; /* origin point */
word reply; /* this is a reply to? */
word attr; /* Attribute */
word nextreply; /* reply to this msg... */
} f2normsghdr;
/*--------------------------------------------------------------------------*/
/* Message attributes */
/*--------------------------------------------------------------------------*/
#define FMSGPRIVATE 0x0001 /* private message, 0000 0000 0000 0001 */
#define FMSGCRASH 0x0002 /* accept for forwarding 0000 0000 0000 0010 */
#define FMSGREAD 0x0004 /* read by addressee 0000 0000 0000 0100 */
#define FMSGSENT 0x0008 /* sent OK (remote) 0000 0000 0000 1000 */
#define FMSGFILE 0x0010 /* file attached to msg 0000 0000 0001 0000 */
#define FMSGFWD 0x0020 /* being forwarded 0000 0000 0010 0000 */
#define FMSGORPHAN 0x0040 /* unknown dest node 0000 0000 0100 0000 */
#define FMSGKILL 0x0080 /* kill after mailing 0000 0000 1000 0000 */
#define FMSGLOCAL 0x0100 /* FidoNet vs. local 0000 0001 0000 0000 */
#define FMSGHOLD 0x0200 /* 0000 0010 0000 0000 */
#define FMSGXX1 0x0400 /* STRIPPED by FidoNet<tm> 0000 0100 0000 0000 */
#define FMSGFRQ 0x0800 /* file request 0000 1000 0000 0000 */
#define FMSGRRQ 0x1000 /* receipt requested 0001 0000 0000 0000 */
#define FMSGCPT 0x2000 /* is a return receipt 0010 0000 0000 0000 */
#define FMSGARQ 0x4000 /* audit trail requested 0100 0000 0000 0000 */
#define FMSGURQ 0x8000 /* update request 1000 0000 0000 0000 */
#define BUNDLE_VER 2 /* IFNA Bundle Version */
#define CAP_TYPE2 0x0001 /* Can make Type 2 bundles */
#define CAP_STONAGE 0x0000 /* No particular capabailties, Type 2 assumed */
/* -------------------------------------------------------------------- */
/* Header for Message Bundles (Bundle Type 2+) */
/* -------------------------------------------------------------------- */
typedef struct f2pktmsghdr {
word orignode, /* originating node */
destnode, /* destination node */
year, /* 1990 - nnnnn */
month,
day,
hour,
minute,
second,
rate, /* unused */
ver, /* 2 */
orignet, /* originating net */
destnet; /* destination net */
byte
prod_lo, /* product code */
rev_major, /* revision level, major */
password[8]; /* packet level password */
word
qm_origzone, /* QMail wants orig.zone here */
qm_destzone; /* QMail wants dest.zone here */
byte
trash[2]; /* junk[8] */
word
cap_valid; /* Cap. validity, byte swapped */
byte
prod_hi, /* product code, hi byte */
rev_minor; /* revision level, minor */
word
capability, /* bundling capability */
origzone, /* originating zone */
destzone, /* destination zone */
origpoint, /* originating point */
destpoint; /* destination point */
long
junk; /* junk */
} f2pktmsghdr;
/* --- Note ----------------------------------------------------
(*) In the original FSC-0001 specification, these fields
were part of the Filler, and so may not be recognized
by all software.
------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* Packeted Message Header (Bundle Type 2+) */
/* -------------------------------------------------------------------- */
typedef struct f2msghdr {
word ver; /* Version (=2) */
word orignode; /* Originate Node */
word destnode; /* Destination Node */
word orignet; /* Originate Net */
word destnet; /* Destination Net */
word attr; /* Attribute */
word cost; /* Cost */
pktdate date; /* Date String */
/*
char towho[36]; To username
char fromwho[36]; From username
char subject[72]; Subject
*/
} f2msghdr;
/* --- Note ----------------------------------------------------
The last three fields are variable length; they are
shown above for reference, but are not part of the
structure.
------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* Structs used in IMAIL Configuration files */
/* -------------------------------------------------------------------- */
typedef struct naddress { // std node number ...
word zone; /* Zone Number */
word net; /* Net Number */
word node; /* Node Number */
word point; /* Point Number */
} naddress;
typedef struct expt {
word zone;
word net;
word node;
word point;
boolean doexpt;
} expt;
typedef struct pack_struct { // used in pack routing ...
struct naddress dst; /* pack via this node */
struct naddress nodes[MAXVIA]; /* nodes to pack */
struct naddress except[MAXEXCEPT]; /* exceptions */
} pack_struct;
typedef struct eaddress { // used in Area Manager ...
struct naddress dstn; /* node number */
bit exp_only:1; /* export only flag */
bit imp_only:1; /* import only flag */
bit paused:1; /* echo mail paused */
bit rsvd1:5; /* reserved */
} eaddress;
typedef struct fwd_link { // used for forward request nodes ...
char areasfile[MAXFILE+MAXEXT]; /* name of areas file */
char toprogram[10]; /* name of area manager */
char password[21]; /* area manager password */
struct naddress uplink; /* address of uplink */
} fwd_link;
typedef struct dom {
char domain[21]; /* name of domain */
char outbound[MAXPATH]; /* root outbound path */
word zones[ZONESDOM]; /* Zones in this domain */
byte akas[MAXAKAS]; /* =my= AKAs in this domain */
} dom;
typedef struct im_stats { // Used mainly by IUTIL
word th_day; /* this day */
word la_day; /* last day */
word th_week; /* this week */
word la_week; /* last week */
word th_month; /* this month */
word la_month; /* last month */
word th_year; /* this year */
word la_year; /* last year */
} im_stats;
/* -------------------------------------------------------------------- */
/* IMAIL.CF Structure */
/* -------------------------------------------------------------------- */
typedef struct im_config_type {
byte im_ver_maj; /* Major Version */
byte im_ver_min; /* Minor Version */
char sysop[MAXNAME]; /* name of sysop */
byte rsvd1; /* reserved */
byte rsvd2; /* reserved */
byte rsvd3; /* resreved */
struct naddress aka[MAXAKAS]; /* the AKAs */
struct dom domains[MAXAKAS]; /* domain names & zones */
byte prod[10]; /* Type2+ product codes */
byte rsvd4; /* reserved */
byte rsvd5; /* reserved */
byte rsvd6; /* reserved */
char netmail[MAXPATH]; /* net mail subdirectory */
char netfile[MAXPATH]; /* inbound files directory */
char in_pkt[MAXPATH]; /* Directory for inbound PKTs */
char out_pkt[MAXPATH]; /* Directory for outbound PKTs */
char outbound[MAXPATH]; /* outbound directory */
char quickbbs[MAXPATH]; /* QuickBBS system directory */
char rsvd7[MAXPATH]; /* reserved */
char rsvd8[MAXPATH]; /* reserved */
char rsvd9[MAXPATH]; /* reserved */
char semaphor[MAXPATH]; /* Semaphor directory */
char logfilename[MAXPATH]; /* Log file name */
char alnk_help[MAXFILE+MAXEXT]; /* AreaLink help text */
char new_areas[MAXFILE+MAXEXT]; /* name of file for new areas */
word pwd_expire_days; /* days before pwd expr'd */
word max_pkt_size; /* max size of pkt to create */
word max_dupes; /* max dupes kept in dbase */
byte log_level; /* logging level */
bit rtnrecpt:1; /* True if to send rtn recpt */
bit rsvd_1:1; /* reserved */
bit ARCmail06:1; /* ARCmail 0.6 compatibility */
bit environment:1; /* FroDo or Binkley */
bit pkt_open:1; /* Keep PKT files open */
bit auto_add:1; /* Auto-add unknown areas */
bit multi_tasking:1; /* TRUE if multi-tasking */
bit forward_for:1; /* forward PKTs not for us */
bit singleextract:1; /* extract 1 bundle at a time */
bit trunc_sent:1; /* 1 = Trunc 0 = Delete */
bit keep_alnk_answ:1; /* keep arealink answer */
bit prod_names:1; /* use the FTSC product list */
bit swap_ems:1; /* swap to EMS */
bit swap_ext:1; /* swap to extended memory */
bit newarea_passth:1; /* set new areas to passth */
bit unlink_autoadded:1; /* allow unlink of new areas */
bit direct_video:1; /* use direct screen writing */
bit forward_req:1; /* Execute forward link req. */
bit auto_add_nodes:1; /* Autoadd unkown nodes */
bit bit_rsvd:5; /* reserved */
char newarea_group; /* new areas default group */
char dflt_origin[MAXORIGIN]; /* default origin line */
char before_toss[MAXPATH]; /* call before proc. PKTs */
long last_run; /* last run of IUTIL STAT */
byte sem_timeout; /* timeout waiting for IMBUSY */
byte via_line; /* add Via Line to netmails */
byte dupe_ring; /* Check for possible d-rings */
char no_import[MAXNOIMPT][38]; /* ignore when importing */
char packers[MAXPACKERS][MAXPACKNAME]; /* Packer defintions */
char arcunpak[MAXPACKNAME]; /* cmd to de-arc .ARC files */
char arjunpak[MAXPACKNAME]; /* cmd to de-arc .ARJ files */
char pkpakunpak[MAXPACKNAME]; /* cmd to de-arc .PKA files */
char pkzipunpak[MAXPACKNAME]; /* cmd to de-arc .ZIP files */
char lharcunpak[MAXPACKNAME]; /* cmd to de-arc .LZH files */
char zoounpak[MAXPACKNAME]; /* cmd to de-arc .ZOO files */
char pakunpak[MAXPACKNAME]; /* cmd to de-arc .PAK files */
char sqzunpak[MAXPACKNAME]; /* cmd to de-arc .SQZ files */
char unkunpak[MAXPACKNAME]; /* cmd to de-arc unknown files */
struct pack_struct pack[MAXPACK]; /* default PACK routing */
struct fwd_link fwd[MAXFWDLINK]; /* forward link requests */
byte unlink_req; /* Unlink areas without dlink */
char semaphor_net[MAXFILE+MAXEXT]; /* Netmail rescan semaphor file*/
char maint_help[MAXFILE+MAXEXT]; /* Alnk Remote Maint. Helpfile */
byte pers_mail; /* use personal mail feature */
byte keep_alnk_req; /* keep arealink request */
word max_arcmail_size; /* max size of arcmail bundles */
byte max_msg_size; /* max size of netmail (split) */
char filler[126]; /* reserved */
} im_config_type;
/* --- Note ----------------------------------------------------
The information about the badmail-area, the dupe-area
and the personalmail-area has been moved to IMAIL.AR,
see there for detailed information.
------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* IMAIL.AR Structure */
/* -------------------------------------------------------------------- */
typedef struct areas_record_type {
char aname[MAXTAG]; /* area name */
char comment[61]; /* area comment */
char origin[MAXORIGIN]; /* origin line to use */
char group; /* area group */
char o_addr; /* address for origin */
char use_akas[MAXAKAS]; /* addresses for seen-bys */
byte msg_base_type; /* message base type */
byte brd; /* board number */
char msg_path[MAXPATH]; /* MSG/Squish path */
bit active:1; /* flag area active */
bit zone_gate:1; /* Zone-gate stripping */
bit tiny_seen:1; /* tiny seen-by flag */
bit secure:1; /* secure flag */
bit keep_seen:1; /* keep seen-by flag */
bit deleted:1; /* flag deleted area */
bit auto_added:1; /* flag auto-added record */
bit mandatory:1; /* area is mandatory */
bit read_only:1; /* area is read only */
bit unlinked:1; /* area has been unlinked */
bit ulnk_req:1; /* perform unlinked requests? */
bit hidden:1; /* area is hidden */
bit to_link:1; /* should by processed by LINK */
bit rsvd:3; /* reserved */
byte iutil_bits; /* bits for IUTIL */
byte user_bits; /* 8 user-available bits */
byte days; /* days to keep messages */
word msgs; /* num messages to keep */
struct im_stats t_stats; /* TOSS stats */
struct im_stats s_stats; /* SCAN stats */
struct im_stats d_stats; /* dupe statistics */
time_t creation; /* date/time of creation */
time_t update; /* last update by STAT */
time_t marked; /* used by IUTIL */
char filler[10];
struct eaddress export[MAXEXPORT]; /* export list */
} areas_record_type;
/* --- Notes --------------------------------------------------
1) The entries in 'o_addr' and 'use_akas' are indexes into
the list of AKAs in IMAIL.CF, minus 1. eg:
im_config.aka[o_addr-1]
A value of 0 means 'no address'
2) the 'user_bits' entry allows third-part software to store
extra information in IMAIL.AR. Their meaning is program-
specific, so be careful when making use of them!
3) IMAIL.AR knows three predefined areatags:
BADMAIL for the IMAIL badmail area,
DUPES for the IMAIL dupe area and
PERSMAIL for the IMAIL personal mail area.
All three boards are treated as local areas and
the BADMAIL area must be present and non-passthru
otherwise IMAIL will not run.
------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* IMAIL.AX & IMAIL.BX Structures */
/* -------------------------------------------------------------------- */
/* --- Notes ---------------------------------------------------
1) These are "true" index files, created by BTree routines;
they cannot be used unless you have the BTree source
code as implemented in IMAIL.
------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* IMAIL.ND Structure */
/* -------------------------------------------------------------------- */
typedef struct node_record_type {
struct naddress dstn; /* Node to pack for */
char sysop[MAXNAME]; /* name of sysop */
char domain; /* index to domain */
char pwd[21]; /* AreaLink password */
char status; /* Status of file attach msg */
char program; /* packer to use ("packers") */
char groups[MAXGROUPS+1]; /* groups node can request */
word capability; /* capability word for node */
bit allow_remote:1; /* allow remote maint. */
bit direct:1; /* Mark ARCmail as direct */
bit auto_cap:1; /* TRUE = auto-detect capability */
bit auto_added:1; /* record added by IMAIL */
bit newarea_add:1; /* auto add to new areas */
bit newarea_create:1; /* create new areas? */
bit rescan_ok:1; /* allow node to rescan */
bit notify:1; /* Send notify messages? */
bit security:2; /* Define security handling */
bit forward_req:1; /* Forward ALNK requests? */
bit uplink:1; /* Is this system an uplink? */
bit fsc_comp:1; /* Is a FSC-0057 arealink used?*/
bit rsvd:3; /* reserved bits */
word user_bits; /* 16 user-available bits */
char newarea_group; /* new areas default group */
char pkt_pwd[9]; /* PKT password */
long last_pwd_change; /* time ALNK pwd last changed */
char toprogram[10]; /* name of area manager */
char filler[10];
struct node_record_type *next_node;
struct node_record_type *prev_node;
} node_record_type;
/* --- Notes ---------------------------------------------------
1) The last 2 fields are not saved to IMAIL.ND
2) the 'user_bits' entry allows third-part software to store
extra information in IMAIL.ND. Their meaning is program-
specific, so be careful when making use of them!
------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* IMAIL.GR Structure */
/* -------------------------------------------------------------------- */
typedef struct group_record_type {
char grp_desc[27]; /* Group description */
byte msg_base_type; /* message base type */
char msg_path[MAXPATH]; /* MSG/Squish path */
bit active:1; /* flag area active */
bit zone_gate:1; /* Zone-gate stripping */
bit tiny_seen:1; /* tiny seen-by flag */
bit secure:1; /* secure flag */
bit keep_seen:1; /* keep seen-by flag */
bit mandatory:1; /* area is mandatory */
bit read_only:1; /* area is read only */
bit ulnk_req:1; /* perform unlinked requests? */
bit hidden:1; /* area is hidden */
bit rsvd:7; /* reserved */
byte days; /* days to keep messages */
word msgs; /* num messages to keep */
char filler[20]; /* reserved */
} group_record_type;
/* -------------------------------------------------------------------- */
/* IMAIL.DP/IMAIL.DPI Structure */
/* -------------------------------------------------------------------- */
/* --- Notes ---------------------------------------------------------
1) The dupe database consists simply of a series of word-sized values,
which are a 32-bit CRC of (in order) the following data:
Addressee's name
Sender's name
Date
Subject
Address in MSGID (if any)
-------------------------------------------------------------------- */