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 int message_linelength_limit;
66 BOOL address_retry_include_sender;
68 BOOL authenticated_sender_force;
70 BOOL dns_qualify_single;
71 BOOL dns_search_parents;
72 dnssec_domains dnssec;
73 BOOL delay_after_cutoff;
77 BOOL lmtp_ignore_quota;
78 uschar *expand_retry_include_ip_address;
79 BOOL retry_include_ip_address;
84 uschar *tls_certificate;
86 uschar *tls_privatekey;
87 uschar *tls_require_ciphers;
88 # ifndef DISABLE_TLS_RESUME
89 uschar *tls_resumption_hosts;
92 uschar *tls_verify_certificates;
94 BOOL tls_tempfail_tryclear;
95 uschar *tls_verify_hosts;
96 uschar *tls_try_verify_hosts;
97 uschar *tls_verify_cert_hostnames;
100 uschar *utf8_downconvert;
105 #ifdef EXPERIMENTAL_ARC
108 } smtp_transport_options_block;
110 #define SOB (smtp_transport_options_block *)
113 /* smtp connect context */
116 address_item * addrlist;
118 smtp_connect_args conn_args;
126 #ifndef DISABLE_PIPE_CONNECT
127 BOOL early_pipe_ok:1;
128 BOOL early_pipe_active:1;
132 BOOL pipelining_used:1;
139 BOOL dsn_all_lasthop:1;
140 #if !defined(DISABLE_TLS) && defined(SUPPORT_DANE)
141 BOOL dane_required:1;
143 #ifndef DISABLE_PIPE_CONNECT
144 BOOL pending_BANNER:1;
151 BOOL completed_addr:1;
158 unsigned peer_offered;
159 unsigned avoid_option;
162 #ifdef EXPERIMENTAL_DSN_INFO
163 uschar * smtp_greeting;
164 uschar * helo_response;
166 #ifndef DISABLE_PIPE_CONNECT
167 ehlo_resp_precis ehlo_resp;
170 struct timeval delivery_start;
171 address_item * first_addr;
172 address_item * next_addr;
173 address_item * sync_addr;
175 client_conn_ctx cctx;
176 smtp_inblock inblock;
177 smtp_outblock outblock;
178 uschar buffer[DELIVER_BUFFER_SIZE];
179 uschar inbuffer[4096];
180 uschar outbuffer[4096];
183 extern int smtp_setup_conn(smtp_context *, BOOL);
184 extern int smtp_write_mail_and_rcpt_cmds(smtp_context *, int *);
185 extern int smtp_reap_early_pipe(smtp_context *, int *);
188 /* Data for reading the private options. */
190 extern optionlist smtp_transport_options[];
191 extern int smtp_transport_options_count;
193 /* Block containing default values. */
195 extern smtp_transport_options_block smtp_transport_option_defaults;
197 /* The main, init, and closedown entry points for the transport */
199 extern BOOL smtp_transport_entry(transport_instance *, address_item *);
200 extern void smtp_transport_init(transport_instance *);
201 extern void smtp_transport_closedown(transport_instance *);
206 extern int socks_sock_connect(host_item *, int, int, uschar *,
207 transport_instance *, int);
210 /* End of transports/smtp.h */