/*
* Copyright (c) 1998-2009 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.
*/
/*
** SENDMAIL.H -- MTA-specific definitions for sendmail.
*/
#ifndef _SENDMAIL_H
#ifndef MILTER
#endif /* MILTER */
#ifdef _DEFINE
# define EXTERN
#else /* _DEFINE */
# define EXTERN extern
#endif /* _DEFINE */
#include <unistd.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <setjmp.h>
#include <string.h>
#include <time.h>
# ifdef EX_OK
# endif /* EX_OK */
#include "sendmail/sendmail.h"
/* profiling? */
#if MONCONTROL
#else /* MONCONTROL */
# define SM_PROF(x)
#endif /* MONCONTROL */
#ifdef _DEFINE
# ifndef lint
# endif /* ! lint */
#endif /* _DEFINE */
#include "bf.h"
#include "timers.h"
#include <sm/errstring.h>
#include <sm/sysexits.h>
#ifdef LOG
# include <syslog.h>
#endif /* LOG */
# endif /* NETINET || NETINET6 || NETUNIX || NETISO || NETNS || NETX25 */
# if NETUNIX
# endif /* NETUNIX */
# endif /* NETINET || NETINET6 */
# if NETINET6
/*
** There is no standard yet for IPv6 includes.
** Specify OS specific implementation in conf.h
*/
# endif /* NETINET6 */
# if NETISO
# endif /* NETISO */
# if NETNS
# endif /* NETNS */
# if NETX25
# endif /* NETX25 */
# if NAMED_BIND
# ifdef NOERROR
# endif /* NOERROR */
# include <resolv.h>
# else /* NAMED_BIND */
# endif /* NAMED_BIND */
# if HESIOD
# include <hesiod.h>
# if !defined(HES_ER_OK) || defined(HESIOD_INTERFACES)
# endif /* !defined(HES_ER_OK) || defined(HESIOD_INTERFACES) */
# endif /* HESIOD */
#if STARTTLS
# if !TLS_NO_RSA
# endif /* !TLS_NO_RSA */
#endif /* STARTTLS */
#if SASL /* include the sasl include files if we have them */
# include <sasl/saslutil.h>
# else /* SASL == 2 || SASL >= 20000 */
# include <sasl.h>
# include <saslutil.h>
# endif /* SASL == 2 || SASL >= 20000 */
# else /* SASL == 1 || SASL == 2 */
# if SASL != SASL_VERSION
ERROR README: -DSASL (SASL) does not agree with the version of the CYRUS_SASL library (SASL_VERSION)
# endif /* SASL != SASL_VERSION */
# endif /* SASL == 1 || SASL == 2 */
# else /* defined(SASL_VERSION_MAJOR) && defined(SASL_VERSION_MINOR) && defined(SASL_VERSION_STEP) */
# if SASL == 1
# endif /* SASL == 1 */
# endif /* defined(SASL_VERSION_MAJOR) && defined(SASL_VERSION_MINOR) && defined(SASL_VERSION_STEP) */
#endif /* SASL */
/*
** Following are "sort of" configuration constants, but they should
** be pretty solid on most architectures today. They have to be
** file also define them. In all cases, we can't use sizeof because
** some systems (e.g., Crays) always treat everything as being at
** least 64 bits.
*/
#ifndef INADDRSZ
#endif /* ! INADDRSZ */
#ifndef IN6ADDRSZ
#endif /* ! IN6ADDRSZ */
#ifndef INT16SZ
#endif /* ! INT16SZ */
#ifndef INT32SZ
#endif /* ! INT32SZ */
#ifndef INADDR_LOOPBACK
#endif /* ! INADDR_LOOPBACK */
/*
*/
#ifndef INADDR_NONE
#endif /* ! INADDR_NONE */
/* (f)open() modes for queue files */
# define QF_O_EXTRA 0
/*
** An 'argument class' describes the storage allocation status
** of an object pointed to by an argument to a function.
*/
typedef enum
{
* ownership of the storage is ceded by the caller
* to the called function. */
* to be valid for the duration of the function call. */
* storage, or rpool storage. */
} ARGCLASS_T;
/* forward references for prototypes */
/*
** Address structure.
** Addresses are stored internally in this structure.
*/
struct address
{
#if PIPELINING
#endif /* PIPELINING */
};
/* bit values for q_flags */
/* values for q_state */
/*
** Notice: all of the following values are variations of QS_DONTSEND.
** If new states are added, they must be inserted in the proper place!
** See the macro definition of QS_IS_DEAD() down below.
*/
/* address state testing primitives */
(s) == QS_QUEUEUP || \
(s) == QS_RETRY || \
(s) == QS_VERIFIED)
(s) == QS_RETRY)
(s) == QS_QUEUEUP || \
(s) == QS_RETRY)
(s) == QS_RETRY || \
(s) == QS_SENT || \
(s) == QS_DISCARDED)
/* functions */
extern bool invalidaddr __P((char *, char *, bool));
ENVELOPE *, bool));
#if MILTER
#endif /* MILTER */
char *, char *args[], esmtp_args_F));
extern esmtp_args_F mail_esmtp_args;
extern esmtp_args_F rcpt_esmtp_args;
/* macro to simplify the common call to rewrite() */
/*
** Token Tables for prescan
*/
/*
** Mailer definition structure.
** Every mailer known to the system is declared in this
** structure. It defines the pathname of the mailer, some
** flags associated with it, and the argument vector to
** pass to it. The flags are defined in conf.c
**
** The argument vector is expanded before actual use. All
** words except the first are passed through the macro
** processor.
*/
struct mailer
{
};
/* bits for m_flags */
/* 'D' CF: include Date: */
/* 'F' CF: include From: or Resent-From: */
/* 'M' CF: include Message-Id: */
/* 'P' CF: include Return-Path: */
/* 'V' UIUC: !-relativize all addresses */
/* 'x' CF: include Full-Name: */
/* functions */
extern void initerrmailers __P((void));
extern void makemailer __P((char *));
extern void runqueueevent __P((int));
extern bool checkqueuerunner __P((void));
#endif /* _FFR_QUEUE_RUN_PARANOIA */
/*
** Queue group definition structure.
** Every queue group known to the system is declared in this structure.
** It defines the basic pathname of the queue group, some flags
** associated with it, and the argument vector to pass to it.
*/
struct qpaths_s
{
# if SM_CONF_SHM
# endif /* SM_CONF_SHM */
};
struct queuegrp
{
/*
** For now this is the same across all queue groups.
** Otherwise we have to play around with chdir().
*/
/*
** qg_queueintvl == 0 denotes that no individual value is used.
** Whatever accesses this must deal with "<= 0" as
** "not set, use appropriate default".
*/
#endif /* _FFR_QUEUE_GROUP_SORTORDER */
#if 0
long qg_wkrcptfact; /* multiplier for # recipients -> priority */
long qg_qfactor; /* slope of queue function */
bool qg_doqueuerun; /* XXX flag is it time to do a queuerun */
#endif /* 0 */
};
/* bits for qg_flags (XXX: unused as of now) */
extern void filesys_update __P((void));
#if _FFR_ANY_FREE_FS
extern bool filesys_free __P((long));
#endif /* _FFR_ANY_FREE_FS */
#if SASL
/*
** SASL
*/
/* lines in authinfo file or index into SASL_AI_T */
/*
** Current mechanism; this is just used to convey information between
** invocation of SASL callback functions.
** It must be last in the list, because it's not allocated by us
** and hence we don't free() it.
*/
/* authenticated? */
/* SASL options */
# if SASL >= 20101
# else /* SASL >= 20101 */
# if (SASL_SEC_NOPLAINTEXT & SASL_SEC_MASK) == 0 || \
(SASL_SEC_NOACTIVE & SASL_SEC_MASK) == 0 || \
(SASL_SEC_NODICTIONARY & SASL_SEC_MASK) == 0 || \
(SASL_SEC_FORWARD_SECRECY & SASL_SEC_MASK) == 0 || \
(SASL_SEC_NOANONYMOUS & SASL_SEC_MASK) == 0 || \
(SASL_SEC_PASS_CREDENTIALS & SASL_SEC_MASK) == 0
# endif /* SASL_SEC_NOPLAINTEXT & SASL_SEC_MASK) == 0 ... */
# endif /* SASL >= 20101 */
/* functions */
extern char *iteminlist __P((char *, char *, char *));
# if SASL >= 20000
extern int proxy_policy __P((sasl_conn_t *, void *, const char *, unsigned, const char *, unsigned, const char *, unsigned, struct propctx *));
# else /* SASL >= 20000 */
extern int proxy_policy __P((void *, const char *, const char *, const char **, const char **));
# if SASL > 10515
extern int safesaslfile __P((void *, char *, int));
# else /* SASL > 10515 */
extern int safesaslfile __P((void *, char *));
# endif /* SASL > 10515 */
# endif /* SASL >= 20000 */
extern void stop_sasl_client __P((void));
/* structure to store authinfo */
#endif /* SASL */
/*
** Structure to store macros.
*/
typedef struct
{
} MACROS_T;
/*
** Information about currently open connections to mailers, or to
** hosts that we have looked up recently.
*/
{
#if PIPELINING
#endif /* PIPELINING */
#if SASL
int mci_sasl_string_len;
#endif /* SASL */
#if STARTTLS
#endif /* STARTTLS */
};
/* flag bits */
/* 0x00000002 unused, was MCIF_TEMP */
/* 0x00000100 unused, was MCIF_MULTSTAT: MAIL11V3: handles MULT status */
#if STARTTLS
#define MCIF_EXTENS (MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT | MCIF_TLS)
#else /* STARTTLS */
#define MCIF_EXTENS (MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT)
#endif /* STARTTLS */
#endif /* _FFR_IGNORE_EXT_ON_HELO */
/* states */
/* functions */
extern int mci_print_persistent __P((char *, char *));
extern int mci_purge_persistent __P((char *, char *));
extern int mci_traverse_persistent __P((int (*)(char *, char *), char *));
/*
** Header structure.
** This structure is used internally to store header items.
*/
struct header
{
};
/*
** Header information structure.
** Defined in conf.c, this struct declares the header fields
** that have some magic meaning.
*/
struct hdrinfo
{
};
/* bits for h_flags and hi_flags */
/* bits for chompheader() */
/* functions */
extern void setupheaders __P((void));
/*
** Performance monitoring
*/
{
};
/*
** Envelope structure.
** This structure defines the message itself. There is usually
** only one of these -- for the message that we originally read
** and which is our primary interest -- but other envelopes can
** be generated during processing. For example, error messages
** will have their own envelope.
*/
struct envelope
{
/*
** Overflow detection is based on < 0, so don't change this
** to unsigned. We don't use unsigned and == ULONG_MAX because
** some libc's don't have strtoul(), see mail_esmtp_args().
*/
/* function to put header of message */
/* function to put body of message */
#if _FFR_SESSID
#endif /* _FFR_SESSID */
* or allocated from e_rpool */
* readonly. NULL or allocated from
* e_rpool. */
* allocated from e_rpool */
#endif /* _FFR_MILTER_ENHSC */
};
/* values for e_flags */
#define BODYTYPE_NONE (0)
extern ENVELOPE BlankEnvelope;
/* functions */
/*
** Message priority classes.
**
** The message class is read directly from the Priority: header
** field in the message.
**
** CurEnv->e_msgpriority is the number of bytes in the message plus
** the creation time (so that jobs ``tend'' to be ordered correctly),
** adjusted by the message class, the number of recipients, and the
** amount of time the message has been sitting around. This number
** is used to order the queue. Higher values mean LOWER priority.
**
** Each priority class point is worth WkClassFact priority points;
** each recipient is worth WkRecipFact priority points. Each time
** we reprocess a message the priority is adjusted by WkTimeFact.
** WkTimeFact should normally decrease the priority so that jobs
** that have historically failed will be run later; thanks go to
** Jay Lepreau at Utah for pointing out the error in my thinking.
**
** The "class" is this number, unadjusted by the age or size of
** this message. Classes with negative representations will have
** error messages thrown away if they are not local.
*/
struct priority
{
};
/*
** Rewrite rules.
*/
struct rewrite
{
};
/*
** Special characters in rewriting rules.
** These are used internally only.
** The COND* rules are actually used in macros rather than in
** rewriting rules, but are given here because they
** cannot conflict.
*/
/* "out of band" indicator */
/* sm/sendmail.h #define METAQUOTE ((unsigned char)0377) quotes the next octet */
/* left hand side items */
/* right hand side items */
/* conditionals in macros (anywhere) */
/* bracket characters for RHS host name lookup */
/* bracket characters for RHS generalized lookup */
/* macro substitution characters (anywhere) */
/* to make the code clearer */
/* external <==> internal mapping table */
struct metamac
{
};
/* values for macros with external names only */
/* functions */
#if SM_HEAP_CHECK
extern void
int _id,
char *_value,
char *_file,
int _line,
int _group));
#else /* SM_HEAP_CHECK */
extern void
int _id,
char *_value));
#endif /* SM_HEAP_CHECK */
extern int macid_parse __P((char *, char **));
extern int strtorwset __P((char *, char **, int));
extern char *translate_dollars __P((char *, char *, int *));
extern bool wordinclass __P((char *, int));
/*
** Name canonification short circuit.
**
** If the name server for a host is down, the process of trying to
** canonify the name can hang. This is similar to (but alas, not
** identical to) looking up the name for delivery. This stab type
** caches the result of the name server lookup so we don't hang
** multiple times.
*/
{
};
/* values for nc_flags */
/* hostsignature structure */
struct hostsig_t
{
};
/* functions */
extern bool getcanonname __P((char *, int, bool, int *));
extern int getfallbackmxrr __P((char *));
/*
** Mapping functions
**
** These allow arbitrary mappings in the config file. The idea
** (albeit not the implementation) comes from IDA sendmail.
*/
/*
** An actual map.
*/
{
};
/* bit values for map_mflags */
/* 0x00004000 */
{ \
return NULL; \
}
/* indices for map_actions */
/* macros to handle MapTempFail */
/*
** The class of a map -- essentially the functions to call
*/
{
/* argument parsing function */
/* lookup function */
/* store function */
/* open function */
/* close function */
};
/* bit values for map_cflags */
/* functions */
#if NETINFO
extern char *ni_propval __P((char *, char *, char *, char *, int));
#endif /* NETINFO */
#if USERDB
extern void _udbx_close __P((void));
#endif /* USERDB */
/*
** LDAP related items
*/
#if LDAPMAP
/* struct defining LDAP Auth Methods */
struct lamvalues
{
};
/* struct defining LDAP Alias Dereferencing */
struct ladvalues
{
};
/* struct defining LDAP Search Scope */
struct lssvalues
{
};
/* functions */
extern void ldapmap_set_defaults __P((char *));
#endif /* LDAPMAP */
/*
** PH related items
*/
#if PH_MAP
# include <phclient.h>
struct ph_map_struct
{
};
#endif /* PH_MAP */
/*
** Regular UNIX sockaddrs are too small to handle ISO addresses, so
** we are forced to declare a supertype here.
*/
union bigsockaddr
{
# if NETUNIX
# endif /* NETUNIX */
# if NETINET
# endif /* NETINET */
# if NETINET6
# endif /* NETINET6 */
# if NETISO
# endif /* NETISO */
# if NETNS
# endif /* NETNS */
# if NETX25
# endif /* NETX25 */
};
/* functions */
# if NETINET6
extern int anynet_pton __P((int, const char *, void *));
# endif /* NETINET6 */
# if SASL >= 20000
# endif /* SASL >= 20000 */
#endif /* NETINET || NETINET6 || NETUNIX || NETISO || NETNS || NETX25 */
/*
** Process List (proclist)
*/
#ifndef PROC_LIST_SEG
#endif /* ! PROC_LIST_SEG */
/* process types */
#define PROC_NONE 0
/* functions */
extern void proc_list_clear __P((void));
extern void proc_list_probe __P((void));
extern void proc_list_signal __P((int, int));
/*
** Symbol table definitions
*/
struct symtab
{
union
{
#if LDAPMAP
#endif /* LDAPMAP */
#if SOCKETMAP
#endif /* SOCKETMAP */
#if MILTER
#endif /* MILTER */
} s_value;
};
/* symbol types */
#if LDAPMAP
#endif /* LDAPMAP */
#if MILTER
#endif /* MILTER */
#if SOCKETMAP
#endif /* SOCKETMAP */
/* This entry must be last */
#if LDAPMAP
#endif /* LDAPMAP */
#if SOCKETMAP
#endif /* SOCKETMAP */
#if MILTER
#endif /* MILTER */
/* opcodes to stab */
/* functions */
/*
** Operation, send, error, and MIME modes
**
** The operation mode describes the basic operation of sendmail.
** This can be set from the command line, and is "send mail" by
** default.
**
** The send mode tells how to send mail. It can be set in the
** configuration file. Its setting determines how quickly the
** mail will be delivered versus the load on your system. If the
** -v (verbose) flag is given, it will be forced to SM_DELIVER
** mode.
**
** The error mode tells how to return errors.
*/
#else /* _FFR_LOCAL_DAEMON */
# define LocalDaemon false
#endif /* _FFR_LOCAL_DAEMON */
/* Note: see also include/sendmail/pathnames.h: GET_CLIENT_CF */
/* values for e_sendmode -- send modes */
#if _FFR_DM_ONE
#endif /* _FFR_DM_ONE */
/* used only as a parameter to sendall */
/* functions */
/* values for e_errormode -- error handling modes */
/* bit values for MimeMode */
/* how to handle messages without any recipient addresses */
/* flags to putxline */
/*
** Privacy flags
** These are bit values for the PrivacyFlags word.
*/
/* don't give no info, anyway, anyhow (in the main SMTP transaction) */
/* struct defining such things */
struct prival
{
};
/*
** Flags passed to remotename, parseaddr, allocaddr, and buildaddr.
*/
#define RF_COPYNONE 0
/*
** Flags passed to rscheck
*/
/*
** Flags passed to mime8to7 and putheader.
*/
/* functions */
/*
** Flags passed to returntosender.
*/
/* functions */
/*
** Mail Filters (milter)
*/
/*
** 32-bit type used by milter
** (needed by libmilter even if MILTER isn't defined)
*/
#if MILTER
struct milter
{
/* for testing only */
#endif /* _FFR_MILTER_CHECK */
};
struct milters
{
};
/* MTA flags */
/* functions */
extern void setup_daemon_milters __P((void));
#endif /* MILTER */
/*
** Vendor codes
**
** Vendors can customize sendmail to add special behaviour,
** generally for back compatibility. Ideally, this should
** be set up in the .cf file using the "V" command. However,
** it's quite reasonable for some vendors to want the default
** be their old version; this can be set using
** -DVENDOR_DEFAULT=VENDOR_xxx
** in the Makefile.
**
** Vendors should apply to sendmail@sendmail.org for
** unique vendor codes.
*/
/* prototypes for vendor-specific hook routines */
/*
** Terminal escape codes.
**
** To make debugging output clearer.
*/
struct termescape
{
};
/*
** Additional definitions
*/
/*
** d_flags, see daemon.c
** general rule: lower case: required, upper case: No
*/
#if STARTTLS
/*
** TLS
*/
/* what to do in the TLS initialization */
/* require server cert */
TLS_I_KEY_UNR | TLS_I_KEY_OUNR | \
TLS_I_CERTP_EX | TLS_I_CERTF_EX | \
/* server requirements */
/* client requirements */
#define TLS_AUTH_OK 0
/* functions */
extern bool init_tls_library __P((void));
extern bool inittls __P((SSL_CTX **, unsigned long, long, bool, char *, char *, char *, char *, char *));
extern bool initclttls __P((bool));
extern bool initsrvtls __P((bool));
# if _FFR_TLS_1
# endif /* _FFR_TLS_1 */
#if _FFR_CRLPATH
#endif /* _FFR_CRLPATH */
#endif /* STARTTLS */
/*
** Queue related items
*/
/* queue file names */
/* queue sort order */
#if _FFR_RHS
#endif /* _FFR_RHS */
/* SuperSafe values */
/* QueueMode bits */
/* Queue Run Limitations */
struct queue_char
{
};
/* run_work_group() flags */
#if _FFR_EXPDELAY
#endif /* _FFR_EXPDELAY */
/* functions */
extern void cleanup_queues __P((void));
extern bool doqueuerun __P((void));
extern char *qid_printqueue __P((int, int));
extern void quarantine_queue __P((char *, int));
extern bool run_work_group __P((int, int));
extern void setup_queues __P((bool));
extern void sync_queue_time __P((void));
extern void init_qid_alg __P((void));
extern int print_single_queue __P((int, int));
#else /* REQUIRES_DIR_FSYNC */
#endif /* REQUIRES_DIR_FSYNC */
/*
** Timeouts
**
** Indicated values are the MINIMUM per RFC 1123 section 5.3.2.
*/
EXTERN struct
{
/* RFC 1123-specified timeouts [minimum value] */
/* following timeouts are not mentioned in RFC 1123 */
#if SASL
#endif /* SASL */
#if STARTTLS
#endif /* STARTTLS */
/* following are per message */
} TimeOuts;
/* timeout classes for return and warning timeouts */
/* resolver timeout specifiers */
/* functions */
extern void inittimeouts __P((char *, bool));
/*
** Interface probing
*/
/*
** Trace information
*/
/* macros for debugging flags */
/* variables */
/*
** Miscellaneous information.
*/
/*
** The "no queue id" queue id for sm_syslog
*/
/*
** Some in-line functions
*/
/* set exit status */
#define setstat(s) { \
ExitStat = s; \
}
#define STRUCTCOPY(s, d) d = s
/* free a pointer if it isn't NULL and set it to NULL */
#define SM_FREE_CLR(p) \
if ((p) != NULL) \
{ \
sm_free(p); \
(p) = NULL; \
} \
else
/*
** Update a permanent string variable with a new value.
** The old value is freed, the new value is strdup'ed.
**
** We use sm_pstrdup_x to duplicate the string because it raises
** an exception on error, and because it allocates "permanent storage"
** which is not expected to be freed before process exit.
** The latter is important for memory leak analysis.
**
** If an exception occurs while strdup'ing the new value,
** then the variable remains set to the old value.
** That's why the strdup must occur before we free the old value.
**
** The macro uses a do loop so that this idiom will work:
** if (...)
** PSTRSET(var, val1);
** else
** PSTRSET(var, val2);
*/
do \
{ \
} while (0)
#define _CHECK_RESTART \
do \
{ \
if (ShutdownRequest != NULL) \
shutdown_daemon(); \
else if (RestartRequest != NULL) \
restart_daemon(); \
else if (RestartWorkGroup) \
} while (0)
/* reply types (text in SmtpMsgBuffer) */
#define XS_DEFAULT 0
/*
** Global variables.
*/
#endif /* _FFR_ADDR_TYPE_MODES */
#endif /* _FFR_QUEUE_RUN_PARANOIA */
#if !defined(_USE_SUN_NSSWITCH_) && !defined(_USE_DEC_SVC_CONF_)
#endif /* !defined(_USE_SUN_NSSWITCH_) && !defined(_USE_DEC_SVC_CONF_) */
#endif /* REQUIRES_DIR_FSYNC */
#endif /* _FFR_BADRCPT_SHUTDOWN */
#else
#endif /* _FFR_RCPTTHROTDELAY */
#if _FFR_MSG_ACCEPT
#endif /* _FFR_MSG_ACCEPT */
#if SM_CONF_SHM
# else /* SM_CONF_SHM */
# endif /* SM_CONF_SHM */
#if _FFR_MEMSTAT
#endif /* _FFR_MEMSTAT */
#if SM_CONF_SHM
#endif /* SM_CONF_SHM */
extern char *Mbdb; /* mailbox database type */
#if HESIOD
#endif /* HESIOD */
/*
** Declarations of useful functions
*/
/* Transcript file */
/* error related */
extern void buffer_errors __P((void));
extern void flush_errors __P((bool));
/* alias file */
/* logging */
extern void logdelivery __P((MAILER *, MCI *, char *, const char *, ADDRESS *, time_t, ENVELOPE *));
/* SMTP */
extern void giveresponse __P((int, char *, MAILER *, MCI *, ADDRESS *, time_t, ENVELOPE *, ADDRESS *));
extern int reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
#if SASL
#endif /* SASL */
(c[3] == ' ' || c[3] == '-' || c[3] == '\0'))
/* delivery */
/* stats */
extern void clearstats __P((void));
/* control socket */
extern void closecontrolsocket __P((bool));
extern void clrcontrol __P((void));
extern int opencontrolsocket __P((void));
#if MILTER
/* milter functions */
extern void milter_setup __P((char *));
extern void milter_set_option __P((char *, char *, bool));
#endif /* MILTER */
extern int blocksignal __P((int));
extern int check_bodytype __P((char *));
extern void buildfname __P((char *, char *, char *, int));
extern bool chkclientmodifiers __P((int));
extern bool chkdaemonmodifiers __P((int));
#ifdef XDEBUG
extern void checkfd012 __P((char *));
extern void checkfdopen __P((int, char *));
#endif /* XDEBUG */
extern void cleanstrcpy __P((char *, char *, int));
#if SM_CONF_SHM
extern void cleanup_shm __P((bool));
#endif /* SM_CONF_SHM */
extern void close_sendmail_pid __P((void));
extern void copy_class __P((int, int));
extern char *denlstring __P((char *, bool, bool));
extern bool dns_getcanonname __P((char *, int, bool, int *, int *));
extern int drop_privileges __P((bool));
extern int dsntoexitstat __P((char *));
#if SM_HEAP_CHECK
#endif /* SM_HEAP_CHECK */
extern char *find_character __P((char *, int));
extern long freediskspace __P((const char *, long *));
#if NETINET6 && NEEDSGETIPNODE
#endif /* NETINET6 && NEEDSGETIPNODE */
extern char *get_column __P((char *, int, int, char *, int));
extern char *getauthinfo __P((int, bool *));
extern void initdaemon __P((void));
extern void inithostmaps __P((void));
extern void initsetproctitle __P((int, char **, char **));
extern void load_if_names __P((void));
extern void makeworkgroups __P((void));
extern void mark_work_group_restart __P((int, int));
extern char *munchstring __P((char *, char **, int));
#if NISPLUS
#endif /* NISPLUS */
extern bool path_is_dir __P((char *, bool));
extern void printopenfds __P((bool));
extern void printqueue __P((void));
extern void printrules __P((void));
extern int releasesignal __P((int));
extern void resetlimits __P((void));
extern void restart_daemon __P((void));
extern void restart_marked_work_groups __P((void));
extern bool rfc822_string __P((char *));
extern void seed_random __P((void));
extern void setclientoptions __P((char *));
extern bool setdaemonoptions __P((char *));
extern void setdefuser __P((void));
extern void set_op_mode __P((int));
extern void sm_setuserenv __P((const char *, const char *));
#if STARTTLS
extern void set_tls_rd_tmo __P((int));
#else /* STARTTLS */
#endif /* STARTTLS */
extern char *shorten_hostname __P((char []));
extern void shutdown_daemon __P((void));
extern void stop_sendmail __P((void));
extern void stripbackslash __P((char *));
extern bool strreplnonprt __P((char *, int));
extern bool strcontainedin __P((bool, char *, char *));
extern int switch_map_find __P((char *, char *[], short []));
#if STARTTLS
#endif /* STARTTLS */
extern bool transienterror __P((int));
#if !HASUNSETENV
#endif /* !HASUNSETENV */
/* update file system information: +/- some blocks */
#if SM_CONF_SHM
#else /* SM_CONF_SHM */
#endif /* SM_CONF_SHM */
extern bool usershellok __P((char *, char *));
#if SM_HEAP_CHECK
extern char *xalloc_tagged __P((int, char*, int));
#else /* SM_HEAP_CHECK */
#endif /* SM_HEAP_CHECK */
extern char *xuntextify __P((char *));
#endif /* ! _SENDMAIL_H */