https://bugs.exim.org/show_bug.cgi?id=2537
Bug ID: 2537
Summary: wrong value in $mime_part_count
Product: Exim
Version: 4.93
Hardware: x86-64
OS: Linux
Status: NEW
Severity: bug
Priority: medium
Component: Delivery in general
Assignee: unallocated@???
Reporter: heiko@???
CC: exim-dev@???
Created attachment 1280
-->
https://bugs.exim.org/attachment.cgi?id=1280&action=edit
bash Script for reproducing
If a SMTP connection delivers multiple messages, $mime_part_count is not
properly reset and for non-MIME messages delivered after MIME messages
$mime_part_count is not -1 as it should and is documented: "For non-MIME
messages, this variable contains the value -1."
Could be easily reproduced with the attached shell script and the following
line in DATA ACL:
warn add_header = X-Exim-Test: $mime_part_count / $message_body_size
What the shell script it does:
Delivering four messages with batched SMTP:
(1) non-mime message
(2) mime message
(3) mime message
(4) non-mime message
Messages (1) and (4) are nearly identically, as well as (2) and (3).
Output:
$ ./multitest
check add_header = X-Exim-Test: $mime_part_count / $message_body_size
= X-Exim-Test: -1 / 46
X-Exim-Test: -1 / 46
check add_header = X-Exim-Test: $mime_part_count / $message_body_size
= X-Exim-Test: 2 / 321
X-Exim-Test: 2 / 321
check add_header = X-Exim-Test: $mime_part_count / $message_body_size
= X-Exim-Test: 2 / 321
X-Exim-Test: 2 / 321
check add_header = X-Exim-Test: $mime_part_count / $message_body_size
= X-Exim-Test: 2 / 46
X-Exim-Test: 2 / 46
---
--> $mime_part_count is wrong for message (4)! $mime_part_count should be -1
like in message (1).
--
You are receiving this mail because:
You are on the CC list for the bug.