* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2015 */
+/* Copyright (c) University of Cambridge 1995 - 2016 */
/* See the file NOTICE for conditions of use and distribution. */
extern uschar * tls_cert_subject_altname(void *, uschar * mod);
extern uschar * tls_cert_version(void *, uschar * mod);
+extern uschar * tls_cert_der_b64(void * cert);
extern uschar * tls_cert_fprt_md5(void *);
extern uschar * tls_cert_fprt_sha1(void *);
extern uschar * tls_cert_fprt_sha256(void *);
extern BOOL tls_is_name_for_cert(const uschar *, void *);
# ifdef EXPERIMENTAL_DANE
-extern int tlsa_lookup(const host_item *, dns_answer *, BOOL, BOOL *);
+extern int tlsa_lookup(const host_item *, dns_answer *, BOOL);
# endif
#endif /*SUPPORT_TLS*/
extern tree_node *acl_var_create(uschar *);
extern void acl_var_write(uschar *, uschar *, void *);
-extern uschar *auth_b64encode(uschar *, int);
-extern int auth_b64decode(uschar *, uschar **);
extern int auth_call_pam(const uschar *, uschar **);
extern int auth_call_pwcheck(uschar *, uschar **);
extern int auth_call_radius(const uschar *, uschar **);
extern uschar *auth_xtextencode(uschar *, int);
extern int auth_xtextdecode(uschar *, uschar **);
+extern uschar *b64encode(uschar *, int);
+extern int b64decode(uschar *, uschar **);
+extern void bits_clear(unsigned int *, size_t, int *);
+extern void bits_set(unsigned int *, size_t, int *);
+
extern void cancel_cutthrough_connection(const char *);
extern int check_host(void *, const uschar *, const uschar **, uschar **);
extern uschar **child_exec_exim(int, BOOL, int *, BOOL, int, ...);
extern pid_t child_open_uid(const uschar **, const uschar **, int,
uid_t *, gid_t *, int *, int *, uschar *, BOOL);
+extern BOOL cleanup_environment(void);
extern uschar *cutthrough_finaldot(void);
extern BOOL cutthrough_flush_send(void);
extern BOOL cutthrough_headers_send(void);
extern void debug_print_string(uschar *);
extern void debug_print_tree(tree_node *);
extern void debug_vprintf(const char *, va_list);
-extern void decode_bits(unsigned int *, unsigned int *,
- int, int, uschar *, bit_table *, int, uschar *, int);
+extern void decode_bits(unsigned int *, size_t, int *,
+ uschar *, bit_table *, int, uschar *, int);
extern address_item *deliver_make_addr(uschar *, BOOL);
extern void deliver_init(void);
extern void delivery_log(int, address_item *, int, uschar *);
extern uschar *deliver_get_sender_address (uschar *id);
-#ifdef WITH_OLD_DEMIME
-extern int demime(uschar **);
-#endif
extern BOOL directory_make(const uschar *, const uschar *, int, BOOL);
#ifndef DISABLE_DKIM
extern BOOL dkim_transport_write_message(address_item *, int, int,
extern BOOL dscp_lookup(const uschar *, int, int *, int *, int *);
extern void enq_end(uschar *);
-extern BOOL enq_start(uschar *);
-#ifdef EXPERIMENTAL_EVENT
+extern BOOL enq_start(uschar *, unsigned);
+#ifndef DISABLE_EVENT
extern uschar *event_raise(uschar *, const uschar *, uschar *);
+extern void msg_event_raise(const uschar *, const address_item *);
#endif
+extern uschar ehlo_response(uschar *, size_t, uschar);
+extern const uschar * exim_errstr(int);
extern void exim_exit(int);
extern void exim_nullstd(void);
extern void exim_setugid(uid_t, gid_t, BOOL, uschar *);
extern uschar *host_ntoa(int, const void *, uschar *, int *);
extern int host_scan_for_local_hosts(host_item *, host_item **, BOOL *);
-extern uschar *imap_utf7_encode(uschar *, const uschar *,
+extern uschar *imap_utf7_encode(uschar *, const uschar *,
uschar, uschar *, uschar **);
extern void invert_address(uschar *, uschar *);
extern int ip_unixsocket(const uschar *, uschar **);
extern int ip_streamsocket(const uschar *, uschar **, int);
+extern int ipv6_nmtoa(int *, uschar *);
+
extern uschar *local_part_quote(uschar *);
extern int log_create(uschar *);
extern int log_create_as_exim(uschar *);
extern int mime_acl_check(uschar *acl, FILE *f,
struct mime_boundary_context *, uschar **, uschar **);
extern int mime_decode(const uschar **);
+extern ssize_t mime_decode_base64(FILE *, FILE *, uschar *);
extern int mime_regex(const uschar **);
+extern void mime_set_anomaly(int);
#endif
extern uschar *moan_check_errorcopy(uschar *);
extern BOOL moan_skipped_syntax_errors(uschar *, error_block *, uschar *,
extern void moan_write_from(FILE *);
extern FILE *modefopen(const uschar *, const char *, mode_t);
-extern void open_cutthrough_connection( address_item * addr );
+extern int open_cutthrough_connection( address_item * addr );
extern uschar *parse_extract_address(uschar *, uschar **, int *, int *, int *,
BOOL);
extern void readconf_driver_init(uschar *, driver_instance **,
driver_info *, int, void *, int, optionlist *, int);
extern uschar *readconf_find_option(void *);
-extern void readconf_main(void);
-extern void readconf_print(uschar *, uschar *, BOOL);
+extern void readconf_main(BOOL);
+extern void readconf_print(uschar *, uschar *, BOOL no_labels);
extern uschar *readconf_printtime(int);
extern uschar *readconf_readname(uschar *, int, uschar *);
extern int readconf_readtime(const uschar *, int, BOOL);
-extern void readconf_rest();
+extern void readconf_rest(void);
extern uschar *readconf_retry_error(const uschar *, const uschar *, int *, int *);
+extern void readconf_save_config(const uschar *);
extern void read_message_body(BOOL);
extern void receive_bomb_out(uschar *, uschar *);
extern BOOL receive_check_fs(int);
extern int smtp_feof(void);
extern int smtp_ferror(void);
extern uschar *smtp_get_connection_info(void);
-extern BOOL smtp_get_interface(uschar *, int, address_item *, BOOL *,
+extern BOOL smtp_get_interface(uschar *, int, address_item *,
uschar **, uschar *);
extern BOOL smtp_get_port(uschar *, address_item *, int *, uschar *);
extern int smtp_getc(void);
extern int smtp_handle_acl_fail(int, int, uschar *, uschar *);
extern void smtp_log_no_mail(void);
-extern void smtp_message_code(uschar **, int *, uschar **, uschar **);
+extern void smtp_message_code(uschar **, int *, uschar **, uschar **, BOOL);
extern BOOL smtp_read_response(smtp_inblock *, uschar *, int, int, int);
extern void smtp_respond(uschar *, int, BOOL, uschar *);
extern void smtp_notquit_exit(uschar *, uschar *, uschar *, ...);
extern FILE *spool_mbox(unsigned long *, const uschar *);
#endif
extern BOOL spool_move_message(uschar *, uschar *, uschar *, uschar *);
-extern BOOL spool_open_datafile(uschar *);
+extern int spool_open_datafile(uschar *);
extern int spool_open_temp(uschar *);
extern int spool_read_header(uschar *, BOOL, BOOL);
extern int spool_write_header(uschar *, int, uschar **);
extern uschar *string_append_listele(uschar *, uschar, const uschar *);
extern uschar *string_append_listele_n(uschar *, uschar, const uschar *, unsigned);
extern uschar *string_base62(unsigned long int);
-extern uschar *string_cat(uschar *, int *, int *, const uschar *, int);
+extern uschar *string_cat(uschar *, int *, int *, const uschar *);
+extern uschar *string_catn(uschar *, int *, int *, const uschar *, int);
+extern int string_compare_by_pointer(const void *, const void *);
extern uschar *string_copy_dnsdomain(uschar *);
extern uschar *string_copy_malloc(const uschar *);
extern uschar *string_copylc(const uschar *);
extern uschar *string_format_size(int, uschar *);
extern int string_interpret_escape(const uschar **);
extern int string_is_ip_address(const uschar *, int *);
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
extern BOOL string_is_utf8(const uschar *);
#endif
extern uschar *string_log_address(address_item *, BOOL, BOOL);
extern const uschar *string_printing2(const uschar *, BOOL);
extern uschar *string_split_message(uschar *);
extern uschar *string_unprinting(uschar *);
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
extern uschar *string_address_utf8_to_alabel(const uschar *, uschar **);
extern uschar *string_domain_alabel_to_utf8(const uschar *, uschar **);
extern uschar *string_domain_utf8_to_alabel(const uschar *, uschar **);
#ifdef WITH_CONTENT_SCAN
extern void unspool_mbox(void);
#endif
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
extern void utf8_version_report(FILE *);
#endif
extern int verify_address(address_item *, FILE *, int, int, int, int,
uschar *, uschar *, BOOL *);
-extern int verify_check_dnsbl(const uschar **);
+extern int verify_check_dnsbl(int, const uschar **, uschar **);
extern int verify_check_header_address(uschar **, uschar **, int, int, int,
uschar *, uschar *, int, int *);
extern int verify_check_headers(uschar **);