⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conf.h

📁 < linux网络编程工具>>配套源码
💻 H
📖 第 1 页 / 共 5 页
字号:
/*
 * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
 *	All rights reserved.
 * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
 * Copyright (c) 1988, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * By using this file, you agree to the terms and conditions set
 * forth in the LICENSE file which can be found at the top level of
 * the sendmail distribution.
 *
 *
 *	$Id: conf.h,v 8.496.4.25 2000/08/08 23:50:40 ca Exp $
 */

/*
**  CONF.H -- All user-configurable parameters for sendmail
**
**	Send updates to sendmail@Sendmail.ORG so they will be
**	included in the next release.
*/

#ifndef CONF_H
#define CONF_H 1

#ifdef __GNUC__
struct rusage;	/* forward declaration to get gcc to shut up in wait.h */
#endif /* __GNUC__ */

# include <sys/param.h>
# include <sys/types.h>
# if SFIO && defined(SF_APPEND)
#  undef SF_APPEND		/* Both sfio/stdio.h and sys/stat.h define it */
# endif /* SFIO && defined(SF_APPEND) */
# include <sys/stat.h>
# ifndef __QNX__
/* in QNX this grabs bogus LOCK_* manifests */
#  include <sys/file.h>
# endif /* ! __QNX__ */
# include <sys/wait.h>
# include <limits.h>
# include <fcntl.h>
# include <signal.h>
# include <netdb.h>
# include <pwd.h>
# include <grp.h>

/* make sure TOBUFSIZ isn't larger than system limit for size of exec() args */
#ifdef ARG_MAX
# if ARG_MAX > 4096
#  define SM_ARG_MAX	4096
# else /* ARG_MAX > 4096 */
#  define SM_ARG_MAX	ARG_MAX
# endif /* ARG_MAX > 4096 */
#else /* ARG_MAX */
# define SM_ARG_MAX	4096
#endif /* ARG_MAX */

/**********************************************************************
**  Table sizes, etc....
**	There shouldn't be much need to change these....
**********************************************************************/

#define MAXLINE		2048		/* max line length */
#define MAXNAME		256		/* max length of a name */
#define MAXPV		256		/* max # of parms to mailers */
#define MAXATOM		1000		/* max atoms per address */
#define MAXRWSETS	200		/* max # of sets of rewriting rules */
#define MAXPRIORITIES	25		/* max values for Precedence: field */
#define MAXMXHOSTS	100		/* max # of MX records for one host */
#define SMTPLINELIM	990		/* maximum SMTP line length */
#define MAXKEY		128		/* maximum size of a database key */
#define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
#define MAXUSERENVIRON	100		/* max envars saved, must be >= 3 */
#define MAXALIASDB	12		/* max # of alias databases */
#define MAXMAPSTACK	12		/* max # of stacked or sequenced maps */
#if _FFR_MILTER
# define MAXFILTERS	25		/* max # of milter filters */
# define MAXFILTERMACROS	50	/* max # of macros per milter cmd */
#endif /* _FFR_MILTER */
#define MAXSMTPARGS	20		/* max # of ESMTP args for MAIL/RCPT */
#define MAXTOCLASS	8		/* max # of message timeout classes */
#define MAXRESTOTYPES	3		/* max # of resolver timeout types */
#define MAXMIMEARGS	20		/* max args in Content-Type: */
#define MAXMIMENESTING	20		/* max MIME multipart nesting */
#define QUEUESEGSIZE	1000		/* increment for queue size */
#define MAXQFNAME	20		/* max qf file name length */
#define MACBUFSIZE	4096		/* max expanded macro buffer size */
#define TOBUFSIZE	SM_ARG_MAX	/* max buffer to hold address list */
#define MAXSHORTSTR	203		/* max short string length */
#define MAXMACNAMELEN	25		/* max macro name length */
#define MAXMACROID	0377		/* max macro id number */
#ifndef MAXHDRSLEN
# define MAXHDRSLEN	(32 * 1024)	/* max size of message headers */
#endif /* ! MAXHDRSLEN */
#define MAXDAEMONS	10		/* max number of ports to listen to */
#ifndef MAXINTERFACES
# define MAXINTERFACES	512		/* number of interfaces to probe */
#endif /* MAXINTERFACES */
#ifndef MAXSYMLINKS
# define MAXSYMLINKS	32		/* max number of symlinks in a path */
#endif /* ! MAXSYMLINKS */
#define MAXLINKPATHLEN	(MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */
#define DATA_PROGRESS_TIMEOUT	300	/* how ofter to check DATA progress */
#define ENHSCLEN	10		/* max len of enhanced status code */
#if _FFR_DYNAMIC_TOBUF
# define DEFAULT_MAX_RCPT	100	/* max number of RCPTs per envelope */
#endif /* _FFR_DYNAMIC_TOBUF */

#if SASL
# ifndef AUTH_MECHANISMS
#  if STARTTLS && _FFR_EXT_MECH
#   define AUTH_MECHANISMS	"EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
#  else /* STARTTLS && _FFR_EXT_MECH */
#   define AUTH_MECHANISMS	"GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
#  endif /* STARTTLS && _FFR_EXT_MECH */
# endif /* ! AUTH_MECHANISMS */
#endif /* SASL */

