diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-05-25 01:35:43 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-05-25 01:35:43 +0100 |
commit | eae427c645a7d0e2051b0600d2e4235789740132 (patch) | |
tree | c21ba6b82edefb37466dc383a726d6362387ea54 /src | |
parent | dea98726252e8f5477d7539e368d6768d7f6001c (diff) |
Use separate line in Received: header for timestamp
Diffstat (limited to 'src')
-rw-r--r-- | src/src/receive.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/src/receive.c b/src/src/receive.c index ce7da5719..b0dacbd68 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -492,7 +492,7 @@ if (recipients_count >= recipients_list_max) int oldmax = recipients_list_max; recipients_list_max = recipients_list_max ? 2*recipients_list_max : 50; recipients_list = store_get(recipients_list_max * sizeof(recipient_item), FALSE); - if (oldlist != NULL) + if (oldlist) memcpy(recipients_list, oldlist, oldmax * sizeof(recipient_item)); } @@ -1516,11 +1516,10 @@ return TRUE; void received_header_gen(void) { -uschar *received; -uschar *timestamp; -header_line *received_header= header_list; +uschar * received; +uschar * timestamp = expand_string(US"${tod_full}"); +header_line * received_header= header_list; -timestamp = expand_string(US"${tod_full}"); if (recipients_count == 1) received_for = recipients_list[0].address; received = expand_string(received_header_text); received_for = NULL; @@ -1539,14 +1538,14 @@ so all we have to do is fill in the text pointer, and set the type. However, if the result of the expansion is an empty string, we leave the header marked as "old" so as to refrain from adding a Received header. */ -if (received[0] == 0) +if (!received[0]) { received_header->text = string_sprintf("Received: ; %s\n", timestamp); received_header->type = htype_old; } else { - received_header->text = string_sprintf("%s; %s\n", received, timestamp); + received_header->text = string_sprintf("%s;\n\t%s\n", received, timestamp); received_header->type = htype_received; } |