Bugs: Browse | Submit New | Admin

[#14850] @headers in Filter Block does not get reparsed

Date:
2007-10-18 16:42
Priority:
3
Submitted By:
Erik Rainey (emrainey)
Assigned To:
Nobody (None)
Category:
mail filter
State:
Open
Summary:
@headers in Filter Block does not get reparsed

Detailed description
I'm attempting to use the "filter" method to pass the incoming message through DSPAM, then match the headers
with the specific header that returns the result.

filter("dspam ...") do
    log("headers: #{headers}")
    if headers['X-DSPAM-Result'] =~ /Spam/ then
        #save to junk
        return
    else
        # save to inbox
        return
    end
end

The problem I'm having is that even though the log message of the headers object contains the 'X-DSPAM-Result:' line,
the headers[] method does not return anything. It appears as if the @headers object was simply cloned and not reparsed
in the Gurgitate object given to the filter block.

Currently I'm using 1.8.5. 

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-10-18 20:22
Sender: Erik Rainey

I think I may have found the issue.
The "X-DSPAM-Result"
which is printed in the log is not actually listed as
"X-DSPAM-Result" internally (nor does that map to the
contained list). "X-Dspam-Result" does exist however.
The
fix looks to be more like to alter "capitalize_words"
to
lowercase all names first, then uppercase the first letter
in the word.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item