#ifdef LDAPMAP
# define LDAPMAP_MAX_ATTR	64
# define LDAPMAP_MAX_FILTER	1024
# define LDAPMAP_MAX_PASSWD	256
#endif /* LDAPMAP */

/**********************************************************************
**  Compilation options.
**	#define these to 1 if they are available;
**	#define them to 0 otherwise.
**  All can be overridden from Makefile.
**********************************************************************/

#ifndef NETINET
# define NETINET	1	/* include internet support */
#endif /* ! NETINET */

#ifndef NETINET6
# define NETINET6	0	/* do not include IPv6 support */
#endif /* ! NETINET6 */

#ifndef NETISO
# define NETISO	0		/* do not include ISO socket support */
#endif /* ! NETISO */

#ifndef NAMED_BIND
# define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
#endif /* ! NAMED_BIND */

#ifndef XDEBUG
# define XDEBUG		1	/* enable extended debugging */
#endif /* ! XDEBUG */

#ifndef MATCHGECOS
# define MATCHGECOS	1	/* match user names from gecos field */
#endif /* ! MATCHGECOS */

#ifndef DSN
# define DSN		1	/* include delivery status notification code */
#endif /* ! DSN */

#if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD))
# define USERDB		1	/* look in user database */
#endif /* !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) */

#ifndef MIME8TO7
# define MIME8TO7	1	/* 8->7 bit MIME conversions */
#endif /* ! MIME8TO7 */

#ifndef MIME7TO8
# define MIME7TO8	1	/* 7->8 bit MIME conversions */
#endif /* ! MIME7TO8 */

/**********************************************************************
**  "Hard" compilation options.
**	#define these if they are available; comment them out otherwise.
**  These cannot be overridden from the Makefile, and should really not
**  be turned off unless absolutely necessary.
**********************************************************************/

#define LOG		1	/* enable logging -- don't turn off */

/**********************************************************************
**  End of site-specific configuration.
**********************************************************************/
/*
**  General "standard C" defines.
**
**	These may be undone later, to cope with systems that claim to
**	be Standard C but aren't.  Gcc is the biggest offender -- it
**	doesn't realize that the library is part of the language.
**
**	Life would be much easier if we could get rid of this sort
**	of bozo problems.
*/

#ifdef __STDC__
# define HASSETVBUF	1	/* we have setvbuf(3) in libc */
#endif /* __STDC__ */

/*
**  Assume you have standard calls; can be #undefed below if necessary.
*/

#ifndef HASLSTAT
# define HASLSTAT	1	/* has lstat(2) call */
#endif /* ! HASLSTAT */
/**********************************************************************
**  Operating system configuration.
**
**	Unless you are porting to a new OS, you shouldn't have to
**	change these.
**********************************************************************/

/*
**  HP-UX -- tested for 8.07, 9.00, and 9.01.
**
**	If V4FS is defined, compile for HP-UX 10.0.
**	11.x support from Richard Allen <ra@hp.is>.
*/

#ifdef __hpux
		/* common definitions for HP-UX 9.x and 10.x */
# undef m_flags		/* conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h on HP 300 */
# define SYSTEM5	1	/* include all the System V defines */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define USESETEUID	1	/* has usable seteuid(2) call */
# define BOGUS_O_EXCL	1	/* exclusive open follows symlinks */
# define seteuid(e)	setresuid(-1, e, -1)
# define IP_SRCROUTE	1	/* can check IP source routing */
# define LA_TYPE	LA_HPUX
# define SPT_TYPE	SPT_PSTAT
# define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
# define GIDSET_T	gid_t
# ifndef HASGETUSERSHELL
#  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
# endif /* ! HASGETUSERSHELL */
# ifdef HPUX11
#  define HASFCHOWN	1	/* has fchown(2) */
#  define HASSNPRINTF	1	/* has snprintf(3) */
#  ifndef BROKEN_RES_SEARCH
#   define BROKEN_RES_SEARCH 1	/* res_search(unknown) returns h_errno=0 */
#  endif /* ! BROKEN_RES_SEARCH */
# else /* HPUX11 */
#  ifndef NOT_SENDMAIL
#   define syslog	hard_syslog
#  endif /* ! NOT_SENDMAIL */
# endif /* HPUX11 */
# define SAFENFSPATHCONF 1	/* pathconf(2) pessimizes on NFS filesystems */

# ifdef V4FS
		/* HP-UX 10.x */
#  define _PATH_UNIX		"/stand/vmunix"
#  ifndef _PATH_VENDOR_CF
#   define _PATH_VENDOR_CF	"/etc/mail/sendmail.cf"
#  endif /* ! _PATH_VENDOR_CF */
#  ifndef _PATH_SENDMAILPID
#   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
#  endif /* ! _PATH_SENDMAILPID */
#  ifndef IDENTPROTO
#   define IDENTPROTO	1	/* TCP/IP implementation fixed in 10.0 */
#  endif /* ! IDENTPROTO */
#  include <sys/mpctl.h>	/* for mpctl() in get_num_procs_online() */
# else /* V4FS */
		/* HP-UX 9.x */
