home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / nn.tar / nn-6.5.1 / config.h-dist < prev    next >
Text File  |  1996-08-15  |  16KB  |  530 lines

  1. /**************************** NN CONFIGURATION ***************************
  2.  *
  3.  *    Configuration file for nn.
  4.  *
  5.  *    You must edit this file to reflect your local configuration
  6.  *    and environment.
  7.  *
  8.  *    Before editing this file, read the licence terms in the README
  9.  *    file and the installation guidelines in the INSTALLATION file.
  10.  *
  11.  *    (c) Copyright 1990, Kim F. Storm.  All rights reserved.
  12.  */
  13.  
  14. #define    RELEASE     "6.5"
  15.  
  16. #include <stdio.h>
  17. #include <ctype.h>
  18.  
  19.  
  20. /************************* DATABASE CONFIGURATION ***************************
  21.  *
  22.  *    Define NOV if you have access to .overview files in your news spool
  23.  *    area and you want to use them rather than run nnmaster.
  24.  *    If you use NNTP and your server is INN 1.4 or later with XOVER support
  25.  *    and is generating .overview files there, you can use NOV over NNTP. In
  26.  *    that case, make sure you define NNTP below as well.
  27.  *
  28.  *    If your NOV implementation doesn't have records for digests (none
  29.  *    that I know of do), you might want to define 'DO_NOV_DIGEST'.
  30.  *    This will cause nn to grab a digest article and split it apart
  31.  *    before anything has been selected to be read from that article.
  32.  *    'DO_NOV_DIGEST' is necessary if you want any digests (like
  33.  *    'comp.risks') to be automatically split.
  34.  *
  35.  *    IMPORTANT NOTE!
  36.  *    The minute you define NOV, all bets are off regarding the
  37.  *     documentation!  There are NUMEROUS differences!
  38.  */
  39.  
  40. #define NOV    /* */
  41.  
  42. /* Optional */
  43. #define DO_NOV_DIGEST    /* */
  44.  
  45. /* Optional */
  46. /* #define NOV_DIRECTORY    "/usr/spool/news"    /* */
  47.  
  48.  
  49. /*********************** NETWORK DEPENDENT DEFINITIONS **********************
  50.  *
  51.  *    Define NETWORK_DATABASE if you share the database through NFS on
  52.  *    a network with different, non-compatible machines, e.g. SUNs and
  53.  *    VAXen, or SUN-3 and SUN-4, or if you are using different compilers
  54.  *    on the same architecture.
  55.  *
  56.  *    In a homogenous network, you can leave it undefined for higher
  57.  *    performance (no data conversion is needed).
  58.  *
  59.  *    NETWORK_DATABASE is IGNORED if you are using NOV, as it has plain
  60.  *    ascii files.  (Thank you Geoff!)
  61.  */
  62.  
  63. /* #define NETWORK_DATABASE    /* */
  64.  
  65.  
  66. /********************************** NNTP *********************************
  67.  *
  68.  *     Define NNTP to enable nntp support.  If you are not using NNTP,
  69.  *    just leave the following NNTP_* definitions as they are - they
  70.  *    will be ignored anyway.
  71.  *
  72.  *    With NNTP, the nnmaster still maintains a local database of
  73.  *    all article headers for fast access (and because NNTP does not
  74.  *    support nn - yet), while the articles are fetched from the
  75.  *    nntp server when they are read or saved.
  76.  *
  77.  *    You may still share this database through NFS locally (see the
  78.  *    description of NETWORK_DATABASE above) if you don't want to
  79.  *    have separate nn databases on all your local systems.
  80.  *
  81.  *    Consult the file NNTP for further information on the use of NNTP.
  82.  */
  83.  
  84. #define NNTP    /* */
  85.  
  86. /*
  87.  *    Define NNTP_SERVER to the name of a file containing the name of the
  88.  *    nntp server.
  89.  *
  90.  *    It is vital that both the nnmaster and all nn users on a machine
  91.  *    uses the same nntp server, because the nn database is synchronized
  92.  *    with a specific news active file.
  93.  *
  94.  *    If the file name does not start with a slash, it is relative to
  95.  *    LIB_DIRECTORY defined below.
  96.  *    NOTE: If you plan to use the included inews, it MUST be a full pathname
  97.  */
  98.  
  99. #define NNTP_SERVER    "/usr/lib/nntp_server"    /* */
  100.  
  101. /*
  102.  *    Define NNTP_POST if you want nn to reject attempts to post via
  103.  *    NNTP to a server, that disallows postings.
  104.  *
  105.  *    You should define this, if you use the NNTP based mini-inews for
  106.  *    postings from NNTP clients.  If you use another mechanism, that
  107.  *    does not involve NNTP, you should leave it undefined.
  108.  */
  109.  
  110. #define NNTP_POST    /* */
  111.  
  112. /*
  113.  *    NNTP's mini-inews seems to require that messages contain a complete
  114.  *    header with Message-ID, Path, and Date fields which the normal inews
  115.  *    generates itself.  If your mini-inews requires these headers to
  116.  *    be present, define NNTP_MINI_INEWS_HEADER below.
  117.  */
  118.  
  119. /* #define NNTP_MINI_INEWS_HEADER    /* uses "broken" mini-inews */
  120.  
  121. /*
  122.  *    Define NNTP_PATH_HOSTNAME to force a specific hostname into the
  123.  *    Path: header generated when NNTP_MINI_INEWS_HEADER is defined.
  124.  *    This is useful for multi-machine sites with one mail/news gateway.
  125.  *
  126.  *    If the string starts with a '/' it is taken as the name of a file
  127.  *    from which the outgoing hostname should be read (at runtime).
  128.  */
  129.  
  130. /* #define NNTP_PATH_HOSTNAME    "puthostnamehere"    /* */
  131.  
  132.  
  133. /***************** OPERATING SYSTEM DEPENDENT DEFINITIONS *******************
  134.  *
  135.  *      Include the appropriate s- file for your system below.
  136.  *
  137.  *    If a file does not exist for your system, you can use
  138.  *    conf/s-template.h as a starting point for writing you own.
  139.  */
  140.  
  141. #include "s-hpux9-0.h"
  142.  
  143. /*
  144.  *    Define DEFAULT_PAGER as the initial value of the 'pager' variable.
  145.  *    nnadmin pipes shell command output though this command.
  146.  */
  147.  
  148. /* #define DEFAULT_PAGER    "pg -n -s"    /* system V */
  149. #define DEFAULT_PAGER        "more"        /* bsd */
  150.  
  151. /*
  152.  *    DEFAULT_PRINTER is the initial value of the 'printer' variable.
  153.  *    nn's :print command pipes text into this command.
  154.  */
  155.  
  156. /* #define DEFAULT_PRINTER    "lp -s"            /* System V */
  157. #define DEFAULT_PRINTER        "lpr -p -JNEWS"        /* bsd */
  158.  
  159. /*
  160.  *     Define RESIZING to make nn understand dynamic window-resizing.
  161.  *     (It uses the TIOCGWINSZ ioctl found on most 4.3BSD systems)
  162.  *    This should be defined in the conf/s-xxxxx.h file.
  163.  *
  164.  *    PLEASE DEFINE THIS IN YOUR conf/s-<os>.h FILE INSTEAD!!
  165.  */
  166.  
  167. /* #define RESIZING    /* */
  168.  
  169. /*
  170.  *    Include file configuration.  Most systems with an ANSI conformant C
  171.  *    compiler should have these.  If you have them, you should use them!
  172.  *
  173.  *    IF YOU HAVE THESE FILES, IT IS *VERY IMPORTANT* THAT YOU INCLUDE THEM
  174.  *
  175.  *    Again, PLEASE DEFINE THESE IN YOUR conf/s-<os>.h FILE!
  176.  */
  177.  
  178. /* Do you have /usr/include/string.h */
  179. /* #define HAVE_STRING_H    /* */
  180.  
  181. /* Do you have /usr/include/unistd.h */
  182. /* #define HAVE_UNISTD_H    /* */
  183.  
  184. /* Do you have /usr/include/stdlib.h */
  185. /* #define HAVE_STDLIB_H    /* */
  186.  
  187. /* Do you have /usr/include/memory.h */
  188. /* #define HAVE_MEMORY_H    /* */
  189.  
  190. /* Do you have /usr/include/fcntl.h */
  191. /* #define HAVE_FCNTL_H        /* */
  192.  
  193.  
  194. /********************** MACHINE DEPENDENT DEFINITIONS **********************
  195.  *
  196.  *    Include the appropriate m- file for your system below.
  197.  *
  198.  *    If a file does not exist for your system, you can use
  199.  *    conf/m-template.h as a starting point for writing you own.
  200.  */
  201.  
  202. #include "m-hp9000.h"
  203.  
  204.  
  205. /***************************** OWNERSHIP ***************************
  206.  *
  207.  *    Specify owner and group for installed files and programs.
  208.  *
  209.  *    The nnmaster will run suid/sgid to this owner and group.
  210.  *
  211.  *    The only requirements are that the ownership allows the
  212.  *    nnmaster to READ the news related files and directories, and
  213.  *    the ordinary users to read the database and execute the nn*
  214.  *    programs.
  215.  *
  216.  *    Common choices are:  (news, news)  and   (your uid, your gid)
  217.  */
  218.  
  219. #define    OWNER    "news"
  220. #define    GROUP    "news"
  221.  
  222.  
  223. /**************************** LOCALIZATION ****************************
  224.  *
  225.  *    Specify where programs and files are installed.
  226.  *
  227.  *    BIN_DIRECTORY    - the location of the user programs (mandatory)
  228.  *
  229.  *    LIB_DIRECTORY     - the location of auxiliary programs and files.
  230.  *               (mandatory UNLESS ALL of the following are defined).
  231.  *
  232.  *    MASTER_DIRECTORY - the location of the master program (on server)
  233.  *               (= LIB_DIRECTORY if undefined)
  234.  *
  235.  *    CLIENT_DIRECTORY - the location of auxiliary programs (on clients)
  236.  *               (= LIB_DIRECTORY if undefined)
  237.  *
  238.  *    HELP_DIRECTORY   - the location of help files, online manual, etc.
  239.  *               (= CLIENT_DIRECTORY/help if undefined)
  240.  *
  241.  *    CACHE_DIRECTORY     - if NNTP is used, nn uses this central directory
  242.  *               to store working copies of articles on the local
  243.  *               system.  If not defined, it stores the articles
  244.  *               in each user's ~/.nn directory.
  245.  *
  246.  *    TMP_DIRECTORY    - temporary file storage.  Overriden by $TMPDIR.
  247.  *               (= /usr/tmp if undefined).
  248.  *
  249.  *    LOG_FILE         - the location of nn's log file.
  250.  *               (= LIB_DIRECTORY/Log if undefined).
  251.  */
  252.  
  253. #define BIN_DIRECTORY    "/usr/local/bin"
  254. #define LIB_DIRECTORY    "/usr/local/lib/nn"
  255.  
  256.  
  257. /**************************** DATABASE LOCATION **************************
  258.  *
  259.  *    Specify where the nn database should be installed.
  260.  *
  261.  *    If none of the following symbols are defined, the database will
  262.  *    be contained in the NEWS_DIRECTORY in a separate .nn directory for
  263.  *    master files and in files named .nnx and .nnd in each group's
  264.  *    spool directory.  To use this scheme, the OWNER specified above
  265.  *    must have write permission on the news spool directories.
  266.  *
  267.  *    If you access news via NNTP, you will probably always have to
  268.  *    give the database directory explicitly through DB_DIRECTORY
  269.  *    (and DB_DATA_DIRECTORY), since the normal news spool directories 
  270.  *    are probably not available on the local system.
  271.  *    The exception may be if nnmaster runs directly on the nntp server.
  272.  *
  273.  *    To change the default behaviour, you can define the following
  274.  *    symbols:
  275.  *
  276.  *    DB_DIRECTORY       - the directory containing the master files.
  277.  *
  278.  *    DB_DATA_DIRECTORY  - the directory containing the per-group files
  279.  *                 (default is DB_DIRECTORY/DATA if undefined).
  280.  *
  281.  *    DB_LONG_NAMES       - use group's name rather than number when
  282.  *                 building file names in DB_DATA_DIRECTORY.
  283.  *         (The file system must support long file names!!)
  284.  */
  285.  
  286. /* #define DB_DIRECTORY    "/usr/spool/nn"    /* */
  287.  
  288.  
  289. /*************************** NEWS TRANSPORT **************************
  290.  *
  291.  *    Specify the location of your news programs and files
  292.  *    You only need to specify these if you are not
  293.  *    satisfied with the default settings.
  294.  *
  295.  *    NEWS_DIRECTORY         - The news spool directory.
  296.  *                  Default: /usr/spool/news
  297.  *
  298.  *    NEWS_LIB_DIRECTORY    - The news lib directory.
  299.  *                  Default: /usr/lib/news
  300.  *
  301.  *    INEWS_PATH        - The location of the inews program.
  302.  *                  Default: NEWS_LIB_DIR/inews
  303.  *
  304.  *    RMGROUP_PATH        - The location of the rmgroup program.
  305.  *                  Default: NEWS_LIB_DIR/{rm,del}group
  306.  */
  307.  
  308. /* #define NEWS_DIRECTORY    "/usr/spool/news"    /* */
  309. /* #define NEWS_LIB_DIRECTORY    "/usr/lib/news"        /* */
  310. /* #define INEWS_PATH        "/usr/lib/news/inews"    /* */
  311.  
  312.  
  313. /*
  314.  *    If no "Lines:" header field is present, NN can be made to
  315.  *    count them itself.
  316.  */
  317.  
  318. #define DONT_COUNT_LINES    /* */
  319.  
  320.  
  321. /*************************** MAIL INTERFACE *************************
  322.  *
  323.  *    Specify a mailer that accepts a letter WITH a header IN THE TEXT.
  324.  *
  325.  *     A program named 'recmail' program is normally delivered with
  326.  *    the Bnews system, or you can use sendmail -t if you have it.
  327.  *
  328.  *    The contrib/ directory contains two programs which you might
  329.  *    be able to use with a little tweaking.
  330.  */
  331.  
  332. /* #define REC_MAIL    "/usr/lib/news/recmail"        /* non-sendmail */
  333. #define REC_MAIL    "/usr/lib/sendmail -t"        /* sendmail */
  334.  
  335.  
  336. /*
  337.  *    Define HAVE_ROUTING if your mailer understands domain based
  338.  *    adresses (...@...) and performs the necessary rerouting (e.g.
  339.  *    Sendmail or Smail).
  340.  *
  341.  *    Otherwise, nn will provide a simple routing facility using
  342.  *      routing information specified in the file LIB_DIRECTORY/routes.
  343.  */
  344.  
  345. #define HAVE_ROUTING    /* */
  346.  
  347. /*
  348.  *    If HAVE_ROUTING is NOT defined, nn needs to know the name of
  349.  *     your host.  To obtain the host name it will use either of the
  350.  *    'uname' or 'gethostname' system calls as specified in the s-
  351.  *    file included above.
  352.  *
  353.  *    If neither 'uname' nor 'gethostname' is available, you must
  354.  *    define HOSTNAME to be the name of your host.  Otherwise, leave
  355.  *    it undefined (it will not be used anyway).
  356.  */
  357.  
  358. /* #define HOSTNAME    "myhost"    /* Not used if HAVE_ROUTING */
  359.  
  360. /*
  361.  *    Define APPEND_SIGNATURE if you want nn to ask users to append
  362.  *    ~/.signature to mail messages (reply/forward/mail).
  363.  *
  364.  *    If the mailer defined in REC_MAIL automatically includes .signature
  365.  *    you should not define this (it will fool people to include it twice).
  366.  *
  367.  *    I think 'recmail' includes .signature, but 'sendmail -t' doesn't.
  368.  */
  369.  
  370. #define APPEND_SIGNATURE    /* */
  371.  
  372. /*
  373.  *    BUG_REPORT_ADDRESS is the initial value of the bug-report-address
  374.  *    variable which is used by the :bug command to report bugs in
  375.  *    the nn software.  
  376.  *    This address is currently set up as a mailing list, and it is
  377.  *    intended that it will point to the current maintainer.
  378.  */
  379.  
  380. #define BUG_REPORT_ADDRESS    "mtpins@isca.uiowa.edu"
  381.  
  382.  
  383. /*************************** DOCUMENTATION ***************************
  384.  *
  385.  *     Specify directories for the user and system manuals
  386.  *
  387.  *     Adapt this to your local standards; the manuals will be named
  388.  *         $(MAN_DIR)/program.$(MAN_SECTION)
  389.  *
  390.  *    USER_MAN    - nn, nntidy, nngrep, etc.
  391.  *    SYS_MAN        - nnadmin
  392.  *    DAEMON_MAN    - nnmaster
  393.  */
  394.  
  395. #define USER_MAN_DIR    "/usr/man/man1"
  396. #define USER_MAN_SECTION    "1"
  397.  
  398. #define SYS_MAN_DIR    "/usr/man/man1"
  399. #define SYS_MAN_SECTION        "1m"
  400.  
  401. #define DAEMON_MAN_DIR    "/usr/man/man8"
  402. #define DAEMON_MAN_SECTION    "8"
  403.  
  404.  
  405. /************************** LOCAL POLICY *****************************
  406.  *
  407.  *    Define STATISTICS if you want to keep a record of how much
  408.  *    time the users spend on news reading.
  409.  *
  410.  *    Sessions shorter than the specified number of minutes are not
  411.  *    recorded (don't clutter up the log file).
  412.  *
  413.  *    Usage statistics is entered into the $LOG_FILE with code U
  414.  */
  415.  
  416. /* #define STATISTICS    5    /* minutes */
  417.  
  418. /*
  419.  *    Define ACCOUNTING if you want to keep accumulated accounting
  420.  *    based on the statistics in a separate 'acct' file.  In this
  421.  *    case, the accounting figures will be secret, and not be
  422.  *    written to the Log file.  And the users will not be able to
  423.  *    "decrease" their own account.
  424.  *
  425.  *    See account.h for optional cost calculation parameters.
  426.  */
  427.  
  428. /* #define ACCOUNTING    /* */
  429.  
  430. /*
  431.  *    Define AUTHORIZE if you want to restrict the use of nn to
  432.  *    certain users or certain periods of the day.  Define both
  433.  *    this and ACCOUNTING if you want to impose a usage quota.
  434.  *
  435.  *    See account.c for implementing various access policies.
  436.  */
  437.  
  438. /* #define AUTHORIZE    /* */
  439.  
  440. /*
  441.  *    Default folder directory
  442.  */
  443.  
  444. #define FOLDER_DIRECTORY    "~/News"
  445.  
  446. /*
  447.  *    Max length of authors name (in "edited" format).
  448.  *    Also size of "Name" field on the article menus.
  449.  *    You may want to increase this if your terminals are wider than
  450.  *    80 columns.
  451.  */
  452.  
  453. #define NAME_LENGTH    16
  454.  
  455. /*
  456.  *    Does your 'inews' program run immediately, or does it defer?
  457.  *    If you have C-News, it can take minutes to find out if a post
  458.  *    was accepted, whereas with INN, it only takes seconds.
  459.  */
  460.  
  461. #define INEWS_IS_FAST    /* comment out for C-News */
  462.  
  463. /*
  464.  *    Synchronous posting: If set this will cause NN to wait until a
  465.  *    post or mail is *actually* finished.  If you want to NN's
  466.  *    "Article posted" message to be *accurate*, then define this. 
  467.  *    Warning: Do NOT define this if you are using C-News, or you will
  468.  *    have to wait 60 seconds or more to find out if the post has been
  469.  *    accepted.  You probably want this if you are using INN or posting
  470.  *    via some sort of NNTP.
  471.  */
  472.  
  473. #define SYNCHRONOUS_POSTING    /* comment out for C-News */
  474.  
  475. /*
  476.  *    PUT_TIMESTAMP_IN_SCRIPTS
  477.  *    Defining this causes the "inst" script to add identifying information
  478.  *    to the beginning of the shell scripts.
  479.  */
  480.  
  481. #define PUT_TIMESTAMP_IN_SCRIPTS    /* */
  482.  
  483. /*
  484.  *    CONFIG_NUM_IN_VERSION
  485.  *    Defining this will make NN announce itself including the build number
  486.  *    like "NN version 6.5.xx #12", rather than "NN version 6.5.xx".
  487.  */
  488.  
  489. /* #define CONFIG_NUM_IN_VERSION    /* */
  490.  
  491. /*
  492.  *    NO_X_NEWSREADER
  493.  *    Define this to disable the "X-Newsreader: " header in posts and mail
  494.  *    Son-of-RFC1036 is rumoured to discourage this.
  495.  */
  496.  
  497. /* #define NO_X_NEWSREADER    /* */
  498.  
  499. /*
  500.  *    ART_GREP
  501.  *    Define this if you want to enable the "experimental" subject
  502.  *    body search code.  On the "G" menu, there will be two extra
  503.  *    choices: "b" body search unread, and "B" body search all.
  504.  *    Choose your pattern, and you will be presented with a merged group
  505.  *    containing the articles you chose.  There may still be bugs!
  506.  *    WARNING:
  507.  *    THIS WOULD BE *BAD* FOR NNTP SITES!  You don't want all your
  508.  *     users downloading the entire news database...
  509.  */
  510.  
  511. /* #define ART_GREP    /* */
  512.  
  513. /*
  514.  *    CACHE_PURPOSE
  515.  *    Defining this makes NN cache the newsgroup/purpose list, sorted
  516.  *    in memory and use binary search to locate a group's purpose.
  517.  *    This can be a winner on systems with *everything* in their
  518.  *    newsgroups list.
  519.  *    Currently CACHE_PURPOSE and nnmaster don't work together,
  520.  *    so please leave this undefined unless you are using NOV.
  521.  */
  522.  
  523. /* #define CACHE_PURPOSE    /* */
  524.  
  525.  
  526. /************************ CONFIGURATION COMPLETED ************************/
  527.  
  528. #include "global.h"
  529.  
  530.