home *** CD-ROM | disk | FTP | other *** search
/ synchro.net / synchro.net.tar / synchro.net / modem.madness / SMMNETML / CPML_120.ZIP / COPYMAIL.DOC < prev    next >
Encoding:
Text File  |  1991-06-16  |  14.0 KB  |  282 lines

  1. CopyMail Version 1.20 -- Copyright 1991 by W. F. Muldrow
  2.  
  3.     This program is an original work by W. F. Muldrow (8:928/1@RBBSNet or
  4. 1:3617/1@FidoNet).  Permission is granted to freely distribute unmodified
  5. copies of this program together with its documentation and sample
  6. configuration files so long as no fee is charged for such distribution.
  7. Permission is also granted to use the original program or a modified version
  8. of this program and to incorporate any or all of this program into other
  9. applications so long as no fee is charged for any derivative work.
  10.  
  11.     COPYMAIL is intended for use in multitasking, multi-node, or multi-
  12. domain unattended mailer applications.  It provides the capability of moving
  13. outbound mail packets and bundles which were created in an off-line directory
  14. to the on-line outbound area in a controlled and safe manner.  Multiple nodes
  15. are supported.  Multiple off-line outbound areas are supported in order to
  16. facilitate multi-zone applications.  For multi-domain use, it can easily
  17. support Binkley-Term's outbound directory naming conventions, because you
  18. explicitly name the directories that CopyMail should copy to and from.
  19.  
  20.     There are several goals to meet in order to efficiently move mail in
  21. a multitasking and/or multinode environment:
  22.  
  23.         1.  All mailer nodes should be online and ready to answer inbound
  24. calls a maximum amount of time.
  25.  
  26.         2.  All mailer nodes should be able to share common outbound areas
  27. so that callers may receive all available mail by calling any available node.
  28.  
  29.         3.  The mailer must not transmit files which are in use by a mail
  30. processor and the mail processor must not compress packets or update bundles
  31. that the mailer is attempting to send.
  32.  
  33.     CopyMail to the rescue!  All of these goals can be satisfied using
  34. CopyMail together with Binkley-Term 2.40 or later.  It is expected that a
  35. future release of Opus will also allow the same processing method to work.
  36. Here's how it's done:
  37.  
  38.         1.  For multi-node systems, all mailer nodes are configured to share
  39. the same set of outbound directories and each node has a unique (not shared)
  40. inbound files directory.
  41.  
  42.         2.  The mail processor is configured to use a different set of
  43. inbound and outbound directories that are not shared with the mailer(s).
  44.  
  45.         3.  When mail is received by the mailer, it is copied from that
  46. node's inbound files area to the mailer's inbound file area.
  47.  
  48.         4.  If the mail processor is not already active, it is started.
  49. When running under a multitasking environment such as Desqview or Windows,
  50. this involves opening an additional window to allow background processing
  51. of the mail.  In a network environment it may involve a mailer node remaining
  52. off line in order to process mail, but even so, only one node need be off
  53. line to process all of the mail that has been received on any node.
  54.  
  55.         5.  When the mail processor is finished and new outbound mail has
  56. been packed up for the mailer to send, the mail processor's batch file
  57. invokes CopyMail.  CopyMail will happily and safely move the new outbound
  58. mail into the mailer's outbound directory(ies).
  59.  
  60.         6.  After CopyMail has done it's thing, the mail processor's batch
  61. file should check to see if more unprocessed mail has been received.  If
  62. so, return to step 4 and process more mail.  Otherwise, if in a window, the
  63. window can be closed; or if in a network, the node can go back on line.
  64.  
  65.     Copymail uses the Binkley-Term version 2.40 convention of looking for
  66. and creating a flag file (xxxxyyyy.BSY) in the outbound directory to indicate
  67. when it is unsafe to alter outbound files for a node.  To enable this feature
  68. in Binkley-Term, the TaskNumber and Flags configuration verbs should be
  69. enabled.  Copymail will also create task flags in Binkley's Flags directory
  70. to help in coordinating multitasking operations.  The way these flags work
  71. is this:
  72.  
  73.     The "flag" file is located in the Binkley-Term (or Opus) outbound
  74. files directory.  It has a file name of "xxxxyyyy.BSY" where "xxxx" and
  75. "yyyy" are the net/node number in hexadecimal notation.  Binkley-Term will
  76. create this flag just before attempting to dial the node or if the connection
  77. is an inbound call, just before sending files.  If the flag already exists,
  78. then some other process (or node) is using those files, and Bink will leave
  79. them alone.  CopyMail creates the flag just before copying mail for that
  80. node into the outbound directory, and will skip that node's mail if the flag
  81. already exists.  The busy flag is all that is required for CopyMail and
  82. Binkley-Term to correctly hand-shake with each other.  CopyMail creates the
  83. flag files in both the "to" and "from" directories, so it can be used to
  84. copy mail both to and from the "live" Binkley outbound directories.
  85.  
  86.     The "task" flag is named "TASK.xx" where xx is the task number in
  87. hexadecimal.  All the task flags reside in the "flags" directory, and are
  88. used to show that the task is active.  Binkley-Term creates its task flag
  89. any time it is "connected" to another modem.  The task flag is deleted when
  90. Bink drops through to the BBS or disconnects the line.  CopyMail creates
  91. the task flag at the end of its initialization and deletes it when it
  92. finishes executing.  CopyMail will NOT run if its task flag already exists,
  93. so you can prevent it from copying mail by creating the appropriate task
  94. flag from somewhere else.  Although Binkley-Term maintains its task flag,
  95. the only program that I am aware of that USES the task flag is a system
  96. monitor that displays the currently active task flags on the screen.
  97.  
  98.     When copying or combining outbound mail files, the flavor of the
  99. outbound file will be the higher priority of the file being copied and any
  100. existing outbound file for the same node address.  The priorities are (from
  101. highest to lowest) Crash, Direct, Normal, and Hold.  Renaming outbound mail
  102. priorities can be turned off using the NORENAME config file option or the
  103. /R command line parameter.  As an example, if a *.DLO file is copied to a
  104. directory which already contains an *.FLO, then the existing *.FLO will be
  105. renamed to *.DLO and the new file appended to it.  If the source was an
  106. *.HUT and an *.DUT already existed, then the *.HUT would be appended to the
  107. existing *.DUT so that the resulting flavor was Direct.  This applies only
  108. to *.?UT and *.?LO files.  The table below shows the "flavor" of the
  109. resulting mail files:
  110.  
  111.       +----------+------------------------------------------+
  112.       |          |              Existing Mail               |
  113.       |   New    +---------+----------+----------+----------+
  114.       |   Mail   |  Crash  |  Direct  |  Normal  |  Hold    |
  115.       +----------+---------+----------+----------+----------+
  116.       |  Crash   |  Crash  |  Crash   |  Crash   |  Crash   |
  117.       |  Direct  |  Crash  |  Direct  |  Direct  |  Direct  |
  118.       |  Normal  |  Crash  |  Direct  |  Normal  |  Normal  |
  119.       |  Hold    |  Crash  |  Direct  |  Normal  |  Hold    |
  120.       +----------+---------+----------+----------+----------+
  121.  
  122.     Outbound compressed mail files will be created using the current
  123. day of the week in the file extension.  Old outbound mail bundles which
  124. have been truncated to zero length will be deleted.  Since the compressed
  125. mail bundles are always created with the current day in the file extension,
  126. you can gather several old bundles that were created over a several day
  127. period into a single bundle just by copying them out to a separate directory
  128. and then copying them back to the original one.  This comes in handy if you
  129. are feeding nodes that don't pick up mail often.
  130.  
  131.     The files you should have received in this package are:
  132.  
  133.         COPYMAIL.DOC -- This file.
  134.         COPYMAIL.EXE -- Executable program for 8088, 8086, 80186.
  135.         COPYMAIL.286 -- Executable program for 80286, 80386.
  136.         COPYMAIL.CFG -- Sample configuration file.
  137.         COPYMAIL.TXT -- The archive directory with file sizes and checksums.
  138.  
  139.     To run CopyMail, first edit the sample configuration file (you'll find
  140. additional documentation in the sample).  The default configuration file name
  141. is COPYMAIL.CFG.  CopyMail expects to find this file in the current directory
  142. when it is executed (unless you tell it where to find it on the command line).
  143. If you have a PC or XT type computer, run the COPYMAIL.EXE file.  If you
  144. have an AT or 386, you'll probably want to delete COPYMAIL.EXE and rename
  145. COPYMAIL.286 to COPYMAIL.EXE and use it instead.  When running CopyMail, the
  146. following command line should be used:
  147.  
  148.     COPYMAIL [flags] [config-file-name]
  149.  
  150.     The optional flags on the line above may be any of:
  151.  
  152.         /W   -- To override the config file specification and operate in WAIT
  153.                 mode (see the discussion of WAIT and NOWAIT in the config
  154.                 file documentation).
  155.         /N   -- To operate in NOWAIT mode.
  156.  
  157.         /S   -- To open files in DOS's "deny none" file sharing mode.
  158.         /C   -- To open files in DOS's "compatibility" mode.  If using
  159.                 COMPATIBLE mode in the config file, it may also be
  160.                 necessary to use this command line flag if you also
  161.                 specify a config file name on the command line.  (The config
  162.                 file documentation contains more information.)
  163.  
  164.         /O   -- To force the NoOut mode (don't move *.OUT files).
  165.  
  166.         /Tnn -- To override the config file Task number.  nn is a decimal
  167.                 number between 0 and 255.
  168.  
  169.         /R   -- Don't rename outbound *.?UTs and *.?LOs.
  170.  
  171.         /H   -- Produces a command line summary.
  172.  
  173.     The optional config-file-name may provide a complete pathname to be used
  174. for the CopyMail configuration file.  This will override the default name of
  175. COPYMAIL.CFG.
  176.  
  177.     All command line and configuration file options may be provided in either
  178. upper or lower case.  Pathnames may use either forward or backward slashes to
  179. divide directory names.  Flags may be preceded by either a forward slash or a
  180. hyphen, and may appear either before or after the configuration file name.
  181.  
  182.     Below, are listed some sample batch file segments which illustrate how
  183. to use CopyMail in a Desqview environment.  DVC is used to open an
  184. additional Desqview window to process inbound mail.  (By the way, CopyMail
  185. has been tested on several different multitaskers and in several LAN
  186. environments, and performs solidly on all that we've tested.  It's
  187. coincidence that the sample below is for Desqview.)  The batch files below
  188. create and test for "dummy" files that are used as signals between different
  189. processes.  The same signaling method shown here will also work in a LAN
  190. environment or with other multitasking software.  Desqview enthusiasts may
  191. prefer using "named" mail boxes, which is also a good approach.
  192.  
  193. Binkley.Bat:       (mail tossing segment for node 1)
  194.  
  195.     :Toss
  196.     Remark -- If no mail was received, go back online
  197.     if not exist c:\Bink\Node1\*.* Goto Start
  198.  
  199.     Remark -- Now copy all of the new stuff to the mail processor
  200.     copy c:\Bink\Node1\*.* c:\Mail\Files
  201.     del  c:\Bink\Node1\*.*
  202.  
  203.     Remark -- Set a flag to show that new mail has arrived
  204.     echo . >c:\Mail\FlagFile.New
  205.  
  206.     Remark -- If the mail processor is already running, we're done
  207.     if exist c:\Mail\FlagFile.Bsy Goto Start
  208.  
  209.     Remark -- Otherwise, set the "Active" flag and start the processor
  210.     echo . >c:\Mail\FlagFile.Bsy
  211.     dvc open c:\dv\mt-pif.dvp
  212.     goto Start
  213.  
  214. The file MT-PIF.DVP used above is the Desqview program information file that
  215. is used to start the mail batch file shown below.
  216.  
  217. Mail.Bat
  218.  
  219.     :Start
  220.     c:
  221.     cd \Mail
  222.     Remark -- Kill the "New Mail" flag
  223.     del c:\Mail\FlagFile.New
  224.  
  225.     Remark -- Use QMail to process all of the new mail.
  226.     QM Toss Scan Pack
  227.  
  228.     Remark -- Use CopyMail to give the mail to the mailer's outbound
  229.     CopyMail
  230.  
  231.     Remark -- Check to see if more mail came in during processing
  232.     if exist c:\Mail\FlagFile.New Goto Start
  233.  
  234.     Remark -- Kill the "Active" flag and close the window
  235.     del c:\Mail\FlagFile.Bsy
  236.     exit
  237.  
  238.     Similar use of the "Active" flag can be used to be sure that no mail
  239. is being processed when doing message area maintenance and scanning.  With
  240. only a little work, all routine chores can be handled in the background
  241. leaving nodes on line nearly all of the time.  Using these methods, I have
  242. managed to reduce my offline time to less than 4 percent of the day.
  243.  
  244.     Another use for CopyMail is to collect mail into a single bundle for
  245. nodes who poll on an infrequent basis.  Because of the way that CopyMail
  246. names the compressed mail bundles when it moves mail, if you copy mail from
  247. your outbound area into a different directory, and then copy it back to
  248. the outbound area, all of the similarly named compressed bundles will be
  249. concatenated into a single bundle.  For example, *.FR?, *.SA? and *.SU? will
  250. all be combined into *.SU0 (if you do this on Sunday).  For mail processors
  251. like QMail that always assume that SU? bundles are older than SA? bundles,
  252. this will ensure that the mail is processed in the correct chronological
  253. sequence.
  254.  
  255.     I'd like to extend a special "Thank you" to all the folks who have risked
  256. both their mail and reputations to helping me test this program.  Without
  257. their bug reports and fresh ideas, CopyMail would not as good a product as
  258. the one you see.  A special thanks to (in alphabetical order):
  259.  
  260.         Steve Cross       1:123/19
  261.         Don Dawson        1:141/730
  262.         Bob Germer        1:266/21
  263.         Lawrence Kolada   1:327/452
  264.         George Peace      1:13/13
  265.         Terry Rossi       1:266/22
  266.         John Souvestre    1:396/1
  267.         Dave West         8:952/12
  268.  
  269. Revision history:
  270.  
  271.     1.00 -- Initial release.
  272.  
  273.     1.10 -- NoOut option added.
  274.             Binkley-Term "task" number and file support added.
  275.             Log file formats and messages revised.
  276.  
  277.     1.20 -- MaxSize support added for outbound bundles.
  278.             ARJ compression support added.
  279.             NORENAME option added.
  280.             Bug in "different compression types" squashed.
  281.             Bug in "task number" resolved.
  282.