1 /*************************************************
2 * Exim - an Internet mail transport agent *
3 *************************************************/
5 /* Copyright (c) University of Cambridge 1995 - 2018 */
6 /* Copyright (c) The Exim Maintainers 2020 */
7 /* See the file NOTICE for conditions of use and distribution. */
9 #define DELIVER_BUFFER_SIZE 4096
12 #define PENDING_DEFER (PENDING + DEFER)
13 #define PENDING_OK (PENDING + OK)
16 /* Private structure for the private options and other private data. */
20 uschar
*fallback_hosts
;
22 host_item
*fallback_hostlist
;
23 uschar
*authenticated_sender
;
29 uschar
*serialize_hosts
;
30 uschar
*hosts_try_auth
;
31 uschar
*hosts_require_auth
;
32 uschar
*hosts_try_chunking
;
34 uschar
*hosts_try_dane
;
35 uschar
*hosts_require_dane
;
36 uschar
*dane_require_tls_ciphers
;
38 uschar
*hosts_try_fastopen
;
40 uschar
*hosts_try_prdr
;
43 uschar
*hosts_request_ocsp
;
44 uschar
*hosts_require_ocsp
;
46 uschar
*hosts_require_tls
;
47 uschar
*hosts_avoid_tls
;
48 uschar
*hosts_verify_avoid_tls
;
49 uschar
*hosts_avoid_pipelining
;
50 #ifndef DISABLE_PIPE_CONNECT
51 uschar
*hosts_pipe_connect
;
53 uschar
*hosts_avoid_esmtp
;
55 uschar
*hosts_nopass_tls
;
56 uschar
*hosts_noproxy_tls
;
64 int hosts_max_try_hardlimit
;
65 BOOL address_retry_include_sender
;
67 BOOL authenticated_sender_force
;
69 BOOL dns_qualify_single
;
70 BOOL dns_search_parents
;
71 dnssec_domains dnssec
;
72 BOOL delay_after_cutoff
;
76 BOOL lmtp_ignore_quota
;
77 uschar
*expand_retry_include_ip_address
;
78 BOOL retry_include_ip_address
;
83 uschar
*tls_certificate
;
85 uschar
*tls_privatekey
;
86 uschar
*tls_require_ciphers
;
87 # ifdef EXPERIMENTAL_TLS_RESUME
88 uschar
*tls_resumption_hosts
;
91 uschar
*tls_verify_certificates
;
93 BOOL tls_tempfail_tryclear
;
94 uschar
*tls_verify_hosts
;
95 uschar
*tls_try_verify_hosts
;
96 uschar
*tls_verify_cert_hostnames
;
99 uschar
*utf8_downconvert
;
104 #ifdef EXPERIMENTAL_ARC
107 } smtp_transport_options_block
;
109 #define SOB (smtp_transport_options_block *)
112 /* smtp connect context */
115 address_item
* addrlist
;
117 smtp_connect_args conn_args
;
125 #ifndef DISABLE_PIPE_CONNECT
126 BOOL early_pipe_ok
:1;
127 BOOL early_pipe_active
:1;
131 BOOL pipelining_used
:1;
138 BOOL dsn_all_lasthop
:1;
139 #if !defined(DISABLE_TLS) && defined(SUPPORT_DANE)
140 BOOL dane_required
:1;
142 #ifndef DISABLE_PIPE_CONNECT
143 BOOL pending_BANNER
:1;
150 BOOL completed_addr
:1;
157 unsigned peer_offered
;
158 unsigned avoid_option
;
161 #ifdef EXPERIMENTAL_DSN_INFO
162 uschar
* smtp_greeting
;
163 uschar
* helo_response
;
165 #ifndef DISABLE_PIPE_CONNECT
166 ehlo_resp_precis ehlo_resp
;
169 struct timeval delivery_start
;
170 address_item
* first_addr
;
171 address_item
* next_addr
;
172 address_item
* sync_addr
;
174 client_conn_ctx cctx
;
175 smtp_inblock inblock
;
176 smtp_outblock outblock
;
177 uschar buffer
[DELIVER_BUFFER_SIZE
];
178 uschar inbuffer
[4096];
179 uschar outbuffer
[4096];
182 extern int smtp_setup_conn(smtp_context
*, BOOL
);
183 extern int smtp_write_mail_and_rcpt_cmds(smtp_context
*, int *);
184 extern int smtp_reap_early_pipe(smtp_context
*, int *);
187 /* Data for reading the private options. */
189 extern optionlist smtp_transport_options
[];
190 extern int smtp_transport_options_count
;
192 /* Block containing default values. */
194 extern smtp_transport_options_block smtp_transport_option_defaults
;
196 /* The main, init, and closedown entry points for the transport */
198 extern BOOL
smtp_transport_entry(transport_instance
*, address_item
*);
199 extern void smtp_transport_init(transport_instance
*);
200 extern void smtp_transport_closedown(transport_instance
*);
205 extern int socks_sock_connect(host_item
*, int, int, uschar
*,
206 transport_instance
*, int);
209 /* End of transports/smtp.h */