home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume16 / deliver / part01 / config.h next >
C/C++ Source or Header  |  1988-11-14  |  4KB  |  142 lines

  1. /* $Header: config.h,v 1.3 88/09/14 19:41:35 network Exp $
  2.  *
  3.  * Deliver configuration.
  4.  *
  5.  * $Log:    config.h,v $
  6.  * Revision 1.3  88/09/14  19:41:35  network
  7.  * Portability to System V and BSD.
  8.  * General fixup.
  9.  * 
  10.  * Revision 1.2  88/08/25  15:21:15  network
  11.  * Change default system delivery file to "/usr/local/lib/deliver.sys".
  12.  * Add ENV_SYSDEL and ENV_USERDEL for system and user delivery filenames.
  13.  * 
  14.  * Revision 1.1  88/06/06  09:37:27  chip
  15.  * Initial revision
  16.  * 
  17.  */
  18.  
  19. /*----------------------------------------------------------------------
  20.  * Various kinds of mailbox locking.
  21.  * You may define one or both of ML_DOTLOCK and ML_DOTMLK.
  22.  * You may define no more than one of ML_FCNTL, ML_LOCKF and ML_LOCKING.
  23.  *
  24.  * File creation locking:
  25.  *     ML_DOTLOCK   create <mailbox>.lock       (most systems except BSD4.3)
  26.  *     ML_DOTMLK    create /tmp/<basename>.mlk  (Xenix)
  27.  *
  28.  * Kernel record locking:
  29.  *     ML_FCNTL     lock with fcntl(F_SETLKW)   (SVID systems only)
  30.  *     ML_LOCKF     lock with lockf(F_LOCK)     (SVID systems only)
  31.  *     ML_LOCKING   lock with locking(LK_LOCK)  (Xenix systems only)
  32.  */
  33.  
  34. #ifdef M_XENIX
  35. #define ML_DOTMLK
  36. #define ML_LOCKING
  37. #else
  38. #define ML_DOTLOCK
  39. #endif
  40.  
  41. /*----------------------------------------------------------------------
  42.  * Maximum filename length.
  43.  * Note that this is for _filenames_, not _pathnames_.
  44.  * For AT&T file systems, the usual value is 14.
  45.  * For Berzerkley file systems, use something big like 255.
  46.  */
  47.  
  48. #ifdef BSD
  49. #define MAX_NAMESIZE    255
  50. #else
  51. #define MAX_NAMESIZE    14
  52. #endif
  53.  
  54. /*----------------------------------------------------------------------
  55.  * How to get the host name.
  56.  *
  57.  * HOSTFILE             file containing name    (Xenix)
  58.  * UNAME                uname()                 (System V)
  59.  * GETHOSTNAME          gethostname()           (BSD)
  60.  */
  61.  
  62. #ifdef M_XENIX
  63. #define HOSTFILE   "/etc/systemid"
  64. #else
  65. #ifdef USG
  66. #define UNAME
  67. #else
  68. #ifdef BSD
  69. #define GETHOSTNAME
  70. #endif
  71. #endif
  72. #endif
  73.  
  74. /*----------------------------------------------------------------------
  75.  * Are vprintf() and friends available?
  76.  * Is putenv() available?
  77.  */
  78.  
  79. #ifndef BSD
  80. #define HAS_VPRINTF
  81. #define HAS_PUTENV
  82. #endif
  83.  
  84. /*----------------------------------------------------------------------
  85.  * Name of shell used to execute delivery files.
  86.  */
  87.  
  88. #define SHELL   "/bin/sh"
  89.  
  90. /*----------------------------------------------------------------------
  91.  * Standard mailbox location.
  92.  *
  93.  * Define either MAILBOX_NAME or MAILBOX_DIR.
  94.  * If MAILBOX_NAME is defined, then the default mailbox is a file with
  95.  * that name in the user's home directory.
  96.  * If MAILBOX_DIR is defined, then the default mailbox is a file in that
  97.  * directory with the same name as the user.
  98.  *
  99.  * Define MAILBOX_GROUP if all mailboxes must be owned by a specific group.
  100.  * (System V requires this feature.)  If MAILBOX_GROUP is not defined,
  101.  * mailboxes will have their groups set to the recipients' default group.
  102.  *
  103.  * Define MAILBOX_MODE to the file access modes for new mailboxes.
  104.  * (System V requires group write permissions, i.e. 0020.)
  105.  */
  106.  
  107. #ifdef USG
  108. /* #define MAILBOX_NAME   "mbox" */
  109. #define MAILBOX_DIR     "/usr/mail"
  110. #define MAILBOX_MODE    0660
  111. #define MAILBOX_GROUP   "mail"
  112. #else
  113. /* #define MAILBOX_NAME   "mbox" */
  114. #define MAILBOX_DIR     "/usr/spool/mail"
  115. #define MAILBOX_MODE    0600
  116. #endif
  117.  
  118. /*----------------------------------------------------------------------
  119.  * Names of delivery files.
  120.  *
  121.  * SYS_DELIVER          system-wide delivery file
  122.  * USER_DELIVER         user delivery file (in user's home directory)
  123.  */
  124.  
  125. #define SYS_DELIVER     "/usr/local/lib/deliver.sys"
  126. #define USER_DELIVER    ".deliver"
  127.  
  128. /*----------------------------------------------------------------------
  129.  * Environment variables passed to child processes.
  130.  * Variables marked with [#] are created only if they are specified
  131.  * as command line options.
  132.  */
  133.  
  134. #define ENV_DFLAGS      "DELFLAGS"      /* Flags: [-[Avdt]]             */
  135. #define ENV_SYSDEL      "SYSDELFILE"    /* System delivery file [#]     */
  136. #define ENV_USERDEL     "USERDELFILE"   /* User delivery file [#]       */
  137.  
  138. #define ENV_HOSTNAME    "HOSTNAME"      /* Name of this host            */
  139. #define ENV_SENDER      "SENDER"        /* Message sender [#]           */
  140. #define ENV_HEADER      "HEADER"        /* Message header file          */
  141. #define ENV_BODY        "BODY"          /* Message body file            */
  142.