
nntp

        The 'nntp' commands control the operation of the Network News
        Transfer Protocol (NNTP).  The nntp features are defined at
        compile-time.  Two NNTP modules are available, "NNTP" which is an
        NNTP client only, that stores news in a mailbox-compatible form,
        and another, "NNTPS" which is both an NNTP client and server,
        that stores news articles in a form inaccessible to mailbox users.

        We first describe the "NNTP" nntp client features:

        nntp addserver <nntpserver_host> <interval> [<range>] [<groups>]
          Add an NNTP news server to query every <interval> seconds for new
          articles in the specified <groups>.  If no <groups> are specified,
          the groups given by the 'nntp groups' command are used.

          <range> specifies the time-of-day limits when the queries will be
          made, in the form hh:mm-hh:mm where start time precedes end time.

        Multiple 'nntp addserver' commands may be used to concatenate
        groups (up to a maximum of 512 bytes).

             Example:  nntp add w5ddl.ampr.org 3600 18:00-06:00


        nntp directory [ <News_spool_dir> [News_control_dir> ]
          Display or set the spool directory for spooling news articles.
          Default is /spool/mail.  Optionally set a new control directory.
          The default control dir is /spool/news.


        nntp directory  old=new
          Establish a newsgroup name mapping, so that a newsgroup name
          beginning with <old> is changed to one beginning with <new>,
          which may be a null string.  To delete a mapping, use <old>==.
          The mapping scan continues until the list is exhausted, in the
          same order the nntp dir commands were specified.

              Example:  nntp dir  rec.radio.=
                        nntp dir  amateur.=
                        nntp dir  shortwave=swl
                        nntp dir  equipment=eq

              will map rec.radio.amateur.policy to policy, rec.radio.swap
              to swap, rec.radio.shortwave to swl, and
              rec.radio.amateur.equipment to eq.


        nntp dropserver <nntpserver_host>
          Drop the specified NNTP server from the list of servers to contact.


        nntp firstpoll [<#days>]                              Default: 5
          Sets or shows the number of days of old news that is requested
          in the initial poll to a new server.


        nntp groups <group> [<group> ...]             Default: All groups
          Display or set the currently set USEnet newsgroup(s).  The group
          names are separated by spaces or commas.  The '*' and '!'
          metacharacters (meaning 'all' and 'not' respectively) are
          supported.


        nntp kick <nntpserver_host>
          Kick the local NNTP client to get in touch with the named server.


        nntp listservers
          List the currently defined servers.


        nntp lzw <ON | off>
          Turn on or off attempts to request LZW compression be used by
          the server when sending articles.


        nntp trace <level>                                     Default: 1
          Sets or shows the current trace level for NNTP traffic.

          Level
           0:  No tracing.
           1:  Display serious errors only
           2:  Display serious and transient errors
           3:  Display serious and transient errors, plus session progress
           4:  Display serious and transient errors, session progress and
                  actual received articles
           5:  Display errors.


        nntp quiet <yes | NO>                                 Default: no
          Sets or shows the current arrival-notification setting for NNTP
          traffic.  The notification will include a BEL character if
          "smtp quiet no" is in effect.






        We now describe the "NNTPS" client/server commands.  Remember
        that the 'start nntp' command must be used to allow the nntp server
        to accept connects from other nntp clients.


        nntp active
          Displays the active file, which shows configured newsgroups.
          See 'nntp create'.


        nntp access [on | OFF]
          Displays or sets whether access permissions are enforced.  When
          enabled, the file /spool/news/access is scanned to determine the
          access permissions for a client host.  Each line of this file has
          fields of the form:         host:permissions:
          where host is explicit hostname (FQDN) or starname, eg, *.aara.org
          and permissions are a string of chars: R => read, P => post,
          none=>deny access.  When access is turned on, hosts not mentioned
          are DENIED nntp access.


        nntp add <nntpserver_host> <interval> [<range>] [<groups>]
          Add an NNTP news server to query every <interval> seconds for new
          articles in the specified <groups>.  If no <groups> are specified,
          all groups found in /spool/news/active are checked.

          <range> specifies the time-of-day limits when the queries will be
          made, in the form hh:mm-hh:mm where start time precedes end time.

        Multiple 'nntp add' commands may be used to concatenate groups
        (up to a maximum of 512 bytes).

        Example:  nntp add news.usl.edu 3600 usl.test,rec.radio.swap


        nntp create <news.group.name> [y|n]
          Updates the /spool/news/active file, which must have an entry
          for each news group you wish to receive.  Choose y to permit
          posting to this group, or n to deny posting.  y is assumed if
          nothing is specified.  The /spool/news/pointer file is also
          updated with the path to the directory which will contain the
          articles.  Articles will be stored as separate files, named
          by an integer corresponding to their arrival order.


        nntp drop <nntpserver_host>
          Drop the specified NNTP server from the list of servers to contact.


        nntp dump <newsgroup> [<areaname>]
          Dump all the news articles in <newsgroup> to the Jnos area
          called <areaname>.  This would allow mailbox users to read news,
          but no provisions are made to dump just new articles.  If
          <areaname> is omitted, then <newsgroup> is used as the area name.
          Note: this command is unavailable if Jnos was compiled with
          NEWS_TO_MAIL #define'd (see note 4 below).


        nntp firstpoll [<#days>]                              Default: 5
          Sets or shows the number of days of old news that is requested
          in the initial poll to a new server.


        nntp ihave [<val>]                                Default: 0
          Set or display the IHAVE nntp-protocol behaviour.
          0 => IHAVE disabled (default)
          1 => IHAVE reports only for newsgroups associated with serverhost
          2 => IHAVE reports for all newsgroups

         The IHAVE protocol tells the server the message-ids of articles
         stored here;  it is used to forward articles off this system.


        nntp kick <nntpserver_host>
          Kick the local NNTP client to get in touch with the named server.


        nntp list
          List the currently defined servers.


        nntp lzw <ON | off>
          Turn on or off attempts to request LZW compression be used by
          the server when sending articles.


        nntp maxclients [<count>]

         Displays or sets the maximum number of simultaneous NNTP client
         sessions that will be allowed.  The default is 0, that is, no limit
         (except that imposed by available memory).


        nntp post
          Posts to a local newsgroup.  A session is created, and the console
          user is queried for UserName (unless established by a prior 'nntp
          profile' command), Newsgroup, Subject, and message body.  While
          entering the msg, a line consisting of ".u" or ".r" will then
          prompt for a file name, which is inserted into the article being
          built.  "/EX", "***END" or "." will end the article when found alone
          on a line.  When the message body is terminated, the prompt
              [Send, Abort, Exit, List] 
          is displayed.  Enter the first letter of the desired choice.
          Note that Exit quits the post subcommand, while Abort (or Send)
          allows you to post another article.


        nntp profile {fullname|host|organization|reply|sig|user} string_value
          Profile establishes values for the header fields of posts
          originating here.  Options include:

          sig  path_to_signature_file
          host FQDN    Defaults to our 'hostname'
          fullname "First Mi. Lastname"
          organ "organization name desired"
          user "user name"
          reply reply-to-address


        nntp read <newsgroup> [<article_number>]
          Reads the local <newsgroup>, beginning with the first unread
          article unless <article_number> is also provided.  A session is
          created for displaying the articles.  After each article, a
          prompt "Read next/previous? (n/p/q) " allows the console user to
          easily progress through the articles.


        nntp quiet [<val>]                               Default: 0
          Dispays or sets the value if the quiet behaviour flag.  Nntp will
          display a message and/or beep when a new article arrives:
          0 => beep only (default)
          1 => beep and display msg
          2 => no msg or beep



        NOTES:
        1. See the 'expire' command for information on removing old articles.
        2. The TO: addresses, when present, are stripped from article headers
           by the NNTP client.  This was done to prevent loops should the
           area be forwarded to another Jnos system, since the TO: address
           would cause the msg to be routed back to the mail-to-news daemon.
           If you want to forward an area, give the TO: address on the line
           in forward.bbs that lists the area.  Example: rec.radio.swl all@swl
        3. The NNTPS software includes a mail-to-news feature, such that email
           with a To: address that begins with "!" is passed to the NNTPS
           module.  The remainder of the To: address is interpreted as a
           newsgroup name, with the name truncated at the first occurence of
           one of "%@.,/", and with "!" translated to "." and "+" to ",".  An
           alias is usually used to provide this special name.  For example,
           to route all ALLUS bulletins to both the allus area, and the
           ampr.allus newsgroup, use the alias:  allus    allus !ampr!allus
           To do the above task, and also post to local.allus, use:
           allus      allus !ampr!allus+local!allus
        4. The NNTPS software includes a news-to-mail feature, such that news
           articles can be emailed to local or remote destinations after they
           are processed by nntp.  This would allow, for example, emailing to
           a public area, so that BBS users too could read news articles.
           Jnos must be compiled with NNTPS and NEWS_TO_MAIL #define'd and
           a file /spool/news/gateway must exist to define the mapping from
           a newsgroup to an SMTP To: address.  Each non-comment line in the
           gateway file must begin with a newsgroup name (starnames OK),
           followed by spaces or tabs, followed by the email To: address.
           Examples:
                # comment line
                rec.radio.swap	sale
                rec.radio.shortwave	swl
                rec.radio.amateur.*  ham
	5. If an NNTP server doesn't support the NEWNEWS command, Jnos can
	   use multiple GROUP/STAT commands provided that Jnos was compiled
	   with NN_USESTAT #define'd.  However, only fully-qualified group
	   names can be handled in this way, and in the case of the Jnos NNTPS
	   client, all groups must be given in the 'nntp add' command, that is,
	   the active file is not accessed (this ought to be fixed...).
	   Finally, the 'nntp firstpoll' feature is not supported when GROUP/
	   STAT commands are used to obtain news articles.
