List separator specifiers in router/transport headers_add/remove. Bug 1581
[exim.git] / src / src / functions.h
CommitLineData
059ec3d9
PH
1/*************************************************
2* Exim - an Internet mail transport agent *
3*************************************************/
4
5a66c31b 5/* Copyright (c) University of Cambridge 1995 - 2014 */
059ec3d9
PH
6/* See the file NOTICE for conditions of use and distribution. */
7
8
9/* Prototypes for functions that appear in various modules. Gathered together
10to avoid having a lot of tiddly little headers with only a couple of lines in
11them. However, some functions that are used (or not used) by utility programs
12are in in fact in separate headers. */
13
14
15#ifdef EXIM_PERL
16extern uschar *call_perl_cat(uschar *, int *, int *, uschar **, uschar *,
17 uschar **);
18extern void cleanup_perl(void);
19extern uschar *init_perl(uschar *);
20#endif
21
22
23#ifdef SUPPORT_TLS
a799883d
PP
24extern const char *
25 std_dh_prime_default(void);
26extern const char *
27 std_dh_prime_named(const uschar *);
9d1c15ef 28
9e4dddbd 29extern uschar * tls_cert_crl_uri(void *, uschar * mod);
9d1c15ef 30extern uschar * tls_cert_ext_by_oid(void *, uschar *, int);
9e4dddbd
JH
31extern uschar * tls_cert_issuer(void *, uschar * mod);
32extern uschar * tls_cert_not_before(void *, uschar * mod);
33extern uschar * tls_cert_not_after(void *, uschar * mod);
34extern uschar * tls_cert_ocsp_uri(void *, uschar * mod);
35extern uschar * tls_cert_serial_number(void *, uschar * mod);
36extern uschar * tls_cert_signature(void *, uschar * mod);
37extern uschar * tls_cert_signature_algorithm(void *, uschar * mod);
38extern uschar * tls_cert_subject(void *, uschar * mod);
39extern uschar * tls_cert_subject_altname(void *, uschar * mod);
40extern uschar * tls_cert_version(void *, uschar * mod);
9d1c15ef 41
6a8a60e0
JH
42extern uschar * tls_cert_fprt_md5(void *);
43extern uschar * tls_cert_fprt_sha1(void *);
9ef9101c 44extern uschar * tls_cert_fprt_sha256(void *);
6a8a60e0 45
f5d78688 46extern int tls_client_start(int, host_item *, address_item *,
0e66b3b6
JH
47 transport_instance *
48#ifdef EXPERIMENTAL_DANE
49 , dns_answer *
50#endif
51 );
817d9f57 52extern void tls_close(BOOL, BOOL);
9d1c15ef 53extern int tls_export_cert(uschar *, size_t, void *);
059ec3d9
PH
54extern int tls_feof(void);
55extern int tls_ferror(void);
9d1c15ef 56extern void tls_free_cert(void *);
059ec3d9 57extern int tls_getc(void);
9d1c15ef 58extern int tls_import_cert(const uschar *, void **);
817d9f57 59extern int tls_read(BOOL, uschar *, size_t);
17c76198 60extern int tls_server_start(const uschar *);
58eb016e 61extern BOOL tls_smtp_buffered(void);
059ec3d9 62extern int tls_ungetc(int);
389ca47a 63extern int tls_write(BOOL, const uschar *, size_t);
3375e053 64extern uschar *tls_validate_require_cipher(void);
36f12725 65extern void tls_version_report(FILE *);
e51c7be2 66# ifndef USE_GNUTLS
77bb000f 67extern BOOL tls_openssl_options_parse(uschar *, long *);
e51c7be2 68# endif
812a6045 69extern uschar * tls_field_from_dn(uschar *, uschar *);
e51c7be2 70extern BOOL tls_is_name_for_cert(uschar *, void *);
0e66b3b6
JH
71
72# ifdef EXPERIMENTAL_DANE
b8b1b5cb 73extern int tlsa_lookup(const host_item *, dns_answer *, BOOL, BOOL *);
0e66b3b6
JH
74# endif
75
35aba663 76#endif /*SUPPORT_TLS*/
059ec3d9
PH
77
78
79/* Everything else... */
80
81extern acl_block *acl_read(uschar *(*)(void), uschar **);
82extern int acl_check(int, uschar *, uschar *, uschar **, uschar **);
05caaeaa 83extern int acl_eval(int, uschar *, uschar **, uschar **);
333eea9c 84
38a0a95f
PH
85extern tree_node *acl_var_create(uschar *);
86extern void acl_var_write(uschar *, uschar *, void *);
059ec3d9
PH
87extern uschar *auth_b64encode(uschar *, int);
88extern int auth_b64decode(uschar *, uschar **);
89extern int auth_call_pam(uschar *, uschar **);
90extern int auth_call_pwcheck(uschar *, uschar **);
91extern int auth_call_radius(uschar *, uschar **);
92extern int auth_call_saslauthd(uschar *, uschar *, uschar *, uschar *,
93 uschar **);
16ff981e 94extern int auth_check_serv_cond(auth_instance *);
44bbabb5
PP
95extern int auth_check_some_cond(auth_instance *, uschar *, uschar *, int);
96
059ec3d9
PH
97extern int auth_get_data(uschar **, uschar *, int);
98extern int auth_get_no64_data(uschar **, uschar *);
99extern uschar *auth_xtextencode(uschar *, int);
100extern int auth_xtextdecode(uschar *, uschar **);
101
2e5b33cd 102extern void cancel_cutthrough_connection(const char *);
32d668a5 103extern int check_host(void *, uschar *, uschar **, uschar **);
059ec3d9
PH
104extern uschar **child_exec_exim(int, BOOL, int *, BOOL, int, ...);
105extern pid_t child_open_uid(uschar **, uschar **, int, uid_t *, gid_t *,
106 int *, int *, uschar *, BOOL);
e4bdf652
JH
107extern uschar *cutthrough_finaldot(void);
108extern BOOL cutthrough_flush_send(void);
109extern BOOL cutthrough_headers_send(void);
110extern BOOL cutthrough_predata(void);
111extern BOOL cutthrough_puts(uschar *, int);
112extern BOOL cutthrough_put_nl(void);
059ec3d9
PH
113
114extern void daemon_go(void);
6a8f9482
TK
115
116#ifdef EXPERIMENTAL_DCC
117extern int dcc_process(uschar **);
118#endif
119
ed7f7860 120extern void debug_logging_activate(uschar *, uschar *);
059ec3d9
PH
121extern void debug_print_argv(uschar **);
122extern void debug_print_ids(uschar *);
123extern void debug_print_string(uschar *);
124extern void debug_print_tree(tree_node *);
1ba28e2b 125extern void debug_vprintf(const char *, va_list);
ed7f7860
PP
126extern void decode_bits(unsigned int *, unsigned int *,
127 int, int, uschar *, bit_table *, int, uschar *, int);
059ec3d9 128extern address_item *deliver_make_addr(uschar *, BOOL);
476be7e2 129extern void deliver_init(void);
817d9f57 130extern void delivery_log(int, address_item *, int, uschar *);
059ec3d9 131extern int deliver_message(uschar *, BOOL, BOOL);
e0df1c83 132extern void deliver_msglog(const char *, ...) PRINTF_FUNCTION(1,2);
059ec3d9
PH
133extern void deliver_set_expansions(address_item *);
134extern int deliver_split_address(address_item *);
135extern void deliver_succeeded(address_item *);
8523533c
TK
136#ifdef WITH_OLD_DEMIME
137extern int demime(uschar **);
138#endif
1ba28e2b 139extern BOOL directory_make(const uschar *, const uschar *, int, BOOL);
80a47a2c 140#ifndef DISABLE_DKIM
f7572e5a
TK
141extern BOOL dkim_transport_write_message(address_item *, int, int,
142 int, uschar *, uschar *, uschar *, uschar *, rewrite_rule *,
80a47a2c 143 int, uschar *, uschar *, uschar *, uschar *, uschar *, uschar *);
f7572e5a 144#endif
059ec3d9 145extern dns_address *dns_address_from_rr(dns_answer *, dns_record *);
476be7e2 146extern int dns_basic_lookup(dns_answer *, const uschar *, int);
059ec3d9 147extern void dns_build_reverse(uschar *, uschar *);
8c51eead 148extern void dns_init(BOOL, BOOL, BOOL);
1dc92d5a
JH
149extern BOOL dns_is_secure(const dns_answer *);
150extern int dns_lookup(dns_answer *, const uschar *, int, uschar **);
476be7e2 151extern void dns_pattern_init(void);
1dc92d5a 152extern int dns_special_lookup(dns_answer *, const uschar *, int, uschar **);
059ec3d9
PH
153extern dns_record *dns_next_rr(dns_answer *, dns_scan *, int);
154extern uschar *dns_text_type(int);
36a3ae5f 155extern void dscp_list_to_stream(FILE *);
9e4f5962 156extern BOOL dscp_lookup(const uschar *, int, int *, int *, int *);
059ec3d9
PH
157
158extern void enq_end(uschar *);
159extern BOOL enq_start(uschar *);
774ef2d7 160#ifdef EXPERIMENTAL_EVENT
b30275b8 161extern uschar *event_raise(uschar *, uschar *, uschar *);
774ef2d7 162#endif
059ec3d9
PH
163extern void exim_exit(int);
164extern void exim_nullstd(void);
165extern void exim_setugid(uid_t, gid_t, BOOL, uschar *);
166extern int exim_tvcmp(struct timeval *, struct timeval *);
167extern void exim_wait_tick(struct timeval *, int);
9c695f6d
JH
168extern int exp_bool(address_item *addr,
169 uschar *mtype, uschar *mname, unsigned dgb_opt, uschar *oname, BOOL bvalue,
170 uschar *svalue, BOOL *rvalue);
059ec3d9
PH
171extern BOOL expand_check_condition(uschar *, uschar *, uschar *);
172extern uschar *expand_string(uschar *);
173extern uschar *expand_string_copy(uschar *);
97d17305 174extern int_eximarith_t expand_string_integer(uschar *, BOOL);
d9b2312b 175extern void modify_variable(uschar *, void *);
059ec3d9 176
4e71661f
JH
177extern BOOL fd_ready(int, int);
178
059ec3d9
PH
179extern int filter_interpret(uschar *, int, address_item **, uschar **);
180extern BOOL filter_personal(string_item *, BOOL);
f05da2e8 181extern BOOL filter_runtest(int, uschar *, BOOL, BOOL);
059ec3d9
PH
182extern BOOL filter_system_interpret(address_item **, uschar **);
183
362145b5
JH
184extern uschar * fn_hdrs_added(void);
185
1ba28e2b 186extern void header_add(int, const char *, ...);
059ec3d9
PH
187extern int header_checkname(header_line *, BOOL);
188extern BOOL header_match(uschar *, BOOL, BOOL, string_item *, int, ...);
7cd1141b 189extern int host_address_extract_port(uschar *);
059ec3d9
PH
190extern uschar *host_and_ident(BOOL);
191extern int host_aton(uschar *, int *);
192extern void host_build_hostlist(host_item **, uschar *, BOOL);
193extern ip_address_item *host_build_ifacelist(uschar *, uschar *);
194extern void host_build_log_info(void);
195extern void host_build_sender_fullhost(void);
322050c2 196extern BOOL host_find_byname(host_item *, uschar *, int, uschar **, BOOL);
059ec3d9 197extern int host_find_bydns(host_item *, uschar *, int, uschar *, uschar *,
8c51eead 198 uschar *, uschar *, uschar *, uschar **, BOOL *);
059ec3d9
PH
199extern ip_address_item *host_find_interfaces(void);
200extern BOOL host_is_in_net(uschar *, uschar *, int);
201extern BOOL host_is_tls_on_connect_port(int);
7cd1141b 202extern int host_item_get_port(host_item *);
059ec3d9
PH
203extern void host_mask(int, int *, int);
204extern int host_name_lookup(void);
6f0c9a4f 205extern int host_nmtoa(int, int *, int, uschar *, int);
059ec3d9
PH
206extern uschar *host_ntoa(int, const void *, uschar *, int *);
207extern int host_scan_for_local_hosts(host_item *, host_item **, BOOL *);
208
83e029d5 209extern void invert_address(uschar *, uschar *);
059ec3d9 210extern int ip_bind(int, int, uschar *, int);
a56cc2b8 211extern int ip_connect(int, int, const uschar *, int, int);
b1f8e4f8
JH
212extern int ip_connectedsocket(int, const uschar *, int, int,
213 int, host_item *, uschar **);
13363eba 214extern int ip_get_address_family(int);
059ec3d9
PH
215extern void ip_keepalive(int, uschar *, BOOL);
216extern int ip_recv(int, uschar *, int, int);
217extern int ip_socket(int, int);
218
3e60dd41
JH
219extern int ip_tcpsocket(const uschar *, uschar **, int);
220extern int ip_unixsocket(const uschar *, uschar **);
221extern int ip_streamsocket(const uschar *, uschar **, int);
222
921b12ca 223extern uschar *local_part_quote(uschar *);
4840604e 224extern int log_create(uschar *);
921b12ca 225extern int log_create_as_exim(uschar *);
059ec3d9
PH
226extern void log_close_all(void);
227
8523533c 228#ifdef WITH_CONTENT_SCAN
0f0c8159 229extern int malware(const uschar *, int);
dbc4b90d 230extern int malware_in_file(uschar *);
476be7e2 231extern void malware_init(void);
8523533c 232#endif
059ec3d9
PH
233extern int match_address_list(uschar *, BOOL, BOOL, uschar **,
234 unsigned int *, int, int, uschar **);
235extern int match_check_list(uschar **, int, tree_node **, unsigned int **,
236 int(*)(void *, uschar *, uschar **, uschar **), void *, int,
b8b1b5cb 237 const uschar *, uschar **);
1dc92d5a 238extern int match_isinlist(const uschar *, uschar **, int, tree_node **,
059ec3d9
PH
239 unsigned int *, int, BOOL, uschar **);
240extern int match_check_string(uschar *, uschar *, int, BOOL, BOOL, BOOL,
241 uschar **);
242extern void md5_end(md5 *, const uschar *, int, uschar *);
243extern void md5_mid(md5 *, const uschar *);
244extern void md5_start(md5 *);
245extern void millisleep(int);
8523533c
TK
246#ifdef WITH_CONTENT_SCAN
247struct mime_boundary_context;
54cdb463
PH
248extern int mime_acl_check(uschar *acl, FILE *f,
249 struct mime_boundary_context *, uschar **, uschar **);
8523533c
TK
250extern int mime_decode(uschar **);
251extern int mime_regex(uschar **);
252#endif
059ec3d9
PH
253extern uschar *moan_check_errorcopy(uschar *);
254extern BOOL moan_skipped_syntax_errors(uschar *, error_block *, uschar *,
255 BOOL, uschar *);
e0df1c83 256extern void moan_smtp_batch(uschar *, const char *, ...) PRINTF_FUNCTION(2,3);
1ba28e2b 257extern void moan_tell_someone(uschar *, address_item *,
e0df1c83 258 const uschar *, const char *, ...) PRINTF_FUNCTION(4,5);
059ec3d9 259extern BOOL moan_to_sender(int, error_block *, header_line *, FILE *, BOOL);
0e22dfd1 260extern void moan_write_from(FILE *);
1ba28e2b 261extern FILE *modefopen(const uschar *, const char *, mode_t);
059ec3d9 262
e4bdf652
JH
263extern void open_cutthrough_connection( address_item * addr );
264
059ec3d9
PH
265extern uschar *parse_extract_address(uschar *, uschar **, int *, int *, int *,
266 BOOL);
267extern int parse_forward_list(uschar *, int, address_item **, uschar **,
268 uschar *, uschar *, error_block **);
269extern uschar *parse_find_address_end(uschar *, BOOL);
270extern uschar *parse_find_at(uschar *);
271extern uschar *parse_fix_phrase(uschar *, int, uschar *, int);
30dba1e6 272extern uschar *parse_message_id(uschar *, uschar **, uschar **);
46218253 273extern uschar *parse_quote_2047(uschar *, int, uschar *, uschar *, int, BOOL);
43ad7b7d 274extern uschar *parse_date_time(uschar *str, time_t *t);
17c76198
PP
275extern int vaguely_random_number(int);
276#ifdef SUPPORT_TLS
277extern int vaguely_random_number_fallback(int);
278#endif
059ec3d9
PH
279
280extern BOOL queue_action(uschar *, int, uschar **, int, int);
281extern void queue_check_only(void);
282extern void queue_list(int, uschar **, int);
283extern void queue_count(void);
284extern void queue_run(uschar *, uschar *, BOOL);
285
286extern int random_number(int);
e4a89c47 287extern int rda_interpret(redirect_block *, int, uschar *, uschar *,
efd9a422
MH
288 uschar *, uschar *, uschar *, ugid_block *, address_item **,
289 uschar **, error_block **, int *, uschar *);
059ec3d9
PH
290extern int rda_is_filter(const uschar *);
291extern BOOL readconf_depends(driver_instance *, uschar *);
292extern void readconf_driver_init(uschar *, driver_instance **,
293 driver_info *, int, void *, int, optionlist *, int);
294extern uschar *readconf_find_option(void *);
295extern void readconf_main(void);
12f69989 296extern void readconf_print(uschar *, uschar *, BOOL);
059ec3d9
PH
297extern uschar *readconf_printtime(int);
298extern uschar *readconf_readname(uschar *, int, uschar *);
1ad6489e 299extern int readconf_readtime(const uschar *, int, BOOL);
cb46fd2b 300extern void readconf_rest();
059ec3d9 301extern uschar *readconf_retry_error(uschar *, uschar *, int *, int *);
328895cc 302extern void read_message_body(BOOL);
8f128379 303extern void receive_bomb_out(uschar *, uschar *);
059ec3d9
PH
304extern BOOL receive_check_fs(int);
305extern BOOL receive_check_set_sender(uschar *);
306extern BOOL receive_msg(BOOL);
8e669ac1 307extern int receive_statvfs(BOOL, int *);
059ec3d9 308extern void receive_swallow_smtp(void);
8523533c
TK
309#ifdef WITH_CONTENT_SCAN
310extern int regex(uschar **);
311#endif
1dc92d5a 312extern BOOL regex_match_and_setup(const pcre *, const uschar *, int, int);
476be7e2 313extern const pcre *regex_must_compile(const uschar *, BOOL, BOOL);
059ec3d9
PH
314extern void retry_add_item(address_item *, uschar *, int);
315extern BOOL retry_check_address(uschar *, host_item *, uschar *, BOOL,
316 uschar **, uschar **);
317extern retry_config *retry_find_config(uschar *, uschar *, int, int);
ba9af0af
TF
318extern BOOL retry_ultimate_address_timeout(uschar *, uschar *,
319 dbdata_retry *, time_t);
059ec3d9
PH
320extern void retry_update(address_item **, address_item **, address_item **);
321extern uschar *rewrite_address(uschar *, BOOL, BOOL, rewrite_rule *, int);
322extern uschar *rewrite_address_qualify(uschar *, BOOL);
323extern header_line *rewrite_header(header_line *, uschar *, uschar *,
324 rewrite_rule *, int, BOOL);
325extern uschar *rewrite_one(uschar *, int, BOOL *, BOOL, uschar *,
326 rewrite_rule *);
327extern void rewrite_test(uschar *);
328extern uschar *rfc2047_decode2(uschar *, BOOL, uschar *, int, int *, int *,
329 uschar **);
330extern int route_address(address_item *, address_item **, address_item **,
331 address_item **, address_item **, int);
332extern int route_check_prefix(uschar *, uschar *);
333extern int route_check_suffix(uschar *, uschar *);
334extern BOOL route_findgroup(uschar *, gid_t *);
335extern BOOL route_finduser(uschar *, struct passwd **, uid_t *);
336extern BOOL route_find_expanded_group(uschar *, uschar *, uschar *, gid_t *,
337 uschar **);
338extern BOOL route_find_expanded_user(uschar *, uschar *, uschar *,
339 struct passwd **, uid_t *, uschar **);
340extern void route_init(void);
341extern void route_tidyup(void);
342
343extern uschar *search_find(void *, uschar *, uschar *, int, uschar *, int,
344 int, int *);
345extern int search_findtype(uschar *, int);
346extern int search_findtype_partial(uschar *, int *, uschar **, int *,
347 int *);
348extern void *search_open(uschar *, int, int, uid_t *, gid_t *);
349extern void search_tidyup(void);
e0df1c83 350extern void set_process_info(const char *, ...) PRINTF_FUNCTION(1,2);
059ec3d9
PH
351extern void sha1_end(sha1 *, const uschar *, int, uschar *);
352extern void sha1_mid(sha1 *, const uschar *);
353extern void sha1_start(sha1 *);
e4a89c47 354extern int sieve_interpret(uschar *, int, uschar *, uschar *, uschar *,
efd9a422 355 uschar *, address_item **, uschar **);
059ec3d9 356extern void sigalrm_handler(int);
58eb016e 357extern BOOL smtp_buffered(void);
059ec3d9 358extern void smtp_closedown(uschar *);
a7538db1 359extern int smtp_connect(host_item *, int, int, uschar *, int, BOOL, const uschar *
774ef2d7 360#ifdef EXPERIMENTAL_EVENT
a7538db1
JH
361 , uschar *
362#endif
363 );
059ec3d9
PH
364extern int smtp_feof(void);
365extern int smtp_ferror(void);
366extern uschar *smtp_get_connection_info(void);
367extern BOOL smtp_get_interface(uschar *, int, address_item *, BOOL *,
368 uschar **, uschar *);
369extern BOOL smtp_get_port(uschar *, address_item *, int *, uschar *);
370extern int smtp_getc(void);
371extern int smtp_handle_acl_fail(int, int, uschar *, uschar *);
b4ed4da0 372extern void smtp_log_no_mail(void);
4e88a19f 373extern void smtp_message_code(uschar **, int *, uschar **, uschar **);
059ec3d9 374extern BOOL smtp_read_response(smtp_inblock *, uschar *, int, int, int);
a5bd321b 375extern void smtp_respond(uschar *, int, BOOL, uschar *);
8f128379 376extern void smtp_notquit_exit(uschar *, uschar *, uschar *, ...);
059ec3d9
PH
377extern void smtp_send_prohibition_message(int, uschar *);
378extern int smtp_setup_msg(void);
379extern BOOL smtp_start_session(void);
380extern int smtp_ungetc(int);
d7b47fd0 381extern BOOL smtp_verify_helo(void);
e0df1c83 382extern int smtp_write_command(smtp_outblock *, BOOL, const char *, ...) PRINTF_FUNCTION(3,4);
8523533c
TK
383#ifdef WITH_CONTENT_SCAN
384extern int spam(uschar **);
0f0c8159 385extern FILE *spool_mbox(unsigned long *, const uschar *);
8523533c 386#endif
059ec3d9
PH
387extern BOOL spool_move_message(uschar *, uschar *, uschar *, uschar *);
388extern BOOL spool_open_datafile(uschar *);
389extern int spool_open_temp(uschar *);
390extern int spool_read_header(uschar *, BOOL, BOOL);
391extern int spool_write_header(uschar *, int, uschar **);
392extern int stdin_getc(void);
393extern int stdin_feof(void);
394extern int stdin_ferror(void);
395extern int stdin_ungetc(int);
396extern uschar *string_append(uschar *, int *, int *, int, ...);
76146973 397extern uschar *string_append_listele(uschar *, uschar, const uschar *);
00ba27c5 398extern uschar *string_append_listele_n(uschar *, uschar, const uschar *, unsigned);
059ec3d9
PH
399extern uschar *string_base62(unsigned long int);
400extern uschar *string_cat(uschar *, int *, int *, const uschar *, int);
401extern uschar *string_copy_dnsdomain(uschar *);
402extern uschar *string_copy_malloc(uschar *);
1dc92d5a 403extern uschar *string_copylc(const uschar *);
059ec3d9
PH
404extern uschar *string_copynlc(uschar *, int);
405extern uschar *string_dequote(uschar **);
81f91683 406extern BOOL string_format(uschar *, int, const char *, ...) ALMOST_PRINTF(3,4);
059ec3d9
PH
407extern uschar *string_format_size(int, uschar *);
408extern int string_interpret_escape(uschar **);
b1f8e4f8 409extern int string_is_ip_address(const uschar *, int *);
059ec3d9
PH
410extern uschar *string_log_address(address_item *, BOOL, BOOL);
411extern uschar *string_nextinlist(uschar **, int *, uschar *, int);
e0df1c83 412extern uschar *string_open_failed(int, const char *, ...) PRINTF_FUNCTION(2,3);
059ec3d9 413extern uschar *string_printing2(uschar *, BOOL);
e28326d8 414extern uschar *string_split_message(uschar *);
c7396ac5 415extern uschar *string_unprinting(uschar *);
1ba28e2b
PP
416extern BOOL string_vformat(uschar *, int, const char *, va_list);
417extern int strcmpic(const uschar *, const uschar *);
418extern int strncmpic(const uschar *, const uschar *, int);
059ec3d9
PH
419extern uschar *strstric(uschar *, uschar *, BOOL);
420
421extern uschar *tod_stamp(int);
41afb5cb 422
35aba663 423extern void tls_modify_variables(tls_support *);
059ec3d9
PH
424extern BOOL transport_check_waiting(uschar *, uschar *, int, uschar *,
425 BOOL *);
426extern void transport_init(void);
427extern BOOL transport_pass_socket(uschar *, uschar *, uschar *, uschar *,
428 int);
429extern uschar *transport_rcpt_address(address_item *, BOOL);
430extern BOOL transport_set_up_command(uschar ***, uschar *, BOOL, int,
431 address_item *, uschar *, uschar **);
432extern void transport_update_waiting(host_item *, uschar *);
433extern BOOL transport_write_block(int, uschar *, int);
1ba28e2b 434extern BOOL transport_write_string(int, const char *, ...);
511a6c14
JH
435extern BOOL transport_headers_send(address_item *, int, uschar *, uschar *,
436 BOOL (*)(int, uschar *, int, BOOL), BOOL, rewrite_rule *, int);
059ec3d9
PH
437extern BOOL transport_write_message(address_item *, int, int, int, uschar *,
438 uschar *, uschar *, uschar *, rewrite_rule *, int);
439extern void tree_add_duplicate(uschar *, address_item *);
440extern void tree_add_nonrecipient(uschar *);
441extern void tree_add_unusable(host_item *);
442extern int tree_insertnode(tree_node **, tree_node *);
443extern tree_node *tree_search(tree_node *, uschar *);
444extern void tree_write(tree_node *, FILE *);
38a0a95f 445extern void tree_walk(tree_node *, void (*)(uschar*, uschar*, void*), void *);
059ec3d9 446
8523533c
TK
447#ifdef WITH_CONTENT_SCAN
448extern void unspool_mbox(void);
449#endif
450
4deaf07d
PH
451extern int verify_address(address_item *, FILE *, int, int, int, int,
452 uschar *, uschar *, BOOL *);
059ec3d9 453extern int verify_check_dnsbl(uschar **);
4deaf07d 454extern int verify_check_header_address(uschar **, uschar **, int, int, int,
fe5b5d0b 455 uschar *, uschar *, int, int *);
059ec3d9 456extern int verify_check_headers(uschar **);
770747fd 457extern int verify_check_header_names_ascii(uschar **);
059ec3d9 458extern int verify_check_host(uschar **);
1c41c9cc 459extern int verify_check_notblind(void);
5130845b 460extern int verify_check_given_host(uschar **, host_item *);
059ec3d9
PH
461extern int verify_check_this_host(uschar **, unsigned int *, uschar*,
462 uschar *, uschar **);
463extern address_item *verify_checked_sender(uschar *);
464extern void verify_get_ident(int);
465extern BOOL verify_sender(int *, uschar **);
466extern BOOL verify_sender_preliminary(int *, uschar **);
467extern void version_init(void);
468
17c76198
PP
469extern ssize_t write_to_fd_buf(int, const uschar *, size_t);
470
9d1c15ef
JH
471/* vi: aw
472*/
059ec3d9 473/* End of functions.h */