home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / psrt_14.zip / pktsort.doc < prev    next >
Text File  |  1994-04-25  |  41KB  |  1,004 lines

  1.  
  2.  
  3.  
  4.   PacketSorter v1.4                                         page 1/19
  5.  
  6.  
  7.                              PacketSorter v1.4
  8.                     Copyright 1993, 1994 Rolf K. Wilms
  9.  
  10.  
  11.  
  12.   Key Features
  13.   ------------
  14.  
  15.  
  16.   -   defragment FidoNet mail packets for up to 5 times faster tossing
  17.  
  18.   -   split and unsplit large messages to fit your systems limits
  19.  
  20.   -   sort messages by subject and/or time for easy thread-following
  21.  
  22.   -   break down large inbound packets to a handy size
  23.  
  24.   -   remove the garbage from 'bad' packets
  25.  
  26.   -   operates stand-alone or can be called from echomail tosser
  27.  
  28.   -   32-BIT OS/2 and DOS version (needs i386 or higher)
  29.  
  30.  
  31.   PacketSorter v1.4                                         page 2/19
  32.  
  33.  
  34.  
  35.  
  36.   Contents of this document
  37.   -------------------------
  38.  
  39.   1.Brief license and warranty information ......................3
  40.   2.A warning ...................................................3
  41.   3.System requirements .........................................3
  42.   4.Introduction ................................................4
  43.   5.Installation ................................................5
  44.       As a VCPI client ..........................................5
  45.       As a DPMI client ..........................................5
  46.       Under OS/2 ................................................5
  47.       Quick installation for Squish users .......................6
  48.       Quick installation for CrossPoint users ...................6
  49.       Quick installation for IMail users ........................7
  50.       Quick installation for FastEcho users .....................8
  51.       Installation for users of other tossers ...................9
  52.   6.Ways of configuration .......................................9
  53.   7.Command line options ........................................10
  54.       -c<file>   configuration file name ........................10
  55.       -w<count>  number of messages to keep in memory ...........10
  56.       -s<size>   limit in bytes for (un)splitting messages ......10
  57.       -p<count>  max. number of messages in output packets ......11
  58.       -otime     sort messages by time ..........................11
  59.       -osubject  sort messages by subject and time ..............11
  60.       -g<size>   remove garbage from packets ....................11
  61.       -e<entry>  select Archiver entry from cfg file ............12
  62.       -l<file>   log file name ..................................12
  63.       -d<dir>    directory where packets are searched ...........13
  64.       -h         help ...........................................13
  65.       [program-with-args]  exec. archiver before processing .....13
  66.   8. Setting the options via an environment variable ............13
  67.   9. Setting the options via a configuration file ...............14
  68.   10.Packets recognized and created .............................14
  69.   11.Return codes ...............................................15
  70.   12.Disk space consumption .....................................15
  71.   13.Removing garbage from packets ..............................15
  72.   14.Technology .................................................16
  73.   15.What is different in the registered version ................16
  74.   16.Other operating systems ....................................17
  75.       native MS-Windows .........................................17
  76.       Linux/Unix/Nextstep .......................................17
  77.   17.Author .....................................................17
  78.   18.Contents of the distribution archives ......................18
  79.   19.Thanks .....................................................19
  80.  
  81.  
  82.   PacketSorter v1.4                                         page 3/19
  83.  
  84.  
  85.  
  86.   1. Brief license and warranty information
  87.   -----------------------------------------
  88.  
  89.   You may  copy  and  distribute  the  unmodified  distribution  archives
  90.   (PSRT_14.ZIP) as you receive it in any medium.
  91.  
  92.   You may use PacketSorter for testing if it is of value to you. You must
  93.   not use  PacketSorter for  more than  30  days without  registering it.
  94.   After a period of  30 days you  must either stop  using PacketSorter or
  95.   register. Look  at  the  file  'ORDER.FRM'  on  how  to  register.  The
  96.   registration fee is US $15.
  97.  
  98.   There is no warranty.
  99.  
  100.   Please read the file 'license.doc' for details.
  101.  
  102.  
  103.   2. A warning
  104.   ------------
  105.  
  106.   This version of  PacketSorter has only  been tested on  a few different
  107.   systems, as  it  is any  time  when  a new  public  release  comes out.
  108.   Although PacketSorter  performed well  on these    systems there  is no
  109.   guarantee that it does  not break yours. It  is no bad idea  to back up
  110.   your mail packets before you try PacketSorter the first time.
  111.  
  112.  
  113.   3. System requirements
  114.   ----------------------
  115.  
  116.   Operating system:  OS/2 2.x
  117.                      or DOS 3.0 or higher
  118.  
  119.   Processor:         i386 or higher
  120.  
  121.   Memory:            A minimum of 2MB is needed for DOS
  122.  
  123.  
  124.   PacketSorter v1.4                                         page 4/19
  125.  
  126.  
  127.  
  128.   4. Introduction
  129.   ---------------
  130.  
  131.   PacketSorter is  a utility  for defragmenting,  splitting, unsplitting,
  132.   cleaning and sorting inbound FidoNet (FTS-0001) message packets. It has
  133.   been developed in the first place  because the time the echomail tosser
  134.   Squish needs to toss messsages into  the messagebase heavily depends on
  135.   the fragmentation  level  of  the  packets  received.  The packets  you
  136.   receive  from  your  links  are  usually   not  sorted  in  any  order.
  137.   PacketSorter groups the messages contained in the packets by their area
  138.   tag. On my system the packets defragmented with PacketSorter are tossed
  139.   by Squish  up  to  5  times  faster  than  the  original  packets.  The
  140.   performance gain you  will notice  depends on the  tosser you  use, the
  141.   messagebase you use and the performance  of your disk subsystem. People
  142.   using a Hudson-style messagebase or a hardware cache controller for the
  143.   harddisk may notice  no performance  gain at  all. PacketSorter  is not
  144.   limited to be used only with Squish.  You may use PacketSorter with any
  145.   other echomail processor.
  146.  
  147.   FTS-0001 specifies  no limit  to the  size  of messages.  Some echomail
  148.   processors crash if  they're fed  with messages  that exceed  a certain
  149.   size or those messages get dumped.  The following echomail tosssers are
  150.   said to have limits:
  151.  
  152.   GroupMail      8K
  153.   QMail         16K
  154.   ConfMail      14K
  155.   QEcho         10K
  156.   TosScan       32K
  157.   Squish        16K
  158.   FastEcho      64K (configurable)
  159.  
  160.   PacketSorter can  split and  unsplit large  messages according  to FSC-
  161.   0047, so that  your echomail  processor operates well.  Systems capable
  162.   processing large  messages  can  get  the  messages  unsplit  to  their
  163.   original size. See option -s.
  164.  
  165.   Large inbound packets  can be  broken down  into several  smaller ones.
  166.   Some echomail processors benefit from this  by saving disk space during
  167.   tossing for  downlinks.  If  packets are  considered  as  "bad"  by the
  168.   echomail processor  you may  like to  have  smaller packets  to examine
  169.   manually.
  170.  
  171.   Messages within the echo areas can be sorted  by subject and time or by
  172.   time only.  Sorting  by time  usually  does not  "look"  different from
  173.   unsorted messages when  you list the  messages in your  mail reader but
  174.   helps to put original  messages before the replies.  Sorting by subject
  175.   and time does look  different: all messages with  identical subject are
  176.   grouped together so you  can quickly see  what's going on  in a thread.
  177.   See options -otime, -osubject.
  178.  
  179.  
  180.   PacketSorter v1.4                                         page 5/19
  181.  
  182.  
  183.   Sometimes you receive packets not only containig messages but also some
  184.   "garbage". This garbage is introduced by  poor software or transmission
  185.   errors. The consequence of  such "grunged" packets is  that your tosser
  186.   complains about "grunged messages",  "data beyond logical  end of file"
  187.   or just loses messages. PacketSorter can clean such packets by throwing
  188.   out the garbage, thus  creating proper packets.  Proper messages before
  189.   and following a bad chunk will not be lost. Messages beyond the logical
  190.   end of file will be recovered. Grunged  packets can be renamed to *.bad
  191.   depending on  the amount  of garbage  removed.  See option  -g  and the
  192.   section 'Removing garbage from packets' for details.
  193.  
  194.  
  195.   5. Installation
  196.   ---------------
  197.  
  198.   PacketSorter can be run in three different environments (DOS-VCPI, DOS-
  199.   DPMI and OS/2). There  are two DOS extenders  (emx.exe and rsx.exe) and
  200.   one DLL (emx.dll for OS/2) packed with PacketSorter in the distribution
  201.   archives.
  202.  
  203.  
  204.   As a VCPI client
  205.   ----------------
  206.  
  207.     This is the 'normal' mode  under DOS. Make sure  that you either have
  208.     EMM386.EXE installed with EMS or don't  have EMM386.EXE installed. If
  209.     you have EMM386 installed  without providing EMS memory  you will see
  210.     an error message 'Virtual mode not supported without VCPI'.
  211.  
  212.     The VCPI mode uses  the file emx.exe.  Make sure that  emx.exe can be
  213.     found in one of the directories of the PATH.
  214.  
  215.     You may  look  at  the  file  emxinst.doc  for advanced  installation
  216.     options available for the EMX DOS extender.
  217.  
  218.  
  219.  
  220.   As a DPMI client
  221.   ----------------
  222.  
  223.     This is to  use if you  want PacketSorter to  run in  Windows or OS/2
  224.     DOS-emulation (DOS box). PacketSorter  needs the file  RSX.EXE to run
  225.     as a DPMI client. Make sure  that rsx.exe can be found  in one of the
  226.     directories of the  PATH and add  the following  to your environment:
  227.     RSXOPT=-e
  228.     You can do this by putting the following line in your autoexec.bat:
  229.     SET RSXOPT=-e
  230.     If you forget to  set up the environment  variable RSXOPT, you'll get
  231.     an error message 'Can't find rsx387' when you start PacketSorter.
  232.  
  233.     You may  look  at  the  file  rsxinst.doc  for advanced  installation
  234.     options available for the RSX DOS extender.
  235.  
  236.  
  237.   PacketSorter v1.4                                         page 6/19
  238.  
  239.  
  240.   Under OS/2
  241.   ----------
  242.  
  243.     Copy emx.dll to \os2\dll
  244.  
  245.     You may  look  at  the  file  emxinst.doc  for advanced  installation
  246.     options available for the EMX runtime system.
  247.  
  248.  
  249.  
  250.  
  251.  
  252.   Quick installation for Squish users
  253.   -----------------------------------
  254.  
  255.     Follow the instructions for setting up PacketSorter to run as a DPMI,
  256.     VCPI or OS/2  client. Make sure  that Squish  can swap  to disk (swap
  257.     keyword in squish.cfg).
  258.  
  259.     Copy PKTSORT.EXE in your Squish directory.
  260.  
  261.     Edit the EXTRACT commands in your compress.cfg file:
  262.  
  263.     Insert 'pktsort -s15000 -p500' before each call to an unpacker.
  264.     Examples:
  265.  
  266.     OS2    Extract   unzip -n %a %f
  267.     becomes
  268.     OS2    Extract   pktsort -s16000 -p500 unzip -n %a %f
  269.  
  270.     OS2    Extract   doswrap pkunzip -n %a %f
  271.     becomes
  272.     OS2    Extract   pktsort -s16000 -p500 doswrap pkunzip -n %a %f
  273.  
  274.     DOS    Extract   pkunzip -n %a %f
  275.     becomes
  276.     DOS    Extract   pktsort -s16000 -p500 pkunzip -n %a %f
  277.  
  278.     If your system has less than 2 MB of free memory above the first
  279.     megabyte, please read the section about the command line option -w in
  280.     this document.
  281.  
  282.  
  283.   Quick installation for CrossPoint users
  284.   ---------------------------------------
  285.  
  286.     Follow the instructions for setting up PacketSorter to run as a DPMI
  287.     or VCPI client.
  288.  
  289.     Copy PKTSORT.EXE to your CrossPoint directory.
  290.  
  291.     For each Fido-Box you have set up in 'Edit/Boxen' do the following:
  292.  
  293.  
  294.   PacketSorter v1.4                                         page 7/19
  295.  
  296.  
  297.     Select 'Edit/Point'  (in  'Edit/Boxen'). In  the  dialog,  change the
  298.     'Download-Packer' entry by inserting '\xp\pktsort -s256000 -osubject'
  299.     before the  call  to  the packer  (this  assumes  that  CrossPoint is
  300.     located in \XP).
  301.  
  302.     Example:
  303.  
  304.     pkunzip $DOWNFILE
  305.     becomes
  306.     \xp\pktsort -s256000 -osubject pkunzip $DOWNFILE
  307.  
  308.     As CrossPoint has no (known) limits to the size of messages that can
  309.     be processed, the setting -s256000 will only split messages that
  310.     exceed 265000 bytes and all already split messages that are smaller
  311.     will be unsplit, so that you get most of the messages back to their
  312.     original size.
  313.     This is useful if you get Usenet news via a Usenet/Fidonet gateway. A
  314.     lot of messages from the Usenet  get split at the gateway, especially
  315.     large  UUENCODED  files.  Having  these  messages  unsplit  to  their
  316.     original size, you can directly UUDECODE  them from within CrossPoint
  317.     without unsplitting them manually.
  318.  
  319.     The setting -osubject sorts the messages by subject.
  320.  
  321.     If you want to  use different options, refer  to the section 'Command
  322.     line options' in this document.
  323.  
  324.     If your system  has less  than 2 MB  of free  memory above  the first
  325.     megabyte, please read the section about the command line option -w in
  326.     this document.
  327.  
  328.  
  329.  
  330.   Quick installation for IMail users
  331.   ----------------------------------
  332.  
  333.     Follow the instructions for setting up  PacketSorter to run as a DPMI
  334.     or VCPI client.
  335.  
  336.     Copy  PKTSORT.EXE   to  your   IMail  directory.   Copy   the  sample
  337.     configuration file pktsort.cfg in your IMail directory. You will have
  338.     to edit the configuration file in a later step.
  339.  
  340.     Set up the environment variable PKTSORT and specify the configuration
  341.     to be used. Best is to include this in your AUTOECEC.BAT like that:
  342.  
  343.     SET PKTSORT=-cc:\imail\pktsort.cfg
  344.  
  345.     Edit the configuration file pktsort.cfg. You will have to set up some
  346.     Archiver definitions  for the  archiver (decompression)  programs you
  347.     use:
  348.  
  349.     Eg. (add this to the configuration file):
  350.  
  351.     Archiver ARJ c:\tools\arj.exe
  352.  
  353.  
  354.   PacketSorter v1.4                                         page 8/19
  355.  
  356.  
  357.     Archiver ZIP c:\tools\pkunzip.exe
  358.     Archiver LHA c:\tools\lha.exe
  359.     Archiver GUS c:\tools\gus.exe
  360.  
  361.     Now run Imsetup to  change the decompression program  settings in the
  362.     following way: in  each decompression program  definition replace the
  363.     name of the decompression program by  PKTSORT.EXE -eKEY, where KEY is
  364.     the abbreviation  for the  Archiver definition  in  the configuration
  365.     file.
  366.  
  367.     Examples:
  368.  
  369.     ARJ      ARJ.EXE e -y
  370.     becomes
  371.     ARJ      PKTSORT.EXE -eARJ e -y
  372.  
  373.     PkZip    PkunZip.exe -o -ed
  374.     becomes
  375.     PkZip    PKTSORT.EXE -eZIP -o -ed
  376.  
  377.     You may edit the other settings in pktsort.cfg to fit your needs.
  378.  
  379.     Thanks  to  Johann  H.  Addicks  for   finding  out  how  to  set  up
  380.     PacketSorter in IMail.
  381.  
  382.  
  383.  
  384.   Quick installation for FastEcho users
  385.   -------------------------------------
  386.  
  387.     Follow the instructions for setting up  PacketSorter to run as a DPMI
  388.     or VCPI client.
  389.  
  390.     Copy PKTSORT.EXE to your FastEcho directory.
  391.  
  392.     Start FESetup and look which directory  is set up as the TEMP-INBOUND
  393.     directory  for  FastEcho.  You'll  find  this  setting  in  the  menu
  394.     SYSTEM/PATHNAMES/Temp.  Inb.  If   there  is   no  temporary  inbound
  395.     directory specified, please  choose one,  because the  way installing
  396.     PacketSorter for FastEcho is  described here will not  work without a
  397.     temp. inbound directory.
  398.  
  399.     Check the maximum message size you  have configured for FastEcho. You
  400.     can find  the  value in  SYSTEM/PARAMETERS/MESSAGEBUFFERSIZE.  If the
  401.     value there is zero, it means a maximum message size of 32000.
  402.  
  403.     Now change to the dialog where  the decompession programs are set up.
  404.     It's in SYSTEM/DECOMPRESSION PROGRAMS.
  405.  
  406.     Change each decompression  program definition  in the  following way:
  407.     preceed  each   definition  with   'PKTSORT.EXE   -d<temp-inbound>  -
  408.     s<max_message>'.  <temp-inbound>  is  the  directory  you  looked  up
  409.     before. <max_message>  is  the  maximum message  size  you  looked up
  410.     before minus 1000 (for additional SEEN-BYs etc.).
  411.  
  412.  
  413.   PacketSorter v1.4                                         page 9/19
  414.  
  415.  
  416.     Examples:
  417.  
  418.     I assume your temporary inbound directory is c:\fastecho\temp and the
  419.     maximum message size is 32000.
  420.  
  421.     The decompression program definitions look like this:
  422.  
  423.     PKZip       PkunZip.Exe -o -ed
  424.     becomes
  425.     PKZip       PKTSORT.EXE -dc:\fastecho\temp -s31000 PkunZip.exe -o -ed
  426.  
  427.     LHa         LHa.Exe e -m1
  428.     becomes
  429.     LHa         PKTSORT.EXE -dc:\fastecho\temp -s31000 LHa.exe e -m1
  430.  
  431.     ARJ         arj e -y
  432.     becomes
  433.     ARJ         PKTSORT.EXE -dc:\fastecho\temp -s31000 arj.exe e -y
  434.  
  435.  
  436.     Other options to PKTSORT.EXE may be specified before the name of the
  437.     decompression program. Example:
  438.  
  439.     ARJ  PKTSORT.EXE -dc:\fastecho\temp -s31000 -g3000 -osubject arj.exe
  440.     e -y
  441.  
  442.     Another way to specify additional options to PacketSorter is to use a
  443.     configuration file. Copy pktsort.cfg into the FastEcho directory and
  444.     edit it to your needs.
  445.  
  446.  
  447.  
  448.   Installation for users of other tossers
  449.   ---------------------------------------
  450.  
  451.     PacketSorter needs  to be  run on  inbound  packets, i.e.  before the
  452.     packets  are  tossed.  Usually,  inbound   packets  are  received  in
  453.     compressed form in archives. Many tossers  are smart enough to unpack
  454.     the archives  by  calling  an  uncompression  utility  which you  may
  455.     specify in the  tosser setup. This  is the  point where  to 'hook' up
  456.     PacketSorter: you  specify PacketSorter  as an  uncompression program
  457.     and let PacketSorter first call the  'real' uncompression program and
  458.     then process the uncompressed packets. This way only packets received
  459.     in compressed form will be processed  by PacketSorter. If you want to
  460.     process packets received uncompressed  too, start PacketSorter before
  461.     starting the  tosser without  specifying an  archiver.  See [program-
  462.     with-args] in the 'Command line options' section of this document for
  463.     further explaination.
  464.  
  465.     If you don't let your tosser unpack the archives, for example because
  466.     you  use  an  archiver  shell  like  GUS  before  tossing,  just  run
  467.     PacketSorter from the batch file after unpacking the archives.
  468.  
  469.  
  470.   PacketSorter v1.4                                         page 10/19
  471.  
  472.  
  473.   6. Ways of configuration
  474.   ------------------------
  475.  
  476.   PacketSorter can be configured  in three different ways.  One is to use
  477.   command line parameters, the  second is to use  an environment variable
  478.   and the third is to use a  configuration file. Theese three methods can
  479.   be combined. If a configuration  option is set by  more than one method
  480.   the following  rule  determines  which one  will  be  used: environment
  481.   setting overrides configuration  file setting and  command line setting
  482.   overrides environment setting.
  483.  
  484.   Archiver entries can only be defined in the configuration file.
  485.  
  486.  
  487.   7. Command line options
  488.   -----------------------
  489.  
  490.   Syntax:
  491.   pktsort[-c<file>] [-w<count>] [-s<size>] [-p<count>]
  492.          [-osubject | -otime] [-l<file>] [-d<dir>]
  493.          [-g<size>] [-h] [-e<entry> [args] | program-with-args]
  494.  
  495.  
  496.  
  497.   -c<file> configuration file name
  498.  
  499.     Specify  the  name  of   the  configuration  file.   The  default  is
  500.     "pktsort.cfg" which is searched  in the current  directory. Note that
  501.     the current  directory is  not neccessarily  the  same as  that where
  502.     PKTSORT.EXE is located. If you want to be sure that the configuration
  503.     file  can  allways  be  found,  use   the  full  path  and  filename.
  504.     PacketSorter does  not  complain if  the  default  configuration file
  505.     cannot be found,  only if  a configuration file  explicitly specified
  506.     with -c cannot be found.
  507.  
  508.  
  509.   -w<count>number of messages to keep in memory
  510.  
  511.     Specify the size of the message window, that is the maximum number of
  512.     messages  to  keep   in  main   memory  during   defragmentation  and
  513.     subject/time sorting. If this  number is less than  the actual number
  514.     of  messages  to  process,   the  messages  can   only  be  partially
  515.     defragmented or sorted.  The default  size is  1000. With  an average
  516.     message size of 1.3 kbytes a  maximum of 1.3 MB  of main memory would
  517.     be used for messages. Do not specify a size that would need more than
  518.     your free  memory, because  your system  would  then start   swapping
  519.     memory to disk, yielding very poor  performance (this applies both to
  520.     DOS and  OS/2!). A  <count>  of 1  means  no defragmentation/sorting.
  521.     (Un)Splitting messages and packets and  removing garbage from packets
  522.     still works fine with a <count> of 1.
  523.  
  524.  
  525.  
  526.   -s<size> limit in bytes for (un)splitting messages
  527.  
  528.  
  529.   PacketSorter v1.4                                         page 11/19
  530.  
  531.  
  532.     Enable message  splitting  and  unsplitting  according  to  FSC-0047.
  533.     Messages larger than <size> are split  into smaller parts. Message-id
  534.     kludges are stripped  from all parts  but the first  to prevent those
  535.     parts to  be killed  by dupe  detection.  Messages which  are already
  536.     split according to  FTS-0047 will be  unsplit internally  and will be
  537.     re-split if the size of the unsplit messages exceeds <size>. Incoming
  538.     split messages can only be unsplit if all split parts are seen during
  539.     a run  of  PacketSorter.  Messages split  multiple  times,  as  it is
  540.     possible with versions of  PacketSorter up to v1.1b,  will be unsplit
  541.     'recursivly'. The  default is  no splitting/unsplitting.  The minimum
  542.     <size> is 8000. Use the maximum message size minus 1000 (for SEEN-BYs
  543.     etc.) your system can handle for <size>.
  544.  
  545.  
  546.  
  547.   -p<count>max. number of messages in output packets
  548.  
  549.     Create several smaller  output packets  instead of one  large packet.
  550.     <count> is the maximum number of messages  to put into one packet. If
  551.     a message  is split  into several  parts,  these parts  count  as one
  552.     message in this context. The default is 1000.
  553.  
  554.  
  555.  
  556.   -otime   sort messages by time
  557.  
  558.     Sort messages within the areas by their creation time. This will help
  559.     keeping original messages before their replies. The sorting will only
  560.     affect as much  messages as  are kept  internally (as  specified with
  561.     option -w). If  not all messages  to process are  kept internally the
  562.     sorting will only be partial.
  563.  
  564.  
  565.  
  566.   -osubjectsort messages by subject and time
  567.  
  568.     Sort messages within the  areas by their subject.  This will help you
  569.     to follow echomail  threads with  your message reader.  Messages with
  570.     identical subject are sorted by their  creation time. Leading 'Re: ',
  571.     'Re^2:' etc. in the  subject line are ignored  while sorting, so that
  572.     messages containing a 'Re:'  in the subject appear  near the messages
  573.     with the original subject.  Complete sorting is only  possible if all
  574.     messages to process can be kept internally (see option -w and comment
  575.     in option -otime).
  576.     Please note: while you may like the messages sorted by their subject,
  577.     others may  prefer the  'unordered' style.  If  you have  other nodes
  578.     linked to your system  and sort the messages  by subject, be prepared
  579.     that one or the other node complains about the new look.
  580.  
  581.  
  582.  
  583.   -g<size> remove garbage from packets
  584.  
  585.  
  586.   PacketSorter v1.4                                         page 12/19
  587.  
  588.  
  589.     With this option, PacketSorter  will remove garbage  from bad packets
  590.     instead of refusing  to process  them. If garbage  is removed  from a
  591.     packet, PacketSorter  exactly reports  which packet  it is,  where it
  592.     came from and  which portions  of the packet  have been  removed. The
  593.     original packets may automatically be saved by renaming them to *.bad
  594.     (or  *.b00,  *.b01  etc.  if  the  file  already  exists)  for  later
  595.     examination. You can control if a "bad" packet is renamed to *.bad by
  596.     the value  you  specify for  <size>.  If more  than  <size>  bytes of
  597.     garbage have  been removed  from the  packet, it  will be  renamed to
  598.     *.bad. Thus, -g0  will rename any  packet with removed  garbage and -
  599.     g999999999 is probably  enough to  disable renaming completly.  So if
  600.     you don't care about say 3000 lost bytes, you specify -g3000. If more
  601.     than 3000 bytes are removed, you'll  have the original packet renamed
  602.     for later examination. The valid portions in the packet are processed
  603.     in any case, not regarding whether the  packet is renamed to *.bad or
  604.     not. See section 'Removing garbage from packets' in this document for
  605.     further details.
  606.  
  607.  
  608.   -e<entry>select Archiver entry from cfg file
  609.  
  610.     This option  selects  an  Archiver  entry  which  is  defined in  the
  611.     configuration file.  <entry> is  the key  which selects  the Archiver
  612.     entry from the configuration file. -e<entry> must allways be the last
  613.     option to PacketSorter. Options following -e<entry> will only be seen
  614.     by the uncompression  program selected. When  PacketSorter is defined
  615.     as an archiver program in the echomail tosser, usually [program-with-
  616.     args] is  used to  tell PacketSorter  which uncompression  program to
  617.     call before processing  packets. Some  echomail tossers  (like IMail)
  618.     strip all paths from their uncompression program definitions, so that
  619.     specifying a path to the uncompression program in [program-with-args]
  620.     is not  possible. One  way to  get around  this  would be  to specify
  621.     [program-with-args] in the PKTSORT environment variable, but this way
  622.     only one uncompression  program could  be specified which  is usually
  623.     not enough. Using  -e<entry>, a  complete archiver definition  can be
  624.     retrieved  from  the  configuration  file.   Options  needed  by  the
  625.     uncompression program  may  follow  -e<entry>.  Here  is an  example:
  626.     Assume  you   have   the  following   Archiver   definition   in  the
  627.     configuration file:
  628.  
  629.     Archiver UNZIP c:\packer\unzip.exe
  630.  
  631.     and the uncompression program definition in the tosser is
  632.  
  633.     unzip -d %a %f
  634.  
  635.     Then you can use
  636.  
  637.     PKTSORT -s15000 -osubject -eUNZIP -d %a %f
  638.  
  639.  
  640.   -l<file> log file name
  641.  
  642.     Log processing information to <file>. The default is no logging.
  643.  
  644.  
  645.   PacketSorter v1.4                                         page 13/19
  646.  
  647.  
  648.  
  649.  
  650.   -d<dir>  directory where packets are searched 
  651.  
  652.     Specify dir as the directory where PacketSorter finds FidoNet packets
  653.     to process. Default is the current directory. Be careful if you use
  654.     this option. Squish for example will unpack packet files to the
  655.     current (Squish) directory. It should not be necessary to use this
  656.     option if you let your echomail tosser call PacketSorter (except when
  657.     using FastEcho).
  658.  
  659.  
  660.   -h       help
  661.  
  662.     Display a short help.
  663.  
  664.  
  665.  
  666.   [program-with-args]exec. archiver before processing
  667.  
  668.     Execute  a  program  (with   optional  arguments)  before  processing
  669.     packets. Only packets that  are created by that  program will then be
  670.     processed by PacketSorter. If  the program returns  another code than
  671.     zero, PacketSorter will not process packets. The program will usually
  672.     be an  archives  extraction  program like  unzip.  You  can  let your
  673.     echomail tosser  call  PacketSorter by  specifiying  PKTSORT  as your
  674.     archives extractor  and  using the  actual  archives  processor (with
  675.     options) as  program-with-args.  See "Quick  installation  for Squish
  676.     users"  for   examples.  If   program-with-args  is   not  specified,
  677.     PacketSorter will  process  all  FTS-0001  packets  it  finds in  the
  678.     current directory or that one specified by  -d. This is useful if you
  679.     receive uncompressed packets and  run PacketSorter from  a batch file
  680.     before calling the tosser. See also option -e.
  681.  
  682.  
  683.   8. Setting the options via an environment variable
  684.   --------------------------------------------------
  685.  
  686.   You may  specifiy  the  options  for  PacketSorter  in the  environment
  687.   variable PKTSORT.  This  is  useful if  you  run  PacketSorter  from an
  688.   archiver entry of an echomail processor and the entry field size is too
  689.   short to include all options you would  like to specify. The format and
  690.   syntax is the same as if the options  are given at the command-line. If
  691.   you specify the options via the environment *and* the command line, the
  692.   command line  options  will  overwrite  the  options  specified in  the
  693.   environment, as  long as  [program-with-args] is  not specified  in the
  694.   environment. If  [program-with-args] is  specified in  the environment,
  695.   all command  line  option  are  treated  as  additional parameters  for
  696.   [program-with-args].
  697.  
  698.   Example:
  699.  
  700.   SET PKTSORT=-s15000 -lc:\logs\pktsort.log
  701.  
  702.   pktsort unzip -n %a %f
  703.  
  704.  
  705.   PacketSorter v1.4                                         page 14/19
  706.  
  707.  
  708.  
  709.   is the same as
  710.  
  711.   pktsort -s15000 -lc:\logs\pktsort.log unzip -n %a %f
  712.  
  713.  
  714.   9. Setting the options via a configuration file
  715.   -----------------------------------------------
  716.  
  717.   The configuration file consits of lines starting with a keyword
  718.   followed by a value. All lines not starting with a keyword are
  719.   considered comments. Keywords never start with a semicolon and it is
  720.   good style to preceed comment lines with a semicolon.
  721.  
  722.   There is a 1-to-1 correspondence between the command line options and
  723.   the keywords in the configuration file, so I just present a list of the
  724.   keywords with the corresponding command line option instead of
  725.   repeating all the information contained in the section 'Command line
  726.   options'.
  727.  
  728.   Keyword            command line option      possible values
  729.   -------            -------------------      ---------------
  730.   MessageWindowSize  -w                       1 - 4294967295
  731.   SplitMessages      -s                       8000 - 4294967295
  732.   SplitPackets       -p                       1 - 4294967295
  733.   SortMessagesBy     -o                       Subject or Time
  734.   RemoveGarbage      -g                       0 - 4294967295
  735.   LogFile            -l                       any valid path\file
  736.   PacketDirectory    -d                       any valid directory
  737.   DefaultArchiver    -e                       any valid Archiver entry
  738.   key
  739.  
  740.   The keyword "Archiver" has no corresponding command line option. An
  741.   Archiver entry (definition) in the configuration file looks like this:
  742.  
  743.   Archiver KEY path-and-filename
  744.  
  745.   eg.
  746.  
  747.   Archiver UNZIP c:\packer\unzip.exe
  748.  
  749.   There may be as many Archiver definitions as you like. See option -e
  750.   for details.
  751.  
  752.  
  753.   The file 'pktsort.cfg' is a sample configuration file.
  754.  
  755.  
  756.   10. Packets recognized and created
  757.   ----------------------------------
  758.  
  759.   PacketSorter  will  process  those  packets   that  have  the  filename
  760.   extension .pkt and that have a valid packet id in the packet header.
  761.  
  762.  
  763.   PacketSorter v1.4                                         page 15/19
  764.  
  765.  
  766.   PacketSorter merges all  packets that originate  from the  same node or
  767.   point and contain  the same password.  The name of  the packets created
  768.   will be of the  form ????????.PKT, where ????????  is the creation time
  769.   according to FSC-0015.
  770.  
  771.   PacketSorter uses a  hashing technique to  perform the defragmentation.
  772.   So there  is no  'real' sorting  done  and the  defragmented  areas are
  773.   unordered. The order of the messages  within an area remains unchanged,
  774.   unless the options -otime or -osubject are used.
  775.  
  776.  
  777.   11. Return codes
  778.   ----------------
  779.  
  780.   PacketSorter returns the return code of  the program executed (program-
  781.   with-args)  or  zero.  If  PacketSorter  encounters  any  problem,  the
  782.   original packets  are  retained and  the  tosser may  try  to  toss the
  783.   undefragmented packets.
  784.  
  785.  
  786.   12. Disk space consumption
  787.   --------------------------
  788.  
  789.   PacketSorter  needs  exactly  as  much  additional  disk  space  as  is
  790.   occupied by the packets to process.  This is needed because of security
  791.   reasons.
  792.  
  793.  
  794.   13. Removing garbage from packets
  795.   ---------------------------------
  796.  
  797.   This section is for those who want to understand how garbage is removed
  798.   from packets by PacketSorter in detail.
  799.  
  800.   A (proper) FidoNet FTS-0001 packet consists of a packet header, zero or
  801.   more packed messages and an end-of-packet  marker. The packet header is
  802.   identified by a  packet ID and  is not  of real  interest here, because
  803.   PacketSorter does not  process packets  with an invalid  packet header.
  804.   The packed messages consist  of a packed message  header and four zero-
  805.   terminated strings which  contain the originator  name, the destination
  806.   name, the subject  and the message  text. The packed  message header is
  807.   identified by a packed message ID.
  808.  
  809.   Without specifying -g<size>,  PacketSorter considers  those messages as
  810.   being valid, that have  a correct packed message  ID, a correctly sized
  811.   date field (non-FTS  one-space format is  corrected on  the fly without
  812.   notification) and the  from-name, to-name  and subject not  longer than
  813.   FTS-0001 allows. The  message ID  is the  first two  bytes of  a packed
  814.   message. If a previous  message is not properly  terminated, i.e. there
  815.   are some  extra  bytes following  the  last of  the  four  strings, the
  816.   correct message ID cannot be detected  and you'll get the error message
  817.   'invalid packed message header, skipping packets from...'.
  818.  
  819.  
  820.   PacketSorter v1.4                                         page 16/19
  821.  
  822.  
  823.   Now, if -g<size> is  specified, PacketSorter tries to  repair a grunged
  824.   date field and  truncates too long  from-name, to-name  and subject. If
  825.   one of these is  truncated, from-name, to-name and  subject must not be
  826.   empty and  the message  text must  be longer  than  one byte,  else the
  827.   message will be deleted. If this fails, PacketSorter skips bytes in the
  828.   packet until  a  vaild packed  message  header is  found.  If  the next
  829.   (potential) message  is  found this  way,  PacketSorter is  a  bit more
  830.   restrictive as to  the contents of  this message, because  I don't want
  831.   PacketSorter to  turn "real  garbage" into  messages. The  message must
  832.   start with a packed  message ID (of course),  contain a valid date/time
  833.   field (one or  two spaces format)  and the  lengths of  the first three
  834.   strings must conform to FTS-0001. If one  of these criteria is not met,
  835.   PacketSorter continues skipping bytes  in search for  the next (proper)
  836.   message.
  837.  
  838.   Grunged date repair goes like that: If  it is one-space format, it will
  839.   be corrected  to  two-space format.  If  it is  shorter  than one-space
  840.   format + 2,  longer than 6  characters and  is accepted  by the regular
  841.   expression [0-9A-Za-z:.- ]+  it will  be replaced by  1-1-80. If  it is
  842.   longer than  two-space format  it is  considered uncorrectable  and the
  843.   message will be invalid.
  844.  
  845.   Additionally, PacketSorter continues searching  for messages beyond the
  846.   end of  packet  marker if  the  physical end  of  the file  is  not yet
  847.   reached. In this  case, the  end of  packet marker  is just  treated as
  848.   "garbage". This has a recovery effect because other software might stop
  849.   processing messages  beyond  the  end  of  packet  marker, thus  losing
  850.   messages.
  851.  
  852.   A missing end of  packet marker at the  physical end of  the file (i.e.
  853.   because the packet has been truncated) will be ingnored.
  854.  
  855.   Messages that passed  PacketSorter but contain  other "dangerous" data,
  856.   such as missing or too long origin lines or non ASCII characters in the
  857.   message text may still  confuse other software. If  you want additional
  858.   protection against such messages, you could run GMD (which is great) on
  859.   the packets before or after they have been processed by PacketSorter.
  860.  
  861.  
  862.  
  863.   14. Technology
  864.   --------------
  865.  
  866.   PacketSorter is  written  in C++  and  compiled with  GNU  GCC. Runtime
  867.   system is EMX  for XMS and  VCPI operation and  RSX for  operation as a
  868.   DPMI client. PacketSorter runs  both under OS/2 and  DOS in 32-BIT flat
  869.   memory model.
  870.  
  871.  
  872.   15. What is different in the registered version
  873.   -----------------------------------------------
  874.  
  875.   The unregistered  version says  that it  is  unregistered and  it beeps
  876.   between 20:00 and 20:59. The registered version does not do this.
  877.  
  878.  
  879.   PacketSorter v1.4                                         page 17/19
  880.  
  881.  
  882.  
  883.   16. Other operating systems
  884.   ---------------------------
  885.  
  886.   PacketSorter might  be used  on other  operating  systems than  DOS and
  887.   OS/2, as long as they run  on an i386 (or higher). If  you choose to go
  888.   that way you are probably on your own, as several questions may arise I
  889.   cannot answer  (eg. how  do I  call  a native  MS-Windows  program from
  890.   within Squish running in MS-Windows DOS emulation).
  891.  
  892.   Also note that you must not  distribute PacketSorter in another form as
  893.   in  the   original  distribution   archives.  If   you  come   up  with
  894.   PacketSorter for another  opertating system,  you may  use it  only for
  895.   your own purposes.
  896.  
  897.  
  898.   native MS-Windows
  899.  
  900.     If you'd like to run PacketSorter  as a native MS-Windows application
  901.     (rather than  in  Windows'  DOS  emulation)  get  the archives  named
  902.     rsxwin2a.zip  from   the  FTP-server   ftp.uni-bielefeld.de   in  the
  903.     directory  /pub/systems/msdos/misc. RSXWIN is free software by Rainer
  904.     Schnittker.
  905.  
  906.     Follow  the  instructions   contained  in   that  archives   to  make
  907.     PacketSorter run as a native  MS-Windows application. (Simply execute
  908.     'RSXWIN.EXE -e PKTSORT.EXE [options]'.) When I tried it, it seemed to
  909.     work pretty good.
  910.  
  911.  
  912.   Linux/Unix/Nextstep
  913.  
  914.     If you are a programmer: the  distribution archives contain the files
  915.     needed to  link  the  PacketSorter executable  (except  for  some FSF
  916.     libraries) in the sub-archives devobj.zip. Maybe you are able to link
  917.     the .o files under Linux or other  operating systems using an i386. I
  918.     never tried this, but if  you do, I'd be  interested in hearing about
  919.     your experiences.
  920.  
  921.  
  922.   17. Author
  923.   ----------
  924.  
  925.   The autor of PacketSorter is Rolf K. Wilms. He may be contacted via
  926.  
  927.   Fidonet:      Rolf Wilms@2:2447/107.8
  928.                      or
  929.                 Rolf Wilms@2:2445/10.9 (R24-Classic)
  930.  
  931.   Internet:     rwilms@kottan.bo.open.de
  932.  
  933.  
  934.   Fido via Internet:
  935.  
  936.                 Write a netmail to UUCP@1:105/42
  937.  
  938.  
  939.   PacketSorter v1.4                                         page 18/19
  940.  
  941.  
  942.  
  943.                 and make the following line the FIRST line in
  944.                 the message text:
  945.  
  946.                 to: rwilms@kottan.bo.open.de
  947.  
  948.  
  949.   Mail:         Rolf K. Wilms,
  950.                 Franziskastr. 44a,
  951.                 45131 Essen,
  952.                 Germany
  953.  
  954.   Comments and bug reports are welcome.
  955.  
  956.  
  957.   18. Contents of the distribution archives
  958.   -----------------------------------------
  959.  
  960.   The original distribution archives of PacketSorter contains the
  961.   following files:
  962.  
  963.       pktsort.doc    this file
  964.       license.doc    PacketSorter copying and usage license
  965.       order.frm      how to get your registration key
  966.       pktsort.exe    PacketSorter executable for DOS and OS/2
  967.       register.exe   program that turns PKTSORT.EXE into the 
  968.                           registered version (you need a 'key', see 
  969.                                license.doc and order.frm)
  970.       pktsort.cfg    sample configuration file
  971.       emx.exe        EMX runtime module for DOS
  972.       emx.dll        EMX runtime module for OS/2
  973.       emxrt.doc      Advanced installation information for EMX
  974.       rsx.exe        DPMI compliant DOS-extender
  975.       file_id.diz    a small description of PacketSorter
  976.       desc.sdi       an even smaller description of PacketSorter
  977.       history.doc    what has been done
  978.       upgrade.doc    upgrading PacketSorter from earlier versions
  979.       devobj.zip     contains the files needed to link a new
  980.                      PKTSORT executable
  981.       otherlic.zip   contains licenses of the free software used by
  982.                      or aggregated with PacketSorter.
  983.  
  984.   The sub archives otherlic.zip contain the following files:
  985.  
  986.       copying        GNU General Public License
  987.       copying.lib    GNU General Public Library License
  988.       copying.emx    EMX Copying License
  989.       copying.rsx    RSX Copying License
  990.  
  991.   The sub archives devobj.zip contain the following files:
  992.  
  993.      hash.o, makefile.pst, mkkey.o, offset.cc, pktsort.o, readme.dev,
  994.      reginfo.h, register.cc
  995.  
  996.  
  997.   PacketSorter v1.4                                         page 19/19
  998.  
  999.  
  1000.   19. Thanks
  1001.   ----------
  1002.  
  1003.   Thanks to Peter Scheffer, Peter Kaszanics,  Robert Dahlem and Johann H.
  1004.   Addicks for their suggestions and for testing PacketSorter.