Soup<->PKT Converter.                                                 v 3.0
===========================================================================

TABLE OF CONTENTS
 1.  Concept
 2.  Requirements
 3.  Fidonet mail processor configuration
 4.  Usage
   4.1  The long address problem
   4.2  Converting from SOUP to PKT
   4.3  Converting from PKT to SOUP
 5.  Mailing lists handling
 6.  FTPMail
 7.  MIME and Base64 Attachments.
 8.  Routing ARCmail packets with soup2pkt
 9.  Configuration. SOUP2PKT.CFG
10.  Tech data.
11.  Usage as a GateWay. Information for sysops
12.  License agreement
13.  Where to find me

1. CONCEPT
   This little utility converts mail and usenet news packets retreived with
   any soup compliant client to Fidonet PKTs and viceversa. Thus you can use 
   any Fidonet program to manage your internet email and news messages and 
   keep it in any existing or "to-exist" fidonet message base.

   This is the idea:
    In your tosser/scanner configuration yo must create a new fidonet 
   address (AKA). I recommend creating a fake point. For example: 
   99:999/99.9. You'll use that point address to manage all your incoming 
   and outgoing messages. Soup2pkt will create PKTs from soup packets. Then 
   you'll use your fave tosser to toss all your email and news messages into
   your message base. Now you can read, reply, forward, filter, etc your 
   messages with your fidonet editor, or any other utility.

    When you want to send messages you'll write them in your editor and
   scan them. You'll convert to MSG the PKTs created by your scanner and 
   you'll send them with your soup client. 

    It's that easy!

2. REQUIREMENTS

    Soup2pkt requires very little. It should work on a 286 with DPMI
   capabilities and any version of DOS or OS/2.

3. FIDONET TOSSER CONFIGURATION

    The first thing you have to configure in your tosser is the Fido address
   that you'll use to manage all your internet mail and newsgroups. THIS 
   SHOULD BE A FAKE ADDRESS AND UNDER NO CIRCUMSTANCES SHOULD IT BE YOUR 
   FIDONET ADDRESS (unless you set 'FROMPOINTTONODE').

    The default configuration is for a point, but soup2pkt can work as a node
   too. In this case the fido address _needs not to be fake_. As example, if 
   your fido address is 2:348/613 you could set your address in soup2pkt.cfg
   to 2:348/613.999 setting 'FROMPOINTTONODE'. Thus, the incoming internet
   mail would have 2:348/613.999 as origin address and 2:348/613 as destination
   address. For exporting mail it'd work just the other way around.
   Note: This is only posible in the PRO version.

   Areas?
   If your tosser allows auto-creating areas you are in luck, because it'll 
   create an email area for your email and as many areas as newsgroups your
   are receiving. The email area will have the areatag that you specified 
   in the soup2pkt.cfg and the newsgroup aretags will be the same as their 
   name. But if your tosser doesn't have that feature you'll have to create 
   them "by hand". The email area should be named the same that in 
   soup2pkt.cfg and the newsgroup areas should be named the same as their 
   names in the news server.

   You can also use your netmail area as the email area.

4. USAGE

 4.1 THE LONG-ADDRESS PROBLEM

    Fidonet address cannot be longer that 36 chars. This could be 
   insufficient for all internet address, as they can be longer that 36 
   chars.

    According to RFC-822 the Internet address syntax is variable. These are
   the address syntaxes that soup2pkt can work with:
     1) jffraiz@poboxes.com
     2) jffraiz@poboxes.com (Jose Maria Franco Fraiz)
     3) Jose Maria Franco Fraiz (jffraiz@poboxes.com)
     4) jffraiz@poboxes.com <Jose Maria Franco Fraiz>
     5) Jose Maria Franco Fraiz (jffraiz@poboxes.com>
     6) "Jose Maria Franco Fraiz"<jffraiz@poboxes.com>
   The second type is the most popular and the one I recommend.

   But, What's soup2pkt do when if finds a longer address?
   All address formats will be converted to the sencond type, so if the whole
   address doesn't fit in the 36 chars soup2pkt will trim some of the comment.
   In case it's the address itself (without the comment) what doesn't fit 
   soup2pkt will write 'Message' in the PKT from field and the first line
   of the message body will be like this:
    From: that@longer.than.36.characters.address (whatever the comment)

   If you need to send a message to an address longer than 36 chars you can use
   the ancient method that existed for UUCP gating fidonet to internet.
   If soup2pkt finds a message addressed to UUCP it will look in the first line
   body for the address, which has to be written in this format:
      To: that@longer.than.36.characters.address.

 4.2 CONVERTING FROM SOUP TO PKT:

   Command line: soup2pkt i
   All the soup header reference lines are converted to hidden lines.
   If a PKT with the same name already exists the new messages will be
   appended.

 4.3 CONVERTING FROM PKT TO SOUP:

   Command line: soup2pkt e
   If there's already a mail.msg or news.mgs waiting to be send soup2pkt
   will append all new messages to these files.
   These files will be placed in the SOUPPATH directory as specified at
   soup2pkt.cfg.