#  define _PATH_UNIX		"/hp-ux"
#  ifndef _PATH_VENDOR_CF
#   define _PATH_VENDOR_CF	"/usr/lib/sendmail.cf"
#  endif /* ! _PATH_VENDOR_CF */
#  ifndef IDENTPROTO
#   define IDENTPROTO	0	/* TCP/IP implementation is broken */
#  endif /* ! IDENTPROTO */
#  ifdef __STDC__
extern void	hard_syslog(int, char *, ...);
#  else /* __STDC__ */
extern void	hard_syslog();
#  endif /* __STDC__ */
#  define FDSET_CAST	(int *)	/* cast for fd_set parameters to select */
# endif /* V4FS */

#endif /* __hpux */


/*
**  IBM AIX 4.x
*/

#ifdef _AIX4
# define _AIX3		1	/* pull in AIX3 stuff */
# define BSD4_4_SOCKADDR	/* has sa_len */
# define USESETEUID	1	/* seteuid(2) works */
# define TZ_TYPE	TZ_NAME	/* use tzname[] vector */
# define SOCKOPT_LEN_T	size_t	/* arg#5 to getsockopt */
# if _AIX4 >= 40200
#  define HASSETREUID	1	/* setreuid(2) works as of AIX 4.2 */
#  define SOCKADDR_LEN_T	size_t	/* e.g., arg#3 to accept, getsockname */
# endif /* _AIX4 >= 40200 */
# if _AIX4 >= 40300
#  define HASSNPRINTF	1		/* has snprintf starting in 4.3 */
# endif /* _AIX4 >= 40300 */
# if defined(_ILS_MACROS)	/* IBM versions aren't side-effect clean */
#  undef isascii
#  define isascii(c)		!(c & ~0177)
#  undef isdigit
#  define isdigit(__a)		(_IS(__a,_ISDIGIT))
#  undef isspace
#  define isspace(__a)		(_IS(__a,_ISSPACE))
# endif /* defined(_ILS_MACROS) */
#endif /* _AIX4 */


/*
**  IBM AIX 3.x -- actually tested for 3.2.3
*/

#ifdef _AIX3
# include <paths.h>
# include <sys/machine.h>	/* to get byte order */
# include <sys/select.h>
# define HASFCHOWN	1	/* has fchown(2) */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASUNAME	1	/* use System V uname(2) system call */
# define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define IP_SRCROUTE	0	/* Something is broken with getsockopt() */
# define GIDSET_T	gid_t
# define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
# define SPT_PADCHAR	'\0'	/* pad process title with nulls */
# define LA_TYPE	LA_INT
# define FSHIFT		16
# define LA_AVENRUN	"avenrun"
#endif /* _AIX3 */


/*
**  IBM AIX 2.2.1 -- actually tested for osupdate level 2706+1773
**
**	From Mark Whetzel <markw@wg.waii.com>.
*/

#ifdef AIX			/* AIX/RT compiler pre-defines this */
# include <paths.h>
# include <sys/time.h>		/* AIX/RT resource.h does NOT include this */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASUNAME	1	/* use System V uname(2) system call */
# define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
# define HASFCHMOD	0	/* does not have fchmod(2) syscall */
# define HASSETREUID	1	/* use setreuid(2) -lbsd system call */
# define HASSETVBUF	1	/* use setvbuf(2) system call */
# define HASSETRLIMIT	0	/* does not have setrlimit call */
# define HASFLOCK	0	/* does not have flock call - use fcntl */
# define HASULIMIT	1	/* use ulimit instead of setrlimit call */
# define NEEDGETOPT	1	/* Do we need theirs or ours */
# define SYS5SETPGRP	1	/* don't have setpgid on AIX/RT */
# define IP_SRCROUTE	0	/* Something is broken with getsockopt() */
# define BSD4_3		1	/* NOT bsd 4.4 or posix signals */
# define GIDSET_T	int
# define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
# define SPT_PADCHAR	'\0'		/* pad process title with nulls */
# define LA_TYPE	LA_SUBR		/* use our ported loadavgd daemon */
# define TZ_TYPE	TZ_TZNAME	/* use tzname[] vector */
# define ARBPTR_T	int *
# define void		int
typedef int		pid_t;
/* RTisms for BSD compatibility, specified in the Makefile
  define BSD		1
  define BSD_INCLUDES		1
  define BSD_REMAP_SIGNAL_TO_SIGVEC
    RTisms needed above */
/* make this sendmail in a completely different place */
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/usr/local/newmail/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
# ifndef _PATH_SENDMAILPID
#  define _PATH_SENDMAILPID	"/usr/local/newmail/sendmail.pid"
# endif /* ! _PATH_SENDMAILPID */
#endif /* AIX */


/*
**  Silicon Graphics IRIX
**
**	Compiles on 4.0.1.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -