home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TCPIP / NNTP-1.000 / NNTP-1 / nntp.1.5.11t / common / conf.h.dist < prev    next >
Encoding:
Text File  |  1993-10-17  |  10.9 KB  |  373 lines

  1. /* $Header: conf.h.dist,v 1.8 91/02/04 00:46:31 sob Exp $
  2.  * Configuration information for use by NNTP server and support
  3.  * programs.  Change these as appropriate for your system.
  4.  */
  5.  
  6. /*
  7.  * Compile time options.
  8.  */
  9.   
  10.  
  11. #undef    ALONE        /* True if we're running without inetd */
  12.  
  13. #ifdef ALONE
  14. #undef    FASTFORK        /* True if we don't want to read active file on start*/
  15. #endif
  16.  
  17. #define LOAD 5            /* Loadav above which server refuses connections */
  18. /*
  19.  * If you want to experiment with the dynamic allocation of the article
  20.  * array, define DYNAMIC_ART_ARRAY.
  21.  * This code came to beta too late for through testing, but it is a problem
  22.  * at some sites, so it is an option. Please report problems to "nntp@tmc.edu"
  23.  */
  24. #undef DYNAMIC_ART_ARRAY
  25.  
  26. #undef    BSD_42        /* 4.2 compatability code -- if this is defined, */
  27.             /* DBM probably wants to be defined as well. */
  28.  
  29. #define BSD_43        /* Define if you are running on BSD 4.3 */
  30.  
  31. #undef CMU_MACH        /* Use CMU's MACH ioctl(FIOCFSPARAM) for dfree(). */
  32.  
  33. #undef    USG        /* System V support */
  34.  
  35. #undef TLI        /* Define this if you want to use TLI instead of */
  36.             /* sockets */
  37.  
  38. #define NDBM        /* Use new-style (4.3) ndbm(3x) libraries */
  39.  
  40. #undef    DBM        /* True if we want to use the old dbm(3x) libraries */
  41.             /* IF YOU DEFINE THIS, change CFLAGS in makefile to */
  42.             /* be -ldbm */
  43.  
  44. #undef    DBZ        /* True if we want to use dbz libraries */
  45.             /* IF YOU DEFINE THIS, change CFLAGS in makefile to */
  46.             /* be /usr/lib/dbz.o and install dbz.h */
  47.  
  48. #undef    USGHIST        /* Use USG style history file (no DBM) */
  49.             /* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/
  50.  
  51. #undef CNEWS        /* define this if you are running C-NEWS */
  52. #undef BATCHED_INPUT    /* define if you want to support C-NEWS style 
  53.                 batched input (not supported by B-NEWS,yet)  */
  54.  
  55. /* Vendor specific implementations */
  56. #undef LAI_TCP        /* Lachman Streams TCP/IP support (Xenix) */
  57. #undef EXCELAN        /* Excelan EXOS 205 support */
  58. #undef WIN_TCP        /* WIN/TCP support [does not work yet] */
  59.  
  60. /* Things that vary in Unix variations */
  61. #undef U_LONG        /* Define this if your <sys/types.h> is missing */
  62.             /* typedefs for u_long */
  63. #define SIGRET void    /* Newfangled signal() returns void, old returns int */
  64.  
  65. #define    GHNAME        /* Define if you have gethostname() */
  66. #undef    UUNAME        /* Define to use /etc/uucpname */
  67.             /* If neither of these are defined, */
  68.             /* inews will use the contents of */
  69.             /* /usr/include/whoami.h */
  70.  
  71. #undef MMAP        /* if your OS supports mmap() */
  72.  
  73. /*
  74.  * If you DON'T have vfork, make this "#define vfork fork"
  75.  * vfork will speed up article transfer nntpds by about 2.5 times.
  76.  */
  77.  
  78. /* #define    vfork fork */
  79.  
  80. /* Controlling disk and inode consumption */
  81. #define MINFREE 4000    /* NNTP will not allow an XFER if there is less */
  82.             /* than this much diskspace (in blocks or kbytes) */
  83. #define POSTBUFFER 1000 /* NNTP will allow local posting until */
  84.             /* MINFREE-POSTBUFFER blocks or kbytes are left */
  85. #undef MINFILES  MINFREE/4
  86.             /* NNTP will not allow an XFER if there is less */
  87.             /* than this many inodes on the SPOOLDIR filesystem */
  88. #undef SETPROCTITLE    /* if you want status visable via ps */
  89.  
  90. #undef    IHAVE_DEBUG    /* Copious debugging output from ihave */
  91.  
  92. #define    XHDR        /* Optional XHDR command.  Defining this will */
  93.             /* speed up '=' command in rn, but will load */
  94.             /* the server more.  If your server is heavily */
  95.             /* loaded already, defining this may be a bad idea */
  96.  
  97. /* Things that vary in network implementations *
  98. #define    SUBNET        /* If you have 4.3 subnetting */
  99. #undef    DAMAGED_NETMASK    /* If your subnet mask is not a multiple of */
  100.             /* four bits (e.g., UCSD) */
  101.  
  102. #undef    NETMASK        /* If you don't have subnet ioctls, define */
  103.             /* this to be a hex constant of your subnet */
  104.             /* mask, e.g., #define NETMASK 0xffffff00 */
  105.             /* Of course, you must define SUBNET above, too. */
  106. #undef    DECNET        /* If you want decnet support */
  107.  
  108. /*
  109.  * If you want CNEWS batch files created that are not world writable,
  110.  * remove the comments from the UMASK line below. This does not apply
  111.  * if you are running BNEWS. At least, not yet. :-)
  112.  */
  113.  
  114. /* #define UMASK 022 */
  115.  
  116. /*
  117.  * If you have the syslog library routine, define SYSLOG to
  118.  * be the syslog facility name under which stats should be
  119.  * logged.  Newer 4.3 systems might choose LOG_NEWS;
  120.  * LOG_LOCAL7 is an acceptable substitute.
  121.  *
  122.  * If you don't have support for syslog, but want a facsimile,
  123.  * define FAKESYSLOG to be the name of a file to which to log stuff,
  124.  * then define SYSLOG and LOG, too.  e.g.,
  125.  *
  126.  *    #define    FAKESYSLOG    "/usr/lib/news/nntplog"
  127.  *
  128.  * If your host supports the BSD fdopen() function and the O_APPEND flag
  129.  * to open(), you should define FAKEAPPEND with FAKESYSLOG so that
  130.  * multiple copies of nntpd don't trash the log with buffered fprintf's.
  131.  *
  132.  * If you don't want any syslog-type activity, #undef SYSLOG.
  133.  * Obviously, this means that you can't define LOG, either.
  134.  */
  135.  
  136. #undef    FAKESYSLOG    "/usr/lib/news/nntplog"
  137. #undef    FAKEAPPEND
  138.  
  139. #define    SYSLOG    LOG_NEWS
  140.  
  141. #ifdef SYSLOG        /* Define LOG if you want copious logging info */
  142. #undef     LOG        /* undef it if you don't */
  143. #endif            /* but you can only have LOG if you have SYSLOG */
  144.  
  145. /*
  146.  * How long you want nntp servers to hang out without receiving
  147.  * commands before they close the connection with an error message.
  148.  *
  149.  * If you don't want any timeout, #undef it, i.e.,
  150.  *
  151.  *    #undef    TIMEOUT
  152.  *
  153.  * TIMEOUT should be at least two hours, which allows users some time
  154.  * away from their terminal (e.g., at lunch) while reading news.
  155.  */
  156.  
  157. #define    TIMEOUT    (2 * 3600)
  158.  
  159.  
  160. /*
  161.  * How long you want nntp servers to wait without receiving data
  162.  * during article transfers.  You CANNOT have XFER_TIMEOUT while
  163.  * running in standalond (ALONE) mode.
  164.  *
  165.  * If you don't want any transfer timeouts, #undef it, as above.
  166.  */
  167.  
  168. #ifndef ALONE
  169. #   define    XFER_TIMEOUT    (30 * 60)
  170. #endif ALONE
  171.  
  172. /*
  173.  * Your domain.  This is for the inews generated From: line,
  174.  * assuming that it doesn't find one in the article's head.
  175.  * Suggestions are .UUCP if you don't belong to the Internet.
  176.  * If your hostname returns the fully-qualified domain name
  177.  * as some 4.3 BSD systems do, simply undefine DOMAIN.
  178.  * If you want your network to appear to be one host, define
  179.  * HIDDENNET.
  180.  *
  181.  * e.g.  #define    DOMAIN        "berkeley.edu"
  182.  */
  183.  
  184. #define    DOMAIN    "uucp"
  185. #undef HIDDENNET
  186.  
  187. /*
  188.  * Means do a gethostbyname() to get the canonical host name. 
  189.  * Define this and HIDDENNET will have no effect.
  190.  */
  191.  
  192. #undef REALDOMAIN
  193.  
  194. /*
  195.  * Define DO_DOTDIR if you want the mini-inews to look for 
  196.  * this directory if defined in the environment.  This is like rn.
  197.  * Undefine it and it will only look in the user's home directory. 
  198.  */
  199. #define DO_DOTDIR
  200.  
  201. /* Things that relate to authentication and access */
  202. /* Define AUTH to use the proposed NNTP Version 2 authentication protocol. */
  203. #define    AUTH    
  204. /*
  205.  * A file containing the name of the host which is running
  206.  * the news server.  This will have to match what rrn thinks,
  207.  * too.
  208.  */
  209.  
  210. #define    SERVER_FILE    "/usr/local/lib/rn/server"
  211.  
  212. /*
  213.  * Person (user name) to post news as.
  214.  */
  215.  
  216. #define    POSTER        "usenet"
  217.  
  218. /*
  219.  * Define DOMAINMATCH if you want to use domain specifications in the 
  220.  * access list instead of just hostnames. See README for more information 
  221.  */
  222. #define DOMAINMATCH
  223.  
  224. #ifdef AUTH
  225. /* 
  226.  * the file where the nntpxmit site/userid/passwords are kept
  227.  * think (and PROTECT!) this file like L.sys, i.e., mode 600
  228.  */
  229. # define    PASSFILE    "/etc/nntp.sys"
  230. #endif
  231. /*
  232.  * This file is where access information is stored
  233.  */
  234. #define ACCESS_FILE    "/usr/lib/news/nntp_access"
  235. /*
  236.  * These files are generated by the support programs, and are needed
  237.  * by the NNTP server.  Make sure that whatever directory you
  238.  * decide these files should go is writable by whatever uid you
  239.  * have the sypport programs run under.
  240.  */
  241. #ifndef CNEWS
  242. # define STAT_FILE    "/usr/lib/news/mgdstats"
  243. # define NGDATE_FILE    "/usr/lib/news/groupdates"
  244.  
  245. /*
  246.  * But if you have C News, you can define ACTIVE_TIMES_FILE instead of
  247.  * STAT_FILE and NGDATE_FILE, and you won't have to run "mkgrdates".
  248.  */
  249.  
  250. #else
  251. # define ACTIVE_TIMES_FILE    "/usr/lib/news/active.times"
  252. #endif
  253.  
  254. /*
  255.  * Some commonly used programs and files.
  256.  */
  257.  
  258. #define    ACTIVE_FILE    "/usr/lib/news/active"
  259. #define DISTRIBUTIONS_FILE    "/usr/lib/news/distributions"
  260. #define NEWSGROUPS_FILE    "/usr/lib/news/newsgroups"
  261. #define HISTORY_FILE    "/usr/lib/news/history"
  262. #define    SPOOLDIR    "/usr/spool/news"
  263. #define INEWS        "/usr/lib/news/inews"
  264. #define RNEWS        "/usr/bin/rnews"        /* Link to inews? */
  265.  
  266. /*
  267.  * Support for C-News style batching 
  268.  */
  269. #undef  NONEWSRUN        /* define this if you are using the daemon */
  270.                 /* version of relaynews */
  271. #ifdef NONEWSRUN
  272. #define TOOBIG 1L        
  273. #define TOOMANY 1
  274. #else
  275. #define TOOBIG 300000L        /* batch > TOOBIG bytes, kick rnews */
  276. #define TOOMANY 1024        /* batch > TOOMANY articles, kick rnews */
  277. #define NEWSRUN            "/usr/lib/newsbin/input/newsrun"
  278. #endif
  279. #define TOOOLD (5*60)        /* batch > TOOOLD seconds old, kick rnews */
  280. #define COPYSIZE 8192        /* bytes to copy at one time */
  281. #define MAXDIGITS 25        /* lg(maxlongint) + epsilon */
  282. #define MAXSTR 1024
  283. #define INDIR            "/usr/spool/news/in.coming"
  284. /* You may wish to delete the pathname from the front of BATCH_FILE */
  285. #define BATCH_FILE        "/usr/spool/news/in.coming/nntp.XXXXXX"
  286.  
  287. /************************************************************************/
  288. /* We don't recommend that you make changes in anything after this line */
  289. /************************************************************************/
  290.  
  291. #ifdef DBZ        /* If you use DBZ, then you need DBM as well. */
  292. #ifndef DBM
  293. #define DBM
  294. #endif /* DBM */
  295. #endif /* DBZ */
  296.  
  297. #ifdef BSD_42        /* This is a logical, warranted assumption */
  298. #   ifndef DBM        /* which will probably get me in trouble. */
  299. #    define DBM    /* Kill it if you have 4.2 *and* ndbm.  */
  300. #   endif not DBM
  301. #   ifndef sun        /* not a sun */
  302. #       ifndef ultrix   /* not ultrix */
  303. #           ifndef CMU_MACH /* not CMU's Mach */
  304. #        ifndef NeXT /* not a NeXT */
  305. #                  ifndef READ_SUPER
  306. #                    define READ_SUPER /* read super block for space() */
  307. #            endif
  308. #               endif
  309. #           endif
  310. #       endif
  311. #   endif
  312. #endif BSD_42
  313.  
  314. #ifndef USG
  315. #    ifndef BSD_42
  316. #        ifndef CMU_MACH
  317. #            ifndef BSD_43
  318. #                define BSD_43
  319. #            endif
  320. #        endif
  321. #    endif
  322. #endif
  323.  
  324. #ifdef BSD_43        /* And now more assumptions! */
  325. #   ifndef sun
  326. #    ifndef ultrix    /* Ultrix 4.0 or greater */
  327. #        ifndef READ_SUPER
  328. #            define READ_SUPER
  329. #        endif
  330. #    endif
  331. #   endif
  332. #    ifndef DBZ
  333. #        ifndef DBM
  334. #            ifndef NDBM
  335. #                define NDBM
  336. #            endif
  337. #        endif
  338. #    endif
  339. #endif
  340.  
  341. /*
  342.  * System V compatability
  343.  */
  344.  
  345. #ifdef USG
  346. # define    FCNTL            /* If O_etc is defined in <fcntl.h> */
  347. #ifdef dgux
  348. #define        FTRUNCATE
  349. #else
  350. # define    NDIR            /* If you  need ndir library support */
  351. #ifdef hpux
  352. #define        DIRSIZ_MACRO
  353. #endif
  354. #endif
  355. # define    index    strchr
  356. # define    rindex    strrchr
  357. # ifdef U_LONG
  358.    typedef    unsigned long    u_long;
  359.    typedef    unsigned short    u_short;
  360. # endif U_LONG
  361. # define    IPPORT_NNTP    119
  362. #endif USG
  363.  
  364.  
  365. /*
  366.  * Some miscellaneous stuff you probably don't want to change.
  367.  */
  368.  
  369. #define    MAX_ARTICLES    4096        /* Maximum number of articles/group */
  370. #define READINTVL    60 * 10        /* 10 minutes b/n chking active file */
  371.  
  372.  
  373.