1 /*************************************************
2 * Exim - an Internet mail transport agent *
3 *************************************************/
5 /* Copyright (c) University of Cambridge 1995 - 2018 */
6 /* See the file NOTICE for conditions of use and distribution. */
8 #define DELIVER_BUFFER_SIZE 4096
11 #define PENDING_DEFER (PENDING + DEFER)
12 #define PENDING_OK (PENDING + OK)
15 /* Private structure for the private options and other private data. */
19 uschar
*fallback_hosts
;
21 host_item
*fallback_hostlist
;
22 uschar
*authenticated_sender
;
28 uschar
*serialize_hosts
;
29 uschar
*hosts_try_auth
;
30 uschar
*hosts_require_auth
;
31 uschar
*hosts_try_chunking
;
33 uschar
*hosts_try_dane
;
34 uschar
*hosts_require_dane
;
35 uschar
*dane_require_tls_ciphers
;
37 uschar
*hosts_try_fastopen
;
39 uschar
*hosts_try_prdr
;
42 uschar
*hosts_request_ocsp
;
43 uschar
*hosts_require_ocsp
;
45 uschar
*hosts_require_tls
;
46 uschar
*hosts_avoid_tls
;
47 uschar
*hosts_verify_avoid_tls
;
48 uschar
*hosts_avoid_pipelining
;
49 uschar
*hosts_avoid_esmtp
;
51 uschar
*hosts_nopass_tls
;
52 uschar
*hosts_noproxy_tls
;
60 int hosts_max_try_hardlimit
;
61 BOOL address_retry_include_sender
;
63 BOOL authenticated_sender_force
;
65 BOOL dns_qualify_single
;
66 BOOL dns_search_parents
;
67 dnssec_domains dnssec
;
68 BOOL delay_after_cutoff
;
72 BOOL lmtp_ignore_quota
;
73 uschar
*expand_retry_include_ip_address
;
74 BOOL retry_include_ip_address
;
79 uschar
*tls_certificate
;
81 uschar
*tls_privatekey
;
82 uschar
*tls_require_ciphers
;
84 uschar
*tls_verify_certificates
;
86 BOOL tls_tempfail_tryclear
;
87 uschar
*tls_verify_hosts
;
88 uschar
*tls_try_verify_hosts
;
89 uschar
*tls_verify_cert_hostnames
;
92 uschar
*utf8_downconvert
;
97 #ifdef EXPERIMENTAL_ARC
100 } smtp_transport_options_block
;
102 /* smtp connect context */
105 address_item
* addrlist
;
118 BOOL pipelining_used
:1;
125 BOOL dsn_all_lasthop
:1;
126 #if defined(SUPPORT_TLS) && defined(SUPPORT_DANE)
128 BOOL dane_required
:1;
133 BOOL completed_addr
:1;
140 unsigned peer_offered
;
141 unsigned avoid_option
;
144 #ifdef EXPERIMENTAL_DSN_INFO
145 uschar
* smtp_greeting
;
146 uschar
* helo_response
;
149 address_item
* first_addr
;
150 address_item
* next_addr
;
151 address_item
* sync_addr
;
153 client_conn_ctx cctx
;
154 smtp_inblock inblock
;
155 smtp_outblock outblock
;
156 uschar buffer
[DELIVER_BUFFER_SIZE
];
157 uschar inbuffer
[4096];
158 uschar outbuffer
[4096];
160 transport_instance
* tblock
;
161 smtp_transport_options_block
* ob
;
164 extern int smtp_setup_conn(smtp_context
*, BOOL
);
165 extern int smtp_write_mail_and_rcpt_cmds(smtp_context
*, int *);
168 /* Data for reading the private options. */
170 extern optionlist smtp_transport_options
[];
171 extern int smtp_transport_options_count
;
173 /* Block containing default values. */
175 extern smtp_transport_options_block smtp_transport_option_defaults
;
177 /* The main, init, and closedown entry points for the transport */
179 extern BOOL
smtp_transport_entry(transport_instance
*, address_item
*);
180 extern void smtp_transport_init(transport_instance
*);
181 extern void smtp_transport_closedown(transport_instance
*);
185 extern int smtp_auth(uschar
*, unsigned, address_item
*, host_item
*,
186 smtp_transport_options_block
*, BOOL
,
187 smtp_inblock
*, smtp_outblock
*);
188 extern BOOL
smtp_mail_auth_str(uschar
*, unsigned,
189 address_item
*, smtp_transport_options_block
*);
192 extern int socks_sock_connect(host_item
*, int, int, uschar
*,
193 transport_instance
*, int);
196 /* End of transports/smtp.h */