home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume4 / uumail3 / part2 / uuconf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  4.8 KB  |  154 lines

  1. /* $Header: uuconf.h,v 3.0 86/03/14 12:05:12 sob RELEASE_3 $
  2.  * Configuration for uumail and uupath utilities
  3.  * Please see the header for makefile for changes you may
  4.  * need to make there.
  5. ***************************************************************************
  6. This work in its current form is Copyright 1986 Stan Barber
  7. with the exception of opath, gethostname and the original getpath which
  8. as far as I know are in the Public Domain. This software may be distributed
  9. freely as long as no profit is made from such distribution and this notice
  10. is reproducted in whole.
  11. ***************************************************************************
  12. This software is provided on an "as is" basis with no guarantee of 
  13. usefulness or correctness of operation for any purpose, intended or
  14. otherwise. The author is in no way liable for this software's performance
  15. or any damage it may cause to any data of any kind anywhere.
  16. ***************************************************************************
  17.  * $Log:    uuconf.h,v $
  18.  * Revision 3.0  86/03/14  12:05:12  sob
  19.  * Release of 3/15/86 --- 3rd Release
  20.  * 
  21.  * Revision 1.8  86/03/14  11:58:00  sob
  22.  * 
  23.  * 
  24.  * Revision 1.7  86/02/23  23:02:46  sob
  25.  * updated to follow modifications to getpath
  26.  * 
  27.  * Revision 1.6  85/12/30  17:00:55  sob
  28.  * Removed include for setjump.h and added NULL definition
  29.  * suggested by bug report
  30.  * 
  31.  * Revision 1.5  85/12/10  20:42:30  sob
  32.  * Added defines for new parts of getpath, SENTINAL and TIMEOUT
  33.  * 
  34.  * Revision 1.4  85/10/02  02:16:21  sob
  35.  * Added LOCALMAIL definition
  36.  * 
  37.  * Revision 1.3  85/09/30  02:50:51  sob
  38.  * Added pwd.h to list of include files
  39.  * 
  40.  * Revision 1.2  85/07/11  19:29:34  sob
  41.  * *** empty log message ***
  42.  * 
  43.  * Revision 1.1  85/07/11  19:22:20  sob
  44.  * Initial revision
  45.  * 
  46.  */
  47. #include <stdio.h>
  48. #include <ctype.h>
  49. #include <pwd.h>
  50. #include <signal.h>
  51.  
  52. /*
  53.  * sysexits is a file of exit codes that are used in sendmail
  54.  * and other programs ...
  55.  */
  56. #include <sysexits.h>
  57. /* if you don't have sysexits.h here are the useful parts */
  58. #ifndef EX_OK
  59.  
  60. # define EX_OK        0    /* successful termination */
  61.  
  62.  
  63. # define EX_USAGE    64    /* command line usage error */
  64. # define EX_DATAERR    65    /* data format error */
  65. # define EX_NOINPUT    66    /* cannot open input */
  66. # define EX_NOHOST    68    /* host name unknown */
  67. # define EX_UNAVAILABLE    69    /* service unavailable */
  68. # define EX_SOFTWARE    70    /* internal software error */
  69. # define EX_OSERR    71    /* system error (e.g., can't fork) */
  70. # define EX_OSFILE    72    /* critical OS file missing */
  71. # define EX_CANTCREAT    73    /* can't create (user) output file */
  72. # define EX_IOERR    74    /* input/output error */
  73. # define EX_TEMPFAIL    75      /* temp failure; user should retry */
  74. #endif
  75.  
  76. typedef char bool;
  77.  
  78. #ifdef DBM
  79. #include <dbm.h>
  80. #endif
  81.  
  82. #ifdef SYSIII
  83. #define index strchr
  84. #define rindex strrchr
  85. #include <sys/utsname.h>
  86. #endif
  87.  
  88. #define NAMESIZ 32 /* system name size */
  89. #define PATHSIZ 16*NAMESIZ /* path length */
  90. #define NEIGHBORS  BUFSIZ/NAMESIZ
  91. #define TRUE    1
  92. #define FALSE    0
  93.  
  94. #ifndef TIMEOUT
  95. #define TIMEOUT ((unsigned) 180)
  96. #endif TIMEOUT
  97.  
  98. #ifndef SENTINEL
  99. #define SENTINEL "@@@"
  100. #endif SENTINEL
  101.  
  102. /* Does this solve the problem of null for dbm users?
  103.  * problem reported by pluto!warren */
  104. #ifndef NULL
  105. #define NULL    ((char *) 0)
  106. #endif
  107.  
  108. /* Here's where you should put in the the name of the file
  109.  * in which the uucpmap data is kept.
  110.  * For those using DBM, this will be the root filename for the database
  111.  * (eg... file.pag and file.dir with root name file)
  112.  */
  113. #define DATABASE "/usr/lib/uucp/palias"
  114. #define CONFIGFILE "/usr/lib/uucp/domains"
  115. #define LOGFILE "/usr/adm/uumail.log"
  116. #define ALIASFILE "/usr/lib/uucp/Aliases"
  117. /* this needs to be a printf-like string to deliver LOCAL mail */
  118. /* usually this is either /bin/mail or /bin/binmail */
  119.  
  120. #define LOCALMAIL "/bin/bellmail %s"
  121.  
  122. #ifdef _DEFINE
  123. #define EXTERN 
  124. #else
  125. #define EXTERN extern
  126. #endif
  127. /* The following structure is stolen from MH for use in a new
  128. aliasing and forwarding feature that will likely be stolen from
  129. MH. My thanks to the MH folks for making this stuff possible. */
  130.  
  131. struct  mailname {
  132.     struct mailname *m_next;
  133.     char            *m_name;
  134.     int              m_pipe;
  135. } ;
  136.  
  137. EXTERN int Debug;
  138. EXTERN char *paths;
  139. EXTERN char *ConfFile;
  140. EXTERN char *AliasFile;
  141. EXTERN char Myname[NAMESIZ];
  142. EXTERN char *logfile;
  143. EXTERN char    OpMode;        /* operation mode, see below */
  144. /* These don't do anything yet.... maybe next time they will do something */
  145. #define MD_DELIVER    'm'        /* be a mail sender */
  146. #define MD_ARPAFTP    'a'        /* old-style arpanet protocols */
  147. #define MD_SMTP        's'        /* run SMTP on standard input */
  148. #define MD_DAEMON    'd'        /* run as a daemon */
  149. #define MD_VERIFY    'v'        /* verify: don't collect or deliver */
  150. #define MD_TEST        't'        /* test mode: resolve addrs only */
  151. #define MD_INITALIAS    'i'        /* initialize alias database */
  152. #define MD_PRINT    'p'        /* print the queue */
  153. #define MD_FREEZE    'z'        /* freeze the configuration file */
  154.