[exim] (system) filter "debug_print"

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Gabor FUNK
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] (system) filter "debug_print"
Any chance for doing a similar thing like "debug_print" in the filters?
As far as I see, there is no "debug_print" and "testprint" results turns out
in the "wrong place".

In more details, let's have this small filter for example:
# Exim filter
### -------------------- Virus warning filter:
if $n1 is not "F: Virus Warning filter - 0010 - [$n4 $n5]" then endif
testprint "F: Virus Warning filter - 0010 - [$n4 $n5]"
#^
if $message_headers contains "found to be infected" then add 11 to n4 endif
if $n4 is above 10 then add 1 to n1 add 10 to n2 endif
#
### -------------------- Virus filter
if $n1 is not "F: Virus filter - 0020 - [$n4 $n5]" then endif
testprint "F: Virus filter - 0020 - [$n4 $n5]"
if $n1 is 0 then add -$n4 to n4
if $h_subject CONTAINS "A Card for you -" then add 11 to n4 endif
#
if $n4 is above 10 then add 1 to n1 add 10 to n2 endif
endif
#end of filter


An "exim4 -d-all+filter -bF ..." test would result in this:

...
Condition is true: $n1 is not F: Virus Warning filter - 0010 - [$n4 $n5]
Condition is false: $message_headers contains found to be infected
Condition is false: $n4 above 10
Condition is true: $n1 is not F: Virus filter - 0020 - [$n4 $n5]
Condition is true: $n1 is 0
Condition is false: $h_subject CONTAINS A Card for you -
Condition is false: $n4 above 10
>>>>>>>>>>>>>>>> Exim pid=28983 terminating with rc=0 >>>>>>>>>>>>>>>>

Return-path copied from sender
Sender      = root@xxxxxxxxxx
Recipient   = root@xxxxxxxxxx
Testing Exim filter file "./filter_all2"


Testprint: F: Virus Warning filter - 0010 - [0 0]
Testprint: F: Virus filter - 0020 - [0 0]
Add 0 to n4
Filtering did not set up a significant delivery.
Normal delivery will occur.

---------

See, my problem is that I would like to see some text
"explanation" (debug) before (and/or after) some sections
of conditions, like the following line:
"Testprint: F: Virus Warning filter - 0010 - [0 0]"
but not at the end of the results, but at the place wher the
"condition is really happening", eg., where [instead of] line:
"Condition is true: $n1 is not F: Virus Warning filter - 0010 - [$n4 $n5]"
is.

(And also see values of $n4, etc, not the string...)

Any quirk to do that? Or is it a dev/wishlist item?

Thanks in advance,
G.