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