[exim-dev] [Bug 424] New: a wish for "debug_print" in the fi…

Pàgina inicial
Delete this message
Reply to this message
Autor: bug424
Data:  
A: exim-dev
Assumpte: [exim-dev] [Bug 424] New: a wish for "debug_print" in the filters
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=424

           Summary: a wish for "debug_print" in the filters
           Product: Exim
           Version: 4.63
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: wishlist
          Priority: low
         Component: Filters
        AssignedTo: ph10@???
        ReportedBy: funk.gabor@???
         QAContact: exim-dev@???
                CC: funk.gabor@???



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...)

Thanks in advance

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email