home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magic 1995 #1 / CDM_5.ISO / shell / mailers / im / imdev.arj / SEMA.DOC < prev   
Encoding:
Text File  |  1993-04-28  |  5.5 KB  |  120 lines

  1.                          InterMail Semaphore files
  2.                          =========================
  3.            Copyright 1993 Peter Stewart & InterZone Software, Inc.
  4.  
  5.  
  6. InterMail 2.00-2.10
  7. -------------------
  8.   File:           Function:
  9.   -----           ---------
  10.   IMRESCAN.NOW    Tells the Mailer to rescan the netmail folder,
  11.                   whenever the timestamp of the file changes. The
  12.                   easiest way to update the filestamp is to use the
  13.                   standard DOS create file call, and immediately
  14.                   close the file.
  15.  
  16.   IERESCAN.NOW    Tells the Editor to rescan the netmail folder.
  17.  
  18.   EVTSCAN.IM      Tells the Mailer that the event file has been updated.
  19.  
  20.   CFGSCAN.IM      Tells the Mailer that setup options have been changed.
  21.  
  22.   IMEXIT.###      Tells the Mailer to exit with an errorlevel specified
  23.                   by the extension of the file.
  24.  
  25. InterMail v2.20-2.21
  26. --------------------
  27.   File:           Function:
  28.   -----           ---------
  29.   IMRESCAN.NOW    Tells the Mailer to rescan the netmail folder.
  30.  
  31.   IERESCAN.NOW    Tells the Editor to rescan the netmail folder.
  32.  
  33.   EVTSCAN.IM      Tells the Mailer that the EVENT.001, EVENT.002, etc.
  34.                   has been updated.
  35.  
  36.   CFGSCAN.IM      Tells the Mailer that setup options have been changed.
  37.  
  38.   IMEXIT.###      Tells the Mailer to exit with an errorlevel specified
  39.                   by the extension of the file.
  40.  
  41.   IMSLEEP.NOW     Tells all Mailers to "go to sleep", ceasing all activity
  42.                   releasing the nodelist files, and closing the logs. If
  43.                   the file is older than 2 hours, it is ignored.
  44.  
  45.   X#######.???    This file is used to signal an outgoing call or an
  46.                   inbound connection with a specific node. The semaphore
  47.                   consists of the last 9 digits of a node's phone number
  48.                   in hex, with an "X" as the first character, and the mail
  49.                   server id # as the extension, eg .001, .002, etc.
  50.  
  51.                   Any process that needs to ensure that no mailer is in an
  52.                   active mail session can do so by making sure that no
  53.                   file that starts with an "X" exists in the semaphore
  54.                   directory.
  55.  
  56.                   To prevent the editor from renumbering messages, you
  57.                   can create a file which starts with "X" in the
  58.                   semaphore directory.
  59.  
  60. InterMail v2.22 and later
  61. -------------------------
  62.   File:           Function:
  63.   -----           ---------
  64.   IMRESCAN.NOW    Tells the Mailer to rescan the netmail folder.
  65.  
  66.   IERESCAN.NOW    Tells the Editor to rescan the netmail folder.
  67.  
  68.   EVTSCAN.IM      Tells the Mailer that the EVENT.001, EVENT.002, etc.
  69.                   has been updated.
  70.  
  71.   CFGSCAN.IM      Tells the Mailer that setup options have been changed.
  72.  
  73.   IMEXIT00.###    Tells all Mailers to exit with an errorlevel specified
  74.                   by the extension of the file.
  75.  
  76.   IMEXIT??.###    Tells the Mailer to exit with an errorlevel specified
  77. |                 by the extension of the file, with ?? specifying the
  78. |                 number of the Mail Server that is to exit.
  79.  
  80.   IMSLEEP.NOW     Tells all Mailers to "go to sleep", ceasing all activity
  81.                   releasing the nodelist files, and closing the logs. Also
  82. |                 makes the Editor warn a user that another process needs
  83. |                 access to the nodelist files. If the file is older than
  84. |                 2 hours, it is ignored.
  85.  
  86.   X#######.???    This file is used to signal an outgoing call or an
  87.                   inbound connection with a specific node. The semaphore
  88.                   consists of the last 9 digits of a node's phone number
  89.                   in hex, with an "X" as the first character, and the mail
  90. |                 server id # in hex as the extension, eg .001, .002, etc.
  91.  
  92. | X1234567.8yy    Node number semaphore, where "x" is the character "X",
  93. |                 "1234567.8" is hex of a CRC-32 over two longs containing
  94. |                 the 4d address, and "yy" is the mail server (line)
  95. |                 number in hex. Primarily for use by echomail processors.
  96.  
  97. | IMRENUM.NOW     Renumbering is signaled/prevented via the semaphore
  98. |                 IMRENUM.NOW, as follows: If the timestamp has changed,
  99. |                 the netmail folder has been renumbered. A successful
  100. |                 lock on byte 1-1000 of this zero byte file is also
  101. |                 necessary before a process can renumber the folder.
  102. |                 Consequently, renumbering can be prevented by
  103. |                 establishing a lock anywhere in the first 1000 bytes.
  104. |
  105. |                 So the procedure for a Mailer calling out or answering
  106. |                 an incoming call, will be to first establish a lock on
  107. |                 the IMRENUM file, the byte position of the lock
  108. |                 being identical to the mail server/line number, then
  109. |                 create semaphores for the node it will be calling
  110. |                 (first checking for conflicting semaphores) and make
  111. |                 the call. On the EMSI handshake additional semaphores
  112. |                 may be created. After the call the semaphores are
  113. |                 removed and the lock is released.
  114. |
  115. |                 For an echomail processor, locking IMRENUM.NOW at byte
  116. |                 1000 will prevent renumbering. A lock over the first
  117. |                 1000 bytes will of course prevent any activity from
  118. |                 occurring...
  119.  
  120.