Lines Matching +full:resolver +full:- +full:to +full:- +full:digital
2 * Copyright (c) 1998-2013, 2023,2024 Proofpoint, Inc. and its suppliers.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
8 * By using this file, you agree to the terms and conditions set
14 ** SENDMAIL.H -- MTA-specific definitions for sendmail.
71 SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1104 2013-11-22 20:51:56 ca Exp $";
211 /* fingerprint in printable format - just for logging */
233 #define TLSI_FL_FB2CLR 'C' /* fall back to clear text is ok */
234 #define TLSI_FL_NOFB2CLR 'c' /* do not fall back to clear text */
240 (((tlsi_ctx) != NULL) && bitnset((flag), (tlsi_ctx)->tlsi_flags))
292 # error "README: -DSASL (SASL) does not agree with the version of the CYRUS_SASL library (SASL_V…
298 # error "README: please set -DSASL to the version of the CYRUS_SASL library"
306 ** be pretty solid on most architectures today. They have to be
349 ** of an object pointed to by an argument to a function.
356 * to the called function. */
358 * to be valid for the duration of the function call. */
382 struct mailer *q_mailer; /* mailer to use */
384 uid_t q_uid; /* user-id of receiver (if known) */
385 gid_t q_gid; /* group-id of receiver (if known) */
395 char *q_finalrcpt; /* Final-Recipient: DSN header */
396 char *q_orcpt; /* ORCPT parameter from RCPT TO: line */
402 char *q_signature; /* MX-based sorting value */
413 ** to/from an associated character.
415 ** directly (applying a mask to select those flags which should be kep) --
416 ** the mapping to/from characters provides a "defined" external interface
432 #define QRELAYED 0x00000400 /* DSN: relayed to non-DSN aware sys */
453 #define QISSECURE(r) (0 != ((r)->q_flags & QSECURE))
457 # define QMATCH_FLAG(a) ((a)->q_flags & QMATCHFLAGS)
477 #define QS_DONTSEND 6 /* don't send to this address */
480 #define QS_CLONED 9 /* addr cloned to split envelope */
552 /* macro to simplify the common call to rewrite() */
565 ** Every mailer known to the system is declared in this
567 ** flags associated with it, and the argument vector to
568 ** pass to it. The flags are defined in conf.c
578 char *m_mailer; /* pathname of the mailer to use */
584 short m_nice; /* niceness to run at (mostly for prog) */
591 long m_maxsize; /* size limit on message to this mailer */
594 char *m_execdir; /* directory to chdir to before execv */
595 char *m_rootdir; /* directory to chroot to before execv */
596 uid_t m_uid; /* UID to run as */
597 gid_t m_gid; /* GID to run as */
599 time_t m_wait; /* timeout to wait for end */
600 int m_maxrcpt; /* max recipients per envelope client-side */
615 #define M_NOBRACKET 'd' /* never angle bracket envelope route-addrs */
617 #define M_EXPENSIVE 'e' /* it costs to use this mailer.... */
618 #define M_ESCFROM 'E' /* escape From lines to >From */
619 #define M_FOPT 'f' /* mailer takes picky -f flag */
620 /* 'F' CF: include From: or Resent-From: */
625 #define M_INTERNAL 'I' /* SMTP to another sendmail site */
629 #define M_LOCALMAILER 'l' /* delivery is to this host */
632 /* 'M' CF: include Message-Id: */
634 #define M_MANYSTATUS 'N' /* MAIL11V3: DATA returns multi-status */
637 #define M_FROMPATH 'p' /* use reverse-path in MAIL FROM: */
638 /* 'P' CF: include Return-Path: */
640 #define M_ROPT 'r' /* mailer takes picky -r flag */
641 #define M_SECURE_PORT 'R' /* try to send on a reserved TCP port */
646 #define M_CONTENT_LEN 'v' /* add Content-Length: header (SVr4) */
647 /* 'V' UIUC: !-relativize all addresses */
650 /* 'x' CF: include Full-Name: */
651 #define M_XDOT 'X' /* use hidden-dot algorithm */
659 #define M_EBCDIC '3' /* extend Q-P encoding for EBCDIC */
662 #define M_7BITHDRS '6' /* strip headers to 7 bits even in 8 bit path */
663 #define M_7BITS '7' /* use 7-bit path */
665 #define M_MAKE8BIT '9' /* convert 7 -> 8 bit if appropriate */
671 #define M_HOLD '%' /* Hold delivery until ETRN/-qI/-qR/-qS */
673 #define M_MINUS '-' /* Reserved: Used in mc for removing flags */
688 EXTERN MAILER *FileMailer; /* ptr to *file* mailer */
689 EXTERN MAILER *InclMailer; /* ptr to *include* mailer */
690 EXTERN MAILER *LocalMailer; /* ptr to local mailer */
691 EXTERN MAILER *ProgMailer; /* ptr to program mailer */
700 ** Every queue group known to the system is declared in this structure.
702 ** associated with it, and the argument vector to pass to it.
723 ** Otherwise we have to play around with chdir().
741 int qg_wgrp; /* Assigned to this work group */
751 long qg_wkrcptfact; /* multiplier for # recipients -> priority */
753 bool qg_doqueuerun; /* XXX flag is it time to do a queuerun */
772 # define SASL_WRONG (-1)
776 # define SASL_DEFREALM 3 /* realm to use */
777 # define SASL_MECHLIST 4 /* list of mechanisms to try */
781 ** Current mechanism; this is just used to convey information between
836 /* structure to store authinfo */
847 ** Structure to store macros.
859 ** Information about currently open connections to mailers, or to
878 struct mailer *mci_mailer; /* ptr to the mailer for this conn */
880 char *mci_status; /* DSN status to be copied to addrs */
881 char *mci_rstatus; /* SMTP status to be copied to addrs */
884 char *mci_heloname; /* name to use as HELO arg */
910 /* XREF: mci.c: MciFlags[]: needs to be kept in sync! */
918 #define MCIF_7BIT 0x00000080 /* strip this message to 7 bits */
921 #define MCIF_CVT8TO7 0x00000400 /* convert from 8 to 7 bits */
923 #define MCIF_8BITOK 0x00001000 /* OK to send 8 bit characters */
924 #define MCIF_CVT7TO8 0x00002000 /* convert from 7 to 8 bits */
960 /* XREF: deliver.c: mcis[] -- any changes here must be reflected there! */
995 ** This structure is used internally to store header items.
1029 #define H_RESENT 0x00000008 /* this address is a "Resent-..." address */
1034 #define H_FROM 0x00000100 /* this is a from-type field */
1038 #define H_CTE 0x00001000 /* field is a content-transfer-encoding */
1039 #define H_CTYPE 0x00002000 /* this is a content-type field */
1084 ** only one of these -- for the message that we originally read
1085 ** and which is our primary interest -- but other envelopes can
1107 ** to unsigned. We don't use unsigned and == ULONG_MAX because
1122 /* function to put header of message */
1124 /* function to put body of message */
1148 char *e_msgboundary; /* MIME-style message part boundary */
1196 #define EF_PM_NOTIFY 0x00002000L /* send return mail to postmaster */
1197 #define EF_METOO 0x00004000L /* send to me too */
1198 #define EF_LOGSENDER 0x00008000L /* need to log the sender */
1199 #define EF_NORECEIPT 0x00010000L /* suppress all return-receipts */
1200 #define EF_HAS8BIT 0x00020000L /* at least one 8-bit char in body */
1213 #define EF_7BITBODY 0x40000000L /* strip body to 7bit on input */
1218 #define IS_DLVR_NOTIFY(e) (((e)->e_dlvr_flag & DLVR_NOTIFY) != 0)
1219 #define IS_DLVR_RETURN(e) (((e)->e_dlvr_flag & DLVR_RETURN) != 0)
1220 #define IS_DLVR_TRACE(e) (((e)->e_dlvr_flag & DLVR_TRACE) != 0)
1221 #define IS_DLVR_BY(e) ((e)->e_dlvr_flag != 0)
1226 #define BODYTYPE_ILLEGAL (-1)
1246 ** CurEnv->e_msgpriority is the number of bytes in the message plus
1247 ** the creation time (so that jobs ``tend'' to be ordered correctly),
1250 ** is used to order the queue. Higher values mean LOWER priority.
1256 ** that have historically failed will be run later; thanks go to
1316 #define CONDIF ((unsigned char)0232) /* conditional if-then */
1332 /* to make the code clearer */
1371 #define macget(mac, i) (mac)->mac_table[i]
1388 ** If the name server for a host is down, the process of trying to
1389 ** canonify the name can hang. This is similar to (but alas, not
1390 ** identical to) looking up the name for delivery. This stab type
1424 ** nameserver answers containing very many resource records. The resolver
1425 ** may switch to tcp and retry if it detects udp packet overflow.
1426 ** Also note that the resolver routines res_query and res_search return
1428 ** it not big enough to accommodate the entire answer.
1436 ** The resolver functions res_{send,query,querydomain} expect the
1437 ** answer buffer to be aligned, but some versions of gcc4 reverse
1439 ** stack, resulting in crashes on strict-alignment platforms. Use
1440 ** this union when putting the buffer on the stack to force the
1441 ** alignment, then cast to (HEADER *) or (unsigned char *) as needed.
1461 #define NULLMX (-2)
1500 char *map_app; /* to append to successful matches */
1501 char *map_tapp; /* to append to "tempfail" matches */
1503 char *map_rebuild; /* program to run to do auto-rebuild */
1551 if (!bitset(MF_OPEN, (map)->map_mflags)) \
1565 ** The class of a map -- essentially the functions to call
1654 char *ph_field_list; /* list of fields to search for match */
1664 ** Regular UNIX sockaddrs are too small to handle ISO addresses, so
1665 ** we are forced to declare a supertype here.
1714 # define PROC_LIST_SEG 32 /* number of pids to alloc at a time */
1742 char *s_name; /* name to be entered */
1744 struct symtab *s_next; /* pointer to next in chain */
1747 BITMAP256 sv_class; /* bit-map of word classes */
1748 MAILER *sv_mailer; /* pointer to mailer */
1768 QUEUEGRP *sv_queue; /* pointer to queue */
1770 dane_tlsa_P sv_tlsa; /* pointer to TLSA RRs */
1790 #define ST_MACRO 9 /* macro name to id mapping */
1845 /* opcodes to stab */
1860 ** The send mode tells how to send mail. It can be set in the
1863 ** -v (verbose) flag is given, it will be forced to SM_DELIVER
1866 ** The error mode tells how to return errors.
1906 /* values for e_sendmode -- send modes */
1925 #define DM_NOTSET (-1) /* DeliveryMode (per daemon) option not set */
1934 /* used only as a parameter to sendall */
1940 /* values for e_errormode -- error handling modes */
1949 #define MM_CVTMIME 0x0001 /* convert 8 to 7 bit MIME */
1951 #define MM_MIME8BIT 0x0004 /* convert 8-bit data to MIME */
1954 /* how to handle messages without any recipient addresses */
1956 #define NRA_ADD_TO 1 /* add To: header */
1957 #define NRA_ADD_APPARENTLY_TO 2 /* add Apparently-To: header */
1959 #define NRA_ADD_TO_UNDISCLOSED 4 /* add To: undisclosed:; header */
1962 /* flags to putxline */
1964 #define PXLF_MAPFROM 0x0001 /* map From_ to >From_ */
1975 #define PRIV_PUBLIC 0 /* what have I got to hide? */
1989 #define PRIV_NOACTUALRECIPIENT 0x00400000 /* no X-Actual-Recipient in DSNs */
2006 ** Flags passed to remotename, parseaddr, allocaddr, and buildaddr.
2012 #define RF_ADDDOMAIN 0x008 /* OK to do domain extension */
2017 #define RF_RM_ADDR 0x040 /* address to be removed */
2021 ** Flags passed to rscheck
2032 ** Flags passed to mime8to7 and putheader.
2036 #define M87F_NO8BIT 0x0001 /* can't have 8-bit in this section */
2038 #define M87F_NO8TO7 0x0004 /* don't do 8->7 bit conversions */
2045 ** Flags passed to returntosender.
2060 ** 32-bit type used by milter
2069 # define SMFTO_EOM 2 /* Timeout for ACK/NAK to EOM */
2125 ** Vendors can customize sendmail to add special behaviour,
2128 ** it's quite reasonable for some vendors to want the default
2130 ** -DVENDOR_DEFAULT=VENDOR_xxx
2133 ** Vendors should apply to sendmail-YYYY@support.sendmail.org
2138 #define VENDOR_BERKELEY 1 /* Berkeley-native configuration file */
2139 #define VENDOR_SUN 2 /* Sun-native configuration file */
2140 #define VENDOR_HP 3 /* Hewlett-Packard specific config syntax */
2143 #define VENDOR_DEC 6 /* Compaq, DEC, Digital */
2145 /* prototypes for vendor-specific hook routines */
2153 ** To make debugging output clearer.
2158 char *te_rv_on; /* turn reverse-video on */
2160 char *te_normal; /* revert to normal output */
2184 #define D_NOSTS 'M' /* no MTA-STS (client) */
2191 #define D_XCNCT ((char)0x04) /* X-Connect was used */
2192 #define D_XCNCT_M ((char)0x05) /* X-Connect was used + "forged" */
2223 #define NOQGRP (-1) /* no queue group (yet) */
2224 #define ENVQGRP (-2) /* use queue group of envelope */
2225 #define NOAQGRP (-3) /* no queue group in addr (yet) */
2227 #define NOQDIR (-1) /* no queue directory (yet) */
2228 #define ENVQDIR (-2) /* use queue directory of envelope */
2229 #define NOAQDIR (-3) /* no queue directory in addr (yet) */
2233 #define NOW ((time_t) (-1)) /* queue return: now */
2237 #define SAFE_INTERACTIVE 1 /* limit fsync() in -odi */
2249 char *queue_match; /* string to match */
2268 EXTERN int NiceQueueRun; /* nice queue runs to this value */
2271 EXTERN int QueueMode; /* which queue items to act upon */
2277 EXTERN QUEUE_CHAR *QueueLimitId; /* limit queue run to id */
2278 EXTERN QUEUE_CHAR *QueueLimitQuarantine; /* limit queue run to quarantine reason */
2279 EXTERN QUEUE_CHAR *QueueLimitRecipient; /* limit queue run to rcpt */
2280 EXTERN QUEUE_CHAR *QueueLimitSender; /* limit queue run to sender */
2327 /* RFC 1123-specified timeouts [minimum value] */
2356 time_t res_retrans[MAXRESTOTYPES]; /* resolver retransmit */
2357 int res_retry[MAXRESTOTYPES]; /* resolver retry */
2363 #define TOC_NONURGENT 2 /* non-urgent delivery */
2366 /* resolver timeout specifiers */
2415 ** Some in-line functions
2433 ** We use sm_pstrdup_x to duplicate the string because it raises
2435 ** which is not expected to be freed before process exit.
2439 ** then the variable remains set to the old value.
2478 /* XREF: deliver.c: xs_states[] -- any changes here must be reflected there! */
2510 EXTERN bool DisConnected; /* running with OutChannel redirect to transcript file */
2520 EXTERN bool EightBitAddrOK; /* we'll let 8-bit addresses through */
2526 EXTERN bool HoldErrs; /* only output errors to transcript */
2536 EXTERN bool MeToo; /* send to the sender also */
2538 EXTERN bool NoConnect; /* don't connect to non-local mailers */
2539 EXTERN bool OnlyOneError; /* .... or only want to give one SMTP reply */
2547 EXTERN bool volatile RestartWorkGroup; /* daemon needs to restart some work groups */
2548 EXTERN bool RrtImpliesDsn; /* turn Return-Receipt-To: into DSN */
2551 EXTERN bool SevenBitInput; /* force 7-bit data on input */
2552 EXTERN bool SingleLineFromHeader; /* force From: header to be one line */
2560 EXTERN bool UseErrorsTo; /* use Errors-To: header (back compat) */
2561 EXTERN bool UseNameServer; /* using DNS -- interpret h_errno & MX RRs */
2562 EXTERN bool UseCompressedIPv6Addresses; /* for more specific zero-subnet matches */
2590 EXTERN int DelayLA; /* load average to delay connections */
2592 EXTERN int Errors; /* set if errors (local to single pass) */
2597 EXTERN int LogLevel; /* level of logging to perform */
2635 EXTERN char *MemoryResource;/* memory resource to look up */
2643 EXTERN int VendorCode; /* vendor-specific operation enhancements */
2644 EXTERN int Verbose; /* set if blow-by-blow desired */
2645 EXTERN gid_t DefGid; /* default gid to run as */
2647 EXTERN gid_t RunAsGid; /* GID to become for bulk of run */
2656 EXTERN uid_t DefUid; /* default uid to run as */
2658 EXTERN uid_t RunAsUid; /* UID to become for bulk of run */
2660 EXTERN size_t DataFileBufferSize; /* size of buf for in-core data file */
2662 EXTERN time_t DialDelay; /* delay between dial-on-demand tries */
2663 EXTERN time_t SafeAlias; /* interval to wait until @:@ in alias file */
2665 EXTERN size_t XscriptFileBufferSize; /* size of buf for in-core transcript file */
2670 EXTERN long WkClassFact; /* multiplier for message class -> priority */
2671 EXTERN long WkRecipFact; /* multiplier for # of recipients -> priority */
2675 EXTERN char *DeadLetterDrop; /* path to dead letter office */
2676 EXTERN char *DefUser; /* default user to run as (from DefUid) */
2678 EXTERN char *DoubleBounceAddr; /* where to send double bounces */
2679 EXTERN char *ErrMsgFile; /* file to prepend to all error messages */
2682 EXTERN char *FileName; /* name to print on error messages */
2683 EXTERN char *ForwardPath; /* path to search for .forward files */
2684 EXTERN char *HeloName; /* hostname to announce in HELO */
2687 EXTERN char *HostsFile; /* path to /etc/hosts file */
2693 EXTERN char *PostMasterCopy; /* address to get errs cc's */
2695 EXTERN char *RealHostName; /* name of host we are talking to */
2698 EXTERN char *RunAsUserName; /* user to become for bulk of run */
2711 EXTERN char **SaveArgv; /* argument vector for re-execing */
2715 EXTERN SM_FILE_T *TrafficLogFile; /* file in which to log all traffic */
2720 EXTERN char *RuleSetNames[MAXRWSETS]; /* ruleset number to name */
2725 EXTERN SOCKADDR RealHostAddr; /* address of host we are talking to */
2729 EXTERN int Hacks; /* bit field of run-time enabled "hacks" */
2807 (c[3] == ' ' || c[3] == '-' || c[3] == '\0'))
3031 /* update file system information: +/- some blocks */