home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / ng034.zip / ngate.doc < prev    next >
Text File  |  1997-03-20  |  16KB  |  455 lines

  1.                          nGate 0.3
  2.  
  3.                Copyright (c) Dave Hamilton 1995, 1997
  4.  
  5.  
  6.  
  7.  
  8.                         WARNING
  9.  
  10.     This is freeware. It is not guaranteed to do anything, or
  11.     to not do anything. Use it at your own risk.
  12.  
  13.     Future versions, as features are added, may become shareware.
  14.     It is my hope that I can maintain a pre 1.0 version as freeware
  15.     always, and add a post 1.0 version as shareware that will simply
  16.     be more functional. I intend to have two versions. Have fun with
  17.     this one.
  18.  
  19.     This release is, I hope, the last beta before 1.0.
  20.  
  21.  
  22. Acknowledgements
  23.  
  24.     OS/2, Warp, and IBM's version of SENDMAIL are copyright (c) IBM Corp.
  25.     Msgapi32.dll and Squish are copyright (c) SCI Communications, and are
  26.     trademarks of Lanius Corporation.
  27.     FleetStreet is copyright (c) by Michael Hohner and Harry Herrmannsdorfer.
  28.     MailGate is copyright (c) by Dave Hamilton.
  29.  
  30.     Special thanks to Fabian Beutin for very heavy beta testing.
  31.  
  32. 1.0 Changes
  33.  
  34.     0.34 Adds switch (-s) to use the short date posting
  35.          format for those servers that choke on a GMT date.
  36.          The default is the GMT date as specified in RFC977.
  37.  
  38.          Adds switch (-v) to supply verbose screen output
  39.          during processing. The more v's you add, the more
  40.          verbose the output, up to a level of 5. At Level
  41.          3, you can watch the article text and headers
  42.          come in.
  43.  
  44.          Adds switch (-a) to download a list of all newsgroups
  45.          from your server. Warning! This could take a very long
  46.          time. The results are stored in newsrc.all. You can
  47.          cut and paste from there to your newsrc file to add
  48.          new groups.
  49.  
  50.     0.33 We discover that some servers support both of the 
  51.          date formats we offer, but most will accept one
  52.          and choke on the other.
  53.  
  54.          Added larger input buffers  which should increase
  55.          download speed at higher connection rates.
  56.  
  57.  
  58.     0.32 Fixes date bug that was reintroduced in 0.30
  59.  
  60.          Increased logging debugging degree. By increasing the
  61.          number of 'l's you increase the verbosity of the log.
  62.          The highest supported now is -lllll (5 l's) which will
  63.          log the incoming lines of an article. Some users are
  64.          reporting failure during the processing of articles.
  65.  
  66.     0.30 Increased line buffer size. It was crashing on headers with
  67.          very long newsgroups: entries.
  68.  
  69.          Made date routine yet smarter.
  70.  
  71.     0.20 Made config file reader a little more intelligent, was crashing
  72.          and in some cases linking the wrong area with newsgroup
  73.  
  74.          Changed Date on posted articles to conform with more news
  75.          servers.
  76.  
  77.          Increased logging information
  78.  
  79.          Now rewrites newsrc file after each group is received instead
  80.          of after entire retrieval
  81.  
  82.          Fixed buffer overrun when very long list of Newsgroups: was
  83.          read, causing trap 05 crash
  84.  
  85.     0.10 First Beta Release
  86.  
  87.  
  88. 1.1    What is nGate?
  89.  
  90.     nGate (NewsGate) is a simple program that acts as an interface between
  91.     an nntp news server and your Squish message base. It was designed as
  92.     a companion program for MailGate, but kept apart from it so that
  93.  
  94.         1) a simple version could be distributed as freeware
  95.         2) both MailGate and nGate could remain simple
  96.  
  97.     nGate retrieves unread news articles from an nntp server that you
  98.     are connected to and tosses them into your Squish message base.
  99.     nGate also scans messages from your Squish message base and
  100.     posts them to an nntp news server.
  101.  
  102.     Once messages are in your message base, they may be read by
  103.     you or your users. Depending upon how you have your BBS configured,
  104.     your users may post responses or new messages in those areas.
  105.  
  106.     See section 4.0 for some history of how nGate evovled and how
  107.     the author has it configured on a busy system.
  108.  
  109. 1.2 Requirements
  110.  
  111.     You must be running OS/2 version 3.0 (Warp) or above.
  112.  
  113.     At the time  you run nGate, you must be connected to an internet
  114.     provider service (ISP) and have access to a news server that uses the
  115.     NNTP protocol. Finally, you must have a message base that is
  116.     either Squish or *.MSG (Star-dot-Message).
  117.  
  118.     nGate does not create any temporary files when working; it relies
  119.     on OS/2's virtual memory and handles one news article at a time.
  120.     The more memory your machine has, the better for every program
  121.     you run, but nGate will run safely in any amount of memory that
  122.     OS/2 can run in.
  123.  
  124. 1.3 Files and Directories
  125.  
  126.     nGate requires two files to run:
  127.  
  128.         newsrc
  129.         ngate.cfg
  130.  
  131.     The newsrc file is a list of newsgroups that you are interested
  132.     in or "subscribed to".
  133.  
  134.     The ngate.cfg file is nGate's configuration file (big surprise)
  135.     containing basic configuration information and a list of
  136.     newsgroups along with the message bases that are associated
  137.     with them.
  138.  
  139.     To locate these files, nGate searches in the following order:
  140.  
  141.         1) the environment variable MAILGATE
  142.         2) the current directory
  143.  
  144.     Please note the order. If you have a line in your config.sys
  145.     such as:
  146.  
  147.         SET MAILGATE=C:\MG
  148.  
  149.     nGate will look in c:\mg for its files before it looks in the
  150.     directory you are in when it runs.
  151.  
  152.     nGate can create a log file that records its actions. If you
  153.     run it with the logging option on, it creates the log file
  154.     called ngate.log in the same directory as its two files.
  155.  
  156. 1.3 Setting Up
  157.  
  158.     If you are already using MailGate, and have the MAILGATE environment
  159.     variable set, it is suggested you copy nGate.exe to that directory
  160.     and create your configuration files there. If not, create a
  161.     directory (it doesn't have to be at the root of the drive) and
  162.     create your configs in that directory. When you run nGate, change
  163.     to that directory.
  164.  
  165.     If you don't already have MSGAPI32.DLL on your system, copy the
  166.     one enclosed to somewhere in your LIB path. OS2\DLL is usually
  167.     a good place to put it.
  168.  
  169. 1.4 The newsrc File
  170.  
  171.     Using a text editor, create a file called "newsrc" (without the
  172.     quotes, no file extension). Create one line for each newsgroup
  173.     you want, ending with a colon. Example:
  174.  
  175.         comp.os.os2.advocacy:
  176.         comp.os.os2.bugs:
  177.  
  178.     Each time nGate runs, it will read this file, and it will UPDATE
  179.     this file with the low and high article number pointers from the
  180.     server. After nGate has run, your newsrc file will look something
  181.     like this:
  182.  
  183.             comp.os.os2.advocacy: 23413-25752
  184.             comp.os.os2.bugs: 7361-7407
  185.  
  186.     You can add a new group any time you like. It is the colon that
  187.     causes nGate to query the server for new articles, and the existing
  188.     numbers that let nGate and the server to know which articles you
  189.     haven't received yet.
  190.  
  191.     Note that nGate uses a conventional newsrc file common to many
  192.     Unix and OS/2 applications. If you are installing nGate along with
  193.     or in place of, another news reader, you may be able to use an
  194.     existing file. Most newsreaders we've seen use this format.
  195.  
  196. 2.1 ngate.cfg
  197.  
  198.     This file is also created with a text editor. The first few lines
  199.     describe environment information. These are followed by one line
  200.     for every news group you subscribe to.
  201.  
  202.     Here's an example file:
  203.  
  204.         from            1:229/622.0            ; From node
  205.         to                All                    ; To: field
  206.         origin            "Serenity Base"        ; for in and out msgs
  207.         domain             sbase.com            ; for outbound
  208.         newsserver        leebeach.sbase.com    ; our news server's address
  209.         
  210.         alt.als  $L:\Max\News\7003
  211.         alt.religion.scientology $L:\Max\News\1999
  212.         comp.os.os2.comm   $L:\Max\News\5006 
  213.         comp.os.os2.games   $L:\Max\News\5007 
  214.         comp.os.os2.mail-news   $L:\Max\News\5008
  215.         comp.os.os2.marketplace   $L:\Max\News\5009
  216.         comp.os.os2.misc   $L:\Max\News\5010 
  217.         comp.os.os2.multimedia   $L:\Max\News\5011
  218.         comp.os.os2.networking   $L:\Max\News\5012
  219.         comp.os.os2.networking.misc   $L:\Max\News\5013
  220.         
  221.     You can probably figure out most of the config file from the
  222.     example above, but we'll go over each of the lines just in
  223.     case.
  224.  
  225.     Blank lines are ignored.
  226.  
  227.     A semicolon and everything to the right of it is ignored. You can
  228.     (and are encouraged to) use semicolons to comment the lines in
  229.     your file, or to 'comment-out' lines you with to temporarily
  230.     turn off.
  231.  
  232. 2.2 From
  233.  
  234.     This is the fido or network address of your own system. It is
  235.     used for incoming articles to fill in the 'from' address, because
  236.     FIDO requires such address to be present. From a working perspective
  237.     it doesn't do anything at all, but it must be entered.
  238.  
  239. 2.3 To
  240.  
  241.     As above, this field must be filled in, or some message readers
  242.     will lose their minds. 'All' is probably the best choice here,
  243.     given the nature of usenet.
  244.  
  245. 2.4 Origin
  246.  
  247.     This field serves two purposes. On inbound mail, it takes on a
  248.     role similar to above, and just fills in a field in the message.
  249.  
  250.     For outbound articles, it is used for the 'Organization:' field
  251.     in articles posted from your system to usenet.
  252.  
  253.     Unless you can think of anything better, this would normally be
  254.     the name of your BBS.
  255.  
  256. 2.5 Domain
  257.  
  258.     This is the domain name of your BBS. It is used by nGate to
  259.     generate an email address for the person posting articles
  260.     from your system to usenet. Some message editors such as
  261.     FleetStreet let you use a complete email address in the
  262.     From field. Others insist on first/last names, or aliases.
  263.  
  264.     When nGate is scanning outbound messages, it looks at the
  265.     'from' field to see if it contains an atpersand (@). If it
  266.     does, the field is used as-is. If not, the contents of the
  267.     field are trimmed of leading and trailing spaces, internal
  268.     spaces are converted to dots, and it is converted to lower
  269.     case. Then, the atpersand is appended, followed by this
  270.     Domain name.
  271.  
  272.     For example, assume you have this configured:
  273.  
  274.         domain my-bbs.com
  275.  
  276.     Here's what nGate will do with the names of these posters:
  277.  
  278.         Finds                    Changes to
  279.         -----                    ----------
  280.         alvin@my-bbs.com        alvin@my-bbs.com
  281.         Squeaky                    squeaky@my-bbs.com
  282.         Harry Armes                harry.armes@my-bbs.com
  283.  
  284. 2.6 newsserver
  285.  
  286.     This is the tcp/ip address of the news server you will connect
  287.     to. Example:
  288.  
  289.         rosie.sbase.com
  290.  
  291.     Note that ISP's can configure their servers so that you can have
  292.     read-only access, read-and-post access, or no access.
  293.  
  294.     When nGate first connects with the server it will determine access
  295.     from the server. If you don't have posting permission and you
  296.     attempt to post articles to the server, nGate will tell you so.
  297.     If you operate within the access you have, nGate will not report
  298.     anything. If nGate is silent, everything's working.
  299.  
  300. 2.7 newsgroup <-> message base lines
  301.  
  302.     These lines consist of a newsgroup name, one or more spaces,
  303.     and the path to the message base associated with the newsgroup.
  304.  
  305.     If the message base is Squish, the path will begin with a
  306.     dollar sign ($).
  307.  
  308.     If the message base is *.MSG, just provide the path.
  309.  
  310.     Example:
  311.  
  312.         comp.os.os2.comm   $L:\Max\News\5006 
  313.  
  314. 3.1 Running nGate
  315.  
  316.     Ok, let's assume you have your config files set up. Change to
  317.     the directory where nGate and its config files live.
  318.  
  319.     To IMPORT articles, type:
  320.  
  321.         ngate -i
  322.  
  323.     nGate will connect to the server and process all lines you
  324.     have entered in your newsrc file. For each line, it will locate
  325.     your Squish or *.MSG message base, and query the server for any
  326.     new articles. As it runs, it will display the newsgroup it is
  327.     currently working on, the number of new articles to be downloaded,
  328.     and its progress as it downloads them and tosses them into your
  329.     message base. When it has downloaded all the articles, it will
  330.     return to the OS/2 command prompt.
  331.  
  332.     To send OUTBOUND articles, type:
  333.  
  334.         ngate -o
  335.  
  336.     nGate will connect to the server and determine that you do have
  337.     posting access. Next it will process each message base you have
  338.     configured, scanning for newly entered messages. As it finds
  339.     them, it will post them to the newsserver and mark them as
  340.     SENT in your message base. nGate will display a line for each
  341.     newsgroup it is processing, and if there are any articles to post,
  342.     will display a count of posted articles. Depending upon your
  343.     hardware and memory, it may take several seconds or longer to
  344.     scan each message area.
  345.  
  346.     If you want to process INBOUND and OUTBOUND articles on the
  347.     same pass, type:
  348.  
  349.         ngate -i -o
  350.  
  351.     nGate will process INBOUND first, then OUTBOUND.
  352.  
  353. 3.2 Logging
  354.  
  355.     To turn on logging (recommended), add the -l switch to your
  356.     command. For example, to import articles with logging, type:
  357.  
  358.         ngate -i -l
  359.  
  360.     As newer versions of nGate are released, more detail will be
  361.     available to your logs by appending more l's, as in:
  362.  
  363.         ngate -i -lll
  364.  
  365.     which would set a logging level of 3. Ngate 0.20 has only one
  366.     logging level, but more detail is planned for subsequent releases.
  367.  
  368. 4.0 The History of nGate
  369.  
  370.     I read a lot of electronic mail. I get FIDO netmail, FIDO echomail,
  371.     internet email, and usenet.
  372.  
  373.     No one reader is suited to dealing with all these kinds of messages.
  374.     I have used many of the BBS readers, email mailers, and newsreaders
  375.     available under DOS, Windows, OS/2, and Unix. Although I have my
  376.     favourites, I have found it a real pain to get 10 minutes in a day
  377.     when I can look at mail and then have to load up several different
  378.     packages. Also, these specialized readers are very good at the
  379.     handling of mail and news data, but some have user interfaces that
  380.     are far and away ahead of the rest. I have yet to see a newsreader
  381.     that is as easy to use on a notebook as most of the FIDO message
  382.     readers are.
  383.  
  384.     My personal favourite OS/2 editor is FleetStreet, though a lot of
  385.     people prefer GoldEd, TimeEd, or the integrated editors within
  386.     BBS packages.
  387.  
  388.     In early 1995 I wrote MailGate to connect smtp email with Squish
  389.     and *.MSG message bases. The goal with it was to connect BBS's with
  390.     internet email, allowing BBS sysops to easily provide their users
  391.     with internet mail. OS/2's implementation of the unix program
  392.     SENDMAIL is short of some of the extended features available in
  393.     Unix versions, but it works extremely well and is quite reliable.
  394.     So, MailGate was born as a low-cost shareware program to accomplish
  395.     this task, and is now in use on many BBS's around the world.
  396.  
  397.     A plug: MailGate is available by anonymous ftp via:
  398.  
  399.         hobbes.nmsu.edu/incoming/mg111d.zip
  400.  
  401.     or by FREQ to fido:
  402.  
  403.         1:229/622, magic name MAILGATE
  404.  
  405.     Usenet was available through fidonet, but in my area it was slow
  406.     and sporadic. I had it available from my nntp server, but it was
  407.     difficult to locate software that would import it into a Squish
  408.     message base. The closest I was able to get was cthuang's excellent
  409.     SOUPER, which uploads and downloads SOUP packets from a news
  410.     server. Early parts of nGate were derived from his work - the
  411.     pre-release version used SOUP as an intermediary step.
  412.  
  413.     I was able to find a utility to import nntp messages to a squish
  414.     base, but not export them. I found some products that claimed
  415.     to be able to handle news import/export that crashed, messed up
  416.     the message bases, and were otherwise ill-behaved.
  417.  
  418.     Finally I decided to extend MailGate to include News, but on each
  419.     pass with the design, MailGate would lose its simplicity - one of
  420.     its most endearing features. So I created nGate as a separate
  421.     small program to do the job and to share conventions with Unix
  422.     news utilities. I have decided to start this off as a functioning
  423.     freeware utility to help other sysops avoid the frustration I
  424.     encountered, and to help mesh BBS's with the internet.
  425.  
  426.     On our system, we are lucky enough to have a full-time internet
  427.     connect, but our setup will work with a part time connect.
  428.  
  429.     We run Harald Kipp's excellent Changi news server on OS/2. It
  430.     connects to our internet connection's nntp server once an hour
  431.     and exchanges usenet articles. This setup allows us to connect
  432.     newsreaders, including nGate, to our own newsserver and read
  433.     or exchange news much more quickly than we could online.
  434.  
  435.     We run nGate -i once an hour, and a half hour later, we run
  436.     nGate -o. This keeps our usenet message bases right up to date
  437.     without clogging up our local FIDO net.
  438.  
  439.     We offer email and usenet to our BBS users for free as a community
  440.     service. 
  441.  
  442.     I have no idea what the future of BBS's is as more and more
  443.     people are web browsing, but I know it would be a worldwide
  444.     loss if BBS's were to disappear, along with the community
  445.     created and shared by sysops.
  446.  
  447.     So give nGate a whirl and let me know what you think. I'm at:
  448.  
  449.         1:229/622
  450.         daveh@sbase.com
  451.  
  452.     Have fun,
  453.  
  454.         Dave Hamilton
  455.