[Exim] $message_body_size returning only 0?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Eli
Date:  
À: exim-users
Sujet: [Exim] $message_body_size returning only 0?
I've been seeing blank emails come in to my servers recently and although
they're harmless, figured I'd finally just block them.

I created this ACL in my DATA section at the very top (first rule in DATA):

deny message   = Not enough body sent with message: $message_body_size bytes
sent \
                          ($message_size bytes total) in $body_linecount
lines
     condition = ${if eq {$message_body_size}{0} {yes}{no}}


(it wouldn't really be this long - I'm using it for testing)

Anyways, while testing I noticed that no matter how little or much text I
type after DATA (with or without any headers), $message_body_size always
results in 0. From the docs it doesn't mention anything about this not
working in DATA time, nor does it say anything about why it may be 0 when
there is really text. I also checked Exiscan patch to see if maybe that
killed the variable or something but I didn't see anything obvious to that
effect.

>From what I've read, this variable should contain the the byte count of the

message body text (including newlines) minus headers. So, in the following
examples (in order): 16, 7, 1. However, you can see that in each test, it
is reported as 0. Typo in variable names in Exim? I'm using 3.34 with
exiscan.

Here's the results from some tests:

354 Enter message, ending with "." on a line by itself
this

is a test
.
550 Not enough body sent with message: 0 bytes sent (16 bytes total) in 3
lines


354 Enter message, ending with "." on a line by itself
to: you
from: me

testy!
.
550 Not enough body sent with message: 0 bytes sent (25 bytes total) in 1
lines


354 Enter message, ending with "." on a line by itself
to: you
from: me


.
550 Not enough body sent with message: 0 bytes sent (19 bytes total) in 1
lines