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 #ifndef DISABLE_PIPE_CONNECT
50 uschar *hosts_pipe_connect;
52 uschar *hosts_avoid_esmtp;
54 uschar *hosts_nopass_tls;
55 uschar *hosts_noproxy_tls;
63 int hosts_max_try_hardlimit;
64 BOOL address_retry_include_sender;
66 BOOL authenticated_sender_force;
68 BOOL dns_qualify_single;
69 BOOL dns_search_parents;
70 dnssec_domains dnssec;
71 BOOL delay_after_cutoff;
75 BOOL lmtp_ignore_quota;
76 uschar *expand_retry_include_ip_address;
77 BOOL retry_include_ip_address;
82 uschar *tls_certificate;
84 uschar *tls_privatekey;
85 uschar *tls_require_ciphers;
86 # ifdef EXPERIMENTAL_TLS_RESUME
87 uschar *tls_resumption_hosts;
90 uschar *tls_verify_certificates;
92 BOOL tls_tempfail_tryclear;
93 uschar *tls_verify_hosts;
94 uschar *tls_try_verify_hosts;
95 uschar *tls_verify_cert_hostnames;
98 uschar *utf8_downconvert;
103 #ifdef EXPERIMENTAL_ARC
106 } smtp_transport_options_block;
108 #define SOB (smtp_transport_options_block *)
111 /* smtp connect context */
114 address_item * addrlist;
116 smtp_connect_args conn_args;
124 #ifndef DISABLE_PIPE_CONNECT
125 BOOL early_pipe_ok:1;
126 BOOL early_pipe_active:1;
130 BOOL pipelining_used:1;
137 BOOL dsn_all_lasthop:1;
138 #if !defined(DISABLE_TLS) && defined(SUPPORT_DANE)
139 BOOL dane_required:1;
141 #ifndef DISABLE_PIPE_CONNECT
142 BOOL pending_BANNER:1;
149 BOOL completed_addr:1;
156 unsigned peer_offered;
157 unsigned avoid_option;
160 #ifdef EXPERIMENTAL_DSN_INFO
161 uschar * smtp_greeting;
162 uschar * helo_response;
164 #ifndef DISABLE_PIPE_CONNECT
165 ehlo_resp_precis ehlo_resp;
168 struct timeval delivery_start;
169 address_item * first_addr;
170 address_item * next_addr;
171 address_item * sync_addr;
173 client_conn_ctx cctx;
174 smtp_inblock inblock;
175 smtp_outblock outblock;
176 uschar buffer[DELIVER_BUFFER_SIZE];
177 uschar inbuffer[4096];
178 uschar outbuffer[4096];
181 extern int smtp_setup_conn(smtp_context *, BOOL);
182 extern int smtp_write_mail_and_rcpt_cmds(smtp_context *, int *);
183 extern int smtp_reap_early_pipe(smtp_context *, int *);
186 /* Data for reading the private options. */
188 extern optionlist smtp_transport_options[];
189 extern int smtp_transport_options_count;
191 /* Block containing default values. */
193 extern smtp_transport_options_block smtp_transport_option_defaults;
195 /* The main, init, and closedown entry points for the transport */
197 extern BOOL smtp_transport_entry(transport_instance *, address_item *);
198 extern void smtp_transport_init(transport_instance *);
199 extern void smtp_transport_closedown(transport_instance *);
204 extern int socks_sock_connect(host_item *, int, int, uschar *,
205 transport_instance *, int);
208 /* End of transports/smtp.h */