diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/globals.c | 7 | ||||
-rw-r--r-- | src/src/globals.h | 1 | ||||
-rw-r--r-- | src/src/readconf.c | 1 | ||||
-rw-r--r-- | src/src/smtp_in.c | 19 |
4 files changed, 17 insertions, 11 deletions
diff --git a/src/src/globals.c b/src/src/globals.c index 4f5a922b4..5ff0f844b 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -492,9 +492,10 @@ int check_log_space = 0; BOOL check_rfc2047_length = TRUE; int check_spool_inodes = 0; int check_spool_space = 0; -uschar *client_authenticator = NULL; -uschar *client_authenticated_id = NULL; -uschar *client_authenticated_sender = NULL; +uschar *chunking_advertise_hosts = US"*"; +uschar *client_authenticator = NULL; +uschar *client_authenticated_id = NULL; +uschar *client_authenticated_sender = NULL; int clmacro_count = 0; uschar *clmacros[MAX_CLMACROS]; BOOL config_changed = FALSE; diff --git a/src/src/globals.h b/src/src/globals.h index 6e42bc3d7..e5bdec4a2 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -267,6 +267,7 @@ extern int check_log_space; /* Minimum for message acceptance */ extern BOOL check_rfc2047_length; /* Check RFC 2047 encoded string length */ extern int check_spool_inodes; /* Minimum for message acceptance */ extern int check_spool_space; /* Minimum for message acceptance */ +extern uschar *chunking_advertise_hosts; /* RFC 3030 CHUNKING */ extern uschar *client_authenticator; /* Authenticator name used for smtp delivery */ extern uschar *client_authenticated_id; /* "login" name used for SMTP AUTH */ extern uschar *client_authenticated_sender; /* AUTH option to SMTP MAIL FROM (not yet used) */ diff --git a/src/src/readconf.c b/src/src/readconf.c index 25ff58eb9..a1591e2a1 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -212,6 +212,7 @@ static optionlist optionlist_config[] = { { "check_rfc2047_length", opt_bool, &check_rfc2047_length }, { "check_spool_inodes", opt_int, &check_spool_inodes }, { "check_spool_space", opt_Kint, &check_spool_space }, + { "chunking_advertise_hosts", opt_stringptr, &chunking_advertise_hosts }, { "daemon_smtp_port", opt_stringptr|opt_hidden, &daemon_smtp_port }, { "daemon_smtp_ports", opt_stringptr, &daemon_smtp_port }, { "daemon_startup_retries", opt_int, &daemon_startup_retries }, diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 53387011c..bc53166e5 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1520,14 +1520,6 @@ sender_verified_list = NULL; /* No senders verified */ memset(sender_address_cache, 0, sizeof(sender_address_cache)); memset(sender_domain_cache, 0, sizeof(sender_domain_cache)); -#ifndef DISABLE_PRDR -prdr_requested = FALSE; -#endif - -/* Reset the DSN flags */ -dsn_ret = 0; -dsn_envid = NULL; - authenticated_sender = NULL; #ifdef EXPERIMENTAL_BRIGHTMAIL bmi_run = 0; @@ -1538,6 +1530,11 @@ dkim_signers = NULL; dkim_disable_verify = FALSE; dkim_collect_input = FALSE; #endif +dsn_ret = 0; +dsn_envid = NULL; +#ifndef DISABLE_PRDR +prdr_requested = FALSE; +#endif #ifdef EXPERIMENTAL_SPF spf_header_comment = NULL; spf_received = NULL; @@ -3774,6 +3771,12 @@ while (done <= 0) tls_advertise_hosts. We must *not* advertise if we are already in a secure connection. */ + if (verify_check_host(&chunking_advertise_hosts) != FAIL) + { + s = string_catn(s, &size, &ptr, smtp_code, 3); + s = string_catn(s, &size, &ptr, US"-CHUNKING\r\n", 11); + } + #ifdef SUPPORT_TLS if (tls_in.active < 0 && verify_check_host(&tls_advertise_hosts) != FAIL) |