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

  1.  
  2.  
  3.  
  4.    =====( TMP V1.10 )=============================================
  5.  
  6.  
  7.         Trion 'Mail Processor' Utility.
  8.  
  9.         (c) Copyright Paul Spijkerman, '95-'98. All rights reserved.
  10.  
  11.         Written for use with the Trion BBS package.
  12.  
  13.  
  14.    ===================================================================
  15.  
  16.  
  17.    The mail processor is the programm that processes echomail and
  18.    (routed) netmail. It supports file attaches, points (fully 4D)
  19.    Nodelists with points and a pointlist.
  20.  
  21.    The mail processor can use any Archiver programm
  22.    to compress (pack or unpack) mail. There is a text
  23.    file where you can configure how an archiver is to be used
  24.    for packing and unpacking per archiver and how archive types
  25.    are to be recognized.
  26.    You can configure an archive methode for each node number.
  27.  
  28.    The mail processor has an option to not touch ARJ and ARC
  29.    packets for security reasons.
  30.  
  31.    The mail processor uses (optional) dupe checking to prevent
  32.    duplicate being send on.
  33.  
  34.    The mail processor has an option to decode UUencoded and
  35.    Base64 coded files while unpacking mail.
  36.  
  37.    The mail processor has an option to backup all archives and packets
  38.    it processes.
  39.  
  40.    It produces packets up to 250 KBytes instead of the old 60 Kbytes
  41.    for less overhead while archiving, beter compression, more speed
  42.    and smaller log files.
  43.  
  44.    For processing mail there is a script called 'mail' in the
  45.    'trion:scripts/'  directory which takes care of all processing.
  46.    You can use it from a shell or script , or have it
  47.    executed by a cron util or in a logout or incoming script.
  48.  
  49.    The Mail processor (script) is startable with a hotkey.
  50.    (Default right-amiga-escape) installed with the
  51.    TrionHotkeys program.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.    Unpacking mail:
  58.    ---------------
  59.  
  60.    When there are packets and mail archives in the inbound
  61.    directory you have to Unpack it. Usually this will be done
  62.    to start the mail processor in the mail script (trion:scripts/mail).
  63.    The default mail script will handle all the unpacking and packing
  64.    of mail.
  65.  
  66.    Unpacking is done by calling:   "TMP U"
  67.  
  68.    You might want to use the -B flag while unpacking mail to
  69.    backup all processed archives and packets to the mail backup
  70.    directory (Trion:inbound/backup/). Where you can access the
  71.    files when something went wrong.
  72.  
  73.    You might want to use the -F flag while unpacking mail to
  74.    decode UUencoded or Base64 coded files from mail packets.
  75.    They will be stored in "Trion:inbound/decode/" by starting
  76.    the "MailDecode" programm in "trion:utils".
  77.  
  78.    You might want to use the -C flag while unpacking to check for
  79.    duplicate messages. If there are messages unpacked which are
  80.    already in the message base they are moved to a section with
  81.    tagname DUPES, and if that tagname doesn't exist they are
  82.    moved to a section with tagname BAD.
  83.  
  84.    When you call the mail processor with the -G flag it will
  85.    move echomail messages with no Origin, Seen-by: of path
  86.    lines are moved to a "BAD" section.
  87.  
  88.  
  89.  
  90.  
  91.  
  92.    Packing:
  93.    --------
  94.  
  95.    Packing is processing new messages to see if they are to be
  96.    send to your boss, your nodes or your points.
  97.    
  98.    Packing is done by calling:    "TMP P"
  99.  
  100.  
  101.    Archiving netmail while packing mail is optional.
  102.    Default it is off, when you want netmail archived
  103.    you have to use the -N flag at the command line.
  104.  
  105.    When netmail is archived it will be in separated
  106.    archives from echomail.
  107.    This is a precaution, because how larger an archive the bigger
  108.    the change something goes wrong with it (and loose netmail).
  109.  
  110.    Note that that LHA is the default Archiver when there is
  111.    no archiver mentioned in the systems.cfg because LHA
  112.    archives can also be processed on NON-Amiga systems unlike
  113.    LZX archives. So when you crashmail netmail to a PC-based
  114.    system the messages can be unpacked.
  115.  
  116.    There is an optional flag to the mail processor to check
  117.    if the recipient node of netmail exists by checking all
  118.    node and point lists. If it doesn't exists, the netmail
  119.    won't be exported.
  120.  
  121.    Note that the last option should only be used if you
  122.    have complete nodelists (like the whole fido nodelist)
  123.    and all your points in a pointlist.
  124.    And install all nodelist updates.
  125.  
  126.  
  127.    Linking:
  128.    --------
  129.  
  130.    Linking the messages in your message base means that the mail processor
  131.    compares each message in an area with each other to check if the msg is
  132.    a reply or an original to this message.
  133.    This data is stored in the message base and displayed beneath messages
  134.    while reading the mail.
  135.    You can see to which message this is a reply and how many replies a
  136.    message has.
  137.    Also this data is needed for the '+'reply and 'o'original options
  138.    while reading mail.
  139.    You can run the mail processor once a nigth after all other
  140.    mail processing is done.
  141.    You can for instance let the sceduler or a cron util start it.
  142.  
  143.    Linking is done by calling:    "TMP L"
  144.  
  145.  
  146.  
  147.    Making a dupebase:
  148.    ------------------
  149.  
  150.    When you already have messages in your messages base and you
  151.    want to start using dupechecking you have to make a dupebase.
  152.  
  153.    If you use dupechecking and you removed old messages from the
  154.    messagebase .. you have to make a new dupebase so all the
  155.    messages that are no longer in the message base are also removed
  156.    from the dupebase and it doesn't grow endlessly.
  157.  
  158.    Making a dupebase is done by calling:    "TMP M"
  159.  
  160.    Note that there is a TrimMsgs script in "trion:scripts/" that
  161.    calls the RMCommander to trim msgs and calls Tmp to make
  162.    a new dupebase.
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.    Dupe checking:
  170.    --------------
  171.  
  172.    The trion mail processor supports (optional) dupe checking.
  173.    So when the mail processor while unpacking encounters a
  174.    message which is already on your system it is moved
  175.    to a BAD or DUPES area and isn't send to your nodes.
  176.  
  177.    The problem with a duplicate message checking system is to 
  178.    considerate the loss of speed and the use of memory.
  179.    The more Memory use the speedier the programm.
  180.  
  181.    I decided on a brute force system with maximum speed/memory
  182.    use. When the mail processor is started in Unpack mode it
  183.    loads the DupeBase in memory .. then it Unpacks and adds
  184.    new message to the database .. when the mail processor
  185.    is finished and if the DupeBase is changed it is written
  186.    to disk.
  187.  
  188.    In an older version of the mail processor when you wanted to Use
  189.    dupe checking, you first had to make a DupeBase by running:  TMP M
  190.    Later I added some code that when the mail processor is started
  191.    in Upack with DupeCheck mode, and there isn't a DupeBase that
  192.    it will make a DupeBase)
  193.  
  194.    Note that the DupeBase keeps growing, so when your system
  195.    discard messages (trimmsgs) .. you also have to make
  196.    a new DupeBase with   TMP M
  197.    But this is much faster than the trimming of the messagebase.
  198.  
  199.    Duplicate messages are stored in an echomail area with the
  200.    TagName "BAD" .. unless there is an echomail area with the
  201.    TagName "DUPES" .. then they are stored in that area.
  202.  
  203.  
  204.    Some statistics:
  205.  
  206.    (note: my system is a 68030/25Mhz/5MB one (A2000/A2630))
  207.  
  208.    When i started i had about 15.000 msgs taking 38,5 MB on my HD.
  209.  
  210.    But when I took most of the numbers down it was trimmed to
  211.    12.700 messages with 34.2 MB .. so I will only give those
  212.    numbers.
  213.  
  214.    Messages:   12700    Taking 34.2 MegaBytes of disk space.
  215.  
  216.    After a 'TMP M' the DupeDatabase on disk was  58180 bytes.
  217.    But the system needed 200 KB to make the database.
  218.    The DupeBase was made in exactly one minute and 2 seconds.
  219.  
  220.    When the unpacking mode is started it took 2 seconds
  221.    to load the DupeBase and store it in memory.
  222.    It needs 160 KB in memory when loaded.
  223.  
  224.    When unpacking is ready it needs about 4 seconds to store
  225.    the DupeBase and discard it from memory.
  226.  
  227.    Note: that the amount of memory needed is proportional with
  228.    the number or messages on your system.
  229.  
  230.    Note: that the memory use was measured in DEBUG mode, which
  231.    uses MORE memory and system time than normal use because it
  232.    checks if the memory boundaries where violated.
  233.  
  234.    Note: the DupeBase takes more memory in memory than on Disk
  235.    because it is stored in a 'Tree' form, so it only has to
  236.    check a tiny amount of the list to see if the msg is in the
  237.    DupeBase.
  238.  
  239.    Note: in the MakeDupeBase mode the DupeBase needs a little more
  240.    memory because it doesn't remake the list, so it doesn't
  241.    fragments the memory and it is fast. But the memory use is
  242.    only a little bit higher because of a smart way of extending
  243.    the lists.
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.    Routing:
  251.    --------
  252.  
  253.    If a netmail message has to be send out and there wasn't typed
  254.    a route address while editing the message the system checks in
  255.    the route.cfg if there is a node number to send it to.
  256.  
  257.    When checking the route.cfg it is noted if the found route node
  258.    is an exact match or a matching wildcard, this is important for
  259.    the route function.
  260.  
  261.    If the netmail message is for a node, it just gets routed with
  262.    a matching entry or matching wildcard in the Route.cfg.
  263.  
  264.    If the netmail message is for a point, first it checks if there
  265.    is an exact routing match in the route.cfg, if there isn't
  266.    it checks if the message is for a point from this system, if it
  267.    is it is send directly. If there still is no route it will first
  268.    check if the boss is in the Route.cfg .. and if that's a negative
  269.    it will check if there was a matching wildcard found when checking if
  270.    there was an exact route match for this point number.
  271.  
  272.    With this system you don't have to have any points in your
  273.    route.cfg , it is al done automatically for your points.
  274.    But if you place one of your points in the route.cfg you can
  275.    route the netmail for that point through other systems.
  276.    All netmail for points who are not yours are routed to
  277.    their boss, or themselfs or the best wildcard match.
  278.  
  279.  
  280.  
  281.  
  282.    Gating E-mail and newsgroups:
  283.    -----------------------------
  284.  
  285.  
  286.    It is possible to configure the mail processor so it
  287.    can cooperate with the AmiGate program which gates
  288.    newsgroups and E-mail .. AmiGate will convert the
  289.    fido style archives to Inet style archives and
  290.    put them in the UUSpool directory of the software
  291.    that transfers mail with your provider.
  292.  
  293.    If you want to use this option all mail for the
  294.    link has to be Archived, so you have to use the
  295.    "archive netmail" option of the mail processor.
  296.  
  297.    The program Amigate expects the fido style packets it needs
  298.    to archive with a fixed name. But the mail processor
  299.    makes packets and archives with a random name.
  300.    This can be done by changing the archive.cfg
  301.  
  302.    When you add the folowing entry to the archive.cfg
  303.    a script will be started to process the packet instead
  304.    of an archiver. If you use this you have to have a
  305.    corresponding node in the systems.cfg with UUCP
  306.    as archiver instead of an archiver like LHA or LZX
  307.  
  308.    Example archive entry:
  309.  
  310.  
  311. ARCHIVETYPE   "UUCP"
  312. EXTENSION     ""
  313. RECOGNIZE     FF FF FF FF
  314. EXTRACT       ""
  315. ARCHIVE       "execute trion:scripts/gatemail.scr %s"
  316. #
  317.  
  318.  
  319.    You also need a script in the Trion:Scripts directory
  320.    to start the AmiGate program.
  321.    What it does is renaming the packet to a fixed
  322.    name and starting AmiGate .. which will process
  323.    the packet and delete it.
  324.    Also the script deletes the .flo files because
  325.    the file would grow and never be deleted.
  326.  
  327.    With this script you would have something like this in
  328.    you systems.cfg:
  329.  
  330.    2:283/326.999  UUCP  PASSWORD     ;Gate adress
  331.  
  332.    Example script:
  333.  
  334.  
  335.  
  336. .KEY  packet
  337. ;.DEF file=nix
  338. .BRA  [
  339. .KET  ]
  340.  
  341. rename [packet] trion:outbound/2.283.326.999.GAT
  342. uucp:c/amigate gatepkt
  343. delete trion:outbound/2.283.326.999.FLO
  344.  
  345.  
  346.  
  347.    Also you can use this system to archive all the mail for
  348.    one person and send it to them once in a while
  349.    via Inet. Don't know if there are programs to actually
  350.    automate the last bit but YamGate was mentioned
  351.    for this purpose.
  352.  
  353.    Note that you need to add an entry to the archive.cfg
  354.    for each archive with a unique name. You could use
  355.    the first name of the person as archivername.
  356.    Also you need a separate script for each system.
  357.  
  358.    A script for that use would look something like this:
  359.  
  360.  
  361.  
  362. .KEY  packet
  363. ;.DEF file=nix
  364. .BRA  [
  365. .KET  ]
  366.  
  367. lha a trion:outbound/username.lha [packet]
  368. delete trion:outbound/2.283.326.100.FLO
  369.  
  370.  
  371.  
  372.  
  373.