5. MAILING LIST HANDLING

   If you give soup2pkt any substring to recognize a mailing list and the
   address you have to post to soup2pkt will create the area you tell it and 
   will put all mail comming from that address in that area and all mail you 
   write in that area will be sent to the posting address. Read the sample 
   soup2pkt.cfg on how to do this. It's very easy.

    Limits for the number of mailing lists soup2pkt can handle are as follows:
      10 for the Light version.
    1024 for the PRO version.

6. FTPMAIL CONFIGURATION

   Soup2pkt can be make FTPMail very confortable. It will create the ftpmail
   message for you and can keep all ftpmail-related messages in a separete
   area in your message base. It can also be used to allow sysops who use
   soup2pkt as a gateway to serve user ftpmail requests.
   First thing you have to do is create an area in your tosser's config named
   'FTPMAIL'. When you've done that you start requesting files by writing 
   messages in your ftpmail area like this one:

     From: Sysop's or user's name
     To:   ftp.cdrom.com
     Subj: os2/comm/zoc323.zip

   Soup2pkt will create an email addressed to your ftpserver merging the 
   file ftpmail.scr with the data it gets from this message's header. In the
   to field you specify the ftp server you want to get a file from, and in the
   subject field you specify the file you want to get with its full path with
   Unix style ('/' instead of '\').
   
   Soup2pkt uses a file named 'ftpmail.scr' to build the ftpmail
   message. You can edit and change this file to suit your needs. There are
   arguments that soup2pkt gets from the requesting message header. They are
   these:
     %1: Substitutes the ftpserver (gotten from the to field)
     %2: Substitutes the directory in which the requested file is (gotten from
         the subject field).
     %3: Substitutes the requested file name (also gotten from the subject
         field).

   Note for sysops who use soup2pkt as a gateway: If you don't want your users to
   be able to make ftpmail requests just don't let them write in this area.

   Tip: You can use a filter to have the ftpmail responses in the ftpmail area.

7. MIME AND BASE64 ATTACHMENTS

   Soup2pkt can decode any base64 attachment it gets and can send attachments
   in such a manner as well. Soup2pkt can encode high ascii codes in quoted-
   printable or 8bit, being 8bit coding default.

   To send any file as an attachment just send a netmail to the gateway address
   with the file-attach as if it were a Fidonet file-attach netmail. Soup2pkt
   will go for the file and encode it inside the email message using the MIME
   and base64 algorithm.

   Soup2pkt is also capable of decoding uuencoded attachements.

8. ROUTING FIDONET PACKETS THRU THE INTERNET

   This feature is only enabled in the PRO version.

   Now soup2pkt can be used to route fidonet packets to other fidonet systems 
   thru the internet, avoiding long distance calls and having your mail 
   delivered in a matter of seconds. First thing you have to do is configure 
   your uplinks/downlinks in your soup2pkt.cfg:
     ROUTE  1:123/456   clinto@white.house    PaSsWorD
   Thus, when soup2pkt scans the netmail area for dinamic systems as Front
   Door and all the outbound directory tree in static systems as Binkley, if it
   finds any outgoing mail for 1:123/456 it will encode the attachment in a 
   MIME email message and it will send it to clinton@white.house. Then soup2pkt
   will truncate and copy the packet to a directory named TEMP right bellow the
   soup2pkt directory. This is done so the mail doesn't get lost if the packet
   doesn't make it to the other side, so you can send it again. The process ends
   here if there is not another soup2pkt at the other end.

   If there is, the other soup2pkt will have to have a line like this in its
   soup2pkt.cfg:
    ROUTE  2:348/512    al.gore@white.house   PaSsWorD
   Both passwords have to be identical. Thus, this soup2pkt will be able to 
   determine the integrity of the attachment and it will check the password. 
   If the packet is not OK or the password is wrong the message will be 
   ignored (left in the decode directory), but if everything went well soup2pkt
   will place the packet in your INBOUND directory ready to be tossed, plus it 
   will generate a receipt for the other system to tell them the packet came 
   thru alright.

   When such message is received by the other system soup2pkt will delete the
   packet placed at the TEMP directory, and the process is done.

   THIS SYSTEM DOESN'T ROUTE NETMAIL SO ALL NETMAIL YOU SEND THRU THIS HAS TO
   BE PACKED. Read your mail processor on how to pack netmail. If your system
   is static you don't need to worry about this.

9. CONFIGURATION

  I have written an example configuration. Modify it as you wish and rename it
  to soup2pkt.cfg.
  Soup2pkt can use alternative config files (other than soup2pkt.cfg). This is
  done from the command line. For example:
   soup2pkt i /c:\temp\other.cfg
  This will convert soup to pkt using c:\temp\other.cfg as config file.

  These are the supported commands:

  IDIOM [language]
    Valid values are 'english' and 'castellano'

  MYMSGS [areatag] (optional)
    If present soup2pkt will move to 'areatag' all messages coming from your
    organization.

  TIMEZONE [string] (optional)
    Soup2pkt will add string to the end of the Date reference line when exporting
    messages.
    For example: GMT +002

  EMAIL [areatag/'netmail']
    If you specify an aretag soup2pkt will use that echo-area to store your
    email.
    You will use that area to write/read your email. If you set 'netmail' your
    email will be converted to netmail and you'll have to send your email from
    your netmail area. Examples:
      EMAIL my.email.area
      EMAIL netmail

  FIDOPASSWORD [password] (optional)
    Sets the password soup2pkt will create pkts with. If not set soup2pkt won't
    put any password in the pkts it creates.

  FIDOADDRESS [fidonet 4d-address]
    It will be the gateway address. Net/echo-mail sent to that address will be
    exported to the Internet. Note it has to be a POINT address. See
    FROMPOINTTONODE for further explanation on how soup2pkt works.

  ENCODING ['8bit'/'quoted-printable'] (optional)
    Sets the encoding method soup2pkt will use when creating internet messages.
    Default is 8bit.

  LOGPATH [path] (optional)
    Where soup2pkt will store its log file. Default is current directory.

  DOMAIN
    Your internet domain.

  ATTACHMENTS ['kill'/'decode'] (optional)
    Sets what soup2pkt will do upon receiving a message with MIME/base64 or
    uu/xxencoded attached file. This command is preserved for backwards
    compatibility. From soup2pkt 3.0 NEWSATTACHMENTS and EMAILATTACHMENTS
    will be used.

  NEWSATTACHMENTS ['kill'/'decode'] (optional)
    Sets what soup2pkt will do when receiving encoded files in newsgroups.
    Default is 'decode'.

  EMAILATTACHMENTS ['kill'/'decode'] (optional)
    Sets what soup2pkt will do when receiving encoded files in email.
    Default is 'decode'.

  REPLY-TO [email address]
    Reply-to reference line used when exporting messages.

  ADDRESS [email address]
    Your email address.

  STRIPHTML (optional)
    If set soup2pkt will strip HTML codes from incoming messages.

  NOKLUDGES
    If set soup2pkt won't convert reference lines to kludges when importing mail.

  ROUTE [fidonet address] [email address] [password]
    Read 'Transporting fidonet mail with soup2pkt' on this. You can define up to
    1024 ROUTE statements with the PRO version and 1 with the Lite version.

  AKA [email address] (optional)
    An aka for your email address. You can set as many as 1024.

  ORIGINLINE ['an origin'/'organization']
    Sets the origin line used by soup2pkt to create its pkts. If set to
    'organization' soup2pkt will put the Organization reference line of the
    incoming message in the Origin line.

  BOOK [one word name] [email address]
    When soup2pkt finds that name in the to field of an outgoing mail it will
    send it to that email address. You can define as many as 1024 BOOK entries.

  POINT [name], [4d fidonet address]
    If soup2pkt finds an email sent to 'name' it will create a netmail and
    address it to '4d fidonet address'. If that address belongs to your node you
    just need to specify the point number. Examples:
      POINT John Doe, 1:325/298.8
      POINT Jack, 4

  NETMAIL [netmail path]
    The path where your netmail (FTN *.MSG) is stored. Used in dinamic routing
    systems.

  NAME [your name]
    No explanation.

  REGNUM [registration key]
    No explanation.

  ORGANIZATION [organization line]
    Organization reference line used when exporting mail to the internet.

  FROMPOINTTONODE
    If set soup2pkt will operate as if the internet were a point hanging from your
    system and you where the node. For example let's say your fidonet address is
    1:235/323, you could set FIDOADDRESS to 1:235/323.999. This way, in order to
    send mail to the internet you would address your mail to 1:235/323.999 and
    mail imported from the internet would be coming from 1:235/323.999 to
    1:235/323.0. This statement only works with the PRO version, and enables all
    the email gating for your users.
    If you are not a node I recommend you to use a fake address. For example:
    99:999/99.9. Internet mail would be coming from 99:999/99 to 99:999/99.9 and
    you would address your outgoing internet mail to 99:999/99.

  FILTER [newsgroup/email/all] [field] [substring] [action] [areatag]
    Valid actions are: kill, copy, move
    In case action is kill there's no need for an areatag.
    Substring has to be between "".
    Field can be any reference line as well as 'body' or 'header'.
    Examples:
     FILTER comp.os.os2.announce Subject "meeting" kill
      This would not import any message in comp.os.os2.announce including the
      word "meeting" anywhere in its subject line.
     FILTER email header "soup2pkt" move soup2pkt.related
      This would move all email messages that have the word "soup2pkt" anywhere
      in the header part of the message to an area called soup2pkt.related.
     FILTER All body "wanna make money" copy pyramidal.scheme
      Probably you already know what this would do.

  MAILINGLIST [substring] [posting address] [areatag]
    When soup2pkt finds 'substring' anywhere in the email message header it will
    move this message to 'areatag'. All messages you write in areatag will be sent
    to 'posting address'.
    Substring can be more than one word. In that case it has to be between "".

  INBOUND [directory]
    Where soup2pkt will put the pkts it creates. Should be the same as your
    mailer's inbound directory.

  OUTBOUND [directory]
    Where soup2pkt looks for pkt to be exported to the internet. Should be the
    same as your mailer's outbound directory. In binkley style systems this is
    the root directory of your outbound.

  SOUPPATH [directory]
     Where soup2pkt looks for/places the soup files.

  DECODEDIR [directory]
     Where soup2pkt places the files it decodes.

  LOGMESSAGE [areatag/'netmail']
     If set soup2pkt will send its last activity log to areatag or the netmail
     area.

  FROMARCMAIL [sender name]
     Some dinamic tossers don't create the arcmail bundles from 'Arcmail' but
     from other names. By default soup2pkt will look for messages from
     'Arcmail'. If you have one of these tossers you can use this command to
     avoid this.

  JUNKMAIL [areatag/'kill']
     All email message that don't contain your email address in the To: field will
     be moved to 'areatag'. In case you set this to 'kill' those messages will be
     erased. If you don't specify this command there won't be any treatment to
     areatag.

  FTPMAIL [ftpmail server's address]
    Your ftpmail requests will be sent to this address.


9. TECH STUFF

     It reads and writes SOUP 1.2 packets. It creates RFC-822 and RFC-1036 
    compliant messages.
    It reads and writes type 2+ PKT packets.

  SOUP2PKT has been tested with the following mail processors:
    Squish 1.11
    FMail 1.2
    Fastecho 1.45
    Fips 0.98
  SOUP2PKT has been tested with these mail editors:
    Golded 2.50
    FleetStreet 1.17
    Sqed 32.
 

10. USAGE AS A GATEWAY.

    These features are only enabled for the PRO version.

    Your users can use the gateway as well as you. They just have to send a
    netmail to the gateway address and write the addressee in the to field of
    their netmail.

    If they want to receive the replies in another mailbox they have to write
    that email address in the from field of the message they send.

11. LICENSE AGREEMENT

    The author makes no representations about the accuracy or suitability of
    this material for any purpose.  It is provided "as is", without any
    express or implied warranties.  The author will assume no liability for
    damages either from the direct use of this product or as a consequence of
    the use of this product.

    This program takes two forms: Light and PRO. The Light version is freeware
    and can be used for an unlimited period of time. The PRO version requires a
    registration that costs 15 US dollars.

    This package can be distributed freely.

12. WHERE TO FIND ME

   Jose Maria Franco Fraiz
   Fido: 2:348/613.9
   Internet: jffraiz@poboxes.com
   Upgrades and any info on these things:
               http://www.arrakis.es/~jffraiz/soup2pkt.htm

   Susbcribe Soup2pkt mailing list: Send a message to listserv@hts.pp.se and
   write 'subscribe soup2pkt' in the message body.
