home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / programme / trionbbs110 / Trion / docs / Utils / MailDecode.doc < prev    next >
Encoding:
Text File  |  1998-10-06  |  2.9 KB  |  86 lines

  1.  
  2.  
  3.  
  4.    =====( MailDecode V1.00 )=============================================
  5.  
  6.  
  7.         Trion 'MailDecode' Utility.
  8.  
  9.         (c) Copyright Paul Spijkerman, 1997. All rights reserved.
  10.  
  11.         Written for use with the Trion BBS package.
  12.  
  13.  
  14.    ===================================================================
  15.  
  16.  
  17.    Maildecode is a program to decode files from text files.
  18.    It was especially written to handle mail packets and more
  19.    specific to be called by the trion mail processor.
  20.    At this moment it can handle UUencoded and Base64 encoded files.
  21.  
  22.    There are a number of decode programms but they all seem
  23.    to have some problems.
  24.    they don't work with mail packets because they need a
  25.    specific line format. They only do 1 type of decoding,
  26.    and they are not very smart.
  27.  
  28.    So I started to make a smart programm with all the important
  29.    types of protocols I could find.
  30.    I tried to write it as a 'state engine' so it can be easily
  31.    integrated in other programms .. so at one time it may
  32.    be a part of the trion mail processor.
  33.  
  34.    At this moment it doesn't look at start codes but it checks
  35.    every line if it could be the first line of a coded file,
  36.    and if it is it has a protocol to check if the folowing
  37.    lines are part of that file.
  38.    The first line has to fit the rules of the protocols and
  39.    also contain at least 40 encoded bytes, the next lines only
  40.    have to fit the rules of the protocol it found earlier
  41.    with the first line.
  42.    Also it doesn't have buffers yet, it seems to be quit .. accept
  43.    if it not only reading the text file but also writing the
  44.    uncoded file.
  45.  
  46.    It decodes UUencoded en Base64 coded files.
  47.    But i had to take a little step back at the smart part,
  48.    because UUEncoded programmas don't follow the protocols.
  49.    Some decoders start all the UUencoded lines with an 'M' .. but
  50.    the first character of the line is actually the value for
  51.    the number of characters on a line .. and 'M' means that after
  52.    the 'M' follow 76 coded characters.
  53.    So when a line starts with an 'M' the line is also accepted
  54.    when the length is not correct. Some coders go even further
  55.    by using the 'M' and putting an uneven number of coded bytes
  56.    on a line .. this is not accepted by the maildecoder.
  57.  
  58.  
  59.    You have to call the maildecode programm with the text
  60.    it should decode on the commandline folowed with
  61.    an optional path. The default path is RAM:
  62.  
  63.  
  64.    MailDecode 00000000.PKT
  65.  
  66.    Decodes files and writes them to RAM:
  67.  
  68.  
  69.    MailDecode 00000000.PKT   dh1:test/
  70.  
  71.    Decodes files and writes them to DH1:TEST/
  72.  
  73.  
  74.  
  75.    If you use the Trion mail processor with -F flag while
  76.    unpacking it tries to decode files in the mail by calling
  77.    the mail decode programm.
  78.  
  79.    It calls MailDecode after a mail packet was succesfull processed 
  80.    with the "trion:inbound/decode/" path so you have to make that
  81.    one for it to work.  Also it uses the Quiet flag but that
  82.    isn't implemented yet in maildecode.
  83.  
  84.  
  85.  
  86.