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 < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-16  |  10.9 KB  |  377 lines

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