📄 structs.h
字号:
BOOL fail_verify_sender; /* Fail verify if sender match this router */
BOOL gid_set; /* Flag to indicate gid is set */
BOOL initgroups; /* TRUE if initgroups is required */
BOOL log_as_local; /* TRUE logs as a local delivery */
BOOL more; /* If FALSE, do no more if this one fails */
BOOL pass_on_timeout; /* Treat timeout DEFERs as fails */
BOOL prefix_optional; /* Just what it says */
BOOL repeat_use; /* If FALSE, skip if ancestor used it */
BOOL retry_use_local_part; /* Just what it says */
BOOL same_domain_copy_routing; /* TRUE => copy routing for same domain */
BOOL self_rewrite; /* TRUE to rewrite headers if making local */
BOOL suffix_optional; /* As it says */
BOOL verify_only; /* Skip this router if not verifying */
BOOL verify_recipient; /* Use this router when verifying a recipient*/
BOOL verify_sender; /* Use this router when verifying a sender */
BOOL uid_set; /* Flag to indicate uid is set */
BOOL unseen; /* If TRUE carry on, even after success */
int self_code; /* Encoded version of "self" */
uid_t uid; /* Fixed uid value */
gid_t gid; /* Fixed gid value */
host_item *fallback_hostlist; /* For remote transport (block chain) */
transport_instance *transport; /* Transport block (when found) */
struct router_instance *pass_router; /* Actual router for passed address */
struct router_instance *redirect_router; /* Actual router for generated address */
} router_instance;
/* Structure for holding information about a type of router. The first six
fields must match driver_info above. */
typedef struct router_info {
uschar *driver_name;
optionlist *options; /* Table of private options names */
int *options_count; /* -> Number of entries in table */
void *options_block; /* Points to default private block */
int options_len; /* Length of same in bytes */
void (*init)( /* Initialization function */
struct router_instance *);
/****/
int (*code)( /* Main entry point */
router_instance *,
struct address_item *,
struct passwd *,
int,
struct address_item **,
struct address_item **,
struct address_item **,
struct address_item **);
void (*tidyup)( /* Tidyup function */
struct router_instance *);
int ri_flags; /* Descriptive flags */
} router_info;
/* Structure for holding information about a lookup type. */
typedef struct lookup_info {
uschar *name; /* e.g. "lsearch" */
int type; /* query/singlekey/abs-file */
void *(*open)( /* open function */
uschar *, /* file name for those that have one */
uschar **); /* for error message */
BOOL (*check)( /* file checking function */
void *, /* handle */
uschar *, /* file name */
int, /* modemask for file checking */
uid_t *, /* owners for file checking */
gid_t *, /* owngroups for file checking */
uschar **); /* for error messages */
int (*find)( /* find function */
void *, /* handle */
uschar *, /* file name or NULL */
uschar *, /* key or query */
int, /* length of key or query */
uschar **, /* for returning answer */
uschar **, /* for error message */
BOOL *); /* to request cache cleanup */
void (*close)( /* close function */
void *); /* handle */
void (*tidy)(void); /* tidy function */
uschar *(*quote)( /* quoting function */
uschar *, /* string to quote */
uschar *); /* additional data from quote name */
} lookup_info;
/* Structure for holding information about the configured authentication
mechanisms */
typedef struct auth_instance {
struct auth_instance *next;
uschar *name; /* Exim instance name */
struct auth_info *info; /* Pointer to driver info block */
void *options_block; /* Pointer to private options */
uschar *driver_name; /* Must be first */
uschar *advertise_condition; /* Are we going to advertise this?*/
uschar *public_name; /* Advertised name */
uschar *set_id; /* String to set as authenticated id */
uschar *mail_auth_condition; /* Condition for AUTH on MAIL command */
uschar *server_debug_string; /* Debugging output */
uschar *server_condition; /* Authorization condition */
BOOL client; /* TRUE if client option(s) set */
BOOL server; /* TRUE if server options(s) set */
BOOL advertised; /* Set TRUE when advertised */
} auth_instance;
/* Structure for holding information about an authentication mechanism. The
first six fields must match driver_info above. */
typedef struct auth_info {
uschar *driver_name; /* e.g. "condition" */
optionlist *options; /* Table of private options names */
int *options_count; /* -> Number of entries in table */
void *options_block; /* Points to default private block */
int options_len; /* Length of same in bytes */
void (*init)( /* initialization function */
struct auth_instance *);
/****/
int (*servercode)( /* server function */
auth_instance *, /* the instance data */
uschar *); /* rest of AUTH command */
int (*clientcode)( /* client function */
struct auth_instance *,
struct smtp_inblock *, /* socket and input buffer */
struct smtp_outblock *, /* socket and output buffer */
int, /* command timeout */
uschar *, /* buffer for reading response */
int); /* sizeof buffer */
} auth_info;
/* Structure for holding a single IP address and port; used for the chain of
addresses and ports for the local host. Make the char string large enough to
hold an IPv6 address. */
typedef struct ip_address_item {
struct ip_address_item *next;
int port;
BOOL v6_include_v4; /* Used in the daemon */
uschar address[46];
} ip_address_item;
/* Structure for chaining together arbitrary strings. */
typedef struct string_item {
struct string_item *next;
uschar *text;
} string_item;
/* Information about a soft delivery failure, for use when calculating
retry information. It's separate from the address block, because there
can be a chain of them for SMTP deliveries where multiple IP addresses
can be tried. */
typedef struct retry_item {
struct retry_item *next; /* for chaining */
uschar *key; /* string identifying host/address/message */
int basic_errno; /* error code for this destination */
int more_errno; /* additional error information */
uschar *message; /* local error message */
int flags; /* see below */
} retry_item;
/* Retry data flags */
#define rf_delete 0x0001 /* retry info is to be deleted */
#define rf_host 0x0002 /* retry info is for a remote host */
#define rf_message 0x0004 /* retry info is for a host+message */
/* Information about a constructed message that is to be sent using the
autoreply transport. This is pointed to from the address block. */
typedef struct reply_item {
uschar *from; /* ) */
uschar *reply_to; /* ) */
uschar *to; /* ) */
uschar *cc; /* ) specific header fields */
uschar *bcc; /* ) */
uschar *subject; /* ) */
uschar *headers; /* misc other headers, concatenated */
uschar *text; /* text string body */
uschar *file; /* file body */
BOOL file_expand; /* expand the body */
int expand_forbid; /* expansion lockout flags */
uschar *logfile; /* file to keep a log in */
uschar *oncelog; /* file to keep records in for once only */
time_t once_repeat; /* time to repeat "once only" */
BOOL return_message; /* send back the original message */
} reply_item;
/* The address_item structure contains many fields which are used at various
times while delivering a message. Some are used only for remote deliveries;
some only for local. A particular set of fields is copied whenever a child
address is created. For convenience, we keep those fields in a separate
sub-structure so they can be copied in one go. This also means I won't forget
to edit the various copying places when new to-be-copied fields are added. */
typedef struct address_item_propagated {
uschar *address_data; /* arbitrary data to keep with the address */
uschar *domain_data; /* from "domains" lookup */
uschar *localpart_data; /* from "local_parts" lookup */
uschar *errors_address; /* where to send errors (NULL => sender) */
header_line *extra_headers; /* additional headers */
uschar *remove_headers; /* list of those to remove */
#ifdef EXPERIMENTAL_SRS
uschar *srs_sender; /* Change return path when delivering */
#endif
} address_item_propagated;
/* Bits for the flags field below */
#define af_allow_file 0x00000001 /* allow file in generated address */
#define af_allow_pipe 0x00000002 /* allow pipe in generated address */
#define af_allow_reply 0x00000004 /* allow autoreply in generated address */
#define af_dr_retry_exists 0x00000008 /* router retry record exists */
#define af_expand_pipe 0x00000010 /* expand pipe arguments */
#define af_file 0x00000020 /* file delivery; always with pfr */
#define af_gid_set 0x00000040 /* gid field is set */
#define af_home_expanded 0x00000080 /* home_dir is already expanded */
#define af_ignore_error 0x00000100 /* ignore delivery error */
#define af_initgroups 0x00000200 /* use initgroups() for local transporting */
#define af_local_host_removed 0x00000400 /* local host was backup */
#define af_lt_retry_exists 0x00000800 /* local transport retry exists */
#define af_pfr 0x00001000 /* pipe or file or reply delivery */
#define af_retry_skipped 0x00002000 /* true if retry caused some skipping */
#define af_retry_timedout 0x00004000 /* true if retry timed out */
#define af_uid_set 0x00008000 /* uid field is set */
#define af_hide_child 0x00010000 /* hide child in bounce/defer msgs */
#define af_sverify_told 0x00020000 /* sender verify failure notified */
#define af_verify_pmfail 0x00040000 /* verify failure was postmaster callout */
#define af_verify_nsfail 0x00080000 /* verify failure was null sender callout */
#define af_homonym 0x00100000 /* an ancestor has same address */
#define af_verify_routed 0x00200000 /* for cached sender verify: routed OK */
#define af_verify_callout 0x00400000 /* for cached sender verify: callout was specified */
#define af_include_affixes 0x00800000 /* delivered with affixes in RCPT */
#define af_cert_verified 0x01000000 /* delivered with verified TLS cert */
#define af_pass_message 0x02000000 /* pass message in bounces */
#define af_bad_reply 0x04000000 /* filter could not generate autoreply */
/* These flags must be propagated when a child is created */
#define af_propagate (af_ignore_error)
/* The main address structure. Note that fields that are to be copied to
generated addresses should be put in the address_item_propagated structure (see
above) rather than directly into the address_item structure. */
typedef struct address_item {
struct address_item *next; /* for chaining addresses */
struct address_item *parent; /* parent address */
struct address_item *first; /* points to first after group delivery */
struct address_item *dupof; /* points to address this is a duplicate of */
router_instance *start_router; /* generated address starts here */
router_instance *router; /* the router that routed */
transport_instance *transport; /* the transport to use */
host_item *host_list; /* host data for the transport */
host_item *host_used; /* host that took delivery or failed hard */
host_item *fallback_hosts; /* to try if delivery defers */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -