diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/deliver.c | 9 | ||||
-rw-r--r-- | src/src/exipick.src | 6 | ||||
-rw-r--r-- | src/src/expand.c | 2 | ||||
-rw-r--r-- | src/src/mime.c | 26 | ||||
-rw-r--r-- | src/src/tls-openssl.c | 6 |
5 files changed, 36 insertions, 13 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c index b0b4601dc..87b54d88e 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -6511,8 +6511,8 @@ if (addr_senddsn != NULL) "Content-type: text/plain; charset=us-ascii\n\n" "This message was created automatically by mail delivery software.\n" - " ----- The following addresses had successful delivery notifications -----\n" - qualify_domain_sender, sender_addres, boundaryStrs, boundarySt); + " ----- The following addresses had successful delivery notifications -----\n", + qualify_domain_sender, sender_address, boundaryStr, boundaryStr); addr_dsntmp = addr_senddsn; while(addr_dsntmp) @@ -6944,8 +6944,9 @@ wording. */ for (addr = handled_addr; addr; addr = addr->next) { fprintf(f, "Action: failed\n" - "Final-Recipient: rfc822;%s\n", addr->address - "Status: 5.0.0\n"); + "Final-Recipient: rfc822;%s\n" + "Status: 5.0.0\n", + addr->address); if (addr->host_used && addr->host_used->name) fprintf(f, "Remote-MTA: dns; %s\nDiagnostic-Code: smtp; %d\n", addr->host_used->name, addr->basic_errno); diff --git a/src/src/exipick.src b/src/src/exipick.src index ed3b66154..4708ebb4a 100644 --- a/src/src/exipick.src +++ b/src/src/exipick.src @@ -1020,6 +1020,12 @@ sub _parse_header { return($self->_error("incorrect format: $_")) if (length($2) != $3); $self->{_recips}{$1} = { pno => $4, errors_to => $2 }; $addr = $1; + } elsif (/^(\S*)\s(\S*)\s(\d+),(\d+)\s(\S*)\s(\d+),(-?\d+)#3$/) { + #print STDERR "exim4 new type #3 DSN (untested): $_\n"; + return($self->_error("incorrect format: $_")) + if ((length($2) != $3) || (length($5) != $6)); + $self->{_recips}{$1} = { pno => $7, errors_to => $5 }; + $addr = $1; } elsif (/^.*#(\d+)$/) { #print STDERR "exim4 #$1 style (unimplemented): $_\n"; $self->_error("exim4 #$1 style (unimplemented): $_"); diff --git a/src/src/expand.c b/src/src/expand.c index c6356fbe1..70d7c7d2f 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1879,6 +1879,8 @@ switch (vp->type) #endif } + +return NULL; /* Unknown variable. Silences static checkers. */ } diff --git a/src/src/mime.c b/src/src/mime.c index 6a9e31a0a..95d3da472 100644 --- a/src/src/mime.c +++ b/src/src/mime.c @@ -601,16 +601,28 @@ NEXT_PARAM_SEARCH: int param_value_len = 0; /* found an interesting parameter? */ - if (strncmpic(mp->name, p,mp->namelen) == 0) + if (strncmpic(mp->name, p, mp->namelen) == 0) { uschar *q = p + mp->namelen; + int size = 0; + int ptr = 0; + /* yes, grab the value and copy to its corresponding expansion variable */ - while(*q != ';') q++; - param_value_len = (q - (p + mp->namelen)); - param_value = (uschar *)malloc(param_value_len+1); - memset(param_value,0,param_value_len+1); - q = p + mp->namelen; - Ustrncpy(param_value, q, param_value_len); + while(*q && *q != ';') /* ; terminates */ + { + if (*q == '"') + { + q++; /* skip leading " */ + while(*q && *q != '"') /* which protects ; */ + param_value = string_cat(param_value, &size, &ptr, q++, 1); + if (*q) q++; /* skip trailing " */ + } + else + param_value = string_cat(param_value, &size, &ptr, q++, 1); + } + param_value[ptr++] = '\0'; + param_value_len = ptr; + param_value = rfc2047_decode(param_value, check_rfc2047_length, NULL, 32, ¶m_value_len, &q); debug_printf("Found %s MIME parameter in %s header, value is '%s'\n", mp->name, mime_header_list[i].name, param_value); *((uschar **)(mp->value)) = param_value; diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c index 18994eaa9..e562a8926 100644 --- a/src/src/tls-openssl.c +++ b/src/src/tls-openssl.c @@ -888,7 +888,7 @@ if(!(rsp = d2i_OCSP_RESPONSE(NULL, &p, len))) { tls_out.ocsp = OCSP_FAILED; if (log_extra_selector & LX_tls_cipher) - log_write(0, LOG_MAIN, "Received TLS status response, parse error"); + log_write(0, LOG_MAIN, "Received TLS cert status response, parse error"); else DEBUG(D_tls) debug_printf(" parse error\n"); return 0; @@ -898,7 +898,7 @@ if(!(bs = OCSP_response_get1_basic(rsp))) { tls_out.ocsp = OCSP_FAILED; if (log_extra_selector & LX_tls_cipher) - log_write(0, LOG_MAIN, "Received TLS status response, error parsing response"); + log_write(0, LOG_MAIN, "Received TLS cert status response, error parsing response"); else DEBUG(D_tls) debug_printf(" error parsing response\n"); OCSP_RESPONSE_free(rsp); @@ -928,6 +928,8 @@ if(!(bs = OCSP_response_get1_basic(rsp))) cbinfo->u_ocsp.client.verify_store, 0)) <= 0) { tls_out.ocsp = OCSP_FAILED; + if (log_extra_selector & LX_tls_cipher) + log_write(0, LOG_MAIN, "Received TLS cert status response, itself unverifiable"); BIO_printf(bp, "OCSP response verify failure\n"); ERR_print_errors(bp); i = cbinfo->u_ocsp.client.verify_required ? 0 : 1; |